Disclaimer:

Team Win strives to provide a quality product.  However, it is your decision to install our software on your device.  Team Win takes no responsibility for any damage that may occur from installing or using TWRP.

Status:

Support Status: Current

Maintainer: Hakalle

Code Name: a31

Device Tree / files

Support topic on Zulip

It is recommended that you root your device using Magisk by HuskyDG before you flash TWRP. Download the firmware for your device (e.g. SM-A315G, ZTO), extract the AP and get the files: boot.img.lz4 and vbmeta.img.lz4, compress to a new .tar file, install the mentioned Magisk and do the process with the created .tar file containing only boot and vbmeta. After doing the process in Magisk, copy the file patched by it and send it to your computer, reboot your device to Download (Odin) Mode, open Odin, click AP slot and select the .tar file created by Magisk and flash it (don’t forget to reset the device afterwards, Android will not allow it to boot). And now you can flash TWRP normally without problems. Download Magisk by HuskyDG

This device uses Dynamic Partitions

This means that TWRP will not allow modifications to any of the partitions that make up the Super partition on the stock ROM. All backups and restores will include the full Super partition rather than the individual dynamic partitions.

In order to flash the individual partitions, you will have to boot into fastbootd.

This device uses system-as-root in an A-only partition configuration.

If you intend to root your (a31) device, be advised that Magisk will be installed to the recovery partition, not the usual boot partition. Both TWRP and Magisk-rooted Android boot using the recovery kernel, with the device's hardware keys used to choose between TWRP and Android at boot time.

<p class”text”>You are therefore strongly advised to first root your device with Magisk and then pre-root a TWRP image before flashing it to recovery. The usual path of installing TWRP prior to rooting is problematic on this device, because the Magisk installer does not support installation to recovery from TWRP. Furthermore, prior rooting of the device with Magisk carries the significant advantage of disabling various device protection mechanisms that you will otherwise need to take care of manually.</p>

If you wish to install TWRP without rooting, there are numerous pitfalls to consider. For example, a stock device is protected by Android Verified Boot. This is implemented as a vbmeta partition that contains cryptographic digests for verifying the integrity of boot.img, recovery.img and other partitions/images. Flashing TWRP without first flashing a vbmeta image with verity disabled will render your device unable to boot.

Please bear all of the above in mind when considering the installation methods listed below, and refer to the device's TWRP support thread on XDA for detailed information about installation and the associated hazards. Details of the firmware version(s) with which the current TWRP image's kernel is compatible can be found in the TWRP changelog for this device.

Download Links:

Current and past versions of TWRP can be found at one of the mirrors below:

App Install Method (Requires Root):

Download the Official TWRP App (root required):

Install the app and open it. Agree to the Terms. Select TWRP Flash. Select your device from the device list (a31) and choose a version. The file will download to your Downloads folder. Browse to and select the file. Tap on Flash to Recovery. Find out more about the app here.

TWRP Install (Requires TWRP 2.8.4 or higher already installed):

Download the latest TWRP image file (.img) from the download link and boot TWRP. Go to install and find and select the Images... button. Browse to the image that you downloaded and select it. Choose recovery and swipe to flash.

Odin Install Method (No Root Required):

You will need to download and install Odin on your PC. Once you have Odin installed, download the proper .tar file for your device from the download link above. Power off your device. Turn on your device using the proper key combo to get into download mode and attach the device to your computer via a USB cable. Use the PDA tab or button to browse to and select the tar file that you downloaded and flash the device.

Note many devices will replace your custom recovery automatically during first boot. To prevent this, use Google to find the proper key combo to enter recovery. After typing fastboot reboot, hold the key combo and boot to TWRP. Once TWRP is booted, TWRP will patch the stock ROM to prevent the stock ROM from replacing TWRP. If you don't follow this step, you will have to repeat the install.

dd Install Method (Requires Root):

Download the latest image file (.img) from the download link above. Place it in the root of your /sdcard folder and rename it to twrp.img. Run the following commands via adb shell or a terminal emulator app:

su

dd if=/sdcard/twrp.img of=/dev/block/by-name/recovery

Changelog:

  • Hakalle
    2022-08-14T03:28:33Z
    Merge "a31: Fix mass storage issue" into android-11

  • Hakalle
    2022-08-14T03:28:23Z
    Merge "a31: Build disabled AVB for now" into android-11

  • Hakalle
    2022-08-14T03:27:41Z
    Merge "a31: Drop `avbtool` usage" into android-11

  • Hakalle
    2022-08-12T23:40:39Z
    a31: Fix mass storage issue ADB Sideload isn't working yet, I'm going to fix that later. Signed-off-by: Hakalle Change-Id: I42cf62cce22e6bc80e47cb03cad0058f73a0b85e

  • Hakalle
    2022-08-12T19:32:25Z
    a31: Build disabled AVB for now Signed-off-by: Hakalle Change-Id: If21fd613e38d9476ee0199ead00241c080591396