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

[RECOVERY] TWRP 3.5.0_10-0 - TeamWin Recovery Project [REDFIN] [TESTING]

Search This thread

MrRob0t

Senior Member
Oct 2, 2016
98
57
So from what I'm understanding I can take a full restore of the stock ROM, flash a custom ROM such as Proton, and then when wanted restore back to the stock ROM using the backup I made? Sorry just double checking if what I'm reading is what I'm understanding. Thank you to anyone who answers.
 
So from what I'm understanding I can take a full restore of the stock ROM, flash a custom ROM such as Proton, and then when wanted restore back to the stock ROM using the backup I made? Sorry just double checking if what I'm reading is what I'm understanding. Thank you to anyone who answers.
That is how nandroid used to work, but I'm not sure if anyone has had luck on newer devices.
 
  • Like
Reactions: vandyman
Hi guys, I'm pretty new around here. Can someone please clarify a couple of things for me?

1. Has anyone managed to get backup/restore fully working on their Pixel 5?

2. Does booting TWRP remove root? How do you recover? Just boot TWRP and then re-flash the magisk .img?

3. Will this work with the Proton Kernel I have installed? Will I have to go back to stock or install a different one?

Thanks in advance!
 
Last edited:

vandyman

Senior Member
Jul 30, 2012
420
127
S.Jersey
Google Pixel 5
Hi guys, I'm pretty new around here. Can someone please clarify a couple of things for me?

1. Has anyone managed to get backup/restore fully working on their Pixel 5?

2. Does booting TWRP remove root? How do you recover? Just boot TWRP and then re-flash the magisk .img?

3. Will this work with the Proton Kernel I have installed? Will I have to go back to stock or install a different one?

Thanks in advance!
Please try to read the thread to gain some valuable information.
The first post will at least get you started.
Flashing and modding without the knowledge will get you into trouble.

Answers to your post
1 no
2 no
3 maybe. Try and let us know.
 
Please try to read the thread to gain some valuable information.
The first post will at least get you started.
Flashing and modding without the knowledge will get you into trouble.

Answers to your post
1 no
2 no
3 maybe. Try and let us know.
I already read the entire thread. The reason for question 1 2 3 all came after reading the thread.

Thanks for the information!

Edit: You were wrong. I did lose root.
 
Last edited:
To clarify a couple of things:

Booting TWRP does not modify /boot in of itself, so it won't affect your kernel or root unless you perform an action within TWRP that modifies /boot. And by "booting" I mean this:
Code:
fastboot boot twrp.img
This essentially live-boots the TWRP image on the phone, but does not actually install TWRP.

Installing TWRP on the other hand, as such:
Code:
fastboot flash boot twrp.img
overwrites /boot with the TWRP image - so when your phone boots, it will only boot into TWRP, and to get back into system, you'll have to flash a working boot image.

Root on the Pixel 5 is implemented in the kernel in /boot, either by flashing Magisk to /boot using TWRP, or by flashing a modified boot image. TWRP itself does not have anything to do with root, although as of Android 11, installing TWRP to /boot alongside Magisk on the stock kernel will result in a boot loop.

If you want to install a custom kernel, there are 2 ways to do this:
1. Boot into TWRP and install the kernel via ZIP
2. Flash the kernel boot.img to /boot directly using fastboot

Hope this helps clear things up.
 
  • Like
Reactions: vandyman
To clarify a couple of things:

Booting TWRP does not modify /boot in of itself, so it won't affect your kernel or root unless you perform an action within TWRP that modifies /boot. And by "booting" I mean this:
Code:
fastboot boot twrp.img
This essentially live-boots the TWRP image on the phone, but does not actually install TWRP.

Installing TWRP on the other hand, as such:
Code:
fastboot flash boot twrp.img
overwrites /boot with the TWRP image - so when your phone boots, it will only boot into TWRP, and to get back into system, you'll have to flash a working boot image.

Root on the Pixel 5 is implemented in the kernel in /boot, either by flashing Magisk to /boot using TWRP, or by flashing a modified boot image. TWRP itself does not have anything to do with root, although as of Android 11, installing TWRP to /boot alongside Magisk on the stock kernel will result in a boot loop.

If you want to install a custom kernel, there are 2 ways to do this:
1. Boot into TWRP and install the kernel via ZIP
2. Flash the kernel boot.img to /boot directly using fastboot

Hope this helps clear things up.
Hello V0latyle,

Thank you for information. I did `fastboot boot twrp.img` to boot into TWRP and then I followed the steps to install it to my RAMDisk, hence, losing root.

I already have installed the Proton custom kernel so I feel comfortable doing that. However, I appreciate the information nonetheless.
 

elong7681

Senior Member
May 23, 2015
244
71
40
US
Moto X4
Google Pixel 2 XL
To clarify a couple of things:

Booting TWRP does not modify /boot in of itself, so it won't affect your kernel or root unless you perform an action within TWRP that modifies /boot. And by "booting" I mean this:
Code:
fastboot boot twrp.img
This essentially live-boots the TWRP image on the phone, but does not actually install TWRP.

Installing TWRP on the other hand, as such:
Code:
fastboot flash boot twrp.img
overwrites /boot with the TWRP image - so when your phone boots, it will only boot into TWRP, and to get back into system, you'll have to flash a working boot image.

Root on the Pixel 5 is implemented in the kernel in /boot, either by flashing Magisk to /boot using TWRP, or by flashing a modified boot image. TWRP itself does not have anything to do with root, although as of Android 11, installing TWRP to /boot alongside Magisk on the stock kernel will result in a boot loop.

If you want to install a custom kernel, there are 2 ways to do this:
1. Boot into TWRP and install the kernel via ZIP
2. Flash the kernel boot.img to /boot directly using fastboot

Hope this helps clear things up.
You can install TWRP by selecting Install to Ramdisk from inside the TWRP menu
 
Hello V0latyle,

Thank you for information. I did `fastboot boot twrp.img` to boot into TWRP and then I followed the steps to install it to my RAMDisk, hence, losing root.

I already have installed the Proton custom kernel so I feel comfortable doing that. However, I appreciate the information nonetheless.
You lost root because you installed TWRP to RAMdisk. Just use TWRP to flash things and don't actually install it.

Every month when a new OTA is released, I boot TWRP, install the OTA, reboot the phone, let the update finish, boot TWRP again, and install Magisk.

In your case, once you've flashed Proton, you shouldn't need to use TWRP again until there's an update, then you would just use TWRP to install the kernel and Magisk.
 
Yes, but not if you want working root on Android 11.
How do you remove it if you did it anyway? I lost my root and can't reflash Magisk with TWRP installed. I have my refin .zip downloaded still. Do I just fastboot boot boot.img? Or do I need to reflash it somehow? I don't want to lose any data.

I'm in a PM with someone as well but just waiting for a reply, I just want my root back :(
 
How do you remove it if you did it anyway? I lost my root and can't reflash Magisk with TWRP installed. I have my refin .zip downloaded still. Do I just fastboot boot boot.img? Or do I need to reflash it somehow? I don't want to lose any data.

I'm in a PM with someone as well but just waiting for a reply, I just want my root back :(
The /boot partition being what it is on modern devices, you don't really "remove" something - you just overwrite the partition.

If you're on the stock ROM, then yes, you're on the right track - flash the stock boot image using fastboot
fastboot flash boot boot.img
Then, if you want root, boot TWRP
fastboot boot twrp.img
and install Magisk.

You won't lose data if you mess up /boot.
 

elong7681

Senior Member
May 23, 2015
244
71
40
US
Moto X4
Google Pixel 2 XL
How do you remove it if you did it anyway? I lost my root and can't reflash Magisk with TWRP installed. I have my refin .zip downloaded still. Do I just fastboot boot boot.img? Or do I need to reflash it somehow? I don't want to lose any data.

I'm in a PM with someone as well but just waiting for a reply, I just want my root back :(
Yes, but not if you want working root on Android 11.

Yes, but not if you want working root on Android 11.
@Volatyle that is incorrect once you install it to the ramdisk then reboot recovery you can then flash magisk.apk and you will have permanent root and permanent TWRP recovery because I have both on my Pixel 5
 
@Volatyle that is incorrect once you install it to the ramdisk then reboot recovery you can then flash magisk.apk and you will have permanent root and permanent TWRP recovery because I have both on my Pixel 5
I did not have any luck with both Magisk and TWRP on the stock boot image.
 

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,879
7,091
If people are having backup or restore issues with A11 and the A11 testing TWRP please post logs. I haven't had any issues and many other maintainers are not reporting issues on A11 either.
 
  • Like
Reactions: vandyman

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    You are wrong. And you need learn how it works..
    As far as I can see, you are incorrectly trying to flash TWRP.img as boot partitions with your command fastboot flash boot TWRP.img but of course you can do with your phone anything as you would like.
    This fastboot command was always for flashing a partition such as boot, recovery, system, and so on
    fastboot flash <partition name> <partition file.img>
    As some similar phones with A/B partitions Pixel 5 doesn't have recovery partition. Stock recovery is into boot. The command is flashing whole boot image with a kernel and a ramdisk inside. TWRP is not a boot. TWRP.img has just similar structure as a boot and has own kernel inside for temp booting. That is why you are wrongly able to flash TWRP.img and why after that you have troubles with also flashed TWRP's kernel.

    Only correct ways of flashing perm TWRP are from menu as I mentioned above. They both flash ramdisk with TWRP and do not touch a kernel, stock one or custom one for working touchscreen. You can check and compare stock or customs kernels before and after flashing of TWRP. Use command for extraction boot partition from current slot a or b to image file from booted TWRP, from slot a:
    adb shell "dd if=/dev/block/by-name/boot_a of=/sdcard/boot.img"
    You can unpack images by Android Image Kitchen to see boot.img-kernel and boot.img-ramdisk.cpio.lz4. AIK works perfect for Pixel.
    Also you can unpack TWRP.img and rename recovery.img-ramdisk.cpio to boot.img-ramdisk.cpio and then copy to unpacked boot. Repack correctly boot image with TWRP's ramdisk. Now you can flash new boot image with TWRP as a boot partition by fastboot command:
    fastboot flash boot <new boot image.img>
    This was third variant how to flash perm TWRP.

    There is also fourth way to flash. I gather and use script-installer of TWRP which can be flashed from Install menu of temp TWRP, it works the same.
    Look, I've been doing this since the OG Motorola Droid, I know how it's supposed to be done, I'm aware that flashing TWRP to /boot overwrites the kernel so it must be installed to ramdisk, and I'm saying it never worked for me. You're being more than a little obnoxious; I really don't care all that much because my Pixel works fine and performs exactly as I want it to. While I appreciate the additional information, I don't appreciate someone like you insisting my experience is false.

    Give it a rest.
    2
    Except I'm not wrong. It's clear that my comments have been misunderstood. I'm not responsible for that.

    Because, despite my having explained multiple times that I was doing it correctly, he continued to insist that I was doing it wrong, or that I'm just wrong period. My point was that not everyone has the same experiences, and my experience has been such that I cannot boot with TWRP installed to ramdisk AND Magisk installed to /boot. This has been a known problem ever since the Pixel 2.

    Again, you misunderstood. Go read my post again. I specifically explained what each command does and what the outcome is. If you flash TWRP to /boot, that will be all you have in /boot - no kernel. Therefore, every time your phone tries to boot, it will only boot into TWRP.

    Therefore, the only correct way to get into TWRP (at least the first time) is to live boot it via ADB, at which time you can install it to ramdisk - but only if you're on Android 11, because on the 12 Beta, TWRP just boots to the TWRP logo.

    As far as bricking, as far as I know it's nearly impossible to brick these phones by erasing or flashing a bad image to /boot. You'll just be stuck in bootloader, and the only thing you'd have to do is flash a good boot image.

    If you screw up the bootloader on the other hand...yeah, you're probably screwed, unless you're handy with JTAG and willing to tear your phone apart.
    Again, let's ALL play nice.
    Ok, So you were not wrong (which I never said you were), but rather misunderstood..
    I don't need to go back and re-read your post. I understand the confusion.. It's when I get a PM about that confusion, and then I see another user making a post about it.

    Clearing up the confusion is good though, many times, needed.

    And feedback is also good.
    It works for him and not you.
    Talking it out like adults, though, just may, get us to the root of why it's working for one and not the other.
    Correct, the OG Droid actually had a /recovery partition, as did every other device I used up until I went Google and got the Pixel 2 almost 4 years ago.

    No. That's not what I'm doing, and I've explained in detail multiple times what happens if TWRP is flashed to /boot.
    And I think it's best for others who come into this thread to not have to be confused about the flashing to the boot partition.
    As we know, It should be booted, fastboot boot twrp.img and let's stick to that, otherwise we are approaching off-topic.
    1
    And all @ziand did was give information, after saying you were wrong. And he's within his right to say that you posted incorrect information (nicely), while backing it up, which he did..
    Except I'm not wrong. It's clear that my comments have been misunderstood. I'm not responsible for that.
    However, I'm confused why you're telling him he's being obnoxious and to give it a rest..
    Because, despite my having explained multiple times that I was doing it correctly, he continued to insist that I was doing it wrong, or that I'm just wrong period. My point was that not everyone has the same experiences, and my experience has been such that I cannot boot with TWRP installed to ramdisk AND Magisk installed to /boot. This has been a known problem ever since the Pixel 2.
    And I've been confused myself since this fastboot flash boot twrp.img command was posted.
    I'd really like not to see anyone bricking their devices.
    And I'm not saying flashing twrp.img to the boot partition would brick anything, I don't know for sure, but confusion when flashing the wrong .img to a partition is how it happens.
    Again, you misunderstood. Go read my post again. I specifically explained what each command does and what the outcome is. If you flash TWRP to /boot, that will be all you have in /boot - no kernel. Therefore, every time your phone tries to boot, it will only boot into TWRP.

    Therefore, the only correct way to get into TWRP (at least the first time) is to live boot it via ADB, at which time you can install it to ramdisk - but only if you're on Android 11, because on the 12 Beta, TWRP just boots to the TWRP logo.

    As far as bricking, as far as I know it's nearly impossible to brick these phones by erasing or flashing a bad image to /boot. You'll just be stuck in bootloader, and the only thing you'd have to do is flash a good boot image.

    If you screw up the bootloader on the other hand...yeah, you're probably screwed, unless you're handy with JTAG and willing to tear your phone apart.
    1
    Context matters, though. When I posted that, I was specifically pointing out that it's the wrong thing to do on our devices, as it overwrites /boot. Someone else had mentioned only being able to boot into TWRP, the likely cause of which being that they had done exactly what I described.
    Well it's usually best not to make assumptions, but I see your point here.
    Context absolutely does matter, couldn't agree with you more.
    But you being upset (understandably ofc, and you are always free to report ANY post you wish), I feel this deserved my time spent on doing my best to alleviate any issues.

    Just one of the great things of XDA is the XenForo update.
    And the first time you made the post with the fastboot flash boot twrp.img was post #158 and you can see I actually "Liked" that way back on Jul 21, 2021. (ie I didn't do it today, and trying to say I did it before this discussion).
    The post which I *think* was the root of confusion comes from your post #209 --however, I can't say for certain, but I don't think it really is a matter anymore as I feel it's cleared up, but if not feel free to let me know.

    I appreciate you responding level-headed, and filling me in with the information you did, and why you had responded the way you had.
    This will help someone down the line, and that's how these forums *should* work. Or at least it's how I like to see them go.
    Again, I'm sorry you felt irked. But being an adult about how you respond, makes more of a difference, because had you gotten more upset, responded rudely or worse, then maybe your post would be reported, and I don't want to see that.

    Context contributes to learning. (y)
    1
    Well, I'm 34, so I don't have time to waste getting in online pissing matches.

    Back to the topic at hand:

    As I stated previously, installing TWRP to ramdisk with Magisk installed on the stock kernel always resulted in a boot loop for me. I didn't try this on custom kernels. The reason for this, and I'm heavily paraphrasing here, is something about Magisk on Android 11 made it not play nice with TWRP in ramdisk. Was I the only one with this issue?

    Also, do we know what the issue is with TWRP and Android 12? Is it as simple as needing to be ported over?
  • 55
    [RECOVERY] TWRP 3.5.0_10-0 - 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:

    GitHub - https://github.com/TeamWin/android_bootable_recovery

    Gerrit Instance - http://gerrit.twrp.me

    If you have made your own TWRP build for an unsupported device, please let us know. We might add your build to the list of unofficial builds. Bear in mind that we are working hard to add more devices and we may add your device to our official build list later.

    Device Config: https://github.com/bigbiff/android_device_google_redbull

    Hello, this is a test build for redfin users

    Decryption is working. Touch, adb and flashing magisk works. Repacking works. I am currently working on fastbootd support.

    If others thing don't work, please report the issue and let me know.

    Download here:
    Test9: https://build.twrp.me/test/redfin/twrp-3.5.0-0-test9-redfin.img
    - fix cpu temperature display
    - turn off openaes
    - MTP: fix 100% CPU
    - fix perms for last_log.gz
    - one click flash option to keep twrp when updating boot in recovery - thanks @Nebrassy


    You need to install a kernel with built-in touch drivers such as ElementX-P5.
    First, install ElementX-P5, the use the install ramdisk recovery option in the Install menu to install the TWRP image.


    https://build.twrp.me/test/redfin/twrp-3.5.0-0-test1-redfin.img

    Please ignore the -10 in the version string when fastbooted into TWRP. I am hoping to get the a11 TWRP branch working in a10 trees.

    Test 2: https://build.twrp.me/test/redfin/twrp-3.5.0-0-test2-redfin.img
    Test 3: https://build.twrp.me/test/redfin/twrp-3.5.0-0-test3-redfin.img
    Decryption and backup restore working. Tested with April Firmware.
    Test 4: https://build.twrp.me/test/redfin/twrp-3.5.0-0-test4-redfin.img
    Enable MTP. Fix /sdcard bind mount to /data/media/0
    Test 5: https://build.twrp.me/test/redfin/twrp-3.5.0-0-test5-redfin.img
    Add partitions: misc, boot and persist. Enable repacking into ramdisk. Tested with ElementX-P5.
    Test 6: https://build.twrp.me/test/redfin/twrp-3.5.0-0-test6-redfin.img
    Fix repacking twrp into recovery. You need to install a kernel with built-in touch drivers such as ElementX-P5.
    First, install ElementX-P5, the use the install ramdisk recovery option in the Install menu to install the TWRP image.
    Test 7: https://build.twrp.me/test/redfin/twrp-3.5.0-0-test7-redfin.img
    Fix wiping Titan M chip. Fix decryption hanging on lineage-18.1 when booting TWRP.
    Test 8: https://build.twrp.me/test/redfin/twrp-3.5.0-0-test8-redfin.img
    Fix reboot to recovery from fastbootd.


    http://twrp.me
    23
    Hello all. I was able to get an initial decryption and backup/restore working.

    Here is test2 image: https://build.twrp.me/test/redfin/twrp-3.5.0-0-test2-redfin.img

    Remember this is still fastbootable only. I have to test repacking in the future.

    Currently only decrypts the 12/25/2020 patchlevel. I will try to upload today a version that will continue to work on future and current versions.
    22
    Here is test3, tested with the latest firmware: https://build.twrp.me/test/redfin/twrp-3.5.0-0-test3-redfin.img

    Please let me know what issues you have. I will be working on integrating fscrypt v1 policies so I can port over crosshatch to the aosp11 tree. I will work on repacking afterwards.
    20
    Should I keep crypto disabled or should I try to resolve the fscrypt includes somehow? With crypto disabled to avoid that error, I've got the Google boot splash with the above ADB fix for proper shell access including dmesg and logcat, but it fails to start actual TWRP and the logcat is complaining about missing vintf manifest entries for android.hardware.boot and android.hardware.health

    Edit: I also had to inject the Proton kernel for it to boot, I'm currently using the latest AOSP11 bramble/redbull with your commits cherry-picked like I did earlier with the lineage-18.1 attempt

    I just barely got Fscrypt working with decryption. I am working on fscrypt policy storage now. You can track my progress at the android_bootable_recovery project at https://gerrit.twrp.me
    18
    I posted a link to a test4 image in OP. I enabled MTP and fixed bind mount to /sdcard from /data/media/0.