yashsingh1/xdaforums huggingface dataset:
[LG Optimus 2x] Rusty!:
That's the stock recovery, it doesn't seem to be flashing.

If you run adb shell, do you get a # or a $? if you get a $, then look back a few posts for a new batch file that will work round that.
[LG Optimus 2x] PYCON:
Rusty... Do u know a way to mount with mass storage

internal & external ( both ) from CWM ?! :(
[LG Optimus 2x] Rusty!:
It does, one is in /sdcard, the other in /emmc
[LG Optimus 2x] PYCON:
Uhm... While I connect cell to PC in CWM from mount & storage,

usb mass storage, I can see ONLY external memory available as

memory key ( windows xp & 7 ). Not internal... :confused:
[LG Optimus 2x] Rusty!:
Oh that, yeah, not that I know of.
[LG Optimus 2x] PYCON:
Hope in future releases... :(

Thx man :cool:
[LG Optimus 2x] Scougar:
I hook up my phone in debug mode, and it tells me permission denied (If I run either batch file in a command window in windows). I am directly running the batch file, I take it that is what I am meant to do?

Should I try your advice that was referenced to the # and $ ?

Update: As mentioned I went to this post by you rusty: http://xdaforums.com/showpost.php?p=21988490&postcount=568

And copied in the bat file to the existing CWM download I had (just renamed the other file(s) I was replacing.

After that, I turned off, turned on, turned off and tried vol down and power on until the little android dude comes up. I got the CWM :-) Thanks :-) You might want to put those two 'optional' files on the first page with info about "permission denied?, use these" :-)

In the CWM, I did wipe battery stats (why not lol), fixed permissions (it seemed appropriate!), and am currently doing a backup :-)

Many thanks Rusty!

p.s. I guess now I just have to decide which ROM/Kernel I'm gonna try. I am keen for everything (including the camera) to work, and with the stock apps (As I like the DLNA client). Hmm... V20Q perhaps then... lol (Maybe with a different kernel afterwards?)
[LG Optimus 2x] LarsPT:
Ok guys I think I need help... I installed ROM manager... and then I installed this CWM... it's independent right? Anyway, I did power + vol- and now it seems to be stuck in a screen saying:

S/W Upgrade

Please wait while upgrading...

I'm affraid to turn it off :(
[LG Optimus 2x] Rusty!:
It's safe to unplug it, it can stick there.
[LG Optimus 2x] LarsPT:
Yup I had to pop out the battery. I flashed CWM from the ROM Manager... couple of reboots and it started booting to 5.0.2.7, so all is well, I've already flashed temasek's latest kang and vadonka's kernel, I'm flashing gapps as we speak... gosh I knew I should have done this over the weekend... it's way past my bedtime now :D

Thanks a lot for this!!
[LG Optimus 2x] JohnnieDarko:
Hey guys, I'm new here. I bought a P990 yesterday after my Galaxy S got stolen. So I was reading this thread, and because I don't yet have an external microSD (also stolen of course), I thought I needed this recovery for use with the internal SD.

But I just installed with the standard CWM 5.0.2.0. (installed from Rom Manager), which has the option "install zip from internal SD". So right now I'm running CM7 with out using the CWM posted in this thread, and I don't have an external SD. So what was the use of this "internal CWM" in the OP then?

Thanks :)

EDIT: NVM, I found out. It's imposible to backup/restore with stock CWM. I guess that's what the OP said but I didn't get it. :)
[LG Optimus 2x] Rusty!:
Yep, that's exactly the reason I made the internal memory version ;)
[LG Optimus 2x] Scougar:
Which is excellent that you did rusty, it really is greatly appreciated. I don't want to sell my SD card on when I sell the phone for example.
[LG Optimus 2x] deidara:
Error while backup image /data

Hi Rusty, I've been using CWM 5.0.2.7 R2 since you first released it last year, and Its been through a lot of backup and restore flawlessly. But, today suddenly I can't backup my rom anymore, I got a message "error while making backup of image /data".

I attached the recovery log, please look at it while you have a chance. If anyone has the same problem and have solution for it please help me. Thanks a lot man :)
[LG Optimus 2x] ev!denz:
Probably I'm stupid, but how can I update my CWM from an older version to 5.2.7? The .bats dont't work if I run them.
[LG Optimus 2x] Rusty!:
You probably don't have a root shell, a few posts back I attached a new .bat file to work round it.
[LG Optimus 2x] :
Rusty! You are the man! Got new phone but still supporting our o2x ;)

I was setting up exchange on lumia 800 last week for my friend- can`t believe how ms complicates everything what should be simpler.. ;) Hope you are having fun with it ;)

Thanks for being around! Regards,
[LG Optimus 2x] Rusty!:
Complicated? You're doing it wrong... Metro is incredibly simple ;)
[LG Optimus 2x] Rusty!:
Was bored, updated the .imgs for you all.
[LG Optimus 2x] Rusty!:
I was really, really bored... any fancy testing something?

CWM 5.5.0.4 external only: don't work proper, so no point

Disclaimer: May not work, cause your phone to catch fire and kill your cat etc.
[LG Optimus 2x] CaptainHook8:
Since you are bored...:D

Could you try to see why cwm touch 5.8.1.3 gives us problems flashing some roms?

For problems i mean bootloops,etc.

Reverting back to 5.0.2.7 solves the problem.

Thanks!!
[LG Optimus 2x] Rusty!:
I can't, there is no source for it, and I am an idiot.
[LG Optimus 2x] CaptainHook8:
Sorry for asking...i didn't realize there were no sources.

Just one more question...if i use Titanium Backup option "reboot to recovery", the phone just reboots, doesn't go in recovery.

Obviously that is a Titanium Backup issue...but what could the problem be?

I guess on other terminals, that works.
[LG Optimus 2x] Rusty!:
Are you using a RAM hack kernel?
[LG Optimus 2x] CaptainHook8:
I am using Spica SR3R2 kernel.

By the way Rom Manager reboots correctly in recovery.
[LG Optimus 2x] Rusty!:
Four people have grabbed the experimental 5.5 build, can anyone say if it works? If so I'll knock out an internal build and add it to the OP.
[LG Optimus 2x] eyronic:
@Rusty

5.5.0.4

-mount usb storage doesn't work.

It says " E:Unable to open ums lunfile (No such file or directory) "

-softkeys doesn't work.

5.0.2.8

-cwm int uses external sd. (Haven't tried ext)
[LG Optimus 2x] kairi_zeroblade:
Thanks very much RUSTY!!

he deserves all credit.. :D and also a very good person to approach.. :D
[LG Optimus 2x] Rusty!:
Oh poo, that's why I called 5.5 experimental, I'll delete the link then :D

Not sure what happened with the 5.0.2.8 ones though, the images were MD5 checked, so I know they're different. Maybe I ballsed up the fstab somehow... will look into that.
[LG Optimus 2x] Striatum_bdr:
Thanks for this update! I flashed it from Terminal Emulator and works well. As I have CM9 kang on my phone, external version is perfect, didn't try internal one.
[LG Optimus 2x] ev!denz:
I don't know, what I'm doing wrong, but if I try to run the .sh I'm getting error messages:

I've got totally access and execute rights on the folders and files :/ I'm very inexperienced with cwm.
[LG Optimus 2x] Rusty!:
Don't sudo it.

Just:

./install-ext-cwm-linux.sh
[LG Optimus 2x] ev!denz:
I get the same error message but it's definitly in the same folder.
[LG Optimus 2x] Rusty!:
is adb-linux set to executable?
[LG Optimus 2x] langhaardack:
Do

sudo chmod +x ./adb-linux

or if that alone doesnt solve it

sudo chmod 777 ./adb-linux

that makes sure it is accessible and executable.

Do you have adb configured on your machine? just use the installed version instead of the one given in the packet.

adb push cwm-ext.img /data/local/
adb shell "su -c 'dd if=/data/local/cwm-ext.img of=/dev/block/mmcblk0p7'"
adb shell rm /data/local/cwm-ext.img

but make sure youre in the folder with the cwm image.
[LG Optimus 2x] ev!denz:
oh sh*t i get the message that there isn't any command "adb"^^ but i've got the adb from google :/
[LG Optimus 2x] langhaardack:
Hast du adb irgendwann mal so installiert? um adb über "adb" im terminal ansprechen zu können muss der pfad zu deiner adb-executable in der $PATH variable stehn. für den fall, dass du adb nie konfiguriert hast hat rusty adb mit ins packet gepackt. dann gehst du einfach über

cd /pfad/zur/linux-ext.sh

in das entpackte packet, führst

sudo chmod +x adb-linux
sudo chmod 777 adb-linux
sudo chmod 777 linux-ext.sh

aus, und danach noch

./linux-ext.sh

dann sollte es kurz dauern und du solltest rustys cwm draufhaben.

did you install adb at any other point in time? to execute adb as "adb" in the terminal, you have to add the path to your adb-executable to your $PATH. In case you never installed adb rusty packed a version of adb into the packet.

Sorry, for all the german in this post.
[LG Optimus 2x] smokku:
Just a side note:

I borked my /system today by toying with stuff in it. When I wanted to boot CWM, it didin't start leaving me with black screen, reacting on touch by lighting up the buttons.

After i plugged USB i had 'adb shell' active, so I managed to manually restore my /system backup. After that I started investigating what is wrong with CWM. Reflashing it again didn't help.

Finally 'dmesg' revealed the problem. /cache partition was broken and couldn't be mounted during boot causing kernel OOPS. That stopped the boot process.

After wiping it with dd if=/dev/zero of=/dev/block/mmcblk0p2 and rebooting the phone to recovery, CWM started and I was able to properly format /cache using the wipe menu.

Hope that helps anyone in similar situation.
[LG Optimus 2x] rskyline:
Touch recovery isn't ready for o2x?
[LG Optimus 2x] Rusty!:
Sure it is, grab it here: http://download.clockworkmod.com/recoveries/recovery-clockwork-touch-5.8.1.3-p990.img
[LG Optimus 2x] rskyline:
Bro sorry for this stupid question but how can i flash that?? Maybe there is a cwm flashable anywhere?
[LG Optimus 2x] Rusty!:
Re-name it and use the bat file from one of the .zips in the OP, or use DD
[LG Optimus 2x] sKweezr:
OK really stupid question, but what is DD?
[LG Optimus 2x] Rusty!:
It's basically a command for copying things in Linux. To use to to install a recovery on the O2X, you would run

dd if=path/to/recovery/recovery-name.img of=/dev/block/mmcblk0p7

That's all the installer in the .zip does anyway.
[LG Optimus 2x] sKweezr:
Would it be possible to use those those commands in a terminal from within android? Can't get adb to work on my pc...
[LG Optimus 2x] Rusty!:
Yes it would, just su first.
[LG Optimus 2x] sKweezr:
OK did it. Worked flawlessly ;-)
[LG Optimus 2x] mrQQ:
edit
[LG Optimus 2x] fyatwyrio:
G2x recovery source

Hi Rusty,

I have a G2x (Thanks for the 5.0.2.8 recovery build btw) and I wan't to compile my own recovery with a few very minor changes. I've setup Ubuntu 10.04, setup the environment, checked out the cyanogenmod gingerbread branch, made the tools, etc.. After making my 2 line change in the source I can build a recovery.img just fine but after I flash it some strange things happen. The softkeys bring up the CWM icon and while it can navigate the main menu the search key doesn't actually select any options. The volume rockers seem to work fine though.

It also displays errors that it can't mount the /cache/ folders.

So basically it doesn't work.

Do you have a special G2x branch I should check out or a build guide that you use for it?

Just some background on what I'm trying to do.

I've repartition my phone so I no longer have partition 8 (the internal SDCARD) and partition 7 (user data) takes the remaining space and is now a little over 7 gig.

This works great in my phone, no problems.

Unfortunately the recovery doesn't like it. When trying to format or restore (which formats first) the data partition I'd get and lseek error. I poked around the code and two things look to be causing the issue.

First the mke2fs source used doesn't like anything over 2 gig, the lseek hasn't been updated to handle it.

No biggie, I thought I would just repack the recovery rom with a new mke2fs that I know works.

Now it will format fine but after the format an error message saying mke2fs failed. This was wrong by the way. It's tune2fs that's failing and the source error message was coded wrong.

So I looked at the ext3 format sub in mmcutils.c. The code is using mke2fs with the -j journal option and then runing tune2fs with it's -j journal option as well. Apparently the original mke2fs doesn't create a journal even with the -j option so tune2fs would create the journal successfully. The new mke2fs I'm using does create the journal option (as it's told to do with the -j) and when tune2fs tries to do the same it throws a error saying the file system already has a journal. This is returned as an error in code and killing the rest of the process.

Side not, when tune2fs fails the message on displayed says mke2fs failed because the error trap is printing mke2fs incorrectly instead of tune2fs.

All I did was remove the -j option for mke2fs and correct the tune2fs error trap to print 'tune2fs' correctly in the code. For all I know that worked fine but apparently some other things are wrong.

Do you have any insight into what could be the problem. I didn't repo the main google Android source ( I thought the cyanogenmod code was complete). Do I NEED to do that first?

Thank you for any help you can provide.
[LG Optimus 2x] Rusty!:
All I used was the CyanogenMod source. Did you download the ICS source, or the Gingerbread source? I tried building a P990 one from the ICS source, and it didn't work. I only had success with GB based recoveries.
[LG Optimus 2x] fyatwyrio:
Gingerbread, and everything during the make process indicates Gingerbread as well. Just pointing that out since I'm new to this whole process.

Basically I'm just following koush's guide at http://www.koushikdutta.com/2010/10/porting-clockwork-recovery-to-new.html after setting up the initial environment.

Here's my basic setup process from start to finish.

per google:

Install ubuntu 10.04

install openjdk java 6 via ubuntu software manager (no longer on canonicals servers through apt=get)

install required packages for ubuntu 10.04 (long command grabbing a bunch of stuff)

Then per koush:

repo init -u git://github.com/CyanogenMod/android.git -b gingerbread

repo sync

make -j4 otatools

. build/envsetup.sh

build/tools/device/mkvendor.sh lge p999 recovery.img (actually your 5.0.2.8 build)

lunch full_p999-eng

(since I am using a build of the CWM recovery image made for the g2x and have flashed on my phone I'm not changing the fstab)

make -j4 recoveryimage

everything seems to run fine (bunch of stuff flies by the screen but nothing stops) and the recovery.img is generated. Normally when booting in to recovery after the normal LG logo comes up an LG logo with a purplish background pops up which shows me it's booting in to recovery.

My build does not do that either and the menu navigation is messed up.

Is that what you are doing as well? Thanks.
[LG Optimus 2x] Rusty!:
Right, first of all, you can mostly ignore that guide, that is to help you to port CWM to new devices, the G2X is already supported, everything you need is already in the source.

What I would do is undo all your changes (repo sync will probably clear them, you might need to delete the p999 folder first) and build a clean one to make sure that's good to go:

. build/envsetup.sh
lunch p999-eng
make -j4 recoveryimage

If that works, make your changes and build again.
[LG Optimus 2x] fyatwyrio:
Ah ok, that's cool though.

hmm, I wonder if something is up with github. I can't seem to get it to sync without a 'fatal: Unable to look up github.com' message a few times. It continues on though.

Example:

Fetching projects: 1% (4/313) fatal: Unable to look up github.com (port 9418) (Name or service not known)

Fetching projects: 4% (13/313) fatal: Unable to look up github.com (port 9418) (Name or service not known)

Fetching projects: 30% (94/313) fatal: Unable to look up github.com (port 9418) (Name or service not known)

Fetching projects: 32% (101/313)

It will continue until it completes which makes me think it's retrying until it gets everything.

Then when I do the lunch command it says the project p999 can't be found.

Also tried full_p999 but that basically says the same thing.

The sync fails at different points and I don't know if it's picking up completely when it continues. I'll try again a little later.
[LG Optimus 2x] Rusty!:
If it keeps it up, you might need to change something in the default.xml
[LG Optimus 2x] fyatwyrio:
I just wiped the whole thing and started over.

It is still downloading the branch although it's going at a good pace, just takes forever. I'll post whether the straight build works once it's done. I really do appreciate your responsiveness.

---------- Post added at 12:37 AM ---------- Previous post was at 12:35 AM ----------

Just curious, is it absolutely necessary to download the whole gingerbread branch just for the recovery?

---------- Post added at 12:55 AM ---------- Previous post was at 12:37 AM ----------

Well, still getting the product not found message with lunch.

Here is the full message:

$ lunch p999-eng

build/core/product_config.mk:205: *** No matches for product "p999". Stop.

Traceback (most recent call last):

File "build/tools/roomservice.py", line 9, in <module>

device = product[product.index("_") + 1:]

ValueError: substring not found

build/core/product_config.mk:205: *** No matches for product "p999". Stop.

** Don't have a product spec for: 'p999'

** Do you have the right repo manifest?

This is after completely wiping my dev folder and pulling the full gingerbread repository down.

running . build/envsetup.sh

then lunch p999-eng

lunch does work after running the mkvender.sh like in koush's instructions but like you said, I shouldn't have to do that since it's in the build already.

Don't know what's going on.
[LG Optimus 2x] Rusty!:
Did you get the proprietary files? Not sure if it matters for recovery or not, but can't hurt.

Either pull them from Koush's git, or plug your phone in and run extract-files.sh & setup-makefiles.sh from the device/lge/p999 directory.
[LG Optimus 2x] fyatwyrio:
hehe, and how do I grab them from koush's git? I see them on github but I don't know the right repo syntax to grab them :(. Sorry for the newbie questions.

---------- Post added at 01:33 AM ---------- Previous post was at 01:33 AM ----------

Have I said how much I appreciate your help? :)

---------- Post added at 01:50 AM ---------- Previous post was at 01:33 AM ----------

well, I just downloaded the koush's proprietary files for the p999 manually and copied them in the the device/lge/p999 folder, still no go if that's what I needed to do.
[LG Optimus 2x] Rusty!:
They go in vendor/lge/p999 :)
[LG Optimus 2x] fyatwyrio:
AAAAHHHHHH! Starting to make sense now. I don't have an lge in vendor, just cyanogen, tmobile, and qcom. So lunch can't find it. This also makes sense that running mkvender.sh from koush's guide would get it to work cuz it would make the vender stuff.

So that should be in the cyanogen gingerbread git already though?

I'll check on github.
[LG Optimus 2x] Rusty!:
No, the files in vendor/lge would be proprietary so CM cannot distribute them, hence why there is a script to extract them from your phone (the ones I mentioned above).

Or, you can just get them from Koush again, and put them in the right place this time (after creating the 'missing' folders) :P
[LG Optimus 2x] fyatwyrio:
ugh, still not working. I've placed the files under vendor/lge/p999. Still getting the same message. I've done a completely new install of ubuntu, android env and cyanogenmod repo. Not sure what I'm missing.

---------- Post added at 02:15 AM ---------- Previous post was at 01:30 AM ----------

YAY! SUCCESS!

Apparently you can just run 'lunch' by itself and it will list all the builds available. The p999 is actually 'cyanogen_p999-eng' so 'lunch cyanogen_p999-eng' worked. I was able to build the recovery and flash it. Works great. Now I just need to make the changes and build again.

Thanks again for your help.
[LG Optimus 2x] Rusty!:
Excellent!
[LG Optimus 2x] fyatwyrio:
Made the code changes and copied the newer mke2fs binary over. The code changes worked great but the binary is dependent on some lib files. Apparently the lib path is set for the system mount lib folder, and not just /system/lib. So i have to have system mounted for it to work.

Now I'm trying to decide how i should fix that. I can think of three ways.

1. find and update the lib path in the cyanogen code to include a local folder like /lib.

2. Try to find a way to statically build the binary so it doesn't need the libs.

3. Update the cyanogen mke2fs code with new lseek code that can handle over 2 gig. I've seen code patches for just that.

I'll probably start with option 3, trying to update the mke2fs code cyanogenmod uses. Sounds like the cleanest way.
[LG Optimus 2x] tonyp:
Rusty it's time for you to get a new 2x! :P

(they're pretty cheap aczually nowadays hehe)
[LG Optimus 2x] Rusty!:
If someone wants to give me one, fair enough, but I don't think I'll be shelling out any of my hard earned ;)
[LG Optimus 2x] fyatwyrio:
Ended up going with Mr. Obvious's option 4. Looking through the code it seems that support for large file systems is already there but the device (BoardConfig.mk) needs to have BOARD_HAS_LARGE_FILESYSTEM def set to true. This sets either a another binary or source to use for mke2fs which supports large file systems. So I compiled a new build with that and it works great. I'm not sure why the mke2fs with large file support wouldn't always be used though.

Bottom line I've got a 7 gig data partition that recovery can work with.

Now to hunt down why USB mass storage fails when swapping the internal/external sd partitions in vold.fstab.
[LG Optimus 2x] bujcri:
How can I flash this? Not working if I try to install from CWM with "install the zip file"
[LG Optimus 2x] Rusty!:
Download the zip to a PC and extract it.
[LG Optimus 2x] tetsuo55:
Does anyone know how i can install this on a phone without usb connections?

It still has the regular recovery, i do have root. But then what?

I'm guessing i need to get a terminal window somehow to copy over the img?
[LG Optimus 2x] Rusty!:
Download it on you phone, extract the archive, then use dd via a terminal to flash it

dd if=/recovery.img of=/dev/block/mmcblk0p7
[LG Optimus 2x] tetsuo55:
any random terminal app from the market will do?
[LG Optimus 2x] Rusty!:
Yep, should do.
[LG Optimus 2x] pyssoo:
Does anyone know, after all this time, why the phone is vibrating in CWM recovery?
[LG Optimus 2x] Rusty!:
Not a clue.

Does it do it in the touch one as well?
[LG Optimus 2x] pyssoo:
Yes, also in the touch version.
[LG Optimus 2x] tetsuo55:
Thanks it worked!
[LG Optimus 2x] ciwek90:
Can do for any version or only the latest? Thanks!:D
[LG Optimus 2x] Rusty!:
All versions, that's what's in the batch files ;)
[LG Optimus 2x] ciwek90:
Fantastic! Thanks mate :D
[LG Optimus 2x] querobolo:
Help

I'm new with this cell phone, and i'm not finding a tutorial to flash this cwm. Could someone very generous explain to me???
[LG Optimus 2x] Rusty!:
It's in the OP. You extract the .zip and run the .bat/.sh of your choice.
[LG Optimus 2x] querobolo:
thats the problem, i really dont know these things, because the last phone that i had before the o2x was a defy, and the cwm could be installed by an normal app...
[LG Optimus 2x] Rusty!:
If you're rooted then CWM can be installed via ROM Manager like you're used too.
[LG Optimus 2x] japmsn:
A little help guys, my phone is bricked, can't get into CWM nor flash with smartflash (only shows LG logo, never the one with the arrows), can I nvflash this? and how :confused: reading around I think the steps are as follow:

1.- Power down phone

2.- Remove battery

3.- Hold VOL_DWN+VOL_UP & plug in USB connection from computer

4.- blabla drivers until I see "NVIDIA USB Boot-recovery driver for mobile devices"

but then what?, do I open the .bat from a console on the same folder as nvflash or manually enter a command to push the cwm-ext.img ?

Please help, I don't think there's anything else I can do to bring my cellphone back to life.