ROG 2 phone soft bricked - ASUS ROG Phone II Questions & Answers

Hello,
today I did have a strange experience with my ROG 2 and my best guess is that there is some UFS problem, but a second opinion or ideas are welcome.
During a bike ride when I was wifi scanning (apps: "Tower collector", "Radio Beacon"), navigating and listening to an audio book, the phone just went dark. I thought from previous experience on a Note 3 that it might have overheated. Pretty much stress proofed from the previous phone.
Yes - it was warm in its bike pocket but really not overly hot.
The phone is an ebay buy 2 months old and has been ever since with omnirom, stable so far. I only noticed that the RGB LED here has no blue light, but I plainly did not care.
I tried to boot it after some 10 minutes again and the phone would not go past its omnirom boot screen until it reboots after some time, boot loops.
30 Minutes later at home I wondered then what is going on, and I copied off the TWRP backup from the phone I took two days ago, just in case.
I then tried to restore the same backup, but the phone switched off during restore after ~30%. This was reproducible, so I thought this may be something with the backup, maybe I cannot restore a partition. When I restore I had all partitions marked and I tested them one by one. The restore of single partitions worked, one by one, except vendor as it was marked read only and data as it failed unpacking (my recent backup then is dead?).
I then tried formatting the partitions, so "data", originally f2fs. I lack experience with journal recovery on f2fs so went to ext4. System was ext4 and was just wiped. I lost of course other data on the internal storage so tried to restore again with my copied backup. It restores, but it cannot boot and just bootloops. I now formatted all partitions, including vendor.
Finally, I tried downloading omnirom again and installed it. It won't boot, it doesn't even get to the boot animation, but just boot loops.
I reformatted data back to f2fs. But no change here.
Trying more: lineageos won't flash for unknown reasons, it immediately dies as "Error installing zip file". Checksum of the downloaded zip is correct.
I downloaded a stock rom and installed it. This is now the best result so far - It does want to boot.
Here I get a boot animation and this incredibly lame "tching" sound (it is a phone, not a sword...). But it also stops there and never continues. Yes, first boot takes longer, but not 10 minutes.
Any ideas what else to try with this phone?
So far, I can boot twrp via sideload and interact with it fine. But that will be it; ran out of ideas.
Happy for suggestions.
Gaya

Use raw firmware to restore everything.
Install latest firmware zip on both slots.
After installing custom roms go to wipe -> format data by typing yes. Otherwise rom wont boot

thanks for getting back, If by raw firmware you meant the ASUS stock, I did. Not sure why data wipe after installation or double install to a/b partition would make a difference, but in the end I am new to this a/b concept, looks though like standard dual boot to me. Tried it, but no difference.
- installed asus firmware to inactive B
- switched to B partition
- installed asus firmware to inactive A
- wiped data
- started, so far same behaviour after 15 minutes of waiting (boot animation with sound, then it repeats boot animation until ...).

There are Two kind of rom raw firmware (used to restore bricked device) and recovery rom (zip file we use for update)
Raw firmware will flash ROM to both the slots, while recovery rom only flash to one slot. So you need to Only select reboot to recovery after flashing ROM to switch to the updated slot.
No, stock rom is not exactly raw firmware. RAW firmware uses EDL mode (in bootloader) to flash the stock rom. Download A10 raw from here version .90.
when extracting it you will see some files.
Steps To flash Raw:
* enable usb debugging in phone.
*connect the phone via side port to pc
open command prompt and run this command
adb devices
adb reboot bootloader
Now go to the folder where you extracted the raw firmware & run "flashall_AFT.cmd" as admin
wait [there will be no output]. After 15 -20 mins your device should boot. If you have any old version stock rom data the phone will carry the data to new version. If you have any custom rom/ updated version of stock rom data, it will ask to factory reset, so do that.
wiping is not exactly formatting so do it the right way
Why format: the one where you format by typing "yes" .If you switch between Roms ( stock to custom or vice versa) and go back to older versions (v .100 to .60) the old/previous rom data cant be used with new one so you must format data.
when formatting is not necessary : If you want to upgrade both stock images (version .90 to .100) & custom rom (v 1 to 1.2) i.e., flashing stock rom and then custom rom over it, you dont need to format data because you can reuse the data from custom rom to updated custom rom.
A/B device use two partition instead of one. so the upgrade can happen in the background. On restart you will switched to updated slot. So room for error is less.

The wiping here should be the same as formatting, as it is running the mke2fs (as per TWRP settings). But raw rom I do not have (I believe).
The link you have there seems broken, could you repost it again?
I did download the stock ROM earlier from ASUS directly, to not violate policies, HTTP links etc, here is only the path on asus . com
pub/ASUS/ZenFone/ZS660KL/UL-ASUS_I001_1-ASUS-17.0240.2103.75-1.1.229-user.zip
That is the one I installed via recovery. Am not sure what is in your mentioned flashall_AFT.cmd though, but suspect some adb sideload at least.

I eventually succeeded, but of course would liek to know
1) why
2) what happened?
I did follow a video about flashing the stock rom, basically as you explained (factory reset and data wipe), twice to a and b partition. That made the device bootable. Why is this needed?
I tested wiping system again (I am used to doing clean flashes) and installed omnirom again, and it failed booting.
I installed again the a/b with stocks, factory reset and data wipe and installed omnirom as dirty flash. All is well.
Now I was able to restore my backup finally without the device switching off and it did not complain about the data backup. So finally I am with my phone again rom and copy data to my fresh partition.
as to 1) why?
I understand a/b partition as sort of windows/linux dual boot with a more separate bootloader maybe. So I do not see the point in flashing the stock rom twice or in rendering the device unbootable when wiping system.
and as 2) what happened.
I may only guess: I did an omnirom upgrade 2 days earlier that worked fine and was the reason for my nandroid.
During my ride, the phone had some whateverissue and rebooted. I am unsure whether i tested booting but assume that after the upgrade it flashed to the other partition and it was not bootable. It does not make sense as this would make a/B partitions rather hard for custom rom makers, e.g. people complaining all the time.
Other guess: there was a file system issue with f2fs. Problem with data partition seems to cause bigger issues.
When I flash to ext4 after testing the bootable rom with a wiped data, it would not boot anymore. After factory reset again, it mke2fs the data partition again, back to f2fs and the device booted again happily.
Thanks for the help. Happy to know/learn more about this issue, as I would love to prevent or handle them quicker with more of I know what I'm doing.

Android Dual Partition (A/B) is made for seamless updates i.e, Dual system/vendor partition but uses same data partition. Lets say you are currently in slot A when you apply system update the slot B gets updated. As always rebooting the device switches to the B partition after update. & further update flashes the system to the A partition.
Basically there is no need to flash stock rom twice, unless you are coming from stock [one partition might be in higher firmware version than other] or there is new stock version with some minor/major upgrades to firmware files.
Our custom ROMs are not stand alone, Mostly it only replaces the system files and keep the vendor same as stock. (also this keeps the ROM update file size to be minimum)
you might even have different version of Android in A/B partition.
Here is a scenario on How A/B works:
Say you are currently using your device in B-slot and A9 so partition on slot-A will be A9 partition slot-B be A9. After that you are doing system update to A10 from System update (not via TWRP)
now you will have A10 on slot-A and A9 on slot-B.
then you want to go to custom rom, so you flashed say omni on A-slot and rebooted & it will surely work.
After that you are using inbuild system update from custom rom any applied it. now the system update will overwrite the A9's system files but (the device specifically needs A10s vendor to work properly). Now comes the fun part i.e., soft brick, boot looping, and corrupt images
That's why you have to flash latest stock to both A and B slots, and overwrite them all with system files from custom rom (also should be flashed once in slots A and B) to get neat experience from custom ROMs.
If you understand what was written above, then you will know the reason behind soft brick.
stock rom flashed only once (firmware image variation may affect stability)
custom rom only flashed in one slot (switching slot will boot loop device)
Not using Reboot to recovery to flash (you will be flashing to the same slot over and over & thus rebooting will boot loop)
Not formatting data ( Just Maybe, your custom ROM and stock uses different file system for data partition)
For Raw files search "ASUS rog 2 RAW firmware images" those files will be around 3 GB in size.

Related

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

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.
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
Your device WON'T boot up until you do not flash a Rom in Recovery or via fastboot!
Click to expand...
Click to collapse
What in the world does that mean?
Sent from my iPad using Tapatalk HD
Bill Gamble said:
What in the world does that mean?
Click to expand...
Click to collapse
Im Guessing he means "Your Device will not boot until you flash a stock or custom ROM onto it" But i may be wrong lol.
TreatnHerRight said:
Im Guessing he means "Your Device will not boot until you flash a stock or custom ROM onto it" But i may be wrong lol.
Click to expand...
Click to collapse
Yes you are right. I should add that.
Wrote a short statement in the "Notes" section about that.
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"?
RGM79 said:
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"?
Click to expand...
Click to collapse
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!

[HELP] [URGENT] ONLY OxygenOS not Booting up !!!!

Hi guys
I am having a weird issue , I am able to flash ANY custom ROM ( mark my words "any") be it skydragon os, havoc os, lineage os but I am unable to flash OxygenOS (tried 5.0.7 and 5.0.8) . When I start the first boot after flashing the OOS zip file, it always get stuck on boot animation and the animation goes on forever. Please Help !!!!!
Note:
- Have tried with different versions of TWRP but no success
- Always Did a clean install
- When after being stuck at boot animation for 40 mins , i FORCE restarted my phone to recovery and found that all system files and folders have been made as normally so i think there was no error in flashing process but still ROM not booting up.
Also:
- If someone has successfully booted the latest OOS from scratch ( I mean clean install) so please can you provide your ( links !)
1. TWRP file
2. OOS zip file
PreciousPulkit said:
Hi guys
I am having a weird issue , I am able to flash ANY custom ROM ( mark my words "any") be it skydragon os, havoc os, lineage os but I am unable to flash OxygenOS (tried 5.0.7 and 5.0.8) . When I start the first boot after flashing the OOS zip file, it always get stuck on boot animation and the animation goes on forever. Please Help !!!!!
Note:
- Have tried with different versions of TWRP but no success
- Always Did a clean install
- When after being stuck at boot animation for 40 mins , i FORCE restarted my phone to recovery and found that all system files and folders have been made as normally so i think there was no error in flashing process but still ROM not booting up.
Also:
- If someone has successfully booted the latest OOS from scratch ( I mean clean install) so please can you provide your ( links !)
1. TWRP file
2. OOS zip file
Click to expand...
Click to collapse
If you're coming from a decrypted data partition and then flash stock OOS and nothing else, it will re-encrypt your data. This could take a long time.
I recently did some testing of TWRP for fixing formatting and decryption (see https://forum.xda-developers.com/on...al-twrp-touch-recovery-t3742894/post78339714) and I did a totally clean install of OOS including formatting the data partition.
I used a TWRP version from this post https://forum.xda-developers.com/on...al-twrp-touch-recovery-t3742894/post78332159. The one I used is the very last one which is described as:
-----update2
This one fixes ext4 encryption on Pie: https://androidfilehost.com/?fid=11410963190603866112
PS: you can get the OOS 5.0.8 zip from https://www.oneplus.com/au/support/softwareupgrade
Sent from my OnePlus3T using XDA Labs
BillGoss said:
If you're coming from a decrypted data partition and then flash stock OOS and nothing else, it will re-encrypt your data. This could take a long time.
I recently did some testing of TWRP for fixing formatting and decryption (see https://forum.xda-developers.com/on...al-twrp-touch-recovery-t3742894/post78339714) and I did a totally clean install of OOS including formatting the data partition.
I used a TWRP version from this post https://forum.xda-developers.com/on...al-twrp-touch-recovery-t3742894/post78332159. The one I used is the very last one which is described as:
-----update2
This one fixes ext4 encryption on Pie: https://androidfilehost.com/?fid=11410963190603866112
PS: you can get the OOS 5.0.8 zip from https://www.oneplus.com/au/support/softwareupgrade
Sent from my OnePlus3T using XDA Labs
Click to expand...
Click to collapse
Exactly How Much Time can the re-encryption process could take?? Cause I gave it good 1 hour
Also to make sure i am getting it right , you mean to say that i should use the TWRP file you mentioned below your statement
"-------update 2" or is it some (img file) that i need to flash through TWRP
BillGoss said:
If you're coming from a decrypted data partition and then flash stock OOS and nothing else, it will re-encrypt your data. This could take a long time.
I recently did some testing of TWRP for fixing formatting and decryption (see https://forum.xda-developers.com/on...al-twrp-touch-recovery-t3742894/post78339714) and I did a totally clean install of OOS including formatting the data partition.
I used a TWRP version from this post https://forum.xda-developers.com/on...al-twrp-touch-recovery-t3742894/post78332159. The one I used is the very last one which is described as:
-----update2
This one fixes ext4 encryption on Pie: https://androidfilehost.com/?fid=11410963190603866112
PS: you can get the OOS 5.0.8 zip from https://www.oneplus.com/au/support/softwareupgrade
Sent from my OnePlus3T using XDA Labs
Click to expand...
Click to collapse
To Avoid Any Further Confusion , Could You Give me step by step instructions for what to do , please?
Please also give me details to which TWRP to use and all the configurations ( like ext4 or f2fs on system or data , whether to use format button, or advanced wipe) all that! Thanks in advance
Issue solved !!
How I solved ?
1. Using TWRP 3.2.2-0 I first Formatted data.
2.Then used advanced wipe to clean everything.
3.Then using change file system option in WIPE category changed my "data" partition from whatever to f2fs.
4.Then changed back to ext4.
5.Then changed back to f2fs.
6.Using PC transferred OOS zip file (5.0.8) to internal storage.
7.Flashed The file
8.Bingo !!! Phone booted up without a problem
Thanks @BillGoss , your provided links helped alot, though i used nothing from it but they helped me to recognize what the problem was, it was i think an encyption as well as changed file system format issue due to my previous flashing of pie roms.:good:
PreciousPulkit said:
How I solved ?
1. Using TWRP 3.2.2-0 I first Formatted data.
2.Then used advanced wipe to clean everything.
3.Then using change file system option in WIPE category changed my "data" partition from whatever to f2fs.
4.Then changed back to ext4.
5.Then changed back to f2fs.
6.Using PC transferred OOS zip file (5.0.8) to internal storage.
7.Flashed The file
8.Bingo !!! Phone booted up without a problem
Thanks @BillGoss , your provided links helped alot, though i used nothing from it but they helped me to recognize what the problem was, it was i think an encyption as well as changed file system format issue due to my previous flashing of pie roms.:good:
Click to expand...
Click to collapse
Well done. And because you worked this out yourself, you've learnt a lot.
Sent from my OnePlus3T using XDA Labs

[CLOSED]TWRP 3.3.1-1 for Pixel 3A XL [OFFICIAL]

Team Win Recovery Project 3.x, or TWRP3 for short, is a custom recovery built with ease of use and customization in mind. Its a fully touch driven user interface no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Code:
[I]#include <std_disclaimer.h>
/*
* Your warranty is not void.
*
* We are not responsible for bricked devices, dead SD cards,
* thermonuclear war, or you getting fired because the alarm app failed. Please
* do some research if you have any concerns about features included in this recovery
* before flashing it! YOU are choosing to make these modifications, and if
* you point the finger at us for messing up your device, we will laugh at you.
*
*/[/I]
Note: Please be aware that you cannot install this without a kernel with LZMA compression support, I believe most ROMs have included my commit for this so you should be good for all custom ROMs and kernels. If not please file a request to the maintainer.
In addition, please be aware that TWRP is currently not compatible with Android 10. If you would like to use TWRP you will need to go back to Android 9. If you would like more information you can read at the link here.
Not a huge problem, stock users can just temporarily boot TWRP if you have access to a PC.
Not compatible with Android Q.
Pixel devices have 2 "slots" for ROMs / firmware. TWRP will detect whichever slot is currently active and use that slot for backup AND restore. There are buttons on the reboot page and under backup -> options to change slots. Changing the active slot will cause TWRP to switch which slot that TWRP is backing up or restoring. You can make a backup of slot A, switch to B, then restore the backup which will restore the backup of A to slot B. Changing the slot in TWRP also tells the bootloader to boot that slot.
Installation:
If you already have TWRP installed: Download the latest zip and install the zip using TWRP.
If you do not already have TWRP installed: Download both the img and the zip. You will need to have fastboot binaries and the correct drivers installed. Power off your device completely. Hold volume down and turn on the device. Your device should now be in the bootloader. Connect the device to your PC. Open a command window and run the following command from the proper location:
fastboot boot path/to/twrp.img
This will temporarily boot TWRP on your device. Use ADB or MTP to transfer the zip onto your device.
Go to install and browse to the zip and install the zip. The zip will install TWRP to both boot slots. Installing TWRP at this time will remove root if you are currently rooted.
If you accidently flash TWRP to your device using fastboot instead of temporarily booting the image, you will need to download the latest factory image for your device and reflash the boot image.
Changelog:
[BETA]
3.3.1-0: Initial release for Pixel 3A XL devices
3.3.1-1: Fixed having to manually change slots before rebooting.
3.3.1-2: Updated to July blobs!
3.3.1-3: Can now install TWRP to boot image. ADB, MTP, LOGD, Repack Tools and Logcat have all been removed to save the necessary space for this to work. You can grab stuff while in the OS, then flash it in TWRP (Keep in mind I have only tested this on stock as of now, feel free to test it on whatever ROM you use. It should work, but let me know if it doesn't).
3.3.1-4: Changed back to LZMA compression, also added back all the features besides ADB/Logcat. As long as your kernel supports LZMA you will be able to take advantage of installing it permanently without having to worry about space restrictions.
3.3.1-5:
Add persist entry to fstab
* To allow TWRP to store a backup settings file on /persist
and also to be used as QCOM time fix source during early boot.
Revert "Don't include logcat."
Revert "Don't include repack tools."
3.3.1-6:
Revert "Revert "Don't include repack tools.""
Add haptics firmware.
* This obviously on it's own isn't enough to get haptics working for the 3A in TWRP, but its a start.
Don't include a precompiled update_engine_sideload
* This should fix the issue of flashing officials for StatiXOS
[STABLE]
3.3.1-0: Initial official release!
Download:
https://twrp.me/google/googlepixel3axl.html
XDA:DevDB Information
TWRP, Tool/Utility for the Google Pixel 3a XL
Contributors
ZVNexus, janjan
Source Code: https://github.com/TeamWin/android_device_google_bonito
Version Information
Status: Stable
Current Stable Version: 3.3.1-0
Stable Release Date: 2019-07-17
Current Beta Version: 3.3.1-6
Beta Release Date: 2019-06-27
Created 2019-06-27
Last Updated 2019-11-15
Reserved
Awesome! Thank you so much!
So as of this moment, there is only the ability to boot to twrp via fastboot?
DriveEuro said:
Awesome! Thank you so much!
So as of this moment, there is only the ability to boot to twrp via fastboot?
Click to expand...
Click to collapse
Yeah, having some issues actually installing it to the boot image. Should be fixed rather soon, just decided to post. Maybe I shoulda waited a bit longer, idk.
So does anyone know if TWRP + Magisk work on Android Q for root?
ZVNexus said:
Yeah, having some issues actually installing it to the boot image. Should be fixed rather soon, just decided to post. Maybe I shoulda waited a bit longer, idk.
Click to expand...
Click to collapse
I don't mind, I haven't flashed TWRP to a device since Treble came out, but it's easy enough to boot an image, so at least for my usage case, this is all I need
otg mounting problem
ZVNexus said:
Yeah, having some issues actually installing it to the boot image. Should be fixed rather soon, just decided to post. Maybe I shoulda waited a bit longer, idk.
Click to expand...
Click to collapse
no you shouldn't have waited!! thanks a lot specially from all of us checking if twrp came out every day!
hey maybe you can give me a tip since i have a problem mounting otg:
when i boot twrp image if i go to backup/select storage i find a storage/usb partition (0MB)
when i connect otg (and go to mount) it becomes storage/usbotg 1 (12000MB)
but the problem is that if i click it doesn’t remain selected, and the log reports “Unable to find partition for the path ‘/storage’ ”
if i go to mount or backup/select storage and click usbotg 1 storage it doesn’t remain selected and the log reports “E: unable to locate partition for ‘/storage/usbotg-1’ ”
(i’ve tried also with different keys but i don't think it's the point anyway the 1st was an 256GB usb/SD and the 2nd a 16GB usbkey but logs reports same error)
any tip?
I'm on Q DP4. Anyone having luck flashing Magisk (canary)? In B slot it fails to mount system and vendor. I change to A slot. It completes. I reboot on A slot, I get stuck at Google starting logo and the phone never boots. If I attempt to boot B slot afterwards, it boots up fine, but I obviously don't have Magisk installed, verified with the Magisk APP.
Anyone have a clue?
Just to provide feedback.
Fastboot booted the image, it prompted for my pin, mounted system, and was able to backup properly, moved backup to computer.
Wiped the phone, reboot and went through setup, everything was working.
Back to twrp, adb pushed the backup to the phone, restored the backup and everything was functioning.
Also tested and was able to sideload flash Magisk.
So everything seems to be working as intended.
Thank you so much for your hard work!
My TWRP is NOT prompting for pin/pattern. That has to be part of this...
Wiped data via google recovery. The phone booted to Pie (i had previously did the OTA from Pie to Q beta 4). So now I'm back on Pie somehow (without reflashing). I booted to TWRP, installed Magisk successfully.
So overall, I'm not sure if this was related to Q beta 4 OTA occupying B slot while Pie still was on A slot.
Thanks to all for their work with TWRP!
Antonyo13 said:
Just to provide feedback.
Fastboot booted the image, it prompted for my pin, mounted system, and was able to backup properly, moved backup to computer.
Wiped the phone, reboot and went through setup, everything was working.
Back to twrp, adb pushed the backup to the phone, restored the backup and everything was functioning.
Also tested and was able to sideload flash Magisk.
So everything seems to be working as intended.
Thank you so much for your hard work!
Click to expand...
Click to collapse
On previous devices I have run into TWRP restore issues if I had a security PIN set on the device when I backed up. During your test did you have a PIN setup on the phone?
artiemon said:
On previous devices I have run into TWRP restore issues if I had a security PIN set on the device when I backed up. During your test did you have a PIN setup on the phone?
Click to expand...
Click to collapse
I had a pattern, not sure if it makes a difference between pattern and pin.
I will say the only thing weird i noticed was when i wiped the phone (the default wipe from twrp, not a full format of data from twrp), when i booted I was prompted for my pattern on first unlock before the device setup. Even though it was wiped.
But restoring was perfectly fine.
Antonyo13 said:
I will say the only thing weird i noticed was when i wiped the phone (the default wipe from twrp, not a full format of data from twrp), when i booted I was prompted for my pattern on first unlock before the device setup. Even though it was wiped.
But restoring was perfectly fine.
Click to expand...
Click to collapse
That is normal on pixels. If you factory reset in TWRP your password still stays
spaceman860 said:
That is normal on pixels. If you factory reset in TWRP your password still stays
Click to expand...
Click to collapse
Thank then everything is working great. No issues at all with TWRP
So just confirming - I am , I assume encrypted , as I have a PIN and a pattern with DU ROM. Can i safely backup the existing ROM and flash another and then be able to restore if need be using this version of TWRP?
jcrompton said:
So just confirming - I am , I assume encrypted , as I have a PIN and a pattern with DU ROM. Can i safely backup the existing ROM and flash another and then be able to restore if need be using this version of TWRP?
Click to expand...
Click to collapse
Yes. This is how it has worked in the past. Don't see why it wouldn't work like this currently. If you flash a different vendor image or system image, you'll want to revert back before you restore your old ROM backup.
DriveEuro said:
Yes. This is how it has worked in the past. Don't see why it wouldn't work like this currently. If you flash a different vendor image or system image, you'll want to revert back before you restore your old ROM backup.
Click to expand...
Click to collapse
Revert back to what? Sorry I don't understand?
Flash back the original vendor and system images.
GQJ said:
Revert back to what? Sorry I don't understand?
Click to expand...
Click to collapse
He was answering my question about hypothetical referring back to a prior rom from a backup
neshipda said:
no you shouldn't have waited!! thanks a lot specially from all of us checking if twrp came out every day!
hey maybe you can give me a tip since i have a problem mounting otg:
when i boot twrp image if i go to backup/select storage i find a storage/usb partition (0MB)
when i connect otg (and go to mount) it becomes storage/usbotg 1 (12000MB)
but the problem is that if i click it doesn’t remain selected, and the log reports “Unable to find partition for the path ‘/storage’ ”
if i go to mount or backup/select storage and click usbotg 1 storage it doesn’t remain selected and the log reports “E: unable to locate partition for ‘/storage/usbotg-1’ ”
(i’ve tried also with different keys but i don't think it's the point anyway the 1st was an 256GB usb/SD and the 2nd a 16GB usbkey but logs reports same error)
any tip?
Click to expand...
Click to collapse
I didn't test OTG before I uploaded, didn't have an OTG cable, but now that I know its a problem I'll look into it.

[HELP] user data on internal storage lost

I violated the first rule of updating. I did not make a proper backup.
Before the loss phone was unlocked, rooted and on Android 9 stock rom.
I thought I could flash a TWRP recovery on my phone to make an entire backup of everything.
Code:
C:\Users\deinemutter\Downloads\xiaomi mi a2\platform-tools_r31.0.2-windows\platform-tools>fastboot flash boot "C:\Users\deinemutter\Downloads\xiaomi mi a2\lineage-17.1-20210410-recovery-jasmine_sprout.img"
Sending 'boot_b' (24509 KB) OKAY [ 0.550s]
Writing 'boot_b' OKAY [ 0.234s]
Finished. Total time: 0.950s
and from here it went downhill. The reboot got me a bootloop.
In fastboot I flashed patched_boot_10.0.9.0_mi_a2.img and stock_boot_10.0.9.0_mi_a2.img on both boot slots hoping that it would get me out of the bootloop. Well, it didn't. It was probably the wrong boot image.
Downloaded Xiaomis official Flash Software MiFlash2018.5.28.0 and an official stock rom jasmine_global_images_V11.0.22.0.QDIMIXM_20210309.0000.00_10.0 and was very relieved to find the option "save user data" when flashing.
I did chose this option to find out later that this wasn't the case. My data on the internal storage was gone and my phone wasn't rooted anymore.
I downloaded all kinds of restore software on my laptop for my android device. Only to find out that the only data they software could find was the newly copied data on the new rom. Rooting my phone in the process to allow deep scans just came out empty.
Now I am thinking of copying the entire image of my phone to my laptop hoping that the data will somewhere in the image. Is this even worth it?
I am at the end of my knowledge and hope that you can help me a little.
1. If You have read more guides before flashing anything, You'd learn that this phone has A/B slots ROM structure and thus does not have dedicated partition for recovery, and thus TWRP cannot be flashed directly into boot partition without erasing boot image and spoiling OS. Any recovery must be embedded into boot image, as stock recovery is embedded into stock boot image. And thus, after recovering working OS, if You still insist in having TWRP instead of stock recovery, You'll need to boot into TWRP from PC and then install appropriate TWRP.zip thus patching currently used boot image, and this procedure will be needed after each OTA.
2. To have working OS, as You are sure that phone is unlocked, just flash one of available fastboot ROM images (search in Guides forum https://forum.xda-developers.com/t/fastboot-jasmine-xiaomi-mi-a2-fastboot-images.3824849/) via fastboot. Note that:
2.1. forget about MiFlash, use fastboot.exe from Android platform-tools (ADB/fastboot);
2.2. MiFlash in special patched version is only needed for TestPoint/Edl unbricking of locked phones;
2.3. best Android 9 version is 10.0.17.0;
2.4. when flashing 10.0.17.0 use "flash_all_except_data.bat" to keep user data;
2.4. updating to Android 10 (any version) will need factory reset, thus user data will be lost;
2.5. user data most probably still can be saved in TWRP backup for future restore, or you can 1st recover Android 9 and save your data;
2.6. do not use so called "official TWRP", I regard working https://forum.xda-developers.com/t/...mi-a2-jasmine_sprout-by-d4e8ede8f1f2.3941096/ and https://forum.xda-developers.com/t/recovery-unofficial-teamwin-recovery-project.4209151/ ; do not forget to enter proper code when TWRP starts to decrypt /data partition.
Aerobatic said:
1. If You have read more guides before flashing anything, You'd learn that this phone has A/B slots ROM structure and thus does not have dedicated partition for recovery, and thus TWRP cannot be flashed directly into boot partition without erasing boot image and spoiling OS. Any recovery must be embedded into boot image, as stock recovery is embedded into stock boot image. And thus, after recovering working OS, if You still insist in having TWRP instead of stock recovery, You'll need to boot into TWRP from PC and then install appropriate TWRP.zip thus patching currently used boot image, and this procedure will be needed after each OTA.
2. To have working OS, as You are sure that phone is unlocked, just flash one of available fastboot ROM images (search in Guides forum https://forum.xda-developers.com/t/fastboot-jasmine-xiaomi-mi-a2-fastboot-images.3824849/) via fastboot. Note that:
2.1. forget about MiFlash, use fastboot.exe from Android platform-tools (ADB/fastboot);
2.2. MiFlash in special patched version is only needed for TestPoint/Edl unbricking of locked phones;
2.3. best Android 9 version is 10.0.17.0;
2.4. when flashing 10.0.17.0 use "flash_all_except_data.bat" to keep user data;
2.4. updating to Android 10 (any version) will need factory reset, thus user data will be lost;
2.5. user data most probably still can be saved in TWRP backup for future restore, or you can 1st recover Android 9 and save your data;
2.6. do not use so called "official TWRP", I regard working https://forum.xda-developers.com/t/...mi-a2-jasmine_sprout-by-d4e8ede8f1f2.3941096/ and https://forum.xda-developers.com/t/recovery-unofficial-teamwin-recovery-project.4209151/ ; do not forget to enter proper code when TWRP starts to decrypt /data partition.
Click to expand...
Click to collapse
I read through some guides here but it wasn't all that clear to me as you put it here.
Regarding your points:
2. My phone was unlocked
2.1 I used both MiFlash and fastboot
2.4 it is exactly what I did with MiFlash to keep user data but that didn't happen
2.5 is the real question. How can I save my user data after I flashed a new OS it with MiFlash that did'nt save userdata how can I recover if not all but at least a portion of it. Would a copy of the entire image help? or what other options do I have?
OK, again ....
If you have already erased /data partition with MiFlash, user data is lost, no chances.
If you have already made factory reset (erased /data partition) trying to upgrade to Android 10, user data is lost, no chances.
If you have not erased /data partition, and you are sure that you had Android 9, just flash 10.0.17.0 (latest working Android 9) fastboot ROM image using fastboot .exe and "flash_all_except_data.bat", you should be able to boot into OS.
As for backup and restoring /data partition - it is a trivial operation in TWRP, noting that:
- working TWRP is used (see above);
- TWRP is booted into via fastboot (not flashed! - for Nth time!);
- you do not skip the step of entering code when TWRP is booted into (otherwise TWRP won't decrypt /data);
- phone has enough free space in /data to backup /data (and then without working OS you'll need to pull sdcard/TWRP/backups/ via ADB) or (simpler) external SD/SDD/HDD is attached via OTG.
Apart from the condescending tone and the partial useless repetition of information I did not ask for or need, thanks, I guess

Question Backup partitions from different GSI ROMs

Would it be possible to backup different images from different GSI ROMs to be able to test and restore each one without losing all the apps, configuration, etc. in the process.
For example:
1. Install "GSI name1" configure it, install apps, my Google account, etc.
2. Somehow, make a backup of the required partitions "backup name1" (At the computer?)
3. Install "GSI name2" configure it, install apps, my Google account, etc. (Not necessarily the same apps than before).
4. Somehow make a backup of the required partitions "backup name2".
5. Continue testing other GSI or restoring one of the previous ones from the backups and be able to use the phone as it was before, including apps, configuration, etc.
I can imagine two ways to face this task:
A. Using a custom recovery to backup partitions to SD card.
B. Using fastboot or mtk_client to backup partitions to the PC.
Would be easy? Possible? Not recommendable for some reason?
I am new on this flashing-bricking-sweating-unbricking thing, so I would appreciate feedback.
Thank you!
Hi
If your goal is to test the GSIs, it's easier to use the DSU-sideloader instead of the backup.
This app enables you to dual boot.
You will be able to move back and forth between images. Even if you get into a boot loop, you can return to the original image just by rebooting. 
If you have root, this app will be easier because there will be less operations.
https://github.com/VegaBobo/DSU-Sideloader
I have been taking a look to the DSU concept. It is interesting, but not what I want. Also, it requires the main ROM to be stock ROM (maybe in future is fine to use with custom ROMs).
DSU would be perfect if you want to keep romA and romB working in parallel in your daily life (for example, one for work and business and the other one for gaming and social apps).
What I want to do is to test romA for a while, move to romB for a while, if I prefer romA, reinstall it and forget about romB (literally, delete it). Maybe in few months, backup romA again and check romC for a while...
As I do not want to be swapping from one to another in daily life, it does not make sense to reserve space for having both simultaneously ready to work on the phone.
By now I have been learning about adb and recovery backup options. I need to check more during the next days, but I noticed that from Recovery, I can also use adb (it says not authorized device, but that is for not being rooted yet, I suppose). If it is possible to use adb from recovery after rooting, it would be easy to have a PC software for backing up ROMs easily (system, data and userdata partitions?).
I will keep researching about it...
The DSU does not have to be a stock rom.
It's just desirable.
Currently I have crdroid GSI as the first OS and the second OS is trying several OSs.
If you try it, you'll notice how easy it is.
Currently, TWRP does not support backup or encryption on Android 12. It is the same even if it is the official latest of other models.
I have a 128GB model, so it took too long to back up using mtkclient and I quit halfway through.
The problem is time and encryption, keep them in mind.
Currently, TWRP does not support backup or encryption on Android 12. It is the same even if it is the official latest of other models
Click to expand...
Click to collapse
Well, definitely untrue now as most devices have got it sorted out with decryption, Android 12 being a pain some devices got 13 done before 12, but as of the time you wrote this post my device Motorola stylus 22 5g Qualcomm, we hadn't figured out the decryption yet but you could definitely just patch your fstab in vendor either by hand or with DFE neo, to disable the encryption and TWRP would run fine. You would just have to make that first format reboot back to recovery immediately and while it still stays the data from a fresh format flash the other handy RO2RW re zip and DFE neo. Honestly the boot times are so much better without decryption I don't think I would go back as long as I've got a password on orange fox or whatever.

Categories

Resources