How to root the Droid 2 - Droid 2 Android Development

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.

Related

[Huawei IDEOS U8150] How to gain root access

I hold no responsibility to how you use or not use this info and if you brick phone - you do this at your own risk
There is a couple away you can go about gaining root access with this phone I have tested all 3 ways but only had success with 2 of them.
a) You can download 'z4root' from the Android Market (If is still available) or search XDA forums for it.
b) Search the XDA forums for 'SuperOneClick' which requires mono to work on Linux. I have read people that have had success with 'SuperOneClick' but that was not the case for me.
c) My preferred method:
Prerequisite:
knowledge of Linux and Terminal
knowledge of ADB (guide available in forums)
I did all this using Debian (testing) 64bit, Android SDK.
Creating correct permissions to access the phone via USB:
i) create
Code:
/etc/udev/rules.d/51-android.rules
ii) in the file put
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
iii) then
Code:
chmod a+r /etc/udev/rules.d/51-android.rules
iv) restart udev or reboot
Downloading and/or Installing required software:
1) Downloading and installing the android-sdk from: developer.android.com/sdk/index.html
2) Downloading and extracting 'SuperOneClick' (you will only need these 5 files: rageagainstthecage, sqlite3, su, busybox and superuser.apk)
3) Copy rageagainstthecage, sqlite3, su, busybox and superuser.apk into the platform-tools directory of android-sdk. Put phone in debug mode.
4) From a terminal (command line) change to the android/platform-tools directory and carefully do these steps.
Check to see if adb can see your phone properly:
Code:
./adb devices
You should see the serial number of you device, if you see bunch of '?' you have done something wrong.
Now for the fun part rooting the phone: <= no phun intended hehe
Code:
./adb push rageagainstthecage /data/local/tmp/rageagainstthecage
Code:
./adb shell
Code:
cd /data/local/tmp
Code:
chmod 0755 rageagainstthecage
Code:
./rageagainstthecage
5) Now wait until you get kicked out from adb before you do the following:
Code:
./adb shell
If everything worked now you should see a "#" instead of the "$" you saw previously in the adb shell which means you shouldn't get "permission denied" in the following steps:
Code:
mount -o rw,remount /dev/block/mdtblock4 /system
Code:
exit
Code:
./adb push su /system/bin/su
Code:
./adb push busybox /system/bin/busybox
Code:
./adb push sqlite3 /system/bin/sqlite3
Code:
./adb push Superuser.apk /system/app/Superuser.apk
Code:
./adb shell
Code:
cd /system/bin
Code:
chmod 4755 su
Code:
chmod 4755 busybox
Code:
chmod 4755 sqlite3
Code:
./adb reboot
Now you should be able to use apps like 'Cache Cleaner NG', 'Root Explorer', 'SetCPU' etc that require root access to work correctly.
Enjoy
Guide reflash FW for those who did some damage:
* Download from here that you want to install the FW
* Copy the folder in the microSD DLOAD (with the file inside UPADATE.APP)
* From phone off, Volume + Hold down RED BUTTON UP and power button.
* start the firmware upgrade, take a few minutes and then restart the phone . is a bit slow, do not be afraid, let him work and then back on (like the first time)
Help to get into recovery mode:
* down the 'volume up 'and 'green button'and then switch the device
Guide to bootloader mode:
* switch off, press and hold power button + volume down + red key
Overclock
Can this fone be oveclocked
SethIsHere said:
Can this fone be oveclocked
Click to expand...
Click to collapse
yes it can be OCed, I recommend using setCPU from the market
SethIsHere said:
Can this fone be oveclocked
Click to expand...
Click to collapse
Yes it can, to a Maximum of 600mhz (0.6 ghz) on the stock kernel
setCPU is no longer available on the market for free afaik.
Also can someone better translate the instructions to get into recovery mode? i can barely make sense of the above instructions ^^^
.produkt-R said:
Also can someone better translate the instructions to get into recovery mode? i can barely make sense of the above instructions ^^^
Click to expand...
Click to collapse
does this help:
http://forum.xda-developers.com/showpost.php?p=10371747&postcount=5
quail said:
does this help:
http://forum.xda-developers.com/showpost.php?p=10371747&postcount=5
Click to expand...
Click to collapse
Helped, Thanks.
Although after reading the entire page, i wonder if i should have a Recovery ROM installed. But i wonder if the phone will be left in it's current working state after installing it ?
i used z4root, worked fine for me
quail said:
Code:
chmod 4755 su
Code:
chmod 4755 busybox
Code:
chmod 4755 sqlite3
Click to expand...
Click to collapse
I think only "su" should be 4755 (setuid root), busybox and sqlite3 should just be 0755? Thanks for the instructions.
pb05life said:
i used z4root, worked fine for me
Click to expand...
Click to collapse
Ok I figured it ill shut up you have to use crappy dos command prompt and type everything in manually install proggies lol Google must die!
quail said:
Creating correct permissions to access the phone via USB:
i) create
Code:
/etc/udev/rules.d/51-android.rules
ii) in the file put
Code:
SUBSYSTEM=="usb", ATTR{idVendor}=="12d1", MODE="0666"
iii) then
Code:
chmod a+r /etc/udev/rules.d/51-android.rules
iv) restart udev or reboot
Click to expand...
Click to collapse
Anyone know this part for windows XP?Not linux?
I got to rageagainstthecage and it says permission denied.
fvckyougooglescammer said:
So would you tell us, exactly how you did it?
Without using the market place?
Because I have tried 100 things downloaded all that junk wasted 5 hours.
And I do not know how to run the z4root on my phone.
I do not want to install another ROM.
I do not know why you can not run z4root and a file manager from the SD card I have tried methods with the SDK they are total rubbish.
Once again *without* using the market place.
Thanks
Click to expand...
Click to collapse
Download it mediafire.com/u8150
Sent from my Ideos using XDA App
could you explain why you prefer this way instead using z4root?
nitro-ale said:
could you explain why you prefer this way instead using z4root?
Click to expand...
Click to collapse
I have Z4root on the phone and its supposedly rooted.
Yet, I can install apps from PC onto phone, but can not uninstall them.
Adb always gives me failure.
And if I try from shell it always says permission denied.
tilal6991 said:
Download it
Sent from my Ideos using XDA App
Click to expand...
Click to collapse
Hi thanks downloaded it fine its on the phone but this doesn't tell me how to remove apps.
I have been able to install but not remove adb always says failure.
Thanks man,
Just worked perfectly on my IDEOS brought from 2degrees in NZ.
The copy of SuperOneClick that I downloaded contained a file called su-v2 instead of su. In order to get the hack to work I had to rename su-v2 to su before running ./rageagainstthecage . Pretty obvious, but it might help someone out.
Thanks
fvckyougooglescammer said:
I have Z4root on the phone and its supposedly rooted.
Yet, I can install apps from PC onto phone, but can not uninstall them.
Adb always gives me failure.
And if I try from shell it always says permission denied.
Click to expand...
Click to collapse
I followed your instructions and installed SetCPU to test my phone was rooted. It worked great! Thanks.
I still have a problem. When I try adb root it still says "adbd cannot run as root in production builds". I'm trying this to be able to control my phone with pc mouse/keyboard with androidscreencast.
Any suggestions will be much appreciated.
Answering to myself: I updated my phone with FUSIONideos 1.5 and now adb runs as root without problems.
Z4root
http://forum.xda-developers.com/showthread.php?t=833953
Worked for me
Does it removes simlock I have Huawei U8150 IDEOS Android phone with career lock ( Simlock ), so will this remove it
can there be a batch file / command / app for all this, too techy out there
also how to setup the environment to run these commands, i m windows user can i do it ?

how to unroot my nexus s pls help

hello,
i need help to remove superuser and lock my nexus s
+after doing that should i get official updates?
i did see this topic
http://forum.xda-developers.com/showthread.php?t=879041
and i try this solution
ryude said:
You need to use adb to go in the file system and delete all trace of superuser and busybox. That is the only things rooting does, places those files on your phone and changes file permissions. File permissions, they won't look for, but I've had best buy scroll through the app drawer on multiple occasions looking for superuser/rom manager.
I have attached a zip containing all the files needed for adb. Since they no longer package adb with the sdk. Just open command prompt and cd to the directory containing adb. Make sure your phone has Usb Debugging enabled, then connect your phone.
You might need to download usb drivers in order for windows to recognize the device, but probably not. Once your phone is connected, do the following.
Code:
adb devices
adb shell
su
rm /system/app/Superuser.apk
rm /system/bin/su
rm /system/bin/busybox
rm /system/bin/rootshell
reboot
Click to expand...
Click to collapse
but when i write rm /system/app/Superuser.apk it say
Read-only file system
so what should i do i only get my XS unlock then install superuser using
install-superboot-windows.bat
and i never do recovery!!!!!!
so any help
i need to get my nexus like new and i should then gt updates
You can have superuser and get updates. The update will remove root though. You could always wait for the cm nightly to include 2.3.3
Sent from my Nexus S using XDA App
You have to mount the /system partition as read/write.
Easiest way is use Root Explorer.
You can also try the following from adb or terminal on the phone:
Code:
su
mount -o rw,remount /dev/block/mtdblock3 /system
thanks for your reply
i used Root Explorer to mount the /system partition as read/write.
and then
i did write this codes
adb devices
adb shell
su
rm /system/app/Superuser.apk
and every thing was ok
but i have an error on those lines
rm /system/bin/su
rm /system/bin/busybox
rm /system/bin/rootshell
and every time i get file not found
so what i should do???
hello, tominater12 and thank you for reply
cold you tell me how i can remove superuser and root using the update??????
i want to get my nexus s like new no root no superuser
so any one can help?
hi guys,
this is my first post in the forums, but after reading and watching many videos on how to remove it i have found a solution...my nexus s is now unrooted with no superuser...
make sure u have android sdk installed, and have usb debugging on.
restart phone into recovery
open cmd and type -
cd c:/AndroidSDK/tools/
adb shell mount /system
adb shell rm /system/app/Superuser.apk
ALL CREDITS GO TO 'TheUltraLinx' ON YOUTUBE,
who has fixed my phone to factory settings
flash oem rom and fastboot oem unlock?

Samsung sidekick 4G

Has anyone begun working on rooting and customizing roms yet? I know the device isn't out for a week or so but I would figure I would ask. My vibrant I so much better rooted and I wanted the same experience on this sidekick.
Sent from my SGH-T839 using XDA App
Wreximus said:
Has anyone begun working on rooting and customizing roms yet? I know the device isn't out for a week or so but I would figure I would ask. My vibrant I so much better rooted and I wanted the same experience on this sidekick.
Sent from my SGH-T839 using XDA App
Click to expand...
Click to collapse
i wish i knew how to do this, but if i can't figure it out, i'm sure others will soon.
Just got mine last night. The usual Samsung trick with rageagainstthecage-arm5.bin works great.
abliss said:
Just got mine last night. The usual Samsung trick with rageagainstthecage-arm5.bin works great.
Click to expand...
Click to collapse
Oh really? Cool. So far all I've used is one-click root for the Samsung Epic.... is this similar? I'll check it out, thanks!
Has anyone tried using SuperOneClick yet?? I will probably try in a bit and post back with my results..
Ok... well I didn't try SuperOneClick, but I did root it via the rageagainstthecage exploit...
Want to help me do the exploit on my SK4G to root it man ?
Give me instructions ?!
I got it working on mine too. The basic steps were
1) enable debug USB mode on your phone
2) install Samsung drivers for the phone - right now Samsung's site seems to not have a choice for the Sidekick 4G's model (SGH-T839), but I grabbed the drivers for the Vibrant (at www .samsung.com/us/support/downloads/SGH-T959ZKDTMB) and they worked.
3) get adb shell working on your PC (Google it)
4) download the rageagainstthecage-arm5.bin and Superuser packages from the links in this page: wiki.cyanogenmod.com/index.php?title=HTC_Hero_%28CDMA%29:_Full_Update_Guide (be sure to unzip the files into the directory where your adb.exe program is unless you've put it in your path)
5) reboot your phone and plug it in
6) adb push rageagainstthecage-arm5.bin /data/local/tmp
7) adb shell
8) cd /data/local/tmp
9) chmod 755 rageagainstthecage-arm5.bin
10) ./rageagainstthecage-arm5.bin
11) wait until you get booted back out to your DOS command prompt
12) adb kill-server
13) adb start-server
14) adb shell
15) you should now be at a # prompt. The first few times I tried, I wasn't - I was at $. Doing this from a fresh boot seemed to be the trick. Reboot your phone and try again if you're getting a $.
16) mount -o remount,rw /dev/block/stl9 /system
17) exit
18) adb push su /system/xbin
19) adb shell chmod 4755 /system/xbin/su
20) adb push Superuser.apk /system/app
21) adb shell mount -o remount,ro /dev/block/stl9 /system
22) exit
23) reboot the phone then run an app that requests root, such as Root Explorer, to verify
(p.s. sorry for having to mangle the URL's above, XDA won't let me include links since I haven't posted 8 times yet)
josby said:
16) mount -o remount,rw /dev/block/st19 /system
18) adb push su /system/xbin
19) adb shell chmod 4755 /system/xbin/su
20) adb push Superuser.apk /system/app
21) adb shell mount -o remount,ro /dev/block/st19 /system
Click to expand...
Click to collapse
Just to note, on step 16 and 21... it is /dev/block/stl9 rather than st19
Also, after step 20, I had to run the following commands for the superuser application to grant root privledges to applications..
adb shell echo "root::0:0:root:/data/local:/system/bin/sh" > /etc/passwd
adb shell echo "root::0:" > /etc/group
Awesome to see it being rooted so fast.
I'm really interesting in getting this phone but I'm not in the US. Does anyone know if the phone will work outside US?
brenix said:
Just to note, on step 16 and 21... it is /dev/block/stl9 rather than st19
Click to expand...
Click to collapse
Dang, good catch, thanks. That's what I get for not copying and pasting from my terminal window...stupid, since I was just chastising two people at work for making the same mistake yesterday. I've edited the original post to prevent problems for people who might start before reading the entire thread.
Interesting about having to create a passwd and group file...I've only run a few root apps so far, but they've worked without me doing this. I wonder if it's app-specific.
Now to start removing some of the damn bloatware this thing comes with!
19) adb shell chmod 4755 /system/xbin/su
i get stuck on there it says unable to chmod no such file or directory . there's SU in my android-sdk/tools
i'm so glad this thing got rooted. i used to be a scene kid with a kick. i dont have this phone, i doubt i'm going to get this phone considering the sensation is droppin soon.... but for nostalgia purposes, i'm glad it got rooted. now you can really hack it!!!
not like the old ones!!
Good looking out...I rooted mine earlier today. What version of Clockworkmod Recovery are you all using?
fawkReviewz said:
19) adb shell chmod 4755 /system/xbin/su
i get stuck on there it says unable to chmod no such file or directory . there's SU in my android-sdk/tools
Click to expand...
Click to collapse
Double-check your step 18...that's the step that copies the su file from your computer onto the phone. I forget the exact output format, but it shows you a Kb/second number of how fast the file transfer went when it finishes successfully.
droctii said:
Good looking out...I rooted mine earlier today. What version of Clockworkmod Recovery are you all using?
Click to expand...
Click to collapse
I'm not brave enough to try putting the ClockworkMod for one of the Samsung devices on the list onto mine, for fear of bricking it. Don't know enough about that works as far as hardware differences go.
I have removed the APK's listed below from /system/app with no apparent ill-effects. Not that YOU should remove them necessarily - just that they're things I don't have a need for:
AccountAndSync.apk
AmazonMp3.apk
AppPack.apk
DriveSmart.apk
DriveSmartHelper.apk
install_flash_player.apk
LiveWallpapers.apk
LiveWallpapersPicker.apk
Memo.apk
MiniDiary.apk
MobileBackup.apk
MyFiles.apk
PhoneSetupWizard.apk
Twitter-2.0.1-121.apk
vvm-signed.apk
Though there must be something I don't fully understand, because even after a reboot, Amazon MP3 and AppPack are still on my phone, and they still work.
FYI, don't remove Settings.apk - I got stuck in a loop where the launcher kept crashing then reloading itself (thank goodness I was able to put it back in place with adb).
Can anyone tell me if Setcpu works for them?
Ace42 said:
Can anyone tell me if Setcpu works for them?
Click to expand...
Click to collapse
Appears to work fine.. no crashes although the Max Hz is 1000. U can still raise the Min Hz.
Sent from my Nexus S using XDA App
Can someone post a full:
ls of / and /dev/block and /efs
Thanks
Will this phone get a proper sub-forum on xda?

New root metod for NEW version : Sprint US 7.7.1Q-6_SPR-125_ASA-14

This is a work metod for root your not unlocked phone !
I find a solution after update to last new version
Download this : http://forum.xda-developers.com/showthread.php?t=2143437
After download and share fail with samba windows or mac sharing, you need to mount from file manage > remote storage
After fix permission go to adb folder and type :
"adb shell"
"cd /mnt/rfs0"
"./su"
"cd /"
"ln -s /mnt /storage"
Next step go to console and type :
adb kill-server
adb shell /storage/rfs0/pwn
Next : Install apk package from phone , Reboot Phone and now your phone is rooted!
Update from Play Market SuperSu and go.
Best regards,
m.
micron said:
This is a work metod for root your not unlocked phone !
I find a solution after update to last new version
Download this : http://forum.xda-developers.com/showthread.php?t=2143437
After download and share fail with samba windows or mac sharing, you need to mount from file manage > remote storage
After fix permission go to adb folder and type :
"adb shell"
"cd /mnt/rfs0"
"./su"
"cd /"
"ln -s /mnt /storage"
Next step go to console and type :
adb kill-server
adb shell /storage/rfs0/pwn
Next : Install apk package from phone , Reboot Phone and now your phone is rooted!
Update from Play Market SuperSu and go.
Best regards,
m.
Click to expand...
Click to collapse
lol if i saw this earlier i might not have unlocked my boot loader today. =) hope someone can try this
I gave this a try earlier today. I scoured through the forum to find that the new Ubuntu doesn't install ADB drivers by default, so you need to do this manually.
Anyway, I attempted to do it and got all the way to ./su. It then prompted me with the message "./su cannot execute - Permission denied". Obviously from there I can't link /mnt to /storage and I can't run pwn because it looks for the /storage folder.
If you have any suggestions how to get ./su running, let me know.
rykin said:
I gave this a try earlier today. I scoured through the forum to find that the new Ubuntu doesn't install ADB drivers by default, so you need to do this manually.
Anyway, I attempted to do it and got all the way to ./su. It then prompted me with the message "./su cannot execute - Permission denied". Obviously from there I can't link /mnt to /storage and I can't run pwn because it looks for the /storage folder.
If you have any suggestions how to get ./su running, let me know.
Click to expand...
Click to collapse
This method works but not all intructions are here.
First, you need to change permissions of su:
chown root:root su
chmod 6755 su
then run adb shell and remount / filesystem ro rw:
mount -o rw,remount /
now you can create symbolic link and run the exploit.
You can also perform rooting manually (without creating symlink and running pwn):
remount /system partition to rw: mount -o rw,remount /system
and copy su to /system/xbin, make sure that it has correct permissions (rwsr-sr-x) and that's it.
Now you can remount partitions back to ro.
Install supersu or superuser (whatever makes you happy, just check if it works correctly, superuser didn't work for me, it didn't prompt about root permission for any app, it just gave it, no matter how configured it was), Then install busybox, if you need one.
And you're done.
YES! Glad I waited!
Sent from my XT897 using xda premium
ujoty said:
This method works but not all intructions are here.
First, you need to change permissions of su:
chown root:root su
chmod 6755 su
then run adb shell and remount / filesystem ro rw:
mount -o rw,remount /
now you can create symbolic link and run the exploit.
You can also perform rooting manually (without creating symlink and running pwn):
remount /system partition to rw: mount -o rw,remount /system
and copy su to /system/xbin, make sure that it has correct permissions (rwsr-sr-x) and that's it.
Now you can remount partitions back to ro.
Install supersu or superuser (whatever makes you happy, just check if it works correctly, superuser didn't work for me, it didn't prompt about root permission for any app, it just gave it, no matter how configured it was), Then install busybox, if you need one.
And you're done.
Click to expand...
Click to collapse
Thank you. I just tried this and it worked. Confirmed with Root Checker. :>
micron said:
This is a work metod for root your not unlocked phone !
I find a solution after update to last new version
Download this : http://forum.xda-developers.com/showthread.php?t=2143437
After download and share fail with samba windows or mac sharing, you need to mount from file manage > remote storage
After fix permission go to adb folder and type :
"adb shell"
"cd /mnt/rfs0"
"./su"
"cd /"
"ln -s /mnt /storage"
Next step go to console and type :
adb kill-server
adb shell /storage/rfs0/pwn
Next : Install apk package from phone , Reboot Phone and now your phone is rooted!
Update from Play Market SuperSu and go.
Best regards,
m.
Click to expand...
Click to collapse
Thanks, I think this is exactly what I am looking for per this thread. Unfortunately, I don't quite have the knowledge (yet) to completely understand what you mean. I've rooted several phones, but never had to use ADB before so am unfamiliar with it. Also, what do you mean by this: "After download and share fail with samba windows..."?
cscotti said:
Thanks, I think this is exactly what I am looking for per this thread. Unfortunately, I don't quite have the knowledge (yet) to completely understand what you mean. I've rooted several phones, but never had to use ADB before so am unfamiliar with it. Also, what do you mean by this: "After download and share fail with samba windows..."?
Click to expand...
Click to collapse
By reading this link you will know hot to setup samba installation on a UBUNTU live cd. After doing that on your phone you should go to your FILE MANAGER --> remote storage and add the samba share to your phone. On the UBUNTU live cd, on your samba folder you should do this:
Code:
cd /path/to/share
wget http://vulnfactory.org/public/motoshare.tgz
tar xvf motoshare.tgz
sudo chown root:root pwn
sudo chmod 6755 pwn
After that you should put your phone in USB debugging mode and connect it to your PC. On your PC your should download the platform-tools folder of the Android SDK. The platform-tools folder contains adb (MAC) adb.exe (Windows) file. After you have adb, on your WIndows/MAC PC you should type:
Code:
./adb shell
cd /mnt/rfs0
./su
mount -o rw,remount /
cd /
ln -s /mnt /storage
exit (to exit the ADB shell)
adb kill-server
adb shell /storage/rfs0/pwn
Next you should copy eu.chainfire.supersu.apk on your phone storage and install it with file manager.
Reboot your device! Congratulations, your phone is rooted
desyncron said:
By reading this link you will know hot to setup samba installation on a UBUNTU live cd. After doing that on your phone you should go to your FILE MANAGER --> remote storage and add the samba share to your phone. On the UBUNTU live cd, on your samba folder you should do this:
Code:
cd /path/to/share
wget http://vulnfactory.org/public/motoshare.tgz
tar xvf motoshare.tgz
sudo chown root:root pwn
sudo chmod 6755 pwn
After that you should put your phone in USB debugging mode and connect it to your PC. On your PC your should download the platform-tools folder of the Android SDK. The platform-tools folder contains adb (MAC) adb.exe (Windows) file. After you have adb, on your WIndows/MAC PC you should type:
Code:
./adb shell
cd /mnt/rfs0
./su
mount -o rw,remount /
cd /
ln -s /mnt /storage
exit (to exit the ADB shell)
adb kill-server
adb shell /storage/rfs0/pwn
Next you should copy eu.chainfire.supersu.apk on your phone storage and install it with file manager.
Reboot your device! Congratulations, your phone is rooted
Click to expand...
Click to collapse
Wow, thanks for this. I was considering trying to condense down the instructions myself before I did this, but you beat me to it, and did a better job than I would have, considering I'm a novice at this stuff.
So your method uses a linux boot for samba, but then the rest is done on windows. Question: could you do the adb stuff on Linux? Seemed like some of the posts in the atrix threads were doing it that way, and I was just curious. I have mint 14-64 bit on a couple of my machines, as well windows, and was thinking this would be an opportunity to learn it a little better.
Sent from my XT897 using xda premium
Hello,
and what if I have unlocked bootloader? Is there any other way to root this phone?
desyncron said:
By reading this link you will know hot to setup samba installation on a UBUNTU live cd. After doing that on your phone you should go to your FILE MANAGER --> remote storage and add the samba share to your phone. On the UBUNTU live cd, on your samba folder you should do this:
Code:
cd /path/to/share
wget http://vulnfactory.org/public/motoshare.tgz
tar xvf motoshare.tgz
sudo chown root:root pwn
sudo chmod 6755 pwn
After that you should put your phone in USB debugging mode and connect it to your PC. On your PC your should download the platform-tools folder of the Android SDK. The platform-tools folder contains adb (MAC) adb.exe (Windows) file. After you have adb, on your WIndows/MAC PC you should type:
Code:
./adb shell
cd /mnt/rfs0
./su
mount -o rw,remount /
cd /
ln -s /mnt /storage
exit (to exit the ADB shell)
adb kill-server
adb shell /storage/rfs0/pwn
Next you should copy eu.chainfire.supersu.apk on your phone storage and install it with file manager.
Reboot your device! Congratulations, your phone is rooted
Click to expand...
Click to collapse
well that sounds a bit intimidating but thanks for spelling it out. I'll try to work up the nerve and make some time to give this a try.
Just curious, but why can't this be compressed into a one click batch file like before?
vangelm said:
Hello,
and what if I have unlocked bootloader? Is there any other way to root this phone?
Click to expand...
Click to collapse
If your bootloader is unlocked, you can easily root. You don't need any exploits etc.
Install TWRP, it will automatically root the device. Or, install CWM and then install SuperSU afterwards, which will root the device.
arrrghhh said:
If your bootloader is unlocked, you can easily root. You don't need any exploits etc.
Install TWRP, it will automatically root the device. Or, install CWM and then install SuperSU afterwards, which will root the device.
Click to expand...
Click to collapse
It works, thank you, have a nice day.
vangelm said:
It works, thank you, have a nice day.
Click to expand...
Click to collapse
Can you share what you did? Instructions seem to say that I need to install GooManager? The summary of GooManager says I need root to use it. TIA.
micron said:
This is a work metod for root your not unlocked phone !
I find a solution after update to last new version
Download this : http://forum.xda-developers.com/showthread.php?t=2143437
After download and share fail with samba windows or mac sharing, you need to mount from file manage > remote storage
After fix permission go to adb folder and type :
"adb shell"
"cd /mnt/rfs0"
"./su"
"cd /"
"ln -s /mnt /storage"
Next step go to console and type :
adb kill-server
adb shell /storage/rfs0/pwn
Next : Install apk package from phone , Reboot Phone and now your phone is rooted!
Update from Play Market SuperSu and go.
Best regards,
m.
Click to expand...
Click to collapse
**** I wish I saw this before i went to Motorola for my warranty voiding unlock code
---------- Post added at 05:01 PM ---------- Previous post was at 04:50 PM ----------
arrrghhh said:
If your bootloader is unlocked, you can easily root. You don't need any exploits etc.
Install TWRP, it will automatically root the device. Or, install CWM and then install SuperSU afterwards, which will root the device.
Click to expand...
Click to collapse
I like TWRP but CWM in my opinion is better (more supported).
amateurhack said:
Question: could you do the adb stuff on Linux? Seemed like some of the posts in the atrix threads were doing it that way, and I was just curious. I have mint 14-64 bit on a couple of my machines, as well windows, and was thinking this would be an opportunity to learn it a little better.
Sent from my XT897 using xda premium
Click to expand...
Click to collapse
Yes. This can be done in Linux. I did it entirely with a LIVE USB. However, adb might not be installed by default (on mine it was not). To install it, do the following:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install android-tools-adb android-tools-fastboot
Click to expand...
Click to collapse
This will prevent you from running into errors when you start typing: adb shell
swintec said:
Can you share what you did? Instructions seem to say that I need to install GooManager? The summary of GooManager says I need root to use it. TIA.
Click to expand...
Click to collapse
Either use GooManager or the fastboot flash method. I think you do need to be rooted in order for GooManager to get the permissions it requires to flash recovery... So in that case, the only way initially to flash might be fastboot flash... Sorry.
alexwoellhaf said:
I like TWRP but CWM in my opinion is better (more supported).
Click to expand...
Click to collapse
Not even sure what this means. Any zip you can flash with CWM, you should be able to flash with TWRP. No?
They're both recoveries. One is touch-based, one isn't.
Having trouble with abd
Im running Ubuntu 12.04 full install (not live CD)
When I connect my phone, dmesg see the new device, and so does lsusb
dmesg
Code:
[ 290.617377] usb 2-1: USB disconnect, device number 2
[ 295.476023] usb 2-1: new high-speed USB device number 4 using ehci_hcd
[ 295.611624] scsi9 : usb-storage 2-1:1.0
[ 296.610626] scsi 9:0:0:0: Direct-Access motorola XT897 0001 PQ: 0 ANSI: 2
[ 296.611152] sd 9:0:0:0: Attached scsi generic sg3 type 0
[ 296.613548] sd 9:0:0:0: [sdc] Attached SCSI removable disk
lsusb:
Code:
Bus 002 Device 004: ID 22b8:2e36 Motorola PCS
However no matter what, when I run "adb devices", the phone does not show up.
51-android.rules
Code:
SUBSYSTEM=="usb", ATTRS{idVendor}=="22b8", MODE="0666"
This is what I get with adb
Code:
[email protected]:/tmp/share# adb devices
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
List of devices attached
[email protected]:/tmp/share#
What else can I do???
desyncron said:
By reading this link you will know hot to setup samba installation on a UBUNTU live cd. After doing that on your phone you should go to your FILE MANAGER --> remote storage and add the samba share to your phone. On the UBUNTU live cd, on your samba folder you should do this:
Code:
cd /path/to/share
wget http://vulnfactory.org/public/motoshare.tgz
tar xvf motoshare.tgz
sudo chown root:root pwn
sudo chmod 6755 pwn
After that you should put your phone in USB debugging mode and connect it to your PC. On your PC your should download the platform-tools folder of the Android SDK. The platform-tools folder contains adb (MAC) adb.exe (Windows) file. After you have adb, on your WIndows/MAC PC you should type:
Code:
./adb shell
cd /mnt/rfs0
./su
mount -o rw,remount /
cd /
ln -s /mnt /storage
exit (to exit the ADB shell)
adb kill-server
adb shell /storage/rfs0/pwn
Next you should copy eu.chainfire.supersu.apk on your phone storage and install it with file manager.
Reboot your device! Congratulations, your phone is rooted
Click to expand...
Click to collapse
I am trying to run through these steps. For starters, when I enter the 'adp shell' I do not have a /mnt/rfs0 directory. The shared samba directory actually mounts at /storage/rfs0. No biggie. I go to that directory to run ./su. The su command runs, and I can see a pop up notification on my phone indicating the adb shell has been granted admin rights. The problem is that the ./su command never returns. As a matter of fact, if I just left it sit there, I get the admin rights pop up notification on my phone about once per minute so it seems like the su command is in some loop.
At this point I am stuck. I cant remount my file system as read/write without SU. I can run the ./su command in a different process, either in another adb shell or with the ./su& command but that does me no good as I cant execute any root commands in that same process.
Is there something that needs to change with the su command for the newer version my phone is running? I am running 9.8.2Q-122_XT897_FFW-5.
Thanks.
Use 'motochopper', search for it on xda then root is just one click away
Sent from my XT897 using xda app-developers app

