sexta-feira, fevereiro 15, 2013

[Guide] Ultimate Nexus 4 Root Guide - xda-developers

[Guide] Ultimate Nexus 4 Root Guide - xda-developers

---
Another good source to make your nexus 4 rooted
--
[Guide] Ultimate Nexus 4 Root Guide

Post One: Unlocking and Rooting
Post Two: Installing Roms / Kernels / Tweaks
Post Three: Panic Section / FAQ / Miscellaneous


Unlocking The Bootloader And Obtaining Root
*This part of the tutorial is geared towards Windows users. The MAC instructions are very similar, from what I understand. Install the package the same way. All ADB/Fastboot commands may need to start with "adb-mac" (no quotes) rather than "adb" (no quotes). Due to the vast amount of Linux distros available; instructions will vary for your device. Once ADB/Fastboot are set up all command will begin with "./adb" (no quotes) rather than "adb" (no quotes). Once ADB/Fastboot are set up; this guide is relevant to everyone.*

Time required:
20-40 minutes.

Setting up ADB for our device:
Download the AndroidSDK onto your computer.
Note: Google changes their mind every other week as to if this will be distributed as a .zip or an .exe. If you get an .zip file, simply extract the contents to your C:\ drive. For an .exe install it like you would any other program, but set the path directly to the C:\ drive when the installer asks.

Or...you can use this page to download the "ADB for Dummies AIO App."
This will automatically install ADB for you to your C:\ directory. It's very very simple this way.

If your platform-tools folder doesn't have a fastboot.exe, place this fastboot.exe file in your C:\android-sdk-windows\platform-tools (or possibly simply called tools, if you set up ADB ages ago) folder.

Now you have ADB installed! Congratulations.

Unlocking the Bootloader:
***NOTE***
This may perform a factory reset on your device. You might lose all applications. Even the data on your SD Card! I'd recommend making a Backup to your computer BEFORE performing this. There is a method for backing your data up, detailed HERE.

Get the drivers:
Uninstall any previously attempted drivers if they don't work and move to the next.
Option One: Steps 16-27.
Option Two: Try this one as well. Use CyanogenMod's Guide for installing ADB - Steps 16 through 27 replacing the file/location with the naked drivers.
PDAnet's drivers may work if the above options don't. Simply install PDAnet (after uninstalling any previous attempted driver installations) to get the drivers.
WINDOWS 8 TIP
Q. I have Windows 8 and cannot install the drivers

How to Disable Driver Signature Enforcement in Windows 8:

From the Metro Start Screen, open Settings (move your mouse to the bottom-right-corner of the screen and wait for the pop-out bar to appear, then click the Gear icon).
Click ‘More PC Settings’.
Click ‘General’.
Scroll down, and click ‘Restart now’ under ‘Advanced startup’.
Wait a bit.
Click ‘Troubleshoot’.
Click ‘Advanced Options’
Click ‘Windows Startup Settings’
Click Restart.

When your computer restarts, select ‘Disable driver signature enforcement‘ from the list. You can now load your modified driver. Reboot again once the driver is installed and all will be well.


----

While that is downloading, on your Nexus 4: turn USB debugging on.
To do so; you must first go to Settings>About>Build Number and click seven times.
The actual setting can then be found in Settings>Developer Options>USB Debugging
Once the drivers are installed, navigate to the C:\android-sdk-windows\platform-tools folder on your computer.
Hold shift and right click. Select "Open Command Window Here."
Plug your phone into the computer. Now in this command window type:
Code:
adb reboot bootloader
(Hit Enter)
Your phone should now boot into a screen with a green android with his chest exposed.
Type this:
Code:
fastboot oem unlock
(Hit Enter)
If your Command Prompt displays the message "waiting for device" your driver wasn't successfully installed.
Close the Command Prompt window and open Device manager while your phone is still plugged in. (Search for it using the search option).

Right Click the "Android" option and select Update Driver. Choose to "Browse My Computer" and "Let Me Pick From A List." Pick the Driver with the newest date and install it. Now retry the code above.
Your phone will ask if you want to unlock it. Select "Yes" by using the volume keys and use power to select it.
Now, navigate to "Recovery Mode" with the volume keys. Use power to select.
A screen with another Android will pop up. Press Volume Up and Power at the same time.
Select Factory Reset. This process may take a few minutes. Be patient and let it work.
Once finished, select "Reboot."
Your phone is now unlocked!

Obtaining Root Access and Custom Recovery:
Turn on USB Debugging.
To do so; you must first go to Settings>About>Build Number and click seven times.
The actual setting can then be found in Settings>Developer Options>USB Debugging
Download the following:
SuperSU (CWM .zip)
CWM (Pick the version for your device)

Place the recovery-clockwork-VERSIONNUMBER-mako.img file into your C:\android-sdk-windows\platform-tools folder.
Put the SuperSU.zip on your phone.
Open another Command Prompt if it isn't still open. (Navigate to C:\android-sdk-windows\platform-tools and shift + right click. Select "Open Command Window Here.")
With your phone plugged in type:
Code:
adb reboot bootloader
(Hit Enter)
And wait for your phone to boot into the android again.

Now type:
Code:
fastboot flash recovery [(CMW Downloaded above)].img
(Change the file name to the correct file name and Hit Enter)

Once that is finished: select the "Recovery Mode" option again on your phone.
You should get a new recovery menu here. Select "install zip from sd card" and "choose zip from sd card."
Find the SuperSU.zip that you transferred earlier and select "Yes" to installing.
Navigate back to "Reboot" and reboot your phone.
You're now rooted!
However, ClockworkMod Recovery won't continue to load after this.
To fix this, find "Rom Manager" from the market. (The free version is fine.) Use the "Flash ClockworkMod Recovery" option.
If your recovery still doesn't stick around after a reboot, you have another couple options. Find a file explorer that allows root access, such asRoot Explorer. Use this program to rename /system/etc/install-recovery.sh to /system/etc/install-recovery.bak. You'll need to mount the system as r/w to do this. Root Explorer provides a button at the top to do so.
Or, you can do this completely manually by firing up ADB again and running a few commands:


Code:
adb shell
(Hit Enter)
Code:
su
(Hit Enter)
Code:
mount -o remount,rw -t ext4 /dev/block/mmcblk0p1 /system
(Hit Enter)
Code:
mv /system/etc/install-recovery.sh /system/etc/install-recovery.bak
(Hit Enter)

Congratulations!
Your phone is now unlocked, rooted, and has a custom recovery!
Continue reading the next posts for info on getting custom roms, kernels, tweaks, and more!

***I take no responsibility for what happens to your phone due to following this guide! That being said, not only am I sure you'll be fine...but there are an endless amount of users who would be glad to help if you need it.***

Thanks:
Google, for making Android a reality.
VanillaTbone, for the ADB AIO app.

Efrant, for posting about a bootloader locking utility without USB.
ClockworkMod team, for being a part of making our phones as awesome as they are.
The assorted developers, who continue to push out amazing material for us to use.
The awesome community, for endlessly supporting both Android itself and its users.

Nenhum comentário: