Won't placing a cuostm ROM file before factory reset remove it from the phone?


Question

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?


Answer

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.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes