yashsingh1/xdaforums huggingface dataset:
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Pogo:
So, my backup is also stock ROM,rooted minus some GoogleApps stuff plus my apps. What will happen with root after restore?

I can see 3 possibilities:

1. stuck in boot look

2. boot but without root

3. boot normally

If nobody know the answer or didn't try this I will be guinea pig but I don't want to loose 2 days of installing and tweaking because of one missing step.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
If your backup included boot, system, and data, and you successfully restore those, your device should generally be back to the state as existed at the time of the backup. But things go wrong all the time, your backup may be corrupted, and your restore may not be successful. There is no magic wand that will restore your device to the moment you want, unless you took a backup immediately before.

In the history of computing, thousands of hours of work has been lost due to not having the proper backup in place, and I can't count the number of times I've had to revert to stock when things have gone wrong...
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Pogo:
Thanks. Been there, done that, unfortunately. I want to know the procedure, I'm very well aware of risks caused by corrupted backup or no backup at all.

Checking my backup, it has system, data and boot parts, let's do it...
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
Whenever I do system optimization, I take an initial nandroid backup, then use a tool like Root Essentials or many others, to extract and backup the system APKs as they are removed. If any of them are further needed, I can simply reinstall them...
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Pogo:
I did it and I cannot boot :(

Did this:

1. disabled fingerprint

2. boot to TWRP

3. restore backup

4. wipe cache/ART cache

5. reboot

It says on the screen: failed to load/verify boot images"

Can restart to bootloader, but no can no longer fastboot to TWRP:

"FAILED (remote: 'Error calling AvbLoadAndVerifyBootImages Load Error')

"fastboot devices" command return device name.

Tried to flash patched image (success) but still won't boot. The same with original boot image.

Gave up and flash stock image, will root and try restoring backup again. What should I try differently next time? Unroot?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
You don't have to root to try restoring the backup, just boot TWRP from the bootloader on your stock setup, and try the restore again. In the XL thread for TWRP, there was someone who tested the backup and restore, and it looks like he got it to go from a stock setup, follow what he did.

Another option would be to extract the boot, system, and data images from the backup, and flash them individually. TWRP is really no more than a set of scripts that do the same. At least by flashing them individually, you could see what error messages come up. If the error is with the boot image, flash stock boot and the extracted system and data images, and then root afterwards.

The previous versions of Magisk, were not set up to handle the logical partitions we have on the 3a. Perhaps that is why the restore routine is not working properly. That has been fixed in the canary build, so hopefully in the future we will be able to restore a rooted backup from a rooted device...
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] mariojohn:
When I fastboot boot twrp.img (I'm using the latest 3.3.1-2), the data partition won't mount. The log message says, "failed to mount \data (invalid argument)"

Could this be because I'm on Android Q beta?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
Yes, not compatible with Q...
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Archangel:
So I take it we cant sideload the latest July OTA through TWRP?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
I don't see why you couldn't.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] gee one:
My guess is that the issue is with vbmeta. This partition is used for verified boot. It includes hashes and/or hash descriptors of the other partitions.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
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).

Slight word of warning, it can't install Magisk either as that slight change in size is just enough to go over the edge. I'll continue trimming TWRP down as much as I can, but at a certain point there's not much more I can do.

Basically, what you should take from this is if you so much as even touch the boot image spare from installing TWRP it'll just refuse to boot. Not a release you probably want to flash unless this interests you.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Tiebe:
Alright, so no root for this version? And how do I install it?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
Boot off the last version temporarily and flash it. I wouldn't recommend flashing this on custom rn as I am currently working on the next version which shouldn't have to remove everything but it will only work on custom as it enables LZMA support in the kernel. Stock doesn't have this support, so to boot off it on stock you would have to have a custom kernel with LZMA support (which is feasible). If all works out, my goal then is to try to get LZMA support into all sargo/bonito kernels that exist rn. Will probably be put into StatiXOS, and DU which I both maintain for the 3A.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Tiebe:
not related to TWRP, but on your latest StatixOS build, the icons on the homescreen are big and unclear? Oh wait I'm on the nuclear build [emoji854] Just saying
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] crian:
Post this in the related thread.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Pogo:
If anyone has successfully restored backup of non-stock, rooted ROM, I'd like to know exact steps.

I have tried probably 10 different ways and still can't get it right.

My info:

StatiXOSm (latest)

TWRP 3.3.1-2

Magisk v19.3(19300)

Magisk Manager 7.3.2
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
3.3.1-4: Changed back to LZMA compression, also added back all the features besides ADB/Logcat. Any ROMs that support LZMA will be able to install this version of TWRP permanently. I have a unofficial DU build with LZMA support, so it works on that. StatiXOS should have it soon as well. From this point onward any ROM wanting to support TWRP should support LZMA. This means stock will never be supported, unless you are running a custom kernel on stock that supports LZMA.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] lattosimbaste:
I had a similar issue last night and failed miserably to restore a nandroid, had to flash the factory image. Would love to be able to backup and restore via TWRP even if only with temporary boot...
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Pogo:
Tell me about this. I think I had to flash factory image 10 times so far.

I don't know if it's problem is wrong steps performed, TWRP, Pixel or something else.

One thing I didn't try yet is to backup root, system, data and vendor image and try restore. Vendor image is not checked by default.

If anyone is about to flash new ROM soon or do something 'destructive' like that and still can boot to TWRP, please try backup/restore and post findings.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
Make sure to wipe data/system/cache before restoring. Then I restored Boot, System Image and Data. Backup/Restore works flawlessly for me.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Pogo:
I'm sure I have tried this at least once and got same "failed to load/verify boot images" message after restart. However, there is still chance that I made mistake even I've been doing TWRP restores for years and on different phones.

Will try again in few days, I have no time to setup the phone every time from scratch.

Do I need to switch slots after restoring?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
This is a video of me backing up my ROM, and restoring it.

https://www.youtube.com/watch?v=yyNBgbi1-a8

And no, you do not need to switch slots.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Pogo:
There are a two difference:

1. in your video default selected options partitions in Backup are 'Boot', 'System Image' and 'Data'. On my phone default selected partitions are 'Boot', 'System' and 'Data'

2. I'm running twrp-3.3.1-2, you're running twrp-3.3.1-4

The only change in TWRP I could remember was to include vendor partition while make backup yesterday. I have checked my yesterday's backup file and it has boot, data, system and vendor partitions inside but no 'System Image', so I must swapped 'System' and 'System Image' checkboxes.

However, since TWRP is not permanently installed on my phone and it newer was, I have no explanation how TWRP has remembered the change. My wild guess is that TWRP is keeping setup in permanent storage which can survive flashing multiple stock images as well as StatiXOS.

I did some tests and selected 'System Image' instead of 'System' and then created backup. After that, booted back to Android, rebooted to bootloader, fastboot TWRP. The previously selected partitions ('System Image') are showing up in Backup.

Then I selected all partitions (didn't do backup), fastboot TWRP and all partitions are still selected.

Then reboot to system, wait until everything was loaded, boot TWRP. Only 'Boot', 'System Image' and 'Data' partitions are selected.

To recap, the only partitions you have to include in backup for successful restore are:

'Boot'

'System Image'

'Data'

The moral of the story is to not just blindly swipe the slider while creating backup. Check what partitions are included. You can backup all partitions if you like, but restore only these three, nothing else.

UPDATE: followed the above and successfully restored my backup! Thanks ZVNexus!
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] gargleblarg:
Thanks for the testing, I'll try ticking the right boxes next time. :svetius:
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
Ok so I'll ask, what is the difference bwt 'system' and 'system image' for backup and why won't 'system' work for restore? Given that this device uses system as root, seems like they should be the same, and why would 'system' restore give that 'AvbLoadAndVerifyBootImages Load Error'. Will 'vendor' backup and restore without error as well?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Archangel:
Finally a dev that actually shows you how to do a proper back up with their TWRP. Most just tell you what to do and its totally wrong then you do it and have to reset up your phone. I for one am thankful for this!
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] spaceman860:
https://twrp.me/faq/whattobackup.html
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Pogo:
Related to the above Vendor partition question. I just restored my rooted StatiXOS backup on different 3a phone with non-rooted stock ROM. The catch: both phones are from the same provider. Does anyone has access to two phones from two providers to check if Vendor partition need to be included in backup?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Pogo:
After restoring backup on new phone I got new problem: the fingerprint doesn't work.:(

I will open new thread for this.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
Also include vendor image in the backup if you feel so inclined.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
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."
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] crian:
Dude you're on fire! Nice work. Thanks!
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] sic0048:
OK - here is a stupid question, but I've always owned phones that had a physical SD card.......

TWRP saves backups on the "SD Card" which is really part of the internal storage of the phone. Is it best to move those backups to an off phone storage location? For instance, if I flash a complete factory image to the phone, will it overwrite the SD Card storage on the phone thereby erasing any backups saved on the "SD Card"? My gut feeling is yes it will, but I want to ask the experts.

Thanks!
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
Yes, if you flash a factory image it will "fastboot -w" so it will wipe any and all data on the device. If you want to keep your backups safe you best back it up to your PC or somewhere.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] PGHammer:
Yes (for preservation reasons)

Because of this, I'll be backing these up to a different cloud (specifically, to OneDrive) - like I do tax returns and other critical items. If I'm not mistaken, this area is also backed up to Google Drive (which is why users have technically unlimited storage for pictures) by default. While I knew I HAD a Google Drive, I normally don't use it other than by-default stuff for Google services - for cloud storage, OneDrive is my default. I'm going to actually have to go into my Google Drive and clean it of clutter.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] oscar1823:
Question! So can i just flash everything thru twrp now? Like ive been trying to update to July update from march but i dont knw where to get the july update to flash it on my phone. Also would it even matter if i have EX kernel installed? would the july update just flash?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
IDK. I don't flash stock through TWRP, always through AOSP recovery. Just to be safe, flash stock boot image from march, then enter recovery and flash through that.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] oscar1823:
They really need to update there guides for basically everything thing now since TWRP is out.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] catharsis724:
I just wanted to confirm that even if you're able to retain TWRP in recovery and flash a custom ROM, this still cannot handle magisk right? Every time I've flashed a custom ROM (BL ROM in this case) along with TWRP zip (3.3.1-5), and then magisk/kernel, it wouldn't boot properly.

But I can flash everything I need to just fine (and boot successfully) from just booting into TWRP, not flashing the TWRP zip at all.

Is this correct?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] creeve4:
Yes. You do not need to flash TWRP. Flashing TWRP provides you with the recovery when you are not at a computer (to boot it).
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] dhoang:
Magisk is working fine on custom rom, at least for StatiXOS rom. I was able to get magisk to work by flashing the Rom then TWRP. Reboot into system. Once the Rom is fully booted, reboot back into twrp. TWRP should be retained if you flashed the latest 3.3.1-5. Then proceed to flash magisk and reboot. This process works for me. Hope it helps.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
You are flashing a separate kernel? That's why. It probably doesn't have LZMA support. Try flashing just Magisk.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] jayxiao171735:
please support for Q beta5~~~~
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] oscar1823:
I cant seem to find the magisk zip for rooting in any folder. i placed the Magisk.zip in Root .
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] sic0048:
You can't access the root location until you have root!

You need to place the magisk.zip somewhere on the "sd card" portion of the internal storage. sdcard/download is generally where the zip file will end up if you download it from the internet using your phone.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
No.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] lattosimbaste:
I'm preparing to have another go at creating and restoring a nandroid this weekend but I've run into an issue with mounting a flash drive via USB OTG (using the Google supplied adapter) and am left wondering if support for same has been pared. The flash drive is recognized by Android and can be read/written just fine. Any suggestions?

Thanks!
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Nesousx:
Hi,

Thanks for the guide. I tried to follow it, but it didn't work and there is something I can't figure out.

So, here is what I did: I downloaded lastest (3.3.1-5) image and zip file. Temporarily booted to TWRP (fastboot boot twrp.img) and flashed ZIP with no error shown on screen, reboot from TWRP menu.

Then when I try to access to recovery it doesn't load it., but reboots and go to normal (system) boot. It looks like recovery is not installed.

Now, I am using stock ROM (July update), and this is probably related, because it doesn't support LZMA. Am I right? if so is there any way to install TWRP on "stock" ROM? Right now, I only want stock ROM with root and TWRP (for backups).

Thanks in advance for your help.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Fentadroid:
You can't. Stock rom doesn't have LZMA support, so you cannot permanently flash twrp. You need to wait at least a kernel that support LZMA.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Nesousx:
Thank you.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
Just bought a flash drive so I can try and fix issues for people who use OTG
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
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
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
Just reuploaded 3.3.1-6 with one key fix, didn't feel like making a whole new version.

USB OTG now works :)
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Surge1223:
Niiiiice, now if we could only do something about fixing your avatar...
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
this is my weeb safe haven aight
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] stevew84:
Are you able to TWRP backup? I haven't tried.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
Yep.

Data, System Image, and Boot.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] :
Does this LZMA thing still matter or are we good for flashing now?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
It will probably always matter unfortunately. Don't worry too much though, I'm actively working on figuring it out.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] catharsis724:
Is the new official build the same as 1-6 ?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
Yep.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Viper The Ripper:
Hi [MENTION=7299508]ZVNexus[/MENTION]! First of all congrats, for your amazing work in both TWRP and StatiX OS!!! :victory: Could you attach/upload the TWRP.zip for Sargo? It's NOT available in the official TWRP to download.

Thank you very much! :highfive:
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
There's a problem with the Sargo Jenkins build process atm where it won't generate one. I can't control that. However it does work for bonito, and from what I understand bonito and sargo are pretty much interchangeable. Go flash the bonito zip for sargo and see if it works alright. It probably will, I did it awhile back. There's not much that's actually different.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Archangel:
Has anyone flashed the Bonito zip on Sargo and does it work okay?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] stevew84:
I see there's a chance the Bonito twrp.zip will work for us, but what about the .img for the Sargo? I tried flashing it in TWRP (under boot partition) but nothing happened. Probably flashed to the wrong partition.

---------- Post added at 05:42 AM ---------- Previous post was at 05:32 AM ----------

Works fine it seems.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] gdskp:
I just boot into twrp via fastboot and found out that there is no zip to flash. So I directly wipe in TWRP and flash zip of StatiX. When I reboot it says there is no OS and now I am stuck.

Even I get back to bootloader and download the factory image from Google it does not work as attached screenshot. What can I do to reset? Thanks.

Edit: Fixed.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
What exactly did you wipe. And why does it look like your bootloader is locked?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
Had a guy who did it, said everything was fine. They are practically the same.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] gdskp:
Wipe all but internal storage in the TWRP before I tried to flash a custom rom.

I think it may due to I am using an old version of fastboot (maybe 2-3 years ago :silly: ). I downloaded the latest fastboot and fastboot flash to partition A then everything resumed normal. Not yet tried to fastboot TWRP and flash again.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] b0li:
Right way to flash perm. TWRP comming from stock??

So the right way flashing permanently TWRP comming from stock (Pie, rooted with magisk, unlocked bootloader) would be:

- adb, fastboot and drivers on PC

- boot phone to bootloader and connect phone to PC

- boot temporary TWRP and flash kernel with LZMA support (e.g. ElementalX-1.04) with fastboot commands

- reboot

- boot temporary TWRP again and flash TWRP zip permanently

- reboot again

- flash and root with magisk in TWRP

Would this be the right procedure?? :confused:

Thx
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] lattosimbaste:
Yep, exactly what I did earlier. I forgot to unload the EdgeSense module but I think that may be unnecessary now, no problems here anyway. Everything went just fine though it did seem to take longer to rebuild the boot image when flashiny Magisk than previously by 30 seconds or so. Hunky Dory again and now nandroid recovery testing can begin tomorrow hopefully.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Archangel:
Bonito zip works perfect, all flashed great and doing a back up now. So awesome to have a working custom recovery!!
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Fentadroid:
Why did you flash bonito zip?

Sargo latest twrp zip is available since yesterday evening.... Just take a look at the official website. There is a 3.3.1-1 update you can flash.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] :
Because he has a bonito.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Fentadroid:
:laugh:

Great
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] gdskp:
What is the correct procedure to flash custom rom after these? I wipe dalvik, system and data then tried to flash StatiXOS. When reboot it says there is no OS
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] b0li:
I wouldn't know. I hear that some people have that problem. Sorry...