Development [RECOVERY][UNOFFICIAL] TWRP for barbet

Search This thread

nijel8

Senior Member
Dec 24, 2011
2,423
5,655
All over US
Google Pixel 5a
Download:
twrp-3.6.0_11-0-barbet.img

This is my unofficial built, fully working with A12 with some remarks:

- internal storage decryption works but you have to set Screen lock to None or Swipe in Android Settings -> Security. If Pattern, Pin or Password are set storage decryption and MTP will not work until TeamWin fixes the code for A12.

- nandroid backup/restore works but you might need to reboot Android a couple of times after restore until dalvic-cache fully rebuilds. Until then you will see black home screen background instead of your wallpaper... Just keep restarting until everything is back to normal.

- DON'T MESS(WIPE) WITH METADATA in TWRP Advanced Wipe!!! If you do you can't boot Android until formatting data = factory reset.

DO NOT FLASH THIS TWRP IMAGE IN FASTBOOT!!!
Install TWRP form within itself after boot with fastboot.


Not tested on A11 so might have some bugs...
recovery.log and logcat are helpful.

To boot it connect USB and run these commands:

Code:
adb reboot bootloader

fastboot boot twrp-3.6.0_11-0-barbet.img

While in recovery you can install it permanently on the boot partitions by going to Advanced and pressing Flash current TWRP. Root will be lost so after that you have to reboot to bootloader again, fastboot boot your magisk patched boot.img, direct patch boot with magisk to get root back and reboot. Done. You have root and TWRP on device. To get to TWRP:
Code:
adb reboot recovery

Big thanks to @bigbiff, @Captain_Throwback and the entire TeamWin for their work!

Source code:

device tree - my GitHub
recovery - TeamWin GitHub
 
Last edited:

nijel8

Senior Member
Dec 24, 2011
2,423
5,655
All over US
Google Pixel 5a
Thanks for the log.
What ROM are you running? Lineage? Looks like the kernel is the problem:
Code:
Linux version 4.19.110-dirty ([email protected]) (Android (6443078 based on r383902)
clang version 11.0.1 (https://android.googlesource.com/toolchain/llvm-project
b397f81060ce6d701042b782172ed13bee898b79)) #1 SMP PREEMPT Wed Feb 24 18:49:40 EST 2021
and the touchscreen drivers doesn't load:
Code:
modprobe: LoadWithAliases was unable to load ftm5.ko
modprobe: LoadWithAliases was unable to load sec_touch
Sorry, can't do anything about it... Use recovery with fastboot boot.
Connection to a computer works only until unplugged.
Confirmed, will look at it... As a workaround go to Mount and toggle disable/enable MTP and it'll work again.
MTP doesn't work even if not encrypted. Stalls during copy. No error.
Must be the kernel again... Works fine here.
 
Thanks for the log.
What ROM are you running? Lineage? Looks like the kernel is the problem:
Code:
Linux version 4.19.110-dirty ([email protected]) (Android (6443078 based on r383902)
clang version 11.0.1 (https://android.googlesource.com/toolchain/llvm-project
b397f81060ce6d701042b782172ed13bee898b79)) #1 SMP PREEMPT Wed Feb 24 18:49:40 EST 2021
I hadn't even flashed Lineage yet.
 

nijel8

Senior Member
Dec 24, 2011
2,423
5,655
All over US
Google Pixel 5a
I hadn't even flashed Lineage yet.
Is the recovery flashed or fastbooted? Also you did not answer what android you have.
Log shows recovery is flashed and trying to load touchscreen drivers from vendor partition. If it is fastbooted then something else is wrong, device reports normal reboot to recovery, not boot from bootloader and touchscreen drivers are messed up.
I will need recovery.log too.
 
Is the recovery flashed or fastbooted? Also you did not answer what android you have.
Log shows recovery is flashed and trying to load touchscreen drivers from vendor partition. If it is fastbooted then something else is wrong, device reports normal reboot to recovery, not boot from bootloader and touchscreen drivers are messed up.
I will need recovery.log too.
That was just your TWRP flashed to boot via fastboot, then reboot-bootloader then select recovery. that was with latest A11 build freshly flashed.
 

InfoSecREDD

New member
Jan 13, 2022
2
0
Google Pixel 5a
I also couldn't get the touchscreen to work. I flashed using:

Code:
adb reboot bootloader
fastboot flash boot_b twrp-3.6.0_11-0-barbet.img
fastboot flash boot_a twrp-3.6.0_11-0-barbet.img

I was softlocked to the Recovery partition until I flashed back..
 

kingofnice

Senior Member
Jun 2, 2012
1,177
928
I also couldn't get the touchscreen to work. I flashed using:

Code:
adb reboot bootloader
fastboot flash boot_b twrp-3.6.0_11-0-barbet.img
fastboot flash boot_a twrp-3.6.0_11-0-barbet.img

I was softlocked to the Recovery partition until I flashed back.

fastboot boot ≠ fastboot flash boot

Am I missing something here?

Boot TWRP and then flash TWRP through it's advanced settings.
 

V0latyle

Forum Moderator
Staff member
fastboot boot ≠ fastboot flash boot

Am I missing something here?

Boot TWRP and then flash TWRP through it's advanced settings.
Yep, you're on track.

fastboot flash boot overwrites the /boot partition, including the kernel, so all you'd be able to boot to would be TWRP. To fix this, download the factory image and reflash the stock boot image.
fastboot boot twrp.img forces a "live" boot of TWRP via USB; to install it, you'd have to patch the boot image through TWRP settings.
 

kingofnice

Senior Member
Jun 2, 2012
1,177
928
Yep, you're on track.

fastboot flash boot overwrites the /boot partition, including the kernel, so all you'd be able to boot to would be TWRP. To fix this, download the factory image and reflash the stock boot image.
fastboot boot twrp.img forces a "live" boot of TWRP via USB; to install it, you'd have to patch the boot image through TWRP settings.
It wouldn't be the likely culprit of the touchscreen issues being brought up, would it?
 

InfoSecREDD

New member
Jan 13, 2022
2
0
Google Pixel 5a
Yep, you're on track.

fastboot flash boot overwrites the /boot partition, including the kernel, so all you'd be able to boot to would be TWRP. To fix this, download the factory image and reflash the stock boot image.
fastboot boot twrp.img forces a "live" boot of TWRP via USB; to install it, you'd have to patch the boot image through TWRP settings.
Yeah forgot and ran the install script I usually use to install my boot.img.. But Idk about it stopping touchscreen inputs tho.
 

nijel8

Senior Member
Dec 24, 2011
2,423
5,655
All over US
Google Pixel 5a
It wouldn't be the likely culprit of the touchscreen issues being brought up, would it?
Yeah forgot and ran the install script I usually use to install my boot.img.. But Idk about it stopping touchscreen inputs tho.
Touchscreen wasn't working b/c A11 bootloader reports different bootreason value(guessing...) than A12(on what I test) and the script that loads the appropriate touchscreen drivers for the booted kernel got confused...
Fixed it... Now script reads booted kernel cmdline which has special twrp fastboot portion and should never load wrong drivers.
 
Last edited:

izaacze

New member
Jan 15, 2022
1
1
My pin worked on Android 11 when loading the twrp image, I was able to install the recovery and do the Direct install with magisk after loading my master_boot.img (magisk patched img from stock barbet).

I haven't done much else yet. But this looks good so far!
 
  • Like
Reactions: nijel8

Top Liked Posts

  • There are no posts matching your filters.
  • 21
    Download:
    twrp-3.6.0_11-0-barbet.img

    This is my unofficial built, fully working with A12 with some remarks:

    - internal storage decryption works but you have to set Screen lock to None or Swipe in Android Settings -> Security. If Pattern, Pin or Password are set storage decryption and MTP will not work until TeamWin fixes the code for A12.

    - nandroid backup/restore works but you might need to reboot Android a couple of times after restore until dalvic-cache fully rebuilds. Until then you will see black home screen background instead of your wallpaper... Just keep restarting until everything is back to normal.

    - DON'T MESS(WIPE) WITH METADATA in TWRP Advanced Wipe!!! If you do you can't boot Android until formatting data = factory reset.

    DO NOT FLASH THIS TWRP IMAGE IN FASTBOOT!!!
    Install TWRP form within itself after boot with fastboot.


    Not tested on A11 so might have some bugs...
    recovery.log and logcat are helpful.

    To boot it connect USB and run these commands:

    Code:
    adb reboot bootloader
    
    fastboot boot twrp-3.6.0_11-0-barbet.img

    While in recovery you can install it permanently on the boot partitions by going to Advanced and pressing Flash current TWRP. Root will be lost so after that you have to reboot to bootloader again, fastboot boot your magisk patched boot.img, direct patch boot with magisk to get root back and reboot. Done. You have root and TWRP on device. To get to TWRP:
    Code:
    adb reboot recovery

    Big thanks to @bigbiff, @Captain_Throwback and the entire TeamWin for their work!

    Source code:

    device tree - my GitHub
    recovery - TeamWin GitHub
    5
    Updated... Please redownload from OP

    - fixed touchscreen not working on A11 ROMs(not tested but should work), please report...
    - fixed MTP on reconnecting

    Do not flash twrp-3.6.0_11-0-barbet.img!!! Install it form its Advanced meny ones booted with fastboot...
    5
    Updated... Please redownload from OP

    - fixed vibration haptics
    - synced with latest TeamWin code

    Do not flash twrp-3.6.0_11-0-barbet.img!!! Install it form its Advanced menu ones booted with fastboot...
    4
    I changed magisk.apk to magisk.zip and flashed it in twrp to get root back. Patching is not necessary. Also I have been able to update lineage and keep twrp. This is what I do. I download the new lineage update and place it on my otg cable, you can keep it in your internal storage if you don't have a security lock pin/pattern etc. I use a OTG cable because I have a security pattern set and it won't encrypt internal storage. I also have the gapps on there as well and the twrp.img file. If you update through the built in updater on the phone it will overwrite twrp with lineageos recovery and you will have to boot twrp again in the bootloader. My way, you won't ever have to do that. So what you do next is reboot to twrp and go to install, select the lineage update file and flash it. It will automatically flash it in the opposite slot which is what you want it to do. When it's done, twrp will be overwritten but all you have to do is select install again, and choose install image and select your twrp.img file and install it as recovery ramdisk. This will get twrp back because it was overwritten with LineageOS recovery when you installed update. Now install gapps, it will install them on the current slot which is what you want. After it's done, reboot to system and wait for the update to complete. Then reboot to recovery and flash magisk.zip in recovery again to get rooted again. Reboot to system and your done. If you update this way, don't forget the part to install twrp.img as recovery ramdisk before rebooting the phone otherwise twrp will be gone and you will have to boot it in bootloader again.
    You can actually just flash the Magisk.apk in TWRP now, no need to change to Magisk.zip
    4
    It wouldn't be the likely culprit of the touchscreen issues being brought up, would it?
    Yeah forgot and ran the install script I usually use to install my boot.img.. But Idk about it stopping touchscreen inputs tho.
    Touchscreen wasn't working b/c A11 bootloader reports different bootreason value(guessing...) than A12(on what I test) and the script that loads the appropriate touchscreen drivers for the booted kernel got confused...
    Fixed it... Now script reads booted kernel cmdline which has special twrp fastboot portion and should never load wrong drivers.