Backup+ Lets You Backup Your App Data on Android Lollipop

Even though Android 5.0 Lollipop hasn’t yet seen its official release, quite … more

TechTalk Compiles All the Android News You Need in One App

If you’re as obsessed with mobile devices as the vast majority of our forum … more

Android App Review: Google Inbox to Improve Your Life – XDA TV

Recently, Google+ exploded with the announcement of Google Inbox, as … more

Damp the LG G3 Thermal Throttling

As our mobile devices grow thinner and more powerfulwith each passing generation, it’s inevitable … more
Post Reply

Making RC30 safe

OP Fnorder

8th November 2008, 08:45 PM   |  #1  
OP Senior Member
Flag Lake Vostok
Thanks Meter: 318
 
153 posts
Join Date:Joined: Nov 2008
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 01:50 AM.
8th November 2008, 09:22 PM   |  #2  
Retired Recognized Developer
Thanks Meter: 894
 
917 posts
Join Date:Joined: 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.
Last edited by Koush; 8th November 2008 at 09:26 PM.
8th November 2008, 09:38 PM   |  #3  
Senior Member
Thanks Meter: 5
 
219 posts
Join Date:Joined: 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?
8th November 2008, 09:47 PM   |  #4  
OP Senior Member
Flag Lake Vostok
Thanks Meter: 318
 
153 posts
Join Date:Joined: Nov 2008
Quote:
Originally Posted by Koush

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.
8th November 2008, 09:56 PM   |  #5  
Retired Recognized Developer
Thanks Meter: 894
 
917 posts
Join Date:Joined: Sep 2007
Quote:
Originally Posted by Fnorder

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...
8th November 2008, 10:34 PM   |  #6  
OP Senior Member
Flag Lake Vostok
Thanks Meter: 318
 
153 posts
Join Date:Joined: Nov 2008
Quote:
Originally Posted by Koush

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.
8th November 2008, 11:02 PM   |  #7  
Junior Member
Thanks Meter: 0
 
23 posts
Join Date:Joined: 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?
8th November 2008, 11:12 PM   |  #8  
OP Senior Member
Flag Lake Vostok
Thanks Meter: 318
 
153 posts
Join Date:Joined: Nov 2008
Quote:
Originally Posted by stephen.n.nikki

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.
9th November 2008, 12:23 AM   |  #9  
Junior Member
Thanks Meter: 0
 
23 posts
Join Date:Joined: Mar 2007
So has anyone had success with, or even tried, your fix?
9th November 2008, 12:59 AM   |  #10  
OP Senior Member
Flag Lake Vostok
Thanks Meter: 318
 
153 posts
Join Date:Joined: Nov 2008
Quote:
Originally Posted by stephen.n.nikki

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

I'll know in a few minutes!

Post Reply Subscribe to Thread
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes