Xiaomi Mi A2 (jasmine) can I update stock ROM via TWRP - Xiaomi Mi A2 / 6X Questions & Answers

Good Morning, I want to upgrade brother device to new version of android (because he can`t install security updates for unknow reasons), but I affraid that he loose all apps and settings (he is a firefighter and have app from firefighter station which signals dangerous traffic etc.) So my question is can I update downloaded stock ROM via TWRP (adb sideload) without fears that he loose everything?

iHusky said:
Good Morning, I want to upgrade brother device to new version of android (because he can`t install security updates for unknow reasons), but I affraid that he loose all apps and settings (he is a firefighter and have app from firefighter station which signals dangerous traffic etc.) So my question is can I update downloaded stock ROM via TWRP (adb sideload) without fears that he loose everything?
Click to expand...
Click to collapse
The only thing that will take your fear, is a backup of all important partitions (boot, system, data, vendor, efs, persist), stored externally, plus a copy of the internal storage content, also stored externally.
With that you should be able to restore everything to the exact point it is at right now, so you'll really need to mess up hard to not come out of basically any situation with those partitions saved.
As for your inital question:
Why don't you just update via ota if you wanna stay on stock?

Phil_Smith said:
The only thing that will take your fear, is a backup of all important partitions (boot, system, data, vendor, efs, persist), stored externally, plus a copy of the internal storage content, also stored externally.
With that you should be able to restore everything to the exact point it is at right now, so you'll really need to mess up hard to not come out of basically any situation with those partitions saved.
As for your inital question:
Why don't you just update via ota if you wanna stay on stock?
Click to expand...
Click to collapse
Because, brother have error, while try install security updates, but he have from March this year
And this is not possible to make update, because after click backup (Data partition) I get error "cannot create data/media/0/TWRP

iHusky said:
Because, brother have error, while try install security updates, but he have from March this year
And this is not possible to make update, because after click backup (Data partition) I get error "cannot create data/media/0/TWRP
Click to expand...
Click to collapse
Okay, so maybe first copying internal storage content to your PC and backup important apps would be sufficient then.
For apps you can use Titanium Backup (good, but makes troubles on android 10 at the moment), Swift Backup (recommend by many others) and more.
These backup solutions save apps and app data on your phone, so copy that to an external place, or you might lose them if you need to format data (which I'll suggest).
After your "backups" are made, I would wipe every partition in each slot, which you can also achieve with a "fastboot -w", and then also format data - the one where you need to type "yes" (which will also erase all internal storage content, but most probably will also solve your troubles).
From here there are tools like miflash or fastboot images to reflash stock (inform yourself about them, before you start all that!).
Be sure to flash the latest one right away, so you won't be in the need of "dirty" updates immediately again.
Afterwards, you can copy back the internal storage content and the folder of the backup app, and restore the previously saved apps.

Phil_Smith said:
Okay, so maybe first copying internal storage content to your PC and backup important apps would be sufficient then.
For apps you can use Titanium Backup (good, but makes troubles on android 10 at the moment), Swift Backup (recommend by many others) and more.
These backup solutions save apps and app data on your phone, so copy that to an external place, or you might lose them if you need to format data (which I'll suggest).
After your "backups" are made, I would wipe every partition in each slot, which you can also achieve with a "fastboot -w", and then also format data - the one where you need to type "yes" (which will also erase all internal storage content, but most probably will also solve your troubles).
From here there are tools like miflash or fastboot images to reflash stock (inform yourself about them, before you start all that!).
Be sure to flash the latest one right away, so you won't be in the need of "dirty" updates immediately again.
Afterwards, you can copy back the internal storage content and the folder of the backup app, and restore the previously saved apps.
Click to expand...
Click to collapse
I tried MiFlash, but without wipe anything, and it don`t upgrade version of system
But if I must, flash 2 slots A/B using MiFlash or one slot (A) is for system?

You can just download the zip file with version u want from the site below and flash it via TWRP making cache and dalvik cache wipes and changing slots at the end.
https://mifirm.net/model/jasmine.ttt#zip-mif

pfss said:
You can just download the zip file with version u want from the site below and flash it via TWRP making cache and dalvik cache wipes and changing slots at the end.
https://mifirm.net/model/jasmine.ttt#zip-mif
Click to expand...
Click to collapse
So, I don't need
to flash second slot?

iHusky said:
So, I don't need
to flash second slot?
Click to expand...
Click to collapse
Just if u want. It's not necessary.
In october I updated mine this way but forgot to change the slot before rebooting to the system and realized that was in the old Android version. I just went to TWRP again and changed slot. After rebooting, the phone was in the updated Android One.

pfss said:
Just if u want. It's not necessary.
In october I updated mine this way but forgot to change the slot before rebooting to the system and realized that was in the old Android version. I just went to TWRP again and changed slot. After rebooting, the phone was in the updated Android One.
Click to expand...
Click to collapse
I tried using fastboot and MiFlash but after all it stuck on bootloader

iHusky said:
I tried using fastboot and MiFlash but after all it stuck on bootloader
Click to expand...
Click to collapse
I just updated mine to November patch downloaded from here: https://mifirm.net/downloadzip/4197
I entered fastboot mode, executed
Code:
fastboot boot my_twrp_image_file.img
In TWRP made de wipes, flashed the ROM, changed slot and rebooted phone. It looks like it's normal.

Related

How to do a complete backup? (lost apps on the internal SD)

So I had my phone working and decided to try a kernel found here.
I went on, flashed the kernel through cwm, and nothing worked (stuck at loading screen with continous reboots).
So I flashed my recovery image, rebooting stopped by stuck it was at the loading screen anyhow.
So, since I could not come out of it, I downloaded a stock rom (I was running stock by the way), flashed it (with smartflash), rooted it (superoneclick), installed cwm (now v5) and I'm back on.
So I flashed the recovery, and most of the data is back but I lost all the apps on the SD card.
The SD card is the same from which I flashed the recovery image through CWM, and all my music is still there.
So might it be possible that the apps are still there too?
What can I do?
Why all the SD apps disappeared?
Edit: ok maybe we're talking about internal SD card... may it be the CWM v5 doing recovery from a v4 zip?
had this problem very, very, often...
nobody really could help me, but i know, its because of problems with the android_secure folder.
so i´m not an expert and i really don´t know what s the reason, but i tried some things and sometimes it helped...
it can appear if something goes wrong when you install an app or move an app from phone to sdcard, or when you want to restore them with titanium or cwm.
the possibiltythat it happens increases when you do both at the same time or, move many apps at the same time p.e. with gemini or install many apps at the same time (p.e. with panda pc suite).
or if something goes wrong with a market update.
mostly, it starts that you can´t install apps anymore. after reboot all apps on sd are away.
with luck you can repair it and get the apps back.
-delete the market cache.
-delete file smdl2tmp1.asec in android_secure folder on sd card or in mnt/... secure.. damn forgot the path of the second folder where this file can be. gotta google for it.
-or create a new android_secure-folder. unmount sdcard. rename android_secure folder to something different, so that there´s no more an android_secure folder. put sdcard back in the phone, reboot the phone. there will be a new empty android_secure folder. shut phone down, put sdcard into pc again, copy all files from renamed folder to the new android_sd folder, put card back into the phone, restart it and wait. with luck, your apps are back again.
don´t now, maybe it helps when you delete dalvik cache and cache before restart. sometimes it worked, sometimes not.
in your case, your apps are away after restore and not because of install/move2sd issues... so in this case its important to completely delete android_secure folder before restore. make a fullwipe. and after fullwipe i would restart phone once, so that a new clean android_secure folder could be created. hope something helps.
edit:
i did a little trick, that my external sd is mounted as sdcard in my phone. so normally the internal sd card is the "sdcard" in the phone. so, cos you can´t put your internal sd into the pc, you gotta mount it with usb connection.
Thanks but I'm afraid in this case the content really got deleted after I reflashed the rom...
IS there a way to really save everything via cwm?
Or should I use another software?
Also if flashing baseband: what will get deleted?
Flashing baseband will wipe /data
Rusty! said:
Flashing baseband will wipe /data
Click to expand...
Click to collapse
And how does /data relate to my problem?
Is /data backed up by cwm or not?
What is not backupped by cwm and how to backup it?
Rusty! said:
Flashing baseband will wipe /data
Click to expand...
Click to collapse
but you can restore it with nandroid, right? it's going to be just as before?
punyategar said:
but you can restore it with nandroid, right? it's going to be just as before?
Click to expand...
Click to collapse
If you mean baseband then the answer is no. It restores your ROM and all the apps including their data.
punyategar said:
but you can restore it with nandroid, right? it's going to be just as before?
Click to expand...
Click to collapse
Assuming you remembered to back it up yeah.
My radio flash procedure is:
NANDroid backup
Smartflash radio
NANDroid restore
Push new RIL
Use phone
Rusty! said:
Flashing baseband will wipe /data
Click to expand...
Click to collapse
I don't think so.
Kdz tool and official updater didn't wipe data. (Aren't you ?)
They did change only baseband and systems.
But you have to nandroid backup to avoid bricked.
You may not think so, but it does.
kitty's_daddy said:
I don't think so.
Kdz tool and official updater didn't wipe data. (Aren't you ?)
They did change only baseband and systems.
But you have to nandroid backup to avoid bricked.
Click to expand...
Click to collapse
Definitely wipe /data
Both Rusty! And myself always test new basebands and it definitely wipe /data.
Edit: sorry I'm referring to smartflash.
temasek said:
Definitely wipe /data
Both Rusty! And myself always test new basebands and it definitely wipe /data.
Click to expand...
Click to collapse
I think you would be correct.
It's only my opinion.
i use kdz tool, no user data will lost, only system(happened on me 2 times). don't use smartflash it will wipe all data
kitty's_daddy said:
I don't think so.
Kdz tool and official updater didn't wipe data. (Aren't you ?)
They did change only baseband and systems.
But you have to nandroid backup to avoid bricked.
Click to expand...
Click to collapse
dont know about kdz, official updater didn't touch my /data at all. i mean, my apps were just as before, the settings...
just use titanium backup and make sure the save location is in the sd card
For certain apps that have their own way of saving data, it might not always work.
I just can't find the correct answer in the posts I've read so far.
If I flash a kernel that doesn't work, and then I restore a CWM backup, why it wouldn't boot again?
If I reflash the stock rom and then restore a previous CWM backup, why something won't be there?
What exactly should I do in CMW to obatin a complete backup?
Or should I use something else?

Deleted internal storage in TWRP. Need Help.

I deleted the internal storage on my phone in twrp. What can I do to get everything back?
I think you're boned. Unless there is a way to pull the deleted data using software on a PC.
Fastboot factory IMG. Or use rom tool kit to flash a factory image. There is an option in twrp to connect to the PC where you can transfer files. You could always load a rom that way and flash a zip through twrp
As said above, you can still install a ROM. Or flash a factory image etc. But the data (pictures, videos, music etc) is gone. It was formatted and not likely able to be recovered. I assumed that's what you meant, when you asked to "Get everything back"?
My sad sad self went and did this. Still in TWRP. I've mounted system, data, and cache. I see the Nexus 6 in Windows 7 and see Internal Storage; it's empty. I cannot create new folders or copy files (ROMs, GApps, zips, etc) into Internal Storage without getting "The device has either stopped responding or has been disconnected." I cannot for the life of me find another way to push files to the phone.. Any help is greatly appreciated!
- b
EDIT: Is it still possible for me to follow Mr. Hoax's Tut through bootloader? (I'm really nervous to try and reboot into BL) It says I don't have an OS (obviously) when I get to the confirm reboot of TWRP...
boruko said:
My sad sad self went and did this. Still in TWRP. I've mounted system, data, and cache. I see the Nexus 6 in Windows 7 and see Internal Storage; it's empty. I cannot create new folders or copy files (ROMs, GApps, zips, etc) into Internal Storage without getting "The device has either stopped responding or has been disconnected." I cannot for the life of me find another way to push files to the phone.. Any help is greatly appreciated!
- b
EDIT: Is it still possible for me to follow Mr. Hoax's Tut through bootloader? (I'm really nervous to try and reboot into BL) It says I don't have an OS (obviously) when I get to the confirm reboot of TWRP...
Click to expand...
Click to collapse
try formatting user data first
simms22 said:
try formatting user data first
Click to expand...
Click to collapse
You're referring to TWRP, correct? Wipe->Format Data? I have done this but am unsure how to proceed... I still cannot seem to get files to copy onto Internal Storage...
EDIT: I got a ROM, GApps and SU to stick to Storage!!! Gonna try to install now.
SUCCESSSSSSSSSS!!!! WOOOOOO! Totally gonna try to update to 5.1 again haha Thank you thank you thank you @simms22!
Well, i have the same problem now.. unable to copy anything to the internal storage.
TWRP is opening fine though.. what should i do??
Mystique_Myth said:
Well, i have the same problem now.. unable to copy anything to the internal storage.
TWRP is opening fine though.. what should i do??
Click to expand...
Click to collapse
simms22 said:
try formatting user data first
Click to expand...
Click to collapse
Thanks!
This thread and this trick
try formatting user data first
Click to expand...
Click to collapse
Saved my...
Nexus 6
Tip: it will not allow to format user data right after deletion!
You will need to restart recovery and only after that it will format the user data!

[Q] encryption unsuccessful?

So, I figured I'd set up the scenario first in hopes to help make this understood:
1. Got the device
2. Booted/Updated to 5.0
3. Rooted using CF Autoroot
4. Remained on Stock 5.0 + Root (Stock bootloader/recovery)
- 1st "OFFICIAL" ROM came out so like the gentle flash'aholic I am, I rushed and downloaded [ROM][Unofficial][5.0.2][alpha/wip] Resurrection Remix v5.2.6[victara]
1. I installed TWRP via the Google Play App, (I think i was on 2.8.3.0)
2. Rebooted into TWRP, and did a FULL BACKUP (saved locally)
3. Formatted Davlik, System, Data, Internal Storage, Cache
4. Rebooted into TWRP, pushed the ROM files ([ROM][Unofficial][5.0.2][alpha/wip] Resurrection Remix v5.2.6[victara])
5. Flashed the ROM, GAPPS, SuperSU, Rebooted.
After about a minute of booting into the new ROM (new red loading animation) I started to get "encryption unsuccessful", and the only option was to factory reset phone, after which nothing happened, my guess was because of the custom recovery.
What was my error, and how do I prevent this from happening again?
My thinking is that wiping the Cache/System/Data/Internal/Davlik partitions somehow messed up some function someplace?
To fix it I took steps in this thread (http://forum.xda-developers.com/moto-x-2014/help/lollipop-update-failing-how-troubleshoot-t2961633) - thanks @randyklein
-Download "Official 4.4.4 Full Restore Images" from http://www.graffixnyc.com/motox.php# and extract. Move recovery.img, boot.img, and system.img into adb folder
-Boot into fastboot, plug in USB
-Using mfastboot v2, run the following commands:
mfastboot flash boot boot.img
mfastboot flash recovery recovery.img
mfastboot flash system system.img
How do I avoid this in the future if I decide to try a custom ROM/Recovery again?
Same problem...
Format data in twrp to fix encryption error
CWick4141 said:
Format data in twrp to fix encryption error
Click to expand...
Click to collapse
will i lose my twrp backup ?
marquesini said:
will i lose my twrp backup ?
Click to expand...
Click to collapse
Data partition just stores your apps (if not pre-loaded into system partition via ROM), and any data associated with them, so it leaves the Internal SD Card partition alone.
What concerns me is that I already wiped data, and I think I formatted the data partition as well, and still had the issue.
I'll have to try again soon.
I did a full wipe and then formated the data, then installed the ROM,gaaps,and supersu beta.
Got it working with root.
Shemploo said:
Data partition just stores your apps (if not pre-loaded into system partition via ROM), and any data associated with them, so it leaves the Internal SD Card partition alone.
What concerns me is that I already wiped data, and I think I formatted the data partition as well, and still had the issue.
I'll have to try again soon.
Click to expand...
Click to collapse
Formatting data in twrp is not the same as wiping data
CWick4141 said:
Formatting data in twrp is not the same as wiping data
Click to expand...
Click to collapse
True, that is why I said in above post that I think I formatted it as well, but being as I'm not certain I'll have to do it again to be sure.
Shemploo said:
True, that is why I said in above post that I think I formatted it as well, but being as I'm not certain I'll have to do it again to be sure.
Click to expand...
Click to collapse
You would know if you formatted data since it erases everything including internal storage
CWick4141 said:
You would know if you formatted data since it erases everything including internal storage
Click to expand...
Click to collapse
Alright, I booted TWRP, and clicked "Data" then "Repair/Change File System" it's currently showing f2fs, my format options are EXT2, EXT3, EXT4, FAT.
I think I want EXT4 right?
UPDATE: I tried EXT4 as every partition seems to use it, and from past experience, and It's working!.
Thank you for nudging me in the right direction.
edit: wrong thread

Help! Tried to install custom rom and now internal storage is encrypted

So i tried to install a custom rom, now my storage is encrypted and i can't install apps or anything on my device.
I unlocked the bootloader, install twrp, it didn't ask me for a password however. I then did advanced wipe, system data cache.
I then couldn't copy anything to my internal storage, so reflashed miui using miflash tool.
My device is working fine, but when plugged in, all the folders on my internal storage come up as random numbers and letters (which i assume means its encrypted). I have tried downloading something via chrome and it says "sd card not found".
I really hope someone can help me.
Thanks!
Hi ! Do you can resolve your problem ?
I'm not expert but I think reboot to Twrp and format your data . Advanced format data yes and flash your Rom. But I don't no if you do to flash the DM Verity Encryption remover before flash your Rom ?
Stay for expert help you..
ha2ell said:
So i tried to install a custom rom, now my storage is encrypted and i can't install apps or anything on my device.
I unlocked the bootloader, install twrp, it didn't ask me for a password however. I then did advanced wipe, system data cache.
I then couldn't copy anything to my internal storage, so reflashed miui using miflash tool.
My device is working fine, but when plugged in, all the folders on my internal storage come up as random numbers and letters (which i assume means its encrypted). I have tried downloading something via chrome and it says "sd card not found".
I really hope someone can help me.
Thanks!
Click to expand...
Click to collapse
I faced similar issue when flashing custom rom.
I did some research and found out that, I have to wipe data first, reboot to fastboot (in TWRP). Boot into TWRP again using DOS shell prompt.
In this way, your phone will not be encrypted, allowing file transfer and flash from TWRP.
Hope it helps.
Hi, I managed to fix it by flashing the latest miui fastboot ROM again using mi flash tool, and then restoring a backup of my system from Google drive and miui when setting up the phone. I think I will try to flash a ROM again at some point. What do you mean by DOS shell prompt? Thanks
You need flash Forced Encryption Disabler to remove encryption of the folders. In TWRP, flash zip and reboot to recovery.
This is link to download. https://androidfilehost.com/?fid=3700668719832238534
ha2ell said:
Hi, I managed to fix it by flashing the latest miui fastboot ROM again using mi flash tool, and then restoring a backup of my system from Google drive and miui when setting up the phone. I think I will try to flash a ROM again at some point. What do you mean by DOS shell prompt? Thanks
Click to expand...
Click to collapse
im facing the same problem now. the files are all jumbled up letters, do i need to format the device before using mi flash tool?

Question UNABLE TO BACK UP ANY ANDROID 12 MIUI OR CUSTOM ROM (internal storage 0mb) in TWRP

I'm able to use backup & restore in Android 11 custom or miui rom. but unable to use it when i flashed android 12 roms.
Can anyone walk me through how to fix this.
Did the ff workaround in youtube as well in any similar post but still not working.
1. Advance wipe > click data >Repair or Change File System > Change File System to EXT2 & EXT4
2. Format data
This process is temporarily working the internal storage is visible, but after booting to system and go back to twrp recovery, the internal storage appears 0mb again.
I flashed stock rom/ eu rom as well in TWRP as i read this is worked with them. but not on my end.
Kindly help me to solve this issue please.
TWRP is not yet compatible with Android 12, it can't decrypt the internal storage. You can't fix it until TWRP (or some other recovery) solves Android 12 support.
I think in theory you might be able to back up the ROM to an unencrypted storage like an SD Card or OTG USB drive, but I'm not sure (and I'm even less sure if such backup could even be successfully restored if you back the partition up without decrypting).
Use otg usb
rufio85 said:
I'm able to use backup & restore in Android 11 custom or miui rom. but unable to use it when i flashed android 12 roms.
Can anyone walk me through how to fix this.
Did the ff workaround in youtube as well in any similar post but still not working.
1. Advance wipe > click data >Repair or Change File System > Change File System to EXT2 & EXT4
2. Format data
This process is temporarily working the internal storage is visible, but after booting to system and go back to twrp recovery, the internal storage appears 0mb again.
I flashed stock rom/ eu rom as well in TWRP as i read this is worked with them. but not on my end.
Kindly help me to solve this issue please.
Click to expand...
Click to collapse
Case_ said:
TWRP is not yet compatible with Android 12, it can't decrypt the internal storage. You can't fix it until TWRP (or some other recovery) solves Android 12 support.
I think in theory you might be able to back up the ROM to an unencrypted storage like an SD Card or OTG USB drive, but I'm not sure (and I'm even less sure if such backup could even be successfully restored if you back the partition up without decrypting).
Click to expand...
Click to collapse
Cisuwek said:
Use otg usb
Click to expand...
Click to collapse
In my opinion it's only possible to backup encrypted storage as in A12 if you flash DfE but then you'll have to format and later you're decrypted and in future you can backup via TWRP.
But you can copy actual personal files with a file manager, if android is booted up, to external storages or internal micro SD. android internal app data can't copied.
Laptapper said:
In my opinion it's only possible to backup encrypted storage as in A12 if you flash DfE but then you'll have to format and later you're decrypted and in future you can backup via TWRP.
But you can copy actual personal files with a file manager, if android is booted up, to external storages or internal micro SD. android internal app data can't copied.
Click to expand...
Click to collapse
You can install cutom roms, flash magisk, kernel and other stuff. The memory is only encrypted, the rest works perfectly fine. Have you checked on the latest recovery?
A new kernel was flashed an hour ago. I have made a backup of the boot and dtbo images. It really works
Not checked to backup complete rom, but suppose it's possible with otg
Cisuwek said:
You can install cutom roms, flash magisk, kernel and other stuff. The memory is only encrypted, the rest works perfectly fine. Have you checked on the latest recovery?
A new kernel was flashed an hour ago. I have made a backup of the boot and dtbo images. It really works
Not checked to backup complete rom, but suppose it's possible with otg
Click to expand...
Click to collapse
.....Not checked to backup complete rom, but suppose it's possible with otg....?
But this is what he wants to do, or not?
Cisuwek said:
You can install cutom roms, flash magisk, kernel and other stuff.
Click to expand...
Click to collapse
I guess (I was in fact asking about exactly this in another thread recently), but then if the install script tries to modify the data partition in any way (which remains encrypted with current recoveries under Android 12), you're almost certainly screwed and at best the installation will fail, at worst you'll have to reinstall everything.
Thanks for the reply guys..this already solved..with the help of @Laptapper in other thread. Using orangefox, dfe,
How to flash a Android 12 ROM without decryption problem?
I've been struggling to flash Android 12 without my internal storage to be unaccessible by TWRP... I simply can't decrypt my data and the only way to fix it is to format data and revert back to a Android 11 ROM. Did anyone manage to flash Android...
forum.xda-developers.com
here's the thread.
Case_ said:
I guess (I was in fact asking about exactly this in another thread recently), but then if the install script tries to modify the data partition in any way (which remains encrypted with current recoveries under Android 12), you're almost certainly screwed and at best the installation will fail, at worst you'll have to reinstall everything.
Click to expand...
Click to collapse
Previously I had a Redmi note 7. On the encrypted partition, I could also install everything in the same way. I am not a specialist, my knowledge has ended here.

Categories

Resources