[How-To] Root LG Optimus S

Status
Not open for further replies.
Now I have a question. First of all, I'm rooted. I also have Superuser, Minfreemanager and drellisdee's Custom Recovery recovery-thunderc-s-RA-v1.2-GNM.img installed. I did all this with version zv9. Do I need to (or should I) upgrade to zvd? I'm happy to have root (and my wireless tethering which is what prompted me to root in the first place) and don't know if it's necessary to upgrade to a later version. If so, I've found this link, but I'm not completely sure which way is the best/safest. It appears that I can use either part-6 or part-8. Could someone please advise?
You didn't need to root to get wireless tethering in zv9. Just needed Hotspot Widget.

zvd will cause you to lose wireless tethering. You can run ThundeROM if you want it back.

Part 8 is simpler to do. It saves you the trouble of typing a bunch of commands.
 
If you have setuid root (-rwsr-xr-x 1 0 2000) on /system/bin/su there is no point in running rageagainstthecage

You cannot push files to /system/bin until you have run rageagainstthecage successfully

sfhub

Sorry about that. It was a long post and I should have just checked for the permissions in the /data/local/tmp directory where they are originally copied.

./busybox ls -la rageagainstthecage su busybox

should yield:

-rwsr-xr-x 1 2000 2000 1926944 Sep 30 2010 ?[1;32mbusybox?[0m
-rwsr-xr-x 1 2000 2000 5392 Nov 6 00:14 ?[1;32mrageagainstthecage?[0m
-rw-rw-rw- 1 2000 2000 26264 Oct 1 2010 ?[0;0msu?[0m
 
Last edited:
IMO it is easier to just flash a custom recovery and use the flashable zip in the ZVD thread. It works for any version.
 
help

ok i get to the step for "adb shell" and it says "error: closed" can anyone tell me what this means??:-\
 
awesome

had to use 3 different threads to get my phone rooted but it has worked now thnx a bunch was gona pay some guy 50$ to do it for me
 
Thanks a lot @mfldmike for the mac instructions, and thanks also to @pcubed for helping me understand the adb commands are to be run on the local m/c not *inside* the adb shell (which is unfortunately how you would understand if you read the mfldmike's instructions).

I can now see the "#" prompt when running adb, which indicates that it is rooted, but when I tried running Titanium backup, it complains that it couldn't acquire root access. I installer superuser after titanic backup, could that be the issue? However, when I installer superuser, it lists no apps, and I don't know how to add any app to the list. I would appreciate any help.

Never mind... I should have done this first before asking, but when I killed Titanium backup and started again, I got a prompt asking for superuser permissions, and it worked this time. I didn't know what to expect, so couldn't understand what was going on.

Now if I can find a solution to move those stubborn apps to SD, as I have only 18mb left in internal memory, it will be great.
 
Last edited:
Ok, I have a different question. After the rooting is done, can't we turn off the "USB Debugging" mode? I did that, and when I started Titanium backup the first time, I got a message that says "Warning - System configuration: Your system settings may cause problems. To correct this, go to your phone's Settings, then in "Applications" then in "Development" and tick the "USB debugging" checkbox."
 
Ok, I have a different question. After the rooting is done, can't we turn off the "USB Debugging" mode? I did that, and when I started Titanium backup the first time, I got a message that says "Warning - System configuration: Your system settings may cause problems. To correct this, go to your phone's Settings, then in "Applications" then in "Development" and tick the "USB debugging" checkbox."
I usually leave USB debugging turned on and only disable it temporarily if I want to use the phone as a USB card reader, then when I'm done, turn USB debugging back on.

It gives you more flexibility if something goes wrong.

As to whether you can turn it off, you should be able to unless you have something specific that requires it.

I think the Titanium warning about USB debugging relates to some older version of Superuser.apk that wasn't behaving right with USB debugging turned off, but I don't know for sure.

If it bothers you, I think you can turn off the warning in Titanium
MENU -> Preferences -> "Warn if no USB debug"
 
I tried the rageagainstthecage exploit and did everything. Now my device is not found, when I try adb shell. what can I do to finish rooting. I pushed all the files over and ran the exploit. It talks about how it's making babies and how I should donate.


It's because you didn't call me dude...HaHa!

lol, j/k bro
 
rage again?

So i know this has to have been asked before and I think I'm just missing it. I've come to this point using a phone with the new LCD so I'm sitting here running an adb session to a blank screen, not so bad though I suppose, least it beeps when it reconnects.

I perform all the steps and seem to not be getting a root prompt, if I understand I should simply try running rage again? Perhaps I read wrong, please fill me in, thanks.

Log as follows:
C:\Android\android-sdk-windows\platform-tools>dir
Volume in drive C has no label.
Volume Serial Number is D6BC-7CC7

Directory of C:\Android\android-sdk-windows\platform-tools

04/17/2011 10:39 PM <DIR> .
04/17/2011 10:39 PM <DIR> ..
04/17/2011 12:48 PM 5,381,520 aapt.exe
04/17/2011 12:48 PM 410,911 adb.exe
04/17/2011 10:39 PM 176,920 adb.zip
04/17/2011 12:48 PM 96,256 AdbWinApi.dll
04/17/2011 12:48 PM 60,928 AdbWinUsbApi.dll
04/17/2011 12:48 PM 1,344,051 aidl.exe
04/17/2011 04:38 PM 1,926,944 busybox
04/17/2011 12:48 PM 422,962 dexdump.exe
04/17/2011 12:48 PM 2,682 dx.bat
04/17/2011 04:25 PM 9,640 flash_image
04/17/2011 12:48 PM <DIR> lib
04/17/2011 12:48 PM 15,424,512 llvm-rs-cc.exe
04/17/2011 12:48 PM 10,800 NOTICE.txt
04/17/2011 04:38 PM 5,392 rageagainstthecage-arm5.bin
04/17/2011 12:48 PM 301 source.properties
04/17/2011 04:38 PM 26,264 su
03/17/2011 04:27 PM 4,960,256 xionia_cwma_12518.6.img
16 File(s) 30,260,339 bytes
3 Dir(s) 86,123,950,080 bytes free

C:\Android\android-sdk-windows\platform-tools>adb push rageagainstthecage-arm5.b
in /data/local/tmp/rageagainstthecage
277 KB/s (5392 bytes in 0.019s)

C:\Android\android-sdk-windows\platform-tools>adb push su /data/local/tmp/
732 KB/s (26264 bytes in 0.035s)

C:\Android\android-sdk-windows\platform-tools>adb push busybox /data/local/tmp/
2018 KB/s (1926944 bytes in 0.932s)

C:\Android\android-sdk-windows\platform-tools>adb shell
$ chmod 4755 /data/local/tmp/rageagainstthecage
chmod 4755 /data/local/tmp/rageagainstthecage
$ chmod 4755 /data/local/tmp/busybox
chmod 4755 /data/local/tmp/busybox
$ cd /data/local/tmp
cd /data/local/tmp
$ ./rageagainstthecage
./rageagainstthecage
[*] CVE-2010-EASY Android local root exploit (C) 2010 by 743C

[*] checking NPROC limit ...
[+] RLIMIT_NPROC={3374, 3374}
[*] Searching for adb ...
[+] Found adb as PID 78
[*] Spawning children. Dont type anything and wait for reset!
[*]
[*] If you like what we are doing you can send us PayPal money to
[*] 7-4-3-C@web.de so we can compensate time, effort and HW costs.
[*] If you are a company and feel like you profit from our work,
[*] we also accept donations > 1000 USD!
[*]
[*] adb connection will be reset. restart adb server on desktop and re-login.
$
C:\Android\android-sdk-windows\platform-tools>adb shell
$ ^C
C:\Android\android-sdk-windows\platform-tools>
 
So i know this has to have been asked before and I think I'm just missing it. I've come to this point using a phone with the new LCD so I'm sitting here running an adb session to a blank screen, not so bad though I suppose, least it beeps when it reconnects.

I perform all the steps and seem to not be getting a root prompt, if I understand I should simply try running rage again? Perhaps I read wrong, please fill me in, thanks.

Log as follows:
I suggest you use android screencast to see your screen and use z4root.apk android package to do the rooting.

rage depends on a race condition which doesn't always hit gold. It can take anywhere from 1-30+ attempts before it hits. z4root usually gets it much quicker.
 
z4 works, ty

Yeah, screen cast works perfectly as did z4 with a little bit of help from drew to push it to the phone. Thanks for the help.
 
hi need help after rooting.........holding volume down=HOME+pwr
android system recovery
E:canot read PERSIST:
(NO SPACE LEFT ON DEVICE)
THANK YOU FOR ANY HELP
 
hi need help after rooting.........holding volume down=HOME+pwr
android system recovery
E:canot read PERSIST:
(NO SPACE LEFT ON DEVICE)
THANK YOU FOR ANY HELP
Either your persist partition is corrupted or some temp directory is out of space.

If you can open an adb shell session, type
busybox df -k
and post the output.
 
sfhub this is what i got after adb shell......busybox df -k

Deposit Files

i took the info all and copy can you look but it didnot work..thank you
look at the pic on the link thank you
 
I've followed line-by-line, but as you see at the very end, I keep getting "not found". This is about the 6th try.....HELP!


adb help - show this help message
adb version - show version num

DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition

scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns

adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:

- If <directory> is not specified, both /system and /data partitions will be u
pdated.

- If it is "system" or "data", only the corresponding partition
is updated.

environmental variables:
ADB_TRACE - Print debug information. A comma separated list
of the following values
1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes prior
ity over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these de
bug tags are printed.

C:\Android\android-sdk\platform-tools>adb push su/data/local/tmp/
Android Debug Bridge version 1.0.26

-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <serial number> - directs command to the USB device or emulator w
ith
the given serial number. Overrides ANDROID_SERI
AL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.

If -p is not specified, the ANDROID_PRODUCT_OUT

environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number
is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number
is specified.
Using this ocmmand with no additional arguments

will disconnect from all connected TCP/IP devic
es.

device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport

adb install [-l] [-r] [-s] <file> - push this package file to the device and i
nstall it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
('-s' means install on SD card instead of inter
nal storage)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.

adb help - show this help message
adb version - show version num

DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition

scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns

adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:

- If <directory> is not specified, both /system and /data partitions will be u
pdated.

- If it is "system" or "data", only the corresponding partition
is updated.

environmental variables:
ADB_TRACE - Print debug information. A comma separated list
of the following values
1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes prior
ity over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these de
bug tags are printed.

C:\Android\android-sdk\platform-tools>adb push busybox/data/local/tmp/
Android Debug Bridge version 1.0.26

-d - directs command to the only connected USB devic
e
returns an error if more than one USB device is
present.
-e - directs command to the only running emulator.
returns an error if more than one emulator is r
unning.
-s <serial number> - directs command to the USB device or emulator w
ith
the given serial number. Overrides ANDROID_SERI
AL
environment variable.
-p <product name or path> - simple product name like 'sooner', or
a relative/absolute path to a product
out directory like 'out/target/product/sooner'.

If -p is not specified, the ANDROID_PRODUCT_OUT

environment variable is used, which must
be an absolute path.
devices - list all connected devices
connect <host>[:<port>] - connect to a device via TCP/IP
Port 5555 is used by default if no port number
is specified.
disconnect [<host>[:<port>]] - disconnect from a TCP/IP device.
Port 5555 is used by default if no port number
is specified.
Using this ocmmand with no additional arguments

will disconnect from all connected TCP/IP devic
es.

device commands:
adb push <local> <remote> - copy file/dir to device
adb pull <remote> [<local>] - copy file/dir from device
adb sync [ <directory> ] - copy host->device only if changed
(-l means list but don't copy)
(see 'adb help all')
adb shell - run remote shell interactively
adb shell <command> - run remote shell command
adb emu <command> - run emulator console command
adb logcat [ <filter-spec> ] - View device log
adb forward <local> <remote> - forward socket connections
forward specs are one of:
tcp:<port>
localabstract:<unix domain socket name>
localreserved:<unix domain socket name>
localfilesystem:<unix domain socket name>
dev:<character device name>
jdwp:<process pid> (remote only)
adb jdwp - list PIDs of processes hosting a JDWP transport

adb install [-l] [-r] [-s] <file> - push this package file to the device and i
nstall it
('-l' means forward-lock the app)
('-r' means reinstall the app, keeping its data
)
('-s' means install on SD card instead of inter
nal storage)
adb uninstall [-k] <package> - remove this app package from the device
('-k' means keep the data and cache directories
)
adb bugreport - return all information from the device
that should be included in a bug report.

adb help - show this help message
adb version - show version num

DATAOPTS:
(no option) - don't touch the data partition
-w - wipe the data partition
-d - flash the data partition

scripting:
adb wait-for-device - block until device is online
adb start-server - ensure that there is a server running
adb kill-server - kill the server if it is running
adb get-state - prints: offline | bootloader | device
adb get-serialno - prints: <serial-number>
adb status-window - continuously print device status for a specifie
d device
adb remount - remounts the /system partition on the device re
ad-write
adb reboot [bootloader|recovery] - reboots the device, optionally into the boo
tloader or recovery program
adb reboot-bootloader - reboots the device into the bootloader
adb root - restarts the adbd daemon with root permissions
adb usb - restarts the adbd daemon listening on USB
adb tcpip <port> - restarts the adbd daemon listening on TCP on th
e specified port
networking:
adb ppp <tty> [parameters] - Run PPP over USB.
Note: you should not automatically start a PPP connection.
<tty> refers to the tty for PPP stream. Eg. dev:/dev/omap_csmi_tty1
[parameters] - Eg. defaultroute debug dump local notty usepeerdns

adb sync notes: adb sync [ <directory> ]
<localdir> can be interpreted in several ways:

- If <directory> is not specified, both /system and /data partitions will be u
pdated.

- If it is "system" or "data", only the corresponding partition
is updated.

environmental variables:
ADB_TRACE - Print debug information. A comma separated list
of the following values
1 or all, adb, sockets, packets, rwx, usb, sync
, sysdeps, transport, jdwp
ANDROID_SERIAL - The serial number to connect to. -s takes prior
ity over this if given.
ANDROID_LOG_TAGS - When used with the logcat option, only these de
bug tags are printed.

C:\Android\android-sdk\platform-tools>adb shell
$ chmod 4755/data/local/tmp/rageagainstthecage
chmod 4755/data/local/tmp/rageagainstthecage
Usage: chmod <MODE> <FILE>
$ chmod 4755/data/local/tmp/busybox
chmod 4755/data/local/tmp/busybox
Usage: chmod <MODE> <FILE>
$ cd/data/local/tmp
cd/data/local/tmp
cd/data/local/tmp: not found
$ ./rageagainstthecage
./rageagainstthecage
./rageagainstthecage: not found
$
 
C:\Android\android-sdk\platform-tools>adb shell
$ chmod 4755/data/local/tmp/rageagainstthecage
chmod 4755/data/local/tmp/rageagainstthecage
Usage: chmod <MODE> <FILE>
$ chmod 4755/data/local/tmp/busybox
chmod 4755/data/local/tmp/busybox
Usage: chmod <MODE> <FILE>
$ cd/data/local/tmp
cd/data/local/tmp
cd/data/local/tmp: not found
$ ./rageagainstthecage
./rageagainstthecage
./rageagainstthecage: not found
$
You are missing the spaces between the parameters:
$ chmod 4755/data/local/tmp/rageagainstthecage
$ chmod 4755/data/local/tmp/busybox
$ cd/data/local/tmp
should be
$ chmod 4755 /data/local/tmp/rageagainstthecage
$ chmod 4755 /data/local/tmp/busybox
$ cd /data/local/tmp
 
oops...where's that *smack-my-head* smiley?! lol I'm sleepy.....thanks though. I'll try again. I thought it didn't look quite right.
 
Status
Not open for further replies.