yashsingh1/xdaforums huggingface dataset:
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] joniroten:
I did something with the android flash tool (that you can use in the browser), so I flashed an AOSP version of Android (I don't know which one) and it worked but the phone boot and shut down automatically after you arrive on the homescreen.

What did you mean by the right kernel ? And where do I find it ?

I still would like to flash Lineage if possible.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] joniroten:
I managed to flash a classic google android 10 so it's pretty much back to when I started to mess with my Pixel :D

But if anybody would direct me to a simple guide to install Lineage, it would be more than appreciated :)
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] thatsupnow:
Most the Roms now you'll need to flash the latest stock, then you'll fastboot their boot.img to use their recovery, then ADB sideload the ROM from there. Then factory reset before booting back into system
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] joniroten:
Hi thatsupnow,

thanks for your answer. I'm not quite sure I've fully understood what you said. (I'm not english speaker and a noob at these things).

From my understanding, steps are :

1) downgrade Android 10 to Android 9 (using the Google Rom Android 9 Pie).

2) flash TWRP with adb

3) install lineage os (which version ?) from the TWRP menu

Am I correct ?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] rogers11:
And where will you find a fully working LineageOS for your Pixel?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] thatsupnow:
If your planning on using any A10 ROM you'll need to flash the latest stock A10 firmware then you'll use the supplied boot.img from any ROM you plan on using. There's no TWRP on Android 10 they use a modified stock recovery and you'll just sideload the ROM
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] rogers11:
There is a new v3.4.0 for the Pixel 3a at TWRP's site. I don't know if it will work with 10.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] testingtestingtesting:
Unfortunately, TWRP-3.4.0-0 doesn't work on Pixel 3a for Android 10, even just temporarily booting TWRP, so you still have to downgrade to Android 9 to boot/install TWRP on Pixel 3a.

TWRP-3.4.0-0 for Pixel 3a still requires a custom kernel with LZMA compression support (ElementalX-P3a-1.06 https://xdaforums.com/pixel-3a/development/kernel-pixel-3a-xl-elementalx-1-01-t3931185) to properly install.

This is due to the following : "TWRP 3.4.0 does not yet bring support for dynamic/logical partitions". TWRP-3.4.0-0 only supports Android 10 on devices which upgraded from Android 9 AND "retain the old partition scheme".

Pixel 3a upgraded from Android 9, but adopted Android 10's Dynamic Partitions.

https://www.xda-developers.com/twrp-3-4-0-enables-ozip-decryption-realme-oppo-devices-support-legacy-devices-upgraded-android-10/

The problems TWRP Official talked about in their post "TWRP and Android 10", Oct 23, 2019, still haven't been fixed unfortunately: https://twrp.me/site/update/2019/10/23/twrp-and-android-10.html.

So, to install TWRP-3.4.0-0 on Pixel 3a:

Temporarily boot twrp-3.4.0-0-sargo.img (./fastboot boot twrp-3.4.0-0-sargo.img . Or for CMD: fastboot boot twrp-3.4.0-0-sargo.img).

In TWRP:

Flash the custom kernel with LZMA compression support;

Then flash twrp-installer-3.4.0-0-sargo.

Done.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Midomad:
Well explained,and should be pinned on the OP.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Fentadroid:
fastboot boot twrp-3.4.0-0-sargo.img
Sending 'boot.img' (65536 KB) OKAY [ 1.482s]
Booting FAILED (remote: 'Error verifying the received boot.img: Invalid Parameter')
fastboot: error: Command failed

Maybe something is missing....
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] testingtestingtesting:
Read my comment above on this page.

TWRP-3.4.0-0 for Pixel 3a still requires you to downgrade to Android 9 to boot/install TWRP.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] joniroten:
Oh !!! It worked perfectly fine.

Thanks a lot guys for your help.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] pauliusval99:
Edit: I think I had a brainfart. Please ignore and excuse me, thanks for the instructions
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Joe333x:
Delete.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Joe333x:
I have a question. I just rolled back my friends Pixel 3a to Android 9, installed TWRP 3.4.0. Then flashed ElementalX Kernel for android 9. Installed Magisk and everything is working fine but when I tried to flash something to system I got a cant mount system error. Do you know by chance what the issue could be? Thank you in advance!
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
I don't support Android 9 anymore since Android 11 is like pretty much right around the corner and not particularly interested in supporting TWRP for this device any longer.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] 12paq:
Yeah, agreed. I saw his latest tweet about working all night on logical partitions for root. In his previous texts it seemed he was done and finished, so I'm not clear on it, but it is fun to watch.

Edit:

Yes, you're exactly right. It's all about non-logical and logical partitions. For Beta Q4 the P3a and P3 uses logical and that's been the problem all along. I'm really glad it's being worked on!

Edit 2: Magisk root is now working with logical partitions on the Pixel 3 Beta Q4. But TWRP has yet to be made to work with the new Magisk and logical partitions.

See here: https://twitter.com/topjohnwu/status/1144887396447608833?s=09

And here: https://twitter.com/topjohnwu/status/1144887395797487618?s=09

The only assumtion is that the logical partitions on P3 and P3 XL gain root access with Magisk the same way as with the P3a and P3a xl.

It's also important to know that TWRP maintainers generally work on official builds not betas. So the above about TWRP and Q4 beta for our device is jumping the gun far to early.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] creeve4:
[MENTION=7299508]ZVNexus[/MENTION] thank you for all of your time and efforts to bring us a working TWPR.

One minor thing I noticed today: I have to disable and then re-enable MTP in TWRP to allow adb access in recovery.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
Did you disconnect the USB cable at any point after entering recovery? That is a known problem that I forgot to put down.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] creeve4:
I had it connected before entering recovery (I connected it to fastboot boot the image) and did not disconnect it.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
Strange then. ADB works for me, along with MTP, as long as I do not disconnect the cable. Could be your cable disconnects infrequently, but I doubt it.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] creeve4:
It has worked every time since. Just that first time. Maybe I bumped the cable or something.

I should have tested a few more times before posting. Sorry for the false alarm
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] dejello:
Thank you so much for this! I dabbled with it but really haven't had any time to work on in (nor much experience to be honest).
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
Before rebooting you have to manually change slots if you flashed a ROM zip. Sorry for the inconvenience. Thought that was intended behavior.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] stevew84:
Confirmed this is what I had to do. Was experiencing weird problems until I did that.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] creeve4:
Just to confirm: ROM zips flash to the inactive slot, correct?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
Yes
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
3.3.1-1: Fixed having to manually change slots before rebooting after flashing a ROM.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] stevew84:
Yup
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
3.3.1-2: Updated to July blobs!
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Fentadroid:
Any idea if we can apply july ota.zip flashing / adb sideload from twrp?

Any idea if flashing latest magisk from twrp will work?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
It should. Try it.

Yes you can flash Magisk from TWRP.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] zonedgold:
So sorry about my ignorance.

What does this mean, "Zips to install TWRP permanently to the boot image will be coming soon"?

Does this mean that this TWRP isn't completely ready just yet?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] j-a-d-z:
Means that you can boot it in fastboot mode and use it to flash / backup / blablabla … but you can't flash it to your phone to boot it directly without a PC.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
No, it just means you can't install it permanently. I have delved further into the matter and from my initial impressions it does not seem I can patch TWRP into a ramdisk of any boot image. TWRP appears to just be too big, and whenever I attempt to build TWRP with a ROM, it fails to boot and goes straight to black because of size limitations. This was a problem during the initial bring up, but I managed to make it a non issue with compression. That's all good and fine, for just TWRP but having a regular boot image + TWRP? It ends up being too big. So for the time being, this is no longer something I will be looking into however seeing as bringup is already done, someone else is free to look into it if they have the time.

