Manual unlock & root - without toolkit - Nexus 4 Q&A, Help & Troubleshooting

Hi all,
Finally received my nexus 4 after suuuch a long wait.
I went the nexus root as I'd really like to learn all the ins and outs of android. I'm working as a web dev now (nothing with java).
This is my first android device and I will soon want to unlock, root and try manually amend system files.
I have some questions though:
1. Can I unlock the phone through the terminal manually and without toolkit? I want to do everything myself.
2. Are there any tutorials on manually rooting a nexus 4 (I saw a gnex). I don't want to use a tool kit for now.
3. I'd like to try start amending (very basic) some System files. Will it be easy to transfer over the code when updates come?
Thanks!

Check the sticky in the general forum. Great stuff by efrant. http://forum.xda-developers.com/showthread.php?t=2010312

nm3th said:
Check the sticky in the general forum. Great stuff by efrant. http://forum.xda-developers.com/showthread.php?t=2010312
Click to expand...
Click to collapse
Thanks for the link but I have already read that. What I want to do is manually perform the tasks he mentions. When he says to download a toolkit , I want to skip that and manually do what the toolkit does to have a better understanding of the OS.

Did you actually read it? He gives a step by step from unlocking the bootloader, to installing the drivers needed to run adb/fastboot, root, etc. No toolkit; exactly what you're asking for.

nm3th said:
Did you actually read it?
Click to expand...
Click to collapse
Yes I have. I guess I must of misunderstood what platform tools are.
Why do I need those? The android development bridge cannot work without that?

Platform-tools-v16 contains the files needed to run adb and fastboot. Adb (android debug bridge) allows you to communicate with your device from your pc. Fastboot allows you to update the flash file system. You will need this if you don't already have the sdk installed. Just follow the instructions and it'll be a good learning experience. Good luck.
**edit** I'm not on my system with the sdk, so I can't check, but I don't think fastboot is included with the sdk anymore, only adb is.

monkeying. around said:
Hi all,
Finally received my nexus 4 after suuuch a long wait.
I went the nexus root as I'd really like to learn all the ins and outs of android. I'm working as a web dev now (nothing with java).
This is my first android device and I will soon want to unlock, root and try manually amend system files.
I have some questions though:
1. Can I unlock the phone through the terminal manually and without toolkit? I want to do everything myself.
2. Are there any tutorials on manually rooting a nexus 4 (I saw a gnex). I don't want to use a tool kit for now.
3. I'd like to try start amending (very basic) some System files. Will it be easy to transfer over the code when updates come?
Thanks!
Click to expand...
Click to collapse
its the same as on the gnex, exactly. its the same on all nexus devices. fastboot oem unlock, fastboot a custom recovery, flash either a custom rom or the su binaries in that new recovery, then reboot and profit

nm3th said:
You will need this if you don't already have the sdk installed. Just follow the instructions and it'll be a good learning experience. Good luck.
Click to expand...
Click to collapse
OK thanks that clears another point up. I'm not really after learning how to flash etc but more about the OS as a whole. Would also like to slowly attempt to amend some changes in the system files but I'll go ahead and do that guide.
simms22 said:
its the same as on the gnex, exactly. its the same on all nexus devices. fastboot oem unlock, fastboot a custom recovery, flash either a custom rom or the su binaries in that new recovery, then reboot and profit
Click to expand...
Click to collapse
OK thanks will try tackle it this weekend.
Can you guys answe my other question? What about people who amend the files how so they go about updating the system where. Updates are released?

monkeying. around said:
Can you guys answe my other question? What about people who amend the files how so they go about updating the system where. Updates are released?
Click to expand...
Click to collapse
Make a backup of whatever file you are modifying and when there is an update, revert back to the old file and you should be able to flash the OTA. Or just flash the stock image using the instructions from my first reply, then flash the OTA.

Androidrootz.com has tutorials for manual or tool kits rooting via windows or Mac. I did the Mac version and it was a piece of cake and I am no pc expert. They have info for unrooting and flashing clockwork mod recovery.
Good luck,
Ian B

nm3th said:
Make a backup of whatever file you are modifying and when there is an update, revert back to the old file and you should be able to flash the OTA. Or just flash the stock image using the instructions from my first reply, then flash the OTA.
Click to expand...
Click to collapse
Ok that should sort out the updating but after updated what do I do with the backup/modified file. I will have to remodify everything again correct?
Mr Ian B said:
Androidrootz.com has tutorials for manual or tool kits rooting via windows or Mac. I did the Mac version and it was a piece of cake and I am no pc expert. They have info for unrooting and flashing clockwork mod recovery.
Good luck,
Ian B
Click to expand...
Click to collapse
Thanks I saw this tutorial and video although I found a better one. Like I said before I thought this was the plug n
Play version. Any will root the traditional way I guess.

there's another guide in this forum, maybe you like that one
http://forum.xda-developers.com/showthread.php?t=2018179

OK guys just backed up all my data to my computer. I've downloaded the platform tools but there seems to be a contradiction here.
Do I have to download the .IMG file that is 300+ mb?
cause some tutorials say I don't.

The IMG file is for just in case you goof up and need to get your phone back up and running.

nm3th said:
The IMG file is for just in case you goof up and need to get your phone back up and running.
Click to expand...
Click to collapse
OK thanks. Now I get it.
Regarding the updates, if I am unlocked and have root access with no other changes, I can successfully install the update correct?
Only thing I will lose is root access?

What will happen if I do a factory data reset on a unlocked + rooted device?

monkeying. around said:
What will happen if I do a factory data reset on a unlocked + rooted device?
Click to expand...
Click to collapse
You lose installed apps and data but maintain root
Sent from my Nexus 4 using Tapatalk 2

What about if I've flashed cwm recovery? To the boot loader. Would that get overwritten
Or is that not affected since its in the bootloader...before you get to the os.

monkeying. around said:
What about if I've flashed cwm recovery? To the boot loader. Would that get overwritten
Or is that not affected since its in the bootloader...before you get to the os.
Click to expand...
Click to collapse
It will not erase that as you said unless you flash back to the stock recovery image as the boot and recovery is separate. You can wipe data and reflash all day long if you want.

Related

Rooting Help

I'm not all that savvy at rooting and messing with Androids. I have a rooted Inspire 4G, but the Nexus 7 is a whole different beast. Some of the methods and things I need to do are kind of confusing, and was hoping I could get some help on my most burning questions.
1. What is the best/safest/most reliable way to root the Nexus 7 at the moment? (I have the latest OTA update JR003D)
2. I have many games that I would like to keep the data for. Is there any way to root my Nexus 7 without wiping the tablet entirely? If necessary, what is the best way to back up app data or the entire tablet?
3. Is there any way I can root my device so that I can still receive OTA updates safely without losing root, or at least be able to get root back easily?
If there's some good answers, hopefully other people can benefit from this too. ^.^
1/2. I used this toolkit. Since most ways that root also have you unlock when you do that it will wipe the device. So if you have stuff on /sdcard Id suggest backing it up to your computer and copy over afterword.
3. If you want to stay OTA and keep root, then you will need to flash the stock recovery back (if you use that toolkit since it flashes Clockwork for you) and use voodoo ota rootkeeper. You can do this by
Download ota rootkeeper and backup your root
Download the system image from here
Extract the recovery.img and stick it in your fastboot folder
boot into fastboot and type fastboot erase recovery
type fastboot flash recovery recovery.img
wait for flash
type fastboot reboot-bootloader
reboot the tab, system update then go back into voodoo and restore root and done!! You can then reflash CWM if you want to go custom again in the future, but keep in mind you need to be on stock recovery to take OTA.
u should of just rooted it right out of box so u wouldnt have to lose any data etc... because u havent done anything on it yet.
yeah thats what I did. Saves the hassle.
Hi, and thanks for your instructions. They are very clear.
Do you recommend that I (typical owner) leave my stock recovery image in place for day-to-day use and switch to CWM only when I desire to reflash? How do you do it? Also, should I make a nandroid backup(s) or is that kind of a waste on my 8GB Nexus?
I am familiar with CWM for flashing and backing up (to rem. SD card) for my phone.
I'd like to ensure I'll receive notifications about Nexus 7 updates. At least for a while or until I decide on a custom ROM. If ever.
Again, many thanks.
Sent from my Nexus 7
NeoMagus said:
1/2. I used this toolkit. Since most ways that root also have you unlock when you do that it will wipe the device. So if you have stuff on /sdcard Id suggest backing it up to your computer and copy over afterword.
3. If you want to stay OTA and keep root, then you will need to flash the stock recovery back (if you use that toolkit since it flashes Clockwork for you) and use voodoo ota rootkeeper. You can do this by
Download ota rootkeeper and backup your root
Download the system image from here
Extract the recovery.img and stick it in your fastboot folder
boot into fastboot and type fastboot erase recovery
type fastboot flash recovery recovery.img
wait for flash
type fastboot reboot-bootloader
reboot the tab, system update then go back into voodoo and restore root and done!! You can then reflash CWM if you want to go custom again in the future, but keep in mind you need to be on stock recovery to take OTA.
Click to expand...
Click to collapse
I just followed the 1.5.2 tool kit to unlock, root and install CWM onto my N7.I would like to remove CWM and replace the stock recovery for OTA updates. I followed your instructions and extracted recovery.img from the nakasi JRN84D image. I installed the android SDk and the 4.1 toolkit but I cannot find the fastboot folder, I found the fastboot exceuter but no fastboot folder in sight.
Any tips?
You want it in the folder with fastboot.exe. On my PC this is in platform-tools
Hi SoHaunted. I haven't heard any reply to my own questions so maybe this thread has been buried in the deluge of Nexus 7 topics.
You might want to go to the Nexus 7 Development forum and look at the topic regarding Nexus Root Toolkit v1.5. It is a Windows program that really helps with the different rooting tasks. It installed CWM for me. I also used it to update to a newer version of CWM.
NeoMagus said:
You want it in the folder with fastboot.exe. On my PC this is in platform-tools
Click to expand...
Click to collapse
thanks thats what I needed to know . 1 more thing, does the N7 have to be in bootloader mode before executing fastboot.exe or can it be on?
danny8 said:
Hi SoHaunted. I haven't heard any reply to my own questions so maybe this thread has been buried in the deluge of Nexus 7 topics.
You might want to go to the Nexus 7 Development forum and look at the topic regarding Nexus Root Toolkit v1.5. It is a Windows program that really helps with the different rooting tasks. It installed CWM for me. I also used it to update to a newer version of CWM.
Click to expand...
Click to collapse
That's the program I used to obtain root and install CWM, What I want to do is remove CWM and replace it with the stock recovery for future OTA updates as I do not plan on installing any roms or kernels at this time, Stock JB is good for me.
SoHaunted said:
thanks thats what I needed to know . 1 more thing, does the N7 have to be in bootloader mode before executing fastboot.exe or can it be on?
Click to expand...
Click to collapse
It needs to be in the screen with the Android where it lists the info on the bottom and says start with the green arrow, after holding the volume buttons and power.
danny8 said:
Hi, and thanks for your instructions. They are very clear.
Do you recommend that I (typical owner) leave my stock recovery image in place for day-to-day use and switch to CWM only when I desire to reflash? How do you do it? Also, should I make a nandroid backup(s) or is that kind of a waste on my 8GB Nexus?
I am familiar with CWM for flashing and backing up (to rem. SD card) for my phone.
I'd like to ensure I'll receive notifications about Nexus 7 updates. At least for a while or until I decide on a custom ROM. If ever.
Again, many thanks.
Sent from my Nexus 7
Click to expand...
Click to collapse
That method I posted was how to flash the stock recovery back to take OTA. If you are familiar with how to use CWM since you flashed it might as well just stick with it. Really only want to stay stock if you want the OTA's then just use rootkeeper

Help I bricked my nexus

