yashsingh1/xdaforums huggingface dataset:
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] a1291762:
If you have a pin/password/fingerprint, it means that the encryption keys are themselves encrypted. But the encryption of userdata happens even if the keys are not encrypted. It's a requirement of Android since version 6 (with exceptions for low-end devices that lacked hardware support).

I don't actually know how it works on Android (or if it's even the same across vendors). But I suspect that the encryption keys are stored in a "secure enclave" (aka TPM) such that you literally can't just extract them, you can only ask the SoC to decrypt userdata for you, as long as it trusts you. In theory, with a locked bootloader, modifying any partitions would result in a break of trust, which would prevent access to the encryption keys, preventing access to userdata. That's how it works on the (not Android) device my work makes anyway.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] dvx2550:
what about pixel 5 ?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] EngineerMind:
OK, I am coming from an old Samsung S4 that I rooted with ODIN, so this pixel phone and how to flash it is new to me.

I don't want to brick my Pixel 4a, so any confirmation/correction of the below steps so they are correct would be greatly appreciated:

1) The Pixel 4a came with Android 11, so I want to downgrade to Android 10 so I can use the TWRP

2) So, I will down the sunfish-qd4a.200805.003-factory-fac7c08d image file from google.

3) I will unlock the bootloader with these steps:

https://www.droidwin.com/unlock-bootloader-google-pixel-devices/

4) I Will flash the Android 10 image using these steps:

https://www.droidwin.com/restore-pixel-4-xl-4a-stock-firmware-via-fastboot-unbrick/

5) I will flash this boot image to obtain root:

https://xdaforums.com/t/stock-rooted-boot-images-pixel-4a-nov-02.4153249/#post-83355935

6) I then think I need to install the Magisk Manager.

7) Then I think I need to install the FKM app:

https://play.google.com/store/apps/details?id=com.franco.kernel&hl=en_US&gl=US

8) Then flash your kernel from Post #2 of this thread using the above FKM app.

9) But here is the part I don't understand....is the "sunfish_twrp201017-test5.img" the file refered to as " <latest_twrp_boot.img> " in the OP? and is this file a boot image? If so, then if I flash it, wont it replace the previous rooted/magisk boot image I installed at step #5?

I am a little confused and would greatly appreciate some help :)
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] Typhus_:
Downgrade to 10!? Why would you want to do that in the first place?

You don't need TWRP to get root permissions. You only need to flash Magisk pacthed img through fastboot and you're done.

Cheers!
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] EngineerMind:
I am mainly interested in TWRP so that I can do image backups and restores.

I was using flashfire on my S4 because it had a locked bootloader. I did flashfire image backups on a weekly basis and loved the fact that I was able to get a backup S4 up and running in 15 mins (with all my data and settings) just by doing a image restore using the latest backup.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] tcat007:
I had the same concern, and sure would like TWRP on a11. But I'm on the latest, and easy to root. I use Swift BU, which does good batch backups weekly. So far haven't had the need to restore. But upgrading monthly security is fairly easy (5 minutes). Magisk gives me QS columns, font change, and custom accent colors. It's all I need.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] a1291762:
There is no separate recovery partition for A/B devices so you can't just "flash" Magisk or TWRP.

For both of them, you boot an image (without flashing) and then patch your boot partition to actually install.

It is common for people to share Magisk-patched boot images and you can flash them but it's not common than share TWRP-patched boot images. On my last phone, installing TWRP also modified system and vendor. Those are much bigger to share, compared to an installer.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] nor-ric:
I just did what you are after. The correct order is:

1) unlock the bootloader

2) use A10 factory image

3) "fastboot flash boot" the TKernel provided in the OP (needed for TWRP)

4) "fastboot boot" TWRP and flash it as explained in the OP

5) backup your boot partition in TWRP (no compression). It will be named "boot.emmc.win", but it's the actual boot image (including TKernel and TWRP)

6) install Magisk Manager and patch such boot image

7) "fastboot flash boot" the patched boot image
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] EngineerMind:
I have a curious question...

The OP states this:

What to backup

* super

* data

* boot

What to restore

* super

* data

* boot

I am looking to clone my Pixel 4a (running A10) to another new Pixel 4a (running A11) and was wondering what would be the quickest method.

I was thinking that since the "boot" section was backed up (as instructed in the OP above) on my first pixel, I was then hoping that I could use the backed up image to restore the boot section (that already has TWRP and special kernel in it) into the new Pixel (along with the data/os of the first pixel).

Question #1 - Is this possible?

If so, then how can I temporarily install TWRP on the new pixel so that it would be able to "restore" the image of the first pixel's backup?

Question #2 - and if it is possible, will doing a full restore of the first pixel (running A10) onto the new pixel (that is running A11), will it downgrade the new pixel to A10?

Question #3 - If it's not possible to "restore" the pre-built boot section, then I guess I will need to redo the downgrade of the new pixel from 11 to 10 then I would need to "repack" the boot section again and then do the restore to do the clone?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] nor-ric:
On older Android releases (a few years ago) this used to work in my experience...

You would need to downgrade first, because there is no TWRP for Android 11 yet.

This would be the safest route in my opinion.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] EngineerMind:
Got another question about this TWRP...

When I go into various functions of TWRP, I see "Current Slot: B" at the bottom of the screen along with "Slot A" and Slot B" buttons.

What are they used for?

And why does it say the "Current Slot" is "B" and not "A"?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] ParanoidNemo:
It say that because pixel4a as a A/B partition scheme. Basically you have two partition identical. When booting the system start let's say using the A partition and it will continue using that even if you reboot. When updating your system the update is installed over the B partition and next reboot switch partition and boot the B (A remaining in the previous state) and so on and so forth with a switch on every system update. If you're in B next update will move you to A. Nothing changes tho.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] EngineerMind:
Does this "switch" happen for security updates, or only for complete OS changes like from A10 to A11?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] ParanoidNemo:
Should always happens as far as I know. Because to make the update less intrusive and have a possible "backup" to revert to the system switch partition every update.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] liamwhite:
Any ideas what would need to be changed to make this tree compatible with my Lineage build? It's been a few months now and TWRP still can't decrypt the data partition on my phone. system, vendor, and product are fine, so clearly super is mountable.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] Chaprnks:
I currently have FW 200317.027, do you think this would work w/ this TWRP build?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] EngineerMind:
I can confirm that I was able to do a backup and restore (using A10 stock sunfish-qd4a.200805.003-factory-fac7c08d) onto a different Pixel 4a and this worked 100% (except for the internal storage (images, recordings, etc) which twrp does not include in its backup (but that's another post I will make)
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] EngineerMind:
OK, I have been able to successfully install stock A10 (sunfish-qd4a.200805.003-factory-fac7c08d), patch it with this TWRP, and Magisk.

I was then able to do a full nandroid backup from on Pixel 4a, then a restore of that backup to a totally different Pixel 4a and the second Pixel 4a is an exact clone of the first - except for the internal memory "storage" memory (which contains Camera shots, Recording, etc).

I would like to be able to backup the entire phone including "storage" to an external OTG memory stick.

In reading TWRP's FAQ, they apparently made a decision to not include the "Storage" in it's backups:

What is EXCLUDED from a TWRP backup?

First of all: you have to choose the partitions which should be added to a backup but there is an important thing to know regarding the /data/media storage (...

twrp.me

But after reading this post:

https://xdaforums.com/t/recovery-twrp-fix-o-backup-internal-storage-o-backup-option.3941108/

it says:

edit: Jun 24, 2020 TWRP 3.4.0-0 Released

just mark the checkbox for Internal Storage in TWRP menu

But I can't see a "Storage" option in this 3.4.0.0 build of TWRP's backup, nor can I mount the "Storage" partition.

Alternatively, it seems you could also patch twrp so that it would include the "storage" contents in the "data" partition (instead of having a separate "storage" partition):

https://xdaforums.com/t/recovery-twrp-fix-o-backup-internal-storage-o-backup-option.3941108/

How do I backup media, game data (internal storage) using TWRP?

It is known that TWRP does not back up /data/media as you can read here and on other posts on this site, also on TWRP FAQ How can one bypass this?

android.stackexchange.com

I tried to run that "patch" playstore app from above, but it puts the phone in a fastboot loop. I also tried running the Magisk module "TWRP Helper" but it gave an error "Can't locate recovery block device"

So, even though this build of TWRP is 3.4.0.0, I don't see an option to backup "storage" nor can I mount the storage partition.

This page offers a bunch of different solutions, but it is unclear what partition for one of the steps is that you do a ext2 to ext4 then to etx2 - and it seems many of these solutions will clear my storage memory.

How to Fix TWRP Unable to Mount Storage, Internal Storage 0MB

Some TWRP users, especially those who install custom ROMs, sometimes run into an issue where TWRP will an error that reads “Unable to mount storage”. The

appuals.com

It seems that member [U]a1291762[/U] in post #68 suggested that this may be because the userdata partition was encrypted (did he mean "storage" partition because "data" can be backed up with TWRP). But what's making me think it may not be an encryption issue is that when this TWRP boots up, it will ask for your pin/pattern and then says "data successfully decrypted" right before it shows the main menu.

So:

A) Is this build of TWRP 3.4.0.0 suppose to support backup of "storage"?

B) Does anyone have any ideas how to include the storage in a TWRP backup?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] EngineerMind:
Another user in this thread also mentioned that it changed their devices IMEI.

I installed this TWRP image and everything seems to work OK, but I did not record my phone's original IMEI.

Is it possible that this TWRP does in fact modify Pixel 4a's system, vendor and IMEI?

UPDATE: I just compared the IMEI of the "Master" pixel 4a (that I did a backup image of using this TWRP) to a clone Pixel 4a using that image restore (using this TWRP) and the IMEI's are different.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] EngineerMind:
Just a heads up to anyone wanting to do a full backup of their pixel to an EXTERNAL USB stick (via OTG)...

The stick needs to be formatted in exFAT format because the "super" partition inside the pixel 4a is like 9GB in size and TWRP does not seem to be able to break it up into 1-2GB files like it can with the data partition. (FAT32 can only handle single file sizes up to 4GB)

So, if you try to backup to a 64GB stick formatted in FAT32, it will succeed in backing up the boot and data partition, but as soon as the backup tries to do the super partition, it will fail and wont give any clue why - but now you will know why.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] claviger-pc:
Fat is limited to 4GB file size. Exfat is not...
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] d33dvb:
Does this work with lineage 18.1 now?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] daemonspudguy:
No. It's only for Android 10. LineageOS 18 is based on Android 11.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] d33dvb:
Is this a problem with all devices on 11? Or is there just no one working on our device?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] d33dvb:
There is version 3.5.2, and an android 11 branch, is it not stable yet?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] nikamura:
I have been busy for the past few months, so I couldn't build TWRP.

I built TWRP version 3.5.2 and will try to build TWRP for android 11.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] d33dvb:
Wow awesome, thanks so much brother.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] Zaxx32:
Oh man...that would damn near qualify you for sainthood as far as I'm concerned! Will this also require a 'matching' kernel so to speak? I just can't see why Google would continue to leave it's 'enthusiast' customers without, at least, a 'pathway' to a decent backup solution for their wares. I wish I was an 'extra wealthy' individual and able to .finance' a small team of devs to remedy this issue. Pardon my lack of knowledge but...Is whole 2-slot, on-the-fly dynamic update thing actually working as google intended or is it 'broken'?? ...or did they intend this...imo...ignorance? Smdh...Well, thanx for all you've done/will do for the community!
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] d33dvb:
It might be worth taking a look at why people's IMEI were changing with TWRP also.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] d33dvb:
If you want to point me in the right direction with compiling TWRP I can give it a shot. Is it as simple as following any of the TWRP build guides and using the manifest from your build?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] nikamura:
I built TWRP version 3.5.2.

sunfish_twrp3.5.2-10.img

drive.google.com

It's for android 10.

I'm trying to build TWRP for android 11.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] nikamura:
It is as simple as following any of the TWRP build guides and using the manifest from my github repository.

minimal_manifest

GitHub - tnakamur/platform_manifest_twrp_omni: Minimal manifest for building TWRP for devices shipped with Android 10,

Minimal manifest for building TWRP for devices shipped with Android 10, - tnakamur/platform_manifest_twrp_omni

github.com

local manifest

GitHub - tnakamur/android_manifest_google_sunfish

Contribute to tnakamur/android_manifest_google_sunfish development by creating an account on GitHub.

github.com
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] d33dvb:
Thanks a bunch for the build guides, I will give it a shot.. Are you having problems with the android 11 branch?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] nikamura:
I'm editing device tree and kernel source with the android 11 branch.

I don't build it yet.

Maybe some problems 😅
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] g0t.milkk:
Just to say I'm also impatient for a build of TWRP for Android 11, it's been quite problematic for me, coming from a non A/B device, when my Pixel first crashed and ADB debug wasn't enabled...
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] DragonFire1024:
Thanks for this guide. Just got a brand spanking new pixel 4 straight from Google, which arrived on Friday. I previously bought a Pixel 3 directly from Amazon however they were dishonest about the sale and I had no idea it was a Verizon phone. So went straight to Google, and got me a pixel 4a. It now has:

TWRP.

Xposed.

Magisk - all green with safety net.

So Google pay still works with tap and pay but it took me a bit to get it there.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] alecxs:
adb backup comes with no restrictions and is fully functional for all apps android:allowBackup=false is ignored since android 11
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] Zaxx32:
I meant for rooted enthusiasts and any with an A/B slotted phone...user app data doesn't get backd up since A10...
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] alecxs:
i don't own android 11 device for testing unrooted backup (for example Helium) so either you or xda must be wrong

edit: for rooted backup Migrate will work without TWRP at all
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] nikamura:
I built TWRP for android11.

There is link at OP.

I tested it with android11 FW(RQ1A.210205.004 Feb 2021).

It doesn't work 'Install Recovery Ramdisk'.

I'm working fixing it and build with June FW.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] Zaxx32:
So thankful for your time and effort!
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] d33dvb:
Thanks so much for the effort I could not figure it out, its beyond my abilities.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] a1291762:
I have the June update installed

I can fastboot boot sunfish_twrp11-test1.img

I can adb logcat and adb shell

It has mounted userdata

Nice!

It didn't load the TWRP theme I have (https://xdaforums.com/t/theme-twrp-twrp-materialised-black-dark-light-play-discontinued.2915584/). Hmm... that does say discontinued... maybe it's not compatible with TWRP 3.5.1 (I last used that theme with TWRP 3.3.1 on a Mi A2 Lite).

I have really only used TWRP as a way to get a shell when the system doesn't boot, so this is already perfect for me ;)

The real test would be if https://xdaforums.com/t/release-2021-6-6-magisk-manager-for-recovery-mode-mm.4084173/ works. That has certainly come in handy in the past (though I'm now aware of how to do most of that stuff directly from a shell, making that particular script less valuable to me).

Heh. TWRP complained when I went to reboot that I had no OS installed. Of course, rebooting worked anyway because I do actually have an OS installed :)
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] nikamura:
I built TWRP for android11 test2 build.

There is link at OP.

I tested it with android11 FW(RQ1A.210205.004 Feb 2021).
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] Zaxx32:
Ah man...you ROCK my friend!!! Since I'm barely a novice 'rooter', I'll need to wait for success with June and then an 'idiot proof' step by step guide that also explains 'how' to do each step. I'm one of those people who is convinced I'll misunderstand a step and brick my phone...lmao

80% is mostly clear for me though! :p My nerves go to sht as soon as I unlock the bootloader. My Moto G5+ wasn't too bad...but trying to get my head around my Moto G7 A/B nightmare, is the culprit!
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] andyxo:
I agree, much better instructions are needed please...
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] mangokm40:
Can it boot from fastboot with the stock kernel? I haven't figured out how to get the custom kernel in, yet.

Thanks a lot for this work!
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] nikamura:
Use TWRP temporary

①Test TWRP, 'fastboot boot twrp.img'

If you use TWRP permanently(install recovery ramdisk), you use custom kernel

that supports TWRP(LZMA ramdisk).

I use my custom kernel(TKernel), some other kernels maybe OK.

My custom kernel download link is OP.

①Test my custom kernel, 'fastboot boot boot.img'

②If you don't find any problem, flash custom kernel, 'fastboot flash boot boot.img'

③adb push <twrp.img> /sdcard/

④reboot to bootloader and fastboot latest boot.img of TWRP

⑤Go to Install

⑥Touch Install Image

⑦Select your TWRP boot.img from /sdcard

⑧Install recovery ramdisk

⑨Swipe to confirm flash

⑩Reboot to recovery and android to verify installation

⑪Reinstall magisk, if you want
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] Rafiul Bari Chowdhury:
Will this work with latest June build?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] kiritoxd:
So if i just want to flash this twrp temporary, i ll just have to put 'fastboot boot twrp.img' right?

Does that also let me install Magisk onto my GSI rom or can i also install the A/B GSI using this twrp?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] Android.Addict:
Does OTG work on 11 Test build?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] DragonFire1024:
So far it seems everything works perfectly. Installed the latest magisk canary and everything seems perfect. Question: is there anyway to include support for init.d?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] DragonFire1024:
If you want to flash a temporary yes every time you want to reboot to twrp you have to 'fastboot boot' the image. You should just be able to copy the kernel image over to device storage and use magisk to patch the image and flash is manually in fastboot.

Edit add: is there any possible way to flash some kind of other image other than the warning that comes up regarding the unlocked bootloader every time you reboot the device?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] DragonFire1024:
So magisk canary would not allow twrp to be retained after a reboot. And when updating the images lost root access or twrp but couldn't have both working. Updated to latest magisk stable and all is well.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] wireroot:
Did you also try the TWRP backup function and even more importantly the restore function in "temporary" boot mode?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] DragonFire1024:
I have not had a chance to explore further. I work too much LOL. Now that you mention it, I have a device that does exactly what it's supposed to and I haven't really had to use TWRP too much. For the most part I can flash in Magisk, whereas the others I can flash in Franco Kernel Manager. Having a fully working fastboot is the icing on the cake though.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] ny-hardcore:
I got error 255 when backing up data ( that error you get when there is multiple users on the device"

Was on custom ROM tho.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] wireroot:
Was this in TWRP temporary boot mode?

Is it true that you have multiple users on your device?
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] DragonFire1024:
By default the multi-user function is turned on upon a fresh installation or factory reset. You can click on the guest account and remove it and then shut the feature off.
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] d33dvb:
I tried booting the twrp image using fastboot boot twrp.img and it stalled at "booting...." Im using eng.stk kernel with lzma support and lineage 18.1

Am I doing something wrong?

# fastboot boot Downloads/sunfish_twrp11-test2.img

Sending 'boot.img' (65536 KB) OKAY [ 2.211s]

Booting

Never boots, just hangs here
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] d33dvb:
Were you able to get it working on Lineage? I tried eng.stk kernel and fsociety, both claim lzma support, but I could not even fastboot boot twrp.img, got stuck at "booting...."
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] d33dvb:
Fix was this:

adb reboot bootloader

fastboot flash recovery boot_a twrp.img
[Google Pixel 4a ROMs, Kernels, Recoveries, & Other] mangokm40:
Wait!

We can flash an image to "recovery" with this device? I thought we couldn't, because it doesn't have a recovery partition. :geek:

Thanks for this. I've been wanting to try a kernel that will let me use exFat, as well as TWRP. :)