• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

TWRP 3.5.2-11 for Sunfish[Testing]

Search This thread

Zaxx32

Senior Member
Mar 23, 2019
215
36
Morgantown
Moto G5 Plus
Moto G7
Jeez! Is it too much to for a MASSIVE co. like Google to at least let a minuscule number of PAYING CUSTOMERS aka Pixel owners have a little sandbox to play in with our coveted lil toys?!? I mean, what good is no hassle bootloader unlocking if there's F-all you can do afterwords?? It's not like they'll loose money by letting us play...in fact it's good way to help insure customer loyalty as well!! Let the other guys work for it...Pixel owners should get thrown a bone damn it!! Js... /end rant
 
  • Like
Reactions: rhewins2268

JohnC

Senior Member
May 5, 2007
572
117
Amazon Fire TV
Google Pixel 4a
Could you please point me to that mod?
There were a bunch of things I looked into, and I did get this working, but it was a while ago so my final notes are not in order. But I plan on returning to this again soon and work out exactly what I did and incorporate it in my daily driver.

But hopefully the below info will help figure out what I did.

From what I remember, I had to use Android Image Kitchen to decompile this TWRP image, then make some modifications to the recovery.fstab and twrp.flags file (in the \ramdisk\system\etc folder (attached), then recompile back into an image and install it.

NOTE: I made this mod to the original version of TWRP posted for A10 in the OP, so I don't know if this will work with any newer version posted in the OP.

For some reason I copied the below notes from one of the below links because I think they were relevant to this mod:

•Restoring works only with -> Settings -> Use rm -rf instead of formatting
Apr 9, 2021 see if that param in the flags file will do this for just this partition <----- My personal note
•Backup Internal Storage -> to Internal Storage
•does not show backup size / wrong size
(Settings - Disable free space check before backup)
Apr 9, 2021 I think this wont fix the wrong size, but will allow backup to destination it thinks is too small <---- My personal note
•Progress bar does not work (or does it just not go to 100% because backup size wrong?) <----- My personal note
•Internal Storage not proper unmounted when unmounting data
*** Apr 9, 2021 is this something I need to be concerned about <---- My personal note
•TWRP shows errors in log (E:Unhandled flag 'bind')
•TWRP shows errors in log when successfully mounted (Failed to mount '/sdcard0')
•does not work with busybox v1.22 bionic (TWRP default)
•does not work with toybox

Here are some links that might be related to this mod that I jotted down as I was researching this issue:

 

Attachments

  • twrp.zip
    1.1 KB · Views: 12
  • Like
Reactions: nor-ric

JohnC

Senior Member
May 5, 2007
572
117
Amazon Fire TV
Google Pixel 4a
  • Like
Reactions: nor-ric

aIecxs

Senior Member
Feb 17, 2016
1,107
341
gitlab.com
Could you please point me to that mod?

There were a bunch of things I looked into, and I did get this working, but it was a while ago so my final notes are not in order. But I plan on returning to this again soon and work out exactly what I did and incorporate it in my daily driver.

But hopefully the below info will help figure out what I did.

From what I remember, I had to use Android Image Kitchen to decompile this TWRP image, then make some modifications to the recovery.fstab and twrp.flags file (in the \ramdisk\system\etc folder (attached), then recompile back into an image and install it.

NOTE: I made this mod to the original version of TWRP posted for A10 in the OP, so I don't know if this will work with any newer version posted in the OP.

For some reason I copied the below notes from one of the below links because I think they were relevant to this mod:

•Restoring works only with -> Settings -> Use rm -rf instead of formatting
Apr 9, 2021 see if that param in the flags file will do this for just this partition <----- My personal note
•Backup Internal Storage -> to Internal Storage
•does not show backup size / wrong size
(Settings - Disable free space check before backup)
Apr 9, 2021 I think this wont fix the wrong size, but will allow backup to destination it thinks is too small <---- My personal note
•Progress bar does not work (or does it just not go to 100% because backup size wrong?) <----- My personal note
•Internal Storage not proper unmounted when unmounting data
*** Apr 9, 2021 is this something I need to be concerned about <---- My personal note
•TWRP shows errors in log (E:Unhandled flag 'bind')
•TWRP shows errors in log when successfully mounted (Failed to mount '/sdcard0')
•does not work with busybox v1.22 bionic (TWRP default)
•does not work with toybox

Here are some links that might be related to this mod that I jotted down as I was researching this issue:

https://forum.xda-developers.com/t/...ll-backup-internal-storage-bull-v1-6.3831217/
https://forum.xda-developers.com/t/...kup-internal-storage-o-backup-option.3941108/
https://github.com/TeamWin/android_device_xiaomi_beryllium/blob/android-9.0/recovery.fstab
https://forum.xda-developers.com/t/dev-how-to-compile-twrp-touch-recovery.1943625/
https://github.com/kdrag0n/tipatch

Basically all it needs is one single entry in fstab. It is a bind mount of /sdcard into any other mount point (like /storage) that makes TWRP think it is regular partition (which is not, it is /data/media/0 part of userdata partition)
 

amphi66

Senior Member
Dec 17, 2010
1,056
323
PacNW
Basically all it needs is one single entry in fstab. It is a bind mount of /sdcard into any other mount point (like /storage) that makes TWRP think it is regular partition (which is not, it is /data/media/0 part of userdata partition)
So lots of options throughout this thread .. .. is there a step-by-step summary for those of us new to Sunfish?
 

DiamondJohn

Recognized Contributor
Aug 31, 2013
5,600
5,384
Sydney
I built and test TWRP for stock ROM A10 and A11 version.
I didn't test it on custom ROMs.

I would like to test it on latest version, but my pixel4a dosen't have enough storage changing firmware from stock to custom.

Can anyone upload recovery.log?
Can anyone test TWRP test5 build for august FW?
Sorry for taking so long on getting around to upload a requested log.

I had a boot failure on stock July ROM (with Magisk and some associated mods). It caught me off guard (is there any other way....), so I gave the TWRP a go. I used the "live boot"method ie (after renaming the image file)
fastboot boot twrp.img
I did not flash it permanently, and the error of the user above makes me feel confident that that is not why it failed.

It failed to backup, with error 255. I *think* they were possibly before I un-encrypted, but could of been either way for either one or both or none.

What I was able to do was, un-encrypt, connect via ADB, and then pull all my data onto my windows PC. Which would of been a god-send last time, as the failure to boot meant I lost a few photos.

I hope the logs help.
 

Attachments

  • 1970-12-07--20-56-46_RQ3A210705001.zip
    20 KB · Views: 2
Last edited:

DiamondJohn

Recognized Contributor
Aug 31, 2013
5,600
5,384
Sydney
nikamura Oh... two more things.

1. I was backing up to a usb flash drive
2. Because I flashed it via adb over a USB cable, when it rebooted, I had to quickly plug in the flash drive for it to be recognized. I am pretty sure on previous devices with TWRP, I could plug the flash drive after it had booted.
 
Last edited:

DiamondJohn

Recognized Contributor
Aug 31, 2013
5,600
5,384
Sydney
Sorry for taking so long on getting around to upload a requested log.

OI had a boot failure on stock July ROM (with Magisk and some associated mods). It caught me off guard (is there any other way....), so I gave the TWRP a go. I used the "live boot"method ie (after renaming the image file)
fastboot boot twrp.img
I did not flash it permanently, and the error of the user above makes me feel confident that that is not why it failed.

It failed to backup, with error 255. I *think* they were possibly before I un-encrypted, but could of been either way for either one or both or none.

What I was able to do was, un-encrypt, connect via ADB, and then pull all my data onto my windows PC. Which would of been a god-send last time, as the failure to boot meant I lost a few photos.

I hope the logs help.

This error pertains to the parallel apps or multi user ID. If you are not sure if you have parallel apps running on your phone, you can do a quick check by going into your Root browser and look in these locations.

/storage/emulated
/data/system/
data/system_ce/
data/system_de/
data/misc/
data/misc_ce/
data/misc_de/
data/user/
data/user_ce/
data/user_de/

If you see any folder named 999 then you have parallel apps enabled on your device. TWRP in it's current form will not allow you to create a backup or restore a backup with parallel apps enabled.


As I previously mentioned in this thread, if you have parallel apps installed or logged into multiple gmail accounts on your device, a error 255 will occur.
I only have a single account in my phone, and I checked the above folders to be sure, and the 999 folder was not present. I still got a 255 error.
 

JohnC

Senior Member
May 5, 2007
572
117
Amazon Fire TV
Google Pixel 4a
There was a bug in the A10 version of this in which when you boot into TWRP recovery, it did not read the date/time correctly from the device.

So, when you tried to do a backup with "auto name" enabled, the date/time it used was in 1970. So, it made it hard to know which backups were done when because it always defaulted to 1970.

Can someone check to see if this date/time bug still exists in the newer 3.5.x builds of this TWRP?
 
  • Haha
Reactions: rhewins2268

zman519

Senior Member
Oct 27, 2010
2,230
253
the Land of Beer & Cheese
As I previously mentioned in this thread, if you have parallel apps installed or logged into multiple gmail accounts on your device, a error 255 will occur.

Removed one of the gmail accounts and still got the same 255 error.

I only have a single account in my phone, and I checked the above folders to be sure, and the 999 folder was not present. I still got a 255 error.

I checked all the folders and do not have any 999 folders.
 
  • Like
Reactions: mangokm40

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Sorry, I missed previous "recovery.log"

    Thank you for testing.
    I don't know why "Digest Error" has occurred.
    No!!! Please don't apologize to us. We appreciate your work on this. Thank you very much.

    To be clear, you missed nothing. My English was poor. I meant, I attached the recovery.log with the error to the message about the error AFTER you asked me to do it. I thought it would make it easier to distinguish from the new recover.log file. I'm sorry I created a confusion about the timing.
    You did nothing wrong.

    If I get a few hours, I will test a restore. It's just that I need to have everything ready, in case I have to reinstall from scratch. :)
    3
    I built and test TWRP for stock ROM A10 and A11 version.
    I didn't test it on custom ROMs.

    I would like to test it on latest version, but my pixel4a dosen't have enough storage changing firmware from stock ROM to custom ROM.

    Can anyone test TWRP test6 build?

    https://drive.google.com/file/d/1mB73pX_0UQQA4PNPvqBBWqSZ6TixZfho/view?usp=sharing
    3
    Thanks for the info. That is what I thought, but when nikamura said in a recent post "I built and test TWRP for stock ROM A10 and A11 version." it seemed to suggest that he might have "recently" rebuilt the A10 version (because his post was from the other day).

    But when I checked, the A10 file in the OP didn't look like it was updated, so that made me think maybe the latest build he did recently post might work on A10 (if TWRP was not OS dependent), hence my question for clarification.

    So, the end result is that I will need to wait for an A10 version to be built using the newer 3.5.2-11 version of TWRP.

    I’m sorry if I caused a misunderstanding.
    I'm building TWRP for A11 version now.

    I'll build TWRP for A10 new version, if I have time.
    1
    I'm on LOS18.1 08-12-2021 & Lineage recovery 08-12-2021. I've no custom kernel. I've no GApps. Magisk was not installed during this test.

    I used "fastboot boot test5.img" and booted successfully to TWRP.

    However, I also got the 255 error.
    I don't have the 999 folders. I attached a screenshot showing the "multiple users" setting is off.

    I've attached the recovery.log, in case it help @nikamura in any way.
    It's possible but unlikely that some parallel apps could go in folders other than 999. There are no parallel apps installed on your device? Parallel apps would also be referred to as clone apps which are apps that clone another. Basically you could clone any app with a cloner and log into two different accounts. This would cause problems. If this is not the case than it would need to be addressed with the dev for a fix.
    1
    I built and test TWRP for stock ROM A10 and A11 version.
    I didn't test it on custom ROMs.

    I would like to test it on latest version, but my pixel4a dosen't have enough storage changing firmware from stock ROM to custom ROM.

    Can anyone test TWRP test6 build?

    https://drive.google.com/file/d/1mB73pX_0UQQA4PNPvqBBWqSZ6TixZfho/view?usp=sharing
    Booted. Installed. Took a backup. Did not try to restore. Seems to work fine though.
    Kernel - Blu_spark r117
    Magisk v23
    LSPosed v153
  • 17
    [RECOVERY] TWRP 3.5.2-11 - TeamWin Recovery Project




    Introduction:

    Team Win Recovery Project or TWRP for short, is a custom recovery built with ease of use and customization in mind. We started from the ground up by taking AOSP recovery and loading it with the standard recovery options, then added a lot of our own features. It's a fully touch driven user interface , no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.

    Key Features:

    Touchscreen driven with real buttons and drag-to-scroll
    XML-based GUI that allows full customization of the layout true theming!
    Settings are saved to the sdcard and persist through reboots
    Ability to choose which partitions to back up and which to restore
    Ability to choose to compress backups now with pigz (multi-core processor support for faster compression times)
    Onscreen keyboard
    Easy selection of internal/external storage

    In addition to the above new features, TWRP features a scripting engine that allows an app to send commands to the recovery for the recovery to perform during startup. We call this scripting engine OpenRecoveryScript. This engine will be put to use immediately in the GooManager app. GooManager will be able to install recoveries automatically for most supported devices. The app will also let you choose to install multiple zips from within Android, wipe, and run a backup.

    We are looking for other talented developers, themers, and device maintainers if they are interested in helping with a free, open source project.

    Source Code:

    sunfish Device Config: https://github.com/tnakamur/android_device_google_sunfish


    DOWNLOAD:
    Hello, this is a test build for sunfish users.

    It has decryption working, touch, adb and backup and restore seems to work. Super partition volumes can be mounted, and the super partition can be backed up.

    Android11 FW
    test6
    https://drive.google.com/file/d/1mB73pX_0UQQA4PNPvqBBWqSZ6TixZfho/view?usp=sharing
    I built it with September firmware.
    I tested it with September firmware.
    It needs custom kernel with LZMA ramdisk support.

    test5
    https://drive.google.com/file/d/1dabH0e0xkgZOldmnoWD8ZrvPV-IXGUf-/view?usp=sharing
    I built it with August firmware.
    I tested it with August firmware.
    It needs custom kernel with LZMA ramdisk support.

    test3
    https://drive.google.com/file/d/1xhyIrLohcVY3xKHCeBoFAUzCmfBupibk/view?usp=sharing
    I built it with June firmware.
    I tested it with June firmware.
    It needs custom kernel with LZMA ramdisk support.
    I built my custom kernel, and link is below.
    https://drive.google.com/file/d/1e8xFI5SuR8ty5X6R8WXVqrKLDOxprJcF/view?usp=sharing
    Maybe, some other custom kernel works fine.

    test2
    https://drive.google.com/file/d/1t0VOZK2XlyxvC8a_o9XWI7ETy6XMS6bT/view?usp=sharing
    I fix repack ramdisk problem.
    It works 'Install Recovery Ramdisk'.
    It needs custom kernel with LZMA ramdisk support.
    I built my custom kernel, and link is below.
    https://drive.google.com/file/d/1e8xFI5SuR8ty5X6R8WXVqrKLDOxprJcF/view?usp=sharing
    Maybe, some other custom kernel works fine.

    test1
    https://drive.google.com/file/d/1EJhdSTbstkjVqx3YaowC-glWD6kJCN9Q/view?usp=sharing
    It's tested FW version RQ1A.RQ1A.210205.004(Feb FW).
    I don't test any other FW version.
    It doesn't work 'Install Recovery Ramdisk'. It's only for fastboot mode.
    I'm working fixing it and build TWRP with June FW.

    Andriod10 FW https://drive.google.com/file/d/1PZaU9PpYmdcAHlyi0zhNwEGnBsAHDW_E/view?usp=sharing
    It's tested both FW version QD4A.200805.001 and QD4A.200805.003.
    And my custom kernel is OK too.

    What to backup
    * super
    * data
    * boot

    What to restore
    * super
    * data
    * boot

    Repacking TWRP into Boot partition
    To repack TWRP into the boot partition to override stock recovery when rebooting to recovery, perform the following steps
    1. adb push <latest_twrp_boot.img> /sdcard/
    2. reboot to bootloader and fastboot latest boot.img of TWRP
    3. Go to Install
    4. Touch Install Image
    5. Select your TWRP boot.img from /sdcard
    6. Install recovery ramdisk
    7. Swipe to confirm flash
    8. Reboot to recovery and android to verify installation
    9. Reinstall magisk, if you want

    Credit and Thanks
    @bigbiff - his big work for TWRP
    @HolyAngel - I refer his kernel commit
    @wrongway213 - I refer his kernel commit, too

    If you like my work, donations are always welcome.
    Don't forget to hit thanks and rate the thread nicely, it's free:)
    12
    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.
    9
    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
    8
    I built TWRP for android11 test3 build with June firmware.
    There is link at OP.

    I tested it with android11 FW(RQ3A.210605.005 Jun 2021).
    7
    To install TWRP, you need LZMA support kernel.
    My custom kernel is here
    https://drive.google.com/file/d/1nuXc88t0Iokc0ha-AicOtZEUeGCGwQ-R/view?usp=sharing