Actions

Sprint LG Optimus S Root and ROM Replacement

From falz.net

Revision as of 10:19, 9 July 2014 by Falz (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


After rooting an HTC Hero, the phone was upgraded to an LG Optimus S. Below are instructions. Rooting was done from a Linux laptop, you should be able to root using any OS the Android SDK runs on (Windows, OSX, Linux).

Overview

Detailed Instructions

Rooting

Original instructions found here.

  • Install the Android SDK for your OS. In my case I just grabbed the linux .tgz and extracted it into a directory
  • run tools/android which will launch a GUI.
  • Choose Available Packages -> Android Repository. I installed Android SDK Tools, Android SDK Platform-tools and SDK Platform Android 2.2. Platform-tools requires adb which is used for this process.
  • Close the GUI
  • Plug your LG Optimus S into your PC with a USB cable.
  • Get OptimusRoot.zip, extract it and you should have three files: su, busybox, rageagainstthecage-arm5.bin. These files will be pushed to the phone in a moment.
  • Enable USB debugging from Settings -> Applications -> Development.
  • Run sudo tools/adb start-server from your command prompt. This is a daemon that talks to your Android phone. You should see something like:
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
  • Push the files from OptimusRoot.zip to the phone:
platform-tools/adb push /path/to/rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage
platform-tools/adb push /path/to/su /data/local/tmp/
platform-tools/adb push /path/to/busybox /data/local/tmp/
  • Start a shell to the phone:
platform-tools/adb shell
  • You should now be at a $ prompt, which is a shell on the phone. Set permissions:
chmod 4755 /data/local/tmp/rageagainstthecage
chmod 4755 /data/local/tmp/busybox
  • Finally run the app that will root the phone.
cd /data/local/tmp
./rageagainstthecage
  • The above step will give a warning and kill your adb shell. Wait about two minutes (really) and run adb shell again. This time you should be at a root prompt (#). If not start over from
  • Since you have root access you can remount the filesystem as read write and copy files to it:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock4 /system 
cd /data/local/tmp
./busybox cp su /system/bin
./busybox cp busybox /system/bin
cd /system/bin
chmod 4755 su
chmod 4755 busybox
  • Install Superuser app immediately. This app will allow you to give superuser access to files that have been installed, mainly su.
  • If you were to reboot the phone (you don't have to at this point) and get back into an adb shell you will be at a non-root prompt ($). Run su, the superuser app will light up on your phone and ask you to permit it. Do this and you won't have to again. This is how you get back as root.


Backup

  • Install Titanium backup.
  • Go to Settings-> Batch. Run Backup all user apps + system data. It will take a while


Recovery Partition

Original instructions found here. Note that this thread talks about a recovery version 1.1.2 but this version did not work for me so we are using v 1.1.0.

  • Download flash_image.zip and recovery-RA-GNM-thunderc-s.1.1.0.img.zip.
  • unzip flash_image.zip which will give you a file simply called flash_image. Place this on the root of your SD card.
  • unzip recovery-RA-GNM-thunderc-s-1.1.0.img.zip, you will have a file called recovery-RA-GNM-thunderc-s-1.1.0.img. Place this on the root of your SD card.
  • Start a shell with the phone with platform-tools/adb shell. You should be at a # prompt. If not, run su and look at your phone to ensure it has been permitted by the Superuser App.
  • Remount filesystem to read write:
mount -o remount,rw -t yaffs2 /dev/block/mtdblock5 /system
  • Copy flash_image file
cat /sdcard/flash_image > /system/bin/flash_image
chmod 755 /system/bin/flash_image
  • Rename a recovery file. Note that my phone did not have this. If yours doesn't don't worry.
mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak
  • Remount filesystem as read only
mount -o remount,ro -t yaffs2 /dev/block/mtdblock5 /system
  • Finally install the recovery image
flash_image recovery /sdcard/recovery-RA-GNM-thunderc-s-1.1.0.img
  • Now reboot into the recovery
reboot recovery
  • If the above doesn't work, power off your phone. Hold down VOL_DOWN and HOME and POWER. Release VOL_DOWN and HOME when you see the LG logo.
  • Your phone should boot into a text screen. Navigate with the Volume keys, settings button for OK, back button for back.
  • Perform a Nand Backup


ROM

Original instructions found here

  • You need to have ThundeROM_V1.5.zip in the root of your SD Card.
  • Get into the Recovery mode per instructions above. Ensure you did the Nand Backup per above.
  • Choose Wipe and wipe data, cache, dalvik. This wiped your phone (not SD card)
  • Choose Flash Zip from sdcard, point it to ThundeROM_V1.5.zip. Flashing will take about 5 minutes.
  • Reboot into your new ROM.


Restore

  • Install Titanium backup again.
  • Go to Settings-> Batch. Run Restore missing apps + all system data. Every app that is installed will make you choose OK just like you were downloading it from the market. This step may take 15 minutes or so depending on what you had on your phone.
  • A few of the apps it installed it gave an extra warning saying it was a system app. I chose not to overwrite those and things worked fine. YMMV.
  • The only glitch I noticed was that widgets on my home screens said they couldn't load. I manually removed and re-added them and all was fine.