[F3111][Guide][N][33.3.A.1.115] Root with Working patched DRM fix (without ta backup)

Search This thread

pa7taloha

Member
Jul 16, 2017
33
11
Padova
Hi all!
Happy to share a workaround for root and successful DRM fix.
If you lose your drm key, that's okay, this fix will restore all function which depends on it (picture quality, super vivid mode, etc.....). There's nothing satisfying than using your phone at its full potential with your own custom:p. Spot the difference;)!!!!

1. Unlock bootloader
2. Flash boot.img (Patched to be compatible with the drmfix)
>>> fastboot flash boot boot.img
3. Flash recovery.img
>>> fastboot flash recovery recovery.img
4. Boot to recovery by holding vol - and power; then swipe to allow modification and Format data (mandatory)
5. Flash drmfix.zip
6. Flash Magisk 14.0
7. Boot to android, you're done!!!

Type *#*#7378423#*#* then >>Service info>>Configuration or >>Service tests>>Security to check if all your keys are active.
Screenshot_20171210-003415-picsay.pngScreenshot_20171210-003431-picsay.pngScreenshot_20171210-010036.png

Download link:
# For boot.img here!!!
# For recovery.img here!!!
# For drmfix This does the trick
 
Last edited:

okhayko

Member
Sep 13, 2016
45
4
Cam Pha
That's Strange, can you provide further info, like did you got any error when flashing the drmfix?

Unfortunately, it's flashed well, no error.
Before i flash the drmfix, just 2 first lines are [Unknow Error] and the other lines are all [Active], Number or something like that
After i flash the drmfix, all of them are [Unknow Error]
 

pa7taloha

Member
Jul 16, 2017
33
11
Padova
Unfortunately, it's flashed well, no error.
Before i flash the drmfix, just 2 first lines are [Unknow Error] and the other lines are all [Active], Number or something like that
After i flash the drmfix, all of them are [Unknow Error]
That means the drmfix you've flashed has deleted your credential which is located at /data/credmgr/ . For sure the linked drmfix here will not delete anything in your system.

Note: This drmfix will not be compatible with another boot.img different from the O.P. You have to do some mod in your boot.img to make this working. If you want to, let me know.
 

okhayko

Member
Sep 13, 2016
45
4
Cam Pha
That means the drmfix you've flashed has deleted your credential which is located at /data/credmgr/ . For sure the linked drmfix here will not delete anything in your system.

Note: This drmfix will not be compatible with another boot.img different from the O.P. You have to do some mod in your boot.img to make this working. If you want to, let me know.

Hi, can i ask a question?
My model is F3116, can i do step by step with this guide to make it work?
Sorry but i did not flash your boot.img file, i flashed boot.img file from the other thread, i though it the same. i will try your method but can you answer me that this will work with my model :eek: TY!
 

pa7taloha

Member
Jul 16, 2017
33
11
Padova
Hi, can i ask a question?
My model is F3116, can i do step by step with this guide to make it work?
Sorry but i did not flash your boot.img file, i flashed boot.img file from the other thread, i though it the same. i will try your method but can you answer me that this will work with my model :eek: TY!
Post here your boot.img then, I will try to mod it. But make sure you still have your credmgr.db file which is located at /data/credmgr, this Fix won't work without it.
 

pa7taloha

Member
Jul 16, 2017
33
11
Padova
For F3116 [33.3.A.1.97]

Thanks buddy. Here is my boot.img that i was flash

boot.img file
Now
1. flash this bootF3116.img file, using the command "fastboot flash boot bootF3116.img" (without quotes)
2. Go to twrp recovery and "format data" (I suppose you already have flashed twrp)
3. Flash drmfix.zip
4. Flash Magisk if you need root.
5. Reboot

Download link
bootF3116.img
The compatible drmfix.zip
If you still have any problem let me know;)
 
Last edited:

pa7taloha

Member
Jul 16, 2017
33
11
Padova
Hi @pa7taloha,
Can you share your kernel drm fix changes (github or some other cloud server)? I'm trying to implement some custom changes in the kernel and I could add this as well. Thanks.
Sorry for late reply.
I will try to be clear as much as I can(bad english speaker).
We have tested this workaround to: xperia xa f3111(Mediatek, Nougat) and xperia x perfomance(qualcom, Nougat and 0reo) and it work fine in Nougat and Oreo too. I hope this will work too to the other xperia devices, so we can relate it.
I did not compile kernel from source, I have just extracted it with flashtool kernel.elf and unpacked/repacked it with AIK Linux/Carliv-image-kitchen. I am a Linux user.
For mediatek processor,
In the kernel, unpack it and edit.
1. disable dm-verity
2. edit init.rc
add this red line in on early-init, .
Code:
on early-init
    [COLOR="Red"]restorecon /vendor/lib64/libdrmfix.so
    restorecon /vendor/lib/libdrmfix.so[/COLOR]
    # Set init and its forked children's oom_adj.
    write /proc/1/oom_score_adj -1000
	
    # Disable sysrq from keyboard
    write /proc/sys/kernel/sysrq 0
3. edit init.aee.rc
add this red line in on init
Code:
on init
    export LD_PRELOAD libdirect-coredump.so
    write /proc/self/coredump_filter 39
    setprop ro.aee.enperf off
    [COLOR="Red"]export LD_PRELOAD libdrmfix.so[/COLOR]
4. edit default.prop
change the value of "ro.secure=0" to "ro.secure=1"
7. Open "fstab.mt6755" and copy in new text file the path to your system, it should be in the first line, we will use this later in the drmfix.zip
6. repack your kernel

