[How-To] Root LG Optimus S

Status
Not open for further replies.

KSmithInNY

#winning
Oct 7, 2009
3,538
1,441
0
Visit site
[note]The new rooting instructions can be found http://forum.androidcentral.com/lg-...d-gingerbreak-no-reverting-ota-works-too.html [/note]



WARNING - This is a cat and mouse game we play with manufacturers. I guarantee you an update will come from LG that patches this exploit and will prevent people from rooting. It will also close your root access if you've already rooted using this method. Long story short, NEVER ACCEPT OTA UPDATES FROM THE CARRIER OR MANUFACTURER.


As my prediction above stated ......
WARNING WARNING!!! Sprint is pushing out an updated named LS670ZVC starting on 2/7/2011. This update breaks this root process. Open Menu > Settings > about phone > if SW Version = LS670ZVC then this process will not work for you. WARNING WARNING!!!

Notice: There is now an application available called z4root which roots your phone using the same method detailed below. This has been confirmed to work on the Optimus line. Click THIS for more information. I feel the knowledge gained by doing this process yourself rather than a 1-click method will prove to be invaluable down the road if/when you encounter any issues but either way works.

To MAC users: Please see THIS POST by mfldmike to get you going.

For those who learn visually, iamlilysdad has put together an awesome walkthrough video of this process which you can find HERE

Complete Idiots guide to Rooting the Optimus S can be found HERE. Thanks Dishe.

What You'll Need:
- Sun JRE, FOUND HERE
- The Android SDK, FOUND HERE. Install this on the root of your computer so the path is C:/android
- Drivers for the LG phone installed on your computer. Instructions can be FOUND HERE courtesy of our favorite android hacker, modder, developer, blogger (jack of all trades) gbhil
- And the file I have attached to this post. Download it, unzip it, and put the 3 files inside in your android-sdk-windows\tools folder created from installing the SDK.

/\You need to have installed/done all of the stuff in the "what you'll need" section. From this point on I'll assume you've done that./\

This method has been confirmed on V6, V8, and V9 versions of the Optimus S software.
Ready?:
Step 1: Plug your phone into your PC with the USB cable.

Step 2: Make sure the phone is charge only (don't mount as USB drive) and USB debugging is enabled. Menu > Settings > Applications > Development > check mark USB debugging

Step 3: Launch the SDK manager, should be something like C:/Android-sdk-windows SDK Manager

Step 4: Open a CMD window and type the following:
cd c:\wherever-your-sdk-tools-folder-is (mine for example is C:\android\tools however in the new SDK the correct directory would be "Platform Tools", and not just "tools". See what you have on your directory)
adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage
adb push su /data/local/tmp/
adb push busybox /data/local/tmp/
adb shell
chmod 4755 /data/local/tmp/rageagainstthecage
chmod 4755 /data/local/tmp/busybox
cd /data/local/tmp
./rageagainstthecage (let things sit a couple minutes (2), your phone will disconnect from the computer and you'll be removed from your ADB session)
adb shell This should return a "#" symbol instead of a "$" symbol. If it does you're good. If not go back and start from the beginning of step 4
mount -o remount,rw -t yaffs2 /system /system
cd /data/local/tmp
./busybox cp su /system/bin
./busybox cp busybox /system/bin
cd /system/bin
chmod 4755 su
chmod 4755 busybox
exit
exit

Step 5: Go to the android market on your phone and download "Superuser"(free). The developer will be listed as ChainsDD.

Donations:
What I ask is, if this helps you root, tweak, or modify your phone, please watch this thread and help someone who may be experiencing issue. Yes, I am asking you to donate your time. The same donation I made while writing this so you could root your phone :D

Thanks:
gbhil - as always thanks, you rock rainman lol.
Sebastian Krahmer - Without your exploit many phones would not be rooted today.
iamlilysdad - for making the walkthrough video and sticking around and providing so much support for new users during this process.
 
Last edited:

KSmithInNY

#winning
Oct 7, 2009
3,538
1,441
0
Visit site
Everything in this post assumes you've successfully rooted your phone.
Now what?:

-Memory Management -
The optimus has not so great lowmemory settings. This will improve that.
1) Download the free app from the market called "Minfreemanager" (free)
2) Launch the app and you'll notice the following numbers:
6, 8, 16, 20, 22, 24

For an explanation of what these numbers mean GO HERE and read an excellent in-depth explanation by Jerry Hildenbrand

3) From inside Minfreemanager hit the menu button and select "presets". Because you have a second gen device, you can select "aggressive" without a care in the world.
4) After selecting aggressive the numbers should now reflect
6, 8, 16, 32, 64, 96
5) Press the menu button and select "apply"
NOTE - This is not a sticky change and even if you select "apply at boot" it will not work. Every time the device is rebooted you will need to open the minfreemanager app and re-apply the aggressive setting but this should keep you're phone running like butter

-Cache Management-
Android has a tendency to cache everything it seems like. Now you can reclaim that space.
There are 2 really great cache cleaning apps for rooted users. CacheMate for root users and Cachecleaner. Both can be obtained for free but cacheMate for root users has a paid version which gives you much much more customization and caches available to be cleaned. Also i prefer the free version of CacheMate over the free version Cachecleaner because it lets you pick which caches you'd like deleted, cachecleaner does not. Thats just a preference of mine.

Custom Recovery
If you're planning on flashing ROMs or kernels you're going to need a custom recovery. Hopefully you didnt take the z4root shortcut cause guess what? Thats right .... bust out ADB and go HERE :p

Flash a ROM
Assuming you have a custom recovery (see above) maybe you'll want to flash a ROM. Beezy and myself are proud to introduce the first custom ROM for the Optimus S, ThundeROM!

Enabling JIT, Stagefright, or both
If you flash ThundeROM, you already will have JIT and stagefright enabled which will make your phone perform even faster! But maybe you want to stick with the stock ROM but still want JIT and Stagefright ... what to do what to do? Alright, HERE YOU GO. Flashable buildprops with JIT and stagefright. You must have a custom recovery to do this.


Reminder about Donations:
What I ask is, if this helps you root, tweak, or modify your phone, please watch this thread and help someone who may be experiencing issue. Yes, I am asking you to donate your time. The same donation I made while writing this so you could root your phone :D
 
Last edited:

hephaestus

Member
Nov 6, 2010
6
5
0
Visit site
Thanks for the writeup, KSmith!

I hit a snag whenever I have Superuser check for an update to su. It finds a newer binary, but then spits out:

"Automatic update failed
An error occurred and su was not updated. A zip file (su-2.3.1-bin-signed.zip) has been placed on your sdcard, please reboot into recovery mode and flash it to update your su binary."

I would adb push the su from Droid2Root.rar but I don't know where android keeps its su (by parallel to *nix, it should be in /usr/local/bin, but I don't know). Should I instead reboot into recovery or is there a faster way?
 

KSmithInNY

#winning
Oct 7, 2009
3,538
1,441
0
Visit site
Thanks for the writeup, KSmith!

I hit a snag whenever I have Superuser check for an update to su. It finds a newer binary, but then spits out:

"Automatic update failed
An error occurred and su was not updated. A zip file (su-2.3.1-bin-signed.zip) has been placed on your sdcard, please reboot into recovery mode and flash it to update your su binary."

I would adb push the su from Droid2Root.rar but I don't know where android keeps its su (by parallel to *nix, it should be in /usr/local/bin, but I don't know). Should I instead reboot into recovery or is there a faster way?

I want to see if yours is an isolated incident or not but it's a really easy fix. Don't worry :)

I don't wanna lengthen the instructions until i hear back from someone else to see if they have the same issue

EDIT - Do me a favor, try doing busybox through titanium first then try the SU binary through the superuser app
 
  • Like
Reactions: androidgoddess

hephaestus

Member
Nov 6, 2010
6
5
0
Visit site
Okay, great. If you want to tighten up the instructions even more, you could include the default directory name for android sdk:

cd C:/android-sdk-windows/tools

and also condense the next few steps to:

adb push rageagainstthecage-arm5.bin /data/local/tmp/rage
adb shell
cd /data/local/tmp/; chmod 4755 rage; ./rage


This way, if 743C's exploit doesn't work the first time around, it's easier to re-run the commands because they're daisy chained.

Have you had any success with installing the flash 10.1 apk?
 

KSmithInNY

#winning
Oct 7, 2009
3,538
1,441
0
Visit site
Okay, great. If you want to tighten up the instructions even more, you could include the default directory name for android sdk:

cd C:/android-sdk-windows/tools

Not everyone uses that path. Me, for example, does not use that file path (I'm android\tools). If i were to put that path and thats not the users path and they don't have the foresight to catch it, it could cause confusion.

and also condense the next few steps to:

adb push rageagainstthecage-arm5.bin /data/local/tmp/rage
adb shell
cd /data/local/tmp/; chmod 4755 rage; ./rage

Good suggestion, i could certainly do that but I'm more concerned right now with getting feedback on if it works for everyone. Once I have that I can certainly make changes.


Have you had any success with installing the flash 10.1 apk?

Haven't tried yet, I've been fairly busy with other stuff and flash is very low on my list right now. Have a crack at it and see what you get. Take something off my plate please :p
 

KSmithInNY

#winning
Oct 7, 2009
3,538
1,441
0
Visit site
Try this. Download attached zip and put su and busybox binary in tools directory

adb push su /data/local/tmp/
adb push busybox /data/local/tmp/
adb shell
chmod 4755 /data/local/tmp/busybox
cd /data/local/tmp
adb shell
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
busybox --install /system/bin
exit
exit
 
Last edited:

ws1088

Active member
Nov 6, 2010
39
1
0
Visit site
Step 6: (optional) Go back to the market and download "Titanium Backup" (free version). Do the following:
-Open the titanium Backup application after it downloads
-grant it Super User permission
-You should have a pop-up screen in front of you and one of the buttons on the bottom should say "problems". Click that.
-You can now delete titanium backup although the developer is a great guy and we recommend you consider purchasing the full app.

May I ask what's the purpose of step 6? Thanks!
 

KSmithInNY

#winning
Oct 7, 2009
3,538
1,441
0
Visit site
May I ask what's the purpose of step 6? Thanks!

To ensure the busybox binary installed is the most recent. I will not continue to update the zip as advances are made. Jo?l on the other hand keeps his application up to date. The superuser.apk from chains will keep the SU binary up to date. Titanium will keep the busybox up to date. Remember, just because you're rooting today and the busybox is up to date, doesn't mean someone won't use these instructions 6 months from now at which time there may be an update ;)

"Hope for the best, plan for the worst"

Cheers

EDIT - For now because i am using the most recent busybox I'm just going to remove that. Because I will be working on a ROM team (yes, all you AC-ROM folks) I will know if anything changes. If it does I'll just throw step 6 back up .... or I could not be lazy and update the zip if anything changes lol. I'll figure it out.
 
Last edited:
  • Like
Reactions: eworks

ws1088

Active member
Nov 6, 2010
39
1
0
Visit site
EDIT - For now because i am using the most recent busybox I'm just going to remove that. Because I will be working on a ROM team (yes, all you AC-ROM folks) I will know if anything changes. If it does I'll just throw step 6 back up .... or I could not be lazy and update the zip if anything changes lol. I'll figure it out.

Thanks alot. The fact that you are onboard on Optimus S make me really wants to get this phone!
 
  • Like
Reactions: KSmithInNY

smccloud

Well-known member
Oct 30, 2009
939
34
28
Visit site
Hey All .... were having some technical difficulties which are preventing me from updating the first post. When those issues are corrected i will delete this post and edit the first.

What You'll Need:
- Sun JRE, FOUND HERE
- The Android SDK, FOUND HERE. Install this on the root of your computer so the path is C:/android
- Drivers for the LG phone installed on your computer. Instructions can be FOUND HERE courtesy of our favorite android hacker, modder, developer, blogger (jack of all trades) gbhil
- And the file I have attached to this post. Download it, unzip it, and put the 3 files inside in your android/tools folder created from installing the SDK.

/\You need to have installed/done all of the stuff in the "what you'll need" section. From this point on I'll assume you've done that./\

Ready?:
Step 1: Plug your phone into your PC with the USB cable.

Step 2: Make sure the phone is charge only (don't mount as USB drive) and USB debugging is enabled. Menu > Settings > Applications > Development > check mark USB debugging

Step 3: Launch the SDK manager, should be something like C:/Android-sdk-windows SDK Manager

Step 4: Open a CMD window and type the following:
cd c:/wherever-your-sdk-tools-folder-is (mine for example is C:/android/tools)
adb push rageagainstthecage-arm5.bin /data/local/tmp/rageagainstthecage
adb push su /data/local/tmp/
adb push busybox /data/local/tmp/
adb shell
chmod 4755 /data/local/tmp/rageagainstthecage
chmod 4755 /data/local/tmp/busybox
cd /data/local/tmp
./rageagainstthecage (let things sit a couple minutes (2), your phone will disconnect from the computer and you'll be removed from your ADB session)
adb shell This should return a "#" symbol instead of a "$" symbol. If it does you're good. If not go back and start from the beginning of step 4
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
busybox --install /system/bin
exit
exit

Step 5: Go to the android market on your phone and download "Superuser"(free). The developer will be listed as ChainsDD.

Thanks:
gbhil - as always thanks, you rock rainman lol.

I never get the # prompt, tried 3 times now. Could it be due to me launching the SDK Manager from the command prompt?
 
Status
Not open for further replies.

Forum statistics

Threads
943,146
Messages
6,917,510
Members
3,158,843
Latest member
samyblaze