[Optimus One, P500, V General] The_ERROR:
3. Custom recovery

What custom recovery is

Tools which custom recovery provide - NAND backup/restore, formatting of SDcard, partitioning (ext1,ext2, ext3), wiping, flashing of Custom ROM, ...

Is it save to install that? - potential problems, backup/restore of original recovery

How this whole thing works - installation description (not how-to install, just explanation of what is done during installation)

What custom recovery is

Recovery is image (binary data) stored in internal memory. This image contains something like "program" maybe better say "tool", which can boot-up independently on Android system. In other words, when this tool is running (booted up), than Android system is not. This tool is part of phone system, and in PC terminology recovery can by compared to BIOS with some added features. This recovery state can be reached on all phone, but if you don't have custom recovery, it will do so-called HW reset and automatically restart itself into standard boot mode. So what is difference between original recovery and custom recovery? Custom recovery didn't call master reset after start and also didn't restart itself.

Tools which custom recovery provides

Let's go check what custom recovery brings (I will describe Drellisdee's custom recovery so another recovery can brings another menu and tools)

In Drellisdee's post is picture of main screen with list and description of tools so let's look on it:

ADB as root user

what is root user, and what is adb, you should already know. If not, follow link on main post.

USB-MS Toggle :mounts sdcard as mass storage

It just mounts your phone as USB-mass storage (USB disk) so in PC you will see new disk where you can see folders based on mountes (lower) and were you can upload what you want.

Backup/Restore:

Nand Backup : runs a nandroid backup of data, cache, boot, system

Nand Backup + .android secure : backs up above plus .android_secure on sdcard (froyo native apps on sd)

//Native app which notify "application can be moved into SD card" if you can move some app. It's good to use, if you used it.

Nand + ext backup : data, cache, system, boot, plus apps2sd on ext partition (old style apps2sd)

//old style apps2sd is used on some custom ROM because can move every application into SD card instead of Froyo's apps2sd

Nand Restore : browse to and select nandroid backup to restore

Absolutely GREAT feature. With NAND you can do 1:1 copy (image) of your actual system (phone's memory). It means, that you didn't backup only SMS, contacts or apps, but whole system with all configuration, customization, wallpapers, system's tweaks... just everything - it creates image of whole phone system. This image will be written to your SD card which you are then free to copy around and back up on your computer.

What it means? You find custom ROM which looks awsome so you create NAND backup and install new ROM, but after few hour/days... you know, ROM before was better. So you boot into recovery, use NAND restore of your old ROM backup and .... woala you have your system just like before backup - as if nothing had happened. For about 2 minutes!! It sounds great, isn't? :) But one, little problem exist. You can not use for restore only some part of backup. You have to restore all, or nothing.

Flash Zip From Sdcard: Update.zip must be in root of sdcard

This tool is designed for install of custom ROM or for tweaks. If you have instruction to install via custom recovery, and file have .zip extension than you should use this menu. Never unzip file, because file contain meta-information about itself with some validate-checks so if you edit it, or unpack and pack back, it shouldn't work. And of course you can't select *.zip file if it doesn't exist because you unpack it, also you have not to rename it to update.zip, you can just select file to update in list of .zip files. :) And, at the end, file have to be in root (main folder) of sdcard.

Wipe Menu:

Wipe data/factory reset: wipes data & cache

- wipe of users data (contacts, apps, configuration, ...) and cache (caches of applications)

Wipe cache

- wipe cache only

Wipe Dalvik cache : Wipes Dalvik cache in all possible locations if moved by apps2sd

- wipe of Dalvik cache?

Wipe SD:ext : Wipes Apps2sd ext partition

- if you used Partition SDcard option, you can wipe it here

Wipe Battery Stats

- If you think, that your battery life is too short, you can try delete battery stats. Than let phone fully charge. (more)

Wipe rotate settings

- wipe senzor setting (acceleration, ...)

Wipe .android secure : Wipes froyo native .android_secure on sdcard

- wipe information about moved apps

Partition Sdcard:

Partition SD: Partition's sdcard for apps2sd (this formats card so all non backed-up data is lost)

- will create ext2 partition (you will be asked for size of ext2 and cache)

Repair Sd:ext

SD:ext2 to ext3 : coverts apps2sd ext2 partition to ext3 (requires kernel support for ext3)

SD:ext3 to ext4 : same as above but ext3 to ext4 (requires kernel support for ext4)

ext2 - file system for the Linux kernel (no journal, fast but not recovery of I/O error)

ext3 - file system for the Linux kernel (journal, slower than ext2 because of journal, but provides recovery on I/O error)

ext4 - file system for the Linux kernel (journal, enhanced version of ext3)

Links/thanks

----------------------------------------------------

How to increase battery life; androidforums.com

Comparison of file systems; wikipedia.org

ZeroXtreme's filesystem answer (thanks); xdaforums.com

----------------------------------------------------

Mounts:

Gui mounts to avoid typing in terminal to mount and cd into a dir to mount system, data, cache, sd-ext (if exists), sdcard

Other:

Fix apk uid mismatches

//I'm not sure, can somebody helps?

Move recovery log to SD

Toggle Signature Verify : Turn of signature checking on flashing zips

Key Test : Output keycodes for debugging recovery

I thing that this is clear enough.

Is it save to install that?

Well, nothing isn't without any risk. Anyway, from what I know, nobody has had any problems, if Drellisdee's steps are followed, but you have to have P500, not derivate from Sprint, for example. From my point of view the installation of recovery is without any problems. After update with KDZ_FW_UPD tool I had rewritten also recovery. But this tool is really dangerous, so try to avoid to it.

Anyway, original recovery can be backuped before installation of custom recovery and this can be done by command

dd if=/dev/mtd/mtd2 of=/sdcard/<name-of-old-recovery>.img bs=4096

for example:

dd if=/dev/mtd/mtd2 of=/sdcard/my-original-recovery.img bs=4096

For restore,just use same step (command) that you used for flashing, but replace name of .img file.

flash_image recovery /sdcard/my-original-recovery.img

NOTE: You don't have to do other commands before and after as you done for install of recovery!!

So, where can problems arise?

loss of warranty - LG service have much more advanced software and hardware and they can check what problem caused - make dump of memory and so on

bricking of phone - if something goes wrong, then phone may not start at all

deletion of all data if installation fails - if old recovery remains, than hw reset will be performed

custom recovery doesn't work at all - incompatible devices

Why to try?

NAND backup/restore - the most useful tool ever

you can install custom ROM

high count of successful flashing of custom recovery

for now (what I read on forum), when you had said that you brick your phone by standard LG tool, your warranty repair was approved

How this whole thing works (description of installation's steps)

Let's see on how to:

Copy flash_image and recovery-RA-GNM-thunderg-1.1.0.img to the root of your sdcard

Nothing hard I think. :)

via adb shell or terminal type this from root su # shell. (Do not type the # as its just for reference to show you need a root # shell not a $ user shell)

Ok, it seems that it doesn't make sense, isn't. But what is root and su we already knows, same as user shell and root shell. Also follows commands probably aren't some "normal" task, so some special user approve will be necessary - so it probably means use of root. So, enter 'su [enter]' for become a root.

[B]# mount -o remount,rw -t yaffs2 /dev/block/mtdblock1 /system[/B]
// remounting of filesystem for write

[B]# cat /sdcard/flash_image > /system/bin/flash_image[/B]
// print contend of flash_image into /system/bin/flash_image (it is just copying)

[B]# chmod 755 /system/bin/flash_image[/B]
// set up file access for running (basic of unix-like systems)

[B]# mv /system/etc/install-recovery.sh /system/etc/install-recovery.sh.bak[/B]
// rename install-recovery as install-recovery.sh.back
// NOTE: many guys haven't this file, so they get error: [I]"failed on '/system/etc/install-recovery.sh' - No such file or directory"[/I]
// it's normal. If it happens, just ignore it and continue.

[B]# mount -o remount,ro -t yaffs2 /dev/block/mtdblock1 /system[/B]
// remount of filesystem into read-only mode

[B]# flash_image recovery /sdcard/recovery-RA-GNM-thunderg-1.1.0.img[/B]
// using of program/script flash_image for flashing of recovery image
// you can do by same way also restore of your original recovery

[B]# reboot recovery[/B]
// reboots into recovery mode

I think, that was also nothing hard. As was said "#" on beginning means that root's shell should be used for running that command. Maybe you remember what I had written, that if you run something on root's account, it doesn't ask for confirmation and will just do it. Same with responses. If there is nothing to say, then nothing will be said. So if command runs without any problems, nothing will be shown. If something doesn't work, than you will be informed.

Key combo to boot custom recovery from powered off is vol_down + home + power and release keys at LG splash.

Nothing special I guess. But I recommend keep vol down + home keep pressed until custom ROM menu appear.

Note this recovery and the one for the LG Vortex have a service that instantly reboots out of recovery once you load it & I disabled it and thats why you get a E: "Bad Boot Message" on inital startup. Its completely fine.

IMPORTANT NOTE!! Too many of n00bs asking "I have problem, E: "Bad Boot Message appeared, what I should do?" Read ALL carefully before every action!!

Recovery Key mapping:

Up & down : vol-up and vol-down

Select : Menu

Backup : Back

Key map for moving in menu (touch screen doesn't work... :))

Links/thanks:

----------------------------------------------------

Drellisdee's custom recovery description; androidforums.com

----------------------------------------------------

==========================

Main topic

==========================