Development [RECOVERY][UNOFFICIAL] TWRP for barbet

Search This thread

TheSayaMan

Senior Member
Sep 12, 2016
1,379
655
OnePlus 9 Pro
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..
That's because you didn't follow instructions. The post specifically says do not flash twrp, you boot it first then install it in recovery, advanced, and install current twrp there.
 

rspkt

Senior Member
Nov 24, 2012
235
109
Google Pixel 7
Installed on LineageOS and I have to admit the touch response is extremely delayed and TWRP as a whole seems "bogged down" or slower to respond than usual. Not sure what the issue is there outside of maybe because it was installed over LineageOS recovery and not stock? Any ideas?

Also, @TheSayaMan how did you re-root after flashing TWRP. Did you patch the LineageOS recovery? Wouldn't that re-install the LineageOS recovery as well? Any info would be appreciated.
 

nijel8

Senior Member
Dec 24, 2011
2,423
5,657
All over US
Google Pixel 5a
Installed on LineageOS and I have to admit the touch response is extremely delayed and TWRP as a whole seems "bogged down" or slower to respond than usual. Not sure what the issue is there outside of maybe because it was installed over LineageOS recovery and not stock? Any ideas?

Also, @TheSayaMan how did you re-root after flashing TWRP. Did you patch the LineageOS recovery? Wouldn't that re-install the LineageOS recovery as well? Any info would be appreciated.
Does this happens if fastbooted or installed or both?
Looks like vibrator service can't start on your device which causes touchscreen slow responsiveness or rather recovery waits for vibrator service on touch events and eventualy times out. I suppose you don't have the vibrator haptics working, do you?
The only reason I can think of is LineageOS kernel is missing or can't load vibrator related driver.
Boot to recovery, connect USB and run these commands in terminal or command prompt:
Code:
adb shell getprop vibrator.haptics.ready

adb shell ls -p1 /sys/class/leds/vibrator
and post the result.
Also logcat might help...
 
Last edited:

TheSayaMan

Senior Member
Sep 12, 2016
1,379
655
OnePlus 9 Pro
Installed on LineageOS and I have to admit the touch response is extremely delayed and TWRP as a whole seems "bogged down" or slower to respond than usual. Not sure what the issue is there outside of maybe because it was installed over LineageOS recovery and not stock? Any ideas?

Also, @TheSayaMan how did you re-root after flashing TWRP. Did you patch the LineageOS recovery? Wouldn't that re-install the LineageOS recovery as well? Any info would be appreciated.
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.
 
Last edited:
  • Like
Reactions: rspkt

andybones

Retired Forum Moderator / Inactive RD
May 18, 2010
15,088
15,448
Google Pixel 5
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
 

bobpiesz

Member
Nov 24, 2012
34
21
I'm running 11(RD2A 211001.002) and have twrp/magisk successfully installed.

ONE issue however is in regards to haptic feedback.. If I have any vibrate settings enabled in twrp, the UI is delayed by ~5 seconds each touch/key press. With all haptic vibrate settings set to zero in twrp, it's perfectly fine.

To clarify, haptic vibrate feedback works perfectly fine when not in twrp
 

TheSayaMan

Senior Member
Sep 12, 2016
1,379
655
OnePlus 9 Pro
I'm running 11(RD2A 211001.002) and have twrp/magisk successfully installed.

ONE issue however is in regards to haptic feedback.. If I have any vibrate settings enabled in twrp, the UI is delayed by ~5 seconds each touch/key press. With all haptic vibrate settings set to zero in twrp, it's perfectly fine.

To clarify, haptic vibrate feedback works perfectly fine when not in twrp
This twrp works best on Stock 12 or a Custom 11 ROM. I was having issues also along the lines of mounting issues in recovery so I went to a Custom 11 rom and don't have any problems at all.
 

nijel8

Senior Member
Dec 24, 2011
2,423
5,657
All over US
Google Pixel 5a
I'm running 11(RD2A 211001.002) and have twrp/magisk successfully installed.

ONE issue however is in regards to haptic feedback.. If I have any vibrate settings enabled in twrp, the UI is delayed by ~5 seconds each touch/key press. With all haptic vibrate settings set to zero in twrp, it's perfectly fine.

To clarify, haptic vibrate feedback works perfectly fine when not in twrp
See my answer above...
 

bobpiesz

Member
Nov 24, 2012
34
21


Here's my data duuuuuummppp:



Fastbooted ADB output:

Terminal Log - Fastbooted - ADB Commands

**NOTES**
The Following ADB Command Provided Zero Output:

Code:
adb shell getprop vibrator.haptics.ready

Terminal Log - Fastbooted - ADB Commands
Bash:
## WHEN FASTBOOTED:

> root in PIXEL/2022_TWRP/TWRP_IMG
✦ ❯ fastboot boot twrp-3.6.0_11-0-barbet.img

Sending 'boot.img' (98304 KB)                      OKAY [  3.144s]
Booting                                            (bootloader) boot.img missing cmdline or OS version
OKAY [  2.269s]
Finished. Total time: 5.468s


> root in PIXEL/2022_TWRP/TWRP_IMG took 5s
✦ ❯ adb shell getprop vibrator.haptics.ready



> root in PIXEL/2022_TWRP/TWRP_IMG
✦ ❯ adb shell ls -p1 /sys/class/leds/vibrator

activate
brightness
device
duration
max_brightness
power/
state
subsystem
trigger
uevent

Flashed TWRP
Terminal Log - ADB Commands




Flashed TWRP ADB OUTPUT:
Terminal Log - ADB Commands

**NOTES**
The Following ADB Command Provided Zero Output, same as when fastbooted:

Code:
adb shell getprop vibrator.haptics.ready

Flashed TWRP Recovery - ADB Commands
Bash:
## WHEN FASTBOOTED:
root in PIXEL/2022_TWRP/TWRP_IMG 
✦ ❯ adb reboot recovery

root in PIXEL/2022_TWRP/TWRP_IMG 
✦ ❯ adb shell getprop vibrator.haptics.ready


root in PIXEL/2022_TWRP/TWRP_IMG 
✦ ❯ adb shell ls -p1 /sys/class/leds/vibrator
brightness
device
max_brightness
power/
subsystem
trigger
uevent

Various LOGs from logcat/dmesg/recovery are attached as well
 

Attachments

  • TWRP_LOGS.zip
    233.1 KB · Views: 22

nijel8

Senior Member
Dec 24, 2011
2,423
5,657
All over US
Google Pixel 5a
Here's my data duuuuuummppp:
...
If you mount system after boot to flashed twrp does haptics start working?
Also does haptics work when twrp is fastbooted?

This is the reason for vibrator not working:
Code:
02-18 14:41:00.810   688   688 F linker  : CANNOT LINK EXECUTABLE "/system/bin/android.hardware.vibrator-service.barbet": library "[email protected]" not found: needed by /vendor/lib64/libsensorndkbridge.so in namespace (default)
but library "[email protected]" is in /vendor/lib64 but linker can't find it on A11 booted twrp and I don't know why...
 
Last edited:

bobpiesz

Member
Nov 24, 2012
34
21

Haptics does indeed work when fastbooting i.e.:
Bash:
fastboot boot twrp-3.6.0_11-0-barbet.img

..but, even after mounting /system the linker error still persists

I can indeed confirm that /vendor/lib64/libsensorndkbridge.so exists when booted to flashed twrp
 
Last edited:

bobpiesz

Member
Nov 24, 2012
34
21
That's really weird...!?
[email protected] can't just disappear from ramdisk when twrp is flashed...
No idea on a fix...
Just keep haptics disabled then.
Sadly I think there is way more ot this bug..

Flashed TWRP will not save it's settings, so each time I load the flashed twrp recovery, it's as if I never used it before, and have to disable vibration settings. It's also having AVC issue as well...I can't really narrow it down :/
 

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.