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


Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 8th November 2008, 09:45 PM
Fnorder Fnorder is offline
Member
 
Join Date: Nov 2008
Posts: 49
Default Making RC30 safe

I've looked through the update.zip and it seems only a few changes are needed to -keep- root.
* Flash the recovery image from http://forum.xda-developers.com/showthread.php?t=443041
* Unzip the FULL rc30
* Replace the system/recovery.img with the one from the above url.
* Copy system/bin/sh to system/bin/rootshell, and make the following changes to META-INF/com/google/android/update-script (or download a modified copy from a trusted source)

Add this to the end of the first line, which should start with: assert getprop("ro.build.finger.......

|| getprop("ro.build.fingerprint") == "generic/htc_dream/dream/trout:1.0/TC3/eng.jesusfreke.20081105.164210:eng/test-keys"


After
set_perm_recursive 0 2000 0755 0755 SYSTEM:bin
add
set_perm 0 2000 04755 SYSTEM:bin/rootshell


BACKUP anything from /system as it will be formatted. Do -not- use the 4 meg rc30 patch, as it bricks systems.

Resign with the utility provided in the above link, copy to sdcard, enter recovery, and pray. If it works, you can run the following from the terminal app (not pterminal)
/system/bin/rootshell

I've sucessfully done this on my machine.

Last edited by Fnorder; 9th November 2008 at 02:50 AM..
Reply With Quote
Sponsored Links

  #2  
Old 8th November 2008, 10:22 PM
Koush Koush is offline
Senior Member
 
Join Date: Sep 2007
Posts: 566
Default

That looks right, but just in case, I would also try to add a couple back doors, and close a few of Google's:
  • Add a test cert to the list of accepted OTA certs.
  • Remove Google's OTA cert.
  • Include a setuid shell somewhere in the patch.

Last edited by Koush; 8th November 2008 at 10:26 PM..
Reply With Quote

  #3  
Old 8th November 2008, 10:38 PM
cookzitall cookzitall is offline
Member
 
Join Date: Oct 2007
Posts: 95
Default

has ne1 tryed this? does it work...

im not sure wat changes to make to the script...its kind of confusing..can sum1 post an changed script?
Reply With Quote

  #4  
Old 8th November 2008, 10:47 PM
Fnorder Fnorder is offline
Member
 
Join Date: Nov 2008
Posts: 49
Default

Quote:
Originally Posted by Koush View Post
That looks right, but just in case, I would also try to add a couple back doors, and close a few of Google's:
  • Add a test cert to the list of accepted OTA certs.
  • Remove Google's OTA cert.
  • Include a setuid shell somewhere in the patch.
The setuid shell is added by means of chmodding /system/bin/sh. I'm not clear on the syntax for the 'concat' function that's apparently in the updater, so for safety's sake I won't try to make a copy. Regarding the other stuff....


Warning - Several people have bricked phones because a file that the updater intends to patch is either modified or missing. This includes otacerts.zip, so it would be a good idea to look through META-INF/com/google/android/update-script and make sure that none of the files listed have been tampered with.
Reply With Quote

  #5  
Old 8th November 2008, 10:56 PM
Koush Koush is offline
Senior Member
 
Join Date: Sep 2007
Posts: 566
Default

Quote:
Originally Posted by Fnorder View Post
The setuid shell is added by means of chmodding /system/bin/sh. I'm not clear on the syntax for the 'concat' function that's apparently in the updater, so for safety's sake I won't try to make a copy. Regarding the other stuff....


Warning - Several people have bricked phones because a file that the updater intends to patch is either modified or missing. This includes otacerts.zip, so it would be a good idea to look through META-INF/com/google/android/update-script and make sure that none of the files listed have been tampered with.
You are right, otacerts.zip is one of the files they are patching. So we'd need to remove that applypatch line and leave our own copy on the file system. Or just leave it as is...
Reply With Quote

  #6  
Old 8th November 2008, 11:34 PM
Fnorder Fnorder is offline
Member
 
Join Date: Nov 2008
Posts: 49
Default

Quote:
Originally Posted by Koush View Post
You are right, otacerts.zip is one of the files they are patching. So we'd need to remove that applypatch line and leave our own copy on the file system. Or just leave it as is...
Or rename otacerts back to what it was, yeah.
Reply With Quote

  #7  
Old 9th November 2008, 12:02 AM
stephen.n.nikki stephen.n.nikki is offline
Junior Member
 
Join Date: Mar 2007
Posts: 23
Default

So, if we want the modified rc30 update, we absolutely have to have the modded recovery and boot imgs at the link you provided? Can we not have the option to simply resign the modified update and install it?
Reply With Quote

  #8  
Old 9th November 2008, 12:12 AM
Fnorder Fnorder is offline
Member
 
Join Date: Nov 2008
Posts: 49
Default

Quote:
Originally Posted by stephen.n.nikki View Post
So, if we want the modified rc30 update, we absolutely have to have the modded recovery and boot imgs at the link you provided? Can we not have the option to simply resign the modified update and install it?
Just the modified recovery.img, and yes it's required to install any modified update - since you don't have google's private key, you can't put google's signature on the update, and google's recovery only allows updates signed with that.
Reply With Quote

  #9  
Old 9th November 2008, 01:23 AM
stephen.n.nikki stephen.n.nikki is offline
Junior Member
 
Join Date: Mar 2007
Posts: 23
Default

So has anyone had success with, or even tried, your fix?
Reply With Quote

  #10  
Old 9th November 2008, 01:59 AM
Fnorder Fnorder is offline
Member
 
Join Date: Nov 2008
Posts: 49
Default

Quote:
Originally Posted by stephen.n.nikki View Post
So has anyone had success with, or even tried, your fix?
I'll know in a few minutes!
Reply With Quote

Reply

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 11:18 PM.


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