TWRP 3.2.3-1 for Pixel 3 XL

Search This thread

michaelbsheldon

Senior Member
Jan 12, 2011
784
233
Anaheim, CA
"o_O:eek: What, the 'Google' Pixel 4A and, Pixel 5 have a working Android 11 (R) TWRP. Where are they?
Not here! "

Devs are doing highly technical wizardry with phones they have to buy themselves in order to give you free stuff that you can't make at home yourself. Now when a consumer is spending personal funds, they have every right to complain.
When it's a community of like minded volunteers who invent it and give it to you for free as a labor of love and seeking perfection, everyone who's using it and not contributing ought to STFU.
 
  • Like
Reactions: DrunkUncas

Homeboy76

Recognized Contributor
Aug 24, 2012
3,882
2,327
Google Pixel XL
Google Pixel 7 Pro
Devs are doing highly technical wizardry with phones they have to buy themselves in order to give you free stuff that you can't make at home yourself. Now when a consumer is spending personal funds, they have every right to complain.
When it's a community of like minded volunteers who invent it and give it to you for free as a labor of love and seeking perfection, everyone who's using it and not contributing ought to STFU.
I see you edited my post, and removed this sentence:

I know it is flustrating, but isn't everyone patiently waiting for Android 11 (R) T.W.R.P?

When combined with the sentence you replied to, should have indicated to you I was responding to a previous comment.

I was not asking for an ETA or disrespecting the Dev.

Therefore, if you cannot read and comphend the meaning of what you are reading. My suggestion to you is take your own advice and "STFU".

Have a nice day! :)
 
Last edited:

CosmicDan

Senior Member
Jun 19, 2009
5,906
7,744
36
Sydney
Xiaomi Poco X3 Pro
Heya guys,

New crosshatch owner here. Sad to see TWRP ain't working for A11, but I can take a crack at it (done some TWRP work over the years).

The funny thing is that TWRP *will* boot on Android 11 if the internal data is not formatted. So I think the reason why it might be freezing is because it gets stuck on decryption.

But.... why, I wonder? We can get into adb and check the TWRP logs, there's nothing of interest there - it just gets stuck.

So I suppose I'm going to DL the source and add a crap load of debug printing to find where exactly TWRP is getting locked up, and go from there. Hopefully I don't get frustrated and give up trying to get TWRP to build though xD

Will post an update soon, gonna spend at least one day on this.

EDIT: I am going to build on the new A11 minimal manifest, so if it doesn't work for A10 then that's just too bad, time to update to A11 heh.
 
Last edited:

CosmicDan

Senior Member
Jun 19, 2009
5,906
7,744
36
Sydney
Xiaomi Poco X3 Pro
Help wanted!

According to AOSP docs:

"If desired, A/B devices can still use a dedicated recovery image."

I cannot find any details on how to implement this. Do we need bootloader sources?

The slot system is annoying for us, so I see two choices:
1) Adapt the system to no longer have slots. Slots are soon to be obsolete anyway, once OEM's pick up the new DSU standard for OTA's. Or maybe no, since DSU cannot update the boot image. Or;
2) Accept that TWRP is approaching sunset and make a new Recovery from scratch based on an Android 11 distro so we have full userspace access and access to DSU, allowing multiboot, live booting, and so on.

I'm leaning towards #2, because I've not yet found the cause for the freeze and I feel like an idiot xD


EDIT: For those who don't know, I'm one of the guys who converted the Mi A1 into a Treble Device and also adapted it's slot system to be a full dualboot (with userdata_a and _b) - The crosshatch is my new toy so I'm gonna do something crazy here again ;)
 
Help wanted!

According to AOSP docs:

"If desired, A/B devices can still use a dedicated recovery image."

I cannot find any details on how to implement this. Do we need bootloader sources?

The slot system is annoying for us, so I see two choices:
1) Adapt the system to no longer have slots. Slots are soon to be obsolete anyway, once OEM's pick up the new DSU standard for OTA's. Or maybe no, since DSU cannot update the boot image. Or;
2) Accept that TWRP is approaching sunset and make a new Recovery from scratch based on an Android 11 distro so we have full userspace access and access to DSU, allowing multiboot, live booting, and so on.

I'm leaning towards #2, because I've not yet found the cause for the freeze and I feel like an idiot xD


EDIT: For those who don't know, I'm one of the guys who converted the Mi A1 into a Treble Device and also adapted it's slot system to be a full dualboot (with userdata_a and _b) - The crosshatch is my new toy so I'm gonna do something crazy here again ;)
If you need a tester, i have a 3xl sitting here doing nothing. My current device is the 4a5g and i also have a 4a (looking forward to the 6xl).
 

CosmicDan

Senior Member
Jun 19, 2009
5,906
7,744
36
Sydney
Xiaomi Poco X3 Pro
If you need a tester, i have a 3xl sitting here doing nothing. My current device is the 4a5g and i also have a 4a (looking forward to the 6xl).
Good to know, keep an eye on this thread - I'll try to keep discussion to a minimum to avoid bumping the thread though.

I've decided against repartitioning for recovery because that will be annoying for stock compatibility. I'm going full force on GARP, I've actually been working on it for a while because there's a lot of GSI capable devices out there that don't have TWRP - I put it on hold because it wasn't useful for my Poco F1 though. GARP is specifically going to be for fastbootd A11 devices like our Pixel and basically any A11 launch device, since they must have GSI compatibility out of the box anyway.

Exciting things coming soon, I'm super committed to this and excited to share it when it's ready!
 

crypto_

Member
Sep 14, 2017
10
2
Good to know, keep an eye on this thread - I'll try to keep discussion to a minimum to avoid bumping the thread though.

I've decided against repartitioning for recovery because that will be annoying for stock compatibility. I'm going full force on GARP, I've actually been working on it for a while because there's a lot of GSI capable devices out there that don't have TWRP - I put it on hold because it wasn't useful for my Poco F1 though. GARP is specifically going to be for fastbootd A11 devices like our Pixel and basically any A11 launch device, since they must have GSI compatibility out of the box anyway.

Exciting things coming soon, I'm super committed to this and excited to share it when it's ready!
Not sure if this is anything but I read on the twrp download site "You need to install a LZMA ramdisk kernel before installing TWRP. " and I have yet to do that because the instructions I found are way above my head. Maybe this is the cause of the problem as these instructions don't mention to do that?
 

crypto_

Member
Sep 14, 2017
10
2
A problem I'm having is installing on a fresh device, twrp _never_ loads, just sits on splash screen. I am wondering if the img file is not compiled with a LZMA supported kernel and that is what the twrp devs are saying on the crosshatch page. I found this guide for LZMA and this guide for compiling twrp so maybe something can be put together.
 

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,964
7,244
A problem I'm having is installing on a fresh device, twrp _never_ loads, just sits on splash screen. I am wondering if the img file is not compiled with a LZMA supported kernel and that is what the twrp devs are saying on the crosshatch page. I found this guide for LZMA and this guide for compiling twrp so maybe something can be put together.
If you see the splash screen then the ramdisk has been extracted and recovery was started by init. Maybe logs can allude to the issue?
 

crypto_

Member
Sep 14, 2017
10
2
If you see the splash screen then the ramdisk has been extracted and recovery was started by init. Maybe logs can allude to the issue?
Not sure, found these:
Skipping adf graphics -- not present in build tree/ Failed to load image from indeterminate013, error -1 Unable to open '//TWRP/BACKUPS/8A1Y0DLWF' Then it seems to have problems processing fstab.
 

Attachments

  • recovery.log
    22.6 KB · Views: 6

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,964
7,244
Not sure, found these:
Skipping adf graphics -- not present in build tree/ Failed to load image from indeterminate013, error -1 Unable to open '//TWRP/BACKUPS/8A1Y0DLWF' Then it seems to have problems processing fstab.
Did you get this from adb pull? Are you able to get logcat as well? Also what ROM are you using?
 

crypto_

Member
Sep 14, 2017
10
2
Did you get this from adb pull? Are you able to get logcat as well? Also what ROM are you using?
Yes. no, nothing from logcat but maybe I'm doing something wrong. I am using ubuntu and 2 consoles one for logcat and one to bootload twrp image. I am using stock ROM with latest updates. This is a new/used phone so no data to be concerned about. Considering your question about the ROM I decided to reflash to stock in the case my usb connection is flaky and noticed this at the end of the flash-all script
Code:
Erasing 'userdata'                                 OKAY [  9.187s]
Erase successful, but not automatically formatting.
File system type raw not supported.
Erasing 'metadata'                                 OKAY [  0.011s]
Erase successful, but not automatically formatting.
File system type raw not supported.
Rebooting                                          OKAY [  0.000s]
Finished. Total time: 148.038s
getvar shows
Code:
(bootloader) cpu-abi:arm64-v8a
(bootloader) super-partition-name:system_a
(bootloader) is-logical:apdp_a:no
(bootloader) is-logical:boot_b:no
(bootloader) is-logical:product_a:yes
(bootloader) is-logical:sda:no
(bootloader) is-logical:devcfg_a:no
(bootloader) is-logical:keymaster_b:no
(bootloader) is-logical:dtbo_a:no
(bootloader) is-logical:vbmeta_b:no
(bootloader) is-logical:keymaster_a:no
(bootloader) is-logical:tz_b:no
(bootloader) is-logical:userdata:no
(bootloader) is-logical:product_b:no
(bootloader) is-logical:sdc:no
(bootloader) is-logical:vendor_b:no
(bootloader) is-logical:cmnlib_a:no
(bootloader) is-logical:msadp_b:no
(bootloader) is-logical:hyp_a:no
(bootloader) is-logical:misc:no
(bootloader) is-logical:xbl_config_b:no
(bootloader) is-logical:storsec_a:no
(bootloader) is-logical:xbl_b:no
(bootloader) is-logical:cmnlib_b:no
(bootloader) is-logical:hyp_b:no
(bootloader) is-logical:abl_a:no
(bootloader) is-logical:qupfw_a:no
(bootloader) is-logical:dtbo_b:no
(bootloader) is-logical:devcfg_b:no
(bootloader) is-logical:msadp_a:no
(bootloader) is-logical:vendor_a:yes
(bootloader) is-logical:qupfw_b:no
(bootloader) is-logical:cmnlib64_b:no
(bootloader) is-logical:tz_a:no
(bootloader) is-logical:system_b:no
(bootloader) is-logical:boot_a:no
(bootloader) is-logical:xbl_a:no
(bootloader) is-logical:apdp_b:no
(bootloader) is-logical:aop_b:no
(bootloader) is-logical:abl_b:no
(bootloader) is-logical:cmnlib64_a:no
(bootloader) is-logical:aop_a:no
(bootloader) is-logical:storsec_b:no
(bootloader) is-logical:xbl_config_a:no
(bootloader) is-logical:sde:no
(bootloader) is-logical:sdb:no
(bootloader) is-logical:system_a:yes
(bootloader) is-logical:metadata:no
(bootloader) is-logical:vbmeta_a:no
(bootloader) is-logical:system_ext_a:yes
(bootloader) battery-soc-ok:yes
(bootloader) battery-voltage:4061
(bootloader) off-mode-charge:1
(bootloader) treble-enabled:true
(bootloader) is-userspace:yes
(bootloader) partition-size:apdp_a:0x40000
(bootloader) partition-size:boot_b:0x4000000
(bootloader) partition-size:product_a:0x7B43B000
(bootloader) partition-size:sda:0xEDE000000
(bootloader) partition-size:devcfg_a:0x20000
(bootloader) partition-size:keymaster_b:0x80000
(bootloader) partition-size:dtbo_a:0x800000
(bootloader) partition-size:vbmeta_b:0x10000
(bootloader) partition-size:keymaster_a:0x80000
(bootloader) partition-size:tz_b:0x200000
(bootloader) partition-size:userdata:0xCE4FFB000
(bootloader) partition-size:product_b:0x12C00000
(bootloader) partition-size:sdc:0x400000
(bootloader) partition-size:vendor_b:0x30000000
(bootloader) partition-size:cmnlib_a:0x80000
(bootloader) partition-size:msadp_b:0x40000
(bootloader) partition-size:hyp_a:0x80000
(bootloader) partition-size:misc:0x100000
(bootloader) partition-size:xbl_config_b:0x20000
(bootloader) partition-size:storsec_a:0x20000
(bootloader) partition-size:xbl_b:0x380000
(bootloader) partition-size:cmnlib_b:0x80000
(bootloader) partition-size:hyp_b:0x80000
(bootloader) partition-size:abl_a:0x200000
(bootloader) partition-size:qupfw_a:0x10000
(bootloader) partition-size:dtbo_b:0x800000
(bootloader) partition-size:devcfg_b:0x20000
(bootloader) partition-size:msadp_a:0x40000
(bootloader) partition-size:vendor_a:0x19AA3000
(bootloader) partition-size:qupfw_b:0x10000
(bootloader) partition-size:cmnlib64_b:0x80000
(bootloader) partition-size:tz_a:0x200000
(bootloader) partition-size:system_b:0xB0000000
(bootloader) partition-size:boot_a:0x4000000
(bootloader) partition-size:xbl_a:0x380000
(bootloader) partition-size:apdp_b:0x40000
(bootloader) partition-size:aop_b:0x80000
(bootloader) partition-size:abl_b:0x200000
(bootloader) partition-size:cmnlib64_a:0x80000
(bootloader) partition-size:aop_a:0x80000
(bootloader) partition-size:storsec_b:0x20000
(bootloader) partition-size:xbl_config_a:0x20000
(bootloader) partition-size:sde:0x2000000
(bootloader) partition-size:sdb:0x400000
(bootloader) partition-size:system_a:0x31A6D000
(bootloader) partition-size:metadata:0x1000000
(bootloader) partition-size:vbmeta_a:0x10000
(bootloader) partition-size:system_ext_a:0xB862000
(bootloader) version-vndk:30
(bootloader) partition-type:apdp_a:raw
(bootloader) partition-type:boot_b:raw
(bootloader) partition-type:product_a:raw
(bootloader) partition-type:sda:raw
(bootloader) partition-type:devcfg_a:raw
(bootloader) partition-type:keymaster_b:raw
(bootloader) partition-type:dtbo_a:raw
(bootloader) partition-type:vbmeta_b:raw
(bootloader) partition-type:keymaster_a:raw
(bootloader) partition-type:tz_b:raw
(bootloader) partition-type:userdata:raw
(bootloader) partition-type:product_b:raw
(bootloader) partition-type:sdc:raw
(bootloader) partition-type:vendor_b:raw
(bootloader) partition-type:cmnlib_a:raw
(bootloader) partition-type:msadp_b:raw
(bootloader) partition-type:hyp_a:raw
(bootloader) partition-type:misc:raw
(bootloader) partition-type:xbl_config_b:raw
(bootloader) partition-type:storsec_a:raw
(bootloader) partition-type:xbl_b:raw
(bootloader) partition-type:cmnlib_b:raw
(bootloader) partition-type:hyp_b:raw
(bootloader) partition-type:abl_a:raw
(bootloader) partition-type:qupfw_a:raw
(bootloader) partition-type:dtbo_b:raw
(bootloader) partition-type:devcfg_b:raw
(bootloader) partition-type:msadp_a:raw
(bootloader) partition-type:vendor_a:raw
(bootloader) partition-type:qupfw_b:raw
(bootloader) partition-type:cmnlib64_b:raw
(bootloader) partition-type:tz_a:raw
(bootloader) partition-type:system_b:raw
(bootloader) partition-type:boot_a:raw
(bootloader) partition-type:xbl_a:raw
(bootloader) partition-type:apdp_b:raw
(bootloader) partition-type:aop_b:raw
(bootloader) partition-type:abl_b:raw
(bootloader) partition-type:cmnlib64_a:raw
(bootloader) partition-type:aop_a:raw
(bootloader) partition-type:storsec_b:raw
(bootloader) partition-type:xbl_config_a:raw
(bootloader) partition-type:sde:raw
(bootloader) partition-type:sdb:raw
(bootloader) partition-type:system_a:raw
(bootloader) partition-type:metadata:raw
(bootloader) partition-type:vbmeta_a:raw
(bootloader) partition-type:system_ext_a:raw
(bootloader) has-slot:apdp:yes
(bootloader) has-slot:boot:yes
(bootloader) has-slot:product:yes
(bootloader) has-slot:sda:no
(bootloader) has-slot:devcfg:yes
(bootloader) has-slot:keymaster:yes
(bootloader) has-slot:dtbo:yes
(bootloader) has-slot:vbmeta:yes
(bootloader) has-slot:tz:yes
(bootloader) has-slot:modem:no
(bootloader) has-slot:fsc:no
(bootloader) has-slot:userdata:no
(bootloader) has-slot:sdc:no
(bootloader) has-slot:devinfo:no
(bootloader) has-slot:vendor:yes
(bootloader) has-slot:cmnlib:yes
(bootloader) has-slot:msadp:yes
(bootloader) has-slot:hyp:yes
(bootloader) has-slot:misc:no
(bootloader) has-slot:xbl_config:yes
(bootloader) has-slot:storsec:yes
(bootloader) has-slot:xbl:yes
(bootloader) has-slot:abl:yes
(bootloader) has-slot:qupfw:yes
(bootloader) has-slot:modemst2:no
(bootloader) has-slot:cmnlib64:yes
(bootloader) has-slot:system:yes
(bootloader) has-slot:aop:yes
(bootloader) has-slot:fsg:no
(bootloader) has-slot:sde:no
(bootloader) has-slot:sdb:no
(bootloader) has-slot:modemst1:no
(bootloader) has-slot:metadata:no
(bootloader) has-slot:system_ext:yes
(bootloader) security-patch-level:2021-09-05
(bootloader) vendor-fingerprint:google/crosshatch/crosshatch:11/RQ3A.210905.001/7511028:user/release-keys
(bootloader) hw-revision:MP1.0
(bootloader) current-slot:a
(bootloader) serialno:8A1Y0DLWF
(bootloader) product:crosshatch
(bootloader) version-os:11
(bootloader) first-api-level:28
(bootloader) slot-count:2
(bootloader) max-download-size:0x10000000
(bootloader) version:0.4
(bootloader) version-baseband:g845-00173-210331-B-7249945
(bootloader) secure:yes
(bootloader) variant:MSM USF
(bootloader) dynamic-partition:true
(bootloader) system-fingerprint:google/crosshatch/crosshatch:11/RQ3A.210905.001/7511028:user/release-keys
(bootloader) version-bootloader:b1c1-0.3-7241706
(bootloader) unlocked:yes
all:
Finished. Total time: 0.348s
 

christiebunny

Senior Member
Dec 25, 2012
168
29
Google Pixel 6 Pro
Finally bit the bullet and updated to 10, from 9 (I know twrp doesn't work for 11)-- I see several versions of twrp 3.5 for 10, and all of them fastboot, although every once in a while i need to do it twice, the first time touch doesn't work.

My problem is, I can't get any of the zips to stick, they all trigger a boot loop after flashing properly to both slots.

Anyone know what I'm doing wrong?
 
Last edited:

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,964
7,244
Finally bit the bullet and updated to 10, from 9 (I know twrp doesn't work for 11)-- I see several versions of twrp 3.5 for 10, and all of them fastboot, although every once in a while i need to do it twice, the first time touch doesn't work.

My problem is, I can't get any of the zips to stick, they all trigger a boot loop after flashing properly to both slots.

Anyone know what I'm doing wrong?
If you use the repack ramdisk option does that work? Can you pull any logs through ADB?
 

CosmicDan

Senior Member
Jun 19, 2009
5,906
7,744
36
Sydney
Xiaomi Poco X3 Pro
A problem I'm having is installing on a fresh device, twrp _never_ loads, just sits on splash screen. I am wondering if the img file is not compiled with a LZMA supported kernel and that is what the twrp devs are saying on the crosshatch page. I found this guide for LZMA and this guide for compiling twrp so maybe something can be put together.
Iirc, TWRP booted for me if I had an erased userdata - but as soon as it was formatted (by booting a ROM for example), TWRP would freeze.

It could be getting stuck on decryption.

Is this TWRP build set to use system vold for mounting?

I also remember being in a situation where if I "formatted" userdata while in TWRP, then tried to boot stock A11, ROM would not boot and instead show me a new "Your data is corrupt, factory reset needed" type message that I've not seen on devices before the Pixel. And upon letting the ROM factory reset, TWRP goes back into a broken state.

This TWRP is also built with f2fs support, right? since our userdata is now f2fs instead of ext4? That should be working automatically afaik, it's just a kernel support thing....?

EDIT: Sorry for getting everyone exciting about my GSI recovery project; it's a little beyond my time/effort capability at the moment - fully focused on other projects (which will have Android versions). Priorities change, sorry 😓

I might have time to try and help get TWRP working, but I ended up buying EXKM so I can flash ZIP's in my ROM.... Still, a nandroid backup capability would be nice...
 
Last edited:

CosmicDan

Senior Member
Jun 19, 2009
5,906
7,744
36
Sydney
Xiaomi Poco X3 Pro
UPDATE: I really want this fix - https://gerrit.twrp.me/c/android_system_core/+/4226 - so I can use fastbootd with custom kernels (stock kernel is garbage on crosshatch) so I'm going to try and get TWRP for Android 11 built and working. Just had to setup WSL2 again in Win11.

Actually, bigbiff has already started an A11 tree here - https://github.com/TeamWin/android_device_google_crosshatch/tree/android-11 - only two days ago. Will try to build that with minimal TWRP tree, see how far he's gotten. Probably in the middle of testing or maybe looking for testers.

UPDATE2: Got it compiling and booting with some minimal changes, but it can't mount data - doesn't even try. Probably fixable by using system vold; we need a system installed anyway for TWRP to work for touch drivers.
 
Last edited:

CosmicDan

Senior Member
Jun 19, 2009
5,906
7,744
36
Sydney
Xiaomi Poco X3 Pro
Here is my fork of TWRP device tree for crosshatch and Android 11: https://github.com/cosmicdan/android_device_google_crosshatch

EDIT: Obviously I give permission to TWRP maintainers to take anything I do and put it into the official tree, I don't "own" any of this work :p

Dev only! Compile yourself! Just follow the guide at https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp and manually clone the device tree before doing any lunch command. Also note the device prefix is not twrp_ but aosp_ in this new tree.

Please dont ask for an image, its in active development so its way easier for you to just pull my changes from the DT - I will push every fix ASAP, so keep an eye on it if you're interested and able to compile stuff if you want to contribute or get my updates ASAP. Also note that it uses prebuilt kernel image so it should be possible to compile on a low-end system/VM/WSL setup (as long as you limit make with -j to not get OOM error on compile).

Follow official TWRP install docs to flash, if you want. I.e. (1) hotboot the boot image; (2) push boot image to device; (3) Flash image in TWRP with option "Recovery Ramdisk", will flash to both boot_a and boot_b.

NOT WORKING:
- Cannot mount data
- Touch screen (need to manually insmod some ko's from vendor like the android-10 tree does, literally automating this now)

UNTESTED:
- Fastbootd

I'm working on this today and tomorrow, got a long weekend here in Oz - yay! But anyway, it boots - TWRP for Android 11 seems to be coming along nicely.

Ultimate goal is to create a TWRP that can obviously mount data, but if not possible then it should at least be able to do everything else - even doing a backup of data should be OK here, backing up to a USB-OTH disk of course since we have no other storage.

My main goal is to just get fastbootd working, so I can flash GSI's and custom kernels and such without juggling all the crap on a PC like I currently do. Stay tuned for an update in the next day or two.

UPDATE/IMPORTANT:
I forgot to mention that for some reason, on latest firmware at least, you need to flash insecure vbmeta *before you boot or flash a new boot.img, EVERY time*. Just do the usual: fastboot --disable-verification --disable-verity --slot all flash vbmeta vbmeta.img
 
Last edited:

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,964
7,244
Here is my fork of TWRP device tree for crosshatch and Android 11: https://github.com/cosmicdan/android_device_google_crosshatch

EDIT: Obviously I give permission to TWRP maintainers to take anything I do and put it into the official tree, I don't "own" any of this work :p

Dev only! Compile yourself! Just follow the guide at https://github.com/minimal-manifest-twrp/platform_manifest_twrp_aosp and manually clone the device tree before doing any lunch command. Also note the device prefix is not twrp_ but aosp_ in this new tree.

Please dont ask for an image, its in active development so its way easier for you to just pull my changes from the DT - I will push every fix ASAP, so keep an eye on it if you're interested and able to compile stuff if you want to contribute or get my updates ASAP. Also note that it uses prebuilt kernel image so it should be possible to compile on a low-end system/VM/WSL setup (as long as you limit make with -j to not get OOM error on compile).

Follow official TWRP install docs to flash, if you want. I.e. (1) hotboot the boot image; (2) push boot image to device; (3) Flash image in TWRP with option "Recovery Ramdisk", will flash to both boot_a and boot_b.

NOT WORKING:
- Cannot mount data
- Touch screen (need to manually insmod some ko's from vendor like the android-10 tree does, literally automating this now)

UNTESTED:
- Fastbootd

I'm working on this today and tomorrow, got a long weekend here in Oz - yay! But anyway, it boots - TWRP for Android 11 seems to be coming along nicely.

Ultimate goal is to create a TWRP that can obviously mount data, but if not possible then it should at least be able to do everything else - even doing a backup of data should be OK here, backing up to a USB-OTH disk of course since we have no other storage.

My main goal is to just get fastbootd working, so I can flash GSI's and custom kernels and such without juggling all the crap on a PC like I currently do. Stay tuned for an update in the next day or two.

UPDATE/IMPORTANT:
I forgot to mention that for some reason, on latest firmware at least, you need to flash insecure vbmeta *before you boot or flash a new boot.img, EVERY time*. Just do the usual: fastboot --disable-verification --disable-verity --slot all flash vbmeta vbmeta.img
FWIW I am working on an official version now.
 

CosmicDan

Senior Member
Jun 19, 2009
5,906
7,744
36
Sydney
Xiaomi Poco X3 Pro
FWIW I am working on an official version now.
Awesome, yeah I figured as much - I forked your branch which is only two days old!

I'm really super keen to get it working though, I don't mind doing parallel work - you know the "official" rules better than I do, I'm just happy to help.

So take a look at my fork for some tips if you like, I made a push recently.

EDIT: Nevermind the following rant. Things started being predictable and sane now that I'm using android-11.0.0_r46 tag for dependencies (latest October 2021 update is built against r46).
Recent findings, and some questions for you if you don't mind:
- Is it a requirement (or even possible?) to have SELinux enforcing under Recovery? I've been trying to get that working for stock kernel compat (obviously can't add permissive to commandline) but now I'm wondering if it we should just call setenforce 0 early - is that enough? I did notice the permissive.sh script but I have't investigated when/where that's called yet.
- I was talking to flex and he said he thinks it's practically impossible to "fastboot boot" a modified stock kernel; you need some kernel hacks to get it to mark as a successful boot. Is this something TWRP can fix, or does everyone build TWRP with a custom zImage (like I'm already doing)?
- I removed some prebuilts in the tree and added some required dependencies. Namely missing sepolicy for pixel and the included kernel modules for touch. Do you know where those touch modules came from? Are they source-built from CAF maybe? Using the modules from crosshatch-kernel instead like I do seems to work fine, regardless of kernel I'm using. Not a big deal, but I'm curious if there's better/newer blobs compared to crosshatch-kernel prebuilts from android11-release branch.

Anyway, take a look at recent commits: the commit messages should be descriptive enough for you to decide if anything is interesting or not: https://github.com/cosmicdan/android_device_google_crosshatch/commits/android-11

If you could take a look at these two commits, I believe they're both important:

The immediate two problems I can see are:
- Data not being mounted (I might take a look at that)
- Fastbootd not working (no USB device). I noticed you did a lot of the work for that in TWRP so you'll probably figure that out before I do :)

Thanks for your work!

EDIT: Just to be clear, I'm more than happy for you to re-author my changes as your own - no stress or drama here, it's not my original code or anything lol all I want is a working TWRP :p
 
Last edited:

Top Liked Posts

  • There are no posts matching your filters.
  • 97
    ADB does not work! On the Pixel 3XL, TWRP takes a while to boot up. Be patient, it will boot!

    Note, I don't own a Pixel 3 XL, just the regular Pixel 3 (blueline). I personally won't be able to fix ADB. If you have some talent with init scripts and fixing ADB, feel free to work on it and submit a patch.

    MTP does not work in TWRP on the Pixel 3 and will not work until we have time to update the TWRP MTP implementation. You will either have to transfer files while in Android or use a USB OTG cable and a thumb drive.

    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.

    The zip install method installs TWRP to both slots.

    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. Copy the zip to your device. 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. If you are using a lockscreen pin/pattern/password and do not get prompted to enter your passord, reboot to the bootloader and try again. Go to install and browse to the zip and install the zip. If you are currently rooted, you will need to reflash the stock boot image before installing TWRP. After installing the stock boot image, follow the instructions for installing TWRP. Once TWRP is installed, you will need to reflash root.

    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.

    3.2.3-0: Initial release for the Pixel 3 devices
    3.2.3-1: Fix touch when TWRP is installed on the 3 XL

    Pixel 3:
    https://twrp.me/google/googlepixel3.html
    https://dl.twrp.me/blueline/

    Pixel 3 XL:
    https://twrp.me/google/googlepixel3xl.html
    https://dl.twrp.me/crosshatch/
    60
    FYI, I was able to get decrypt working on the Pixel 4 yesterday. You can follow my code commits at my github https://github.com/bigbiff

    When I am done with flame and coral, I will try to update Pixel 3 XL. I don't have blueline/Pixel 3 so I will need testing for that.

    My patchsets might take a few months to go into the official mainline. We are anticipating having one release for all existing devices on the android-9.0 branch for TWRP. I am hoping to have SAR and multi-user encryption patches for this release.

    Currently the android-10.0 branch is a WIP. It was enough to get flame booting a GUI and hopes that other people will test their devices out. My encryption, super and apex patchsets are based on android-10.0.

    I anticipate not doing any more backwards compatibility for android-10.0 branch. We will have to come up with a decent release scheme for any device that isn't compiling under android-10 trees. For now I anticipate cherry-picking patches from android-9.0 to android-10.0 for features and bugs.
    33
    Hello, I have been able to fix touch in TWRP by loading the correct kernel modules on init. I uploaded 3.2.3-1 to https://twrp.me

    Please let me know if you encounter any issues. I am currently looking at why the dwc3 controller doesn't seem to initialize properly when fastbooting TWRP. This is the reason adb doesn't work in fastbooted TWRP.
    28
    @Dees_Troy and other TWRP Devs: please do check this thread https://forum.xda-developers.com/pixel-3-xl/how-to/android-10-sensors-bug-t3964904.

    Implementing TWRP to use the /persist partition to store logs and caches can cause major issues. Essentially, this partition is only 40MB in size and the logs (for those who make nandroid backups, in particular) can run larger than 20MB, thereby corrupting the factory calibration and configuration files on Pixel phones. Suggestion would be to not write to this partition at all, if possible - or to put a check to clear log files if they exceed a certain date or size.

    Related bug report was filed by someone here: https://github.com/TeamWin/Team-Win-Recovery-Project/issues/1506

    I am working on having the target log compressed in the stored partition such as persist to reduce the amount of space it takes. I am close to pushing a patchset to gerrit.
    23
    Currently we are still targeting Android 9 for the time being. I might release some test builds for crosshatch soon.