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

[RECOVERY][UNOFFICIAL][ROOT] TWRP for Galaxy A70

Search This thread

Grarak

Recognized Developer
Jan 16, 2012
2,799
10,495
Vienna
Team Win Recovery Project 3.x, or TWRP3 for short, is a custom recovery built with ease of use and customization in mind. Its 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.

Code:
[I]#include <std_disclaimer.h>

/*
 * Your warranty is now void.
 *
 * We are not responsible for bricked devices, dead SD cards,
 * thermonuclear war, or you getting fired because the alarm app failed. Please
 * do some research if you have any concerns about features included in this recovery
 * before flashing it! YOU are choosing to make these modifications, and if
 * you point the finger at us for messing up your device, we will laugh at you.
 *
 */[/I]

I’d recommend to read everything in this post, if you care about your expensive phone.

Let’s start with the installation process
  1. If you already unlocked your bootloader, start with step 3.
    If you are already rooted, start with step 4.
    If you already installed a previous version of TWRP, start with step 4.
    If you already have TWRP installed and just want to root, start with step 5.
  2. First you need to unlock your bootloader. You can do so by enabling developer settings first, enable oem unlocking, then shut down your phone, hold volume up and down at the same time and while holding them plugin your charger. Your phone now should show a green screen with instructions to unlock the bootloader. Just follow them and after the unlocking your data should get wiped. After that your device will boot up and land in setup screen. Do not setup anything, just skip as much as possible, because your phone will get wiped again. Enable developer settings and make sure oem unlocking is greyed out and enabled. (If it does not show up, connect to a network first!)
  3. Now you need to overwrite vbmeta partition, so you can flash third party partitions. Download vbmeta.tar then go into download mode on your device. Put vbmeta.tar to AP in Odin, click start. This should finish pretty quickly, so pay attention when your device reboots, because you need to boot into recovery (Hold power and volume up after the screen turns black). When booted into recovery, wipe your data and reboot normally into system. Now you can setup your phone as usual and make sure oem unlocking is still greyed out and enabled!
  4. Time to flash recovery. Download (link is at the end of this post) the latest version as zip and extract it. You should end up with one single file named recovery.img. Pack it as tar with 7zip or any other compression tool you prefer. This packed tar file should only contain recovery.img and nothing else, also make sure the name is still recovery.img, otherwise Odin will refuse to flash it. In Odin put the tar file in AP and simply hit start. Congrats you now have TWRP installed!
  5. (Optional) You might have lost root access by flash TWRP if you followed this standard guide for rooting. If you did lose it and want to gain root access again (you can also root your device with this method, even when you never rooted your device), download the latest Magisk Manager from the canary channel and install the apk to your phone.
    • If you are on stock:
      Push the recovery.img file you just download for TWRP to your phone. Open Magisk Manager and hit install and patch a file. Select recovery.img and Magisk should start the patching process. Once Magisk is done, boot into TWRP. Backup your boot partition first and afterwards go into install and then hit install image on the bottom right of the screen. Select /sdcard/Download/magisk_patched.img and install it to boot. Now reboot and Magisk should work. If you run into issues after this, go into TWRP and restore the boot partition you backed up previously.
    • If you are on an AOSP based rom:
      Reboot to TWRP. Create a backup with boot partition. Reboot back to system, then open Magisk and hit install and patch a file. Locate the TWRP backup folder and look up your backup you just created. Select boot.emmc.win for patching. Once Magisk is done, reboot back to TWRP. Go into install and then hit install image on the bottom right of the screen. Select /sdcard/Download/magisk_patched.img and install it to boot. Now reboot and Magisk should work. If you run into issues after this, go into TWRP and restore the boot partition you backed up previously.

So that was the easy part. The hard part is to completely read these following points!

  • Encryption/Decryption
    Decryption works on this TWRP release, but only partially. That means you have to open the Settings Application first on your phone and disable a feature called strong protection. You can find it in Settings->Biometrics and security>Other security settings. It doesn’t matter when you disable it. Flash TWRP first and disable it, fine. Disable it and flash TWRP afterwards, fine. Never disable it, also fine, TWRP just fails to decrypt your data, but won’t do any harm. When this feature gets turned off, the device will generate a key which doesn't require any authentication for decryption, currently only this allows TWRP to decrypt the data partition successfully. This only applies to stock roms though, if you are using an AOSP based rom, then you don't have to do any of this.
  • Disabling decryption
    Disabling decryption will create many problems. First TWRP will refuse to unmount system partition and thus you might run into problems flashing various zips. So I advise you to not disable decryption. If you still want to disable it you have to open terminal in TWRP and type in "stop servicemanager" everytime you want to unmount the system partition.

Backup and Restore
Because of encryption it's more complicated to backup your data partition.
If you want to backup data you have to make sure TWRP successfully decrypted your internal storage, otherwise you will run into problems backing up.
Restoring is even more complicated. Every time you set up a rom, new crypto keys will be generated and you can't backup these. That means if you want to restore data you have to restore the whole rom first excluding data. Format data partition completely, boot it up, then go back to TWRP and restore data. You will lose your internal storage, so I'd recommend you move important stuff to external storage.

Developers specific details

Credits


Downloads
https://github.com/Grarak/android_device_samsung_a70q-twrp/releases (Also changelog)
Note The download is a zip file, unpack it and you will get the recovery image. To flash it in Odin pack it as tar with 7zip or a compression tool of your liking.
 
Last edited:
Which version do you have?

TWRP version is 3.3.1

actual firmware is A705FNXXU3ASG6_A705FNOXM3ASG6_BTU (july security patch) (United kingdom)

prev. firmware was A705FNXXU1ASE4_A705FNOXM1ASE4_XEF (may security patch) (France)

edit 1 : the ui freeze completly when phone is booted up , had to flash all back

i'm going to flash A705FNXXU1ASD1_A705FNOXM1ASD1_BTU (april security patch) (United kingdom) and see if it boot correctly...

edit 2 : cant flash previous firmware due to 'security reasons' ,i flashed back stock recovery, it doesnt freeze anymore, i guess we will have to wait for a custom kernel :)
 
Last edited:
MTP

FAQ
  • When TWRP can't work with Magisk, then what's the point of this?
    TWRP can work with Magisk, if the firmware you have is compatible. (Read first post).
    But yes, right now there are no reasons to have TWRP installed, but you have to start development somewhere and having a working custom recovery is a pretty good first step.
MTP doesnt work in this build
edit: it work in this build thanks :)
---------- Post added at 09:38 PM ---------- Previous post was at 09:30 PM ----------

cant you use this to flash GSI images and then use magisk? or does that not bypass the boot image problem?

i dont think this build is made for treble roms, so probably not
 
Last edited:
Okay, so can anybody else see if system or system images backup crashes TWRP?

yep , i tried backups yesterday but twrp crash when backing up system.img

---------- Post added at 09:04 AM ---------- Previous post was at 09:01 AM ----------

With July security patch?

i was refering to MTP , the link been fixed, MTP work now , but phone crash after boot up , or just wont boot at all, i were also stuck in prenormal RMM, thats why it wouldnt boot
 
Kernel source A70Q

FAQ
  • When TWRP can't work with Magisk, then what's the point of this?
    TWRP can work with Magisk, if the firmware you have is compatible. (Read first post).
    But yes, right now there are no reasons to have TWRP installed, but you have to start development somewhere and having a working custom recovery is a pretty good first step.

i found kernel sources from there https://github.com/Qiangong2/android_kernel_samsung_a70q , is this the source you worked with?
 

Grarak

Recognized Developer
Jan 16, 2012
2,799
10,495
Vienna
FAQ
  • When TWRP can't work with Magisk, then what's the point of this?
    TWRP can work with Magisk, if the firmware you have is compatible. (Read first post).
    But yes, right now there are no reasons to have TWRP installed, but you have to start development somewhere and having a working custom recovery is a pretty good first step.

i contacted the guys from Samsung Opensource Center for kernel and platform source release, ill see what they say...
 

Top Liked Posts

  • There are no posts matching your filters.
  • 43
    Team Win Recovery Project 3.x, or TWRP3 for short, is a custom recovery built with ease of use and customization in mind. Its 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.

    Code:
    [I]#include <std_disclaimer.h>
    
    /*
     * Your warranty is now void.
     *
     * We are not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this recovery
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at us for messing up your device, we will laugh at you.
     *
     */[/I]

    I’d recommend to read everything in this post, if you care about your expensive phone.

    Let’s start with the installation process
    1. If you already unlocked your bootloader, start with step 3.
      If you are already rooted, start with step 4.
      If you already installed a previous version of TWRP, start with step 4.
      If you already have TWRP installed and just want to root, start with step 5.
    2. First you need to unlock your bootloader. You can do so by enabling developer settings first, enable oem unlocking, then shut down your phone, hold volume up and down at the same time and while holding them plugin your charger. Your phone now should show a green screen with instructions to unlock the bootloader. Just follow them and after the unlocking your data should get wiped. After that your device will boot up and land in setup screen. Do not setup anything, just skip as much as possible, because your phone will get wiped again. Enable developer settings and make sure oem unlocking is greyed out and enabled. (If it does not show up, connect to a network first!)
    3. Now you need to overwrite vbmeta partition, so you can flash third party partitions. Download vbmeta.tar then go into download mode on your device. Put vbmeta.tar to AP in Odin, click start. This should finish pretty quickly, so pay attention when your device reboots, because you need to boot into recovery (Hold power and volume up after the screen turns black). When booted into recovery, wipe your data and reboot normally into system. Now you can setup your phone as usual and make sure oem unlocking is still greyed out and enabled!
    4. Time to flash recovery. Download (link is at the end of this post) the latest version as zip and extract it. You should end up with one single file named recovery.img. Pack it as tar with 7zip or any other compression tool you prefer. This packed tar file should only contain recovery.img and nothing else, also make sure the name is still recovery.img, otherwise Odin will refuse to flash it. In Odin put the tar file in AP and simply hit start. Congrats you now have TWRP installed!
    5. (Optional) You might have lost root access by flash TWRP if you followed this standard guide for rooting. If you did lose it and want to gain root access again (you can also root your device with this method, even when you never rooted your device), download the latest Magisk Manager from the canary channel and install the apk to your phone.
      • If you are on stock:
        Push the recovery.img file you just download for TWRP to your phone. Open Magisk Manager and hit install and patch a file. Select recovery.img and Magisk should start the patching process. Once Magisk is done, boot into TWRP. Backup your boot partition first and afterwards go into install and then hit install image on the bottom right of the screen. Select /sdcard/Download/magisk_patched.img and install it to boot. Now reboot and Magisk should work. If you run into issues after this, go into TWRP and restore the boot partition you backed up previously.
      • If you are on an AOSP based rom:
        Reboot to TWRP. Create a backup with boot partition. Reboot back to system, then open Magisk and hit install and patch a file. Locate the TWRP backup folder and look up your backup you just created. Select boot.emmc.win for patching. Once Magisk is done, reboot back to TWRP. Go into install and then hit install image on the bottom right of the screen. Select /sdcard/Download/magisk_patched.img and install it to boot. Now reboot and Magisk should work. If you run into issues after this, go into TWRP and restore the boot partition you backed up previously.

    So that was the easy part. The hard part is to completely read these following points!

    • Encryption/Decryption
      Decryption works on this TWRP release, but only partially. That means you have to open the Settings Application first on your phone and disable a feature called strong protection. You can find it in Settings->Biometrics and security>Other security settings. It doesn’t matter when you disable it. Flash TWRP first and disable it, fine. Disable it and flash TWRP afterwards, fine. Never disable it, also fine, TWRP just fails to decrypt your data, but won’t do any harm. When this feature gets turned off, the device will generate a key which doesn't require any authentication for decryption, currently only this allows TWRP to decrypt the data partition successfully. This only applies to stock roms though, if you are using an AOSP based rom, then you don't have to do any of this.
    • Disabling decryption
      Disabling decryption will create many problems. First TWRP will refuse to unmount system partition and thus you might run into problems flashing various zips. So I advise you to not disable decryption. If you still want to disable it you have to open terminal in TWRP and type in "stop servicemanager" everytime you want to unmount the system partition.

    Backup and Restore
    Because of encryption it's more complicated to backup your data partition.
    If you want to backup data you have to make sure TWRP successfully decrypted your internal storage, otherwise you will run into problems backing up.
    Restoring is even more complicated. Every time you set up a rom, new crypto keys will be generated and you can't backup these. That means if you want to restore data you have to restore the whole rom first excluding data. Format data partition completely, boot it up, then go back to TWRP and restore data. You will lose your internal storage, so I'd recommend you move important stuff to external storage.

    Developers specific details

    Credits


    Downloads
    https://github.com/Grarak/android_device_samsung_a70q-twrp/releases (Also changelog)
    Note The download is a zip file, unpack it and you will get the recovery image. To flash it in Odin pack it as tar with 7zip or a compression tool of your liking.
    16
    16
    nice work, I'll buy the phone in this 2 days to start some works.
    8
    New release:

    https://github.com/Grarak/android_device_samsung_a70q-twrp/releases/tag/3.3.1-7

    This supports Android 10, but decryption will not work
    5
    New version released.
    Should fix decryption on AOSP based ROMs.