Alexunder Hacking Blog Technology Notes

Flash system for nexus device

2014-11-17

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 flash-all.sh 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-6.0.4.7-mako.img. Then execute in bash:

    fastboot flash recovery recovery-clockwork-touch-6.0.4.7-mako.img

Now, the CWM recovery mode is okay now.

Root Nexus 4

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

    adb push superuser.zip /mnt/sdcard/

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

feedsky
抓虾
google reader
bloglines
鲜果
哪吒
--> Fork me on GitHub