0

I have run CM12.1, OxygenOS, and now Exodus for a while now on my OnePlus One - but for the life of me I cannot remember where you have to place your new ROMs zip file.

When flashing a new ROM you should start from a clean slate so you do a factory reset wipe. However, as it seems that this basically wipes all the data from the device, where should I place the ZIP files I want to install later on?

If I access my phone through USB on my computer I assume that I can only access the data-partion (/"SD card" partition) and these get wiped any way, so how and where should I place the new ZIP files?

  • Place them on an external SD card (if your device supports it), or sideload them via adb while inside the recovery. – Death Mask Salesman Apr 19 '16 at 20:18
  • @DeathMaskSalesman No external SD card. Sideloading in this case means installing from your PC, right, I mean through ADB and a terminal interface. How does this work? Is the ZIP loaded unto the device and then installed? Or is streamed? – Bram Vanroy Apr 19 '16 at 20:23
  • 1
    Firstly, you need to install the adb utility on your (possibly Windows) computer. Then, you need to reboot your device in recovery mode, factory reset it (better if you wipe the System partition as well) and find the appropriate setting that will make your device wait for a file to be sideloaded. Then, connect your phone to your computer via a standard USB connection, fire up a terminal on your computer and start the adb daemon with adb start-server. Finally, issue adb sideload path_of_zip_file.zip and hit enter. The zip will be uploaded to your device, then installed. – Death Mask Salesman Apr 19 '16 at 20:36
  • I would like to point out that usong the TWRP app can allow you to place roms on internal, factory reset and install new ROMS. It just has to be done all at once. – Dan Brown Apr 19 '16 at 20:54
  • @DanB Could you expand on that, in an answer maybe? – Bram Vanroy Apr 20 '16 at 9:21
3

It is noted in the link you mentioned:

Depending on your device and its configuration, you may have options for wiping internal storage, external storage, sd-ext, android_secure, and/or an option for formatting data. There’s almost no reason that you would ever need to use these items.

(Emphasis mine)

For a clean wipe, you can get rid of everything under /data except of /data/media/ which in particular gets mounted as the emulated internal storage by Android. In short, it houses your files and serves as the internal SD card (/sdcard). You can however get rid of /data/media/0/Android directory since it contains files related to applications installed in your currently installed ROM. Those files may or may not interfere in smooth functioning of your new ROM after a clean wipe.

Advanced wipe can be performed from TWRP through Wipe → Advanced Wipe → choose appropriate boxes. Remember, Internal Storage there means /data/media and Data means /data excluding /data/media/.


If you still intend to wipe everything:

As Salesman wrote, you can use an external SD card to store the ZIP. If your device (OnePlus One does) supports USB OTG then you can use a USB drive as well to store the ZIP. Otherwise, as Death noted, is also a good option. In the side loading mode, the zip is served or as you said, streamed. You would need version 1.0.32 or above of ADB client in your PC to do side loading.

To initiate side loading, from TWRP go into Advanced → ADB sideload → swipe to begin sideload. In the PC, provided that you've setup and device plugged in using USB, issue the command:

adb sideload PATH   # PATH is file path of your ROM's zip in your PC.

Once side loading completes, you can do whatever you want in TWRP.

By the way, using MultiROM for OnePlus One you can get rid of all of this dilemma.

  • 1
    By the way, if the appropriate drivers for your device are installed on the computer, TWRP supports MTP mode as well, meaning files could be moved back and forth even from recovery. – Death Mask Salesman Apr 20 '16 at 7:24
0

Fun fact: TWRP already knows this will happen for some. It fixes this by not wiping all data.

First things first, most custom recoveries factory resets work by wiping apps, contacts, and accounts/settings, but dont format your internal data (images, music, etc) you can notice it where it says:

Formatting /data without erasing /data/media

So, how does this help?? Simple. You cab load the ROM on to the internal, open the TWRP app, and head to install. Pick you ROM, And tick the appropriate boxes-including wipe data and cache. Go ahead with it and wait.

BUT BE WARNED! It is not always perfect, and may bootloop or install-loop. It has worked for me often though.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.