Help on pushing files to device (ADB)

Hello guys, experiencing another problem now :silly:
Have search all around, couldn't find any valid answers so I decided to ask myself.
So I was just making a rom, which I have already installed. It's based on Cataclysm (personal use only - Till I ask for perm).
I have installed the rom, then I decided to theme some system files. And so I did. I theme the "Settings.apk" for now, and decided to push it to my device instead of installing the whole rom over again. Now mind you when I made roms and modified system apps, pushing these files to the device was straight forward. However on this Hammerhead, I've been running into some issues.
When pushing the file to my device like this
Code:
adb push Settings.apk system/priv-app
.
I get an error that says -
Code:
failed to copy "Settings.apk" to "system/priv-app/Settings.apk" : Read only file system.
So I then decided to try the following -
Code:
[x] adb root - Permission Denied
[x] adb remount - Permission Denied
So then I decided to use some shell commands to set the system as rw, I did the following.
Code:
[x] adb shell
[x] $ su - gave it permission
[x] $ mount -o rw,remount /system - It mounts it.
I then restarted cmd with root permission.
Code:
adb root"
- it restarted however, this time it stated.
Code:
Device not found.
I probably did the wrong thing above, so how exactly can I push files to /system?
SOLVED
Thanks to everyone that answered my question in detail.
The easiest way I know to push files to /system through adb is using a custom recovery . Try with it.
Why not use usb or AirDroid to transfer files?
gee2012 said:
Why not use usb or AirDroid to transfer files?
Click to expand...
Click to collapse
Is it possible to push files to /sustem/priv-app with it?
varuntis1993 said:
The easiest way I know to push files to /system is using a custom recovery . Try with it.
Click to expand...
Click to collapse
How would I do so? I've ever only used recovery to flash. And that was it, thanks if you can guide me through it?
Sent from this toast making Nexus 5, you wish your Nexus could make toast don't you? (;
krishneelg3 said:
Is it possible to push files to /sustem/priv-app with it?
How would I do so? I've ever only used recovery to flash. And that was it, thanks if you can guide me through it?
Sent from this toast making Nexus 5, you wish your Nexus could make toast don't you? (;
Click to expand...
Click to collapse
Boot into recovery and connect the usb cable. Open a cmd prompt.
Code:
adb shell
mount /system
exit
adb push c:\users\krishneelg3\desktopmyfile /system/priv-app
You can also use the "mount system" option in recovery and skip the first 2 commands above.
krishneelg3 said:
How would I do so? I've ever only used recovery to flash. And that was it, thanks if you can guide me through it?
Sent from this toast making Nexus 5, you wish your Nexus could make toast don't you? (;
Click to expand...
Click to collapse
Open recovery, mount system partition and connect it to pc and then normal procedure.
It will be running as adbd to no need to type adb root. Hope this helps
rootSU said:
Boot into recovery and connect the usb cable. Open a cmd prompt.
Code:
adb shell
mount /system
exit
adb push c:\users\krishneelg3\desktopmyfile /system/priv-app
You can also use the "mount system" option in recovery and skip the first 2 commands above.
Click to expand...
Click to collapse
Thank you so much! Greatly appreciated.
Sent from this toast making Nexus 5, you wish your Nexus could make toast don't you? (;
You can still do it through Android, but it's more difficult because adb root doesn't always work (requires kernel) and you have to mount r/w which is just a pain. I always adb push in recovery.
However, here is an example of a successful attempt to adb push on my nexus 5.
Code:
C:\Users\rootsu\Desktop\tools>adb root
adbd is already running as root
C:\Users\rootsu\Desktop\tools>adb shell
[email protected]:/ # mount -o remount,rw /system
mount -o remount,rw /system
[email protected]:/ # exit
exit
C:\Users\rootsu\Desktop\tools>adb push [B][COLOR="Red"]test.txt[/COLOR][/B] /system/
C:\Users\rootsu\Desktop\tools>adb shell
[email protected]:/ # cd system
cd system
[email protected]:/system # ls
ls
addon.d
app
bin
build.prop
core
etc
fonts
framework
lib
lost+found
media
priv-app
[B][COLOR="red"]test.txt[/COLOR][/B]
tts
usr
vendor
xbin
[email protected]:/system #
rootSU said:
You can still do it through Android, but it's more difficult because adb root doesn't always work (requires kernel) and you have to mount r/w which is just a pain. I always adb push in recovery.
However, here is an example of a successful attempt to adb push on my nexus 5.
Code:
C:\Users\rootsu\Desktop\tools>adb root
adbd is already running as root
C:\Users\rootsu\Desktop\tools>adb shell
[email protected]:/ # mount -o remount,rw /system
mount -o remount,rw /system
[email protected]:/ # exit
exit
C:\Users\rootsu\Desktop\tools>adb push [B][COLOR="Red"]test.txt[/COLOR][/B] /system/
C:\Users\rootsu\Desktop\tools>adb shell
[email protected]:/ # cd system
cd system
[email protected]:/system # ls
ls
addon.d
app
bin
build.prop
core
etc
fonts
framework
lib
lost+found
media
priv-app
[B][COLOR="red"]test.txt[/COLOR][/B]
tts
usr
vendor
xbin
[email protected]:/system #
Click to expand...
Click to collapse
Thank you I will keep my eye on this and see if the process is similar. Thanks for the info.
Sent from this toast making Nexus 5, you wish your Nexus could make toast don't you? (;

Categories

Resources