Alexunder Hacking Blog Technology Notes

Flash system for nexus device


How to flash android binary for nexus 4 in ubuntu

  • Download the binary from google offical site: android binary.

  • Unzip the dowloaded binary, then enter the uncompressed directory:

    tar zxvf occam-ktu84p-factory-b6ac3ad6.tgz 
    cd occam-ktu84p/
  • Run these commonds in termial

Using the adb tool: With the device powered on, execute:

    	adb reboot bootloader

To make the phone transfor into fastboot mode.

The phone also need be unlocked, execute:

       fastboot oem unlock

Finally, run in the current directory, if there is the message “waiting for device” stuck in terminal, make sure run the script under the sudo mode.

How to flash revocery mode binary

Clock Work Mod (CWM) is probably most known so we will use that one. First, download the binary which fits your phone from CWM site. For example, my nexus 4’s fited one is recovery-clockwork-touch- Then execute in bash:

    fastboot flash recovery recovery-clockwork-touch-

Now, the CWM recovery mode is okay now.

Root Nexus 4

Download the from CWM superuser. Use adb to push the downloaded into /ment/sdcard/ on the phone, execute:

    adb push /mnt/sdcard/

Then reboot the phone, change into the recovery mode, use the CWM’s UI to select the to install it on the phone.

google reader
--> Fork me on GitHub