Simple (not one-click) root for stock ROM & kernel - Epic 4G Android Development

Update: One click root has been using this "simple" method since version 2.2.7. If you're rooting your phone for the first time, please try that first. Consider this thread to be purely informational for those who want step-by-step details of how the process works.
I've been suspicious of the joeykrim root method since it was first posted at SDX. I finally got my Epic yesterday and confirmed that is, indeed unnecessary. I don't fault joeykrim though, he ported the working root method from the Moment to the Epic without actually having access to an Epic himself.
Anyways, the joeykrim root method is unnecessarilly complex becuase it works around an RFS permissions bug which loses the setuid bit on the Moment. It appears the Galaxy S phones have this bug fixed, which is why the root methods on the I9000, Vibrant, Captivate, Fascinate, etc., are much simpler.
So, for the simple root:
First, make sure joeykrim root is not installed.
Upgrade to DI18 (not strictly necessary, but you'll want to do it).
Setup a working adb from the Android SDK and whatever drivers are necessary for your platform.
Download rageagainstthecage-arm5.bin from the C skills blog (link removed due to my newbieness) or from any of the one-click root packages.
Download su-2.3.6.1-ef-signed.zip and extract "system/bin/su" and "system/app/Superuser.apk" to a temporary directory you'll be working from.
Enable USB debugging on your phone and connect it to your computer.
Now, open a command prompt/shell on your computer and cd to the appropriate temporary directory. Run:
Code:
adb push rageagainstthecage-arm5.bin /data/local/tmp
adb shell chmod 755 /data/local/tmp/rageagainstthecage-arm5.bin
adb shell /data/local/tmp/rageagainstthecage-arm5.bin
and confirm you have a working root shell. Then continue with:
Code:
adb push su /system/xbin
adb shell chmod 4755 /system/xbin/su
adb install Superuser.apk
That's it! You should have a working root via su & the Superuser package. At least, I did.
Note that the preceeding steps installs Superuser.apk to /data, which is what I prefer to do. This means if you do a "Factory data reset" su will be temporarilly broken until you reinstall the Superuser.apk package. Since installing the package itself doesn't require root, this is easily done after a /data reset.
Also note that I did not perform a /system remount-rw anywhere. At least on my Epic, /system appears to always be mounted read-write so it's an unnecessary step. It's actually the "joeykrim-root.sh" script that remounts /system read-only during the boot process, which is why folks who don't use root kernels have run into this problem before. I'm not sure why joeykrim's script does that, I guess he probably assumed /system is mounted read-only by default. There's arguments that /system should be read-only, but I didn't touch it in case some Samsung stuff depends on it being read-write.
Finally, if you're already rooted via joeykrim or are running a root kernel, there's nothing really to be gained by doing this. I'm just throwing this out there as I perfer to make the minimum invasive changes possible to obtain root.

Wow, that was really informative. To check for Super user you:
Type: adb shell
then type: SU
You should get a # sign if you have root. Correct?
In the original Noobln post method would the Epic keep root even after a wipe therefore not needing to re-apply the superuser apk again? That might be a reason why folks would want to go the more invasive route (considering rooters seems to change ROMS fairly often which requires wipes sometimes). Either way, keeping a copy of the apk file on your SD card is no big deal.

mkasick said:
Also note that I did not perform a /system remount-rw anywhere. At least on my Epic, /system appears to always be mounted read-write so it's an unnecessary step. It's actually the "joeykrim-root.sh" script that remounts /system read-only during the boot process, which is why folks who don't use root kernels have run into this problem before. I'm not sure why joeykrim's script does that, I guess he probably assumed /system is mounted read-only by default. There's arguments that /system should be read-only, but I didn't touch it in case some Samsung stuff depends on it being read-write.
Click to expand...
Click to collapse
This explains a lot of problems! thanks
EDIT- another noob question- why do you prefer to have superuser installed to /system/data- why not put it in /system/app? Also if I want to install busybox where is the best location to put it?

ZenInsight said:
Wow, that was really informative. To check for Super user you:
Type: adb shell
then type: SU
You should get a # sign if you have root. Correct?
Click to expand...
Click to collapse
Once you run rageagainstthecage-arm5.bin, you should get a root-shell automatically every time you run "adb shell" after until you reboot the phone. Yes, you can tell it's a root shell since it uses the "#" prompt. This is the important part to check, since if the exploit doesn't work, you'll have to run it again. But I haven't seen it not work.
After su is installed and you reboot, your steps are correct: run "adb shell", run "su", then you'll be prompted on the phone scren to authorize access and once you allow it you'll end up with a "#" prompt.
ZenInsight said:
In the original Noobln post method would the Epic keep root even after a wipe therefore not needing to re-apply the superuser apk again?
Click to expand...
Click to collapse
noobnl installs Superuser.apk to /system, you can do that here too. Just replace the "adb install Superuser.apk" step with "adb push Superuser.apk /system/app". It's independent of the joeykrim scripts.

With my captivate we have many update.zip root methods to choose from. Any chance this will be coming to the epic? Have a friend with an epic and command lines would be too much and one click didn't work.
Sent from my SAMSUNG-SGH-I897 using XDA App

jimmyz said:
why do you prefer to have superuser installed to /system/data- why not put it in /system/app?
Click to expand...
Click to collapse
I prefer to keep consistent with the idea that user-installed applications go in /data, and stock-installed-and-unmodified applications remain in /system/app. This way, upgrading Superuser.apk doesn't require a root-shell/root-explorer, you can remove it or upgrade it the way you do with any user installed application--adb install, side-loading via an sdcard, or downloading it from the market.
Plus, in general I prefer to keep my /system as untouched as possible. For example, I don't remove stock apps either. The "su" binary has to be installed in /system to persist after a /data wipe, and busybox is best installed to /system so it's in PATH (haven't looked into modifying the default PATH yet). Otherwise I try to keep /system alone.
jimmyz said:
Also if I want to install busybox where is the best location to put it?
Click to expand...
Click to collapse
Android's default PATH provides four places for busybox to be installed: /sbin, /system/bin, /system/sbin, and /system/xbin. /sbin is part of the initramfs, in other words it's controlled by the kernel you're running. You can install busybox to any of the three /system/*bin directories, but I prefer /system/xbin.
In the traditional Unix conventions, "/usr/bin" is for user-runnable stock-installed programs, and "/usr/sbin" is for root-requiring (superuser-runnable) stock-installed programs. "xbin" isn't part of the standard convention, but I'd guess it's intended for "extra binaries" that are not part of the stock installation (much like /usr/local/bin), thus it seems like an appropriate location for a user-added "su" and "busybox" programs.
The second reason is that "xbin" is relatively empty, so if you want to create the applet symlinks (i.e., so that you can call "cp" instead of "buybox cp") it won't overwrite the stock toolbox symlinks. Also, since "xbin" is last on the default PATH, any programs provided by both toolbox and busybox will default to the toolbox version--which would be important for stock system scripts that might run into compatibility issues if they were to use the busybox versions instead.
To install busybox, grab a copy of the binary from somewhere (one click packages, a copy of stericson.busybox.apk, etc.). Then, once rooted run:
Code:
adb push busybox /data/local/tmp
adb shell
su # Authorize on phone screen
cat /data/local/tmp/busybox > /system/xbin/busybox
chown root.shell /system/xbin/busybox
chmod 755 /system/xbin/busybox
rm /data/local/tmp/busybox
/system/xbin/busybox --install -s /system/xbin

jhnstn00 said:
With my captivate we have many update.zip root methods to choose from. Any chance this will be coming to the epic?
Click to expand...
Click to collapse
I don't believe so. The I9000/Vibrant/Captivate have recoveries that don't check the signature of update.zip (as I understand, or maybe they do but only require test keys) which makes rooting-via-recovery possible. Unfortuntaely the Epic and Fascinate do perform signature checks, so we can't enable root via stock-recovery.
That said, the Fascinate one-click methods should also work on the Epic. Although depending on why your friend couldn't get the Epic one-click to work, the Fascinate one may not work either.

mkasick said:
I prefer to keep consistent with the idea that user-installed applications go in /data, and stock-installed-and-unmodified applications remain in /system/app. This way, upgrading Superuser.apk doesn't require a root-shell/root-explorer, you can remove it or upgrade it the way you do with any user installed application--adb install, side-loading via an sdcard, or downloading it from the market.
Plus, in general I prefer to keep my /system as untouched as possible. For example, I don't remove stock apps either. The "su" binary has to be installed in /system to persist after a /data wipe, and busybox is best installed to /system so it's in PATH (haven't looked into modifying the default PATH yet). Otherwise I try to keep /system alone.
Android's default PATH provides four places for busybox to be installed: /sbin, /system/bin, /system/sbin, and /system/xbin. /sbin is part of the initramfs, in other words it's controlled by the kernel you're running. You can install busybox to any of the three /system/*bin directories, but I prefer /system/xbin.
In the traditional Unix conventions, "/usr/bin" is for user-runnable stock-installed programs, and "/usr/sbin" is for root-requiring (superuser-runnable) stock-installed programs. "xbin" isn't part of the standard convention, but I'd guess it's intended for "extra binaries" that are not part of the stock installation (much like /usr/local/bin), thus it seems like an appropriate location for a user-added "su" and "busybox" programs.
The second reason is that "xbin" is relatively empty, so if you want to create the applet symlinks (i.e., so that you can call "cp" instead of "buybox cp") it won't overwrite the stock toolbox symlinks. Also, since "xbin" is last on the default PATH, any programs provided by both toolbox and busybox will default to the toolbox version--which would be important for stock system scripts that might run into compatibility issues if they were to use the busybox versions instead.
To install busybox, grab a copy of the binary from somewhere (one click packages, a copy of stericson.busybox.apk, etc.). Then, once rooted run:
Code:
adb push busybox /data/local/tmp
adb shell
su # Authorize on phone screen
cat /data/local/tmp/busybox > /system/xbin/busybox
chown root.shell /system/xbin/busybox
chmod 755 /system/xbin/busybox
rm /data/local/tmp/busybox
/system/xbin/busybox --install -s /system/xbin
Click to expand...
Click to collapse
You sir are a true gentleman! Thank you for the informative answers- its great to have you over here! I have one more question- why can't I usually push directly to /system ?

jimmyz said:
why can't I usually push directly to /system ?
Click to expand...
Click to collapse
Pushing directly to /system requires running the adb service on the phone as the root user, so that it has permissions to write to that directory. Usually adb runs on the phone unprivileged, so you can only push to world-writable directories.
Running rageagainstthecage-arm5.bin actually changes this. The exploit forces the adb service to run as the root user, which is why "adb shell" gives you a root shell and "adb push" to /system does work, until the phone is restarted.
Interesting enough, the adb service also runs as root by default in the Android emulator. So there's probably a configuration setting, somewhere, to make it do that. In general it's safer to run adb unprivileged though, and "su" to move files to /system once uploaded elsewhere on the phoe.

mkasick said:
Pushing directly to /system requires running the adb service on the phone as the root user, so that it has permissions to write to that directory. Usually adb runs on the phone unprivileged, so you can only push to world-writable directories.
Running rageagainstthecage-arm5.bin actually changes this. The exploit forces the adb service to run as the root user, which is why "adb shell" gives you a root shell and "adb push" to /system does work, until the phone is restarted.
Interesting enough, the adb service also runs as root by default in the Android emulator. So there's probably a configuration setting, somewhere, to make it do that. In general it's safer to run adb unprivileged though, and "su" to move files to /system once uploaded elsewhere on the phoe.
Click to expand...
Click to collapse
I am learning a lot!!! Could you take a look at koush's kernel here, with it I noticed that when using adb I got the # prompt right away and was able to push to /system- maybe he was able to figure out the config settings? Once again thanks!!!
one more ? (feel free to ignore this one) what actually happens when you do
Code:
adb shell /data/local/tmp/rageagainstthecage-arm5.bin
and how does that give you permanent root?

mkasick said:
Pushing directly to /system requires running the adb service on the phone as the root user, so that it has permissions to write to that directory. Usually adb runs on the phone unprivileged, so you can only push to world-writable directories.
Running rageagainstthecage-arm5.bin actually changes this. The exploit forces the adb service to run as the root user, which is why "adb shell" gives you a root shell and "adb push" to /system does work, until the phone is restarted.
Interesting enough, the adb service also runs as root by default in the Android emulator. So there's probably a configuration setting, somewhere, to make it do that. In general it's safer to run adb unprivileged though, and "su" to move files to /system once uploaded elsewhere on the phoe.
Click to expand...
Click to collapse
It is indeed a config option in default.prop. However, this is in the initramfs and you can't change it on the fly, so you need to rebuild the kernel to change it. With some work you can modify the stock kernel to do it, but I personally haven't tried it.
Sent from my Epic 4G using XDA App

Thank you, this worked perfectly for me, running stock DI18 ROM that I flashed tonight!!! I confirmed by installing the wireless tethering pre-9 apk, and successfully ran the wireless tethering without any errors.
Quick question: do we need to do this after root or is it not needed?
NEEDED?? ===> SuperUser App to help with Security Concerns for the Epic - h**p://forum.sdx-developers.com/epic-development/superuser-app-to-help-with-security-concerns/
Also, Titanium Backup failed to work - it gave an error of denied root access, and said busybox was not installed. What needs to be done to make it work? Do I need to install clockwork mod (not exactly sure what it does though) or a custom ROM?

AndroidSPCS said:
Quick question: do we need to do this after root or is it not needed?
Click to expand...
Click to collapse
Not sure exactly what you're asking. This is an alternative to the joeykrim-based one-click roots and rooted kernels. If you already have one of those this isn't really necessary.
AndroidSPCS said:
NEEDED?? ===> SuperUser App
Click to expand...
Click to collapse
Yes, the su binary used here requires the Supruser appto be installed to authorize su requests. Otherwise they'll always be denied. Other su binaries might not require it, but then all apps have root access which isn't really a good thing.
AndroidSPCS said:
Also, Titanium Backup failed to work - it gave an error of denied root access, and said busybox was not installed. What needs to be done to make it work?
Click to expand...
Click to collapse
Did you authorize Titanium Backup when the Superuser prompt came up (requies the Superuser app to be instald too)?
Titanium Backup has an option to download and install it's preferred version of busybox. Follow the prompts to do that.

mkasick said:
Not sure exactly what you're asking. This is an alternative to the joeykrim-based one-click roots and rooted kernels. If you already have one of those this isn't really necessary.
Click to expand...
Click to collapse
Thanks, actually this was referring to the thread where the instructions for going to adb shell or terminal and typing in the following commands:
adb shell
su
mount -t rfs -o remount,rw /dev/block/stl9 /system
cp /system/bin/su /system/bin/jk-su
exit
Yes, the su binary used here requires the Supruser appto be installed to authorize su requests. Otherwise they'll always be denied. Other su binaries might not require it, but then all apps have root access which isn't really a good thing.
Click to expand...
Click to collapse
Yes same as above, the question is not whether we need SU app (I know we do), but whether we needed to type the additional commands:
adb shell
su
mount -t rfs -o remount,rw /dev/block/stl9 /system
cp /system/bin/su /system/bin/jk-su
exit
What do these commands do? It seems to me my Superuser app is working fine with wifi tether - popping up with allow / disable permission boxes, etc. Do these commands add something else to Superuser?
Did you authorize Titanium Backup when the Superuser prompt came up (requies the Superuser app to be instald too)?
Titanium Backup has an option to download and install it's preferred version of busybox. Follow the prompts to do that.
Click to expand...
Click to collapse
There was no Superuser prompt during the install of the app, nor anytime when it said it had a failure with root access. However there is an option to install BusyBox, which I have not done yet, because I am not sure what busybox is, or what it does. I'd like to find out why I need it and what it does, so I can feel comfortable with installing it.
Thanks again.

echo "root::0:0:root:/data/local:/system/bin/sh" > /etc/passwd
echo "root::0:" > /etc/group
you need to do that in a shell to make sure su works properly.
I'm updating the one click root right now to be less silly.

http://forum.xda-developers.com/showpost.php?p=8543226&postcount=455
I just cleaned up the one click root to not do many of the silly things joeykrim's root does. It also means your system will be mounted as rw after a reboot and it won't overwrite your su with jk-su every boot (no more modified playlogo).
Cleaned up all the old stuff from the root so it should work fine even if you were using one of the older one clicks. I made sure su works, incl titanium backup.
I'm still installing superuser.apk to /system/app because I think it belongs there.
Thanks for doing the footwork, mkasick!

Firon said:
http://forum.xda-developers.com/showpost.php?p=8543226&postcount=455
I just cleaned up the one click root to not do many of the silly things joeykrim's root does. It also means your system will be mounted as rw after a reboot and it won't overwrite your su with jk-su every boot (no more modified playlogo).
Cleaned up all the old stuff from the root so it should work fine even if you were using one of the older one clicks. I made sure su works, incl titanium backup.
I'm still installing superuser.apk to /system/app because I think it belongs there.
Thanks for doing the footwork, mkasick!
Click to expand...
Click to collapse
Firon- why are these lines still needed?
Code:
adb push playlogo /system/bin/playlogo
what is playlogo? Does this just put the stock one back in case you used the joeykrim method in the past?
Code:
adb push remount /system/xbin/remount
Are the remount scripts still needed?
Code:
adb shell ln -s /system/xbin/su /system/bin/su
why is this link needed? why cant su just be in xbin
thanks in advance!
Code:

jimmyz said:
Firon- why are these lines still needed?
Code:
adb push playlogo /system/bin/playlogo
what is playlogo? Does this just put the stock one back in case you used the joeykrim method in the past?
Click to expand...
Click to collapse
This is just pushing the stock playlogo, since joeykrim's method overwrites it with some custom script.
Code:
adb push remount /system/xbin/remount
Are the remount scripts still needed?
Click to expand...
Click to collapse
The script allows you to easily remount system as ro or rw at will. Why not?
Code:
adb shell ln -s /system/xbin/su /system/bin/su
why is this link needed? why cant su just be in xbin
Click to expand...
Click to collapse
I don't know if any apps depend on it being in a particular location. It is in xbin, but I'm also linking it to /system/bin to be safe.

AndroidSPCS said:
What do these commands do? It seems to me my Superuser app is working fine with wifi tether - popping up with allow / disable permission boxes, etc. Do these commands add something else to Superuser?
Click to expand...
Click to collapse
These commands were necessary to get Superuser working with the old joeykrim root method. They're not necessary with this method (or the newly released one-click). In other words, if wifi-tethering is already working for you, nothing further is needed to be done.
AndroidSPCS said:
There was no Superuser prompt during the install of the app, nor anytime when it said it had a failure with root access.
Click to expand...
Click to collapse
I don't actually use TitaniumBackup. I'm not sure why its superuser-requirements would be different from other apps, but I guess it is. The new one-click appears to address this.
AndroidSPCS said:
However there is an option to install BusyBox, which I have not done yet, because I am not sure what busybox is, or what it does. I'd like to find out why I need it and what it does, so I can feel comfortable with installing it.
Click to expand...
Click to collapse
Busybox is a suite of "familar" Unix command-line utilites (things like cp (copy), mv (move), ls (list), etc.). It targets embedded platforms by being very featureful, yet relatively small. It's installed and used on a wide variety of embedded devices including wireless routers, print servers, phones, even televisions.
Oddly enough, Android does not include busybox by default. Instead it comes with it's own utility-programs-package called "toolbox" that isn't nearly as featureful, and quickly becomes a pain to use. Some programs, like TitaniumBackup depend on busybox programs/features, and thus require it's installation. It's safe.
The only problem with busybox is that there's not one single version of it. There's multiple builds of it from the same source code with different sets of features turned on and off. In the past, some folks had a version of busybox installed that didn't contain all the features necessary to support TitaniumBackup, so they added the option to install their own version. It's installed in a separate location, so it won't overwrite any version you do have installed, and it's safe to do. But if you've already installed another version of busybox that does work, then it may be unnecessary.

I did the Jokeyrim method a few days ago. I installed a new kernal and now a new ROM. All seems ok, but ow when I do the "whoami" command in adb shell I get whoami not found. I don't think I'm really rooted anymore. Any attempt to reinstall the Jokeyrim root script results in failure (mostly "device not found" errors). When in adb shell, most commands I type now are either "not found" or "permission denied", so I'm not confident that I'm really rooted now.
Since I have / had Jokeyrim installed, how can I "uninstall" it so that I can use this method of rooting instead? BTW, the newest Clockworkmod is installed and working.
Do I need to flash to stock first? Sorry, but I'm a VERY STOOPID NOOB.

Related

How to root the Droid 2

All credit for the binary goes to Sebastian Krahmer at http://c-skills.blogspot.com/. Please see fit to donate via Paypal to [email protected]
If you want a simpler 'one-click' process, go to this thread: Easier 1-2-3 Droid 2 Root for Windows / Linux / Mac
***NOTE: Proceed at your own risk. I and the providers of this code are not responsible for anything you do to your phone!***
Setup:
- Install adb (here) and Motorola drivers for windows(32-bit or 64-bit)
- Download attached archive
- Extract to a directory, I used c:\Droid2Root
- Make sure you have USB degugging enabled
- Change connection to PC Mode
Process:
- Open command prompt
- cd c:/wherever-your-sdk-tools-folder-is
- adb devices (to verify the connection)
- cd c:/Droid2Root
- adb push Superuser.apk /sdcard/Superuser.apk
- adb push su /sdcard/su
- adb push busybox /sdcard/busybox
- adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage-arm5.bin
- adb shell
- cd data/local/tmp
- chmod 0755 rageagainstthecage-arm5.bin
- ./rageagainstthecage-arm5.bin
- let the process run until it 'kicks' you out (may take a minute or two) to c:/Droid2Root
- cd c:/wherever-your-sdk-tools-folder-is
- adb kill-server
- adb devices (to verify the connection)
- adb shell (you should now have a # prompt, if not return to ./rage step above)
- mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
- cp /sdcard/Superuser.apk /system/app/Superuser.apk
- cp /sdcard/su /system/bin/su
- cp /sdcard/busybox /system/bin/busybox
- chmod 4755 /system/bin/su
- chmod 4755 /system/bin/busybox
- mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
- exit
- exit
I'm sure there are certain steps that could be streamlined or eliminated, so please feel free to make a suggestion and I'll edit the post.
Additional thanks to @rainabba and AllDroid.org for their excellent Droid X rooting tutorial, which assisted me greatly in this process.
waiting for a recovery, glad to see its rooted
Android n00b here, I can remove the Verizon crapware with this right? And tether?
thelolotov said:
Android n00b here, I can remove the Verizon crapware with this right? And tether?
Click to expand...
Click to collapse
yes and yes
thelolotov said:
Android n00b here, I can remove the Verizon crapware with this right? And tether?
Click to expand...
Click to collapse
I wouldn't remove anything yet since we don't have a sbf file to recover from partial bricks. However, tethering and any other apps that require root can be used now.
I'm new to doing this all the adb way.
When you say extract to a directory what do you mean to extract. After it downloads the achive files its done.....
i understand the rest of the commands but im lost there
Hmm, alright, that's still worth it, will I lose my data/have to hard reset to root?
Right click the downloaded archive and "extract files". You need to do this so adb can push them to the phone.
thelolotov said:
Hmm, alright, that's still worth it, will I lose my data/have to hard reset to root?
Click to expand...
Click to collapse
Nope, it just gives you access. Nothing deleted.
I'm retarded i didnt realize it was attached to the post, i thought it was what adb downloaded when i first opened it cause it called them archives.
cannot access
I got as far as pushing super user su and busy box onto my phone but it says that system in read only.. how do i fix this?
Anybody actually try this?
Hello,
I am following your directions and when I get to the "adb push Superuser.apk" step I receive the following error:
"failed to copy 'Superuser.apk' to '/system/app/Superuser.apk': Read-only file system"
I get this same error for the other adb push steps that follow.
Edit: To verify, I get a # shell.
Edit 2: I tried pushing the Superuser.apk to /data/local/tmp then cp to /system/app/, this also popped up a read-only file system error.
I'm currently trying it.
I have a 64 bit driver on my computer that i used to use for my D1 but it doesn't recognize my D2 when doing adb devices and i cant install the 32 bit driver
GSletta said:
I got as far as pushing super user su and busy box onto my phone but it says that system in read only.. how do i fix this?
Click to expand...
Click to collapse
Did you verify you have the # prompt three steps before that?
Yeah i get the # but it wont let me push superuser su and busybox
GSletta said:
Yeah i get the # but it wont let me push superuser su and busybox
Click to expand...
Click to collapse
Weird.. I didn't need to mount the system manually, but let me if there's a step I left out.
and some more screens (feel free to use in first post):
http://i.imgur.com/nPllt.jpg
http://i.imgur.com/COTEA.jpg
http://i.imgur.com/open3.jpg
djh816 said:
and some more screens (feel free to use in first post):
http://i.imgur.com/nPllt.jpg
http://i.imgur.com/COTEA.jpg
http://i.imgur.com/open3.jpg
Click to expand...
Click to collapse
Did you add any steps to mount the system? I don't believe I did, but it seems others are finding it to be read-only.
jerseyh22accord said:
I'm currently trying it.
I have a 64 bit driver on my computer that i used to use for my D1 but it doesn't recognize my D2 when doing adb devices and i cant install the 32 bit driver
Click to expand...
Click to collapse
Don't know if it will help you, but if it's anything like the DInc, you could just use the SDK's drivers and add a few device identifier lines to the INF file before installing them.

[ROOT] Easy Root, works with any Stock ROM (Including 2.31.651.7!)

Disclaimer: This is not one-click. However, it IS relatively short and straightforward, and does not require you to downgrade.
Credits: The 743C exploit, and ChainsDD for Superuser.
You need:
Android SDK installed and working.
The zip attached to this post.
If you're still on Cupcake (Android 1.5) you'll need su and Superuser from http://bit.ly/su2361cd
So, let's get down to business.
Unzip the attached file into your /android-sdk/tools/ directory, it'll make your life (and ours) easier.
Open up your command line, change to the SDK tools directory, and enter these commands:
Code:
adb push rageagainstthecage-arm5.bin /data/local/tmp
adb shell chmod 755 /data/local/tmp/rageagainstthecage-arm5.bin
Now execute the exploit:
Code:
adb shell
/data/local/tmp/rageagainstthecage-arm5.bin
Wait for the exploit to finish.
Code:
exit
If it doesn't exit cleanly, chances are it worked, just close your terminal or command prompt and open a new one.
Test that it worked:
Code:
adb kill-server
adb start-server
adb shell
If you see a $, it DID NOT work, execute the exploit again. (Step 3)
If you see a #, it WORKED, continue:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
exit
adb push su /system/xbin
adb shell chmod 4755 /system/xbin/su
adb install Superuser.apk
You may need to ctrl-c once it says Success!
Next time you 'su' in adb shell, make sure to click Allow in Superuser!
You may instead install Superuser from the Market if you wish.
Clean up the exploit:
Code:
adb shell rm /data/local/tmp/rageagainstthecage-arm5.bin
If you ever do a "Factory Reset", Superuser will go away, but you DO NOT lose root. Just reinstall Superuser.
What next? The choice is yours! Remove stock apps, get some good 'ol WiFi tethering, or flash something different!
*NOTE*
The above steps DO NOT put a recovery on your phone, though it is VERY EASY.
Once you're rooted, install ROM Manager by Koushik Dutta from the Market. Open it up, click "Flash ClockworkMod Recovery".
Select your model (Hero CDMA), and hit Allow when the Superuser Prompt shows up.
*NOTE*
The above steps DO NOT install Busybox on your phone.
Simply install Busybox from Stephen (Stericson), available on the market.
Start the app and click Allow when prompted by Superuser.
How To Uninstall
Code:
adb shell
su
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
rm /system/xbin/su
rm /etc/passwd
rm /etc/group
Uninstall Superuser.apk then reboot, and you're set!
tehdarkknight said:
Disclaimer: This is not one-click. However, it IS relatively short and straightforward.
Credits: The 743C exploit, and ChainsDD for Superuser.
You need:
Android SDK installed and working.
The zip attached to this post.
So, let's get down to business.
Unzip the attached file into your /android-sdk/tools/ directory, it'll make your life (and ours) easier.
Open up your command line, change to the SDK tools directory, and enter these commands:
Code:
adb push rageagainstthecage-arm5.bin /data/local/tmp
adb shell chmod 755 /data/local/tmp/rageagainstthecage-arm5.bin
Now execute the exploit:
Code:
adb shell
/data/local/tmp/rageagainstthecage-arm5.bin
Wait for the exploit to finish.
Code:
exit
If it doesn't exit cleanly, chances are it worked, just close your terminal or command prompt and open a new one.
Test that it worked:
Code:
adb kill-server
adb start-server
adb shell
If you see a $, it DID NOT work, execute the exploit again. (Step 3)
If you see a #, it WORKED, continue:
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
exit
adb push su /system/xbin
adb shell chmod 4755 /system/xbin/su
adb install Superuser.apk
You may need to ctrl-c once it says Success!
Next time you 'su' in adb shell, make sure to click Allow in Superuser!
That's it!
I won't give directions on installing a recovery or flashing another rom, there are plenty of threads detailing how to do so.
Click to expand...
Click to collapse
Pretty straightforward. This will probably help a lot of newer hero owners, because amazingly, people are still buying them every day!
If I get a chance to test it out, I will.
Nice job. Should be stickied so people don't run around searching through all the old rooting threads which aren't as compatible with the newer RUU versions.
Worked nicely on a refurb Hero that Sprint sent due to the dust problem.
Thanks!
Works great for me
Why am I having trouble doing this? I was able to do it on one Hero though not after many retries, but not on another.
tehdarkknight said:
Disclaimer: This is not one-click. However, it IS relatively short and straightforward, and does not require you to downgrade.
Credits: The 743C exploit, and ChainsDD for Superuser.
Click to expand...
Click to collapse
Great! I can't live without WiFi tethering my iPad which is why I haven't done the 2.31.651.7 HTC OTA update at all.
So, I take it that this exploit will root the Official RUU_Hero_C_Sprint_2.31.651.7_signed_release.exe file then too? I ask because I really don't like to do 'update patches'. I prefer to flash and start fresh so I'm planning on flashing the RUU and then doing this root exploit. Yes, No???
DaWeav said:
Great! I can't live without WiFi tethering my iPad which is why I haven't done the 2.31.651.7 HTC OTA update at all.
So, I take it that this exploit will root the Official RUU_Hero_C_Sprint_2.31.651.7_signed_release.exe file then too? I ask because I really don't like to do 'update patches'. I prefer to flash and start fresh so I'm planning on flashing the RUU and then doing this root exploit. Yes, No???
Click to expand...
Click to collapse
I tested it with the very same RUU, it works.
tehdarkknight said:
I tested it with the very same RUU, it works.
Click to expand...
Click to collapse
SUPER!
Because when I saw this post, I tried to download the latest OTA patch, but my phone just responds 'Your phone is up to date. There are no updates available for your phone'. Strange, because I'm on 2.27.651.6 and the OTAcerts.ZIP is in tact.
Oh well, FEAR NOT, because after I get back from the store this morning, then get the TV tuned to the split screen with football on one and the baseball playoffs on the other, and get Leo Laporte's TechGuy radio show screaming...it'll be the perfect time to flash my phone to factory fresh.
Thanks.
Works perfectly on latest and "greatest" stock ROM... excellent
DaWeav said:
SUPER!
Because when I saw this post, I tried to download the latest OTA patch, but my phone just responds 'Your phone is up to date. There are no updates available for your phone'. Strange, because I'm on 2.27.651.6 and the OTAcerts.ZIP is in tact.
Click to expand...
Click to collapse
Same thing happened to me, that's why I tested this method with the RUU
What are the advantages to ruu'ing to. 7 and rooting again? I rooted my .5 hero and have had no problems....is there something significant that makes the extra work worth it?
Sent from my HERO200 using XDA App
tehdarkknight said:
Same thing happened to me, that's why I tested this method with the RUU
Click to expand...
Click to collapse
Well, I just did the RUU, then did this root, then loaded WiFi Tether, and I'm back in business with my iPad tethering.
Vandelay007 said:
What are the advantages to ruu'ing to. 7 and rooting again? I rooted my .5 hero and have had no problems....is there something significant that makes the extra work worth it?
Click to expand...
Click to collapse
One reason is that when I tried to download the latest OTA update today, I could not. And another reason is before I RUU'd, I had less than 50MB of available memory, but now I have 96MB available with all of my programs loaded again. So for me, it just seems more and more that Android (or HTC Sense) is like Windows boxes since it seems I have to reload the Android OS every now and then to clean things out.
Vandelay007 said:
What are the advantages to ruu'ing to. 7 and rooting again? I rooted my .5 hero and have had no problems....is there something significant that makes the extra work worth it?
Sent from my HERO200 using XDA App
Click to expand...
Click to collapse
Well, if you're using Sprint's official stock .5 rom, with no tweaks applied, you gain the advantage of having an up-to-date rom with the latest bugfixes from Sprint, plus I would say my root method is less invasive and more transparent than other root methods. My personal opinion is that it feels like a root method that can't be abused easily.
SuperOneClick
But I don't need storage space with firerats custom mtd partition....I have over 200mb free with over 50 apps and zero of them on m SD card
Sent from my HERO200 using XDA App
this isnt working.... I can't get passed step 3... my phones just restarts, and then i can't get any further than that.
devonkosa said:
this isnt working.... I can't get passed step 3... my phones just restarts, and then i can't get any further than that.
Click to expand...
Click to collapse
Give us some info. What's your ROM version?
aosp said:
SuperOneClick
Click to expand...
Click to collapse
Is SuperOneClick the same method of rooting?
chiill said:
Is SuperOneClick the same method of rooting?
Click to expand...
Click to collapse
Yes it is....
Ok guyz, I'm going to help yall out !!!!
Look at this and this works I just did it.... any questions pm me then I will post up on here....
http://forum.xda-developers.com/showthread.php?t=803682
This is for rooting your hero and other android devices, even at .7 on the Hero.... I just did this and I laughed at out quick and easy this was... Just make sure you are charge only, and you unzip the downloaded file,.. then open up the SuperOneClickv1.3-ShortFuse.zip on your computer somewhere and open up the SuperOneClick program, and bam you are done....
http://forum.xda-developers.com/atta...5&d=1286657043

[HOW TO] Root Motorola Defy

I've seen that there's no topic teaching how to ROOT the phone in the forum yet, so I'm making one myself, I hope this will help users who come here looking for info.
This method was originally found by jboogie3 here http://modmymobile.com/forums/637-motorola-defy-general/557910-motorola-defy-root-droid2method.html
EDIT: If you have version 2.51 ROOT with another way, check out this topic: http://forum.xda-developers.com/showthread.php?t=889133
Let's get started:
1. Put the phone in Debug Mode: Go to Settings > Applications > Development and check USB debugging box.
2. Extract the files from the zip below, connect the phone via USB, and copy them to the phone via ADB like this:
Code:
adb push Superuser.apk /sdcard/Superuser.apk
adb push su /sdcard/su
adb push busybox /sdcard/busybox
adb push exploit.bin /data/local/tmp/exploit.bin
3. Now we enter the phone's internal shell, also using ADB:
Code:
adb shell
4. Then we take advantage of the "fake" root exploit:
Code:
cd /data/local/tmp
chmod 0755 exploit.bin
./exploit.bin
5. Now after that last command you should be back to your normal console, not the phone one, so we need to connect to it again, and doing so we should now see that we have root permissions since the "#" symbol is displayed instead of "$".
Code:
adb shell
6. Now we mount the /system partition as writable and copy the necessary files there, and set them with the right permissions:
Code:
mount -o rw,remount -t ext3 /dev/block/mmcblk1p21 /system
cp /sdcard/Superuser.apk /system/app/Superuser.apk
cp /sdcard/su /system/bin/su
cp /sdcard/busybox /system/bin/busybox
chmod 4755 /system/bin/su
chmod 4755 /system/bin/busybox
mount -o ro,remount -t ext3 /dev/block/mmcblk1p21 /system
exit
7. Restart the phone and check if you have ROOT in a terminal by typing the "su" command, or by installing any other app that requires ROOT, and seeing it the SuperUser app pops up.
Or, download z4root by ryan in the market. Click permanent root, done.
Sent from my MB525 using XDA App
Many people reported z4root to work, but somehow it didn't work for me :\, phone reboot 2 times, but root wasn't being recognized system wide. But yeah, there's no problem testing that first, if it works for you it's way simpler
Worked well for me. Almost too easy.
Thank you for the great write up though.
pedrodh said:
Many people reported z4root to work, but somehow it didn't work for me :\, phone reboot 2 times, but root wasn't being recognized system wide. But yeah, there's no problem testing that first, if it works for you it's way simpler
Click to expand...
Click to collapse
Sent from my MB525 using XDA App
Well, at least this will help people know what's going on in the background for achieving ROOT hehe
Thanks for posting and distur for the z4root tip, worked for me.
Sent from my MB525 using XDA App
Yep. z4root worked for me as well. Perfect.
Nice writeup! very detailed
thx !!!
thanks much
z4root worked for me as well. no issues and running for more than a week now rooted. haven't tried the unroot function yet...
I made it also with z4root...no problem so far
root
are we talking super 1 click, rooted mine 1st day i got it same method as droid no probs so far, all the crap from vodafone gone now, waiting for a nice rom
I heard that the DORoot works as well. There are also links on how to root on the Droid 2. I'd think it would be similar.
http://forum.xda-developers.com/showthread.php?t=782556
hi first time android newbie here-
i downloaded and install z4root - how do i confirmed the device was rooted?
After rooting, in your application drawer (middle button that brings up all your apps) you'll see the superuser app. It looks like an android skull and crossbones.
I have a Motorola Defy on T-Mobile UK, If I use z4root will this enable me to root my phone.
Exactly what does rooting achieve, Will it allow me to try another rom?
Yes, z4root will let you achieve root on this phone.
ROOT has nothing or very little to do with custom ROMs, ROOT it's the Unix super user, the administrator per say. With it certain apps that modify system properties will work (search Android Market for "root"), and also it enables you to do all sorts of crazy stuff on the phone, like literaly modify any file. So if for example there's an app that bundles with the phone, and that you normaly couldn't unistall it, with ROOT you can just delete the app, and that's it . That's and many more things, although root it's most usufull for developers or hackers than the normal user. It's not like jailbreaking an Iphone, Android it's already open enough for the regular user.
If I root the Motorola Defy and I delete some files because I not familiar with this, will I make my Motorola Defy dead.
croxley said:
If I root the Motorola Defy and I delete some files because I not familiar with this, will I make my Motorola Defy dead.
Click to expand...
Click to collapse
Rooting doesn't delete files If you've rooted your phone, you won't be able to just go to the system folder and delete something. You need tools like "root exporer" for this. This is a payware. When you rooted your phone, this root explorer can ask you for more rights. These are needed to delete needed files. Also you can do it for free with the androidSDK. Have a look here: http://forum.xda-developers.com/showpost.php?p=9456771&postcount=1
but be: don't do thinks where you don't know to get it undone. You CAN brick your phone and then you'll have to spend much time to get it back working.

Help: Good For Eterprise on a previously rooted phone

Trying to install GFE on a previously rooted but now unrooted phone. It's failing because it thinks I'm still rooted.
I have unrooted, removed Superuser (the apk and from the App list), etc.
What the hell is it finding?
Maybe su or busybox in the xbin folder?
wewoapsiak said:
Maybe su or busybox in the xbin folder?
Click to expand...
Click to collapse
Yes. They are both there. But how do I get rid of them now that I'm not rooted? ADB shell errors out with read only file system. If I re-root and delete them, then how do I make the file system read only again?
Also, do I need to get rid of /system/bin/su or is that part of stock Android?
Thanks so much for any help.
So all you did was delete the .apk? Download Super 1-click, re-root, then use it to unroot.
http://forum.xda-developers.com/showthread.php?t=803682
wewoapsiak said:
So all you did was delete the .apk? Download Super 1-click, re-root, then use it to unroot.
http://forum.xda-developers.com/showthread.php?t=803682
Click to expand...
Click to collapse
I rooted by flashing the update.zip and then unrooted by removing the Superuser app and then changing the file system to read only.
I thought SuperOneClick only worked with FroYo on the G2X and not with Gingerbread.
Success!!!!!!!! Many thanks to jboxer and others that pointed me in the right direction.
Here's what you need to do for anyone else facing this issue:
1. Boot into Clockwordmod Recovery and then connect your phone to the computer. CWM Recovery will be seen on ADB with root permissions.
2. Before issuing the following commands, after your phone is connected, use the menu in CWM Recovery to mount the system. If you don't mount the system you are seeing CWM's mini Android system and not the phone's.
3. Issue the following commands from your computer:
#adb uninstall com.noshufou.android.su
#adb shell rm /system/app/Superuser.apk
#adb shell rm /system/bin/su
#adb shell rm /system/xbin/su
#adb shell rm /data/local/tmp/psneuter
#adb shell "find /system/xbin -type l | xargs rm"
#adb shell rm /system/xbin/busybox
4. Use the CWM Recovery menu to unmount system.
5. Reboot your phone.
Before you attempt to re-run the Good setup, check one last time to make sure that su is gone from /system/bin and /system/xbin and that Superuser does not show up either in your Apps or when you go to Settings->Manage Apps. If any of this is still present you need to redo what is written above as the Good setup will fail.
I also recommend doing a Nandroid before unrooting, a second Nandroid after unrooting but before installing Good, and then a third Nandroid immediately after successfully installing Good.

Rooting with/using a Linux computer

Here's (almost) the process I used
change settings on device
"Unknown Sources"
"USB Debugging"
Find which device is mounted as "/system"
On my stock ICS .26 system this is "/dev/block/mmcblk0p1", but this might be something different (?)
adb shell mount | grep " /system"​
copy files to device
copy debugfs to device
adb push debugfs /data/local/ ​
copy su to device
adb push su /data/local/ ​
copy debugfsinput to device
adb push debugfsinput /data/local/​
setup temp directory
rename /data/local/tmp to /data/local/tmp.bak
make a new /data/local/tmp that is a symlink to /system device (as determined in step B)
ln -s /dev/block/mmcblk0p1 /data/local/tmp ​
reboot tablet
mark debugfs program executable
adb shell chmod 777 /data/local/debugfs​
run debugfs using "/data/local/debugfsinput" script
adb shell "/data/local/debugfs -w /dev/block/mmcblk0p1 < /data/local/debugfsinput"​
cleanup
remove /data/local/tmp symlink
move /data/local/tmp.bak to /data/local/tmp
remove /data/local/su
remove /data/local/debugfs
remove /data/local/debugfsinput
reboot
test superuser (see if "su" command works [no output, especially no error message])
install superuser app
adb install Superuser.apk ​
One thing I did different in some places was to just do "adb shell", and then issue commands one-by-one in the remote shell.
Related threads:
How to root TF700 Jelly Bean from Linux without unlocking?
[description of process updated and moved to first post]
It occurs to me that steps D through J should be doable on the device using the Terminal Emulator app that I've got installed.
Thoughts, anyone? See any dangerous pitfalls ahead on the path I'm about to undertake?
I'm going to hold off on actually doing this until tomorrow. This will to give people a chance to respond, and I need to attend to other matters (dinner, chores, etc...)
bsammon said:
It occurs to me that steps D through J should be doable on the device using the Terminal Emulator app that I've got installed.
Click to expand...
Click to collapse
Another thought.... step C obviously doesn't need adb, and step K could be done with the "pm" command in the Terminal Emulator.
It seems I could do this without using adb at all--- not sure why I'd bother, unless I have problems getting it to work, or just to prove that I can.
I rooted my TF700 under Linux by reading the batch file and doing the steps manually - similar as you describe in your second post, but I even typed the input to debugfs manually. The whole process depends on getting at least "shell" user access, so I am not sure that it could be done without adb - a local terminal app would run under its own, more restricted user account.
_that said:
I rooted my TF700 under Linux by reading the batch file and doing the steps manually - similar as you describe in your second post, but I even typed the input to debugfs manually. The whole process depends on getting at least "shell" user access, so I am not sure that it could be done without adb - a local terminal app would run under its own, more restricted user account.
Click to expand...
Click to collapse
There is also a shell script version around for that famous rooting batch file. Technically obviously the same as reading the commands and typing them manually ... but still
FordPrefect said:
There is also a shell script version around for that famous rooting batch file. Technically obviously the same as reading the commands and typing them manually ... but still
Click to expand...
Click to collapse
But doing it manually is so much more l33t.
FordPrefect said:
There is also a shell script version around for that famous rooting batch file. Technically obviously the same as reading the commands and typing them manually ... but still
Click to expand...
Click to collapse
Got a link?

Categories

Resources