If you are just needing to flash a ROM, do an occasional backup, and have easy access to a computer with fastboot which you can boot this through, it is still a viable option by all means. Just can't bring TWRP with you on the go, for now. I'm sure it'll be done eventually though.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] John256145:
Is this preventing the build from becoming official? Or are there other reasons as well?

Also, can I safely assume that the build will also work on the 3a XL?

Thanks for all your work on this by the way :good::good::good::good::good:
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
Did you see my suggestions in the other thread...

I havent played around with the new version, but the options have changed with TWRP 3.3. Instead of installing using the installer script in the zip file, there's a new option to enable to install directly from a booted copy of TWRP, using Install recovery ramdisk. Have you tried to get it to work this way, using the stock boot and kernel extracted from the July firmware?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Ameelo:
Help please

I am newbie to all this but my pixel 3a is dead saying no valid OS after updating to Q Beta 4. My devices is locked neither OEM unlock nor usb debugger is enabled. Can this TWRP be falshed in my case? Will it work?

Any suggestion will be great as I used my phone for 10 minutes only then all this happened.

Amrit
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
Really a question for Q&A forum, but it's not dead as long as you can boot into the bootloader. Have you tried reflashing again using a fresh downloaded copy or reflashing Pie.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Ameelo:
My bootloader is locked as well and phone is locked as well. I have NOT done OEM unlock and USB debugging mode is NoT enabled. I have not tried flashing stock rom as everything is LOCKED.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
Go into recovery and do a factory reset...
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
That is the exact same thing pretty much. But yes, I did see the suggestion and currently looking into it.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Ameelo:
I singed in from google android page for beta and it was available after few seconds from my phone WHEN it was working normally. So I did not use ADB to update to beta 4.

---------- Post added at 08:38 PM ---------- Previous post was at 08:28 PM ----------

When there is no OS pixel 3a will not let me go into recovery mode as well.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
Can you boot TWRP as per the OP? If you can, use that to reflash the OTA zip file downloaded to your device from...

https://developers.google.com/android/ota If you can't access the OTA file, but still got TWRP to boot, try the factory reset there...
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Ameelo:
Thanks for your help. NO I cannot flash twrp from OP because message from ADB is “Fastboot command (boot) is not allowed when locked....
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
We tried our best, an exercise in futility. I guess we've answered the question of what would happen if a completely locked device won't boot. Exchange the device back to the store as defective. In the future always enable USB debug before you update the OS...
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Ameelo:
I hope I can way back from Kathmandu Nepal. Appreciate your effort.

Amrit
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
Great, fingers crossed...
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] havens1515:
It won't let you into stock recovery? You should be able to get there from the bootloader, even if the bootloader is locked. If it won't, then it definitely sounds defective.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Ameelo:
Hi Havens 1515,

duh1 tried to help me a lot but it is not working for me. I can get in fastboot mode where there is option for start/phone off/recovery mode/ restart bootloader/barcode” alternative and none of these options works and screen return back to “No valid operating system found, cannot start device” for all option. And neither can I fastboot boot twrp files – so seems stuck after using 30 minutes of my new Pixel 3a.

As I explained earlier – what led to this was that – I started brand new phone which was running in Pie, did the June 5 security patch I think and registered myself for Beta 4 update in google website. After doing security patch – I started download/installing Beta 4 which stuck in bootloop and then I restarted phone which was running in Andriod Pie. When I did the download/install Beta 4 for second time – that when it crashed saying “No valid operating system found, cannot start device”. Since I DID NOT Unlock Bootloader neither DID I Enable USB Debugging nor I enables Enable Developer option – I think I am STUCK with dead after 30 minutes.

Question to you is - how do I try to stock recovery from LOCKED bootloader that has no operating system install and when I press power + Vol UP key – nothing happens. I am totally newbie to adb/flashing/twrp but I have recently bricked my Honor V10 too. Any help would be great.

Thanks, Amrit
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] sic0048:
With the Pixel 3a series, when you take an OTA update (the beta in your case) it loads into the inactive partition and keeps the original OS intact in the active partition. This is why it rebooted into Pie the first time it Beta failed - because the partition with the Pie OS wasn't modified at all. When you tried to download the Beta again, it should still have been loaded into the inactive partition. However I think the second time the phone switched it's active partition to the second partition and because the beta failed to load, there isn't any OS in that partition. However, I doubt the original partition that has Pie loaded on it has been erased. It's just the phone is actively trying to boot into the second partition instead of the first partition.

If we can find a way that you can force the phone to change active partitions again, I think you will find that it boots into the original Pie OS. The problem is that I am not aware of a method to do this without ADB or TWRP, etc. I'm hoping that someone smarter than me will be able to comment with some instructions on how to make it work.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Archangel:
Dont know if this has been asked before so my apologies if it has but has anyone successfully adb side-loaded the July OTA through TWRP?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] gee one:
So, I think this belongs in here since it is sargo related. In my version of a more perfect world, the sargo and bonito forums would be combined, but I digress...

I did some testing, and the pieces that the twrp image uses to install twrp can work. I'm not sure what is blocking it.

In a nutshell, I installed statiXOS (statix_sargo-20190702-2255-9-v2.1-NUCLEAR.zip), used fastboot to boot the twrp 3.3.1 image. From there, I pushed the magiskboot binary that I extracted from the ramdisk. I was able to use it to unpack the actual boot image and then repack it. The magiskbinary and twrp ramdisk were extracted on my PC and pushed to the phone.

This is a proof of concept that the parts to install twrp from the ramdisk should work. Notice how the statix_twrp.img is 32MB. The original statix.img is 64M because it was dd'd from the phone directly.

I didn't try the install from ramdisk option, but I guess I should do that next for the sake of completeness.

sargo:/tmp/work # history
9	chmod 755 magiskboot
10	getprop | grep slot
11	dd if=/dev/block/bootdevice/by-name/boot_b of=statix.img
12	ls
13	magiskboot --help
14	magiskboot unpack -h statix.img
15	ls
18	cp twrp-3.3.1.img-ramdisk.gz ramdisk.cpio
19	ls -l
20	./magiskboot repack statix.img statix_twrp.img
21	ls -lh
22	dd if=statix_twrp.img of=/dev/block/bootdevice/by-name/boot_b
sargo:/tmp/work # exit

sargo:/tmp/work # ls -lh
total 84M
-rw-rw-rw- 1 root root 321 1970-01-16 19:53 header
-rw-r--r-- 1 root root 53M 1970-01-16 19:53 kernel
-rw-r--r-- 1 root root 368K 1970-01-16 19:53 kernel_dtb
-rwxr-xr-x 1 root root 292K 2019-06-27 18:20 magiskboot
-rw-r--r-- 1 root root 10M 1970-01-16 19:54 ramdisk.cpio
-rw------- 1 root root 64M 1970-01-16 19:53 statix.img
-rw-r--r-- 1 root root 32M 1970-01-16 19:55 statix_twrp.img
-rw-r--r-- 1 root root 10M 2019-06-27 18:18 twrp-3.3.1.img-ramdisk.gz

---------- Post added at 08:35 PM ---------- Previous post was at 08:02 PM ----------

So I tried the install from image/ramdisk. It did something because I could see that the boot partitions were changed, but it didn't boot into recovery or system. I just got a black screen. I didn't see anything with lsusb either, so maybe the phone was off?

So, I guess the parts are there and it's possible to install twrp, but perhaps something is funky in the device tree or android_bootable_recovery?

I suppose you could perform this manually to install twrp "permanently" but you would have to redo the install every time you flash something new. If you want to be really slick, you could install the script into the ramdisk and just call it from adb... or maybe dig around the twrp source and, you know, fix it for real.

Lastly, I didn't test this with magisk or root, and I'm probably not going to, so don't ask.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] ZVNexus:
The size of the image should never change. Definitely did something wrong. No matter what I do, the final boot image is always 67.1MB.

However, I have made some progress. If the boot image I am patching was compiled with GCC I can patch TWRP into the boot image without it immediately black screening because the difference between my clang compiled kernel and the GCC one is about 20MB. That is a huge difference in the boot image. It still doesn't work exactly, but the fact it doesn't black screen means its no longer a size issue. I'll continue looking into why, but from what I can currently see using the "install recovery ramdisk" feature in TWRP results in just going back to AOSP recovery when recovery is selected from the boot-loader menu. This is probably just something simple I'm overlooking. Portable TWRP is probably close tho.

Unfortunately, with this method it means any ROM you wish to patch needs to be using a GCC kernel. If I finish this I'll compile both DU and Statix with GCC kernels, as much as it pains me (I love Clang :D) so TWRP can work.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
Yes, I know this is OT, but sometimes the discussion takes place where it is. It is my understanding the way it is supposed to work with a/b devices, when a new system is flashed to the inactive slot, the bootloader tries to boot that, and only if successful makes that the active slot. Otherwise if unsuccessful, the bootloader tries to boot the current active slot, and if that is also unsuccessful, displays the error, that no valid OS was found.

What seems to be happening in this case and in other similar cases where there are two unsuccessful firmware updates in a row, is that the second time the system is overwriting the slot that has the only valid bootable OS, defeating the whole purpose of having two slots. This is probably due to a bug, with the system switching active slots after the first update attempt, even though it is unsuccessful. Somehow I have to write this up in a bug report to Google, or it will keep happening to others...
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Ameelo:
Hi All Members who have tried to explain me what wrong with my phone and possible suggestions.

My question is will this script work in my case and shall I try it?

https://xdaforums.com/pixel-2/development/tool-deuces-bootloop-recovery-flashing-t3725778/page7

Thanks, Amrit
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] gargleblarg:
If you read a few sentences down it says you need to have your bootloader unlocked. ,:(.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] sic0048:
That very well may be the case.

I'd be curious to have Ameelo boot into the bootloader. It shows which partition is active on the screen. If it shows partition a, then this would confirm your suspicions.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Ameelo:
It shows “Boot Slot: b”

Nothing seems to work until and unless I am unlocked bootloader. Changing boot slot from b to a via ADB command is not possible either.

Thanks, Amrit
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
It's a bit more complicated than that. There are slot flags for current, active/preferred, bootable, and successful. Some of the flags update during a post OTA install routine, that due to the second update attempt overwriting the only bootable slot, never runs, so the active slot was left on B. Now, no bootable flags are set and the bootloader has nowhere to go. Under the autonomous OTA update system, that should never be allowed to occur. Therefore there must be a bug in the system that allowed one or more of the flags to be set incorrectly.

It would be nice if the bootloader displayed all the flags to make troubleshooting easier. I'm on the 3aXL and my device doesn't even have that boot slot info in the bootloader that you have on the 3a. Was that there when you first got the device, or added later in one of the updates?

Amrit, unfortunately your device is defective and you should request an RMA exchange if you can't return it. You didn't do anything wrong, but in the future turn on USB debugging before you attempt any updates, to open up the possibilities of fixing it yourself. Good luck...
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] Pogo:
restoring backup from TWRP

So, I was deleting few too many GoogleApps stuff and screwed up something. Luckily I do have backup from yesterday. The question is what is the procedure for restoring backup on 3a?

It's a stock ROM, unlocked bootloader, rooted with Magisk. Do I need to also revert boot image before or just restore backup from TWRP?
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] sic0048:
You should simply be able to simply boot into TWRP and restore the backup.
[Google Pixel 3a ROMs, Kernels, Recoveries, & Other] duh1:
The restore will just overwrite partitions with the backup. TWRP is running from memory, but if it was permanently installed in the boot partition, you would lose it by reverting to stock...