[Utility] CleanFlasher / & Get your phone ready for 4.3

Search This thread

droid_legacy

Senior Member
Feb 16, 2012
267
113
0
Trier
Some words about my little Script:

I would describe myself as a flashoholic and kinda perfectionist.
I try a lot of different Roms and to get the best results I always want to start from scratch and have a clean base for the new Rom.
So I decided to write a little script that automates the process for me. :lazy:​



Based upon: Android 4.3 AOSP (JWR66Y)


There will be different versions:



For all versions: THIS WILL WIPE YOUR USERDATA! Make sure you have a backup!



1. Coming from a 4.2 rom:

- flashing latest 4.3 bootloader
- flashing latest 4.3 radio
- formatting system partition
- formatting userdata partition
- formatting cache partition
- flash stock boot.img
- flash stock recovery.img
- write original factory system partition to the device
- write original factory userdata partition to the device
- write original factory cache partition to the device
- again formatting system partition
- again formatting userdata partition
- again formatting cache partition

Now you have a complete "empty" device ready for every new 4.3 Rom.
Your device WON'T boot up until you flash a Rom in Recovery or via fastboot!


Download


2. Just clean install (already 4.3):

- formatting system partition
- formatting userdata partition
- formatting cache partition
- flash stock boot.img
- flash stock recovery.img


Your device WON'T boot up until you flash a Rom in Recovery or via fastboot!


Download


3. Clean install for paranoids ;) (already 4.3):

- formatting system partition
- formatting userdata partition
- formatting cache partition
- flash stock boot.img
- flash stock recovery.img
- write original factory system partition to the device
- write original factory userdata partition to the device
- write original factory cache partition to the device
- again formatting system partition
- again formatting userdata partition
- again formatting cache partition

Your device WON'T boot up until you flash a Rom in Recovery or via fastboot!


Download


Instructions:

- Download file
- Unpack it (using e.g. 7zip or WinRar)
- open the folder
- put your device into fastboot mode by either chosing it in your reboot menu or by powering off the phone and then
push and hold Vol+, Vol- and the power button until you are in fastboot mode
- connect the device to your PC
- execute the "make_it_happen.bat" in the folder
- hold on tight! Your device will reboot a few times during the process (don't worry)
- enjoy fresh and empty Nexus 4. :D


Note:

This is ONLY for the Nexus 4! Don't try it with other devices! It won't work.

You can easily replace the included files with e.g. your prefered kernel (boot.img) or your prefered recovery (recovery.img).
Just extract the *.zip and replace the files! (Be careful with the spelling.) This might save you some time if you always want to start from the same fresh base.

Going to release a version that lets you decide which version you want to use or what you want to flash/erase/format. -> Kinda AiO Version of this little script.
If people are interestes in it, I might release a version of this script that lets you revert to either AOSP stock or Google Factory Image stock (both bootable) without wiping partitions after the flash. (Of course CLEAN.)
At the moment these versions are in order you are directly going to flash a custom rom to your device. Just tell me.



Thanks to:

Google for their factory Image.
franciscofranco for his precompiled AOSP source
 
Last edited:

RGM79

Member
Oct 13, 2011
25
2
0
I recently got a Nexus 4, probably on 4.1.

Anyway, flashing to a 4.3 custom rom and the internal storage is a bit weird - lots of sdcard simlinks with folders named 0, legacy, emulated in the storage directory. I saw a thread that said that this happens after updating from an earlier revision of android and is supposed to be a backup of the old sdcard partition as it was, but it's quite confusing and doesn't seem to work well. I can't seem to get rid of the simlinks within a rooted file browser, not that I am completely sure of how to do that, anyway.

Now, the actual question - will using this get rid of the confusing way my internal storage's sdcard directory is structured, returning it to something simple like "/storage/sdcard/mystuff"?
 
  • Like
Reactions: hybred-nexus

droid_legacy

Senior Member
Feb 16, 2012
267
113
0
Trier
I recently got a Nexus 4, probably on 4.1.

Anyway, flashing to a 4.3 custom rom and the internal storage is a bit weird - lots of sdcard simlinks with folders named 0, legacy, emulated in the storage directory. I saw a thread that said that this happens after updating from an earlier revision of android and is supposed to be a backup of the old sdcard partition as it was, but it's quite confusing and doesn't seem to work well. I can't seem to get rid of the simlinks within a rooted file browser, not that I am completely sure of how to do that, anyway.

Now, the actual question - will using this get rid of the confusing way my internal storage's sdcard directory is structured, returning it to something simple like "/storage/sdcard/mystuff"?

Yes. Method 1.) should exactly do what you want.

Be sure you update your recovery to the latest version. E.g Clockworkmod or Twrp.

After you have succesfully used method 1.) stay in bootloader.

- Download the *.img file of your prefered recovery.
- open terminal and flash the recovery by using the following command:

- fastboot flash recovery "nameofyourrecovery".img (of coures without the " ")
- fastboot reboot-bootloader

Thats it.
Now you have a custom recovery. Boot into recovery and flash your prefered rom!
 

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Some words about my little Script:

    I would describe myself as a flashoholic and kinda perfectionist.
    I try a lot of different Roms and to get the best results I always want to start from scratch and have a clean base for the new Rom.
    So I decided to write a little script that automates the process for me. :lazy:​



    Based upon: Android 4.3 AOSP (JWR66Y)


    There will be different versions:



    For all versions: THIS WILL WIPE YOUR USERDATA! Make sure you have a backup!



    1. Coming from a 4.2 rom:

    - flashing latest 4.3 bootloader
    - flashing latest 4.3 radio
    - formatting system partition
    - formatting userdata partition
    - formatting cache partition
    - flash stock boot.img
    - flash stock recovery.img
    - write original factory system partition to the device
    - write original factory userdata partition to the device
    - write original factory cache partition to the device
    - again formatting system partition
    - again formatting userdata partition
    - again formatting cache partition

    Now you have a complete "empty" device ready for every new 4.3 Rom.
    Your device WON'T boot up until you flash a Rom in Recovery or via fastboot!


    Download


    2. Just clean install (already 4.3):

    - formatting system partition
    - formatting userdata partition
    - formatting cache partition
    - flash stock boot.img
    - flash stock recovery.img


    Your device WON'T boot up until you flash a Rom in Recovery or via fastboot!


    Download


    3. Clean install for paranoids ;) (already 4.3):

    - formatting system partition
    - formatting userdata partition
    - formatting cache partition
    - flash stock boot.img
    - flash stock recovery.img
    - write original factory system partition to the device
    - write original factory userdata partition to the device
    - write original factory cache partition to the device
    - again formatting system partition
    - again formatting userdata partition
    - again formatting cache partition

    Your device WON'T boot up until you flash a Rom in Recovery or via fastboot!


    Download


    Instructions:

    - Download file
    - Unpack it (using e.g. 7zip or WinRar)
    - open the folder
    - put your device into fastboot mode by either chosing it in your reboot menu or by powering off the phone and then
    push and hold Vol+, Vol- and the power button until you are in fastboot mode
    - connect the device to your PC
    - execute the "make_it_happen.bat" in the folder
    - hold on tight! Your device will reboot a few times during the process (don't worry)
    - enjoy fresh and empty Nexus 4. :D


    Note:

    This is ONLY for the Nexus 4! Don't try it with other devices! It won't work.

    You can easily replace the included files with e.g. your prefered kernel (boot.img) or your prefered recovery (recovery.img).
    Just extract the *.zip and replace the files! (Be careful with the spelling.) This might save you some time if you always want to start from the same fresh base.

    Going to release a version that lets you decide which version you want to use or what you want to flash/erase/format. -> Kinda AiO Version of this little script.
    If people are interestes in it, I might release a version of this script that lets you revert to either AOSP stock or Google Factory Image stock (both bootable) without wiping partitions after the flash. (Of course CLEAN.)
    At the moment these versions are in order you are directly going to flash a custom rom to your device. Just tell me.



    Thanks to:

    Google for their factory Image.
    franciscofranco for his precompiled AOSP source
    1
    I recently got a Nexus 4, probably on 4.1.

    Anyway, flashing to a 4.3 custom rom and the internal storage is a bit weird - lots of sdcard simlinks with folders named 0, legacy, emulated in the storage directory. I saw a thread that said that this happens after updating from an earlier revision of android and is supposed to be a backup of the old sdcard partition as it was, but it's quite confusing and doesn't seem to work well. I can't seem to get rid of the simlinks within a rooted file browser, not that I am completely sure of how to do that, anyway.

    Now, the actual question - will using this get rid of the confusing way my internal storage's sdcard directory is structured, returning it to something simple like "/storage/sdcard/mystuff"?
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone