How to Root and Unlock the Google Nexus 6 on a Mac – XDA TV

In the past, XDA Developer TV Producer droidmodd3rx has shown you how to … more

Set Up Your MediaTek Device with Comprehensive Beginner’s Guide

As can be seen with the use of MediaTek chips in Android One devices … more

Sony Updates AOSP Sources to Android 5.0.1

Just a few days ago, Sony did an utterly fantastic job by pushing out numerous device trees for … more

Stop Your Screen From Turning Off with KeepItOn

We all know the feeling of reading a news article orrather longdocument, when our screen … more

Welcome to XDA

Search to go directly to your device's forum

Register an account

Unlock full posting privileges

Ask a question

No registration required
Post Reply

Modded recovery and boot images

OP JesusFreke

7th November 2008, 03:53 AM   |  #1  
JesusFreke's Avatar
OP Recognized Developer
Flag Dallas
Thanks Meter: 41
 
736 posts
Join Date:Joined: Oct 2008
Here is a zip file containing a modified recovery and boot image, as well as a few other things:
http://rapidshare.com/files/166164961/AndroidMod.zip
http://jf.nyquil.org/AndroidMod.zip
http://android-dls.com/forum/index.p...rb_v=viewtopic (see post for actual link to file)


NOTE: if you need a complete RC30 to v1.3 guide, see this page.


The recovery image (recovery_testkeys.img) uses the test keys that are distributed with the android platform source. This means that an OTA update or an update.zip update must be signed with the test key in order for it to install. In other words, it will no longer install OTA updates from t-mobile. You don't want them stealing back root access from you now do you? .

I've also included the test keys and the SignApk.jar tool, so you can sign your own update scripts (for use only with the modified recovery image). You can resign any image, even if it has been signed before. So for example, if you needed to install an "official" t-mobile update, you must re-sign it with the test keys first.

Another bonus in this recovery image is that ADB is enabled while in recovery mode. You can't adb into a shell (no sh binary), but you can at least use it to push and pull files from the device. For example, you could push an update.zip file to the sdcard.


The boot image (boot_nosecure.img) has been modified so that adb has root access by default. So when you do an adb shell, you automatically get a root shell. You can remount the system image using adb, and then push files directly to the system partition.


Finally, the "update - Restore Original RC29 Boot Image.zip" file is an update.zip file signed with the test keys, which will restore your boot partition back to the stock RC29 image. Useful if you accidentally hose your boot partition..



To install the recovery image onto your phone:

Code:
D:\Android\AndroidMod>adb push recovery_testkeys.img /data/local/recovery.img
912 KB/s (0 bytes in 1767424.001s)

D:\Android\AndroidMod>adb shell
$ su
su
# mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
mount -o rw,remount -t yaffs2 /dev/block/mtdblock3 /system
# cd /system
cd /system
# cat /data/local/recovery.img > recovery.img
cat /data/local/recovery.img > recovery.img
# flash_image recovery recovery.img
flash_image recovery recovery.img
#

Note: You must place the recovery image at /system/recovery.img. the init.rc boot script automatically flashes the recovery partition with that file every time you boot up the phone.

At this point, it's probably a good idea to reboot the phone into recovery mode, and make sure it loads OK. If the recovery image is corrupt somehow, it will throw you back into SPL mode (the multi-color bootloader screen). If that happens, just boot the phone normally, and reflash recovery image.

Once it boots into recovery mode, press alt+L, and the next to top line of text should say something like "using test keys.". If it doesn't, then you're still using the original recovery image.



Note: If you are planning on installing the modified RC30 update, you can ignore the following - there is no need to install the boot image. The update already has a newer, modified boot image.


Now that you know you have the modified recovery image loaded, you can install the boot image:

Code:
D:\Android\AndroidMod>adb push boot_nosecure.img /data/local/boot.img
939 KB/s (0 bytes in 1533952.001s)

D:\Android\AndroidMod>adb shell
$ su
su
# flash_image boot /data/local/boot.img
flash_image boot /data/local/boot.img
# rm /data/local/boot.img
rm /data/local/boot.img
#
Now reboot the phone and let it boot normally. If the boot image was corrupted, it will boot into recovery mode instead. You can use the included update zip file to reload the original RC29 boot image.

Otherwise, if it boots up normally, open a command prompt however you like (telnet, adb, terminal emulator app, etc.) and type "getprop ro.secure". If it says 0, then you're running the modified boot image. Otherwise, if it says 1, you're still running the original boot image.
Last edited by JesusFreke; 3rd January 2009 at 11:32 PM. Reason: Fixed download link
The Following User Says Thank You to JesusFreke For This Useful Post: [ View ]
7th November 2008, 03:57 AM   |  #2  
JesusFreke's Avatar
OP Recognized Developer
Flag Dallas
Thanks Meter: 41
 
736 posts
Join Date:Joined: Oct 2008
Attachement..
Hmm. It doesn't look like the attachment made it.. Does anyone have some space I could throw the file up at? It's around 5mb.
7th November 2008, 04:02 AM   |  #3  
bigdee's Avatar
Senior Member
Flag NYC 2 PHX
Thanks Meter: 0
 
193 posts
Join Date:Joined: Mar 2008
More
Quote:
Originally Posted by JesusFreke

Hmm. It doesn't look like the attachment made it.. Does anyone have some space I could throw the file up at? It's around 5mb.

I should have some space let me know
7th November 2008, 04:27 AM   |  #4  
Member
Thanks Meter: 0
 
95 posts
Join Date:Joined: Nov 2008
Quote:
Originally Posted by JesusFreke

Hmm. It doesn't look like the attachment made it.. Does anyone have some space I could throw the file up at? It's around 5mb.

Sent you an email with u/p if you need space.
7th November 2008, 06:18 AM   |  #5  
Senior Member
Flag Atlanta
Thanks Meter: 0
 
194 posts
Join Date:Joined: Nov 2008
More
test
anyway to test and make sure i did this correctly.. other than my phone booted and is not a paperweight
7th November 2008, 06:23 AM   |  #6  
JesusFreke's Avatar
OP Recognized Developer
Flag Dallas
Thanks Meter: 41
 
736 posts
Join Date:Joined: Oct 2008
Quote:
Originally Posted by jriley60

anyway to test and make sure i did this correctly.. other than my phone booted and is not a paperweight

To check the boot image, boot the phone normally, and then get a shell with adb. Type "id", and see if you are root

To check the recovery image, boot up the phone into recovery mode. Once you're in recovery mode, Press alt-l to show the text. The next to top line should say something like "using test keys"
7th November 2008, 06:26 AM   |  #7  
Retired Moderator
Thanks Meter: 10
 
1,271 posts
Join Date:Joined: Mar 2008
More
Quote:
Originally Posted by JesusFreke

To check the boot image, boot the phone normally, and then get a shell with adb. Type "id", and see if you are root

To check the recovery image, boot up the phone into recovery mode. Once you're in recovery mode, Press alt-l to show the text. The next to top line should say something like "using test keys"

When will we see the files? Can you just upload to RS and we will mirror?
7th November 2008, 06:27 AM   |  #8  
JesusFreke's Avatar
OP Recognized Developer
Flag Dallas
Thanks Meter: 41
 
736 posts
Join Date:Joined: Oct 2008
Quote:
Originally Posted by neoobs

When will we see the files? Can you just upload to RS and we will mirror?

Look at the original post. I added a link for the zip file..
7th November 2008, 06:31 AM   |  #9  
Senior Member
Flag Atlanta
Thanks Meter: 0
 
194 posts
Join Date:Joined: Nov 2008
More
boot.img is in correct. assuming typing id in telnet returning uid=0(root) gid=0(root) means i'm root then i'm good, thank you so much. looks like i really should install the emulator it might make things a little easier
7th November 2008, 06:33 AM   |  #10  
Retired Moderator
Thanks Meter: 10
 
1,271 posts
Join Date:Joined: Mar 2008
More
Quote:
Originally Posted by JesusFreke

Look at the original post. I added a link for the zip file..

thank you. Sorry

The Following User Says Thank You to neoobs For This Useful Post: [ View ]
Post Reply Subscribe to Thread

Tags
android flash image
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes