How to Flash the fastboot ROMs without wiping internal storage - OnePlus 6T Guides, News, & Discussion

Download the fastboot ROM that you want to flash to restore your phone unzip it and then change the flash-all.bat to flash-all.txt then open it. It will have a line that looks like this
fastboot -w update images.zip
Change it to this
fastboot update images.zip
Then close it and save. Change the file name back to flash-all.bat it will now flash the fastboot ROM without wiping internal storage. After that boot back to bootloader and boot phone to twrp and wipe only dalvikcache and data. You will keep all the files on you're phone flash twrp and flash you're new custom ROM gapps magisk the way you normally do. You will have to set you're ROM up again but everything on you're internal storage will still be there. I hope this helps people flashing on a/b devices.

Pretty sure it asks if you want to wipe the internal storage.

It never asked me if I wanted to wipe it just go straight through the process but that it doesn't reset the bootloader like the MSM tool and doesn't wipe internal storage it makes it easier to flash ROMs with the A/b partition. At the beginning when I first bought my McLaren OnePlus 6t I would have to put my music and all my files back on my phone and I have a hundred gigs of music so it was hard to flash a ROM now I can flash one everyday day or every other day. the only reason I even posted this was I couldn't find it anywhere online and then I remembered that if you erase something from the. Bat file it would not wipe so I took a look and figured it out figured I'd post it so that people with the OnePlus 6t would have this information readily handy.

DaveIsHome said:
Download the fastboot ROM that you want to flash to restore your phone unzip it and then change the flash-all.bat to flash-all.txt then open it. It will have a line that looks like this
fastboot -w update images.zip
Change it to this
fastboot update images.zip
Then close it and save. Change the file name back to flash-all.bat it will now flash the fastboot ROM without wiping internal storage. After that boot back to bootloader and boot phone to twrp and wipe only dalvikcache and data. You will keep all the files on you're phone flash twrp and flash you're new custom ROM gapps magisk the way you normally do. You will have to set you're ROM up again but everything on you're internal storage will still be there. I hope this helps people flashing on a/b devices.
Click to expand...
Click to collapse
Thank you very much about this topic. I will try this method for my OP6. I also face your problem about internal data. I have more than 100gb data in my phone and i don't want lost it's on every time i flash the phone. I hope everything ok after use this method.

AWESOME!!

Good to know.

Gonna try this on my oneplus 8 pro but the twrp is buggy atm and doesn't wipes data or even cashes, will have to find some fastboot commands to just wipe data and not internal storage, cheers

Can you please make a video tutorial, it will be great to understand...

How can I flash a Fastboot ROM with my bootloader locked? Please help.

pagan_1 said:
How can I flash a Fastboot ROM with my bootloader locked? Please help.
Click to expand...
Click to collapse
AFAIK you can't.

pagan_1 said:
How can I flash a Fastboot ROM with my bootloader locked? Please help.
Click to expand...
Click to collapse
I was able to flash while having my bootloader locked...
You should enter EDL mode by connecting two test points at the back of your A2 lite and plug the USB. It all dose the magic.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I did as follows.
Note-I was not successful with latest flash tool. Succeeded with 20160830 version at https://www.xiaomiflash.com/download/

Related

SOLVED [Q] Serious Bootloop issue using cwm

Hello everyone,
I recently rooted my phone ( http://theunlockr.com/2013/03/16/how-to-root-the-motorola-razr-i/ ) and everything was ok. But while setting up a new ROM, my system got stuck in a bootloop.
I can't figure out what is wrong, and no matter what rom i install, the device manages to boot up, but then crashes when loading GUIs and third party apps.
What i have tried so far:
wipe everything there is to wipe using CWM and formating folders also using cwm
press factory settings on fastboot
using bp tools on fastboot (though i don't know what it is used for) it managed to boot up the phone ONCE but with no wi fi nor mac adress available (the rom i used http://www.argendroid.com/topic-ROM...u-Control-Smart-Battery-21-08-2013-ArgenDroid )
mess up with different roms, all of them crashed at the same point
The Roms i tried:
Pillama 1.6 http://www.argendroid.com/topic-ROM...u-Control-Smart-Battery-21-08-2013-ArgenDroid
Atom CFW http://www.argendroid.com/topic-ROM-Atom-CFW-CustomFirmWare-Final
The tutorial's rom mentioned before which worked well
Progress and hints
at first i would just wipe data/factory , cache partition and dalvik, and the booting could not go further than displaying the unlock warning
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
once i formated /system, /cache, /data, /pds, /sdcard(which is actually the phone internal storage, there is another folder named /external-sd)
only then the boot process would go further and display the nice loading animations, but still crashing in the end before i could do anything.
Aditionally i can't manage to use ADB because somehow, my Barcode managed to dissapear. ADB won't recognize my device.. i'll try to find a ROM with usb debugging enabled by default but who knows...
So please help, what can i do?
I think there is something inside the internal storage that is not quite erased and is jamming when installing other roms. It is still pretty bizarre, and my phone is no more than a month old so...
Thanks beforehand.
How you installed CWM? Was using this? Which CWM version are you using? Tried to flash to stock?
well, you need to find pi-llama 1.4
download it, enter fastboot and flash the system.ext4 image. type
fastboot flash system (name of the file)
then look forward the omar-avelar kernel img and type
fastboot flash boot (name of the kernel img)
SOLVED
sky0165 said:
well, you need to find pi-llama 1.4
download it, enter fastboot and flash the system.ext4 image. type
fastboot flash system (name of the file)
then look forward the omar-avelar kernel img and type
fastboot flash boot (name of the kernel img)
Click to expand...
Click to collapse
Surprisingly enough, pi-llama 1.4 solved it.
https://mega.co.nz/#!wFpjhLrA!ODHD6DKRN-DFTGUhNPTTgzrzcIE_aG2lgWDp4gBgXHY
i just had to modify the .bat file so it wouldn't search for fix.zip in the phone memory.
It succesfully flashed system.img, boot and cwm 6.0.9 (not sure didn't check)
then i wiped data on phone, and installed fix.zip flash with cwm
once i got to restart it, i got it on fastboot mode and used bp tools and.... IT BOOTED UP!!
i think the boot included is omar's already, because wlan issues were solved (device has got a MAC adress)
thank you so much!
i won't turn off my phone again just to be sure
thiagomtl said:
How you installed CWM? Was using this? Which CWM version are you using? Tried to flash to stock?
Click to expand...
Click to collapse
Hi, it got solved thanks to @sky0165 advice,
i just used fastboot recovery <cwm image>
<cwm image> being the file downloaded from this thread
http://forum.xda-developers.com/showthread.php?t=1974097
6.+ version i didn't check
i tried to flash to stock yes but since adb didn't work it was kind of pointless i think.. it just didn't work
Thanks for your concern
I should mention that my PC is not able to recognize the usb storage.
I don't mind since Airdroid exists, but it's still kind of a bummer.
ADB recognizes it, though it displays Medfield<hex number>
ymer92 said:
Surprisingly enough, pi-llama 1.4 solved it.
https://mega.co.nz/#!wFpjhLrA!ODHD6DKRN-DFTGUhNPTTgzrzcIE_aG2lgWDp4gBgXHY
i just had to modify the .bat file so it wouldn't search for fix.zip in the phone memory.
It succesfully flashed system.img, boot and cwm 6.0.9 (not sure didn't check)
then i wiped data on phone, and installed fix.zip flash with cwm
once i got to restart it, i got it on fastboot mode and used bp tools and.... IT BOOTED UP!!
i think the boot included is omar's already, because wlan issues were solved (device has got a MAC adress)
thank you so much!
i won't turn off my phone again just to be sure
Hi, it got solved thanks to @sky0165 advice,
i just used fastboot recovery <cwm image>
<cwm image> being the file downloaded from this thread
http://forum.xda-developers.com/showthread.php?t=1974097
6.+ version i didn't check
i tried to flash to stock yes but since adb didn't work it was kind of pointless i think.. it just didn't work
Thanks for your concern
Click to expand...
Click to collapse
It's nice to hear that. You can flash other roms(Omar for example) in case you got bootloops with clean installs. You just need to do the pi-llama method (flash the system.img & kernel) and then install the rom you want on top of the pi-llama 1.4

Any hope for me?

I have nothing but bootloader. No system. No recovery. I've attached a screenshot. Do I have any hope?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
You should be fine, because your device is unlocked. The only way you likely would have screwed yourself is if the OEM Unlocking toggle in Developer Options within Android was turned off.
EDIT: Using Fastboot you should be able to flash TWRP, which will give you your recovery. From there, flash a ROM and you should be good.
spastico said:
I have nothing but bootloader. No system. No recovery. I've attached a screenshot. Do I have any hope?
Click to expand...
Click to collapse
Go here DL the latest shamu factory image and follow the instructions. It will delete everything though.
Thanks guys. I'll let you know how it goes.
I'll be using a Mac.
Still struggling, but made a little progress.
I'm using a mac with terminal.
I don't know the terminal commands, but searching around the forums By doing this: ./fastboot boot twrp.img I now have twrp recovery working. But I still can't figure out how to flash.
Browsing around my nexus using twrp, it looks like I have no system partition.
Any more advice?
Woohoo!
Reading these forums, I figured out how to sideload the rom using ./adp with twrp sideload adb.
Back up and running.
All of this started while I was trying to switch from SuperSU to Magisk.
I still want to move to Magisk, but I obviously need to do some more reading.
For some reason I couldn't get the factory images to sideload. It kept saying invalid zip. So I sideloaded PureNexus.
All is good, but I just don't have a radio.
Off to do more reading.
Got a radio and posting from my Nexus.
Thanks again guys.
./fastboot flash radio radio.img
Great read, seeing the progress reported on like that. Thanks for updating.
If you ever want to move to the stock factory image, you don't sideload it. You'll need to run the flash-all.bat file (edit it and remove the -w flag to keep your data) or unpack it and use fastboot to flash each separate image (skip userdata and if you want to have TWRP installed to your device also recovery).
And if you have further issues with getting Magisk running, check out the Magisk guide.
@spastico @Didgeridoohan
To sideload a stock image on an N6, you have to use a full OTA image as compared to using fastboot flash (or the flashall.bat) with a Google factory image.
The instructions for each are well written right on the linked page from google.
@spastico, you commented that with TWRP booted, you didn't see a system partition. System is not mounted in TWRP, but you can manually mount it if you choose. As you discovered, mounting isn't necessary to flash an image.
"Good judgment comes from experience, and a lot of that comes from bad judgment." - Will Rogers
Awesome! I keep forgetting about those full OTAs. They weren't around when I used stock factory images on my Nexus...
Thanks for the additional advice.

Phone does not recognise encrypted storage, please help!

Hi,
There is this bug on LOS16 that if the pop up camera is up and then the device switches off, the camera stays up permanently until a stock rom is reflashed. I had this issue before, so I restored a backup I made on MIUI 10.3.16 using TWRP, but the device was stuck in a bootloop, and the camera was still stuck, so after restoring different backups I made, I decided to finally use MiFlash to fastboot flash MIUI 10.3.16, and I chose the 'keep user data' option, however this also bootlooped and went into MIUI recovery. I reflashed TWRP and now I face this issue:
TWRP does not recognise that my phone is encrypted, and does not ask for my password, so I can see that my files are here, but they have random folder and file names. (example shown below)
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I managed to get MIUI running, however it does not ask me for my password, only my Mi account password.
I restored a LOS16 backup I made ages ago, and that also does not ask me for my password - the files I see in the file manager are all encrypted like TWRP.
I attempted the 'twrp decrypt' command, but that does not work either.
I attempted flashing backups and custom roms from a USB, using PitchBlack recovery, OrangeFox, and two TWRP versions.
All I want is for either a recovery or a rom to ask for my unlock password, so it can use that to decrypt my files.
I am not 100% sure if using MiFlash is what caused this, but is there anything else I could try? Are all my files gone? I cannot copy my encrypted files over to my PC and Windows returns an error when trying to do so. Are there any 3rd party tools I can use to decrypt my stuff?
I know I could just wipe my storage and start again, but I do not really want to do that until I know for sure that my files are gone.
I was thinking that MiFlash wiped the decryption keys from my device, but wouldn't a backup restore them?
If it is not possible to save my files, could someone explain why, so I do not make the same mistake again?
Any help would be appreciated.
Format Data, you cant go from miui to aosp or vice versa without doing that. backup your data to pc before or whatever cuz it wipes all internal.
Best thing to do is to fastboot flash again, but use the clean all option.
It's never a good idea to dirty flash when doing anything other than updating a ROM. You might sometimes be OK if flashing from one AOSP ROM to another AOSP ROM.
If your going from MIUI to a custom ROM, or from a custom ROM to MIUI, then it's not worth the aggro you'll most likely get by dirty flashing. Just spend the extra time backing up your data and save the headache.
As for the data, try installing a different TWRP and see if that will then ask for a password to decrypt the phone, before you do a clean install of MIUI.

HELP: After updating to android 10

After the update, this message appears after restarting, updating by OTA, not boot
how to fix this?
translate:It is not possible to load the android system. Your data may be corrupted. If you continue to receive this message, it may be necessary to perform a reset to the original configuration and clear all user data stored on this device.
Try again OR reset to original configuration
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
I'm sorry for what has happened to your phone. It's probably caused by some corrupted files while uploading or the file integrity has been jeopardized since something similar happened to me while I was trying to unlock the boot loader without wiping the phone. I'd say there's not a chance to get your datas back if you've got a locked boot loader but if you're unlocked you might wanna try pulling important files from the storage using fastboot or TWRP. But at the end a wipe is necessary for phone to function correctly again.
Have a nice day.
A quick solution might work.
Solution steps:
0. Get the adb/fastboot tools from Google
1. Mobile Go to fastboot
2. use ‘fastboot getvar current-slot’ to determine what slot you are on, which is damaged. You will get either a or b
3. use ‘fastboot --set-active=b’ or ‘fastboot --set-active=a’ for setting active slot to another. Hence, set it to b if you got a from step 2.
4. Restart.
The possible reason and why doing this:
1. If ota is working, the original system partition is untouched for sure, since ota check system partition during the process.
2. The ota extract rom to another slot, and set the active slot to another after reboot.
From what I saw here, there is some problems between the original data partition and new system partition, but they might Woking with the old one.
Sent from my Mi A2 using Tapatalk
Fastboot can switch slots for fully unlocked phone only.
If phone is not unlocked, options are:
- make reset and loose data, or,
- if data is to be preserved - remove SIM, plug external power, and continue retrying reboots (bootloader of AndroidOne phone with A/B slots is supposed to determine after numerous attempts that current slot does not contain bootable OS and automatically switch to previously active slot).
Aerobatic said:
Fastboot can switch slots for fully unlocked phone only.
If phone is not unlocked, options are:
- make reset and loose data, or,
- if data is to be preserved - remove SIM, plug external power, and continue retrying reboots (bootloader of AndroidOne phone with A/B slots is supposed to determine after numerous attempts that current slot does not contain bootable OS and automatically switch to previously active slot).
Click to expand...
Click to collapse
Tbh from several research, I can't find evidences that suggest swapping slot require unlocked bootloader.
Since we normally unlock bootloader at the very beginning.
Either way worth trying.
Sent from my Mi A2 using Tapatalk
As a matter of fact, "fastboot set_active b" in full stock phone state returns: FAILED (remote: 'Slot Change is not allowed in Lock State').
So, for those who did not unlock MiA2 beforehand, the only hope to save data in OTA-generated bootloop state is to rely on AndroidOne "A/B (Seamless) System Updates" and keep trying to boot.
https://source.android.com/devices/tech/ota/ab
https://source.android.com/devices/tech/ota/ab/ab_implement#bootcontrol

When I try to flash a custom ROM I always end up with this, and the device only boots to TWRP Recovery

What could be the cause?
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Xiaomi protect their device from custom rom or custom recovery and some time device go to hardbrick and stock on fastboot mode
So every time you want to install a custom rom after successful to install(dirty flash better) the rom first go beck to twrp menu and format system and dalvik cache then go to install>install image>select twrp img file>install
Then go to reboot>reboot to recovery
Then reboot to system
I don't have your device. But that list of files/folders with random letters means your internal storage/data partition is encrypted. You need to go to "repair filesystem" menu in twrp and reformat it to another type and back to ext4. Or use "format Data" menu. All your data will be wiped.
Don't take my word for it. Google "how to decrypt device in TWRP" and learn about it.
Ps: @moh4556 your answer is correct but it's not format system and dalvik, it's wipe system/dalvik/data menu. It will delete those partitions but for data it leaves /data/media (your internal sdcard) alone. It's sometimes not enough when moving from stock to custom rom.
Hope this helps
weird, i was pretty sure i replied to this thread
strange characters in roms mean you havent formatted data most of the time. once you answer yes you lose your entire data (and locking mechanisms which scrambles names) altogether
for the most part, installing roms follow the same steps
format (not wipe) data
wipe system, vendor, dalv and cache
flash stuff
wipe dalv and cache again
moh4556 said:
Xiaomi protect their device from custom rom or custom recovery and some time device go to hardbrick and stock on fastboot mode
So every time you want to install a custom rom after successful to install(dirty flash better) the rom first go beck to twrp menu and format system and dalvik cache then go to install>install image>select twrp img file>install
Then go to reboot>reboot to recovery
Then reboot to system
Click to expand...
Click to collapse
not entirely true. it is highly recd to install the vbmeta patch for redmi8. im lucky and havent required it.
newer miui does make it a pain to install custom recovs directly, hence the 3.6 update included an advanced install option
older miuis arent that protected and only require a reboot to recov after installing the custom recov
also a bit offtop but whatev

Categories

Resources