[Q] write protection in android (SOLVED) - One (M7) Q&A, Help & Troubleshooting

hi everyone, i've a totally noobish and technologically dumb question, you know there are partitions in android like /system and /sdcard etc etc, now my question is that is the /system partition write protected on an unrooted phone? can /system files be modified on an unrooted phone? i have an unrooted phone and i can view the system partition via a file manager but i dont know if i can modify it or not. Does rooting the phone remove the write protection? plus, i have s off, can having s off disable the write protection, if there is any on the android /system partition? thanks in advance

muhammad.uzi1994 said:
hi everyone, i've a totally noobish and technologically dumb question, you know there are partitions in android like /system and /sdcard etc etc, now my question is that is the /system partition write protected on an unrooted phone? can /system files be modified on an unrooted phone? i have an unrooted phone and i can view the system partition via a file manager but i dont know if i can modify it or not. Does rooting the phone remove the write protection? plus, i have s off, can having s off disable the write protection, if there is any on the android /system partition? thanks in advance
Click to expand...
Click to collapse
pretty much NO, to all your questions.
what you need to be able to modify /system
1- a kernel with write-protection disabled
2- root access with /system mounted as read/write, you can achieve this in more than one way, two possible methods:
A) don't want to root the ROM?: flash a custom recovery, and use adb shell commands, a recovery file manager (TWRP has one), or Aroma File Manager
or
B) root the ROM

nkk71 said:
pretty much NO, to all your questions.
what you need to be able to modify /system
1- a kernel with write-protection disabled
2- root access with /system mounted as read/write, you can achieve this in more than one way, two possible methods:
A) don't want to root the ROM?: flash a custom recovery, and use adb shell commands, a recovery file manager (TWRP has one), or Aroma File Manager
or
B) root the ROM
Click to expand...
Click to collapse
once again, you summed it up really good, i understand the write protection thing now, so basically it depends on kernel and root access/custom recovery file manager

muhammad.uzi1994 said:
once again, you summed it up really good, i understand the write protection thing now, so basically it depends on kernel and root access/custom recovery file manager
Click to expand...
Click to collapse
yes stock kernel has write-protection enabled, so any changes you do with ROOT, will be gone as soon as you reboot.

nkk71 said:
yes stock kernel has write-protection enabled, so any changes you do with ROOT, will be gone as soon as you reboot.
Click to expand...
Click to collapse
i have stock kernel and i'm unrooted, i guess i cant make changes in /system at all. Well, everyday i learn something new about Android, i'll mark this thread as solved

nkk71 said:
.............
Click to expand...
Click to collapse
You seem to know much about android
1) Can tell me why a message is displayed on top every time I reboot or poweron (on the logo screen) "write protection : kernel".
2) Is it an indication that I have unlocked by bootloader ? While rebooting it stays on that screen for 60-65 sec since I did rooted with Magisk (usually takes 7 secs before doing with Magisk-[message wasnt there at that time] )
3) What does it mean ? It came after I rooted with Magisk....
4) Does it mean I wont be able to go back to stock in the future using odin.
Im using SM-G503FZ. (5.0.2), Grand Prime
---------- Post added at 04:10 PM ---------- Previous post was at 03:12 PM ----------
nkk71 said:
yes stock kernel has write-protection enabled, so any changes you do with ROOT, will be gone as soon as you reboot.
Click to expand...
Click to collapse
Please reply to my above post.

mdmaher said:
Im using SM-G503FZ. (5.0.2), Grand Prime
Click to expand...
Click to collapse
You should ask in your device forum, this is HTC One M7 forum.

Need assistance
I unlocked my asus zenfone max pro m1 , when restarted its stuck in boot logo so I tried to flash a recovery and also a custom rom but it says write protected. I erased system in fastboot mode but unable to do anything other than entering into fastboot mode. can anyone help me to bypass write protection and flash a new rom or recovery to get my phone back in to the working state. Any help would be appreciated. Thank you guys...

Related

[HOWTO] get root back after ota update!

this is how i did it anyways. i had to flash the boot.img and update via stock recovery to get the ota to flash. but then no root!
so heres how i got it back:
download the superboot/paulobrien method (http://forum.xda-developers.com/showthread.php?t=882333).
boot phone to fastboot.
Code:
fastboot boot boot.superboot.img
let phone boot, open terminal, su, just to check.
reboot phone.
rooted and ota'd now!
I've got root back, but not by that method. I think it might be a mistake to flash that boot.img, as the 2.3.1 update patched boot.img... so replacing it with one from 2.3 might not be the best idea. But I guess no one really know what the changes might be.
I guess time will tell
The method I used was:
1. Boot into fastboot.
2.
Code:
fastboot flash recovery recovery-clockwork-3.0.0.0-crespo.img
3. Reboot from fastboot directly into recovery (not doing so will cause android to replace CWR).
4. Mount USB, copy su-2.3.6.1-ef-signed.zip to the /sdcard via windows/linux
5. Mount /system
6. Install update from zip (browse to were you put su-2.3.6.1-ef-signed.zip).
7. Install it, and reboot.
8. open root explorer, and rename /etc/install-recovery.sh to install-recovery.sh.old
9. open ROM Manager, reflash CWR.
now you are all done, rooted, w/ CWR
I reflashed CWM, then from CWM, remounted /system, then used adb to chmod 6775 su. That restored root pretty easily.
What Recovery image are you using? Are you able to get into it consistently? I can't from fastboot except for if I immediately hit it up after flashing CWM with fb, or from ROM Manager (flash from RM, then select reboot to recovery).
Luxferro said:
I've got root back, but not by that method. I think it might be a mistake to flash that boot.img, as the 2.3.1 update patched boot.img... so replacing it with one from 2.3 might not be the best idea. But I guess no one really know what the changes might be.
I guess time will tell
Click to expand...
Click to collapse
its not flashing it. read the command. its only booting to that image to install su. then reboot will bring you back to stock 2.3.1 boot.img.
distortedloop said:
I reflashed CWM, then from CWM, remounted /system, then used adb to chmod 6775 su. That restored root pretty easily.
What Recovery image are you using? Are you able to get into it consistently? I can't from fastboot except for if I immediately hit it up after flashing CWM with fb, or from ROM Manager (flash from RM, then select reboot to recovery).
Click to expand...
Click to collapse
im using stock recovery.
I'm rooted on 2.3.1 but I lose clockwork recovery when I reboot an gota reflash it using rom manager. Anyone having this problem
k0mpresd said:
its not flashing it. read the command. its only booting to that image to install su. then reboot will bring you back to stock 2.3.1 boot.img.
Click to expand...
Click to collapse
Sure it is. But on Android bootup, a script is running somewhere to replace it with stock recovery. They did this on Droid_1 after the first or second update (that's my only other android phone... so my android experience is limited).
edit: I just found the script. It's /etc/install-recovery.sh .... just renamed my to install-recovery.sh.old. gonna reflash CWR and test it now.
edit2: yep, works great now. CWR, and retained my 2.3.1 boot.img
So is this something that the devs of clockworkmod need to fix in order to not lose clockwork recovery when u reboot the phone
chris6278 said:
So is this something that the devs of clockworkmod need to fix in order to not lose clockwork recovery when u reboot the phone
Click to expand...
Click to collapse
No, it's a safety mechanism so you can't lose recovery... It has nothing to do with clockworkmod. Someone can make a root script or app that disables it easily. Or people can just do it themselves manually.
edit: actually, all that needs to be done is add some code to the update script inside su-2.3.6.1-ef-signed.zip so when it installs the update, it renames install-recovery.sh
distortedloop said:
I reflashed CWM, then from CWM, remounted /system, then used adb to chmod 6775 su. That restored root pretty easily.
What Recovery image are you using? Are you able to get into it consistently? I can't from fastboot except for if I immediately hit it up after flashing CWM with fb, or from ROM Manager (flash from RM, then select reboot to recovery).
Click to expand...
Click to collapse
I want to attempt to restore my root by using your method. But I'm lost at the part when you use adb chomd 6775 su,
When I go into adb, do i just type chomd 6775 su? Do I have to download something else to use this? Please explain, thanks
If u dont mind can u please provide the instructions on how to do it manually. Id really appreciate it. Sorry im a noob lol
Where in root explorer do i need to rename
Where in root explorer do i rename it
plmiller0905 said:
I want to attempt to restore my root by using your method. But I'm lost at the part when you use adb chomd 6775 su,
When I go into adb, do i just type chomd 6775 su? Do I have to download something else to use this? Please explain, thanks
Click to expand...
Click to collapse
chmod needs to be done at a # prompt.
chris6278 said:
Where in root explorer do i rename it
Click to expand...
Click to collapse
I'm trying not to be rude... but if you can post in this thread, you can read it to. Before you asked your question a couple different step by step posts outlined all you need to know.... and this thread is only 2 pages...
Is it just me or does adb remount no longer work?
If I use the old koush rootboot.img it works, but no wifi, if I use the stock boot.img, I get no wifi but am able to remount.
I can read an ive done all the steps u posted but my ? Is where in root explorer do i find /etc/install-recovery.sh so i can rename it? Im learning this as i go so excuse me if i sound stupid sometimes
chris6278 said:
I can read an ive done all the steps u posted but my ? Is where in root explorer do i find /etc/install-recovery.sh so i can rename it? Im learning this as i go so excuse me if i sound stupid sometimes
Click to expand...
Click to collapse
do you have root explorer? if not, it's just a file explorer that has root access. by default when you open it you are at /
you need to scroll down to /etc
go in that folder and find the install-recovery.sh
look up top for the button to turn it from read-only to read-write, click it
go back to the file long press it, and then choose rename.
Luxferro said:
I'm trying not to be rude... but if you can post in this thread, you can read it to. Before you asked your question a couple different step by step posts outlined all you need to know.... and this thread is only 2 pages...
Click to expand...
Click to collapse
Thanks..I already rerooted but thanks anways
I got root explorer an followed ur directions an now everything works great. Thanx for ur help an sorry for being a pain lol

[Q] Rom Manager on Nexus s claims device is not rooted

Hi
When I start the Rom Manager I get the message "You must root your phone for ROM Manager to function. Superuser was not found as "/system/bin/su" or/system/xbin/su".
I have followed the instructions here on how to root my Nexus s and I am able to enter recovery mode and am able to go into bootloader. I also see that is says "Unlock" there.
So the way I understand it, the phone is rooted. Unless I miss something here.
I also see the Superuser icon in my launcher.
What am I doing wrong?
Think this is the wrong area to ask but when you flashed the su file did you mount system in the mount and storage before flashing the su file?
I dont think it was mentioned in the guide.
how do I do that?
Can I reapply the su zip file again?
jerrycycle said:
Think this is the wrong area to ask but when you flashed the su file did you mount system in the mount and storage before flashing the su file?
Click to expand...
Click to collapse
OK. That is what I was missing.
Now its done.
Thanks
dbenyakar said:
OK. That is what I was missing.
Now its done.
Thanks
Click to expand...
Click to collapse
What method did you use to root?

How to Install 4.2 images, keep root and all data

**Disclaimer** If you don't understand what follows, don't attempt this. I'm not responsible for you softbricking your device,
This is a quick guide for how to install the new android without losing anything. You'll need fastboot for this. Also, before doing this, be sure to download the supersu cwm update zip, and have it on your sdcard. Make sure you also already have a custom recovery installed (I did twrp, but i'm sure cwm will work just as well). I would also suggest having a backup done, through titanium backup and through recovery, just incase.
First, download the factory images for the n7 from google's website. Decompress them (if you're in windows, you'll need winrar or something similar.) After you decompress the archive, there'll be another one inside (image-nakasi-jop40c.zip), decompress this one as well. Under here, you'll see the .img files for all the partitions. For now, go up one directory. You'll also see here bootloader-grouper-4.13.img. Once you have all this, reboot into the bootloader.
Once you're in the bootloader, you can update the bootloader to the new version (this step isn't needed, but I did it anyways). Plug into your pc, and type fastboot devices. Make sure it's not blank. If it is, you have to update drivers. If you can see the device, open up a command prompt, and cd to the directory that has the bootloader-grouper file. Type the following:
fastboot flash bootloader-grouper-4.13.img
then, after it's done, type:
fastboot reboot-bootloader
Now, you'll be booted back into the bootloader, it'll say 4.13. On to the rom.
cd into the folder image-nakasi-jop40c (make sure you see the files system.img and boot.img before you continue. If you don't see them, the next steps will do nothing but erase your kernel and system parition.)
now, you see the image files. Type the following (still in the bootloader)
fastboot erase system
fastboot flash system system.img
wait until it completes, then type:
fastboot erase boot
fastboot flash boot boot.img
Once this is done, hit the volume up on the device until it shows recovery mode on the top. When it does, push the power key and you'll boot into your recovery (shouldn't be touched.) Inside here, flash the supersu cwm zip file, which'll flash the superuser binary, and supersu. Once this is done, do a factory reset (removing your data and cache.) Boot into the rom.
Once it's booted, you'll notice your internal sd card appears to be empty (mine did, I was worried at first.) For some odd reason, it moved the entire contents of my sdcard into a folder on it called 0. When you get back into android, simply move the folder all up one level so they're in the proper place. You now have the rom booted, rooted, with all your data. Now, you can do a titanium restore to get all your stuff back.
My first boot got stuck for some reason. if it happens to you, just hold the power button and hard reboot. (I did this on 2 devices, it only happened to one of them, so I figured I'd give you all warning.)
Links:
SuperSu binary: https://docs.google.com/open?id=0B7a8xHNJlpgTR0ZkR1pWZWR2VzA
Google Factory Images: https://developers.google.com/android/nexus/images
Thanks for this.
I flashed the 4.2 ota in the dev section and I lost root. Can I just flash the supersu binary in cwm to regain root?
Thanks for this.. Apparently you found out too a clean 4.2 isn't rootable via typical methods.
That SuperSU package did the trick. I have to remember to keep a SuperSU binary on hand for these kinds of situations that SuperUser fails..
jefferson9 said:
Thanks for this.
I flashed the 4.2 ota in the dev section and I lost root. Can I just flash the supersu binary in cwm to regain root?
Click to expand...
Click to collapse
Yes. If you do it though cwm, you're not using any exploits, you're just inserting the superuser binary and supersu.apk into the proper places on the rom. On any nexus device, any rom, this will root it.
mstrk242 said:
Once it's booted, you'll notice your internal sd card appears to be empty (mine did, I was worried at first.) For some odd reason, it moved the entire contents of my sdcard into a folder on it called 0. When you get back into android, simply move the folder all up one level so they're in the proper place.
Click to expand...
Click to collapse
DANGER WILL ROBINSON!!
The "odd reason" is called "multiple users" - add a second user and they get a folder called 10.
tehSmoogs said:
DANGER WILL ROBINSON!!
The "odd reason" is called "multiple users" - add a second user and they get a folder called 10.
Click to expand...
Click to collapse
Exactly.
If everything goes right we should have an AOSP prerooted build in about *looks at watch* 20 minutes.... Unless there is a compile error or SU error. *laff*
Back to watching the scrolling terminal window
Just got this working on a mac...
did not update bootloader(couldnt get it to)
other than that, same commands except all fastboots are ./fastboot on a mac
the only other trick is i needed the fastboot and abd files in the jop40c folder...seems to have worked like a charm....im deff on 4.2 with su installed... and it looks like my data is still there...once google is done restoring i'll know just how sucessfull it is, but so far, seems to work!!!
kwhee07 said:
Just got this working on a mac...
did not update bootloader(couldnt get it to)
other than that, same commands except all fastboots are ./fastboot on a mac
the only other trick is i needed the fastboot and abd files in the jop40c folder...seems to have worked like a charm....im deff on 4.2 with su installed... and it looks like my data is still there...once google is done restoring i'll know just how sucessfull it is, but so far, seems to work!!!
Click to expand...
Click to collapse
I did this all on linux, just kind of adapted the guide for windows. I figured all the linux users would understand how to do it on their own. Glad to know it's the same for mac as well.
OK where did they put the developer options? Not in settings on my 32GB 4.2 device
Never mind. This: http://www.androidpolice.com/2012/1...hidden-in-android-4-2-heres-how-to-find-them/
rootbrain said:
OK where did they put the developer options? Not in settings on my 32GB 4.2 device
Never mind. This: http://www.androidpolice.com/2012/1...hidden-in-android-4-2-heres-how-to-find-them/
Click to expand...
Click to collapse
Settings - about tablet - build number
push it a few times and it will enable dev options
You have .bat file in the package.
Why so complicated?
I downloaded 4.2 from here:
http://android.clients.google.com/p...gned-nakasi-JOP40C-from-JZO54K.094f6629.zipia
I then just flashed it from recovery via CWM.
Done.
CWM asked me if I wanted to maintain root and of course I chose the correct answer on this, so now my N7 is running on a rooted 4.2.
Here is my method:
1. Download official 4.1.2 from http://forum.xda-developers.com/showthread.php?t=1929270 and 4.2 OTA image from http://forum.xda-developers.com/showthread.php?t=1989188
2. Boot into CWM (i have CWM touch installed)
3. Clear data and install 4.1.2, don't forget to turn on root in the installer
4. reboot check that root is fully working
5. reboot into recovery install 4.2
6. before reboot CWM will ask to disable recovery flash and protect root. Ansver yes to both questions
I'm confused, it says if you are already on a custom rom, just flash as usual.
What makes this different?
I was on stock ROM rooted with some system modifications, and this wwadd the only way I could get the update working...
Sent from my Nexus 7 using xda app-developers app
mstrk242 said:
For some odd reason, it moved the entire contents of my sdcard into a folder on it called 0. When you get back into android, simply move the folder all up one level so they're in the proper place. You now have the rom booted, rooted, with all your data. Now, you can do a titanium restore to get all your stuff back.
Click to expand...
Click to collapse
So I'm at the step listed above. I have 4.2 on my device but I can't seem to find this "0" folder. I'm browsing the /sdcard folder via adb shell. Am I looking at the wrong place? Do I have have the incorrect permissions? Or might it not be there?
Thanks.
Ill have to wait until a rooted rom is created, I have no comp.
Sent from my Nexus 7 using XDA Premium HD app
can I install image-nakasi-jop40c.zip directly without upgrading bootloader?
Zuk. said:
So I'm at the step listed above. I have 4.2 on my device but I can't seem to find this "0" folder. I'm browsing the /sdcard folder via adb shell. Am I looking at the wrong place? Do I have have the incorrect permissions? Or might it not be there?
Thanks.
Click to expand...
Click to collapse
Not advisable to move this folder - if it got moved to a new location by the o/s then there's probably a good reason why - maybe like 4.2 introducing multiple users
Each user appears to get their own "home" directory created in /mnt/shell/emulated/
Default user dir is "0"
Second user dir is "10"
Each contain the standard dir's from 4.1 and earlier.
Travelawyer said:
Why so complicated?
I downloaded 4.2 from here:
http://android.clients.google.com/p...signed-nakasi-JOP40C-from-JZO54K.094f6629.zip
I then just flashed it from recovery via CWM.
Done.
CWM asked me if I wanted to maintain root and of course I chose the correct answer on this, so now my N7 is running on a rooted 4.2.
Click to expand...
Click to collapse
You had two extra characters at the end of your link, but I fixed it above and it's good to go for others in the future. Just flashed it in TWRP, it didn't ask if I wanted to maintain root, hit reboot when it was complete and lost root, so it doesn't work for everyone - good news is that all my data remained intact without having to resort to advanced restoring my data from a backup....
When I tried the SuperSU binary root flash trick, I finally got root back. But don't think it's as easy to get to recovery! I had to obtain the TWRP Recovery one more time since it wiped it and put in place a recovery that did absolutely nothing but reboot the device after a few minutes, so you'll have to
Code:
fastboot flash recovery openrecovery-twrp-2.3.1.1-grouper.img
to get TWRP back.... Hope that helped everyone!

[boot.img] obsolete please lock

Hi all. Quick notice:
Usual disclaimers apply.
This is an Unsecure boot.img I made for Android 4.2 on the Nexus 4.
Okay cool... but what is an insecure boot.img?
An insecure boot.img allows the device to be booted with permissions to be mounted as root. This is a way of being able to push SuperSU/Superuser.apk to /system/app and the Su Binaries to /bin
adb shell
su
mount -o remount,rw /system
exit​
See more here: External Link
_____________________________________________________________________________________________________________
To use this you must be unlocked, not familar with unlocking a Nexus device? Easy. In fastboot mode type "fastboot oem unlock" this wipes all data on the device (virtual sd included).
A nice article regarding this thread was published here: http://www.addictivetips.com/android/root-google-nexus-4-install-clockworkmod-recovery/
To boot this boot.img:
must be in the platform-tools folder in the android-sdk
must be in fastboot mode (power+vol-)
First use: fastboot boot "boot.img" (no ")
Why boot? I have not tested this image as I don't have a Nexus 4 as of yet.**
**Some users report flashing the image makes the phone in need of a fastboot stock flashing session, stick to booting for now.​
Thank you for helping!
-fkrone
-Ranguvar
-USSENTERNCC1701E
This is mainly for development purposes to obtain root on this device, it will be an easier process when a recovery is published and you can flash a su.zip. (see attached)
DOWNLOAD HERE: http://www.androidfilehost.com/?fid=9390169635556426389
Note, this is in Nexus 7 folder as Nexus 4 does not have its own atm.​
Click to expand...
Click to collapse
Please Lock!
Placeholder reserve
Harry GT-S5830 said:
Anyone able to get me recovery.fstab from recovery image and ill try make a cwm6 touch recovery for us.
I wouldn't be lazy and do it myself but PC is off
Sent from a phone
Click to expand...
Click to collapse
sgs2ext4 doesn't work on the recovery.img and the image isn't mountable by itself in Windows.
Too lazy to reboot into Linux, for now.. any other way to crack it open?
Ranguvar said:
sgs2ext4 doesn't work on the recovery.img and the image isn't mountable by itself in Windows.
Too lazy to reboot into Linux, for now.. any other way to crack it open?
Click to expand...
Click to collapse
Pull it apart in hex editor
Sent from my HTC Explorer A310e using xda app-developers app
Harry GT-S5830 said:
Anyone able to get me recovery.fstab from recovery image and ill try make a cwm6 touch recovery for us.
Sent from a phone
Click to expand...
Click to collapse
I've got the recovery.img, can I get the .fstab out without loop mounting? I don't have a linux machine set up right now.
USSENTERNCC1701E said:
I've got the recovery.img, can I get the .fstab out without loop mounting? I don't have a linux machine set up right now.
Click to expand...
Click to collapse
Old fashioned HxD
See here: http://forum.xda-developers.com/showthread.php?t=443994
I could probably do it without this, but it probably wouldn't mount data/media (what emulates the SD) so it would be relatively useless as that's where zips are
Also this might prove useful: http://forum.xda-developers.com/showthread.php?t=1494036 (requires Cygwin or Linux environment)
Harry GT-S5830 said:
Old fashioned HxD
See here: http://forum.xda-developers.com/showthread.php?t=443994
Click to expand...
Click to collapse
Hell, I wouldn't trust myself to rip it out with a hex editor. I'm setting up a VM right now, but I could just upload the recovery.img for you. I pulled it out of the stock image that google uploaded today.
USSENTERNCC1701E said:
Hell, I wouldn't trust myself to rip it out with a hex editor. I'm setting up a VM right now, but I could just upload the recovery.img for you. I pulled it out of the stock image that google uploaded today.
Click to expand...
Click to collapse
Cheers, that's where I had mine but I corrupted it :/ ill try pull it apart on the 600MHz wonder pico
Or perhaps not... 3.2" is too small for hex
Harry GT-S5830 said:
Cheers, that's where I had mine but I corrupted it :/ ill try pull it apart on the 600MHz wonder pico
Or perhaps not... 3.2" is too small for hex
Click to expand...
Click to collapse
Lol, I'm having a hell of a time getting Slax as a cooperative VM, might have to go all out with ubuntu
Got it!
Thanks for the tutorials. It was just fun to to something short after midnight (Germany). I was a little bit bored Would be nice if you can mention me in the people helped to create this recovery
http://www.mediafire.com/?mlv72phch1tgd5y Mediafire-Mirror
Dammit, beat me to it!
Serves me right for making dinner first
http://ompldr.org/vZ2ExYQ/recovery.fstab
Can i ask something as a future buyer of nexus 4 and older user of another phone...the fastboot is the "bootloader" (pink screen on my older phone) the state of the phone where i can connect it to my computer and see the folder containing the recovery.img boot.img...etc???
pikachukaki said:
Can i ask something as a future buyer of nexus 4 and older user of another phone...the fastboot is the "bootloader" (pink screen on my older phone) the state of the phone where i can connect it to my computer and see the folder containing the recovery.img boot.img...etc???
Click to expand...
Click to collapse
That's not quite how it works. These .img files we are talking about are pictures of the stock version of those paritions. Try reading this article for an explanation of Android partitioning.
There is also a great graphic here. The site is in Spanish, I haven't used Google to translate it, but the picture there is in English. Take your time with it, there's a lot of info there.
To get into Fastboot mode, do you just hold the volume down button while powering on? Never used a Nexus device before. Have been strictly on HTC up until now. I'm picking up my Nexus 4 in the morning and don't mind trying, as long as there's a way to undo anything in case something goes wrong.
Stryder5 said:
To get into Fastboot mode, do you just hold the volume down button while powering on? Never used a Nexus device before. Have been strictly on HTC up until now. I'm picking up my Nexus 4 in the morning and don't mind trying, as long as there's a way to undo anything in case something goes wrong.
Click to expand...
Click to collapse
Or you can enable adb and
Code:
adb reboot bootloader
The command
Code:
fastboot boot boot.img
is temporary. All it does is boot, one time only, the image you specify. Once you've mounted system as rw however, everything you do in /system before rebooting is permanent.
USSENTERNCC1701E said:
Or you can enable adb and
Code:
adb reboot bootloader
The command
Code:
fastboot boot boot.img
is temporary. All it does is boot, one time only, the image you specify. Once you've mounted system as rw however, everything you do in /system before rebooting is permanent.
Click to expand...
Click to collapse
So does adding the su binaries and the superuser apk give you permanent root after this then?
And exactly what binaries are needed to gain root? I've never gained root using that method before so am a little unfamiliar in this territory.
Stryder5 said:
So does adding the su binaries and the superuser apk give you permanent root after this then?
And exactly what binaries are needed to gain root? I've never gained root using that method before so am a little unfamiliar in this territory.
Click to expand...
Click to collapse
Woops, wrong thread.
Yes, if you push the su binary from a superuser flashable zip to /system/bin/ and chmod 0655, plus the superuser apk, you will have permanent root after.
Also, there is a recovery.img now, so you can test that out, if it works, flash it from fastboot, then flash a superuser zip from that recovery.
Thank you for getting it (recovery.fstab), looks like someone beat me to it though!
Sorry for late response I have to sleep as I'm in last school year
Ill cook up a recovery just to make your efforts worthwhile
It's in OP, its probably 99.9% the same as the other guys so i'm not going to make duplicate thread, use who evers recovery you wish.
____________________________________________________________________________________________________________________________________
Reason I say fastboot boot first is because it allows you to boot the image without permanently (well, unless you flash another over) flashing a partition without knowing it works.
Booted fine when I ran fastboot boot boot.img, but when I actually flashed it, it's giving me a boot loop now Booting back into fastboot shows secure boot still enabled. Any suggestions? Or do you have the original bootloader image?
Stryder5 said:
Booted fine when I ran fastboot boot boot.img, but when I actually flashed it, it's giving me a boot loop now Booting back into fastboot shows secure boot still enabled. Any suggestions? Or do you have the original bootloader image?
Click to expand...
Click to collapse
Not at my comp now or I'd upload it, bit of you rip open the fa Tory image from the Google servers you should find it
---------- Post added at 02:44 PM ---------- Previous post was at 02:43 PM ----------
On a side note, what possessed you to do that?

[ROOT][CWM] Root Nexus 4 & Install Official ClockworkMod Recovery

I originally posted this method at AddictiveTips. The method I posted there is targeted at everyone including the absolute beginners and I have also included instructions there for setting up the required tools, and for reverting back to the original recovery and boot image in case anything goes wrong. All external credits should be given to that guide (it does link back to this thread). Here is the link: How To Root Nexus 4 and Install ClockworkMod Recovery on it.
To my knowledge, this is the first confirmed working rooting method for Nexus 4 posted here at XDA. Though my knowledge is limited, so please correct me if I am wrong.
UPDATE: There is an official ClockworkMod recovery for Nexus 4 now available directly by Koush, so this should all be easy as pie now and you can now safely install CWM too. I am updating the CWM method with the updated instructions.
This method requires an unlocked bootloader. You can find instructions for unlocking it at XDA, or at the AddictiveTips guide linked above (the link to the bootloader unlock guide is in the requirements section there).
UPDATE 2: If your device does NOT get wiped after unlocking the bootloader, fret not. While this isn't expected behavior, several users have experienced the same on the Nexus 4. This could be due to some error at Google's end, but unlocking still works perfectly fine.
That said, let's get on with rooting and flashing CWM.
ClockworkMod Recovery Method:
Download the latest official ClockworkMod recovery from CWM website and rename it to recovery.img
Enable Android Debugging from Settings > Developer Options. (If you can't find developer options, go to 'About' and tap 'Build number' seven times.)
Connect the device to your computer via USB, and install the required drivers.
Download the recovery flashable SuperSU package with Busybox and transfer it to your phone's internal SD card.
Reboot into fastboot/bootloader:
Code:
adb reboot bootloader
You can also power off the phone and then use power + volume-down key combination to get into bootloader.
Unlock the bootloader if you haven't done so already. WARNING: This command will wipe all data on your device.
Code:
fastboot oem unlock
Enter this command in a command prompt to flash the ClockworkMod recovery (making sure you are in the directory where you downloaded the recovery file):
Code:
fastboot flash recovery recovery.img
OR
If you simply want to root without flashing a custom recovery and want to stick to your stock recovery, simply boot this recovery once using this command:
Code:
fastboot boot recovery.img
If you flashed the recovery in the previous step, you can now boot into recovery by pressing volume-up or volume-down twice to select the recovery option, and then the power button to enter it. If you simply booted into the recovery file without flashing it in the previous step, you should already be in recovery now.
Once in recovery, take a backup to be on the safe side.
Flash the downloaded SuperSU and busybox package zip file from recovery.
Clear cache and dalvik cache just in case (not required but won't hurt).
Reboot the device.
ADB and Insecure Boot Image Method:
Grab the insecure boot image from this thread.
Also download these root files. This package includes the latest SuperSU 0.98, latest su binary that comes with it, and working busybox (not sure if latest).
Extract the contents of the downloaded zip file to your computer.
Enable Android Debugging from Settings > Developer Options. (If you can't find developer options, go to 'About' and tap 'Build number' seven times.)
Connect the device to your computer via USB, and install the required drivers.
Reboot into fastboot/bootloader:
Code:
adb reboot bootloader
You can also power off the phone and then use power + volume-down key combination to get into bootloader.
Unlock the bootloader if you haven't done so already. WARNING: This command will wipe all data on your device.
Code:
fastboot oem unlock
Get back into bootloader mode and boot into the downloaded insecure boot image:
Code:
fastboot boot boot.img
Don't worry, this will not replace your existing boot image and will only boot from the insecure one once.
If it does NOT work for you and you get stuck in a boot loop, simply reboot your phone into bootloader and use the above command again. Some users had issues with booting from it the first time, but a second attempt worked.
Once booted into Android successfully using the insecure boot image, simply enter these commands one by one in command prompt (making sure you are in the directory where you downloaded the files):
Code:
adb shell mount -o remount,rw /system
adb push su /system/bin/
adb push Superuser.apk /system/app/
adb push busybox /system/xbin/
adb shell
chmod 06755 /system/bin/su
chmod 0644 /system/app/Superuser.apk
chmod 04755 /system/xbin/busybox
cd /system/xbin
busybox --install /system/xbin/
exit
exit
Reboot your device.
You will now have root access. Tested and confirmed working by Stryder5 and many others.
Credits:
Stryder5 for testing, confirming, tipping me about working CWM, providing the required drivers, and helping others on the thread. :highfive:
Harry GT-S5830 for the insecure boot image.
fkrone for his recovery revert disabler script and his unofficial working CWM before an official one became available.
Kstarz for posting this same recovery method with his own working CWM in this thread before an official one was out.
evaradar for informing about the release of official ClockworkMod recovery.
Koush for developing ClockworkMod recovery.
Chainfire for developing SuperSU.
Everyone else on this thread for testing, providing feedback and hitting the 'THANKS' button. =)
I have tried my best to give everyone the due credit but if I have missed out on anyone, please do remind me.
Yep, worked like a charm. Got Titanium running and restored all my apps
Btw, check your PM.
Checked...thanks. =) Added the links.
stem/bin/sh: su: can't execute: Permission denied
that is what i always get when i put in the "su"--permision denied
jshaw06 said:
stem/bin/sh: su: can't execute: Permission denied
that is what i always get when i put in the "su"--permision denied
Click to expand...
Click to collapse
You need to boot the unsecure boot.img first.
BTW can you confirm me the insecure boot.img you used? I just provided the link to the thread by Harry GT-S5830 but there were multiple ones posted in that thread, so I'm thinking of adding the direct link to the one confirmed working.
HQRaja said:
BTW can you confirm me the insecure boot.img you used? I just provided the link to the thread by Harry GT-S5830 but there were multiple ones posted in that thread, so I'm thinking of adding the direct link to the one confirmed working.
Click to expand...
Click to collapse
I'm pretty sure I used the one Harry GT-S5830 provided.
I used the one in the OP of that thread.. is there a different one I'm supposed yo use?
Sent from my SGH-T999 using Tapatalk 2
---------- Post added at 06:41 AM ---------- Previous post was at 06:23 AM ----------
It works
Sent from my SGH-T999 using Tapatalk 2
jshaw06 said:
It works
Click to expand...
Click to collapse
Glad to hear
Did you install the OTA before doing this? I gained root before installing the OTA.
Stryder5 said:
Glad to hear
Did you install the OTA before doing this? I gained root before installing the OTA.
Click to expand...
Click to collapse
No issues with installing the OTA after root?
Edit: Just noticed in your sig that you did not install the update.
I installed after ota
Sent from my SGH-T999 using Tapatalk 2
jshaw06 said:
I installed after ota
Sent from my SGH-T999 using Tapatalk 2
Click to expand...
Click to collapse
You mean you gained root after you installed the OTA?
---------- Post added at 01:12 AM ---------- Previous post was at 01:11 AM ----------
apzalo said:
No issues with installing the OTA after root?
Click to expand...
Click to collapse
I gained root, but haven't installed the OTA yet.
when I boot the boot.img. It rebooted and got stuck at the nexus boot animation for a long time. Does it suppose to do that?
Yes sorry gained root after OTA
Sent from my SGH-T999 using Tapatalk 2
Elemenopee said:
when I boot the boot.img. It rebooted and got stuck at the nexus boot animation for a long time. Does it suppose to do that?
Click to expand...
Click to collapse
Nope, it isn't. Try again...it's safe to try as many times as you want since we're not flashing the boot image; merely booting from it, which is temporary and doesn't last after reboot. Hope it works on the next try.
After step 8 we boot up the phone normally and then start running those adb commands? I'm assuming that's what you mean by "Once booted into Android successfully..." right? Sorry if it's an obvious question, just making sure!
quick question to ease my mind: if i needed to return this device for warranty purposes, how would i revert all of this back to stock? i know its something to do with the stock factory image, or am i wrong?
Ngo93 said:
After step 8 we boot up the phone normally and then start running those adb commands? I'm assuming that's what you mean by "Once booted into Android successfully..." right? Sorry if it's an obvious question, just making sure!
Click to expand...
Click to collapse
Step 8 itself will boot up the phone normally into Android, just using that insecure boot image instead of the stock one. And yes, you then just start entering those adb commands. =)
0.0 said:
quick question to ease my mind: if i needed to return this device for warranty purposes, how would i revert all of this back to stock? i know its something to do with the stock factory image, or am i wrong?
Click to expand...
Click to collapse
Best way would be to grab a stock factory image and flashing it. I recently wrote a post on the portal with the links: http://www.xda-developers.com/android/android-4-2-images-for-galaxy-nexus-nexus-7-4-and-10/
The method can be found at the factory images download page, and is as easy as extracting the image and running the included .bat file while your phone is connected to PC in fastboot mode.
HQRaja said:
Best way would be to grab a stock factory image and flashing it. I recently wrote a post on the portal with the links: http://www.xda-developers.com/android/android-4-2-images-for-galaxy-nexus-nexus-7-4-and-10/
The method can be found at the factory images download page, and is as easy as extracting the image and running the included .bat file while your phone is connected to PC in fastboot mode.
Click to expand...
Click to collapse
so i extract the "occam-jop40c-factory-cd3dc140.tgz" file, then double-click the "flash-all.bat" file?

Categories

Resources