[TOOL] G2X Cleanup Batch *** WARNING *** WILL FORMAT INTERNAL SD

Search This thread

mansa_noob

Senior Member
Feb 21, 2012
533
151
Markham
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.

If you have a g2x then this would do the trick...

Sent from my LG-P999 using XDA
 

mt3g

Senior Member
Aug 14, 2009
6,949
3,128
Phoenix
If you have a g2x then this would do the trick...

Sent from my LG-P999 using XDA
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.
 

nitrogen618

Senior Member
Jul 14, 2010
968
105
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?
 

ayysir

Senior Member
Aug 30, 2011
4,552
5,980
Bronx, NY
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?

Uh it will reformat internal SD.... read more

Yes it's a g2x global known problem again.... Read more
Sent from my LG-P999 using Tapatalk 2
 
  • Like
Reactions: nitrogen618

nitrogen618

Senior Member
Jul 14, 2010
968
105
Uh it will reformat internal SD.... read more

Yes it's a g2x global known problem again.... Read more
Sent from my LG-P999 using Tapatalk 2

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?):eek: +thankss (some people don't have this airplane problem)

EDIT: This fixed the airplane problem for me.. TY OP!
+THANKS :)
 
Last edited:
  • Like
Reactions: mansa_noob

nitrogen618

Senior Member
Jul 14, 2010
968
105
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 :eek:

I got that problem.. To fix it just

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

???

Profit
 

zechizen

Senior Member
Jan 28, 2012
61
12
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 :eek:

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.
 
Last edited:

k4p741nkrunch

Senior Member
Jun 14, 2010
512
153
Florida
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. ;)
 
  • Like
Reactions: mansa_noob

mansa_noob

Senior Member
Feb 21, 2012
533
151
Markham
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. ;)

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).

Sent from my LG-P999 using XDA
 
Last edited:

mansa_noob

Senior Member
Feb 21, 2012
533
151
Markham
I had it

To fix it

Just unmount, Format internal SD, and remount.

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).
 

exorcist70

Senior Member
Dec 10, 2011
73
9
Pennsylvania
I had it

To fix it

Just unmount, Format internal SD, and remount.

I don't have those options, see below:

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

picture.php


I click Mount SD Card under Internal Storage and it just tells me "SD card safe to remove"
 
Last edited:

DJSave

Senior Member
Oct 27, 2011
315
123
Tbilisi
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.
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 36
    If you are going to flash and ICS ROM after this tool please make sure to first install a GB then ICS otherwise your SD card will not be accessible. I am trying to find a fix but it has been illusive. This statement will be removed once a fix has been found and OP updated.

    Now with CWM Touch!

    This method uses NVFLASH to recreate all partitions and formats them, thereby getting rid of the file allocation pointers and hence renders data inaccessible without effort.

    Note: I have never seen a file come back to life or its data affect other files without effort on the users part or a temporary glitch once the partitions and pointers have been overwritten. Please post a reply with evidence if you have seen it.


    Benefits:

    The contents of the zip file can be used to super clean G2X before a new ROM flash. This tool recreates all the partitions in the phone so wipes the pointers to all files (everything). The method it employes has existed from before. The files here will stop short of pushing a ROM, so that you can push your favorite ROM.

    Prerequisites:

    • G2X (Will not work on O2X due to different partition table)
    • Desire to have a clean install of your favorite ROM :D
    • Backup your data

      *** WARNING ***​

      This tool will wipe both phone internal memory and internal SD card. External SD card content is safe.

      Don't say you haven't been warned!

    What to do:

    • Download the attached Zip file.
    • Take out the battery (assuming you have backed up your data on external SD card, computer or elsewhere), connect the device via USB while holding VOL+ and VOL- together. Don't let go of the volume buttons until the device is recognized.
      (I typically leave Device Manager open to see when it shows up in the list under "USB Controllers").
    • Launch flash.bat, sit back and wait until the process finishes (generally a good idea to open a command prompt, CD to the directory and then run the file).
    • Unplug, put battery in, reboot into CWM recovery (pushed by this tool) by holding VOL- first, then pressing and holding POWER).
    • Flash your favorite ROM.
    • Enjoy!

    I made this package because I could not get the bluetooth to work with G2x GB 2.3.3 (and below). The issue was a disconnect problem where both the phone and headset would still think they were connected but in audio would not be routed for a call or media. After this procedure my phone has not had an issue for almost 3 weeks now. I have tried it with two ROMs and 3 different headsets without any issues.

    I guess I will not toss this phone after all :D.

    Putting it out there in the hope that it may help others solve some of their issues as well. I suspect bad data stays in places not touched by other methods.

    Your comments are most welcome.

    [Update]

    Klathmon has made an newer version with CWM 5.0.2.8. RP by Klathmon can be found here:

    http://xdaforums.com/showpost.php?p=24768294&postcount=66

    I have tested the windows version but linux one is untested. Use at your own risk.

    [Update]

    Now with CWM Touch!

    Thanks to everyone who has contributed on this thread with a drive to positive change! You work/comments/suggestions are very much appreciated.



    References:
    http://xdaforums.com/showthread.php?t=1248644. This link was the inspiration for the current work.

    Link to CWM Touch development thread. I took the image posted there: http://rootzwiki.com/topic/22984-recovery-touch-enabled-cwm-5813/



    [EDIT] The zip file should be fixed now. Darn work machine does something to the upload.
    5
    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

    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 :)
    4
    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. :)
    3
    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
    3
    :)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!!!!