Hi guys
I have samsung j111f rooted with su binary
I've installed termux app and started using some pakages but there was some that needs root privileges when trying to run su and get to [email protected]# i was getting sush: command not found so i have installed sudo for termux from gitlab .
Everything works when using sudo [command] but when i drop to root shell sudo su [-] and try to run nmap for example :
$ sudo su [-]
# nmap
bash: /data/data/com.termux/files/usr/bin/nmap: Permission denied
#
Is there any way to solve the problem without using sudo each time ?
Related
Hello, i am trying to boot debian on my nexus one the guide i am using is telling me to run these commands
$ adb remount
$ adb install vnc.apk
$ adb install swapper.apk
$ adb shell
# cd /sdcard/debian
# su
# sh ./debian.sh
# exit (repeat until out of adb)
I am getting to the point where i type the command # cd /sdcard/debian but it tells me cd: can't cd to /sdcard/debian. Anyone know what i am doing wrong? Thanks...
btw i am using ubuntu
How come this works:
Code:
[[email protected]:~/android-dev/optimus_m]$ adb shell su -c id
uid=0(root) gid=0(root)
But this:
Code:
[[email protected]:~/android-dev/optimus_m]$ adb shell su -c pm disable com.seven.Z7
Permission denied
Fails?
In the first example superuser prompts for permission and then allows the command, in the second it doesn't prompt and just instantly fails. There are no related saved settings in superuser.
If there isn't a way to fix this, is there another way to execute commands on the phone as root from a script on the host computer?
Nothing?
Looks like I'm on my own. :\
Hi,
I'm trying to install busybox into a development board by downloading the pre-compiled binary and following the installation steps here. However, after doing so, I'm still unable to use the commands in /system/busybox. For example, when I try to run mknod, it shows me the following error:
Code:
./sh: mknod: not found
Basically, I did the following:
In Linux
Code:
adb root
adb remount
adb push busybox /system/busybox
adb shell
In device adb shell
Code:
cd /system/busybox
./busybox --install .
./sh
cd /system/bin
mv sh sh.android
ln -s /system/busybox/sh sh
It would seem like what I did to install busybox didn't work. May I know what's the correct procedure to install it?
I tried creating symlinks using the same ln command and it works, but do I have to do this manually for every single command?
Thanks!
goister said:
Hi,
I'm trying to install busybox into a development board by downloading the pre-compiled binary and following the installation steps here. However, after doing so, I'm still unable to use the commands in /system/busybox. For example, when I try to run mknod, it shows me the following error:
Code:
./sh: mknod: not found
Basically, I did the following:
In Linux
Code:
adb root
adb remount
adb push busybox /system/busybox
adb shell
In device adb shell
Code:
cd /system/busybox
./busybox --install .
./sh
cd /system/bin
mv sh sh.android
ln -s /system/busybox/sh sh
It would seem like what I did to install busybox didn't work. May I know what's the correct procedure to install it?
I tried creating symlinks using the same ln command and it works, but do I have to do this manually for every single command?
Thanks!
Click to expand...
Click to collapse
You didn't add /system/busybox to your PATH
Sent from my LT26i using XDA
Hi,
Where would I add it? init.rc or something?
Anyone?
Thanks!
Use any 1 of the following methods.
I have personally tried these on 2 of my china android phones.
1. Using linux {Recommended}Install Ubuntu or DebianEither
Install the android-sdk.
dl.google.com/android/adt/adt-bundle-linux-x86-20130717.zip <==x86
dl.google.com/android/adt/adt-bundle-linux-x86_64-20130717.zip <==x86_64
or
Just get the standalone adb and fastboot executables
texasice-cream-sandwich-mirror.googlecode.com/files/adb_fastboot.zipInstall ia32-libsRun this in a terminal
Code:
sudo apt-get install libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5
Now download the files required for root and put it in the same folder as adbmir.cr/GDEPZT4VAfter you finish installing the files,
Connect your device with debugging mode enabled
Run
Code:
cd path/to/adb
where "path/to/adb" is the directory of your adb file
Now run
Code:
sudo chmod a+x adb
sudo chmod a+x fastboot
>>Root
Code:
./adb devices
./adb push psneuter /data/local/tmp/
./adb push busybox /data/local/tmp/
./adb push su /data/local/tmp/
./adb push Superuser.apk /data/local/tmp/
./adb shell
Chmod and run the exploit under adb shell
Code:
cd /data/local/tmp/
chmod 755 psneuter
./psneuter
Now re-engage an adb shell to check if the exploit worked.
Code:
./adb kill-server
./adb devices
./adb shell
If you see a # sign, the exploit was was successful. Otherwise repeat from >>Root
Now run these on the same adb shell
Code:
cd /data/local/tmp
./busybox ash
mount -o remount,rw /dev/block/mtdblock0 /system
cp /data/local/tmp/su /system/xbin/su
chmod 6755 /system/xbin/su
chown 0.0 /system/xbin/su
cp /data/local/tmp/Superuser.apk /system/app/Superuser.apk
chmod 777 /system/app/Superuser.apk
cp /data/local/tmp/busybox /system/xbin/busybox
chmod 6755 /system/xbin/busybox
Now reboot your device and open up SuperSU. Let it update the binary.
Your device should be rooted. 2. Use Windows + MoboroboMethod 1 {Recommended but hard}
Download Moborobo from
Code:
moborobo.com
This software can Install drivers for many china phones and other branded phones.
After installing Moborobo download the files required for root
Code:
mir.cr/GDEPZT4V
Extract the files to the installation directory of Moborobo.
Code:
C:\Program Files (x86)\Moborobo
Run a CMD window under that directory and type
Code:
xcopy AndroidInterface.exe adb.exe
Connect your device in debugging mode & Open up Moborobo, It will install the drivers.
Keep Moborobo open & Follow the instructions mentioned in >>Root
P.S- the linux commands begin with a "./" remove this in windows or else it won't work. Note: Wherever I mentioned a terminal, the windows equivalent to this would be cmdMethod 2 {Easier}
Download and Install Moborobo just like above and run this under a cmd on that folder
Code:
xcopy AndroidInterface.exe adb.exe
Also download UnlockRoot or SuperOneClick
To make sure the adb files are of the same version, Copy over
Code:
adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
to UnlockRoot's tools directory or SOC's ADB directory
Connect your device in debugging mode and open up moborobo.
Now keep Moborobo open and Run UnlockRoot or SOC. Good Luck :good:
---Smo0thK, team BL4CKF1R3---
Click thanks if I helped you.
[/COLOR]
Hi there!
under method 2 in the end...I could not locate ROOT nowhere.....
>>Root
arena1 said:
Hi there!
under method 2 in the end...I could not locate ROOT nowhere.....
Click to expand...
Click to collapse
I said follow the instructions mentioned in ">>Root".
I named a step in Method one as ">>Root". So I meant you should repeat those steps.
Now download the files required for root and put it in the same folder as adb
mir.cr/GDEPZT4V
Click to expand...
Click to collapse
What files?
EDIT: managed to do all the steps using method 1 in windows but got this message with executing ./psneuter :
mnmap() failed. Invalid argument
I used windows to root
failed at adb shell psneuter command...
/system/bin/sh: psneuter: not found
how to proceed ?
have you got bored of your one Text colored terminal ?
when you look at the results you always are confused ?
well .. you came into the right thread
I'm here today to show you how to make every busybox command fully functional
I was trying to make this command work but no success
Code:
#ls --color=always
then i ended up making busybox fully functional
Note: you must have rooted device and custom recovery and SDK tools " incase you don't have adb.rar "and your phone developer mode and USB debugging checked .
go to your SDK tools press sheft and right mouse click and open cmd here
________________________________________________________________________
now .. lets get to it shall we ?
1 - reboot into recovery and connect your device in your PC
2 - type in these commands in your PC command prompt you opened in order :
Code:
# adb shell
# mount system
# cp /system/bin/sh /sdcard/Download/sh
#adb reboot
3 - reboot your device
4 - download this busybox app and start it
jrummy.busybox.installer
5 - you'll see in the app's INSTALLER icon a location /system/xbin
change it to /system/bin
6 - open app's settings "upper right corner beside the three dot's" and check all what's in the installer settings
7 - press back and click install " your phone will boot into recovery and install the busybox "
8 - after finishing the process your device will reboot normally but wait a minute !!! SU is not working anymore :crying:
9 - reboot your device again into recovery !! " I'll try to fix it for you "
10 - type in these commands in order :
Code:
#adb shell
#mount system
#cp /sdcard/Download/sh /system/bin/sh
#chmod 755 /system/bin/sh
#adb reboot
and we are done
look at the attachment below this is how your terminal will look like and error free
I'm sorry about this post
apparently I was kinda mistaken
I think what happens that lead to this is
when you write down the applet's name in terminal the device start to search inside bin file first .. if the applet was not found in bin .
the device will start to search on xbin file and maybe the whole storage for that command
so .. since there are some applets in bin are the same one in busybox and I was able to locate them "took me like an hour to do so"
and these applets are :
Code:
[COLOR="blue"]blkid
brctl
cat
chmod
chown
clear
cmp
cp
date
dd
df
dmesg
du
grep
gzip
hd
id
ifconfig
insmod
ionice
ip
kill
ln
ls
lsmod
lsof
mkdir
mke2fs
mknod
mkswap
mount
mv
netstat
nohup
ping
ping6
printenv
ps
readlink
reboot
renice
rm
rmdir
rmmod
route
sh
sleep
swapoff
swapon
sync
top
touch
tune2fs
umount
uptime[/COLOR]
there are a lot of difference in results between the factory applets and the busybox applets
if you want to see the difference install busybox in /system/xbin and in terminal type one of these applets above like this :
for busybox applets result :
Code:
busybox [I][COLOR="blue"]applet[/COLOR][/I]
for system applets result :
Code:
[I][COLOR="Blue"]applet[/COLOR][/I]
it might not be a new thing but for me it is
I just wanted to share that info for the ones who doesn't know
Edit : there is also one applet in system/xbin which is " nc "
thanks .