Go Back   xda-developers > HTC Dream: G1 > G1 Android Development


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 7th November 2008, 03:53 AM
JesusFreke's Avatar
JesusFreke JesusFreke is offline
Senior Member
 
Join Date: Oct 2008
Location: Dallas
Posts: 717
Default Modded recovery and boot images

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
Reply With Quote
Sponsored Links

  #2  
Old 7th November 2008, 03:57 AM
JesusFreke's Avatar
JesusFreke JesusFreke is offline
Senior Member
 
Join Date: Oct 2008
Location: Dallas
Posts: 717
Default 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.
Reply With Quote

  #3  
Old 7th November 2008, 04:02 AM
bigdee's Avatar
bigdee bigdee is offline
Senior Member
 
Join Date: Mar 2008
Location: NYC 2 PHX
Posts: 111
Default

Quote:
Originally Posted by JesusFreke View Post
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
__________________
WEPA
Reply With Quote

  #4  
Old 7th November 2008, 04:27 AM
npace npace is offline
Junior Member
 
Join Date: Nov 2008
Posts: 28
Default

Quote:
Originally Posted by JesusFreke View Post
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.
Reply With Quote

  #5  
Old 7th November 2008, 06:18 AM
jriley60 jriley60 is offline
Senior Member
 
Join Date: Nov 2008
Location: Atlanta
Posts: 164
Default test

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

  #6  
Old 7th November 2008, 06:23 AM
JesusFreke's Avatar
JesusFreke JesusFreke is offline
Senior Member
 
Join Date: Oct 2008
Location: Dallas
Posts: 717
Default

Quote:
Originally Posted by jriley60 View Post
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"
Reply With Quote

  #7  
Old 7th November 2008, 06:26 AM
neoobs neoobs is offline
Moderator
 
Join Date: Mar 2008
Posts: 1,235
Default

Quote:
Originally Posted by JesusFreke View Post
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?
Reply With Quote

  #8  
Old 7th November 2008, 06:27 AM
JesusFreke's Avatar
JesusFreke JesusFreke is offline
Senior Member
 
Join Date: Oct 2008
Location: Dallas
Posts: 717
Default

Quote:
Originally Posted by neoobs View Post
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..
Reply With Quote

  #9  
Old 7th November 2008, 06:31 AM
jriley60 jriley60 is offline
Senior Member
 
Join Date: Nov 2008
Location: Atlanta
Posts: 164
Default

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
Reply With Quote

  #10  
Old 7th November 2008, 06:33 AM
neoobs neoobs is offline
Moderator
 
Join Date: Mar 2008
Posts: 1,235
Default

Quote:
Originally Posted by JesusFreke View Post
Look at the original post. I added a link for the zip file..
thank you. Sorry
Reply With Quote

Reply

Tags
android flash image

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:52 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.