[Q] Install busybox - Wildfire Q&A, Help & Troubleshooting

Anyone knows how to install busybox?
I've tried to follow some guides but ends up with:
Code:
215:Desktop ricardo$ adb push busybox /data/local
580 KB/s (1083568 bytes in 1.823s)
215:Desktop ricardo$ adb shell
$ su
# cd /system/xbin
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cat /data/local/busybox > busybox
cannot create busybox: not enough memory
or
$ su
# cd /data/local
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# dd if=/data/local/busybox of=/system/xbin/busybox
/system/xbin/busybox: cannot open for write: Out of memory
or
$ su
# cd /data/local
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# ./busybox cp /data/local/busybox /system/xbin
cp: can't create '/system/xbin/busybox': Cannot allocate memory

same here. cannot write to rw-mounted /system.
sucks

Try my zip file. Woked for me
The only thing that I want to change and I can't is the init.rc file. I tried to mount the / (rootfs) with rw, but every time I restart my device the file is copied, again, from the ramdisk image.

I have the same problem
ricardoft said:
Try my zip file. Woked for me
The only thing that I want to change and I can't is the init.rc file. I tried to mount the / (rootfs) with rw, but every time I restart my device the file is copied, again, from the ramdisk image.
Click to expand...
Click to collapse
What should I do with your files?
Nobody has a solution to this?

I don't think this is a memory issue though, .. added 512mb swap and still it claimed to be out of memory, ..
also I figured maybe hd space .. however when i ln /data/local/tmp/busybox to /system/xbin it had the same error.
I both tried ln from the system and ln from busybox both had same result.

It's not a memory problem! In order to install it you have to be in recovery mode.
Try:
While in recovery mode use adb to connect to our phone. Now transfer the zip file (busybox.zip) to your phone and install it via clockwork recovery -> install zip file -> select my zip file.

can anyone post the proper busybox file cause for some reason the file signature verification failed.
adb push busybox-signed.zip /sdcard/busybox-signed.zip
rebooted phone held down volume button while booting ..
choose recovery, ..
choose install zip from sdcard..
then i see a lot of no and one yes .. so i choose yes but the installation is aborted.

Just install titanium backup and click on 'problems?' at the bottom. It will install BusyBox for you.

it has error during installation at line 4 with your busybox.zip
somethinf like can not chmod
(rooted buzz with stock rom)

Elibongo said:
Just install titanium backup and click on 'problems?' at the bottom. It will install BusyBox for you.
Click to expand...
Click to collapse
Do what this guy said.

titanium install in /sdcard busybox, not in /system/bin (xbin) , so it is not usuable by other apps

i have installed it in during recovery mode in /system/xbin
how now to specify PATH for using commands from it?

kevin2516 said:
Do what this guy said.
Click to expand...
Click to collapse
you have read my mind especially since that isn't free software.

hellysmile said:
i have installed it in during recovery mode in /system/xbin
how now to specify PATH for using commands from it?
Click to expand...
Click to collapse
i think you need to create aliases however why install it in xbin anyways then, .. if you need to create aliases or links in bin.. ?
example
$ ln -s /data/local/tmp/busybox ls
$ ./ls
if it is in a path that is included in PATH executing a command will auto look for it in all directories defined in PATH env so basicly you could just create all the directories under /data/local/tmp/bin
and just then append that to PATH env echo $PATH then append :/data/local/tmp/bin to it and busybox should work as well.

Ofloo said:
you have read my mind especially since that isn't free software.
Click to expand...
Click to collapse
titanium backup is free software... look on the market, there's a free version and a donate version.

i have aliases in /system/xbin
they was created after busybox --instal -s
but in system allready exists some commands like ls => i want to use ls from busbox, not from system
and terminal emulator dont anderstand ^[ likes bindings

is there a definitive way to do this. There seems to be no clear way of doing it.

matpol said:
is there a definitive way to do this. There seems to be no clear way of doing it.
Click to expand...
Click to collapse
Maybe this helps:
fang0654 said:
To install:
1) extract and push busybox to your sdcard, reboot into recovery
2) mount /system
3) if you don't have /system/xbin (you should), create it
adb shell:
# mkdir /system/xbin (if necessary)
dd if=/sdcard/busybox of=/system/xbin/busybox
cd /system/xbin
chmod 755 busybox
./busybox --install .
4) reboot and done
OPTIONAL - before rebooting replace the busybox installed by the root process in /system/bin
1) mv /system/bin/busybox /system/bin/busybox.bak
2) cp /system/xbin/busybox /system/bin/busybox
Click to expand...
Click to collapse
from this site: http://forum.xda-developers.com/showthread.php?t=702634

The above is pretty straightforward. The only thing is you need to download the zip in the other thread and 'busybox' refers to the binary in the zip rather than the whole directory - as I understand it. Correct me if I am wrong but trying the dd command on the dir will not work.

matpol said:
The above is pretty straightforward. The only thing is you need to download the zip in the other thread and 'busybox' refers to the binary in the zip rather than the whole directory - as I understand it. Correct me if I am wrong but trying the dd command on the dir will not work.
Click to expand...
Click to collapse
You dont have to extract the binary into a folder, just extract the busybox file direct on your sdcard. Than the dd command should work, on my phone it works fine.
But if not, does the command cat in the adb shell work?
If so, try istead of the dd comand:
Code:
mount /sdcard
cat /sdcard/busybox > /system/xbin/busybox
And remember to start your wildfire in the recovery mode, that was the mistake I had done...

Related

[ROOT ICS] The hard way && Digging for roots

For anyone that doesn't want to root the hard way crossix has come up with a double click root for Windows forum.xda-developers.com/showpost.php?p=23052186&postcount=105
Update 2/26/12
/system can now be mounted writable see the bottom of this post.
So the old Honeycomb exploit has now been patched in ICS. But there was an exploit found in the newer ICS kernels. Written by saurik,: called mempodroid
There is an offset needed as an argument to the binary, for the a100 we'll use what has worked for the a200 as noted in sauriks github linked above.
The issue with this is mounting /system as writable. I'm not sure if it's something in ICS, but it appears to be write protected. As noted here and here we will loop mount the system partition.
The tools needed are:
1. mempodroid under Usage Instructions, download pre-compiled
2. busybox 1.20 snapshot 3-10-12
3. su the latest from androidsu.com, extract from system/bin
4. mount.txt script
After downloading and extracting place them all in a folder called tools.
This must be done with adb. Issue the following from cmd or a terminal:
Code:
$ adb shell mkdir /data/local/tools
$ adb push tools /data/local/tools ; adb shell
$ cd /data/local ; chmod 755 tools/*
$ cd tools ; ./mempodroid 0xd9f0 0xaf47 sh
If all went well you should be at a hash # prompt. This is temp root.
mount /system rw the new way:
Code:
# PATH=$PWD:$PATH
# sh mount.txt -o remount,rw /system
Copy su and busybox to /system
Code:
# ./busybox cp busybox /system/xbin; ./busybox cp su /system/xbin/
# chmod 6755 /system/xbin/su
Install busybox
Code:
# cd /system/xbin
# for i in $(busybox --list); do ln -s busybox $i; done; sync
Copy the mount script
If busybox is updated this step must be run again
Code:
# cp /data/local/tools/mount.txt /system/bin/mount
# cp /data/local/tools/mount.txt /system/xbin/mount
Done your a100 should be rooted
the old way:
Now lets loop mount /system
Code:
[b]This is no longer needed[/b]
# ./busybox losetup -o $((512 * 51200)) /dev/block/loop7 /dev/block/mmcblk0
Code:
# ./busybox losetup /dev/block/loop7 /dev/block/mmcblk0p3
# mkdir loop ; mount -t ext4 /dev/block/loop7 loop
Copy su and busybox to the new mount point.
Code:
# ./busybox cp su loop/xbin/ ; ./busybox cp busybox loop/xbin/
# chmod 6755 loop/xbin/su ; sync
If it worked your a100 is fully rooted. Make sure to install SuperUser from the Market.
Either get busybox installer from the market, and install it to /data/local/tools/loop/xbin
Or:
Code:
# cd loop/xbin
# for i in $(busybox --list); do ln -s busybox $i; done; sync
The mount point won't survive a reboot so in order to write to /system again run:
Code:
# busybox losetup /dev/block/loop7 /dev/block/mmcblk0p3
# mount -t ext4 /dev/block/loop7 /data/local/tools/loop
[update 2/26/12]
To mount /system as writable do the following from adb. We'll just make a directory called /data/loop for easy access.
Code:
$ adb shell
$ su
# stop
[b]your screen will go black[/b]
# mkdir /data/loop
[b]skip this if the loop is already set up
# busybox losetup /dev/block/loop7 /dev/block/mmcblk0p3[/b]
# mount -t ext4 /dev/block/loop7 /data/loop
# mount -o bind /data/loop /system
# start
You can write to /system with any app but /system can't be remounted ro then back to rw.
This can be added to /etc/install-recovery.sh to make it permanent
Code:
busybox losetup /dev/block/loop7 /dev/block/mmcblk0p3
mount /dev/block/loop7 /data/loop
mount -o bind /data/loop /system
Thanks to crossix as the first to get temp root, and Icewyng for pointing out the exploit and helping with the magic number.
Ill be testing this when I get home, if it works Ill attempt to write a 1 command script to do it.
Sent from my MB860 using XDA App
OK...
Testing this out and found there were a couple of bugs.
You didn't have a "loop" folder created so I made one in the "tools" folder.
and, when mounting, you need to specify -t ext4.
Here are the revised commands for # mount /dev/block/loop7 loop
mkdir loop;mount -t ext4 /dev/block/loop7 /data/local/tools/loop
I noticed that the files /data/local/tools/loop/xbin/su and /data/local/tools/loop/xbin/busybox don't exist on /system/xbin until after a restart.
Finally, the busybox we are using to install doesn't seem to make all of the links to all of the nice commands we are used to, so things like grep, cp, etc... they won't work. I'm trying to figure out how to re-run the GUI busybox installer and point it to the loop folder, but haven't had much success.
danifunker said:
OK...
Testing this out and found there were a couple of bugs.
You didn't have a "loop" folder created so I made one in the "tools" folder.
and, when mounting, you need to specify -t ext4.
Here are the revised commands for # mount /dev/block/loop7 loop
mkdir loop;mount -t ext4 /dev/block/loop7 /data/local/tools/loop
I noticed that the files /data/local/tools/loop/xbin/su and /data/local/tools/loop/xbin/busybox don't exist on /system/xbin until after a restart.
Finally, the busybox we are using to install doesn't seem to make all of the links to all of the nice commands we are used to, so things like grep, cp, etc... they won't work. I'm trying to figure out how to re-run the GUI busybox installer and point it to the loop folder, but haven't had much success.
Click to expand...
Click to collapse
You beat me to the punch... was about to point it out.
Not sure what version of busybox this is but I will try with 1.19.2 and see how it goes.
Edit: Got root! It works great... for Busybox, use Busybox Installer to be able to get the latest version (1.19.4) I confirm that system is R/O for now.
danifunker said:
OK...
Testing this out and found there were a couple of bugs.
You didn't have a "loop" folder created so I made one in the "tools" folder.
and, when mounting, you need to specify -t ext4.
Here are the revised commands for # mount /dev/block/loop7 loop
mkdir loop;mount -t ext4 /dev/block/loop7 /data/local/tools/loop
I noticed that the files /data/local/tools/loop/xbin/su and /data/local/tools/loop/xbin/busybox don't exist on /system/xbin until after a restart.
Finally, the busybox we are using to install doesn't seem to make all of the links to all of the nice commands we are used to, so things like grep, cp, etc... they won't work. I'm trying to figure out how to re-run the GUI busybox installer and point it to the loop folder, but haven't had much success.
Click to expand...
Click to collapse
I did have some typos, think it's right now. That is an old busybox, it was just a quick find and it includes losetup but it's not one to use full time. Maybe sync is needed at the end so files are written properly. I didn't have to use -t ext4 with HC, but Ill add it to the OP
[edit] you have to use "busybox cp or busybox grep" I didn't include a way to add all the symlinks. Wow I have typos everywhere it's the end of the day for me, working nights.
Ok ... Got root!
Titanium works, Busybox Installer works, Superuser works, Root Explorer works...
Only thing is that System is R/O but we will work on it.
Waiting for a R/W system...and then, no one will stop my update
I can't get it to root :-(
It say not found
Sent from my A100 using xda premium
jondi23 said:
I can't get it to root :-(
It say not found
Sent from my A100 using xda premium
Click to expand...
Click to collapse
At what point, need some more details.
The tools folder gets pushed (the 3 files are copied) but then it says there is no such folder.
edit: never mind - i created the folder manually and pushed the files into the folder
edit2: rooted - thakns guys
Brilliat work, will try this later (need to get the sdk all set up again, I've been distro swapping). Got a pool match tonight too, so will try as soon as I can, will give whatever feedback I can later.
myprecious27 said:
The tools folder gets pushed (the 3 files are copied) but then it says there is no such folder.
edit: never mind - i created the folder manually and pushed the files into the folder
Click to expand...
Click to collapse
I forgot adb can't push a whole directory, it instead only copies the files within the directory.
wait how is it rooted if it's r/o I thought point of root was to make the file system r/w... er is root just allowing you to view all directories? Sorry for a noobish question, but you gotta start somewhere right?
rando152 said:
wait how is it rooted if it's r/o I thought point of root was to make the file system r/w... er is root just allowing you to view all directories? Sorry for a noobish question, but you gotta start somewhere right?
Click to expand...
Click to collapse
Well I think if we have su working we will be able to mount /system rw in some way if not directly. I cant imagine not being able to.
In any case though being able to write to /data as root is very useful. Example: Hulu flash fix.
You can't view /data if you're not root. That's one thig. Also, other functions may require root, like advanced networking things, etc.
I agree, not being able to write to /system is a major inconvenience, but most of the root programs will still work, as long as you're not writing to /system.
Since this is a temp root, does it mean that I will have to reroot every time I reboot? Will apps like Adfree work on this?
better yet is there a way we can do this solely on the tab? im away for work for another 4 weeks and only have my cell and a100 with me :-(
Sent from my SGH-I897 using xda premium
I get
Code:
255|[email protected]:/data/local/tools # mount -t ext4 /dev/block/loop7 /data/local
/tools/loop
lock/loop7 /data/local/tools/loop <
mount: Invalid argument
simoneser said:
I get
Code:
255|[email protected]:/data/local/tools # mount -t ext4 /dev/block/loop7 /data/local
/tools/loop
lock/loop7 /data/local/tools/loop <
mount: Invalid argument
Click to expand...
Click to collapse
I noticed the same thing happen after you root it and restart... not sure what to do next. Are you at temp loop?
simoneser said:
I get
Code:
255|[email protected]:/data/local/tools # mount -t ext4 /dev/block/loop7 /data/local
/tools/loop
lock/loop7 /data/local/tools/loop <
mount: Invalid argument
Click to expand...
Click to collapse
danifunker said:
I noticed the same thing happen after you root it and restart... not sure what to do next. Are you at temp loop?
Click to expand...
Click to collapse
try:
Code:
# busybox losetup -d /dev/block/loop7
# busybox losetup -o $((512 * 51200)) /dev/block/loop7 /dev/block/mmcblk0
# mount -t ext4 /dev/block/loop7 /data/local/tools/loop
The first line may produce
losetup: /dev/block/loop7: No such device or address
If it's not looped
After you are rooted the above can be run without adb from a terminal as su.
The mount point can be anywhere ex. /sdcard/loop instead of /data/local/tools/loop

[GUIDE] Universal rooting to any ics that you have the stock firmware.

This guide was tested on my samsung galaxy [email protected] gt-B5330 and it worked.
WARNING: this can brick your phone, used on your own risk (both eyes wide open).
The idea behing can be ported on any phone that allows you to upload custom firmware (most samsungs with odin).
The idea is that you escalate to superuser by setting suid on /system/bin/toolbox executable.
By duing that you can run most of the unix commands on android as a superuser.
I is enought for you to copy su utility somewhere where there is not a nosuid option on mountpoint. and make it a suided executable then execute su and get the #.
It's all down hill from here.
I cannot verify for every ics rom out there, but it seems that now ics uses ext4 filesystem for the system partition.
I have made a script that inspects a stock rom firmware isolate the permissions for the toolbox executable and add to them SUID,SUIG.
After that it pachs the firmware back and you can flash it to your device and have a easylly rootable device. (I will post the stept to take to get a standard rooted device).
What you need:
a linux/gnu (it will not work with cygwin because we have to mount the ext4 partition).
simg2img utility (you can get it from xda site it is in ext4_utility packet).
su, busybox and superuser.apk binaries for android (you can take them from a rooting package).
heimdal (for linux) xor odin (for windows and if you cannot flash the firmware on your phone form linux).
I've put all untilities that are not standard into the tar.
just unpack and you have the universal-patch.sh to run over an .tar.md5 firware stock rom.
And post-firmwareUpdate.sh to run after you flash in order to make the root a standard android root.
This was not tested on any other phone (was tested only on GT-B5330) and do it on your own risk.
This rooting does not exploit any weakness (or flaw) in kernel or any thing, it just modifies the stock firmware to make it more flexible so it should be forward compatible with any version of android after ics.
I assume this would exclude HTC's since you meed to be s-off to flash a firmware. I would probably verify that and edit the title if necessary. Other than that, this looks like it could be helpful.
Help to understand the procedure
Hi ETTT,
first of all thanks for your job and effort in finding a solution to this issue.. it has been driving me crazy till now.. but thanx to you i see the light :good: I see it but i cannot really understand the procedure.. Could you please write a step by step explanation of what i need to do. (I am not what we could call a genius with linux).
Thanks in advance.
The First said:
Hi ETTT,
first of all thanks for your job and effort in finding a solution to this issue.. it has been driving me crazy till now.. but thanx to you i see the light :good: I see it but i cannot really understand the procedure.. Could you please write a step by step explanation of what i need to do. (I am not what we could call a genius with linux).
Thanks in advance.
Click to expand...
Click to collapse
If you are refering to the procedure that the script is doing here is the version of step by step (with-out the script):
http://forum.xda-developers.com/showthread.php?t=1956653
If you want to know the step by step with the script, here (I will not respond to more basic than this, like how to boot ubuntu and stuff.):
mkdir -p /tmp/foo
sudo mkdir /mnt
cd /tmp/foo
tar -xzf universal-patch.tar.gz
export PATH=./:$PATH
{get the firmware here and unzip it, it should have a file with .tar.md5 suffix}
./universal-patch.sh {the name of the firmware including the .tar.md5 suffix}
wait a while. you should have by the way about 10 times the size of the zip as free space.
if all goes well you will have a myfrm.tar.md5 rady for flashing.
flash the firmware, and after boot enable usb debuging, hook the phone to pc
sudo adb devices
./post-firmwareUpdate.sh
you should have a rooted phone.
you cannot go any more basic than that.
Have fun.
Thanks for your effort, I'm already have my XWALH3 patched, btw you should to check the patch on line 19, you've misstype something there
Sent from my GT-B5330 using xda app-developers app
The file after qa
phyxar said:
Thanks for your effort, I'm already have my XWALH3 patched, btw you should to check the patch on line 19, you've misstype something there
Sent from my GT-B5330 using xda app-developers app
Click to expand...
Click to collapse
Thanks for testing and input.
phyxar said:
Thanks for your effort, I'm already have my XWALH3 patched, btw you should to check the patch on line 19, you've misstype something there
Sent from my GT-B5330 using xda app-developers app
Click to expand...
Click to collapse
XWALH3 i've produce from your universal-patch cannot being flashed to my phone, odin crash each time open those files
phyxar said:
XWALH3 i've produce from your universal-patch cannot being flashed to my phone, odin crash each time open those files
Click to expand...
Click to collapse
I'm puting the xdelta to the XWALH3
here are the md5s for the original and patched firmware.
cfe3ca545c4a2c8d453e02cd549655a1 B5330XWALH3_B5330OJVALH1_B5330XXLH4_HOME.tar.md5
624f63943bff54941e4042a39d7928f2 myfrm.tar.md5
Now I have some question in order to debug:
does the patching you have done yeild the same file as I have here?
have you use the same imput? (that's why I've give you the md5 of my imput).
Hey you have rooted you b5330 then do you notice any performance upgrade
Sent from my GT-B5330 using xda premium
Can I patch the firmware using windows??
Because I'm on win
I don't really understand using linux
Or can you make single click batch file that I can use it to patch my firmware???
I really appreciate it if someone provide it
Thanks
Sent from my GT-B5330 using xda app-developers app
byboyz said:
Can I patch the firmware using windows??
Because I'm on win
I don't really understand using linux
Or can you make single click batch file that I can use it to patch my firmware???
I really appreciate it if someone provide it
Thanks
Sent from my GT-B5330 using xda app-developers app
Click to expand...
Click to collapse
I don't know windows that much to make a batch clone of the script. so you need linux.
But you can use a live cd (maybe from ubuntu) to run the script.
ETTT said:
I don't know windows that much to make a batch clone of the script. so you need linux.
But you can use a live cd (maybe from ubuntu) to run the script.
Click to expand...
Click to collapse
Thx for ur reply
How can I open XWALH3.patch that u give earlier??
Bcause I don't know anything about linux
Sent from my GT-B5330 using xda app-developers app
byboyz said:
Thx for ur reply
How can I open XWALH3.patch that u give earlier??
Bcause I don't know anything about linux
Sent from my GT-B5330 using xda app-developers app
Click to expand...
Click to collapse
that patch is an xdelta patch.
There is an xdelta application on windows, don't know if it works, but it should work.
ETTT said:
If you are refering to the procedure that the script is doing here is the version of step by step (with-out the script):
http://forum.xda-developers.com/showthread.php?t=1956653
If you want to know the step by step with the script, here (I will not respond to more basic than this, like how to boot ubuntu and stuff.):
mkdir -p /tmp/foo
sudo mkdir /mnt
cd /tmp/foo
tar -xzf universal-patch.tar.gz
export PATH=./:$PATH
{get the firmware here and unzip it, it should have a file with .tar.md5 suffix}
./universal-patch.sh {the name of the firmware including the .tar.md5 suffix}
wait a while. you should have by the way about 10 times the size of the zip as free space.
if all goes well you will have a myfrm.tar.md5 rady for flashing.
flash the firmware, and after boot enable usb debuging, hook the phone to pc
sudo adb devices
./post-firmwareUpdate.sh
you should have a rooted phone.
you cannot go any more basic than that.
Have fun.
Click to expand...
Click to collapse
hi there, I'm stuck at last point/step: ./post-firmwareUpdate.sh
my terminal respond many error about busybox
the code like this:
2684 KB/s (91980 bytes in 0.033s)
4016 KB/s (996704 bytes in 0.242s)
4491 KB/s (1085140 bytes in 0.235s)
.//busybox: 1: .//busybox: Syntax error: word unexpected (expecting ")")
.//busybox: 1: .//busybox: Syntax error: word unexpected (expecting ")")
dd if=/data/local/tmp/su of=/mnt/obb/su # copy the su binary to a place that can be sudoed
chown 0.0 /mnt/obb/su # modify the owner
chmod 6755 /mnt/obb/su # set SUID flag.
/mnt/obb/su # becomes root !!
mount -o remount,rw /system # remount the system partition as readwrite.
dd if=/data/local/tmp/su of=/system/xbin/su #copy su in path
chown 0.0 /system/xbin/su
chmod 6755 /system/xbin/su
chmod 755 /system/bin/toolbox # close the security hole (toolbox is nolonger with SUID)
dd if=/data/local/tmp/Superuser.apk of=/system/app/Superuser.apk # copy the superuser application
chown 0.0 /system/app/Superuser.apk
chmod 666 /system/app/Superuser.apk
#now this is done for busybox
dd if=/data/local/tmp/busybox of=/system/xbin/busybox
chown 0.0 /system/xbin/busybox
chmod 755 /system/xbin/busybox
cd /system/xbin
for k in
nt/obb/su # copy the su binary to a place that can be sudoed <
/mnt/obb/su: cannot open for write: Permission denied
1|[email protected]:/ $ chown 0.0 /mnt/obb/su # modify the owner
Unable to chmod /mnt/obb/su: No such file or directory
10|[email protected]:/ $ chmod 6755 /mnt/obb/su # set SUID flag.
Unable to chmod /mnt/obb/su: No such file or directory
10|[email protected]:/ $ /mnt/obb/su # becomes root !!
/system/bin/sh: /mnt/obb/su: not found
# remount the system partition as readwrite. <
mount: Operation not permitted
/system/xbin/su #copy su in path <
/system/xbin/su: cannot open for write: Read-only file system
1|[email protected]:/ $ chown 0.0 /system/xbin/su
Unable to chmod /system/xbin/su: No such file or directory
10|[email protected]:/ $ chmod 6755 /system/xbin/su
Unable to chmod /system/xbin/su: No such file or directory
# close the security hole (toolbox is nolonger with SUID) <
Unable to chmod /system/bin/toolbox: Read-only file system
er.apk of=/system/app/Superuser.apk # copy the superuser application <
/system/app/Superuser.apk: cannot open for write: Read-only file system
1|[email protected]:/ $ chown 0.0 /system/app/Superuser.apk
Unable to chmod /system/app/Superuser.apk: No such file or directory
10|[email protected]:/ $ chmod 666 /system/app/Superuser.apk
Unable to chmod /system/app/Superuser.apk: No such file or directory
10|[email protected]:/ $ #now this is done for busybox
10|[email protected]:/ $ dd if=/data/local/tmp/busybox of=/system/xbin/busybox
/system/xbin/busybox: cannot open for write: Read-only file system
1|[email protected]:/ $ chown 0.0 /system/xbin/busybox
Unable to chmod /system/xbin/busybox: No such file or directory
10|[email protected]:/ $ chmod 755 /system/xbin/busybox
Unable to chmod /system/xbin/busybox: No such file or directory
10|[email protected]:/ $ cd /system/xbin
[email protected]:/system/xbin $ for k in
Click to expand...
Click to collapse
smhybrid said:
hi there, I'm stuck at last point/step: ./post-firmwareUpdate.sh
my terminal respond many error about busybox
the code like this:
Click to expand...
Click to collapse
Ok it seams busybox has a thing against ")" in comments.
Here is the script without comments, so try this.
ETTT said:
Ok it seams busybox has a thing against ")" in comments.
Here is the script without comments, so try this.
Click to expand...
Click to collapse
no good, it's still have same error...
maybe the problem is in busybox?
and i don't know why I'm unable to do chmod
smhybrid said:
no good, it's still have same error...
maybe the problem is in busybox?
and i don't know why I'm unable to do chmod
Click to expand...
Click to collapse
give this command:
adb shell ls -l /system/bin/toolbox
and let's see if the toolbox has suid.
ETTT said:
give this command:
adb shell ls -l /system/bin/toolbox
and let's see if the toolbox has suid.
Click to expand...
Click to collapse
what i get is
-rwxr-xr-x root shell 99068 2012-08-09 11:59 toolbox
how to get suid?
smhybrid said:
what i get is
-rwxr-xr-x root shell 99068 2012-08-09 11:59 toolbox
how to get suid?
Click to expand...
Click to collapse
have you flash the patched firmware?
ETTT said:
have you flash the patched firmware?
Click to expand...
Click to collapse
well, I've just do all of Your step, except this:
flash the firmware, and after boot enable usb debuging, hook the phone to pc
Click to expand...
Click to collapse
because I don't know the meaning of flash the firmware. How to do that?
So I skip that and hook the phone to pc with usb debugging enabled
i'm new at linux, but I want to try this method for my galaxy chat

Some useful 64-bit (aarch64) binaries: busybox, dropbear

I've got some hastily/hackily compiled binaries for the nexus 9, since some of the other binaries I found wouldn't work on it. Thought I'd share.
Here is busybox (quite a lot of things enabled, it's the default config minus a few things that wouldn't compile); strace; and dropbearmulti (dbclient, dropbear, dropbearkey, and dropbearconvert).
Thanks! Especially for the busybox binary
I found out this info by doing a ton of googling. This is from a Google rep.
" No proprietary binaries are needed for Volantis. The proprietary vendor binaries are on a separate 'vendor' partition, which is flashed with the factory image update, should not change for AOSP development builds (only boot, recovery, and system partitions need to be updated)."
Not sure exactly what to do with that info yet though. Lol
Source:
http://www.androidpolice.com/2014/1...volantis-but-no-binaries-or-other-images-yet/
Would somebody be so kind as to post some instructions on how to install this?
oRAirwolf said:
Would somebody be so kind as to post some instructions on how to install this?
Click to expand...
Click to collapse
Well I'd say unpack, get the binaries to any easily accessible place like /sdcard .
Then, if the command mount works if you call it via adb shell or Android Terminal Emulator, do this:
Code:
mount -o remount,rw /system
cp /sdcard/busybox /system/xbin/busybox
chmod 755 /system/xbin/busybox
If the mount command does not work, enter TWRP recovery and:
go to Mount->tick system
go back, then enter the file manager under Advanced->File Manager
go to /sdcard/ , tap the busybox file
tap copy
navigate to /system/xbin
tap select
navigate again to /system/xbin
tap busybox
tap "chmod 755"
And you're done. Do the same with the rest of the binaries respectively and you're all set. I think BusyBox updater already includes a 64 arch busybox, so you could also try that.
EDIT: The manual method does NOT include symlinking the applets as individual commands, you would have to do it yourself.
Alexandroid99 said:
Well I'd say unpack, get the binaries to any easily accessible place like /sdcard .
Then, if the command mount works if you call it via adb shell or Android Terminal Emulator, do this:
Code:
mount -o remount,rw /system
cp /sdcard/busybox /system/xbin/busybox
chmod 755 /system/xbin/busybox
If the mount command does not work, enter TWRP recovery and:
go to Mount->tick system
go back, then enter the file manager under Advanced->File Manager
go to /sdcard/ , tap the busybox file
tap copy
navigate to /system/xbin
tap select
navigate again to /system/xbin
tap busybox
tap "chmod 755"
And you're done. Do the same with the rest of the binaries respectively and you're all set. I think BusyBox updater already includes a 64 arch busybox, so you could also try that.
EDIT: The manual method does NOT include symlinking the applets as individual commands, you would have to do it yourself.
Click to expand...
Click to collapse
busybox --install /system/xbin
USBhost said:
busybox --iinstall /system/xbin
Click to expand...
Click to collapse
Or that, but my way is a little more adventurous xD
(to be honest, I didn't know until now that it had that install parameter. I always did it manually. Thx bro. ^^)
Code:
sudo lolz
Alexandroid99 said:
Or that, but my way is a little more adventurous xD
(to be honest, I didn't know until now that it had that install parameter. I always did it manually. Thx bro. ^^)
Code:
sudo lolz
Click to expand...
Click to collapse
Code:
[email protected]:/ $ busybox
BusyBox v1.24.0.USBhost (2015-02-04 22:56:38 PST) multi-call binary.
BusyBox is copyrighted by many authors between 1998-2012.
Licensed under GPLv2. See source distribution for detailed
copyright notices.
Usage: busybox [function [arguments]...]
or: busybox --list[-full]
or: busybox --install [-s] [DIR] [COLOR="green"]([/COLOR][COLOR="Red"]see here[/COLOR][COLOR="Lime"])[/COLOR]
or: function [arguments]...
BusyBox is a multi-call binary that combines many common Unix
utilities into a single executable. Most people will create a
link to busybox for each function they wish to use and BusyBox
will act like whatever it was invoked as.
[email protected]:/ $
You can get busybox dailys
From here https://s.basketbuild.com/devs/USBhost/busybox/arm64
how can login the dropbear's ssh sevice?
what is the name and the password?

[Q] Run script on FireTV boot

I have a very simple script to mount my NAS to a specific path that I want executed every time my FireTV boots.
I have read about pointing to it in the install-recovery-2.sh, however that is not available on my FireTV. I have also read about placing the script in system/etc/init.d/ however that path doesn't exist on the fireTV either.
Would prefer to do this at the system level and not rely on a manager (Tasker, Script Manager, etc).
Anyone have any experience?
Update w/ solution:
I was able to get this working by placing a script called install-recovery.sh in /system/etc/ . Make sure that permissions are set appropriately (at least 755). If creating the script on a Windows machine, make sure there aren't any hidden whitespace characters (I personally verified the script using SManager on my Fire TV).
Code:
[B]sleep 15[/B]
mkdir /mnt/obb/nas
chmod 777 /mnt/obb/nas
[B]sleep 20[/B]
mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
The sleep command is necessary as the script may run before the network is initialized.
Thanks rbox and ECEXCURSION!
patrickorr said:
I have a very simple script to mount my NAS to a specific path that I want executed every time my FireTV boots.
I have read about pointing to it in the install-recovery-2.sh, however that is not available on my FireTV. I have also read about placing the script in system/etc/init.d/ however that path doesn't exist on the fireTV either.
Would prefer to do this at the system level and not rely on a manager (Tasker, Script Manager, etc).
Anyone have any experience?
Click to expand...
Click to collapse
/system/etc/install-recovery.sh
rbox said:
/system/etc/install-recovery.sh
Click to expand...
Click to collapse
That file does not exist in /system/etc/ on my FireTV
patrickorr said:
That file does not exist in /system/etc/ on my FireTV
Click to expand...
Click to collapse
Yes... you have to create it...
rbox said:
Yes... you have to create it...
Click to expand...
Click to collapse
Ahh, sorry a little dense
Will give that a shot and report back on the results
Ok, I have placed install-recovery.sh (which houses my mounting script) in /system/etc/
I reboot and it doesn't appear that the script has run. Is there anything else I would need to do in order to get it to run on boot?
If it matters here are the details on my FireTV
Custom Recovery 6.0.5.1.4a
Pre-rooted 51.1.4.1_514013920
patrickorr said:
Ok, I have placed install-recovery.sh (which houses my mounting script) in /system/etc/
I reboot and it doesn't appear that the script has run. Is there anything else I would need to do in order to get it to run on boot?
If it matters here are the details on my FireTV
Custom Recovery 6.0.5.1.4a
Pre-rooted 51.1.4.1_514013920
Click to expand...
Click to collapse
And you're sure the script works?
rbox said:
And you're sure the script works?
Click to expand...
Click to collapse
That is a very good question How can I test that my script is functioning?
From adb shell or Terminal emulator I type the following commands to mount my NAS:
Code:
su
cd /mnt/obb/
mkdir nas
chmod 777 nas
mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
To turn this into a script I just dumped it into notepad and added #!/system/bin/sh to the top and saved it as install-recovery.sh.
patrickorr said:
That is a very good question How can I test that my script is functioning?
From adb shell or Terminal emulator I type the following commands to mount my NAS:
Code:
su
cd /mnt/obb/
mkdir nas
chmod 777 nas
mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
To turn this into a script I just dumped it into notepad and added #!/system/bin/sh to the top and saved it as install-recovery.sh.
Click to expand...
Click to collapse
Run it from adb, but right off the bat, I can tell you you need to chmod 755 it atleast before that will work.
rbox said:
Run it from adb, but right off the bat, I can tell you you need to chmod 755 it atleast before that will work.
Click to expand...
Click to collapse
Ok, was able to run the script, but got the following error(s):
Code:
127|[email protected]:/system/etc # sh ./install-recovery.sh
sh ./install-recovery.sh
: not foundecovery.sh[2]:
: not foundecovery.sh[3]: su
: No such file or directoryd: /mnt/obb/
, Read-only file system
: No such file or directory
mount: No such file or directory
patrickorr said:
Ok, was able to run the script, but got the following error(s):
Code:
127|[email protected]:/system/etc # sh ./install-recovery.sh
sh ./install-recovery.sh
: not foundecovery.sh[2]:
: not foundecovery.sh[3]: su
: No such file or directoryd: /mnt/obb/
, Read-only file system
: No such file or directory
mount: No such file or directory
Click to expand...
Click to collapse
Well first of all, don't run it with sh... it needs to have #!/system/bin/sh at the top, and you need to run it directly. Second, don't put su in it because it's already running in the root context.
rbox said:
Well first of all, don't run it with sh... it needs to have #!/system/bin/sh at the top, and you need to run it directly. Second, don't put su in it because it's already running in the root context.
Click to expand...
Click to collapse
How would I run it directly?
Here is my current script (with su removed):
Code:
#!/system/bin/sh
cd /mnt/obb/
mkdir nas
chmod 777 nas
mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
patrickorr said:
How would I run it directly?
Here is my current script (with su removed):
Code:
#!/system/bin/sh
cd /mnt/obb/
mkdir nas
chmod 777 nas
mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
Click to expand...
Click to collapse
Just type:
/system/etc/install-recovery.sh
rbox said:
Just type:
/system/etc/install-recovery.sh
Click to expand...
Click to collapse
I am attempting to run that in adb shell, but am getting the following errors:
Code:
[email protected]:/ $ cd /system/etc/
cd /system/etc/
[email protected]:/system/etc $ stat -c "%a %n" install-recovery.sh
stat -c "%a %n" install-recovery.sh
777 install-recovery.sh
[email protected]:/system/etc $ /system/etc/install-recovery.sh
/system/etc/install-recovery.sh
/system/bin/sh: /system/etc/install-recovery.sh: No such file or directory
1|[email protected]:/system/etc $ ./system/etc/install-recovery.sh
./system/etc/install-recovery.sh
/system/bin/sh: ./system/etc/install-recovery.sh: not found
127|[email protected]:/system/etc $
It seems like the permissions are correct on the file, and I also tried adding ./ before the path to see if that made any differences.
I made a slight "upgrade" to my script to see if it would help (but as you can probably already see, I am not exactly sure what I am doing!):
Code:
#!/system/bin/sh
mkdir /mnt/obb/nas
chmod 777 /mnt/obb/nas
busybox mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
patrickorr said:
I am attempting to run that in adb shell, but am getting the following errors:
Code:
[email protected]:/ $ cd /system/etc/
cd /system/etc/
[email protected]:/system/etc $ stat -c "%a %n" install-recovery.sh
stat -c "%a %n" install-recovery.sh
777 install-recovery.sh
[email protected]:/system/etc $ /system/etc/install-recovery.sh
/system/etc/install-recovery.sh
/system/bin/sh: /system/etc/install-recovery.sh: No such file or directory
1|[email protected]:/system/etc $ ./system/etc/install-recovery.sh
./system/etc/install-recovery.sh
/system/bin/sh: ./system/etc/install-recovery.sh: not found
127|[email protected]:/system/etc $
It seems like the permissions are correct on the file, and I also tried adding ./ before the path to see if that made any differences.
I made a slight "upgrade" to my script to see if it would help (but as you can probably already see, I am not exactly sure what I am doing!):
Code:
#!/system/bin/sh
mkdir /mnt/obb/nas
chmod 777 /mnt/obb/nas
busybox mount -o noperm,unc=\\\\192.168.1.147\\Public,username=xxxxxx,password=xxxxxx -t cifs none /mnt/obb/nas
Click to expand...
Click to collapse
That sounds strange... but you'll need to run su before running it, because it needs root. It could be that its not in UNIX file format. If you edited it on Windows you need to use an advanced editor that has the ability to save as UNIX format.
rbox said:
That sounds strange... but you'll need to run su before running it, because it needs root. It could be that its not in UNIX file format. If you edited it on Windows you need to use an advanced editor that has the ability to save as UNIX format.
Click to expand...
Click to collapse
Unix file format appears to have been the issue. When I opened it with SManager I saw some nasty whitespace characters. Removed those and the script works as expected:
Code:
[email protected]:/data/media/0 # ./install-recovery.sh
./install-recovery.sh
[email protected]:/data/media/0 # cd /mnt/obb/nas
cd /mnt/obb/nas
[email protected]:/mnt/obb/nas # ls
ls
Games
Photos
Shared Music
Shared Videos
eBooks
key.txt
[email protected]:/mnt/obb/nas #
After confirming the script worked as expected, I moved it to /system/etc/ and verified permissions were acceptable (777). Upon reboot I see that the /mnt/obb/nas is created, however the NAS is not mapped.
Can you comment, when is the install-recovery.sh called in the boot up process? Is it possible that the CIFS module isn't fully loaded when this is called? Alternatively, is there a log that I could reference to see if any error occurred while running the script at startup?
patrickorr said:
Unix file format appears to have been the issue. When I opened it with SManager I saw some nasty whitespace characters. Removed those and the script works as expected:
Code:
[email protected]:/data/media/0 # ./install-recovery.sh
./install-recovery.sh
[email protected]:/data/media/0 # cd /mnt/obb/nas
cd /mnt/obb/nas
[email protected]:/mnt/obb/nas # ls
ls
Games
Photos
Shared Music
Shared Videos
eBooks
key.txt
[email protected]:/mnt/obb/nas #
After confirming the script worked as expected, I moved it to /system/etc/ and verified permissions were acceptable (777). Upon reboot I see that the /mnt/obb/nas is created, however the NAS is not mapped.
Can you comment, when is the install-recovery.sh called in the boot up process? Is it possible that the CIFS module isn't fully loaded when this is called? Alternatively, is there a log that I could reference to see if any error occurred while running the script at startup?
Click to expand...
Click to collapse
It's probably running before the network comes up. There might be maybe some kind of regular android apk that will run a script when the network comes up. There might be a way to just stick a loop in your current script waiting for something, not sure.
You could probably just add "sleep 30" to the beginning of the script.
rbox said:
It's probably running before the network comes up. There might be maybe some kind of regular android apk that will run a script when the network comes up. There might be a way to just stick a loop in your current script waiting for something, not sure.
Click to expand...
Click to collapse
ECEXCURSION said:
You could probably just add "sleep 30" to the beginning of the script.
Click to expand...
Click to collapse
Thanks, will give that a try when I get back home.
Edit: It worked! Thanks to the both you for your input.
Just wondering since I'm a newbie when it comes to this one. Does mounted folder have to be in /mnt/obb or can I choose any directory I want?

help me please I cannot modify system files despite having root

i'm on (pixel 2xl) lineageos 16.0 rooted with magisk, i want to add a script in init.d folder but i can't do it, i tried with root explorer but it doesn't work, afwall also can't mount folder for startup script, any solution?
lg_g3_d855 said:
i'm on (pixel 2xl) lineageos 16.0 rooted with magisk, i want to add a script in init.d folder but i can't do it, i tried with root explorer but it doesn't work, afwall also can't mount folder for startup script, any solution?
Click to expand...
Click to collapse
Why? What error do you get?
Try to move/copy something into /tmp folder. It should work if you're rooted (your shell shows # instead of $).
If it doesn't work, maybe you have to remount your system as rw (read and write):
Code:
mount -o rw,remount /
after you made your modifications, mount it as ro (read only) again:
Code:
mount -o ro,remount /
If it still doesn't work, we need to see the error you get (copy and paste into this forum) while moving/coping something into /tmp.
User699 said:
Why? What error do you get?
Try to move/copy something into /tmp folder. It should work if you're rooted (your shell shows # instead of $).
If it doesn't work, maybe you have to remount your system as rw (read and write):
Code:
mount -o rw,remount /
after you made your modifications, mount it as ro (read only) again:
Code:
mount -o ro,remount /
If it still doesn't work, we need to see the error you get (copy and paste into this forum) while moving/coping something into /tmp.
Click to expand...
Click to collapse
i tried with mount -o rw, remount, but it keeps showing me the file system is read only
.
lg_g3_d855 said:
i tried with mount -o rw, remount, but it keeps showing me the file system is read only
.
Click to expand...
Click to collapse
Can you verify you entered that command as root?
Please do the following:
Do this on your computer to enter your devices shell
Code:
prompt_PC:~$ adb shell
Code:
prompt:~$ whoami
This should give you either "shell" or "root"
If it says "shell" do:
Code:
prompt:~$ su
prompt:~#
It will show a # instead of $ if you're root.
If you're already root (or you are now root due to su command), do:
Code:
prompt:~# mount -o rw,remount /
Now it should be writeable and you can do your modifications.
After you finished you need to change it to ro (read only) again:
Code:
prompt:~# mount -o ro,remount /
After that you can exit the shell:
Code:
prompt:~# exit
prompt:~$ exit
(first exits su, second exits shell)
I'm sorry if you already did that but I wan't to be sure you did it correctly.
If this procedere doesn't work, please copy and past your input and output into this forum as this might help to understand what's going on/failing etc.
User699 said:
Can you verify you entered that command as root?
Please do the following:
Do this on your computer to enter your devices shell
Code:
prompt_PC:~$ adb shell
Code:
prompt:~$ whoami
This should give you either "shell" or "root"
If it says "shell" do:
Code:
prompt:~$ su
prompt:~#
It will show a # instead of $ if you're root.
If you're already root (or you are now root due to su command), do:
Code:
prompt:~# mount -o rw,remount /
Now it should be writeable and you can do your modifications.
After you finished you need to change it to ro (read only) again:
Code:
prompt:~# mount -o ro,remount /
After that you can exit the shell:
Code:
prompt:~# exit
prompt:~$ exit
(first exits su, second exits shell)
I'm sorry if you already did that but I wan't to be sure you did it correctly.
If this procedere doesn't work, please copy and past your input and output into this forum as this might help to understand what's going on/failing etc.
Click to expand...
Click to collapse
yes I'm root, output is file system is read only despite adb commands
lg_g3_d855 said:
yes I'm root, output is file system is read only despite adb commands
Click to expand...
Click to collapse
Well, I'm sorry then... I can't help.
Good luck!

Categories

Resources