yashsingh1/xdaforums huggingface dataset:
[Samsung Galaxy Nexus] adampdx:
Perfect. I just struggled through unlocking my bootloader and rooting manually. Oh, well. Live and learn, right?
[Samsung Galaxy Nexus] skyleth:
works perfect!
[Samsung Galaxy Nexus] skyleth:
and now, the question is, how to unroot??
[Samsung Galaxy Nexus] efrant:
All you have to do is remove the two files.

With your device plugged into your computer, open a command prompt in the directory with your ADB.exe file and type the following commands:

adb shell

su

mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system

rm /system/app/Superuser.apk

rm /system/bin/su

mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system

That should work. But why would you want to??
[Samsung Galaxy Nexus] rudolphe:
What's the point of this? Can't you just unlock, root, re-lock? It's not like it's a complicated process.
[Samsung Galaxy Nexus] efrant:
The point is that you lose all your data if you unlock your bootloader. With this, you can root, do a nandroid back-up (or use Titanium Back-up to back up your data/apps), then unlock your bootloader, flash the back-up, and le voila, nothing lost.

EDIT: For GN users, it is primarily for those who did not unlock, and have a lot of data they want to keep and can't back up.
[Samsung Galaxy Nexus] zero0n3:
<out of topic for a moment>

yes but i think ICS is mature enough to give us a backup experience like iphone with itunes...

i love the hacking/modding stuff but now i would like to use secure system to backup all apps without hacking my device....

<in topic again>
[Samsung Galaxy Nexus] efrant:
That's what an iphone is for... :D
[Samsung Galaxy Nexus] zero0n3:
ehehehe but unfortunately i was writing on another thread...i thought i was on that thread...and unbelievable...the sentence "what is this point?" coincide perfectly with my sentence on the other one...uahahahaha wonderful :D maybe is better for me to take a break and go out :P
[Samsung Galaxy Nexus] Sleuth255:
Nicely done on this thread! I'd sticky it but I'm retired. Great way to get root to set up for unlocking the bootloader w/o losing anything.
[Samsung Galaxy Nexus] wouwout:
what a wonderful solution, thanks. Just got root in a few minutes.
[Samsung Galaxy Nexus] brunnen153:
That's great, now I can do Backups with Titanium.

But one question: Is rooting with unlocked bootloader, etc. "better" than this? (Aside from Custom ROMs)
[Samsung Galaxy Nexus] efrant:
Rooting is rooting, and it makes no difference how you get there. However, unlocking your bootloader brings other benefits, not related to rooting, e.g., being able to use fastboot commands...

And what do you mean by "aside from custom ROMs"? If you have root, you should still be able to flash custom ROMs even if your bootloader is locked...
[Samsung Galaxy Nexus] brunnen153:
Wow, didn't knew that. :)

As you can see I'm new to Android, and I don't know much about it.

However, now that I can use Titanium Backup, I don't think that I need an unlocked bootloader.
[Samsung Galaxy Nexus] hotleadsingerguy:
Or you could do a full backup through ADB/Fastboot, unlock+root, then full restore again through ADB/Fastboot. Don't need root/unlock access to do an ADB backup, and it's virtually the same as a NANDROID. Just have to save texts and after restore put the icons back on the homescreens. Other than that it's a full backup.
[Samsung Galaxy Nexus] efrant:
I would unlock anyway. It doesn't hurt anything, and it could save you hassles later down the line...

1) You can't use fasboot commands with a locked bootloader.

2) The ADB backup that you refer to is not very reliable. In other words, you may lose some data from some apps. Don't take my word for it: look at the thread -- there are so many people complaining that it doesn't back up everything.

3) I would not say that ADB backup is "virtually the same" as a nandroid backup. I would say that it is not at all the same as an nandroid backup, but that's just me.
[Samsung Galaxy Nexus] FrankNS:
Works great! Thanks bro!
[Samsung Galaxy Nexus] Sleuth255:
You also can't flash kernels without an unlocked bootloader.
[Samsung Galaxy Nexus] efrant:
Are you sure about that? You could on the Nexus One, even with a locked bootloader (assuming of course that you had root).
[Samsung Galaxy Nexus] Sleuth255:
I haven't verified, just assumed since this is generally the case.
[Samsung Galaxy Nexus] adrynalyne:
Sure you can. Even in its most-locked form, this isn't a Moto device.

You could use flash_image designed for this phone, or use clockwork.

99.1% sure.
[Samsung Galaxy Nexus] efrant:
Exactly.

I'm pretty sure dd would work as well.
[Samsung Galaxy Nexus] Sleuth255:
live and learn! My apologies; I stand corrected. So what can't you do with a locked bootloader?
[Samsung Galaxy Nexus] efrant:
You can't flash images using fastboot and you can't boot kernels using fastboot.

Edit: I'll add a caveat to what adrenalyne and I said: if your bootloader is locked AND your device has a NAND lock, then you cannot flash kernels or custom ROMs (as is the case with many Motorola devices) but it is not the case with our device, thankfully!
[Samsung Galaxy Nexus] bradblick:
I'm struggling here. I'm familiar with ADB and all, have rooted and unlocked many an android device.

However, it would appear to me that after pushing the files to /data/local/tmp, assigning mempodroid 777 permissions, and running the exploit successfully... I am unable to then mount /system.

I run mount -0 remount,rw -t ext4 /dev/block/mmcblk0p1 /system

and get "mount: Operation not permitted" as a result

(I'm attempting this on an unlocked, not rooted, gnex running 4.0.4)
[Samsung Galaxy Nexus] efrant:
Two things:

1) If your bootloader is unlocked, why are you even doing this? It's much easier just to flash CWM and then flash su.zip.

2) The mount command is not working for you because you put a zero where there should be an o. It is mount -o not mount -0
[Samsung Galaxy Nexus] bradblick:
I appreciate the quick reply!

I am attempting this so that I may perform a Titanium backup prior to flashing some different ROMs... I hate downloading and setting everything back up all over again!

I believe I used a -o, I'm going to try again and feel really really smart if I have been just typing a 0 out of haste!

---------- Post added at 07:02 AM ---------- Previous post was at 06:58 AM ----------

Typed it correctly and still not allowed!

shell@android:/ $ chmod 777 /data/local/tmp/mempodroid

127|shell@android:/ $ ./data/local/tmp/mempodroid 0xd7f4 0xad4b sh

1|shell@android:/ $ mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system

mount: Operation not permitted

Got me beat.

---------- Post added at 07:09 AM ---------- Previous post was at 07:02 AM ----------

I've no idea why I completely over thought this whole process.

Flashing su.zip is so much easier!

Although, I am still curious as to why I'm not capable of completing this exploit method...

Either way - Thanks for the tips.
[Samsung Galaxy Nexus] efrant:
Looks like the exploit is not working for you for some reason. That's why you can't mount. Once you run the exploit, you should end up with a # prompt, not a $ prompt (either in the current shell or another one if it opens), otherwise nothing in the instructions following that will work.

Out of curiosity, what is your kernel version?
[Samsung Galaxy Nexus] bradblick:
Yea, I'm not sure exactly what the problem was.... but I just went the flash cwm\su angle - I'm really liking the touch recovery.

As far as kernel, I was only running the stock kernel - never messed with it. All I had done was unlock the boot loader in order to flash the newest leaked verizon 4.0.4, hoping with all of my might that it'd fix the LTE radio problems.
[Samsung Galaxy Nexus] syspanic:
I did all the steps but how do I know if my device is rooted?

I opened the Terminal Emulator and type'd "su" and it's says "Permission denied".
[Samsung Galaxy Nexus] efrant:
Then you are not rooted. Something must have gone wrong.
[Samsung Galaxy Nexus] efrant:
I was asking, because it may have been patched in 3.0.18 and higher, so if your running that, then it may not work.

I'm not sure if there was a kernel included in the 4.0.4 update.
[Samsung Galaxy Nexus] bradblick:
It would appear as though they patched over that exploit. It seems 4.0.4 installs with kernel 3.0.8.
[Samsung Galaxy Nexus] efrant:
It still runs in the 3.0.8 version of the kernel, as I have just tried it on my device. But it may require you to be on ICS 4.0.2.
[Samsung Galaxy Nexus] lionsson:
Thank this worked for me.

Galaxy Nexus GSM

Android 4.0.2

Built Number ICL53F
[Samsung Galaxy Nexus] salem_christ:
this worked for me, 4.0.2. Thanks to the original poster. :)

however, just as a tip, might want to mention in the instructions at what point the $ turns to a #. It completely freaked me out and I thought I'd stuffed something.

also, how to get back out of the terminal 'safely'. I don't know if it's ok to just close it, but I typed 'exit' a few times until I was out of all the layers just in case...
[Samsung Galaxy Nexus] efrant:
Edited the first post with you suggestions.
[Samsung Galaxy Nexus] jassired:
Any idea how to save this root before moving to 4.04 via OTA?

Does OTA root keeper work for Galaxy Nexus?
[Samsung Galaxy Nexus] themadcat:
works also here on 4.0.2

Very good and easy instruction, thanks now i can backup my stuff.

The Mad Cat
[Samsung Galaxy Nexus] hmanxx:
thanks have been waiting for this type of root without unlocking exploit..

All my nexus devices (nexus S, Nexus One) are rooted this manner...Well i only used the root for convenient of flashing Official rom earlier than OTA..
[Samsung Galaxy Nexus] efrant:
Although with re-lockable bootloaders on the GN and Nexus S, this in primarily for those who did not unlock initially, and want to do a nandroid backup before unlocking. I don't see the point of leaving your bootloader locked on a device that has a relockable bootloader.
[Samsung Galaxy Nexus] hmanxx:
Yes My Galaxy Nexus is not unlocked, thus this is good for me

My Nexus S has proudly retired and still in rooted without bootloader unlocked form

I hate to backup all my data and always avoid unlocking bootloader..I dont used custom ROM on my day to day phone (Galaxy Nexus)..thus simple rooting is enough for me for the added flexibility of using CWM to flash early Official ROM .

I may be forced to do so on migrating to yakyu Official ROM ..those Samsung Variant is just killing me to wait for OTA update, manual update still required bootloader unlocking ..that is ridiculous ,now i can put in CWM to do manual Official ROM update..
[Samsung Galaxy Nexus] efrant:
Just out of curiosity, why do you always avoid unlocking the bootloader? Given that it is re-lockable, one should unlock it when first taking it out of the box. This allows you full access to fastboot commands, and makes life much easier. (You can always re-lock it later if you want to return it.)
[Samsung Galaxy Nexus] hmanxx:
I am not living in a country that has absolute consumer right..Warranty reject/excuse to void warrant is common. Well..warranty could be voided on non related problem like button spoilt but rejected claim with excuse of bootloader unlock , Yes you can relock it..but just worry :(

Well,not everyone will unlock the phone on initial purchase..overtime backup data will be too painful to carry out..
[Samsung Galaxy Nexus] mista1982:
Thank you!

4.0.2 with root and my data and settings (5 months!) are still there!!:eek:

Greetings from Germany!!!:D

Will this work after i Install the OTA from 4.0.4?
[Samsung Galaxy Nexus] trillbo:
Thanks for this info, just used it to manually update to 4.0.4.

However, I tried doing it again after updating (as you lose root) but it didn't work.
[Samsung Galaxy Nexus] efrant:
Thanks for the info. They must have patched the hole with the update to 4.0.4. I'll make a note of it in the first post, and look into it.
[Samsung Galaxy Nexus] JoopNL:
Same issue here, doesn't work anymore after 4.0.4 update.
[Samsung Galaxy Nexus] efrant:
Thanks guys. First post updated.

Looks like we need a new exploit for 4.0.4 and above.
[Samsung Galaxy Nexus] Moleculor:
Is it possible that the 4.0.4 update just needs a new set of hex addresses or whatever those are that memopdroid takes as flags?
[Samsung Galaxy Nexus] efrant:
No. It looks like the hole was patched.
[Samsung Galaxy Nexus] jassired:
Answering my own question asked in this thread.

OTARootKeeper works to save the root after update to 4.04

-Root 4.0.2 using this method

-Save root using OTARootKeeper from Market

-Update to 4.0.4 in any way

-Restore root using OTARootkeeper.

It works.....
[Samsung Galaxy Nexus] Guto ViP:
This is True!?
[Samsung Galaxy Nexus] efrant:
It should work in most cases, yet.
[Samsung Galaxy Nexus] Guto ViP:
I will try tomorrow! :)
[Samsung Galaxy Nexus] DaRKoP:
I forget to protect root with OTA rootkeeper :(

Waiting for a new update of this exploit to root my 4.0.4 :)

Do you know another method to root the phone without unlock bootloader? I don't want lost all my settings!

Thanks!
[Samsung Galaxy Nexus] efrant:
No other method available at the moment.
[Samsung Galaxy Nexus] K.D.M.:
it worked :-)
[Samsung Galaxy Nexus] Leesire:
Will you be so kind and tell us what you are talking about..please?
[Samsung Galaxy Nexus] black_ninja:
After step 6 I get:

/data/local/temp/memdroid[1]: /acct: cannot execute - Is a directory

/data/local/temp/memdroid[2]: syntax error: '<' unexpected

what did I do wrong?
[Samsung Galaxy Nexus] efrant:
Did you put it in /data/local/temp or data/local/tmp? Check to make sure that your path is the same for all the commands.
[Samsung Galaxy Nexus] black_ninja:
Sorry I ment /data/local/tmp/

I just copied all the instructions in order to avoid any misspellings
[Samsung Galaxy Nexus] efrant:
You did something wrong though.

As well, you need a period before the first slash as well: ./data/

Start again if it is not working.
[Samsung Galaxy Nexus] black_ninja:
Problem found, I used the uncompiled version of mempodroid :(
[Samsung Galaxy Nexus] efrant:
You didn't use what I included in the attachment in the first post?
[Samsung Galaxy Nexus] black_ninja:
I didn't read that page correctly so I downloaded the .c file instead of the compiled thing. I was just to exited to get it to work :P
[Samsung Galaxy Nexus] Guto ViP:
Thank you Efran and the anothers devs!

Now my phone is update to 4.0.4 without WIPE and with Root (by OTA Rootkeeper)

AMAZING! :D
[Samsung Galaxy Nexus] scoobyjd:
soon as I start typing in the first line in command and hit enter I get error: device not found.

Version: 4.0.2

Kernel 3.0.8

Build #: ICL53F

any help is appreciated
[Samsung Galaxy Nexus] efrant:
That is because you do not have the drivers for your phone set up on your PC...
[Samsung Galaxy Nexus] swedkg:
(wrong thread)
[Samsung Galaxy Nexus] kudoboi:
im confused.. what do i need to do? do i have to enable usb debug? do i need to go into the menu( im talking about the menu where u press volume buttons + on button)? im new to rooting a samsung phone :).. also, if i update to 4.0.4, do i still get to keep my root after update?

and lastly, will i be able to install this (http://xdaforums.com/showthread.php?t=1413582) with a locked bootloader?
[Samsung Galaxy Nexus] efrant:
Yes, USB debugging needs to be enabled. You cannot use ADB otherwise.

No, just boot your device normally.

If you use something like OTA rootkeeper (not sure the exact name of the app) from the market. If not, any update will disable root access.

Yes, you can install that with a locked bootloader. Note, however, if you had that installed in 4.0.2, the 4.0.4 update will not work for you. All the system files need to be stock. So, you would have to put back the original.
[Samsung Galaxy Nexus] Merio90:
Something Wrong?

I followed every step right to the last steps of the "exit" commands. I have the superuser.apk installed on my gnex but for some reason i dont have root access. I tried testing it to see if i had root by downloading "adfree" from the market then i get an error from "adfree" saying "Fatal Error...Unable to get root" in other words i dont have root access. I dont think i did anything wrong i followed every step as written, downloaded the 3 files, i have adb/sdk and drivers setup correctly, currently running 4.0.1 yakju.

Any suggestions? I rebooted but i still dont have root access.
[Samsung Galaxy Nexus] efrant:
What happens when you open the Superuser app?
[Samsung Galaxy Nexus] Merio90:
Nothing it just opens normally.No messages of any kind or anything. It doesnt fc or anything it opens just fine. Why?
[Samsung Galaxy Nexus] efrant:
This is the only suggestion I have:

Connect to your PC and open a command prompt. Type adb shell and then type su. Does your prompt change from $ to #? If not, do the steps again, starting at step #6.
[Samsung Galaxy Nexus] Merio90:
/system/bin/sh: su: cannot execute - Permission denied

That is what i get after: adb shell followed by su

I will try the steps again to see if it works. If not well i will just settle for the OTA if it ever arrives. I've been seeing alot of people complaining that they've bricked their Gnexes over in the Q & A section. I certainly don't want to do that.

But i'll give it one more try though using your method. I'll post back soon.
[Samsung Galaxy Nexus] efrant:
Steps 7 through 12 need to be done by the root user. In other words, your prompt shoud be # not $. You cannot execute those commands with a $ prompt. That it's important that once you finish step 6, you should see #.

P.S. You can't brick your device by doing following my steps.
[Samsung Galaxy Nexus] Merio90:
Oh its working now!

I think i must've missed a step or typoed something. I re did all of the steps but instead of typing the commands i just copied + pasted them :)

Quick question: I am not new to rooting i have been doing this for 2 + years but.

If i decide to go completely stock which i most likely will...Will i still get OTA updates? even if i am rooted.

Can i update to 4.0.4 from 4.0.1? Or should i flash 4.0.2 then 4.0.4?
[Samsung Galaxy Nexus] efrant:
1) Receiving notification of an OTA update and having the update automatically install are two different things.

2) Rooting and having an unlocked bootloader affect neither.

3) Having a custom recovery will affect the automatic installation of an update, but it is easy enough to manually update it with a custom recovery.

EDIT: Most updates are for specific build. In our case, the yakju 4.0.4 update is an update to IMM76D from ICL53F. It will not work coming from an earlier build.
[Samsung Galaxy Nexus] Bassdrop:
Thanks! Worked great, but..

Hey,

This worked perfectly for me, thanks for posting this :)

I'm not quite as familiar with this stuff as most of you are... as a result I ran into a couple of minor hiccups at the beginning that didn't seem to be mentioned in quite enough detail for me in the original post. Basically, these just expand on the two "Notes" mentioned:

(Note: I didn't have time to read through all of the pages of replies in this thread, so my apologies if these have been previously mentioned.)

Install Galaxy Nexus USB drivers

dl.dropbox.com/u/15110285/FYA%20Files/GNexus-root-package-FYA.zip

(Sorry, I'm unable to link because this is my first post - the driver filename inside the .zip is: Samsung_USB_Driver_for_Moblie_Phones_v1_4_6_0.exe)

Enable USB Debugging mode

Go into Settings > Developer Options > Enable USB Debugging (Make sure check box is ticked)

ADB will not connect if you haven't done both of these things first.

Again, sorry if these have already been mentioned. This is my first post, mostly just wanted to give a big thank you, quite happy to be rooted without losing data.
[Samsung Galaxy Nexus] droopanu:
future OTA updates?

Hi!

Thanks to everyone. It worked like a charm. I used it to update to 4.0.4(I was getting tired of checking for updates).

After update, I have lost the root. Not a biggie, as I am happy with an unrooted phone.

My question now is, will I get the future OTA's with the phone in this state?

I mean. My phone is unrooted, but it has su and all the commands I copied onto it to run the exploit. Does this mean that the phone is not 100% stock any more? :)

Cheers
[Samsung Galaxy Nexus] efrant:
I add more detail to the first post. Thanks for the feedback.

Yes, you will still get OTA's. Rooting makes no difference, as the OTA will still see it as stock (as long as you did not delete any system files from your device. Adding files is fine.)
[Samsung Galaxy Nexus] :
Read-only file system?

Hi everyone,

this is my first post here, so sorry in advance if I'm being obtuse about this! I've looked through this entire thread and couldn't see a solution.

Basically, I've been trying to update my yakju stock Nexus from 4.0.2 to 4.0.4 using this method, as I don't wanna lose all my personal data.

I've installed the drivers for my phone, and managed to push the three files across to my Nexus. In fact, I've been fine up until step 8 (Copy su to /system: cat /data/local/tmp/su > /system/bin/su).

An error message is returned saying: cannot create system/bin/su: Read-only file system.

Any ideas as to what's going wrong? The $ did change to # in the prompt.

Thanks a bunch for your help!
[Samsung Galaxy Nexus] efrant:
If it says the file system is read-only, then you did not do step 7 properly. Redo it starting at step 6.
[Samsung Galaxy Nexus] :
Thanks

Hi, yeah, it was my fault.

After going through the steps again carefully everything went fine.

Now to put 4.0.4 on it!

Thanks for replying.
[Samsung Galaxy Nexus] efrant:
Keep in mind that if you update to 4.0.4 you will lose root, unless you use something like OTA Rootkeeper from the market.
[Samsung Galaxy Nexus] ruffneckc:
Does that mean that if you remove and re-install Google Wallet the "Unsupported Device" message should go away?

Thanks in advance.
[Samsung Galaxy Nexus] efrant:
Not sure, as I'm not sure what Wallet checks. If it checks for the su binary, the message will likely still be there. If it checks for root permissions, then the message won't be there.

Keep in mind that if you only want temp root, just do up to (and including) step 6. Once you close the adb shell, root is gone, and there is no trace on your device. The remaining steps are for making root permanent (until you update of course).
[Samsung Galaxy Nexus] ruffneckc:
That makes perfect sense efrant. Thanks so much for the quick reply. I wish I had asked that question and gotten your answer before doing it. I guess I could try. I didn't do that before as I was afraid I might be blocked from re-installing Wallet for some reason but it makes more sense how it all works. Thanks again.
[Samsung Galaxy Nexus] fritter:
Big, big thanks for this!

Might be worth mentioning you need to open the superuser app (at least I had to) once you've finished.

I went through the steps about 3 times before I finally took this step! Once the app is up and running - do what you need to do and you get a superuser access request pop-up you can approve / deny.

Now upgraded to 4.0.4 on the GSM version. (Yup, I'm as impatient as you guys)
[Samsung Galaxy Nexus] efrant:
Done.

10 char.
[Samsung Galaxy Nexus] ruffneckc:
Hey efrant, do you know if the upgrade process to 4.0.4 removes or overwrites the files below on the device?

/system/bin/su

/system/app/Superuser.apk

Thanks for all your help.
[Samsung Galaxy Nexus] efrant:
It doesn't, but it does change the permissions on the su file, so it effectively disables root.
[Samsung Galaxy Nexus] kudoboi:
im still confused

1. when rooting, should the phone be switched off or what?

2. when i plug my phone into the comp with usb debugging, it says an error about a OMAP driver.. is that driver needed?
[Samsung Galaxy Nexus] efrant:
1. Phone needs to be on. How could you possibly do anything with it off?

2. You don't have the drivers installed properly, if even at all. The instructions for where to get the drivers are in the first post.