yashsingh1/xdaforums huggingface dataset:
[T-Mobile LG G2x] surgical1:
CleanBatch

Hi;

Thanks for getting back to me. That's just it,

I CAN'T get past the Flashing-LG-Logo-Screen;

to get into Recovery!!!:) In other words:

Its still in an ANNOYING Boo-tLoop. I am trying

to find a solution that will get me PAST the LOGO.

Please advise and thanks.

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

Did you flash a Rom after the script completed by going into recovery?
[T-Mobile LG G2x] mansa_noob:
[/QUOTE]

Is this a g2x? Can you please confirm?

Also going into recovery requires a key combination when booting. Hope you are doing it right.

Finally, please try Rom for recovery. After it finishes let the phone boot. If it still boot loops you have a problem with the hardware.

Good luck and happy hunting.
[T-Mobile LG G2x] da-pharoah:
Ok so this just another format utility then.. in my experience deleting partitions recreating them and then formatting them, is ok but not as thorough as a LLF.. sure u make the data unreadable and then its pushed under the virtual carpet. But I just don't see a valid reason for this unless your into nvflashing, a lot ... not to discredit your work btw.. I'm sure u put time and effort into this.. any way thanks for effort. I guess if ur into using a pc versus cwm then I get it.
[T-Mobile LG G2x] Волк:
I don't want to create a situation which looks like a bad scene so I will just say this:

I can see this as a great un-brick tool. As a data-wiper, not so much. The next time I see that someone bricked their phone I'll point them here.

One question though: Why, as the first thing you say, do you state that this works differently from the Nullifier? You could just say that we aren't affiliated and that our tool aren't affiliated or directly related, then explain what your tool does. It seems like you're trying to say that there's something wrong with the Nullifier.
[T-Mobile LG G2x] mansa_noob:
First of all, it is a great un-brick tool but that part is not mine. I gave the reference in the OP.

Secondly, Nullifier writes all zeroes, this one just recreates the partitions. Nullifier only addresses so many partitions, this one recreates all. Hence the two are different.

Finally, this tool is not just an un-brick tool. It actually gets rid of the data. I would be interested if someone can show any data remaining that can be referenced without using a specialized tool(s)... which android is not.

Nothing wrong with Nullifier... and that is not what I am trying to say at all. If it bothers you I will update the OP to remove all reference to Nullifier.

[edit] OP updated.
[T-Mobile LG G2x] rogobono:
Let the epeen wars commence! May the odds be forever in your favor
[T-Mobile LG G2x] tarroyo:
Can I flash the provided zip file like I would a rom? Or do I have to do all the steps in the 1st post??? I'm already running nvflasher.
[T-Mobile LG G2x] mansa_noob:
This is not a flashable zip.
[T-Mobile LG G2x] Klathmon:
honestly this is a great idea. Unless your trying to wipe data for security purposes (like the FBI is out to get you) there is no need to write all 1's then all 0's (and honesty you should follow that up with random data for true security). Removing the partition table and recreating it will TRULY restore this phone to as much of a clean-slate as your gonna get.

I have never (and should never) seen a programmer access data by means of a low level memory address, so even though most of the 1's and 0's are still there, the pointers to those values are gone. so unless the program is written SPECIFICALLY to restore data from this, its not going to magically appear (or glitch into existence).

and IMHO, this does a much faster, better, and more thorough job of restoring things back to a base, so that new ROM's will not have issues. It erases and rewrites ALL usable partitions of the phone (excluding external card), including boot, cache, data, system, internal sd, and a few others that im not sure what they are even used for. For all i know, many issues could be caused by strange data written to system, or a weird glitch in one of the other partitions caused from us flashing so much.

I'm not trying to start fights here, im only simply stating a comparison, in the same way i would compare 2 apps. The nullifier does have its uses, but i feel its more suited to secure data destruction than resetting the phone back to a clean slate.

last note, wiping internal might be a good idea, as newer roms are starting to use it differently than just a second storage. :)
[T-Mobile LG G2x] timothy7732:
Does this take out all the backups I have made.because I don't know where they get stored
[T-Mobile LG G2x] mansa_noob:
It takes out the internal SD card. You would need to find out if the backups are stored there and move them before you run this script.
[T-Mobile LG G2x] moeahmad1995:
It wouldn't because back ups made in cwm (not rom manager), are saved on the externel. SD card, clockworkmod, and backups is the directory I believe. You are safe to use this and keep ur back ups

Edit: never said thank you for this tool, it can help a lot of people out an is great for the community. Thanks
[T-Mobile LG G2x] MWBehr:
This is not necessarily true. There have been several versions of CWM floating around that look at Internal as the primary storage location.
[T-Mobile LG G2x] moeahmad1995:
Ohh really, sorry didn't know that, I'll edit it now
[T-Mobile LG G2x] DsturbD:
Not being a jerk or anything but if you don't know where your backups are I wouldn't be running a script like this
[T-Mobile LG G2x] mansa_noob:
Thank you very much

Hi everyone,

I wanted to take a minute and thank everyone for valuable input. It is discussion like this that results in progress. I appreciate it very much.

Thank you and have a wonderful day!
[T-Mobile LG G2x] jeep447:
First of all thank you for another useful tool for our G2X! Secondly I just had to say that I'm truly impressed with how you've handled this discussion. In my opinion people are just ridiculously sensitive on these forums sometimes and it can cause things to get out of hand quickly. To clarify I'm not saying Bork was ridiculously sensitive at all because he worked hard to provide everybody an awesome "tool" so he has all the right in the world to be sensitive about his work. (In fact I'm gonna try out his Nullifier along with this one and I'm truly appreciative for having both!) What I'm saying is if you were ridiculously sensitive and responded ignorantly it most likely could've gone out of control. It just seems like that happens a lot and we wind up losing either great developers or great "tools" for our phones. So I was definitely impressed because it shows that you really weren't trying to step on toes or compare girths lol. Very well played man and thanks for the script (or "tool") for my phone! Just my two cents anyway :D

Sent from your inner child
[T-Mobile LG G2x] ayysir:
Any way to make a Linux version?
[T-Mobile LG G2x] mt3g:
Question

Okay, so I flashed a TEST rom about 6 months back and it was a port of LG's OTA rom for the Optimus 2X (I actually like the LG skin lol). The rom wouldn't connect to any type of network and wasn't possible to be put out there for other people, the Developer gave up on the project. Unfortunately me and about 8 others got kinda screwed by this cause now we can not send text (only SMS) over a 4g connection. Texting over wi-fi, edge, and no data signal is fine. So, my question is this to those that are super knowledgeable, could this process be able to fix it?

The Developer that had us test, jumped through hoops to help us all out to try and get it all back to normal with codes in the hidden menu... nothing worked for those of us stuck on Jul-15th baseband, pretty sure the others on the previous baseband just upgraded and are all good now.

Any insight would be good besides, try it out and see... I plan on it tonight after normal phone usage times lol.
[T-Mobile LG G2x] moeahmad1995:
Have u upgraded to the latest baseband?
[T-Mobile LG G2x] mt3g:
Yes, I stated it in the second paragraph... if you feel like helping regarding the issue we have I can resurrect the thread that I started a while back lol... let's not make this thread about something else though, just wanted to see if the devs or someone with knowledge above mine could chime in. Look in the general for the thread I'll bump it.
[T-Mobile LG G2x] Klathmon:
if i have some time later today, ill see if i can port it to a linux script...
[T-Mobile LG G2x] exorcist70:
After using this and installing new rom has anyone experienced not being able to access the internal sd when connected via usb?
[T-Mobile LG G2x] Klathmon:
if your using EaglesBlood, then its an issue with that rom.

(might be with other roms too, im not really sure)
[T-Mobile LG G2x] ayysir:
Thanks. I was looking to try to attempt to port it myself since Linux now have nvflash script
[T-Mobile LG G2x] exorcist70:
I'm using Mr. Apocalypse Genesis v1 rom. EB was fixed if I remember correctly too.
[T-Mobile LG G2x] mansa_noob:
If you have a g2x then this would do the trick...
[T-Mobile LG G2x] mt3g:
Thank you much for the reply! I'll definitely try this tonight then! I'll report back, and let the rest of the group know (that flashed the experimental and have the same issue) to come over here, and do the same thing.
[T-Mobile LG G2x] nitrogen618:
So this won't mess up the internal SD right?

Also I have a problem when I put my phone in to Airplane mode, and than take it back out, it will lose DATA(APN GONE), until I reboot once or twice.(Happens on all rom) ICS,GB

I wonder if this will fix it?
[T-Mobile LG G2x] ayysir:
Uh it will reformat internal SD.... read more

Yes it's a g2x global known problem again.... Read more
[T-Mobile LG G2x] nitrogen618:
I understand it formats the internal SD, I meant the person above saying he can't use the Internal SD..

So this will fix the airplane problem? Read more?...(Where?):o +thankss (some people don't have this airplane problem)

EDIT: This fixed the airplane problem for me.. TY OP!

+THANKS :)
[T-Mobile LG G2x] exorcist70:
I can't access the internal via USB, but can through Root Explorer.

I ran the .bat script again then did a fresh install of Mr. A's Genesis rom and still can't access it. Oh, well no big deal really; I have a 16GB SD card anyway :o
[T-Mobile LG G2x] nitrogen618:
I got that problem.. To fix it just

Go to settings - > Storage - > Unmount -> Erase SD Card(INTERNAL) -> Mount

???

Profit
[T-Mobile LG G2x] zechizen:
It may be because you are using Eagleblood. I read a few weeks ago about Eagleblood restricting access to Internal SD via USB. I am not sure about the AOSP version but definitely saw that on CM9 version.

Edit: NVM. I just read the last page. I am also having the same issue with Owain's build.
[T-Mobile LG G2x] k4p741nkrunch:
Hey there,

Just ran the .bat and it worked great!

Honestly I was a little nervous through the whole process because my USB ports are finicky and I didn't want to bork the flash.

I am having the problem with the Internal SD not being mounted. Running AOKP build 31. Unfortunately the option does not appear in my Storage settings for Internal SD. I've had issues like this before on AOKP, but they were with my External SD not being mounted. They were fixed with just a few reboots. Hopefully this issue is solved via the same method. I'll post again if I still have problems after a few days.

Overall, just wanted to say thanks for the utility. I really appreciate it and I'm sure my phone does as well. ;)
[T-Mobile LG G2x] mansa_noob:
Hi all,

Any of you having sd mount issues on gb or everyone is on ics?

The reason I am asking is as follows: there is nothing in this procedure to the best of my knowledge that should prevent mounting... If the sd partition was not created in the right spot it should not even be visible in the phone!

I will try a few things today to see if the mount problem in windows can be fixed (if that is the issue being observed).
[T-Mobile LG G2x] nitrogen618:
I had it

To fix it

Just unmount, Format internal SD, and remount.
[T-Mobile LG G2x] mansa_noob:
Thanks. I did a bit of testing and it turns out that for me, if USB debugging is checked the drives don't mount properly (even after the format fix).

To resolve, I unchecked USB debugging (I keep forgetting about that even though notification tells you about it :D) and ejected the drives (right click on the drive in windows explorer and select eject, continue even if it tells you that files are being accessed). Then reconnect the device and turn on mass storage.

Worked like a charm, twice in a row so I don't believe it is a fluke :D.

Can someone else having this issue try it and post results please? I would hate for it to be a lingering issue with this procedure (I don't believe it can be, but need confirmation).
[T-Mobile LG G2x] mansa_noob:
If you create and test a linux version, please post it. If you like I can post the link in the OP.

Good things should be spread like wild fire :D
[T-Mobile LG G2x] exorcist70:
I don't have those options, see below:

http://xdaforums.com/picture.php?albumid=6675&pictureid=21866

I click Mount SD Card under Internal Storage and it just tells me "SD card safe to remove"
[T-Mobile LG G2x] nitrogen618:
I'm on go gingerbread

.. so idk
[T-Mobile LG G2x] DJSave:
I followed instructions and Notw I have CWM recovery installed v5.0

when I try no mounting USB storage to drop a ROM , i get error :

cwm unable to write to ums lunfile ()

I can't get to recognize my phone with VOL + and VOL - way to flash back to 4.0 recovery

need Help!!!

=========EDIT

I managed to install CWM 4 back but my problem still there:

on every CM9 ICS ROM my WIFI doesn't work

on GB ROMS it works fine.
[T-Mobile LG G2x] mansa_noob:
Is your phone g2x or o2x?
[T-Mobile LG G2x] DJSave:
G2X with T-Mobile on top of it
[T-Mobile LG G2x] mansa_noob:
Open device manager in windows. Expand usb section.Connect device holding volume + and - with battery removed. Wait until the driver is loaded and device is recognized. Then execute the batch file. Wait for phone to reboot. Then disconnect, put battery in. Hold down volume -. Press and hold power until back in recovery. Then mount sd card.

I am guessing you already did all that. External sd card should work this way.
[T-Mobile LG G2x] Klathmon:
attached the linux version. everything should work but ill need someone to test it cause i made it on my windows machine because my nix-box is currently OOC.

i also updated the CWM version from 5.0.2.0 to 5.0.2.8 and uploaded a windows version of it too... :) (please test this too before trusting it)

Enjoy :cool:

EDIT: changed linux version to more nix-friendly compression format.

ANOTHER EDIT: added actual 5.0.2.8.img to the linux version (whoopsies)

Both files are tested and working :)
[T-Mobile LG G2x] exorcist70:
Hey Klathmon or anyone,

Any chance that you saw my post here:

http://xdaforums.com/showpost.php?p=24761901&postcount=60
[T-Mobile LG G2x] Klathmon:
try going into CWM, go to mounts and storage, and hit format/emmc

reboot and try it.

if its still not working, try another rom to see if it works there. if it does, post in Mr. Apocalypse's thread that its an issue for you on his rom.
[T-Mobile LG G2x] exorcist70:
I updated my CWM to 5.0.28 and then ran the newest Cleanup Batch for 5.0.28, reinstalled fresh Genesis v1 ROM, booted into CWM to format the emmc and got the following:

Error mounting /emmc!

Skipping format...

Done.

Dunno why I got an error with it.

Oh, also the internal storage is reporting 1.45GB total
[T-Mobile LG G2x] exorcist70:
It's all fixed now. Had to install a fresh GB rom then go in to storage then I had the option to format the internal sd. Reinstalled Mr. A's Genesis v1 rom and all is happy happy now.

Thanks for everyone's help/input! :)
[T-Mobile LG G2x] shane1diamond:
am i able to use this attached rar file to update to 5.0.2.8 after using the cleanup batch tool? if so how would one go about doing that? or should i just NV flash to update the newest CWM? tia
[T-Mobile LG G2x] mansa_noob:
I have looked through the two sets of ROMs (GB and ICS) and the difference seems to be coming from (correct me if I am wrong) the following file:

/system/etc/vold.fstab.

Apparently in ICS the following line appears:

dev_mount emmc /mnt/emmc 8 /devices/platform/tegra-sdhci.3/mmc_host/mmc2

whereas in GB the following one:

dev_mount emmc /mnt/emmc 9 /devices/platform/tegra-sdhci.3/mmc_host/mmc2

Based on description it would seem that the ROM would try to mount partition #8 in ICS and #9 in GB.

Any comments?
[T-Mobile LG G2x] Klathmon:
that could be the case, what GB rom did you pull that line from? (and ICS rom)

not really sure why that would change though...

the file i attached is the exact same thing as what is in the first post, but its updated to the new version. so if you flash that you will be wiping again...

(still haven't heard any word that it works alright though)
[T-Mobile LG G2x] mansa_noob:
Awesome. Tested the windows version (don't have a linux machine at all :(). Anyways, the windows version with 5.0.2.8 works great.

I will edit the OP with link to your post!

Thanks again.

[edit] OP updated. Let me know if you want to change something.
[T-Mobile LG G2x] mansa_noob:
Not sure... have so many ROMs on my SD card that I have lost track :D. Anyways, I looked through a few and that seems to be a common theme between GB and ICS. I think its from Android. They don't expect anyone updating on an empty slate... so probably would be ignored when going GB --> ICS but corrupts when going blank --> ICS.

I know... it seems far fetched (likely because it is :)).

I tried a few variants of the script... moving #8 and #9 around, using boot.img from ICS builds, etc. but nothing solves this problem. Seems like blank --> GB --> ICS is the only working route.

Maybe we should ask the Devs (if any are listening please chime in).
[T-Mobile LG G2x] MWBehr:
I'm no dev, but all I can tell you is EMMC is definately p8. Also, if memory serves correctly, you're also right that EMMC on GB was p9. The partition tables that CWM uses are:

0p1 = system

0p2 = cache

0p5 = boot partition

0p7 = data

0p8 = emmc

1p1 = sdcard

There is no mmcblk0p9 under /sys/block/mmcblk0 so I have to assume that ICS has no partition 9 on the mmc. I wish I could also tell you what is in p3, 4, and 6, but I can't :D
[T-Mobile LG G2x] kesara:
Linux version - the RAR file is corrupt
[T-Mobile LG G2x] Klathmon:
ah ****, forgot i rar'd it. here use this...
[T-Mobile LG G2x] kesara:
Thanks, the gziped file is good. Seems you didn't include the recovery-p999-5.0.2.8.img in the package. I have that but others might not.
[T-Mobile LG G2x] overground:
Don't know which ROM you're looking at, but early ICS ROMs had that in fstab.

In order to get emmc to work on some of the earlier 4.0.x ROMs for the G2X, one had to manually edit fstab to read 8 instead of 9.

Most devs have fixed this in their ROMs by now.
[T-Mobile LG G2x] Klathmon:
Lol damn I'm not havin a good day :(, ill make sure to include it and test the whole thing when i get home
[T-Mobile LG G2x] kesara:
No worries. Take it easy :)
[T-Mobile LG G2x] mansa_noob:
Needs a good name don't you think? Lol can't keep calling it "The tool" forever!

IMHO its a toss-up between "The Eraser" or "The Xterminator".

What do you think? Alternates are welcome.
[T-Mobile LG G2x] PoorCollegeGuy:
Hello!

Just dropping by to let you know you've been featured on the XDA Portal :)

here's the link

http://www.xda-developers.com/android/remove-old-clutter-with-batch-cleanup-for-g2x/

Enjoy! and awesome work!
[T-Mobile LG G2x] mansa_noob:
Thank you. This is awesome, though now I can't change its name :(.

No worries though. Hope it helps many people.
[T-Mobile LG G2x] buru898:
I like the name batch cleanup actually :).
[T-Mobile LG G2x] Klathmon:
all fixed, tested, and working :)

uploaded here, and i edited my other post with the fixed version.
[T-Mobile LG G2x] moeahmad1995:
Hey mansa_noob, I finally got around to trying this and I want to say it works flawlessly. Idk if u heard or not, cwm 5.8.13 (I think it is that?) The touch screen has been ported by rusty. I was wondering if y would be able to make a tool that installs that as well?. It certainly is not a problem if u don't. I just used ur tool then after I was done I used nvflash to install the new cwm. I don't want to force u to do it so if u don't do it, it won't be a problem. Thanks for the tool and for everyone else, this tool is really safe to use
[T-Mobile LG G2x] mansa_noob:
I would love to try that too. Do you have a link for the image?
[T-Mobile LG G2x] moeahmad1995:
Yeh I do. Below is the kink to the thread, don't wanna Lin to the image only because that would be on far to the developers

http://rootzwiki.com/index.php?/topic/22984-[RECOVERY]-Touch-enabled-CWM-(5.8.1.3)
[T-Mobile LG G2x] mansa_noob:
Thank you. I have created a touch version. OP updated.
[T-Mobile LG G2x] ayysir:
Linux version please....
[T-Mobile LG G2x] moeahmad1995:
I just realised that I can't spell, sorry for that and that was quick. You are very nice and polite. Thanks for the new one
[T-Mobile LG G2x] mansa_noob:
Try this one for linux. After a few folks confirm that it works I will put it up on the OP.
[T-Mobile LG G2x] ayysir:
not working for me
[T-Mobile LG G2x] mansa_noob:
What was the error?
[T-Mobile LG G2x] Isis111:
I'm a bit confused. Is the file from Klathmon that formats all partitions in the phone pushing standard CWM or the touch version. I see an update on the OP page that says there is a touch version but I'm not sure which file is which. Sorry for such a dumb question but I'm a bit lost on the file numbers. Thanks:rolleyes:
[T-Mobile LG G2x] Klathmon:
the files from me are mansa_noob's cleanup batch, that flashes the newest NON-TOUCH recovery.

the touch recovery version is the same batch, but it instead flashes the Touch version of the recovery.

links to all of them can be found in the first post. (the touch version is in the second or third 'EDIT' section.)
[T-Mobile LG G2x] Isis111:
Thank you, that was quick.
[T-Mobile LG G2x] Klathmon:
i dont really have a life :)
[T-Mobile LG G2x] ayysir:
check attachment for error i am getting in terminal @ OP
[T-Mobile LG G2x] mansa_noob:
Looks like fastboot.bin is not working. I wonder if the fastboot is corrupt?

Can you copy that file from the windows version and try? Sorry I don't have a linux installation yet so can't try on my own :(
[T-Mobile LG G2x] ayysir:
still getting bootloader error....
[T-Mobile LG G2x] Klathmon:
try this one

sometimes when you edit files on a windows filesystem. windows corrupts them for ext4. plus windows and linux differ on whats considered an "end of line" character, so a return character on windows is actually 2 characters on linux. (causes all kinds of ****storms)
[T-Mobile LG G2x] ayysir:
nope still a no go, tried to put the files into my nvflash folder [what i use to flash a recovery] still a no go, so its either the shell script or cfg file
[T-Mobile LG G2x] Isis111:
:)I just wanted to thank you for all your work on this. I was getting ready to flash 5.0.2.8 this morning by using the flash tool with 5.0.2.0 in it and altering the file to change the img to 5.0.2.8 so that it would upgrade my CWM. I wanted to try the new touch recovery from CWM but I decided it would be allot more trouble renaming files etc..... and lo and behold I get up this morning and come into to check the OP one more time before I flashed and there as pretty as you please is the Touch CWM already set up to flash my G2x and get the added advantage of G2x Clean Up Batch as I also was having issues with Bluetooth. Flashed the batch file and it all went smoothly as can be, now up and running my Hell Fire Rom and its much faster. No one can compensate you guys for the work you do on here but I did drop a donation in the box for you. Thanks again!!!!
[T-Mobile LG G2x] mansa_noob:
Thank you for your kind words and donation is appreciated too (although that was not my purpose when I posted the OP :)).