II. We will do some mod to the drmfix.zip
open with the "open archive manager" the drmfix.zip and edit the updater-script in drmfix/META-INF/com/google/android/
This red line in the updater-script should be the same path to your system found in "fstab.mt6755" file in the boot.img (you've copied in step 5 in kernel)
Code:
ui_print(" ==================================");
mount("ext4", "EMMC", "[COLOR="red"]/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/system[/COLOR]", "/system");
ui_print("updating..");
package_extract_dir("system", "/system");
unmount("/system");
ui_print("Done!!!");
save it and update the drmfix.zip

For Qualcom processor
In the kernel, unpack it and edit.
1. disable dm-verity
2. edit init.rc
add this red line in on early-init
Code:
on early-init
    [COLOR="red"]restorecon /vendor/lib64/libdrmfix.so
    restorecon /vendor/lib/libdrmfix.so[/COLOR]
    # Set init and its forked children's oom_adj.
    write /proc/1/oom_score_adj -1000

    # Disable sysrq from keyboard
    write /proc/sys/kernel/sysrq 0
3. edit init.environ.rc
add this red line to the last line.
Code:
    export SYSTEMSERVERCLASSPATH /system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar
    
    [COLOR="red"]export LD_PRELOAD libdrmfix.so[/COLOR]
4. edit default.prop
change the value of "ro.secure=0" to "ro.secure=1"
5. Open "fstab.qcom" and copy in new text file the path to your system, we will use this later in the drmfix.zip
6. repack your kernel, flash it

II. We will do some mod to the drmfix.zip
open with the "open archive manager" the drmfix.zip and edit the updater-script in drmfix/META-INF/com/google/android/
This red line in the updater-script should be the same path to your system found in "fstab.qcom" file in the boot.img (you've copied in step 5 in kernel)
Code:
ui_print(" ==================================");
mount("ext4", "EMMC", "[COLOR="red"]/dev/block/bootdevice/by-name/system[/COLOR]", "/system");
ui_print("updating..");
package_extract_dir("system", "/system");
unmount("/system");
ui_print("Done!!!");
save it and update the drmfix.zip, and flash it.

Avalaible for clarification.
 

matan290

Member
Jun 21, 2014
29
8
https://imgur.com/OHuNKyk
Guys I can't seem to get it to work, tried reflashing your boot.img and recovery.img, tried formatting data and factory reset after every flash and wipe cache/dalvik cache after drm.zip install, nothing seems to get rid of those "Unknown error", btw I'm using F3111 single SIM on 33.3.A.1.97.
Almost forgot, when i plug my phone in fastboot and flash the files i don't get that flash status on the phone itself, only on cmd screen that it's done.
 

pa7taloha

Member
Jul 16, 2017
33
11
Padova
https://imgur.com/OHuNKyk
Guys I can't seem to get it to work, tried reflashing your boot.img and recovery.img, tried formatting data and factory reset after every flash and wipe cache/dalvik cache after drm.zip install, nothing seems to get rid of those "Unknown error", btw I'm using F3111 single SIM on 33.3.A.1.97.
Almost forgot, when i plug my phone in fastboot and flash the files i don't get that flash status on the phone itself, only on cmd screen that it's done.
Sorry to hear that, It is always recommended to do a full nandroid backup before flashing anything. To get rid of those Unknown error you have to reflash your firmware. What causes these error is that the drm.zip you've flashed has deleted the credmgr.db file in /data/credmgr/, this contains all your phone credential. May be you've flashed any drmfix(old drmfix in other thread) before flashing this, because this fix will not delete anything in your system. And no need to wipe cache/dalvik after flashing it.
 
Last edited:
  • Like
Reactions: matan290

matan290

Member
Jun 21, 2014
29
8
Yeah that's the problem,cause i flashed the other DRM fix few weeks ago. Can you please post a link or something for a firmware I can flash or should I try the PC Companion.
 

pa7taloha

Member
Jul 16, 2017
33
11
Padova
Yeah that's the problem,cause i flashed the other DRM fix few weeks ago. Can you please post a link or something for a firmware I can flash or should I try the PC Companion.
You can use flashtool and download a frimware the latest version by xperifirm which is integrated in the flashtool. Or if you want to use Pc Companion you have to relock your bootloader and unlock after it's done.
 
  • Like
Reactions: matan290

Top Liked Posts

  • There are no posts matching your filters.
  • 4
    Hi @pa7taloha,
    Can you share your kernel drm fix changes (github or some other cloud server)? I'm trying to implement some custom changes in the kernel and I could add this as well. Thanks.
    Sorry for late reply.
    I will try to be clear as much as I can(bad english speaker).
    We have tested this workaround to: xperia xa f3111(Mediatek, Nougat) and xperia x perfomance(qualcom, Nougat and 0reo) and it work fine in Nougat and Oreo too. I hope this will work too to the other xperia devices, so we can relate it.
    I did not compile kernel from source, I have just extracted it with flashtool kernel.elf and unpacked/repacked it with AIK Linux/Carliv-image-kitchen. I am a Linux user.
    For mediatek processor,
    In the kernel, unpack it and edit.
    1. disable dm-verity
    2. edit init.rc
    add this red line in on early-init, .
    Code:
    on early-init
        [COLOR="Red"]restorecon /vendor/lib64/libdrmfix.so
        restorecon /vendor/lib/libdrmfix.so[/COLOR]
        # Set init and its forked children's oom_adj.
        write /proc/1/oom_score_adj -1000
    	
        # Disable sysrq from keyboard
        write /proc/sys/kernel/sysrq 0
    3. edit init.aee.rc
    add this red line in on init
    Code:
    on init
        export LD_PRELOAD libdirect-coredump.so
        write /proc/self/coredump_filter 39
        setprop ro.aee.enperf off
        [COLOR="Red"]export LD_PRELOAD libdrmfix.so[/COLOR]
    4. edit default.prop
    change the value of "ro.secure=0" to "ro.secure=1"
    7. Open "fstab.mt6755" and copy in new text file the path to your system, it should be in the first line, we will use this later in the drmfix.zip
    6. repack your kernel

    II. We will do some mod to the drmfix.zip
    open with the "open archive manager" the drmfix.zip and edit the updater-script in drmfix/META-INF/com/google/android/
    This red line in the updater-script should be the same path to your system found in "fstab.mt6755" file in the boot.img (you've copied in step 5 in kernel)
    Code:
    ui_print(" ==================================");
    mount("ext4", "EMMC", "[COLOR="red"]/dev/block/platform/mtk-msdc.0/11230000.msdc0/by-name/system[/COLOR]", "/system");
    ui_print("updating..");
    package_extract_dir("system", "/system");
    unmount("/system");
    ui_print("Done!!!");
    save it and update the drmfix.zip

    For Qualcom processor
    In the kernel, unpack it and edit.
    1. disable dm-verity
    2. edit init.rc
    add this red line in on early-init
    Code:
    on early-init
        [COLOR="red"]restorecon /vendor/lib64/libdrmfix.so
        restorecon /vendor/lib/libdrmfix.so[/COLOR]
        # Set init and its forked children's oom_adj.
        write /proc/1/oom_score_adj -1000
    
        # Disable sysrq from keyboard
        write /proc/sys/kernel/sysrq 0
    3. edit init.environ.rc
    add this red line to the last line.
    Code:
        export SYSTEMSERVERCLASSPATH /system/framework/services.jar:/system/framework/ethernet-service.jar:/system/framework/wifi-service.jar
        
        [COLOR="red"]export LD_PRELOAD libdrmfix.so[/COLOR]
    4. edit default.prop
    change the value of "ro.secure=0" to "ro.secure=1"
    5. Open "fstab.qcom" and copy in new text file the path to your system, we will use this later in the drmfix.zip
    6. repack your kernel, flash it

    II. We will do some mod to the drmfix.zip
    open with the "open archive manager" the drmfix.zip and edit the updater-script in drmfix/META-INF/com/google/android/
    This red line in the updater-script should be the same path to your system found in "fstab.qcom" file in the boot.img (you've copied in step 5 in kernel)
    Code:
    ui_print(" ==================================");
    mount("ext4", "EMMC", "[COLOR="red"]/dev/block/bootdevice/by-name/system[/COLOR]", "/system");
    ui_print("updating..");
    package_extract_dir("system", "/system");
    unmount("/system");
    ui_print("Done!!!");
    save it and update the drmfix.zip, and flash it.

    Avalaible for clarification.
    2
    Hi all!
    Happy to share a workaround for root and successful DRM fix.
    If you lose your drm key, that's okay, this fix will restore all function which depends on it (picture quality, super vivid mode, etc.....). There's nothing satisfying than using your phone at its full potential with your own custom:p. Spot the difference;)!!!!

    1. Unlock bootloader
    2. Flash boot.img (Patched to be compatible with the drmfix)
    >>> fastboot flash boot boot.img
    3. Flash recovery.img
    >>> fastboot flash recovery recovery.img
    4. Boot to recovery by holding vol - and power; then swipe to allow modification and Format data (mandatory)
    5. Flash drmfix.zip
    6. Flash Magisk 14.0
    7. Boot to android, you're done!!!

    Type *#*#7378423#*#* then >>Service info>>Configuration or >>Service tests>>Security to check if all your keys are active.
    Screenshot_20171210-003415-picsay.pngScreenshot_20171210-003431-picsay.pngScreenshot_20171210-010036.png

    Download link:
    # For boot.img here!!!
    # For recovery.img here!!!
    # For drmfix This does the trick
    2
    All Magisk zip's from v15.0 and up break the drm fix. I tried up to v14.5 (v14.6 doesn't work either) which is the last version that works with the drm fix.
    2
    Hi @pa7taloha,
    Can you share your kernel drm fix changes (github or some other cloud server)? I'm trying to implement some custom changes in the kernel and I could add this as well. Thanks.
    2
    CAN ANYONE CONFIRM IF THIS METHOD IS WORKING 100% with all updated magisk/other apps BEFORE I MISS/DELETE ANY OF MY FILES?
    thanks
    100% Working i only tried with the files of creator.
    Magisk 14.0

    Xperia XA [Single Sim] 33.3.A.1.115 firmware
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone