[Q] Root gn gsm 4.0.4 - Samsung Galaxy Nexus

Hey guys,
I flashed the 4.0.4 factory image today and was wondering how i can get root access without flashing a custom recovery since i want to stay stock atm.
I already tried the method i usually used (on 4.0.1 & 4.0.2)
Sorry can't post links... it's the normal method with fastboot and adb
and another method where you fastboot cwm recovery and then use adb commands but both didn't work for me
I can't post links so that's what i did there:
Temporarily boot into the Clockwork Mod Reovery using fastboot (on the computer)
fastboot boot cwmt-recovery-5.8.0.2.maguro.img (or whatever version you are using)
Mount /system using Clockwork Mod (on the phone):
mounts and storage -> mount /system
Chmod su using adb to turn on the setuid bit (on the computer)
adb shell chmod 6755 /system/bin/su
adb shell chown root:root /system/bin/su
adb shell ls -l /system/bin/su (permissions should now be -rwsr-xr-x)
Reboot. Super user should be working as expected (and your stock recovery is still intact)
Anyway,
I already spent much time to search on this forum and google so i was wondering if anyone knows any method which i could use.

You can root using this toolkit http://forum.xda-developers.com/showthread.php?t=1392310
Sent from my GNex {GSM} T-Mobile

Mojochief said:
Hey guys,
I flashed the 4.0.4 factory image today and was wondering how i can get root access without flashing a custom recovery since i want to stay stock atm.
I already tried the method i usually used (on 4.0.1 & 4.0.2)
Sorry can't post links... it's the normal method with fastboot and adb
and another method where you fastboot cwm recovery and then use adb commands but both didn't work for me
I can't post links so that's what i did there:
Temporarily boot into the Clockwork Mod Reovery using fastboot (on the computer)
fastboot boot cwmt-recovery-5.8.0.2.maguro.img (or whatever version you are using)
Mount /system using Clockwork Mod (on the phone):
mounts and storage -> mount /system
Chmod su using adb to turn on the setuid bit (on the computer)
adb shell chmod 6755 /system/bin/su
adb shell chown root:root /system/bin/su
adb shell ls -l /system/bin/su (permissions should now be -rwsr-xr-x)
Reboot. Super user should be working as expected (and your stock recovery is still intact)
Anyway,
I already spent much time to search on this forum and google so i was wondering if anyone knows any method which i could use.
Click to expand...
Click to collapse
Download this file to /sdcard, boot CWM like you posted, and then, once in CWM, flash the file you downloaded. Done.
EDIT: All that file does, is copy su and Superuser.apk to your device and set the appropriate permissions.

You can root using this toolkit http://forum.xda-developers.com/show....php?t=1392310
Sent from my GNex {GSM} T-Mobile
Click to expand...
Click to collapse
Thanks I'll try it, but I'm actually not a big fan of one click thingies where you don't know what you're doing.

Download this file to /sdcard, boot CWM like you posted, and then, once in CWM, flash the file you downloaded. Done.
Click to expand...
Click to collapse
Thank you I really prefer that over toolkits!

Mojochief said:
Thank you I really prefer that over toolkits!
Click to expand...
Click to collapse
This is what that file does:
Mounts the system parition
Copies Superuser.apk to /system/app
Copies su to /system/xbin
Sets permission on Superuser.apk to 0644
Sets permission on su to 06755
Sets a symlink for /system/xbin/su to /system/bin/su
Unmounts the system partition.

This is what that file does:
Mounts the system parition
Copies Superuser.apk to /system/app
Copies su to /system/xbin
Sets permission on Superuser.apk to 0644
Sets permission on su to 06755
Sets a symlink for /system/xbin/su to /system/bin/su
Unmounts the system partition.
Click to expand...
Click to collapse
Just tried it and it worked just fine
And thank you for the explanation!
So actually you could do it w/out booting cwm just with fastboot+adb right?

Mojochief said:
[snip]
So actually you could do it w/out booting cwm just with fastboot+adb right?
Click to expand...
Click to collapse
No. You need root access on boot to execute those commands. CWM boots android with root access by default, so this allows you to execute the commands. If you do not use CWM, you can use any other boot image that gives you root access on boot.

No. You need root access on boot to execute those commands. CWM boots android with root access by default, so this allows you to execute the commands. If you do not use CWM, you can use any other boot image that gives you root access on boot.
Click to expand...
Click to collapse
Yeah i meant with another boot image which gives you root access, like the one i used to root the earlier builds.

Mojochief said:
Yeah i meant with another boot image which gives you root access, like the one i used to root the earlier builds.
Click to expand...
Click to collapse
Yes, you can use another insecure boot image, but it needs to be a 4.0.4 compatible kernel. Older ones won't work.
Sent from my Galaxy Nexus using Tapatalk

Related

[CDMA]HTC desire adb root uscc

first time posting to these forums and would like to contribute my findings i was able to gain root on the uscc htc desire in adb using some other guides for the evo 4g unlock. but now i need some help on how to get the modified su in the right place to make this work for the apps. these are the steps i used to gain temporary root.
1) installed android sdk to get adb
2) set up the phone in debug mode
3) downloaded the rageagainstthecage-arm5.bin file(attached)
4) ran this from the sdk folder containing adb.exe
Code:
adb.exe push C:/PATH/TO/FILE/rageagainstthecage-arm5.bin /data/local/tmp
adb.exe shell
cd /data/local/tmp
chown 0755 rageagainstthecage-arm5.bin
./rageagainstthecage-arm5.bin
5) adb shell will exit retype adb.exe shell and now you have root
this is as far as i have got so far now i need to know where to put su which i could not find in /system/xbin
also i am new to the android scene so sorry if this is a bad question, but if i were to flash a recovery image of the gsm desire to my cdma would this work to enter adb in recovery mode or would this brick my phone, i didnt know if the recovery affected that or if that was the rom.
I think you need to put su and Superuser.apk on you sdcard (adb push file /sdcard/)
Then
in your su shell prompt
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
cat /sdcard/Superuser.apk > /system/app/Superuser.apk
cat /sdcard/su > /system/bin/su
chmod 06755 /system/bin/su
Please let us know if this works.
I hope this works out!
Sent from my USCC HTC Desire using XDA App
i found out that this command doesnt actually make the system directory writeable
Code:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
and running it a second time causes the device to reboot.
any sugetions to make it writable, im willing to work on this, but like i said i have no experience with android although i am very familiar linux.
You are aware that while booted into Android the /system is not writeable?
You have to boot into recovery mode to do this.
i am now, i tried the method for the incredible but it seems to not run adb on bootup at least after about 15 tries it didn't work, any suggestions? is there a way to flash the recovery without effecting the radio or rom because there isn't any roms for this phone as of yet, or could you point me in the right direction to start my research on how to write a rom? would it be the same as rolling your own linux distro?
also though this to be worth mentioning there seems to be no su file currently on the phone.
i got some time this morning to dig around in the payload-update.zip files for the incredible and was wondering if i could use this to install su because it looks like it doesn't flash anything (atleast looking at the script it looks like it doesn't, i cant say that for the binary file what does that do?) just wondering if there would be any adverse affects by applying this in recovery.
It might be worth talking to AmonRA, or Koush (I believe he works on Clockwork Mod) for a custom recovery. As for installing superuser, you could try the unrevoked team. (unrevoked.com) I wish I knew more in terms of development to help but I hope this leads you in the right direction.
blitz2190 - Here is a link to Superuser.apk and su. Link
I think you need to put su and Superuser.apk on you sdcard (adb push file /sdcard/)
Then
in your su shell prompt
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system
cat /sdcard/Superuser.apk > /system/app/Superuser.apk
cat /sdcard/su > /system/bin/su
chmod 06755 /system/bin/su
I am very interested to know how this works out. If you need anyone else to help test things let me know. I am not a linux buff, but i can follow commands...
CreepingDeath said:
I am very interested to know how this works out. If you need anyone else to help test things let me know. I am not a linux buff, but i can follow commands...
Click to expand...
Click to collapse
Do you have a USCC Desire?
northmendo said:
Do you have a USCC Desire?
Click to expand...
Click to collapse
Yes I do, and I am willing to help out where I can.
CreepingDeath said:
Yes I do, and I am willing to help out where I can.
Click to expand...
Click to collapse
A couple q's fof you.
Do you have a Mac or PC?
Do you have adb installed?
I will help if I can. I have the phone and a Mac and don't have adb installed.
Sent from my USCC HTC Desire using the XDA App
dhh93 said:
I will help if I can. I have the phone and a Mac and don't have that apply.
Sent from my USCC HTC Desire using the XDA App
Click to expand...
Click to collapse
Cool first install adb. Follow these instructions to install it on Mac.
HERE
Ok doing that right now.
dhh93 said:
Ok doing that right now.
Click to expand...
Click to collapse
Great. I would start by trying the the method from the first post give me about 5 mins and I will post them in a mac friendly format.
Ok will wait on that

Boot Animation Help....

Hi All,
Sorry if this is question may sound stupid but I have searched for so long and I couldn't find any solution.
What I want to do is just replace my boot screen for Samsung Galaxy S. I found out that it is not easy. So I rooted my phone using the one click root that I found here which is SuperOneClick.
So once rooted I immediately tried the following:
Code:
C:\sdk\android-sdk-windows\platform-tools>adb remount
I got an exception saying:
Code:
C:\sdk\android-sdk-windows\platform-tools>adb remount
remount failed: No such file or directory
So I tried the following:
Code:
C:\sdk\android-sdk-windows\platform-tools>adb shell
$ su
su
# mount -o remount,rw /dev/block/stl9 /system
mount -o remount,rw /dev/block/stl9 /system
exit
$exit
C:\sdk\android-sdk-windows\platform-tools>adb push bootanimation.zip /system/media/bootanimation.zip
In which I got the following exception:
Code:
C:\sdk\android-sdk-windows\platform-tools>adb push bootanimation.zip /system/media/bootanimation.zip
failed to copy 'bootanimation.zip' to '/system/media/bootanimation.zip': Permiss
ion denied
So I tried searching again and some say that I have to install busybox. So what I did is I installed it in my Samsung Galaxy S which has a SpeedMod kernel and tried again using the command above.
As of the moment I tried it again to no avail. My Usb debugging is turned on so I don't really know the reason why I'm not able to push.
I appreciate any help.
Thank you.
if you used speedmod kernel, theres no need to apply SuperOneClick
because speedmod already has builtin Lagfix and root, options are accessible by booting into the Recovery Menu
How to root
Q: I followed the procedure above but my bootanimation doesn't work?
A: In version K9 and earlier, bootanimation only works if you have root / superuser installed. Install superuser from the Recovery Menu > ULK > Install Superuser. Later versions fix this problem.
Click to expand...
Click to collapse
http://touristinparadise.blogspot.com/2010/11/samsung-galaxy-s-speedmod-kernel-faq.html
specialex said:
if you used speedmod kernel, theres no need to apply SuperOneClick
because speedmod already has builtin Lagfix and root, options are accessible by booting into the Recovery Menu
How to root
http://touristinparadise.blogspot.com/2010/11/samsung-galaxy-s-speedmod-kernel-faq.html
Click to expand...
Click to collapse
I just did your suggestion and installed the latest speedmod but when I do the command that I posted above still gives the same error in Windows, any other suggestion? many thanks.
Just use a file tool and copy it to data/local.
It need to use root.
**Using my own JPU kernel, z4mod, 339MB Ram and ext2 filesystem**

[Q] Problem with ClockworkMod

Hello all,
So, I recently rooted my Epic 4G using the following thread as a guide: http://forum.xda-developers.com/showthread.php?t=770388
The root worked great, but ClockwordMod isn't quite working as planned.
If I boot the phone holding Power+VolDown+Camera it boots into ClockwordMod, but if I use ROM Manager to try and reboot into ClockworkMod and backup my current ROM, it just takes me to the stock Android recovery screen.
Any ideas as to why this is happening?
Help would be greatly appreciated!
Also, when I download ClockworkMod through ROM Manager, it creates an update.zip on the root of my SD Card, but when I try flashing it, it won't go through.
Also tried manually entering Clockwork and flashing it there, and it went through, but ROM Manager still doesn't work.
You need the recovery redirector. The easiest way to get it is to run the one-click root and recovery or install a rom with the redirector in it.
The other way is to download the one-click zip and unzip it on your sdcard. Copy the files below from the one-click to the same place on your phone.
/system/bin/recovery
/system/bin/recoveryfiles/
/system/bin/recoveryres/
Then type the following commands into a terminal program.
busybox chmod -R 0755 /system/bin/recoveryfiles/*
busybox chmod -R 0755 /system/bin/recoveryres/*
chmod 0755 /system/bin/recovery
sync
DiGi760 said:
You need the recovery redirector. The easiest way to get it is to run the one-click root and recovery or install a rom with the redirector in it.
The other way is to download the one-click zip and unzip it on your sdcard. Copy the files below from the one-click to the same place on your phone.
/system/bin/recovery
/system/bin/recoveryfiles/
/system/bin/recoveryres/
Then type the following commands into a terminal program.
busybox chmod -R 0755 /system/bin/recoveryfiles/*
busybox chmod -R 0755 /system/bin/recoveryres/*
chmod 0755 /system/bin/recovery
sync
Click to expand...
Click to collapse
Followed the second part of what you suggested (manually copying the files, since the one-click script didn't work when I first rooted), and it still boots into the Android recovery.
After rebooting I verified the files were still in /system/bin and they were.
Although, looking at that script, it first checks that the OS version is Froyo.
Is the fact that I'm still on stock (rooted) Eclair the problem?
which one click root program yall talking about ... im stuck here to

Help me how to root Official 4.0.4 IMM76D

I just upgraded my GNex GSM yesterday.
It's now smoother than ever before...
But one thing is I wanna get root access on my GNex
GSM 4.0.4 IMM76D.
Is there any CF-Root or something available now...?
here it comes in 3...2....1........
.4 is unrootable. Would've known if you searched.
--------+++--------
iphone. helping computer illiteracy become popular since 2007.
zeyarwynntun said:
I just upgraded my GNex GSM yesterday.
It's now smoother than ever before...
But one thing is I wanna get root access on my GNex
GSM 4.0.4 IMM76D.
Is there any CF-Root or something available now...?
Click to expand...
Click to collapse
This question sounds more like: I just lost my glassess and I don't know how to read!
http://forum.xda-developers.com/showthread.php?t=1382163
Try a search, You might find one of the 20ish threads that have an answer in it on how to root your Gnex.
---------- Post added at 07:19 PM ---------- Previous post was at 07:18 PM ----------
@rbiter said:
.4 is unrootable. Would've known if you searched.
--------+++--------
iphone. helping computer illiteracy become popular since 2007.
Click to expand...
Click to collapse
10/char
Galaxy Nexus Toolkit v5.6
Oh, yes, I've lost my glasses...
I just have my GNex rooted with Galaxy Nexus Toolkit v5.6
zeyarwynntun said:
Oh, yes, I've lost my glasses...
I just have my GNex rooted with Galaxy Nexus Toolkit v5.6
Click to expand...
Click to collapse
Is it possible to root without using cwm?
I'm not interested in flashing non stock images.
sblantipodi said:
Is it possible to root without using cwm?
I'm not interested in flashing non stock images.
Click to expand...
Click to collapse
No, it is not possible to root IMM76D without using CWM.
That said, you DO NOT have to flash CWM to be able to use it...
EDIT: j.go (who posted below me) is right. You can root by booting an insecure kernel (which by the way is what CWM is), and copying the two files over using ADB (which is essentially what CWM does, but much easier).
efrant said:
No, it is not possible to root IMM76D without using CWM.
That said, you DO NOT have to flash CWM to be able to use it...
Click to expand...
Click to collapse
You can root without CWM. Fastboot boot with unsecure boot image. Adb push su and superuser.apk. Reboot. Congratulations, you are rooted.
j.go said:
You can root without CWM. Fastboot boot with unsecure boot image. Adb push su and superuser.apk. Reboot. Congratulations, you are rooted.
Click to expand...
Click to collapse
I don't understood, can you make a step by step guide please?
I want to root my phone leaving as much as stock items as possible.
How to root ANY build, on a GN with an unlocked bootloader
Note: There is currently no way to root IMM76D (i.e., 4.0.4) without an unlocked bootloader. The following method is for devices with unlocked bootloaders.
Method 1
1) Download CWM from here to your computer: http://forum.xda-developers.com/showthread.php?t=1357642 and rename it cwm.img.
2) Download the attachments from here to your computer: http://forum.xda-developers.com/showpost.php?p=23290676&postcount=1
3) Download this to your /sdcard on your device: http://www.box.com/s/jvcf196j7x8f8vrc9cyt
4) Extract all the files into one directory, and put cwm.img in there
5) Restart your device in fastboot mode and plug into computer
6) Open a command prompt in the directory mentioned above and type: fastboot boot cwm.img
7) Wait for it to boot
8) Navigate the menus. There is an option like "update zip from sdcard". Find the zip that you downloaded, and apply it.
9) Reboot. Done.
Method 2 (more manual)
1) Download CWM from here: http://forum.xda-developers.com/showthread.php?t=1357642 and rename it cwm.img If you are having problems, download the attachment from here and use it instead of CWM.
2) Download the attachments from here: http://forum.xda-developers.com/showpost.php?p=23290676&postcount=1
3) Extract all the files into one directory, and put cwm.img in there
4) Restart your device in fastboot mode and plug into computer
5) Open a command prompt in the directory mentioned above and type: fastboot boot cwm.img
6) Wait for it to boot
7) In the command prompt, type the following:
adb push su /data/local/tmp/su
adb push Superuser.apk /data/local/tmp/Superuser.apk
adb shell
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
cat /data/local/tmp/su > /system/bin/su
cat /data/local/tmp/Superuser.apk > /system/app/Superuser.apk
chmod 06755 /system/bin/su
chmod 0644 /system/app/Superuser.apk
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
exit
8) Done.
Note: if you are having problems mounting /system in CWM, try doing it in CWM itself (on device via the menu), instead of typing in the command.
EDIT: Added title and note.
efrant said:
1) Download CWM from here: http://forum.xda-developers.com/showthread.php?t=1357642 and rename it cwm.img
2) Download the attachments from here: http://forum.xda-developers.com/showpost.php?p=23290676&postcount=1
3) Extract all the files into one directory, and put cwm.img in there
4) Restart your device in fastboot mode and plug into computer
5) Open a command prompt in the directory mentioned above and type: fastboot boot cwm.img
6) Wait for it to boot
7) In the command prompt, type the following:
adb push su /data/local/tmp/su
adb push Superuser.apk /data/local/tmp/Superuser.apk
adb shell
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
cat /data/local/tmp/su > /system/bin/su
cat /data/local/tmp/Superuser.apk > /system/app/Superuser.apk
chmod 06755 /system/bin/su
chmod 0644 /system/app/Superuser.apk
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
exit
8) Done.
Click to expand...
Click to collapse
this will give me the root access on a stock 4.0.4 phone?
in the thread at point 2) is wrote that this does not work on 4.0.4.
sblantipodi said:
this will give me the root access on a stock 4.0.4 phone?
Click to expand...
Click to collapse
Yes.
sblantipodi said:
in the thread at point 2) is wrote that this does not work on 4.0.4.
Click to expand...
Click to collapse
That is why you are not following the directions in that thread. You are following the directions in this thread, right?
efrant said:
Yes.
That is why you are not following the directions in that thread. You are following the directions in this thread, right?
Click to expand...
Click to collapse
lol... great
do you think that this way of rooting will create problem in future OTA notifications?
sblantipodi said:
lol... great
do you think that this way of rooting will create problem in future OTA notifications?
Click to expand...
Click to collapse
No, it will not. Rooting by ANY method does not affect OTAs...
P.S. There is a slightly easier method that I will add to the previous post soon. (I wanted to put in the fully manual method so you can see what is happening.)
Another question, I am an app developer so adb and fastboot are in my default path from the original SDK.
Can I use my ADB and FastBoot from my SDK?
sblantipodi said:
Another question, I am an app developer so adb and fastboot are in my default path from the original SDK.
Can I use my ADB and FastBoot from my SDK?
Click to expand...
Click to collapse
Yes.
10 char
Hey efrant, if I wanted to remove the Superuser.apk and su files already on the device, could I follow Method 2 and fastboot boot cwm.img then do the following in step 7:
adb shell
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
rm /system/bin/su
rm /system/app/Superuser.apk
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
exit
Then once done, disconnect usb cable and reboot the device?
This would essentially leave me with stock recovery, locked bootloader and no root - correct?
ruffneckc said:
Hey efrant, if I wanted to remove the Superuser.apk and su files already on the device, could I follow Method 2 and fastboot boot cwm.img then do the following in step 7:
adb shell
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
rm /system/bin/su
rm /system/app/Superuser.apk
mount -o remount,ro -t ext4 /dev/block/mmcblk0p1 /system
exit
Then once done, disconnect usb cable and reboot the device?
This would essentially leave me with stock recovery, locked bootloader and no root - correct?
Click to expand...
Click to collapse
Is your bootloader locked or unlocked currently? You cannot use fastboot commands if your bootloader is locked.
Assuming that your bootloader is unlocked, your procedure is correct, although you would have to relock you bootloader afterwards by booting into fastboot mode, and typing: fastboot oem lock
However, re-locking is something that I never recommend to anyone.
efrant said:
Is your bootloader locked or unlocked currently? You cannot use fastboot commands if your bootloader is locked.
Assuming that your bootloader is unlocked, your procedure is correct, although you would have to relock you bootloader afterwards by booting into fastboot mode, and typing: fastboot oem lock
However, re-locking is something that I never recommend to anyone.
Click to expand...
Click to collapse
My bootloader is currently locked. Regarding re-locking it, I'm just curious as to why you don't recommend it? Essentially, I want keep the option of getting OTAs and get rid of the "Unsupported Device" message in Google Wallet. I read that the app checks for root by looking for the two files and whether the device release keys are modified.
I really appreciate your help.
i have made a CWM flashable su.
if anyone wants. instead of going through all the mount, and copy process,
you will just need to flash the su from the zip file,
go to play store and install the Superuser.apk and then from that update su to the latest version.
if interested, let me know.

Made a horrebile mistake while changing permissions.

Hi guys, as I wanted to change a permissions in my /system/lib directory, I accidentally disabled the "Execute"-Permission for my /system/lib folder. I know, im stupid as ****. I usually am not that dumb.
Currently, my G3 (855, 32gb) is only booting in recovery. I'm looking for a solution to change the permissions of the /system/lib folder, but it seems impossible.
Thanks for every single advise!
Use adb with recovery booted and then:
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
chmod 644 /system/lib
It should work
oposiasty said:
Use adb with recovery booted and then:
adb shell
mount -o remount,rw -t yaffs2 /dev/block/mtdblock3 /system
chmod 644 /system/lib
It should work
Click to expand...
Click to collapse
Thank you for your answer, but I think I'm not able to configure it via ADB. It isn't recognized in recovery, and when I'm putting it into that ADB Update mode, ADB just says "error: closed"...
RichiN said:
Thank you for your answer, but I think I'm not able to configure it via ADB. It isn't recognized in recovery, and when I'm putting it into that ADB Update mode, ADB just says "error: closed"...
Click to expand...
Click to collapse
wich recovery do you have? TWRP or stock?
KingOfDope said:
wich recovery do you have? TWRP or stock?
Click to expand...
Click to collapse
Thank you too. I had stock recovery installed. I had BusyBox installed and could have changed the permissions via script, but I decided to
flash stock and unlock my bootloader afterwards. Everything went fine, so we can consider this thread as solved.

Categories

Resources