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
Related
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...
I have tried the latest version of Visionary "R14" but it doesn't work, I have also tried Visionary "R3" "R11" "R12" and "13" and they all don't work on my OTA updated T-mobile G2.... either for temp-root or permanent root..I have tried the ADB/Rage/gfree method of rooting and I getting an ERROR on the last part instructions.... ""## mkdir failed for /system/xbin, File exists"
My main question is if anyone could check to see if their version of the Visionary app is the version 7 or r7...if so could you please used titanium backup to send me a copy of the file....
thank you so so much...
Not sure why a specific older version of Visionary would work if the newer (or older) versions would not.
Regarding your error message, is that when you run the command:
/data/local/tmp/root
Click to expand...
Click to collapse
If so you will note that the instructions on the wiki state immediately below that: You may see an error message along the lines of "mkdir: /system/xbin already exists", but if so you can ignore that, the rest of the script should still run ok.
If you boot into the bootloader (press volume down while powering on device) do you have S-OFF? If so you know that the GFREE part at least did work.
sammd301 said:
I have tried the latest version of Visionary "R14" but it doesn't work, I have also tried Visionary "R3" "R11" "R12" and "13" and they all don't work on my OTA updated T-mobile G2.... either for temp-root or permanent root..I have tried the ADB/Rage/gfree method of rooting and I getting an ERROR on the last part instructions.... ""## mkdir failed for /system/xbin, File exists"
My main question is if anyone could check to see if their version of the Visionary app is the version 7 or r7...if so could you please used titanium backup to send me a copy of the file....
thank you so so much...
Click to expand...
Click to collapse
As has been explained in the Development section, be VERY CAREFUL with Visionary as it is known to brick phones.
When I first got my DZ I was eager to Root and uses V14 to obtain root but remember that this is not a 'Real' S-OFF. GFREE is the best and safest method to use. I was a lucky newbie who didn't end up with a brick!
raitchison said:
Not sure why a specific older version of Visionary would work if the newer (or older) versions would not.
Regarding your error message, is that when you run the command:
If so you will note that the instructions on the wiki state immediately below that: You may see an error message along the lines of "mkdir: /system/xbin already exists", but if so you can ignore that, the rest of the script should still run ok.
If you boot into the bootloader (press volume down while powering on device) do you have S-OFF? If so you know that the GFREE part at least did work.
Click to expand...
Click to collapse
yes you are exactly right...when I input in this command " /data/local/tmp/root" then I got back this error "mkdir failed for /system/xbin, File exists" you see the difference, instead of "already exits" I did ignore the error message but when I tried to used a root required app like root explorer...It states the phone needs to rooted before the app can work....Lastly when I enter into the boot loader "I indeed notice that S-OFF" the problem is that the phone is not rooted not even temporary...as far as visionary r7 goes I recall after the OTA, it did work on my phone for temporary rooting...it is when I attempted to used visionary r14 to obtain permanent root that visionary r7 was overwritten by r14...which doesn't work even for temp rooting thanks for your input
gbarayah said:
As has been explained in the Development section, be VERY CAREFUL with Visionary as it is known to brick phones.
When I first got my DZ I was eager to Root and uses V14 to obtain root but remember that this is not a 'Real' S-OFF. GFREE is the best and safest method to use. I was a lucky newbie who didn't end up with a brick!
Click to expand...
Click to collapse
right now...neither method works not the "visionary r14 or ADB/RAGE/GFREE" I wouldn't mind using either method, the problem is that ADB/Rage/GFREE METHOD keep giving this error message "mkdir failed for /system/xbin, File exists" which I have done a ton of research and still can find a fixed,
sammd301 said:
yes you are exactly right...when I input in this command " /data/local/tmp/root" then I got back this error "mkdir failed for /system/xbin, File exists" you see the difference, instead of "already exits" I did ignore the error message but when I tried to used a root required app like root explorer...It states the phone needs to rooted before the app can work....Lastly when I enter into the boot loader "I indeed notice that S-OFF" the problem is that the phone is not rooted not even temporary...as far as visionary r7 goes I recall after the OTA, it did work on my phone for temporary rooting...it is when I attempted to used visionary r14 to obtain permanent root that visionary r7 was overwritten by r14...which doesn't work even for temp rooting thanks for your input
Click to expand...
Click to collapse
Crap I typed up this response but I guess I didn't submit it because it's gone...
OK what you are saying is actually good news, it means you had temp root at one point or gfree would not have worked (you would not have S-OFF now)
If you can get temp root to work even one more time you can flash ClockWorkMod recovery and then load a custom/pre-rooted ROM.
I do suspect that you have messed up your system with your various attempts at rooting (especially the fact that you used visionary and other deprecated root methods) and you need to wipe your system and start over with either a custom ROM or a pre-rooted stock ROM.
I would start by running this section of the root process:
ON YOUR PHONE:
1. Launch Terminal Emulator
2. Execute /data/local/tmp/rage
3. Wait for the message: "Forked #### childs."
4. Menu > Reset Term - Terminal Emulator will exit.
5. Launch Terminal Emulator, it Force Closes. Launch a second time, and you'll have a root shell
Click to expand...
Click to collapse
If you have a # prompt that means you have temp root, from there I would use flash_image to flash ClockWorkMod 3.0.5 to the phone (see guide)
Get ClockWorkMod here
Once you have CWM installed you can basically ignore your current OS and flash whatever you want, you can go with a custom ROM or if you don't want to do that you can go with a pre-rooted stock ROM (see this thread). In any case I would definitely wipe first (from within CWM)
Yeah, flashing a pre-rooted custom ROM is probably your cleanest solution at this point. If you want to try and fix what you have though, you can try the following steps:
1. Follow the instructions to get temp root with rage again.
2. In Terminal, try these commands and look for an error at any point (this is what the root script is actually doing, with the addition of the deletion of the xbin file/directory since that seems to be what is messing up):
Code:
# /data/local/tmp/busybox killall rage
# mount -o rw,remount -t ext3 /dev/block/mmcblk0p25 /system
# rm -rf /system/xbin
# mkdir /system/xbin
# /data/local/tmp/busybox cp /data/local/tmp/busybox /system/xbin/busybox
# chmod 4755 /system/xbin/busybox
# /system/xbin/busybox --install -s /system/bin
# cp /sdcard/Superuser.apk /system/app/Superuser.apk
# cp /sdcard/su /system/bin/su
# chmod 4755 /system/bin/su
Flashing a custom ROM is probably easier though.
ianmcquinn said:
Yeah, flashing a pre-rooted custom ROM is probably your cleanest solution at this point. If you want to try and fix what you have though, you can try the following steps:
1. Follow the instructions to get temp root with rage again.
2. In Terminal, try these commands and look for an error at any point (this is what the root script is actually doing, with the addition of the deletion of the xbin file/directory since that seems to be what is messing up):
Code:
# /data/local/tmp/busybox killall rage
# mount -o rw,remount -t ext3 /dev/block/mmcblk0p25 /system
# rm -rf /system/xbin
# mkdir /system/xbin
# /data/local/tmp/busybox cp /data/local/tmp/busybox /system/xbin/busybox
# chmod 4755 /system/xbin/busybox
# /system/xbin/busybox --install -s /system/bin
# cp /sdcard/Superuser.apk /system/app/Superuser.apk
# cp /sdcard/su /system/bin/su
# chmod 4755 /system/bin/su
Flashing a custom ROM is probably easier though.
Click to expand...
Click to collapse
Right now I going to try to use this command to fix the error and if it doesn't work, I will then try to flash a custom and see how that goes...Update will be posted as I go along....thanks for the kind help....
raitchison said:
Crap I typed up this response but I guess I didn't submit it because it's gone...
OK what you are saying is actually good news, it means you had temp root at one point or gfree would not have worked (you would not have S-OFF now)
If you can get temp root to work even one more time you can flash ClockWorkMod recovery and then load a custom/pre-rooted ROM.
I do suspect that you have messed up your system with your various attempts at rooting (especially the fact that you used visionary and other deprecated root methods) and you need to wipe your system and start over with either a custom ROM or a pre-rooted stock ROM.
I would start by running this section of the root process:
If you have a # prompt that means you have temp root, from there I would use flash_image to flash ClockWorkMod 3.0.5 to the phone (see guide)
Get ClockWorkMod here
Once you have CWM installed you can basically ignore your current OS and flash whatever you want, you can go with a custom ROM or if you don't want to do that you can go with a pre-rooted stock ROM (see this thread). In any case I would definitely wipe first (from within CWM)
Click to expand...
Click to collapse
I will attempt to flash ClockWorkmod, once I try out "ianmcquinn" suggesting in trying to fix the rooting error...thanks for the help
ianmcquinn said:
Yeah, flashing a pre-rooted custom ROM is probably your cleanest solution at this point. If you want to try and fix what you have though, you can try the following steps:
1. Follow the instructions to get temp root with rage again.
2. In Terminal, try these commands and look for an error at any point (this is what the root script is actually doing, with the addition of the deletion of the xbin file/directory since that seems to be what is messing up):
Code:
# /data/local/tmp/busybox killall rage
# mount -o rw,remount -t ext3 /dev/block/mmcblk0p25 /system
# rm -rf /system/xbin
# mkdir /system/xbin
# /data/local/tmp/busybox cp /data/local/tmp/busybox /system/xbin/busybox
# chmod 4755 /system/xbin/busybox
# /system/xbin/busybox --install -s /system/bin
# cp /sdcard/Superuser.apk /system/app/Superuser.apk
# cp /sdcard/su /system/bin/su
# chmod 4755 /system/bin/su
Flashing a custom ROM is probably easier though.
Click to expand...
Click to collapse
Yes I used the wiki instruction to gain temporary root on the phone and proceeded to tryout the above command...I got mostly error with the command below is what I en-counted as I enter the command....
# /data/local/tmp/busybox killall rage
No error here just # prompt
# mount -o rw,remount -t ext3 /dev/block/mmcblk0p25 /system
No error again just # prompt
# rm -rf /system/xbin
Error "rm failed for -rf, Read-only file system"
# mkdir /system/xbin
Error "mkdir failed for /system/xbin, File exists"
# /data/local/tmp/busybox cp /data/local/tmp/busybox /system/xbin/busybox
Error "cp: can't stat '/system/xbin/busybox': Not a directory"
# chmod 4755 /system/xbin/busybox
Error "Unable to chmod /system/xbin/busybox: Not a directory"
# /system/xbin/busybox --install -s /system/bin
Error "/system/xbin/busybox: not found"
# cp /sdcard/Superuser.apk /system/app/Superuser.apk
Error "cp: not found"
# cp /sdcard/su /system/bin/su
Error "cp: not found"
# chmod 4755 /system/bin/su
Error "Unable to chmod /system/bin/su: No such file or directory
I am now going to attempt the Clockwork custom rom flash..
Folks victory is mine....No, VICTORY IS OURS, I sincerely like to thank all of you all, who replied with helpful suggesting...especially the following members "raitchison" from West Hill, CA and "ianmcquinn" a true senior member of xda-developer.
This is what I did to finally get the phone rooted....
I took "Raitchison" advice by trying to use flash_image to flash ClockWorkMod recovery... but during the process I could not get pass copying file to the phone root system folder usind android terminal emulator ...so I input this command "chmod 777/system" to gain write access to the folder...after doing that I manually moved busybox file to system folder and attempted a rooting the phone using the rooting instruction from the HTC G2/DESIRE Z wiki site...at...
http://forum.xda-developers.com/wik...cess_.28Permanent_Root_.2F_.22Permaroot.22.29
And this time around, everything went as normal after rooting the phone I open root required app and Wa La...no error message...
Guys I once again wants thank you all for the support....I also looked forward to help out others facing the same issue...so if anyone has encounter the same or similar issue please feel free to post here and I will response....
Can any one help me I am trying to close this thread...How do I go about doing it....thanks
There is no need to close the thread, if anyone has a similar problem and finds it via search they can come in here and bring the discussion back up, otherwise if there is no activity it will naturally fall to the bottom of the thread list.
It works for me I just did it yday using visionary and gfree all on my phone weird that it doesn't work for you?
Sent from my Liquid Metal using XDA Premium App
[Acer _AV041_A100_1.037.00_ww_gen1]
root
Can be successfully???
alexsec said:
[Acer _AV041_A100_1.037.00_ww_gen1]
root
Can be successfully???
Click to expand...
Click to collapse
ZN's method still works just fine.
http://forum.xda-developers.com/showthread.php?t=1531646
i can't root!
i can't root!
Verify the device is showing under the device manager, usb debugging is turned on, and that it is being run as administrator.
What OS are you using?
i have the same problem. Can't root after the recent update. using W7, executing it with and without administrator rights. Executing with administrator rights it says something of ADB.
alexsec said:
i can't root!
Click to expand...
Click to collapse
Updating script. Try once again.
rooted!! thanks!!
How to Updating script. Try once again.
@ ZeroNull, can you confirm whether ICS_rooting_A10x_A5xx works for the latest build?
Build number
Acer_A100_2.001.01_COM_GEN2
I have been unsuccessful so far:
==========================================
Preparation is finished.
-
Executing of the main script.
remote object '/system/bin/su' does not exist
The file "su" isn't created!
-
Not getting root!
-
Error!
I can confirm that I successfully rooted my A100 using ZeroNull's simple method (http://forum.xda-developers.com/showthread.php?t=1531646)
Build number: Acer_AV041_A100_1.037.00_WW_GEN1
I didn't even use the new script, I'm still using the old one (ICS_rooting.zip)
Unfortunately I can also confirm problems with recent updates of the SuperUser APK (It did not assign the correct Group ID), but apparently they were fixed in the latest update (v3.1.3)
Good Luck.
---------- Post added at 10:30 AM ---------- Previous post was at 10:05 AM ----------
alexsec said:
i can't root!
Click to expand...
Click to collapse
alexsec said:
How to Updating script. Try once again.
Click to expand...
Click to collapse
Hi alexsec, did you try with the new script, it creates a different directory than the old script did, and it uses the mkdir -p option so it creates any parent directories it needs:
Code:
adb shell "mkdir -p /data/local/tmp"
adb push tools /data/local/tmp
adb shell "chmod 0755 /data/local/tmp/mempodroid"
And it does a better job by waiting longer for the tablet to reboot:
Code:
rem Wait reboot tablet
for /L %%i in (1,1,7000000) do @rem
I even modify the getroot.sh script just to change back to the old su command and modify its permissions:
Code:
cd /data/local/tmp
echo >/data/local.prop
toolbox mount -o remount, rw /system/
cat su >/system/bin/su
ln -s /system/bin/su /system/xbin/su
chmod 06755 /system/bin/su
sync ; sync ; sync
reboot
Good Luck...
hi, quick question .
im trying to remount the system folder to R\W , but seems like no luck .
adb remount
*permission denied
adb shell
Code:
C:\android sdk\sdk\platform-tools>adb shell
[email protected]:/ $ su
su
[email protected]:/ # mount -o rw,remount /system
mount -o rw,remount /system
[email protected]:/ #
[email protected]:/ # exit
exit
[email protected]:/ $ exit
exit
C:\android sdk\sdk\platform-tools>adb push C:\Users\HOME\Desktop\build.prop /sys
tem
failed to copy 'C:\Users\HOME\Desktop\build.prop' to '/system/build.prop': Permi
ssion denied
shell - fail
normal remount -fail
whats next.any suggestions?
cant do that yet, you need kernel with unsecure adb .
Helloworld294 said:
cant do that yet, you need kernel with unsecure adb .
Click to expand...
Click to collapse
Means I can't tweak my phone safely? (1 bootloop and I'm on stock again? )
subwoffer13 said:
Means I can't tweak my phone safely? (1 bootloop and I'm on stock again? )
Click to expand...
Click to collapse
You bootloop you're on stock again, with formatted /data/media of course.
EDIT: So I downloaded adb insecure from playstore by chainfire and it seems to work actually. Its $2 though.
Sent from my LG-D852 using Tapatalk
Helloworld294 said:
You bootloop you're on stock again, with formatted /data/media of course.
EDIT: So I downloaded adb insecure from playstore by chainf
ire and it seems to work actually. Its $2 though.
Sent from my LG-D852 using Tapatalk
Click to expand...
Click to collapse
Well, just bought it too.going to slepp right now, tomorrow hopefully I'll be able to push and pull files with adb.
subwoffer13 said:
Well, just bought it too.going to slepp right now, tomorrow hopefully I'll be able to push and pull files with adb.
Click to expand...
Click to collapse
Before pulling/pushing anything from system
run 'chmod 777 /system'
And before pushing/pulling any file chmod 666 the file and after dont ever forget to chmod 644 any system or data file after pushing or else you gonna end up in bootloop.
Sent from my LG-D852 using Tapatalk
Helloworld294 said:
Before pulling/pushing anything from system
run 'chmod 777 /system'
And before pushing/pulling any file chmod 666 the file and after dont ever forget to chmod 644 any system or data file after pushing or else you gonna end up in bootloop.
Sent from my LG-D852 using Tapatalk
Click to expand...
Click to collapse
.ok , i am a bit confused .i understand that every time im pulling or pushing i should fix the permissions. Bit what is the exact order ?
Shouldn't i just make sure the file im only pushing is 644 (rw-r-r)?
Lets say for example , i want to push stock "build.prop" to system .
What are the steps?
subwoffer13 said:
.ok , i am a bit confused .i understand that every time im pulling or pushing i should fix the permissions. Bit what is the exact order ?
Shouldn't i just make sure the file im only pushing is 644 (rw-r-r)?
Lets say for example , i want to push stock "build.prop" to system .
What are the steps?
Click to expand...
Click to collapse
Mount everything and do su and all that then chmod 777 /system
Then do the push "adb push 'source file location' /system/build.prop
Then do chmod 644 /system/build.prop
All done.
Sent from my LG-D852 using Tapatalk
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?