FORUMS
Remove All Ads from XDA

Root SM-M405F (Galaxy M40)

101 posts
Thanks Meter: 18
 
By awsmanks, Senior Member on 25th July 2019, 05:39 AM
Post Reply Email Thread
Read all the Instructions very carefully, as missing even a single steps cause bootloop.

1. Unlocking Bootloader
  • Allow bootloader unlocking in Developer options → OEM unlocking
  • Power off your device. Press Volume Up + Volume Down and plug in your device to a PC to boot into download mode
  • Long press volume up to unlock the bootloader. This will wipe your data and automatically reboot.

Just when you think the bootloader is unlocked, surprise surprise, it is actually not! Samsung introduced VaultKeeper in the system, meaning the bootloader will reject any unofficial partitions before VaultKeeper explicitly allows it.
  • Go through the initial setup. Skip through all the steps since data will be wiped again later when we are installing Magisk. Connect the device to internet in the setup!
  • Enable developer options, and confirm that the OEM unlocking option exists and grayed out!

2. Before Installing Magisk
  • Installing Magisk WILL trip KNOX
  • Installing Magisk for the first time REQUIRES a full data wipe, backup before continue
  • You have to have your bootloader unlocked before following the instructions
  • After installing Magisk, you can directly upgrade Magisk within Magisk Manager without an issue.

3. Flashing Magisk:
  1. Download the firmware for SM-M405F
  2. Unzip the firmware and copy the AP tar file to your device. It is normally named as AP_[device_model_sw_ver].tar.md5
  3. Install the latest Magisk Manager
  4. In Magisk Manager: Install → Install → Select and Patch a File and select the AP tar file.
  5. Magisk Manager will patch the whole firmware file and store the output to [Internal Storage]/Download/magisk_patched.tar
  6. Copy the tar file to your PC and boot your device to download mode.
  7. Flash magisk_patched.tar as AP in ODIN, together with the BL, CP and HOME_CSC files. Never flash only an AP file, as Odin can shrink your /data file-system if you do.
  8. Important: Uncheck “Auto Reboot” in Options!
  9. Magisk is now successfully flashed! But there are still several steps before you can properly use the device.
  10. We now want to boot into the stock recovery to factory reset our device.
  11. Full data wipe is mandatory! Do not skip this step.
  12. Press Power + Volume Down to exit download mode. As soon as the screen turns off, immediately press Power + Volume Up to boot to recovery partition. Just as mentioned in the previous section, since we want to boot into stock recovery, continue pressing the volume up button until you see the stock recovery screen.
  13. In the stock recovery menu, use volume buttons to navigate through menus, and the power button to select the option. Select Wipe data/factory reset to wipe the data of the device.
  14. This time, we can finally boot to the system with Magisk. Select Reboot system now, and immediately press Power + Volume Up. After seeing the bootloader warning screen, release all buttons so it can boot to the system.
  15. The device will automatically reboot for the first time it boots. This is completely normal and done by design.
  16. After the device is booted up, do the usual initial setup. The following steps will need internet connection.
  17. You shall see Magisk Manager in your app drawer; if not, manually install the APK you downloaded and continue to the next step. The app would be a stub and it shall automatically upgrade to the full Magisk Manager when you open it.
  18. Magisk Manager will ask to do additional setups. Let it do its job and the app will automatically reboot your device.
  19. Enjoy Root
The Following 2 Users Say Thank You to awsmanks For This Useful Post: [ View ] Gift awsmanks Ad-Free
 
 
26th July 2019, 04:04 PM |#2  
Junior Member
Thanks Meter: 0
 
More
Successfully rooted Galaxy M40
Thanks for the post. I have successfully rooted Galaxy M40 using magisk. Just one thing to add to the above post-- while copying patched ap from phone to pc use adb otherwise the flashing patched AP fails.
27th July 2019, 08:46 PM |#3  
OP Senior Member
Thanks Meter: 18
 
More
Quote:
Originally Posted by Ayan Chakraborty

Thanks for the post. I have successfully rooted Galaxy M40 using magisk. Just one thing to add to the above post-- while copying patched ap from phone to pc use adb otherwise the flashing patched AP fails.

I did not use Adb, it went smoothly for me.
28th July 2019, 04:25 AM |#4  
Junior Member
Thanks Meter: 0
 
More
Enable 3CA for Rooted M40
Galaxy M40 uses LTE 2CA but the chipset supports 3CA. Can we enable it for Rooted M40?
10th August 2019, 09:18 AM |#5  
Theseusperse's Avatar
Member
Flag Gibraltar
Thanks Meter: 45
 
More
Be careful doing this, since the latest Samsung firmware update in August it doesn't work anymore. You can root at first, but then every time you reboot the phone unroots... If you persist and do it again Samsung lock the phone for "security reasons" and you can't even reach the bootloader or recovery screens using the up / down buttons... Meaning you can't go back to stock firmware without taking your phone back to the store or sending for service, but of course you now no longer have warranty.
10th August 2019, 09:44 AM |#6  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by awsmanks

I did not use Adb, it went smoothly for me.

This method will work for samsung a60 with his own firmware? Its the china better version of m40, i think i'll try this method
19th August 2019, 11:13 AM |#7  
rajeshca911's Avatar
Senior Member
Flag Vizag
Thanks Meter: 29
 
Donate to Me
More
Rooted Successfully.
I had to flash twice since it did not boot into the stock recovery first time and messed with root I presume. second time it went perfectly and manually installed magisk manager. later magisk manager did some setups and rebooted my system.
Thanks Dev.
waiting for TWRP
19th August 2019, 02:11 PM |#8  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by rajeshca911

Rooted Successfully.
I had to flash twice since it did not boot into the stock recovery first time and messed with root I presume. second time it went perfectly and manually installed magisk manager. later magisk manager did some setups and rebooted my system.
Thanks Dev.
waiting for TWRP

So this the new update it works?
19th August 2019, 03:49 PM |#9  
Theseusperse's Avatar
Member
Flag Gibraltar
Thanks Meter: 45
 
More
Quote:
Originally Posted by Scorpio02

This method will work for samsung a60 with his own firmware? Its the china better version of m40, i think i'll try this method

The A60 and the M40 are identical, it's not the "china better version" lol, it's just 90 USD more expensive because Chinese people have more money. It's literally identical down to the microchips inside.
19th August 2019, 07:19 PM |#10  
rajeshca911's Avatar
Senior Member
Flag Vizag
Thanks Meter: 29
 
Donate to Me
More
Quote:
Originally Posted by Scorpio02

So this the new update it works?

I think that I flashed on latest firmware AP_M405FDDU1ASF2_CL16060793_QB24248847_REV00_user_ low_ship_MULTI_CERT_meta_RKEY_OS9.tar
Android Pie
Magisk 19.3
Magisk Manager 7.3.2
everything works perfectly except that annoying message on the boot screen

Here are my screenshots
Click image for larger version

Name:	Screenshot_20190819-234616_Root Checker Pro.jpg
Views:	66
Size:	155.9 KB
ID:	4807915Click image for larger version

Name:	Screenshot_20190819-234639_Settings.jpg
Views:	66
Size:	224.8 KB
ID:	4807916Click image for larger version

Name:	Screenshot_20190819-234655_Magisk Manager.jpg
Views:	64
Size:	195.2 KB
ID:	4807917
The Following User Says Thank You to rajeshca911 For This Useful Post: [ View ] Gift rajeshca911 Ad-Free
20th August 2019, 01:52 AM |#11  
Theseusperse's Avatar
Member
Flag Gibraltar
Thanks Meter: 45
 
More
I've uploaded the latest firmware file to Mega for anyone who doesn't want to wait 10 years for it to download from the snail-speed Samsung Firmware website:

https://mega.nz/#!T1sBka7B!iP8Ub8xbm...KjnPM6M6VjiqCc

Feel free to check the MD5 hashes, zero changes.
The Following User Says Thank You to Theseusperse For This Useful Post: [ View ] Gift Theseusperse Ad-Free
Post Reply Subscribe to Thread

Tags
m40, magisk, original firmaware, root, samsung root

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

Advanced Search
Display Modes