5,596,431 Members 39,345 Now Online
XDA Developers Android and Mobile Development Forum

Making RC30 safe

Tip us?
 
Fnorder
Old
(Last edited by Fnorder; 9th November 2008 at 01:50 AM.)
#1  
Senior Member - OP
Thanks Meter 316
Posts: 152
Join Date: Nov 2008
Location: Lake Vostok
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.
 
Koush
Old
(Last edited by Koush; 8th November 2008 at 09:26 PM.)
#2  
Recognized Developer
Thanks Meter 893
Posts: 917
Join Date: Sep 2007
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.
 
cookzitall
Old
#3  
Senior Member
Thanks Meter 5
Posts: 219
Join Date: Oct 2007
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?
 
Fnorder
Old
#4  
Senior Member - OP
Thanks Meter 316
Posts: 152
Join Date: Nov 2008
Location: Lake Vostok
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.
 
Koush
Old
#5  
Recognized Developer
Thanks Meter 893
Posts: 917
Join Date: Sep 2007
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...
 
Fnorder
Old
#6  
Senior Member - OP
Thanks Meter 316
Posts: 152
Join Date: Nov 2008
Location: Lake Vostok
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.
 
stephen.n.nikki
Old
#7  
Junior Member
Thanks Meter 0
Posts: 23
Join Date: Mar 2007
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?
 
Fnorder
Old
#8  
Senior Member - OP
Thanks Meter 316
Posts: 152
Join Date: Nov 2008
Location: Lake Vostok
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.
 
stephen.n.nikki
Old
#9  
Junior Member
Thanks Meter 0
Posts: 23
Join Date: Mar 2007
So has anyone had success with, or even tried, your fix?
 
Fnorder
Old
#10  
Senior Member - OP
Thanks Meter 316
Posts: 152
Join Date: Nov 2008
Location: Lake Vostok
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!

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


XDA PORTAL POSTS

Force Translucent Status Bar in KitKat ROMs with Xposed

It’s been a while since Android 4.4KitKat wasreleased, and we’re slowly … more

Fix the Ambient Light Issues on Your Google Nexus 5 using Xposed

The Google Nexus 5 is a great and rather popular device. This LG-produced … more

Google Glass XE16 Update Factory Image and Rooted Bootloader Now Available

You may recall that early yesterday, we talked about the XE16 … more