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

[RECOVERY][UNOFFICIAL] TWRP for Galaxy A40

Search This thread

bartsam

Senior Member
Apr 14, 2007
59
3
Alright' I think the issue is solved: after all action to have root, it was necessary to wipe again cache,dalvik,internal but without system. Then just restart and yet another done automatically and: voila :)
Many thanks for provided procedure, files and inspiration ;)

Moreover - it's worth to note - this root is persistent and doesn't disappear after shutdown.

Regards!
BartSam.
 

GerryDM

New member
May 1, 2013
4
0
PERFECT ! WORKS excellent now. I'm writing this small noob-friendly tutorial so people can follow, I hope it's fool proof.

Step 0: Prereq
Download all the zip files from the main page on your phone and put them in the external SD card.

How to enable developer
Goto settings -> About Phone -> Software Information -> Tap "build number" 5 times

Enable OEM unlocking
Go back to Settings -> Developer options -> Enable "Oem unlocking" (if you do not see this option OR its grayed out try to connect your phone to internet, or follow this https://forum.xda-developers.com/ga...-to-skip-oem-lock-waiting-7-days-100-t3823361)

Note: Enabling OEM unlock here does not mean your OEM is unlocked! This switch only allows you to unlock it..Also enable USB debugging.

Turn off your phone.

Next: hold UP + Power until you will see a green screen. It must say "Hold long up to OEM/bootloader unlock." Follow those steps, to unlock it.
Congrats, now your OEM is unlocked. Turn off your phone.

Install TWRP
Hold UP + Power again. In the screen select "wipe data (factory reset). Then select Turn off Phone (should be one of the lower options)

While phone is off, hold UP + DOWN volume and attach USB cable to your phone. It should go into download mode.

In Odin, put the TWRP_A40 image in AP
Un-tick Auto reboot in the options tab.

Remove usb cable.

Tricky part: hold 7 seconds down+power. As soon as screen goes black hold UP + power!
Now you should be in TWRP!!

Once inside TWRP
Flash all the zip files you downloaded to your SD card
Go back to main menu, select reboot -> Recovery. Then reboot normally.

Enjoy =) Android must now boot up normally.

So I followed the instructions above, but I can't seem to get it to actually boot into TWRP, the phone just keeps on rebooting (unless I press UP+DOWN with USB plugged in to get back into download). Odin always indicates it flashed successfully. I have uploaded photos here: https://imgur.com/a/JrdnV23

Any hints? Thanks!
 
Last edited:
Jun 16, 2019
11
0
Your help is highly appreciated: I just tried to update to the new Magisk version on my rooted A40. Now it's stuck in boot-loop. Is there any possibility to get access to my data? I am running AGS1 firmware (July 2019 patch). Thanks in advance!
 

eddaredevil

Senior Member
Sep 16, 2008
69
1
Won't boot

Hi,
I installed TWRP without a problem. Used the multidisabler and then tried to install a Lingeaos ROM (GSI). Seems to works too.
But it won't boot the ROM. Whatever I try, even different versions and yes I'm using the right one (a/b?). It seems that flashing the ROM goes to fast maybe, its done in 20 seconds. No log, just a message that it is succesfull. I've got the latest stock image. Could that be the problem?
I installed Magisk too, and flashed it after installing the ROM and before installing.. but no effect. It wont boot. Restoring to stock works (thank god). Someone got an idea what to do next? Thanks!
 

toshibashi

Senior Member
Mar 29, 2007
157
11
So I followed the instructions above, but I can't seem to get it to actually boot into TWRP, the phone just keeps on rebooting (unless I press UP+DOWN with USB plugged in to get back into download). Odin always indicates it flashed successfully. I have uploaded photos here: https://imgur.com/a/JrdnV23

Any hints? Thanks!

I'm in the same situation. Did you find a solution?
 

ew75

New member
Nov 30, 2020
1
0
After i followed this tutorial, my phone is in a startup loop with the message "the phone is not running samsung official software". So, i flashed it to twrp but i am not able to startup in twrp. Can anyone please help me ?
 

welpitwentwrong

New member
Jul 30, 2021
3
0
Hi, can you please help me? I flashed the twrp file and my phone is stuck in a restart loop. OK while writing now its stuck in the samsung galaxy a40 secured by knox logo screen. When i try key combos, it goes to the restart loop again (it doesn't vibrate while doing so).
 

welpitwentwrong

New member
Jul 30, 2021
3
0
So i managed to get into download mode after being stock in restart loop by holding off button. When screen got black, i plugged my phone into my pc and pressed volume up and down buttons. It worked. I am a genius.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    Team Win Recovery Project 3.3.1

    https%3A%2F%2Fwww.maketecheasier.com%2Fassets%2Fuploads%2F2019%2F01%2Ftwrp-featured.jpg

    Exynos ONLY.
    In NO way it is compatible with Snapdragon variants including but not limited to American(U/A/T/P/V), Chinese(0/8/6), Hong Kong(0), Japanese(SC-*), Canadian(W) variants.


    Special Notes:
    1. DON'T FORGET TO ENABLE "OEM UNLOCK" (located in Developers options).
    2. KNOX will be tripped once you flashed custom binaries to your phone.
    (Your warranty may be voided. However this may not affect you if your country forces Samsung to provide hardware warranty regardless of software status.)
    3. Samsung Firmware OTA (aka System Updates) will no longer work once you flashed custom binaries.
    (You can flash custom ROMs if you want to keep the OS up-to-date.)
    4. All apps that use KNOX like Samsung pay, Secure Folder and maybe more will no more work


    Download: A40(Exynos variant - A405F)

    TWRP

    A40 MultiDisabler

    DM-VerityDisabler&ForceEncrypt

    GSI_MTP_Enabler

    Sources:

    TWRP


    Guide:

    1. Go to developer settings and enable OEM unlocking
    2. Reboot the device into download mode
    3. Follow instructions in download mode to UNLOCK your bootloader
    4. This will wipe your data partition so beware , boot phone to system and let it connect to internet after bootloader unlock.
    5. Reboot into download mode and FLASH included TWRP tar file
    6. Boot into twrp
    7. Format Internal storage in TWRP
    8. Flash the multidisabler zip *Copy this to your SDCARD before wiping internal etc* this is for disabling all checks ( HUGE thanks to @geiti94)
    9. Make sure you are rooted with latest Magisk otherwise you will lose twrp
    Bugs:

    - USB OTG mount for the moment

    [/YOUTUBE]​

    NOTE: I don't own the device myself , but i do have A305F which is pretty similar to this device so building should be fairly similar

    Thanks to @DerGraf1997 for testing blindly for me
    6
    PERFECT ! WORKS excellent now. I'm writing this small noob-friendly tutorial so people can follow, I hope it's fool proof.

    Step 0: Prereq
    Download all the zip files from the main page on your phone and put them in the external SD card.

    How to enable developer
    Goto settings -> About Phone -> Software Information -> Tap "build number" 5 times

    Enable OEM unlocking
    Go back to Settings -> Developer options -> Enable "Oem unlocking" (if you do not see this option OR its grayed out try to connect your phone to internet, or follow this https://forum.xda-developers.com/ga...-to-skip-oem-lock-waiting-7-days-100-t3823361)

    Note: Enabling OEM unlock here does not mean your OEM is unlocked! This switch only allows you to unlock it..Also enable USB debugging.

    Turn off your phone.

    Next: hold UP + Power until you will see a green screen. It must say "Hold long up to OEM/bootloader unlock." Follow those steps, to unlock it.
    Congrats, now your OEM is unlocked. Turn off your phone.

    Install TWRP
    Hold UP + Power again. In the screen select "wipe data (factory reset). Then select Turn off Phone (should be one of the lower options)

    While phone is off, hold UP + DOWN volume and attach USB cable to your phone. It should go into download mode.

    In Odin, put the TWRP_A40 image in AP
    Un-tick Auto reboot in the options tab.

    Remove usb cable.

    Tricky part: hold 7 seconds down+power. As soon as screen goes black hold UP + power!
    Now you should be in TWRP!!

    Once inside TWRP
    Flash all the zip files you downloaded to your SD card
    Go back to main menu, select reboot -> Recovery. Then reboot normally.

    Enjoy =) Android must now boot up normally.
    5
    Twrp updated 3.3.1-2
    - Fixed MTP for GSI roms included GSI_MTP_PATCH.zip to get it working on Gsi properly
    - For data backup to work , flash whole samsung firmware with odin , flash twrp and flash DM-Verity , force encryption fix linked in OP
    Dont flash Multidisabler if you want data backup to work.
    4
    Telegram:

    https://t.me/GalaxyA2019


    Changelog:

    22.09.2019

    - Fixed MTP for GSI roms
    included also GSI_MTP_PATCH.zip to get it working on Gsi properly
    - For data backup to work , flash whole samsung firmware with odin , flash twrp and flash DM-Verity , force encryption fix linked in OP .Dont flash Multidisabler if you want data backup to work

    17.09.2019

    - Based on latest kernel sources available ASE4
    - Initial Release



    More instructions & differences between disablers

    1. If you intend to flash twrp only & keep OneUi intact
    Flash A40 multidisabler after flashing twrp, this will disable all samsung checks
    Note : You will have to wipe your internal storage to get encryption fixed

    2. If you plan on flashing some rom that has security checks disabled like GSI or custom roms. Then just flash twrp & flash Dmverity fix after rom. (data backup will only work with this)
    Note: If you flash multidisabler and later on wish to flash gsi & dm verity . Your data partition wont backup in twrp.
    3
    As from screenshot our partition is a only hope that's helps
    Use A/B .

    Follow the link for more information
    Link to Phh

    PS. Working GSIs on A30/A40 right now are

    Lineage OS 16.0 build by AndyVan
    Havoc OS GSI
    Phh Aosp 9/10

    More maybe. But these are the most stable ones.