[RECOVERY] - TeamWin Recovery Project [BLUELINE] [OFFICIAL]

Search This thread

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,935
7,178
The boot partition is shared by both slots, or each has a separate boot partition? It seems two recoveries are resident on the device.
Yes, I mispoke. There is a boot_a and boot_b partition, so twrp would always need to be injected into the active ramdisk, lineage usually places it's own recovery in the ramdisk by flashing their own boot image.
 

brainchild

Member
Aug 29, 2014
20
0
Yes, I mispoke. There is a boot_a and boot_b partition, so twrp would always need to be injected into the active ramdisk, lineage usually places it's own recovery in the ramdisk by flashing their own boot image.

What is the difference between Flash Current TWRP and installing to ramdisk. Presently, I see an option only for the latter, whereas previously I had seen both.
 

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,935
7,178
What is the difference between Flash Current TWRP and installing to ramdisk. Presently, I see an option only for the latter, whereas previously I had seen both.
They are the same action, but Flash Current TWRP will automatically install the version of TWRP you are running currently after you install a zip without any action from you.
 

brainchild

Member
Aug 29, 2014
20
0
They are the same action, but Flash Current TWRP will automatically install the version of TWRP you are running currently after you install a zip without any action from you.
Do you mean that Flash Current makes no immediate modification, but installs a hook lasting the rest of a session for some modification action, the same action that would occur immediately upon invocation of the menu item for installing to ramdisk?
 

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,935
7,178
Do you mean that Flash Current makes no immediate modification, but installs a hook lasting the rest of a session for some modification action, the same action that would occur immediately upon invocation of the menu item for installing to ramdisk?
It modifies the ramdisk of the current slot, by reinjecting the ramdisk files into the boot image so that TWRP will persist when you boot to recovery mode. If you install the recovery image via the install menu, it will do the same thing. Flash Current will only activate after installing a zip provided the option is selected..
 

brainchild

Member
Aug 29, 2014
20
0
It modifies the ramdisk of the current slot, by reinjecting the ramdisk files into the boot image so that TWRP will persist when you boot to recovery mode. If you install the recovery image via the install menu, it will do the same thing. Flash Current will only activate after installing a zip provided the option is selected..
How long is the effect of selecting Flash Current? Is it only a modification of the current TWRP session, or is it somehow persistent?

More broadly, is there any preferred method for using TWRP and LineageOS with OTA updates on the same device?
 
Last edited:

altrgeek

New member
May 16, 2020
4
4
Is there any possiblity to switch between ROMs using TWRP without formatting internal storage? Yes, I can backup my internal storage before flashing a ROM but it's an extra step for most of us. Any suggestions?
 

bigbiff

Senior Recognized Developer
Jun 8, 2010
6,935
7,178
How long is the effect of selecting Flash Current? Is it only a modification of the current TWRP session, or is it somehow persistent?

More broadly, is there any preferred method for using TWRP and LineageOS with OTA updates on the same device?
It would last until something rebuilds the boot ramdisk, such as update_engine updating boot during an installation. Lineage is always going to overwrite boot, so you always have to reinstall TWRP.
 
  • Like
Reactions: dcarvil

brainchild

Member
Aug 29, 2014
20
0
It would last until something rebuilds the boot ramdisk, such as update_engine updating boot during an installation. Lineage is always going to overwrite boot, so you always have to reinstall TWRP.
Then I am still confused about the intended difference between the two options. It seems that both immediately install the recovery to the boot partition (only for some reason one of them apparently only works on slot A, and removes itself from the menu when the recovery is already detected in that slot).
 

b8842dc0

Senior Member
Nov 11, 2015
171
56
How does Flash Current TWRP compare to the TWRP A/B retention script?


I've been using the TWRP A/B retention script for a couple of years now and it works very well.
 

Captain_Throwback

Recognized Developer
How does Flash Current TWRP compare to the TWRP A/B retention script?


I've been using the TWRP A/B retention script for a couple of years now and it works very well.
The Retention Script is designed for flashing after an OTA has been installed, and will flash TWRP to both slots (including the just updated inactive slot), provided the current boot ramdisk already has TWRP installed. It's really made for use with Magisk and for flashing while booted into Android.

The "Flash Current TWRP" feature allows the currently fastboot booted TWRP to be installed to both slots of the device. Obviously this has to be done while in TWRP, and it doesn't matter whether some version of TWRP is currently installed. This also means that no zip or image file needs to be copied to the device for TWRP to be installed after it's fastboot booted.
 
  • Like
Reactions: b8842dc0

brainchild

Member
Aug 29, 2014
20
0
The "Flash Current TWRP" feature allows the currently fastboot booted TWRP to be installed to both slots of the device.
So the difference between this command and the ramdisk one is whether the installed image is read from storage, versus applied from the running session?

I am still struggling to understand the difference between the two commands (as well as why one, but not the other, has disappeared from the menu).
 

Captain_Throwback

Recognized Developer
So the difference between this command and the ramdisk one is whether the installed image is read from storage, versus applied from the running session?

I am still struggling to understand the difference between the two commands (as well as why one, but not the other, has disappeared from the menu).
If you're referring to the difference between the Flash Current TWRP option and the Install Recovery Ramdisk option, then yes, the former uses the loaded ramdisk, while the latter requires you to provide an image from which to extract and install the ramdisk.

Neither option should be getting removed from the list, afaik. Have you tried scrolling the list to confirm whether it's still there? There are quite a few options there, and they can't all be seen without scrolling.
 

brainchild

Member
Aug 29, 2014
20
0
Neither option should be getting removed from the list, afaik. Have you tried scrolling the list to confirm whether it's still there? There are quite a few options there, and they can't all be seen without scrolling.
Yes. I just booted to the image by loading it through fastboot. The Advanced menu includes four boxes, labeled Copy Log, ADB Sideload, Terminal, and File Manager.

Beneath the boxes is a scrolling list, of the following items:

- Theme Options
- Partition SD Card
- Fix Contents
- Install Recovery Ramdisk
- Install Kernel
- Fix Recovery Bootloop
- Install TWRP App

Nothing else shows on this page.
 

Captain_Throwback

Recognized Developer
Yes. I just booted to the image by loading it through fastboot. The Advanced menu includes four boxes, labeled Copy Log, ADB Sideload, Terminal, and File Manager.

Beneath the boxes is a scrolling list, of the following items:

- Theme Options
- Partition SD Card
- Fix Contents
- Install Recovery Ramdisk
- Install Kernel
- Fix Recovery Bootloop
- Install TWRP App

Nothing else shows on this page.
Standard TWRP doesn't have a "Theme Options" item there. Are you using a custom theme? If so, you need to remove it to see the current options.
 

brainchild

Member
Aug 29, 2014
20
0
Standard TWRP doesn't have a "Theme Options" item there. Are you using a custom theme? If so, you need to remove it to see the current options.
I installed a theme, which as I understand, was simply copying a file to the data partition. The booted image is the identical file to the one supplied in the first post of this thread.

If you wish, I can test again without the theme, but my observations were the same from before I installed a theme.

I doubt the theme is the issue, but I would try a further test, if you specify one.
 

Captain_Throwback

Recognized Developer
I installed a theme, which as I understand, was simply copying a file to the data partition. The booted image is the identical file to the one supplied in the first post of this thread.

If you wish, I can test again without the theme, but my observations were the same from before I installed a theme.

I doubt the theme is the issue, but I would try a further test, if you specify one.
The theme is the problem, like I already said. Themes need to be updated to support new options added to TWRP.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 1
    That's the only way that restore will work, otherwise you'll get locked out of the device. That has always been the case. It may be unfortunate, but Android security makes that step necessary.
    For anyone who cares, the technical reason is that without removing the pin, we cannot have zygote rebuild it's inode cache on start when files are restored under new inodes. Otherwise zygote will crash right away.
    1
    Getting ready for the LineageOS 12.1 upgrade, I wanted to do a full nandroid including internal storage. I found this https://forum.xda-developers.com/t/...kup-internal-storage-o-backup-option.3941108/ and saw the note that "These instructions are obsolete starting with TWRP v3.4.0-0+" but when I go to the backup screen I don't see an option for "Internal Storage".
    Is this an oversight or is it not supported on blueline?
    That's not an oversight; it's not supported in any official TWRP.

    See here: https://twrp.me/faq/backupexclusions.html

    And also here: https://github.com/TeamWin/Team-Win-Recovery-Project/issues/276
    1
    I tried booting this TWRP in a blueline with Android 10 and was unsuccessful (error about the buffer being small). Can you backport this to Android 10? I am asking because that's the last version where restore works as-is (without removing pin). I use a crosshatch version of TWRP that works in Android 10 but doesn't have mtp enabled. I would love to have a TWRP for blueline that has mtp working and does not require pin removal (for Android 10). Thank you.
    No. There will not be a version for Android 10.
  • 9
    [RECOVERY] TWRP 3.6.0_11-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. 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 official builds.

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

    Hello, this is a test build for crosshatch users.

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

    I am opening this thread to replace @Dees_Troy's thread with his blessing.

    http://twrp.me
    2
    @bigbiff - It seems that the fstab entry for `/usb_otg` is incorrect for blueline.

    Line 7 on this file should read `/dev/block/sdg1` - which is what I see in `dmesg` when connecting an OTG USB device.


    If I jump into the terminal, then try:
    Code:
    # mount /dev/block/sdg1 /usb_otg

    Then I am able to use my USB OTG drive to back up images to via TWRP backup etc etc.

    Seems like it should be a simple fix unless crosshatch requires to use `/dev/block/sda1`...

    Big thanks to @bigbiff for fixing USB OTG for blueline and Android 12.

    He grabbed a ton of logs from me, and the result is the attached files.

    If you have a PIN and/or fingerprints, you'll need to remove them and select "Swipe" as your security method in Android before rebooting to recovery. After that, you'll be able to mount the USB OTG device and use it for backups / restores or installing packages.
    1
    I tried to boot to this image on my bootloader-unlocked Pixel 3, but the operation failed.

    With the device connected and the bootloader active, I ran the following command:

    Code:
    $ fastboot boot twrp-3.6.0_11-0-blueline.img
    Sending 'boot.img' (65536 KB)                      OKAY [  1.797s]
    Booting                                            FAILED (remote: 'Error verifying the received boot.img: Buffer Too Small')
    fastboot: error: Command failed

    I had just performed a factory reset (from
    blueline-qq3a.200805.001). Flashing a blank vbmeta.img to disable verification did not resolve the error.
    See this post, and the subsequent posts.

    1
    Can this version of TWRP handle encrypted phones? (ones with lock screen passwords) I've been poking around the internet finding conflicting information.
    It can handle Android 11 encryption. I don't believe Android 12 encryption works yet.
    1
    I tried booting this TWRP in a blueline with Android 10 and was unsuccessful (error about the buffer being small). Can you backport this to Android 10? I am asking because that's the last version where restore works as-is (without removing pin). I use a crosshatch version of TWRP that works in Android 10 but doesn't have mtp enabled. I would love to have a TWRP for blueline that has mtp working and does not require pin removal (for Android 10). Thank you.
    No. There will not be a version for Android 10.