Help rooting Droid Razr 4.1.2?

jcarlosfox

New Member
Joined
Jan 4, 2013
Messages
10
Reaction score
0
Hmmm....can you go back to my post -

http://www.droidforums.net/forum/dr...rooting-droid-razr-4-1-2-a-6.html#post2360788

and let me know which part was confusing/needs more explanation and I'll try and expand on that....I think the only thing I left out was that you need to make sure your phone is in MTP mode (System Settings -> Storage -> (click on the menu soft key) USB Computer Connection -> then make sure Media device (MTP) is checked off (the rest will be un-checked once you pick MTP)).

OK, well, I have the phone set up exactly as you say.

If I type adb devices at the command prompt, I see a nice long number, and it identifies my device


1) I open an Administrator Command Prompt
2) I navigate to: c:\android\platform-tools
3) I type:

adb shell

4) System says:

shell@cdma_spyder:/ $


5) I type:

su

6) System says:

su: not found

7) I type: -o nw,remount -t yaffs1 /dev/block/system /system
-o nw

8) System says:

mount: Operation not permitted


9) I type:

adb push su /sdcard/


10) System says:

adb push su /sdcard/
error: device offline


11) I type:

cp sdcard.superuser.apk /system/app

14) System says

cp: sdcard.superser.apk: No such file or directory
1|shell@cdma_spyder:/ $

Now, if I exit shell and back to the command prompt, and try the adb commands, I get errors as well:

15) I type:

adb push su /sdcard/


System says:

3791 KB/ (380532 bytes in 0.098s)


11) I type:

adb push superuser.apk /sdcard/
3111 KB/s {1468798 byes in 0.461.s)

SO THAT WORKED!

So, I tried:

adb push superuser.apk /system/bin/bin/

12) System says:

failed to copy 'superuser.apk' to '/system/bin//superuser.apk' : Read-only flle system

I thought it was strange to see two "//" so I tried it again as :

adb push superuser.apk /system/bin/bin

System said:

failed to copy 'superuser.apk' to '/system/bin/superuser.apk' : Read-only flle system



So, the only thing I was able to accomplish following your original instructions, modified, was to push SU and superuser.apk to the sdcard.

Which - I have to say, is more than I have accomplished so far - so, I'm getting somewhere.

Again....please do not let the outline nature of this post imply that I am frustrated, mad, sarcastic, or in any other way not completely thankful that someone has taken the time to read and reply to my post and is willing to give helping me get root. And, as a nOOB, what I will offer back is a STEP BY STEP instruction post - giving due credit to the OP, of what it takes to get root on a Droid Razr Maxx running 4.1.2 Jelly Bean (using the OTA that Verizon/Moto pushed out on Christmas eve.)

Thanks!!
 

Just4sc

New Member
Joined
Jan 12, 2011
Messages
22
Reaction score
0
Location
SoCal
Sorry typo. I meant 4.1.2

There still is no root exploit yet.

Sent from my DROID RAZR using Tapatalk 2

You are correct that there isn't a root exploit but for those of us who had root in ICS and updated to the leaked JB 4.1.2 we were able to retain root and that's what this thread is all about.
 

Just4sc

New Member
Joined
Jan 12, 2011
Messages
22
Reaction score
0
Location
SoCal
OK, well, I have the phone set up exactly as you say.

If I type adb devices at the command prompt, I see a nice long number, and it identifies my device


1) I open an Administrator Command Prompt
2) I navigate to: c:\android\platform-tools
3) I type:

adb shell

4) System says:

shell@cdma_spyder:/ $


5) I type:

su

6) System says:

su: not found

7) I type: -o nw,remount -t yaffs1 /dev/block/system /system
-o nw

8) System says:

mount: Operation not permitted


9) I type:

adb push su /sdcard/


10) System says:

adb push su /sdcard/
error: device offline


11) I type:

cp sdcard.superuser.apk /system/app

14) System says

cp: sdcard.superser.apk: No such file or directory
1|shell@cdma_spyder:/ $

Now, if I exit shell and back to the command prompt, and try the adb commands, I get errors as well:

15) I type:

adb push su /sdcard/


System says:

3791 KB/ (380532 bytes in 0.098s)


11) I type:

adb push superuser.apk /sdcard/
3111 KB/s {1468798 byes in 0.461.s)

SO THAT WORKED!

So, I tried:

adb push superuser.apk /system/bin/bin/

12) System says:

failed to copy 'superuser.apk' to '/system/bin//superuser.apk' : Read-only flle system

I thought it was strange to see two "//" so I tried it again as :

adb push superuser.apk /system/bin/bin

System said:

failed to copy 'superuser.apk' to '/system/bin/superuser.apk' : Read-only flle system



So, the only thing I was able to accomplish following your original instructions, modified, was to push SU and superuser.apk to the sdcard.

Which - I have to say, is more than I have accomplished so far - so, I'm getting somewhere.

Again....please do not let the outline nature of this post imply that I am frustrated, mad, sarcastic, or in any other way not completely thankful that someone has taken the time to read and reply to my post and is willing to give helping me get root. And, as a nOOB, what I will offer back is a STEP BY STEP instruction post - giving due credit to the OP, of what it takes to get root on a Droid Razr Maxx running 4.1.2 Jelly Bean (using the OTA that Verizon/Moto pushed out on Christmas eve.)

Thanks!!

Ok...I think see what the problem is...you either read lilmc1428's post or only read the latter part of my post but left out the top.

First thing you have to do is find out where your su-backup file is in your phone. Mine was in the /system folder. Others found theirs in /system/usr folder and most found it in /system/usr/we-need-root folder. Most that have it in /system/usr/we-need-root folder were able to use Matt's RestoreRoot utility to regain root. But if his utility didn't work for you then you will need to do it manually. So, again, first find where your copy of su-backup is and if you can't then you probably won't be able to regain your root. Assuming that it's in the /system folder (like mine) then you run the following from your Windows Command Prompt (as Administrator): (for all instances of /system/su-backup you'll need to substitute where your copy of su-backup is - IE. if it's in /system/usr/ you'll use /system/usr/su-backup instead)

adb kill-server > nul
adb start-server > nul
ping 1.1.1.1 -n 1 -w 500 > nul
adb wait-for-device devices > nul
adb shell "/system/su-backup -c 'mount -o rw,remount -t ext4 /dev/block/system /system'"
adb shell "/system/su-backup -c 'cp /system/su-backup /system/bin/su'"
adb shell "/system/su-backup -c 'chmod 6755 /system/bin/su'"

If you don't see any errors after running those commands (one at a time) do the following:

adb shell

You will see your device's android prompt:

1|shell@cdma_spyder:/ $ su

if you see just your prompt again then you probably have superuser rights which means that you may be able to regain root. You can continue in the adb shell (android prompt) and type the following one at a time:

su -c 'cp /sdcard/su /system/xbin/su'
su -c 'cp /sdcard/Superuser.apk /system/app/Superuser.apk'
su -c 'chmod 6755 /system/xbin/su'
su -c 'chmod 644 /system/app/Superuser.apk'
su -c 'rm /system/bin/su'
exit
exit
adb reboot

and your phone will reboot (the first exit command gets you out of the su role and the second exit gets you back to the dos prompt).

If rather do the above in the dos prompt instead of the adb shell you'll need to exit (type exit) the android prompt and type the following in your dos prompt:

adb shell "su -c 'cp /sdcard/su /system/xbin/su'"
adb shell "su -c 'cp /sdcard/Superuser.apk /system/app/Superuser.apk'"
adb shell "su -c 'chmod 6755 /system/xbin/su'"
adb shell "su -c 'chmod 644 /system/app/Superuser.apk'"
adb shell "su -c 'rm /system/bin/su'"
adb reboot

After the reboot you should have root. I use Voodoo
OTA to check. It should ask you for Superuser rights. After which in the program you should see check marks for all the items listed. This is how me and quite a few others regain our root. Hope it works for you.
 
Last edited:

jcarlosfox

New Member
Joined
Jan 4, 2013
Messages
10
Reaction score
0
First thing you have to do is find out where your su-backup file is in your phone. Mine was in the /system folder. Others found theirs in /system/usr folder and most found it in /system/usr/we-need-root folder. Most that have it in /system/usr/we-need-root folder were able to use Matt's RestoreRoot utility to regain root. But if his utility didn't work for you then you will need to do it manually. So, again, first find where your copy of su-backup is and if you can't then you probably won't be able to regain your root. Assuming that it's in the /system folder (like mine) then you run the following from your Windows Command Prompt (as Administrator): (for all instances of /system/su-backup you'll need to substitute where your copy of su-backup is - IE. if it's in /system/usr/ you'll use /system/usr/su-backup instead)

Excellent! Now, I'm away from the PC for a while, but some questions come to mind that may help me and others.

1) How do I find my su-backup? Is this a hit and miss process, or is it possible to search directories on the phone?

2) If the only thing keeping people unrooted is the lack of one file on the phone, given the ability to use all of these adb commands and tools, is there not a simple way to copy the needed file where we need it? (That was kind of the point to my long post... I know most users want a one-click, but the older the phone, the less interest in spending the time to develop a one-click root, even though a lot of us are going to keep the Droid Razr for a while longer.)

Anyway THANK YOU for this tutorial. It will certainly help me and many others!
 

Just4sc

New Member
Joined
Jan 12, 2011
Messages
22
Reaction score
0
Location
SoCal
Excellent! Now, I'm away from the PC for a while, but some questions come to mind that may help me and others.

1) How do I find my su-backup? Is this a hit and miss process, or is it possible to search directories on the phone?

2) If the only thing keeping people unrooted is the lack of one file on the phone, given the ability to use all of these adb commands and tools, is there not a simple way to copy the needed file where we need it? (That was kind of the point to my long post... I know most users want a one-click, but the older the phone, the less interest in spending the time to develop a one-click root, even though a lot of us are going to keep the Droid Razr for a while longer.)

Anyway THANK YOU for this tutorial. It will certainly help me and many others!

Well, at the moment the only way is in adb shell. If you are familiar with the Linux commands then you shouldn't have any problems. If not but you are familiar with dos commands then the most important things to remember are:

Android/Linux basic commandEquivalent Dos command
lsdir
cpcopy
cdcd (chdir)
rdrmdir





I think those are the only ones you need in order find the file. You'll need to get to the root of the phone (cd /) then go into folders to find the file. It should be under the system folder hierarchy so here's what you'll need to do:

(assuming you are not in the android system)

adb shell
cd /
cd system
ls su-backup

if it's there then stop and follow my other post. If not then:

cd usr
ls su-backup

if it's there then stop and do the above but for every instance of /system/su-backup you'll use /system/usr/su-backup. If it's not there then you can see if there is a we-need-root folder by doing the following:

cd we-need-root

if you don't get an error message then do:

ls su-backup

if it's listed then do the other command and substitute the new path (/system/usr/we-need-root/su-backup instead of /system/su-backup).

If it's not there then you'll probably need to find it in the other folders under system. There is a find utility in Linux and I assume one exist in Android but since I don't know that one I'll leave it up to the experts to chime in.


Sorry...forgot that you had another question...yes, from what I can gather the only way to retain root is from that one file. The reason why you can't just cut and paste that file is due to the permission associated to that file and the way the android file system works. Because of the rules that the file system follows you can't just copy and paste it from one place to another because of the permissions and how it propagates within the file system. I'm not an expert in this and the way I'm explaining this might not be completely accurate but that's the way I understand it and hopefully someone who has a better understanding can explain it better.

Hope this helps!
 
Last edited:

jcarlosfox

New Member
Joined
Jan 4, 2013
Messages
10
Reaction score
0
I found a strange way to look at the file system, and thus in my case I confirmed I don't have the files I need.

Using the Opera browser, just use this address:

file://localhost/system/

It loads like an FTP site and shows you the contents of the system on the phone. It does not work in Chrome or the stock browser.

Not sure if this helps in any way except to find files, but smarter people than me might see more.

So, the quest is on to find a way to copy the SU and Superuser.apk to my phone's file system.
 

djnolo

Member
Joined
Nov 12, 2011
Messages
50
Reaction score
0
I'm on JB 4.1.2 now with no root :-( Any news on when Motorola will be releasing the official JB 4.1.2 for RAZR again so developers can can come up with RAZR JB 4.1.2 root information?
 

Just4sc

New Member
Joined
Jan 12, 2011
Messages
22
Reaction score
0
Location
SoCal
I found a strange way to look at the file system, and thus in my case I confirmed I don't have the files I need.

Using the Opera browser, just use this address:

file://localhost/system/

It loads like an FTP site and shows you the contents of the system on the phone. It does not work in Chrome or the stock browser.

Not sure if this helps in any way except to find files, but smarter people than me might see more.

So, the quest is on to find a way to copy the SU and Superuser.apk to my phone's file system.

From the tone of your post I take it you have already checked the other directories under system for the file (su-backup). Sorry, I should've stressed that you must have been rooted in ICS and have protected root with voodoo OTA before applying the JB leak. If you did then if I were you I'll do another search for the file.

Also, it's not just copying the two files over that'll give you root. You still need to be able to change the permissions of the files too
 

jcarlosfox

New Member
Joined
Jan 4, 2013
Messages
10
Reaction score
0
From the tone of your post I take it you have already checked the other directories under system for the file (su-backup). Sorry, I should've stressed that you must have been rooted in ICS and have protected root with voodoo OTA before applying the JB leak. If you did then if I were you I'll do another search for the file.

Also, it's not just copying the two files over that'll give you root. You still need to be able to change the permissions of the files too

Yes, you are exactly right on both, to root the phone, I need to figure out how to copy them to the phone system and change permissions.

I was hoping an adb command could accomplish both tasks. But in spite of my familiarity with using DOS commands, and reading up on adb commands, I've been unable to figure out how to do that.

My hope was to simplify the process such that it would be easy to just follow directions and root.

In my case, I got in a hurry to install the OTA system, and simply forgot to root and protect when I flashed back to original ICS. My fault, and now missing my root! Many others are in the same boat, so with luck someone will know how to do what is needed, or someone will put out a batch file to root the Razr Maxx.

Thanks to all who participated in my question, and thanks to Just4sc, for putting the instructions together. I'm sure many will benefit.
 

jcarlosfox

New Member
Joined
Jan 4, 2013
Messages
10
Reaction score
0
So, evidently there was also a leaked 4.1.2 leak for the Droid Razr M, with similar issues of not being able to revert back to ICS. And then, someone figured out how to flash back to ICS.

I wanted to post a link to the discussion, but I'm not allowed yet. So, here are some clues:

http:// www . phonearena . com/news/How-to-restore-your-Motorola-DROID-RAZR-M-back-to-stock-ICS-from-the-JB-leak_id35580

"How to restore your Motorola DROID RAZR M back to stock ICS from the JB leak"

So, with luck either we'll see a root exploit, or a way to revert back to ICS.
 

GoCliffGo05

Super Moderator
Staff member
Premium Member
Joined
Aug 16, 2012
Messages
3,102
Reaction score
520
Location
Maryland
Current Phone Model
Note 7
I imagine its just a matter of time before matt or someone else figures out a way back.

Sent from my DROID RAZR HD using Xparent Cyan Tapatalk 2
 

CamoMike

Member
Joined
Oct 24, 2010
Messages
42
Reaction score
14
I am working on revising something now

I may have a fix - Reserved...
 

CamoMike

Member
Joined
Oct 24, 2010
Messages
42
Reaction score
14
I bricked my phone, got it back (finally) but am charging. I don't care about the money, although I will take it. I am doing this to help others...

I am spent, and not a developer. I tried my best. Hopefully a good man/woman will get root shortly. I have faith in others, not myself at this point...

EDIT - New post on fix after bricking JB - http://www.droidforums.net/forum/dr...ricked-after-reverting-jelly-bean-update.html

Camo
 
Last edited:
Top