[RECOVERY][OFFICIAL] TWRP for Galaxy A40 [A405FN]

Search This thread

marcdu30

Senior Member
Oct 2, 2014
265
63
Nîmes
bonjour, j'ai flashé mon A40 sous Android 11 et installé le twrp approprié. Cependant, chaque fois que je restaure des ROM, je constate que je ne peux pas déverrouiller l'écran à l'aide du code PIN. (sans parler du code PIN SIM) Je pense que j'ai raté quelque chose lors de l'installation de TWRP. Je tiens à souligner que ce problème se produit tout le temps lors d'une restauration, quelle que soit la ROM. Une idée ? Merci d'avance
 

SysRoot

New member
Dec 15, 2021
2
0
Hello Guys, I need your help. I tried to flash TWRP on my Samsung Galaxy A40 (Android 11) but it failed. After some searching i found this post and tried to falsh it again. This time around it worked and TWRP was isntalled, but unfortunately it wiped the whole android installation and i could only boot into TWRP recovery. Therefore I decided to reinstall the Firmware and start the installation of TWRP again. Unforunately Odin know tells me "FAIL!" when i try to falsh TWRP again :( I hope one of you can help me. IM using the latest Samsung FIrmware from sammobile for Germany (DBT) if that does matter.

Name of the currently flashed firmware file from sammobile is: "AP_A405FNXXU4CUJ2_CL22811938_QB45046759_REV00_user_low_ship_meta_OS11.tar.md5". So it should be the UJ2 TWRP file 1 comment above me.

Okay Update: After some retries it worked again, but im still only able to boot into twrp recovery and not into the system. So my question is still how can I install TWRP without wiping my android installation as system?
 

Attachments

  • TWRP Odin Flash.jpg
    TWRP Odin Flash.jpg
    114.8 KB · Views: 180
Last edited:

Lenny Bard

Senior Member
Jun 24, 2016
271
1,054
Did you follow all the steps in the first post under "If you are starting from scratch:" ?
 

SysRoot

New member
Dec 15, 2021
2
0
Did you follow all the steps in the first post under "If you are starting from scratch:" ?
yep. but the android installation is still gone as a whole, normally only your data should be gone but not the system itself right?

EDIT: after a reinstall of the firmware it only shows 16GB of memory isntead of 64GB. Does somebody know how to fix this?
 
Last edited:

tuncay8872

Member
Jan 26, 2021
7
0
Hi

"1. Go to Developer Settings and enable "OEM Unlock" option " is it essential please ?

Because is not possible for me.

Thanks
 

agjgeertsema

New member
Apr 27, 2013
1
1
thank you so much for the UJ2 firmware @Lenny Bard found it today and applied it and it is working yesterday my tablet rooted via this site with the files from @Magendanz and today my phone could not be happier:D
also a big tnx for the guide from the OP`s on both treads yeah maybe im a little bit exited just happy that it all works and nothing is broken:D:D if you have the right files and know what your doing it is going to be fine:D
 
  • Like
Reactions: Magendanz

VandenK

Member
Mar 17, 2016
17
2
Hello,

I installed TWRP twrp-3.6.2_9-0-a40.img.tar + vbmeta.img

The problem is backup.

it's the copy of the backup on my hard disk then the restoration on the key, blocked the diagram to change !!!!

Or simply the fact of making a new backup (new system) on the key ... which causes the old backup to restore, blocked the schema changed !!!!

Is there a solution ?

EDIT :
The only solution that works is to remove all screen locks... it works normally !!!
 
Last edited:

Mathimino

Member
May 27, 2021
11
2
Samsung Galaxy A40
Hello, I have unlocked my bootloader and now, have I to flash vbmeta or twrp first? Should I let auto-boot check in odin? Do you have a video that will show how to do it, it will be easier for me? Thanks
 

szucsy92

Senior Member
Sep 16, 2013
184
64
31
Hungary
Hello, I have unlocked my bootloader and now, have I to flash vbmeta or twrp first? Should I let auto-boot check in odin? Do you have a video that will show how to do it, it will be easier for me? Thanks
Hi! Flash it together! Put twrp to AP section and put the vbmeta to the CP section and press START. :)
And no click ani options. Check the formating no selected.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    What's the trick to getting both TWRP & Magisk working at the same time?
    I've got Derpfest ROM A405FNXXU4CWC3 installed right now with Magisk installed but I lost TWRP.
    It's a February 2022 Android 11.

    The OP post and the TWRP website give conflicting/incomplete instructions.

    I tried using Magisk to patch the TWRP.img and then ODIN AP flashed that.
    But it doesn't seem to install a recovery.

    EDIT:
    I removed boot.img from the tar I was flashing that contained the modified recovery.img and now I have recovery.
    Then, I installed magisk.zip from the magisk modified TWRP recovery and that seems to be sticking as well.
  • 16
    Team Win Recovery Project 3.6.1
    TWRP-Feature-Image-810x298_c.png


    Special Notes:
    1. DON'T FORGET TO ENABLE "OEM UNLOCK" (located in Developers options)
    2. KNOX will be tripped once you flash 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 flash 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 longer work
    Download:
    Changelog:
    • 21.10.2021
      • Rebased kernel source to CUH4
    • 16.06.2021
      • Rebased kernel source to CUC2
    • 03.05.2020
      • Rebased kernel source to BTB8
    • 25.04.2020
      • Rebased kernel source to ATA4
    • 07.12.2019
      • Initial Release
    Guide:
    • If you already have a custom recovery installed:
      1. Boot to your custom recovery
      2. Flash the recovery image
    • If you are starting from scratch:
      1. Go to Developer Settings and enable "OEM Unlock" option
      2. Power off the device and boot in download mode
      3. In download mode, you will see the long press and volume up option to unlock the bootloader
      4. Unlock the bootloader. That will wipe your device so be sure you made a backup of your data
      5. After bootloader unlock, boot up the phone and make sure it is connected to the internet or it will trigger rmm prenormal
      6. Setup the phone without google account and others
      7. Reboot in download mode and flash the recovery and vbmeta images
      8. Boot to TWRP
      9. Format data in TWRP
      10. Flash the Multidisabler zip
      11. Now you can reboot

    Contributors
    ponces, geiti94, ianmacd
    Source Code: https://github.com/TeamWin/android_device_samsung_a40
    Kernel Source Code: https://github.com/ponces/android_kernel_samsung_universal7904
    6
    Good news everyone!
    I finally have a working build with a proper fix!

    I was so wrong and this all hapened because Samsung has decided to finally fix in their firmware files the name of the SoC that our devices has. So, due to this, exynos7885 is no longer mentioned but instead it is exynos7904. This name change affected some filenames in the kernel, boot and recovery. One of the examples is the fstab as @tys0n correctly mentioned. The file that exports the ANDROID_ROOT variable was also affected and this was the main problem.

    Go grab the new builds in the OP! The Multidisabler zip is also fixed as now we will be using ianmacd's version.
    4
    I made a file with TWRP + boot.img + vbmeta for the step 7, so if someone is interested, you can download it here .
    Just flash it with Odin in AP slot.
    Please make sure you are on the latest firmware (CUD3)
    4
    this is what i did ... create a tar file with twrp, boot and vbmeta inside.
    Go to Settings >> About phone >> Software version and then tap the build number for about 10 times to enable developer mode. Once enabled, you will see the message "You are now a developer" on the screen.
    Go back to the main Settings screen and look for Developer Options. Inside you will find OEM unlocking and USB debugging. Enable both options by tapping the switch.
    Now turn off your smartphone and start the download mode. You can do this by pressing the Volume Up and Volume Down buttons simultaneously for a couple of seconds.
    Note: While using the above combination, you need to connect your device to your computer via the USB cable.
    Another note: make sure all necessary drivers are already installed on your computer. If not, the desktop will not detect the smartphone.
    After step 3, you should now be able to see the download mode with a large warning text written at the top of the screen.
    Now, long press the Volume Up button to unlock the device bootloader. You will now be redirected to a confirmation screen. Press Volume Up to proceed with the unlock mode.
    Your smartphone will restart and a Bootloader unlock message will appear on the screen. Acknowledge it and continue further by pressing the power key.
    Note: All your data will now be deleted. Hopefully, you've followed our tip and created a full backup.
    You will now see the device setup screen. Complete it without linking any Google or Samsung account. You can also skip installing the app.
    Once you are on the home screen, enable Developer Options as mentioned in step 1 of the guide.
    Now open developer options and look for OEM unlock. The option should be disabled
    Make sure the USB Debugging option is enabled on your smartphone.
    Download the Odin software and extract it to your computer. You should now be able to see the Odin Exe file after extraction. Run it as an administrator.
    Note: You may receive a popup related to ADB drivers. Let the update process finish automatically.
    Now restart your phone in download mode and while doing this connect your smartphone to the desktop. You can follow step 3 of the Unlock Bootloader guide to do that.
    Once the phone is connected to the computer and is in Download mode, you will be able to see the blue mark on the Odin software. This means that the software has detected your smartphone.
    add the previously created .Tar file to the Odin software by pressing the AP button.
    Note: Make sure Re-Partition and Auto Reboot is unchecked. You can find it in the options menu.
    Now, hit the Start button to start the flashing process. This will take a couple of seconds so that you can sit back and relax.
    Once the whole flashing process is complete, you will see the Pass message on the screen somewhere.
    How to exit download mode and enter TWRP recovery?
    To exit download mode and access TWRP recovery, you can hold down the Volume Down and Power keys simultaneously. When the screen goes blank for a few seconds, ...you need to release the Volume Down key and then quickly switch to the Volume Up button. When TWRP recovery appears, you can release all keys at the same time.

    Once you are inside TWRP recovery, go to the Wipe option and then tap on the Format Data option. Type Yes to continue.
    Once the deletion is finished, go back to the main menu in TWRP recovery and tap the Restart button.
    Within the Restart option, tap on the Recovery option. This will reboot you into custom recovery.
    Now you need to install the multidisabler file using the Install option. Once the file has been updated, you can restart your smartphone.
    Note: You need to flash the Multidisabler file using TWRP recovery.
    3
    Just to let you all know that we now have official builds of TWRP !! :D