Keeping Root

From Android Wiki

(Difference between revisions)
Jump to: navigation, searcha
(Using pre-modified RC30)
(Using pre-modified RC30)
Line 4: Line 4:
JesusFreke has created a pre-modified version of RC30 that you can use if you do not wish to manually edit it yourself.
JesusFreke has created a pre-modified version of RC30 that you can use if you do not wish to manually edit it yourself.
* If you copy files over USB to /sdcard remember to unmount before unplugging the USB.
* If you copy files over USB to /sdcard remember to unmount before unplugging the USB.
-
* Download the [http://android-dls.com/files/linux/AndroidMod.xxx recovery image] and rename it to a .zip (used xxx to fix G1 download problems), unzip the file, copy (or adb push) recovery_testkeys.img to /sdcard
+
* Download the [http://android-dls.com/files/linux/AndroidMod.xxx recovery image] and rename it to a .zip ([[Android Browser File Types|xxx is used to allow Android browser to download]]), unzip the file, copy (or adb push) recovery_testkeys.img to /sdcard
-
* Download the [http://android-dls.com/files/apps/update-RC30-fullupdate-modified-testkeys-v1.1.zip Modified RC30 from JesusFreke] (Do not unzip it!)
+
* Download the [http://android-dls.com/files/apps/update-RC30-fullupdate-modified-testkeys-v1.1.xxx Modified RC30 from JesusFreke] rename it to .zip ([[Android Browser File Types|xxx is used to allow Android browser to download]]), (Do not unzip it!)
* copy (or adb push) update-RC30-fullupdate-modified-testkeys-v1.1.zip to /sdcard/update.zip
* copy (or adb push) update-RC30-fullupdate-modified-testkeys-v1.1.zip to /sdcard/update.zip
* with a root shell run:  
* with a root shell run:  

Revision as of 10:58, 11 November 2008

These methods can only be done on RC29 or lower. If you are already on RC30 this will NOT work for you and you must wait for the next root exploit to be found.

Using pre-modified RC30

JesusFreke has created a pre-modified version of RC30 that you can use if you do not wish to manually edit it yourself.

mount -o remount rw /system

cd /system

cat /sdcard/recovery_testkeys.img > recovery.img

flash_image recovery recovery.img 
  • turn off phone
  • Hold down power and home to enter recovery mode
  • At the exclamation point and phone image hit Alt-L look for test-keys on the second line. If missing the above steps failed. Start over, make sure that when you use copy over USB that you unmount before unplugging.
  • hit Alt+S. System should show an open box and arrow into phone, then a arrow onto a chip, then reboot twice.
  • Once you are booted it is suggested that you do the following to stop OTA updates from attempting (and failing) to update your phone:
mv /system/etc/security/otacerts.zip /system/etc/security/otacerts.zip.nothankyou

This will give you an rc30 that has 'su' for gaining root access. (Not quite the same thing you get with the manual steps below.)

More information and updates can be found on the original thread at XDA-Developers

Manually modifying your own RC30

  1. Download the recovery image
  2. Flash the recovery image
  3. Unzip the FULL RC30
  4. Replace the /system/recovery.img with the one from step 1.
  5. 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"


Then 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 will brick your device at this stage.

Resign with the utility provided in the zip file from step 1, copy it to your SD card, enter recovery, and pray. If it works, you can run the following from the terminal app (not pterminal) /system/bin/rootshell

  • in terminal (as root) do:
mv /system/etc/security/otacerts.zip /system/etc/security/otacerts.zip.nothankyou

It is not yet known if this last step is needed, but better safe then derooted

This has been successfully tested, but as always, perform these steps at your own risk.

Personal tools