I was using the tool kit here: [NEXUS 4 TOOLKIT V2.0.0]
I got the drivers to work and i unlocked my device then when the root procedure came around my device failed to flash the unsecure boot img.
so i went to download N-Cry's toolkit to root from their. This also refused to work now my phone will not boot. I can get to the google screen with the unlock logo and fastboot.
UnderZone7 said:
I was using the tool kit here: [NEXUS 4 TOOLKIT V2.0.0]
I got the drivers to work and i unlocked my device then when the root procedure came around my device failed to flash the unsecure boot img.
so i went to download N-Cry's toolkit to root from their. This also refused to work now my phone will not boot. I can get to the google screen with the unlock logo and fastboot.
Click to expand...
Click to collapse
try wiping data/factory reset then try to boot.
simms22 said:
try wiping data/factory reset then try to boot.
Click to expand...
Click to collapse
How do i do that?
UnderZone7 said:
How do i do that?
Click to expand...
Click to collapse
do you have a custom recovery installed? you would do it in the custom recovery. if you dont, you might have to flash the factory image via fastboot http://forum.xda-developers.com/showthread.php?t=2010312
doing everything the right way instead of a root toolkit is easier and faster, you just need to do a little reading first.
simms22 said:
do you have a custom recovery installed? you would do it in the custom recovery. if you dont, you might have to flash the factory image via fastboot http://forum.xda-developers.com/showthread.php?t=2010312
doing everything the right way instead of a root toolkit is easier and faster, you just need to do a little reading first.
Click to expand...
Click to collapse
The root part wasn't working so I never go to the flashing recovery
UnderZone7 said:
The root part wasn't working so I never go to the flashing recovery
Click to expand...
Click to collapse
So flash one
UnderZone7 said:
The root part wasn't working so I never go to the flashing recovery
Click to expand...
Click to collapse
as said above, flash one now via fastboot.
the right way to root a nexus in general terms.. fastboot oem unlock via fastboot, flash a custom recovery via fastboot, flash either the su binaries or a custom rom via your new custom recovery, reboot and profit. thats all that needs to be done when using any nexus, thats one reason we buy nexus devices
I don't think people understand what "brick" really means.
Sent from my iPad 4
Know why I love the XDA community so much?
Because after the 1 millionth "I bricked my Nexus, what do I do??" thread with someone who might not have done all the research they should have before flashing their device, XDA will still post helpful advice and generally help out, instead of posting comments like "omg read before you flash!!!".
And as stated above OP, try to stay clear of toolkits and stuff, at least starting out. That way, you learn a lot about what's going on in the background, and learn how you can prevent things from going wrong, and what to do when they do go wrong. I highly recommend reading at least the first 4 posts in this thread. It is extremely helpful.
simms22 said:
as said above, flash one now via fastboot.
the right way to root a nexus in general terms.. fastboot oem unlock via fastboot, flash a custom recovery via fastboot, flash either the su binaries or a custom rom via your new custom recovery, reboot and profit. thats all that needs to be done when using any nexus, thats one reason we buy nexus devices
Click to expand...
Click to collapse
Thank you so much for all your help. I used the guide got fastboot and the drivers working and I was able to flash a rom.

cant unbrick

i tried installing a system font from the rom toolbox and when it rebboted it wasnt booting up... i can switch on my device but it remains in the glowing (X) and doesnt load up... i tried a factory reset i didnt work... i dont have a custom recovery nor do i have a nandroid backup on my device. i have rooted it using wugfresh's toolkit.
i have been trying many methods over the day and nothing seems to work. i have dowloaded a stock image from google's site but its on my pc. some help pls!!!!
i have the drivers installed on my windows 8 . atleast they were wokring intially when i got the root done on it . i have no clue what to do now !!
Your gonna have to flash the stock image from download mode. Never make changes to system files without doing a nandroid backup.
Wayne Tech Nexus
zelendel said:
Your gonna have to flash the stock image from download mode. Never make changes to system files without doing a nandroid backup.
Wayne Tech Nexus
Click to expand...
Click to collapse
i am sorry but i am new to nexus 4 ... how do i get into the download mode?
Irthu said:
i am sorry but i am new to nexus 4 ... how do i get into the download mode?
Click to expand...
Click to collapse
Read the stickies. They will get you all the info you need. If you are gonna try mods like this I would advise a full custom set up. As what your gonna do is gonna fully wipe your device.
Wayne Tech Nexus
zelendel said:
Read the stickies. They will get you all the info you need. If you are gonna try mods like this I would advise a full custom set up. As what your gonna do is gonna fully wipe your device.
Wayne Tech Nexus
Click to expand...
Click to collapse
is it possible to flash the img. file if my phone is recognised only in the bootloader mode? and i am assuming we have to flash the img. file using an adb software ?
Irthu said:
is it possible to flash the img. file if my phone is recognised only in the bootloader mode? and i am assuming we have to flash the img. file using an adb software ?
Click to expand...
Click to collapse
yes you will need to use fastboot which is part of adb
follow this thread: http://forum.xda-developers.com/showthread.php?t=2010312
PhantomGamers said:
yes you will need to use fastboot which is part of adb
follow this thread: http://forum.xda-developers.com/showthread.php?t=2010312
Click to expand...
Click to collapse
i have downloaded a zip from google's site and its about 300 odd mb. i am assuming i have to extract the the img. files and then do it ? but there are about 3-4 img. files such as :
system
boot
boot loader
radio
recovery
user data
since my phone does get into bootloader can u pls tell me which all img. files i need to flash? do i have to everyone of them?
the thread i linked answers all of your questions
(you really only need to flash the system image but to avoid confusion i would just follow the thread verbatim)
PhantomGamers said:
the thread i linked answers all of your questions
(you really only need to flash the system image but to avoid confusion i would just follow the thread verbatim)
Click to expand...
Click to collapse
thanks alot i will try doing it... i havent used the command prompt in windows ever before guess its time to learn how to do this..

Rooted 5.0.... how to upgrade to 5.1.1

Is there is an easy to do this without having to wipe everything and start over fresh?
Will this work? http://forum.xda-developers.com/general/paid-software/flashfire-t3075433
WiFivomFranMan said:
Is there is an easy to do this without having to wipe everything and start over fresh?
Will this work? http://forum.xda-developers.com/general/paid-software/flashfire-t3075433
Click to expand...
Click to collapse
I'm on the same boat, but I think our answer will come soon. Today I found out that WugFresh will be updating the NRT Toolkit to support the Nexus Player. See this post.
Why not just download the image and flash it? Plenty of guides on how to do this
lafester said:
Why not just download the image and flash it? Plenty of guides on how to do this
Click to expand...
Click to collapse
I didn't know that there were difficulties with 5.1.1. I used Wugfresh's tool to install 5.1.1 with the "no wipe" option and I had 5.1.1 just fine - but can't figure out how to get root back!! And I need root to expand the storage!! Right now I have a fresh, clean, 5.1.1 install on my NP.
I tried Wugfresh's tool, I sure wish it told me that it didn't work with the firmware that it had already detected!!
I also tried the Chainfire root.img that I used back on 5.0 and it seems to work until I tell SuperSU to update the binaries. At that point it basically times out and asks me to reboot.
What next?! Wait for Wugfresh? Is there another way to root?
I flashed the cm recovery from dhacker and used it to flash the newest beta of supersu. After that the app didn't show up until I installed it from the store but now it works fine
I just want to upgrade it without losing all my stuff (Saved games for my NES ROM, etc...)
Why don't you locate the save data in es file explorer and copy it to the cloud. Reimage nexus player and set up es file explorer, cloud and copy the saved data back to where you stored it.
would anyone be so kind to point me to one of the guides on how to use factory image/OTA to update from 5.0 rooted to 5.1.1? I don't care about keeping my settings, and I don't care about root. just want the latest and greatest.
thanks in advance
The Nexus Player is a Nexus device, and you can always upgrade to the latest version by using the factory images found here: https://developers.google.com/android/nexus/images. The procedure to flash a factory image on any Nexus device has not changed since the Nexus One was released, so you can look at any of the guides for Nexus devices.
Essentially it boils down to this: The factory image contains a few files in an archive format. There are a few images within that you need: bootloader (I can't remember what the name of the file is but it's something like xxxxbootloaderxxx.img), system.img, boot.img, recovery.img). Extract those images from within the archive and flash them. You do this by booting into the bootloader, opening a command prompt in the same folder that you downloaded the image files) on your PC and type the following commands:
fastboot flash bootloader bootloader.img
fastboot flash system system.img
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot format cache
If you also want to start fresh and wipe all your data, execute the following command: fastboot format userdata
Then execute: fastboot reboot
Done.
Notes:
1) You need to extract these files in the same directory as where you downloaded the images before proceeding.
2) if you are using Windows, you need to install the the driver (found here: http://developer.android.com/sdk/win-usb.html)
3) The procedure above assumes your bootloader is unlocked. If not, you will need to unlock it (using: fastboot oem unlock) and it will wipe all your data.
efrant said:
1) There is currently no way to get root on 5.1.1 without modifying the kernel (so that it boots SELinux in permissive mode).
Click to expand...
Click to collapse
??
I have root on my NP... I used SkipSoft's Toolkit - details are here: http://forum.xda-developers.com/nexus-6/orig-development/toolkit-skipsoft-unified-android-t2967053
etnpnys said:
??
I have root on my NP... I used SkipSoft's Toolkit - details are here: http://forum.xda-developers.com/nexus-6/orig-development/toolkit-skipsoft-unified-android-t2967053
Click to expand...
Click to collapse
You are correct. I was reading another thread talking about Android M, and then I replied to this thread, so my mistake.
I've edited my post.
efrant said:
You are correct. I was reading another thread talking about Android M, and then I replied to this thread, so my mistake.
I've edited my post.
Click to expand...
Click to collapse
Ok - whew! I know that I went through the process but I couldn't be 100% sure because I have tried so many things to get expanded storage working to no avail that I've kinda given up for the time being...
It's a nexus - use custom recovery to flash supersu and your rooted.... Done
Toneman07 said:
It's a nexus - use custom recovery to flash supersu and your rooted.... Done
Click to expand...
Click to collapse
Not necessarily... You still need a modified boot.img to get the whole thing working...
etnpnys said:
Not necessarily... You still need a modified boot.img to get the whole thing working...
Click to expand...
Click to collapse
Thats interesting considering both my nexus phone and samsung tablet are running stock kernels (boot.img) and rooted just fine using the above method.

Deleted OS with Locked bootloader / Not able to unlock it

I mistakenly deleted my Nexus 6P internal memory with TWRP. Now my phone turns on and gets stuck at Google logo.
I am able to go to recovery mode but it reboots again and gets stuck at Google.
When I try to reboot it, it asks me "There is not OS, do you still want to reboot?"
I am able to go to CMD in Windows and when I try to unlock the bootloader, it gives my error "Remote: boot loader can't be unlocked".
Is there any way to install the OS from scratch even the bootloader is locked.
I am not able to access the internal memory of my phone on Windows computer and there is no TWRP on my phone anymore.
Any suggestions are greatly appreciated.
Thanks
I would recommend looking at this guide, section 10 or 11. It will get you back to stock and from there you can start over with the TWRP, rooting, etc... Hopefully it'll at least get you back to a bootable OS and you'll have something to work with...
Thanks
Thanks buddy. I will try it
You won't be able to use those sections of my guide with a locked bootloader so don't bother. Check out section 13 though, that involves using adb sideload and the stock recovery to flash one of the full OTA zips.
Heisenberg said:
You won't be able to use those sections of my guide with a locked bootloader so don't bother. Check out section 13 though, that involves using adb sideload and the stock recovery to flash one of the full OTA zips.
Click to expand...
Click to collapse
Yeah I figured out that with locked boot loader, it doesn't work. I will try to see section 13.
Thanks for the tip.
umer221 said:
Yeah I figured out that with locked boot loader, it doesn't work. I will try to see section 13.
Thanks for the tip.
Click to expand...
Click to collapse
No worries, let me know how you go.
Heisenberg said:
You won't be able to use those sections of my guide with a locked bootloader so don't bother. Check out section 13 though, that involves using adb sideload and the stock recovery to flash one of the full OTA zips.
Click to expand...
Click to collapse
I am in a similar situation. My bootloader is unlocked however i cant get abd or fastboot to see the phone. tried on windows and linux. any suggestions?
ppbatman said:
I am in a similar situation. My bootloader is unlocked however i cant get abd or fastboot to see the phone. tried on windows and linux. any suggestions?
Click to expand...
Click to collapse
What Linux distro are you using? And how did you install adb/fastboot on it?
Heisenberg said:
What Linux distro are you using? And how did you install adb/fastboot on it?
Click to expand...
Click to collapse
I used a mac, sorry about that had a brain fart when typing that post. Installed using a guide on xda. tested it with a nexus 5x and worked fine.

Categories

Resources