Samsung Xcover 4 SM-G390F Root Magisk + TWRP +Disable Encryption Oreo/Pie (2019/2020)

Search This thread

Chamelleon

Senior Member
May 16, 2010
775
365
Kraków, Poland
LG G6
LG G7 ThinQ
Hi,
Finally I had time to finish my work on Xcover 4. I couldn't disable ForceEncryption by any flashable tool so I prepared 2 version of firmware (Oreo and Pie), both prerooted (Magisk) and free from Force Encryption. Everything except boot.img left untouched, both ROMs are BTU so no brand.
Just flash it with Odin 3.13.3. I recommend to flash CSC_BTU instead of HOME_CSC_BTU. HOME BTU should work as well but then probably You gonna have to format data with TWRP. CSC_BTU is already tested and there are no problems with Encryption.
After flashing just install Lastest Magisk Manager. SafetyNet Passed.


  • Oreo: G390FXXU4BSB3_BTU_G390FBTU4BSC1_Patched_By_Chamelleon
Code:
https://mega.nz/#!ONoFTIhD!rBOhDR0j874zpyeLiDVwfwOcodRi5OhdxyF0ZTRMslE

  • PIE: G390FXXU4CSF9_BTU_G390FBTU4CSFA_Patched_by_Chamelleon
Code:
https://mega.nz/#!XBhnRCCY!_IOOtXcLsGZQfVY17JD4YxxzaAWJqy2NoxVSrsJRs5M

If You need TWRP (not necessary to flash this ROMs) flash this version:

  • TWRP: TWRP-3.1.1_SM-G390F_by_nemo-nemo
Code:
https://mega.nz/#!DIo1SSBT!w4dPPAF3BEcfQmsy7mANO33Lb5Gj4jzDkrrPfbH56uo
Working on both versions, Oreo and Pie. I didn't test backup and recovery options but flashing is working on both. ADB and MTP are not working.

  • To remove Security Log Agent notifications use SecurityLogAgent Disable. It will disable this annoying app completely.
 

Attachments

  • Screenshot_20191210-151430.jpg
    Screenshot_20191210-151430.jpg
    143.8 KB · Views: 2,323
  • Screenshot_2019-12-10-15-30-56.png
    Screenshot_2019-12-10-15-30-56.png
    23.9 KB · Views: 2,286
Last edited:

guybrush38

New member
May 26, 2019
1
0
Hello!
Can you explain because i would like only to root my phone in oreo 8.1 without losing apps and data. Is it possible with your method?
thank you for your answer.
 
Last edited:

deliriumt

Member
Jan 27, 2019
5
3
Would anyone happen to know if I can use TWRP for SM-G390F's on SM-G390W's? (the only differences I know of between them are the supported LTE frequencies)
 

Gabbo94

New member
Dec 20, 2019
1
0
I don't understand what file I should use to flash with Odin.. in the link you posted sends to a download of a zip file of almost 2gb in which there are many files, so from those files which one should I set in Odin?
 

SpurguX

New member
Jan 2, 2020
3
0
Hi Chamelleon and thanks for all the effort you've made already!

I successfully flashed the Pie variant of the two ROMs and got it to work. However, turned out that in an app that I'm developing, for some reason, when my device is equipped with G390FXXU4CSF9_BTU_G390FBTU4CSFA, the app doesn't behave in the same way as when G390FXXU4CSF9_ G390FXEO4CSFA has been installed. That's why I would like to be able to root the XEO-version of the firmware. Moreover, there will be many other non-rooted devices equipped with the XEO-version using the app in the near future.

Having flashed my device with G390FXXU4CSF9_ G390FXEO4CSFA, I tried installing the version of TWRP you have provided but I can't figure out how to install Magisk from there. By default, TWRP can't find the Magisk zip-file that I push onto the device. I tried formatting data, as per this post. The post lead me to believe that the files could be found after formatting but even though there were now plenty of TWRP-related folders, I couldn't find the zip. And as ADB and MTP don't seem to work in recovery mode, I'm unable to get the zip file on board after formatting. Booting to system doesn't work either after allowing modifications for TWRP, which might be due to dm-verity preventing boot, but franky I don't understand much of that topic.

You mentioned that you couldn't disable Force Encryption with any flashable tool. Is that the reason why TWRP (or any other tool) couldn't reach the zip file for Magisk?

This is the first time I've attempted rooting a phone so my knowledge regarding the topic is pretty basic.

So I suppose preparing a prerooted and Force Encryption free version of the firmware might be a possibility? I have no idea how to patch a ROM though. Any advice on how to proceed?
 

Chamelleon

Senior Member
May 16, 2010
775
365
Kraków, Poland
LG G6
LG G7 ThinQ
Hi, I had no time to play with this during Christmas. If you send me your boot.img I can modify it for you. If You just flash magisk with TWRP it will root your phone but after first reboot whole data partition will be encrypted again and you wont be able to flash anything with twrp or modify data partition without full wipe. For some unknown reason this and probably more Samsung models have different structure of files responsible for encryption and because of this none of pre-made patches are working. Only manual kernel modification can safe from encryption, at least for now.
I'm not a developer so I don't know how to prepare patch for this to allow anyone to flash it, I just found few lines of code in kernel You need to modify to disable encryption.
 

SpurguX

New member
Jan 2, 2020
3
0
Hi, I had no time to play with this during Christmas. If you send me your boot.img I can modify it for you. If You just flash magisk with TWRP it will root your phone but after first reboot whole data partition will be encrypted again and you wont be able to flash anything with twrp or modify data partition without full wipe. For some unknown reason this and probably more Samsung models have different structure of files responsible for encryption and because of this none of pre-made patches are working. Only manual kernel modification can safe from encryption, at least for now.
I'm not a developer so I don't know how to prepare patch for this to allow anyone to flash it, I just found few lines of code in kernel You need to modify to disable encryption.

Hi, I really appreciate the help!

I sent the boot.img to your paypal donation email. Let me know if you want me to send it to you some other way.
 

AndroidBroker

Member
Jan 13, 2017
19
1
How to flash firmware on linux?
I know that i have to use heimdall but how to load these files into the program because filenames say basically nothing to me.
Thanks in advance.
Also does it delete user data?
 
Last edited:

Chamelleon

Senior Member
May 16, 2010
775
365
Kraków, Poland
LG G6
LG G7 ThinQ
Hi, I really appreciate the help!

I sent the boot.img to your paypal donation email. Let me know if you want me to send it to you some other way.
1. Flash clean ROM, same as boot you send me)
2. Enable OEM Unlock in Developer settings
3. Flash patched boot with Odin as AP/PDA.
4. Install Magisk Manager app
5. Install TWRP and format data partition, option where you need to type "YES"
6. Reboot system and then back to TWRP. If you can mount data and there are no errors it's done.

How to flash firmware on linux?
I know that i have to use heimdall but how to load these files into the program because filenames say basically nothing to me.
Thanks in advance.
Also does it delete user data?
Sorry but I never had a chance to use Heimdall. You can't dirty flash this because when your phone is encrypted and you can't replace kernel corrupting data.
 
Last edited:
  • Like
Reactions: moki71 and SpurguX

AndroidBroker

Member
Jan 13, 2017
19
1
But do I lose my data(Apps settings etc.)?
I'm OK with setting everything up back ,but it would be cool if it kept data.
(I'm going to use other computer that has windows on it btw, and I'm going to flash it with odin)
 

AndroidBroker

Member
Jan 13, 2017
19
1
What you mean by encryption some option in the Android or what?
If that's what you mean I haven't set up anything like this
 

Top Liked Posts

  • There are no posts matching your filters.
  • 6
    Hi,
    Finally I had time to finish my work on Xcover 4. I couldn't disable ForceEncryption by any flashable tool so I prepared 2 version of firmware (Oreo and Pie), both prerooted (Magisk) and free from Force Encryption. Everything except boot.img left untouched, both ROMs are BTU so no brand.
    Just flash it with Odin 3.13.3. I recommend to flash CSC_BTU instead of HOME_CSC_BTU. HOME BTU should work as well but then probably You gonna have to format data with TWRP. CSC_BTU is already tested and there are no problems with Encryption.
    After flashing just install Lastest Magisk Manager. SafetyNet Passed.


    • Oreo: G390FXXU4BSB3_BTU_G390FBTU4BSC1_Patched_By_Chamelleon
    Code:
    https://mega.nz/#!ONoFTIhD!rBOhDR0j874zpyeLiDVwfwOcodRi5OhdxyF0ZTRMslE

    • PIE: G390FXXU4CSF9_BTU_G390FBTU4CSFA_Patched_by_Chamelleon
    Code:
    https://mega.nz/#!XBhnRCCY!_IOOtXcLsGZQfVY17JD4YxxzaAWJqy2NoxVSrsJRs5M

    If You need TWRP (not necessary to flash this ROMs) flash this version:

    • TWRP: TWRP-3.1.1_SM-G390F_by_nemo-nemo
    Code:
    https://mega.nz/#!DIo1SSBT!w4dPPAF3BEcfQmsy7mANO33Lb5Gj4jzDkrrPfbH56uo
    Working on both versions, Oreo and Pie. I didn't test backup and recovery options but flashing is working on both. ADB and MTP are not working.

    • To remove Security Log Agent notifications use SecurityLogAgent Disable. It will disable this annoying app completely.
    2
    Hi, I really appreciate the help!

    I sent the boot.img to your paypal donation email. Let me know if you want me to send it to you some other way.
    1. Flash clean ROM, same as boot you send me)
    2. Enable OEM Unlock in Developer settings
    3. Flash patched boot with Odin as AP/PDA.
    4. Install Magisk Manager app
    5. Install TWRP and format data partition, option where you need to type "YES"
    6. Reboot system and then back to TWRP. If you can mount data and there are no errors it's done.

    How to flash firmware on linux?
    I know that i have to use heimdall but how to load these files into the program because filenames say basically nothing to me.
    Thanks in advance.
    Also does it delete user data?
    Sorry but I never had a chance to use Heimdall. You can't dirty flash this because when your phone is encrypted and you can't replace kernel corrupting data.
    2
    Unpack your firmware and upload boot.img to any cloud drive like GDrive, Mega, MediaFire or whatever you have and post link.
    1
    Updated main thread
    1
    no need anymore to flash these roms or anything just flash these two zip files after you flash twrp to disable force encryption than flash magisk and done i tried in my xcover 4 works perfectly
    put the zip files in your sd card
    flash twrp and wipe data in the yes section to disable force encryption
    than reboot recovery again and flash two zip files first than magisk and done:)
    Actually, I take back what I said earlier! Those were not the most clear instructions!

    Those ZIP packages represent two methods that fundamentally achieve the same purpose. It's not completely clear whether one is more appropriate for Magisk or SuperSU use, the Universal one borrows functions and logic from both Magisk and patches from the no-verity ZIP
    https://forum.xda-developers.com/t/...ncrypt-disk-quota-disabler-11-2-2020.3817389/
    This page lays the situation out in detail and mentions the prerequisites for those initially with encryption on or off

    Downloads:
    Disable-DM: https://zackptg5.com/android.php#disverfe
    No-Verity: https://build.nethunter.com/android-tools/no-verity-opt-encrypt/
    Magisk: https://magisk.me/