FORUMS
Remove All Ads from XDA

[RECOVERY][UNOFFICIAL] TWRP for Galaxy A40

3,155 posts
Thanks Meter: 6,317
 
By fahadali2315, Senior Member on 17th September 2019, 01:32 PM
Post Reply Email Thread
Team Win Recovery Project 3.3.1



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
The Following 13 Users Say Thank You to fahadali2315 For This Useful Post: [ View ] Gift fahadali2315 Ad-Free
17th September 2019, 01:34 PM |#2  
fahadali2315's Avatar
OP Senior Member
Flag Nottingham
Thanks Meter: 6,317
 
Donate to Me
More
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.
The Following 2 Users Say Thank You to fahadali2315 For This Useful Post: [ View ] Gift fahadali2315 Ad-Free
19th September 2019, 09:22 AM |#3  
Junior Member
Thanks Meter: 2
 
More
Hey thanks alot for all the hard work. I've unlocked my bootloader and tried to write this image to my phone.
In Odin I only select your file, in the AP Tab.

However I get:

DOWNLOAD SPEED: FAST
Product name: SM-A405FN
Current Binary: Samsung Official
KG State: Prenormal
FAP Lock: Off
OEM Lock: Off(U)
Secure Download: Enabled
CCIC: S2MU106
CARRIER_ID: PHN
Warranty Void: 1 (0x0E03)
RP SWAEV B:2 K:2 S:2

ONLY OFFICIAL RELEASED BINARIES ARE ALLOWED TO BE FLASHED (RECOVERY) <--

Any idea how to remove the check for "official binaries" ? Here's the log from odin:

Quote:

<ID:0/006> Added!!
<ID:0/006> Odin engine v(ID:3.1301)..
<ID:0/006> File analysis..
<ID:0/006> Total Binary size: 41 M
<ID:0/006> SetupConnection..
<ID:0/006> Initialzation..
<ID:0/006> Get PIT for mapping..
<ID:0/006> Firmware update start..
<ID:0/006> NAND Write Start!!
<ID:0/006> SingleDownload.
<ID:0/006> recovery.img
<ID:0/006> vbmeta.img
<ID:0/006> RQT_CLOSE !!
<ID:0/006>
<ID:0/006> Complete(Write) operation failed.
<OSM> All threads completed. (succeed 0 / failed 1)

19th September 2019, 12:12 PM |#4  
Junior Member
Flag Gagarin
Thanks Meter: 0
 
More
Hello!

I have two questions.
Can i install gsi roms with this twrp?
And can i install this twrp on my SM-405FM?
20th September 2019, 09:05 AM |#5  
Quote:
Originally Posted by chiri137

Hey thanks alot for all the hard work. I've unlocked my bootloader and tried to write this image to my phone.
In Odin I only select your file, in the AP Tab.

However I get:

DOWNLOAD SPEED: FAST
Product name: SM-A405FN
Current Binary: Samsung Official
KG State: Prenormal
FAP Lock: Off
OEM Lock: Off(U)
Secure Download: Enabled
CCIC: S2MU106
CARRIER_ID: PHN
Warranty Void: 1 (0x0E03)
RP SWAEV B:2 K:2 S:2

ONLY OFFICIAL RELEASED BINARIES ARE ALLOWED TO BE FLASHED (RECOVERY) <--

Any idea how to remove the check for "official binaries" ? Here's the log from odin:

You could try this: How to Fix Missing OEM Unlock KG State / RMM Prenormal on Galaxy A50
The step I think you missed is to boot phone to system and let it connect to internet after bootloader unlock. (Before flashing anything)
Unlock Boot Loader Galaxy A40 without Trigger KG State \ RMM state Prenormal
Quote:
Originally Posted by LittleCherryFox

Hello!

I have two questions.
Can i install gsi roms with this twrp?
And can i install this twrp on my SM-405FM?

Yes, you can flash GSI's. It probably works for A404FM as well but I guess you'll have to try it to be sure.
The Following User Says Thank You to tys0n For This Useful Post: [ View ] Gift tys0n Ad-Free
20th September 2019, 07:11 PM |#6  
Junior Member
Thanks Meter: 2
 
More
Can I install TWRP with Magisk already installed?
20th September 2019, 11:17 PM |#7  
fahadali2315's Avatar
OP Senior Member
Flag Nottingham
Thanks Meter: 6,317
 
Donate to Me
More
Quote:
Originally Posted by zavajon

Can I install TWRP with Magisk already installed?

Yes. This flashes on your recovery partition , Magisk flashes on your boot partition .
The Following User Says Thank You to fahadali2315 For This Useful Post: [ View ] Gift fahadali2315 Ad-Free
21st September 2019, 08:33 AM |#8  
Junior Member
Thanks Meter: 2
 
More
Quote:
Originally Posted by fahadali2315

Yes. This flashes on your recovery partition , Magisk flashes on your boot partition .

Are You sure?
At https://topjohnwu.github.io/Magisk/install.html is written:
"Your device is non-A/B and uses system-as-root, so Magisk will be installed to the recovery partition of your device."
and
"Due to the fact that some devices no longer uses ramdisk in boot images, Magisk has no choice but to be installed in the recovery partition."
21st September 2019, 08:46 AM |#9  
fahadali2315's Avatar
OP Senior Member
Flag Nottingham
Thanks Meter: 6,317
 
Donate to Me
More
Quote:
Originally Posted by zavajon

Are You sure?
At https://topjohnwu.github.io/Magisk/install.html is written:
"Your device is non-A/B and uses system-as-root, so Magisk will be installed to the recovery partition of your device."
and
"Due to the fact that some devices no longer uses ramdisk in boot images, Magisk has no choice but to be installed in the recovery partition."

Yes. I am sure . This is not related to A30&A40 entirely.
You can try patching the boot.img with magisk manager and flashing in odin. You will have root.
Ps. Thats why one version of twrp will work on all security patches updates.
Otherwise you would need kernel updates with each twrp. Like A50 A70 etc. That boot from recovery.
The Following User Says Thank You to fahadali2315 For This Useful Post: [ View ] Gift fahadali2315 Ad-Free
21st September 2019, 10:41 PM |#10  
fahadali2315's Avatar
OP Senior Member
Flag Nottingham
Thanks Meter: 6,317
 
Donate to Me
More
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.
The Following 4 Users Say Thank You to fahadali2315 For This Useful Post: [ View ] Gift fahadali2315 Ad-Free
22nd September 2019, 12:17 PM |#11  
S Q 3 O P H's Avatar
Junior Member
Flag Poznan
Thanks Meter: 0
 
More
Quote:
Originally Posted by fahadali2315

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.

The phone is in a boot loop. It doesn't work
Post Reply Subscribe to Thread

Tags
samsung-galaxy-a40

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes