Jump to content

My LG Optimus 2X root / hack / dev progress / findings braindump


Guest PaulOBrien

Recommended Posts

Hey all!

This is a topic where i'm dumping all my findings re: the LG Optimus 2X. :D I'll be continually updating / extending this post, if you have any questions, feel free to post them below.

P

Root

Root on the LG 2X is easy. It's vulnerable to the psneuter exploit, after which su and Superuser APK can be pushed to a remounted system partition.

Partitions / Filesystems

The key partitions are as follows:

/dev/block/mmcblk0p1 = system partition
/dev/block/mmcblk0p2 = cache partition
/dev/block/mmcblk0p3 = misc partition
/dev/block/mmcblk0p4 = unknown partition
/dev/block/mmcblk0p5 = boot partition
/dev/block/mmcblk0p6 = lgdrm partition
/dev/block/mmcblk0p7 = recovery partition
/dev/block/mmcblk0p8 = data partition
/dev/block/mmcblk0p9 = internal SD partition[/code] The kernel has support for EXT2/EXT3 filesystems (no EXT4 support). All of the key partitions are EXT3. Partition sizes are as follows:
[code]/lgdrm: 2472K total
/system: 338924K total
/data: 1523328K total
/cache: 63472K total
/misc: 1976K total
/sdcard: 5773920K total
Boot image / recovery The 2X does have conventional boot and recovery images. The BOARD_KERNEL_BASE is 0x10000000 and the page size is 0x800. I have successfully reconstructed the boot image and flashed using 'dd' with no problems! The boot partition has a capacity of 8388608 bytes, which gives plenty of scope for doing clever stuff in the boot image. The recovery partition is 20971520 bytes in size, which is unusually large. UPDATE: Holding down volume down + power throughout boot boots to recovery! Memory Memory available is as follows:
# free
total
Mem: 381372[/code]

[b]Kernel[/b]

The kernel version on the ROM I am currently running (see below) is 2.6.32.9. The source for the kernel is not currently available, however LG have made the source available for the Korean version of the device (SU660) - I have yet to compile and test this on the P990.

Thankfully, CONFIG_IKCONFIG_PROC is enabled in the kernel so it's possible to view the kernel config - i've uploaded it to pastebin here.

[b]Flashing[/b]

The device can be flashed in two main ways - using the standard LG flashing tool or using NVFlash. I have tested both methods. The images flashed using NVFlash do not appear to be signed. In addition, partitions can be flashed using the 'dd' method (I have tested this to overwrite the boot image).

[b]ClockworkMod[/b]

I am currently testing a ClockworkMod release for the 2X.

[b]OS[/b]

The 2X is running a customised Android 2.2.2 (FRG83G) release as standard. Gingerbread is coming shortly!

[b]ROM versions[/b]

[to follow]

Link to comment
Share on other sites

  • Replies 82
  • Created
  • Last Reply

With the possibility of looking stupid, regarding the recovery, i can get into a menu called "Android System Recovery <3e>"

To do so i did the following:

Press Power + Vol. Down and hold them down.

After some time the android with a box will appear

If you do nothing it will simply reboot after a while, but if you press home it will start formatting the data partition, if you press home again it will format som extra partitions, after that you can enter the recovery menu by pressing home a third time.

Currently i've not been able to access any of the functions though.

Link to comment
Share on other sites

With the possibility of looking stupid, regarding the recovery, i can get into a menu called "Android System Recovery <3e>"

To do so i did the following:

Press Power + Vol. Down and hold them down.

After some time the android with a box will appear

If you do nothing it will simply reboot after a while, but if you press home it will start formatting the data partition, if you press home again it will format som extra partitions, after that you can enter the recovery menu by pressing home a third time.

Currently i've not been able to access any of the functions though.

Oooh, great stuff, that looks like it could be what we're looking for! Will investigate further...

P

Link to comment
Share on other sites

With the possibility of looking stupid, regarding the recovery, i can get into a menu called "Android System Recovery <3e>"

To do so i did the following:

Press Power + Vol. Down and hold them down.

After some time the android with a box will appear

If you do nothing it will simply reboot after a while, but if you press home it will start formatting the data partition, if you press home again it will format som extra partitions, after that you can enter the recovery menu by pressing home a third time.

Currently i've not been able to access any of the functions though.

Genius, it works. Flashed ClockworkMod to partition 7 and booted it using the above key combo. WIN!

P

Link to comment
Share on other sites

Genius, it works. Flashed ClockworkMod to partition 7 and booted it using the above key combo. WIN!

P

When you have a device which's functionality have been limited to rebooting you pick a few things up :D

Couldn't interact with anything in the standard recovery though, but hopefully that won't be a problem in CWM.

Link to comment
Share on other sites

When you have a device which's functionality have been limited to rebooting you pick a few things up :D

Couldn't interact with anything in the standard recovery though, but hopefully that won't be a problem in CWM.

I can select and use stuff in CWM. :D

P

Link to comment
Share on other sites

I can select and use stuff in CWM. :D

P

Paul you got the full rom? So people can flash if they brick the phone or delete apps which they shouldn't delete.

Just like the RUU's from HTC.

Link to comment
Share on other sites

Guest huffe
With the possibility of looking stupid, regarding the recovery, i can get into a menu called "Android System Recovery <3e>"

To do so i did the following:

Press Power + Vol. Down and hold them down.

After some time the android with a box will appear

If you do nothing it will simply reboot after a while, but if you press home it will start formatting the data partition, if you press home again it will format som extra partitions, after that you can enter the recovery menu by pressing home a third time.

Currently i've not been able to access any of the functions though.

Folks beware, Power + Vol. Down is equal to a factory reset. (Even if you don't press home or something else.)

Link to comment
Share on other sites

Paul you got the full rom? So people can flash if they brick the phone or delete apps which they shouldn't delete.

Just like the RUU's from HTC.

Yeah.

P

Link to comment
Share on other sites

Guest djmcnz
Genius, it works. Flashed ClockworkMod to partition 7 and booted it using the above key combo. WIN!

P

Paul,

To pre-empt your releases, can you provide some basics on getting NVFlash to work so we're ready?

At the moment I just get 'no USB device' reported by NVFlash although the phone is detected by the PC.

Link to comment
Share on other sites

Guest indyjones

Hi Paul apologies this is slightly off topic, from your tweets you seem to he liking this device and I am pleased to see your making excellent progress with root and custom roms.! My question is how does this compair to a HTC device? Been using them for years and currently on a desire but the new ones are a bit meh..... also I like this form factor I don't want to jam a giant device in my pocket ..... anyway you thoughts on this will be appreciated.

Link to comment
Share on other sites

Folks beware, Power + Vol. Down is equal to a factory reset. (Even if you don't press home or something else.)

Sorry for any trouble i caused for people, but i didn't know since my device was bricked anyway :D

Could explain why i lost adb connectivity though.

Link to comment
Share on other sites

Guest djmcnz
Paul,

To pre-empt your releases, can you provide some basics on getting NVFlash to work so we're ready?

At the moment I just get 'no USB device' reported by NVFlash although the phone is detected by the PC.

I didn't really have to do anything specific to get it detected on my box...

P

Okay, then I can keep playing. Do you mind providing a few of your environment details and how you checked your connectivity?

This is the first LG device I've owned and am somewhat unsure of what I should expect to do to set this up.

1. Should the phone be in S/W Update Mode, Recovery Mode or an alternative? If alternative, how is that accessed?

2. I'm assuming that adb doesn't actually need to be working because we're working at a lower level.

3. I'm testing by using "nvflash --sync" (to sync nothing) and get 'no device' - is this a suitable test?

4. Are you using the NV bootloader or recovery "driver" or something else?

I'm happy to write a 'how to' for your forum but would need to prove it worked before publishing it! :D I'm sure a whole lot of people will want this info... unless there's an existing resource somebody could point me to?

TIA

PS - I don't want to distract you from your more important tasks but this may well be a prerequisite for benefiting from your efforts...

Link to comment
Share on other sites

Guest djmcnz
Just done my first ClockworkMod backup on the 2X. :D

P

This is agony... :D

I will throw my phone at the mercy of any test software since it's a bouncy brick at the moment... feel free to release anything, doesn't matter how sketchy it is!

Link to comment
Share on other sites

This is agony... :D

I will throw my phone at the mercy of any test software since it's a bouncy brick at the moment... feel free to release anything, doesn't matter how sketchy it is!

What's the current status of your device? How did you toast it?

P

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.