[KERNEL][MOD] Sony Stock Patcher for Xperia X Performance

Search This thread

Klaus N.

Senior Member
Oct 14, 2012
1,300
693
Nuremberg
good work, but the drm is not fixed?
It has nothing to do with "not fixed"!
The patcher only does the things described in the op!!!
If you want drm fix, simply patch your kernel with Tobias Waldvogels tool, flash the resulting boot.img via fastboot command, then boot into TWRP and flash the appropriate patcher version. Done!
 
Last edited:
  • Like
Reactions: AdrianDC

Sterpey

Member
Mar 15, 2009
10
2
Warsaw
Hi, after Stock Patcher implemented, could anybody recommend any mods for F8131 improving battery life or system speed or adding features etc.?
 

AdrianDC

Recognized Developer
Dec 22, 2009
2,206
12,975
Île-de-France
adriandc.github.io
New release for the Sony 41.3.A.0.401 firmware, Android Oreo 8.0.0.

Changes done on my original patchers to support Oreo :
  • Kernel commits updated against release archives for Oreo
  • Patcher script improved for Oreo /vendor/etc/ located fstab
  • DTB also modified to prevent the forced system dm-verity usage

About my Sony Stock Patcher releases :
  • No updates can be / will be performed unless Sony releases the kernel open source archive
  • December 41.3.A.2.24 will not be done until possible due to the previous point (For instance .0.401 was 3 days ago)
  • Updates also depend on the very narrow free time I have + priorities over my Android projects
 
Last edited:
  • Like
Reactions: dic1911

AdrianDC

Recognized Developer
Dec 22, 2009
2,206
12,975
Île-de-France
adriandc.github.io
New release for the Sony 41.3.A.2.75 firmware, Android Oreo 8.0.0.

About my Sony Stock Patcher releases :
  • No updates can be / will be performed unless Sony releases the kernel open source archive
  • February 41.3.A.2.75 sources were only released today, and are now uploaded
  • January 41.3.A.2.58 sources were also only released today, and I won't build it as it is pointless
  • I will not respond to PMs requesting for releases when the sources are released in the first place
 

Klaus N.

Senior Member
Oct 14, 2012
1,300
693
Nuremberg
hello sir, can i change docomo SO-04H ROM to international ROM ??

You can flash a Customized firmware using Flashtool or Newflasher. In both scenarios you can try to flash the rom by excluding "Userdata". If you get problems, you should flash the whole rom (including Userdata); in this case, you have to setup from the start, means, all personal settings and apps will be lost. So it's recommended to back them up before.

For further help, please use the search function inside the XDA forum or Google; your question is at most semi-related to this thread ;)
 

Nizar3003

Member
Dec 25, 2018
5
0
Hy, i'm using x performance sh0h 39.2.B.0.336. what version should i choose for kernel ?
and i want to install magis root to. it is possible ?

answer please :)
 

AdrianDC

Recognized Developer
Dec 22, 2009
2,206
12,975
Île-de-France
adriandc.github.io
New minor release for the Sony 41.3.A.2.157 firmware, just a fix for 3.18 ramoops handlings.
Code:
Sony Stock Patcher for X Performance - 23/10/2019
=================================================
* Update release to resolve 3.18 ramoops (o_v7.2.157)
> See commit 71d1aa14bdae1f38a56be10468556d43f108478a
 

Top Liked Posts

  • There are no posts matching your filters.
  • 13
    Code:
    #include <std_disclaimer.h>
    /*
     * Your warranty is now void.
     *
     * I am not responsible for bricked devices, dead SD cards,
     * thermonuclear war, or you getting fired because the alarm app failed. Please
     * do some research if you have any concerns about features included in this ROM
     * before flashing it! YOU are choosing to make these modifications, and if
     * you point the finger at me for messing up your device, I will laugh at you.
     */


    About the project
    Sony Stock Patcher is a minimal and easy transition from Sony's Stock ROM
    (flashed directly from an FTF for example) to a modifiable ROM that can be modded as you like.

    Built out of my evolutions of libbootimg for MultiROM to support Sony ELF bootimages,
    a custom modified kernel based on Sony's copyleft with a minimal set of needed custom changes,
    and an automated installation process to patch completely a Stock ROM,
    this will allow you to use the Stock ROMs as you wish to.


    Relevant features of Sony Stock Patcher

    • Using my Sony ELF 64bits port to libbootimg, Stock boot partition is automatically converted
    • Modified copyleft Stock kernel to support alterations and remove limitations
    • Patches the ramdisk to disable automatically Sony RIC security
    • Patches the fstab automatically for verity
    • Injects my init_sony project used on Sony custom ROM projects
    • Supports making the ROM usable as secondary MultiROM

    List of changes made to the kernel

    • Disable Selinux trap security (allows to boot with stock ramdisk sepolicies)
    • Disable Device-Mapper verity (needed for example to patch system partitions)
    • Disable kernel modules forced validation (avoids failures on modules signature)
    • Disable coresight (unneeeded and irrelevant, just to avoid unsupported error logs)
    • Disable Sony RIC security (needed to use a recovery and alter /system, /data, ...)
    • Inline kernel modules compilation (to avoid kernel installation fragmentation)
    • Clearpad touchscreen updates for MultiROM UI
    • Minor kernel updates

    Installation

    • Needed: Device has to be with an Unlocked Bootloader
    • Use Stock ROM or flash a clean FTF ROM from Nougat or Marshmallow
    • Needs a working TWRP flashed into the FOTA partition (fastboot flash recovery...)
      > Fully working TWRP builds : https://mega.nz/#F!DtsERIzb!OFINTFpTQ6CF85alkcIpgA
    • Boot to TWRP (Power and Volume -)
    • Flash the relevant sony_stock_xperformance_patcher: n for 7.x or m for 6.0
    • (Optional) Flash SuperSU by Chainfire if you want to have root access
    • Reboot to Android

    Reasons to use this project ?

    • Unlocked Bootloader customizations allowed on Stock
    • Converts the bootimage to support systemless tools
    • Ability to root with tools like SuperSU
    • Retains the original Sony bootimage files
    • Minimal needed changes, no additional kernel mods

    Downloads (Unlocked Bootloader only)


    Source code
    Kernel sources - https://github.com/AdrianDC/kernel-sony-copyleft (branch 41.2.A.7.xxx)
    libbootimg sources - https://github.com/AdrianDC/multirom_libbootimg (branch master)
    init_sony sources - https://github.com/AdrianDC/device-sony-common-init (branch master)
    MultiROM sources - https://github.com/AdrianDC/multirom_core (branch master)
    TWRP sources - https://github.com/AdrianDC/twrp_development_sony/commits/device_sony_dora (branch device_sony_dora)


    Sony Stock Patcher for Xperia X Performance created also thanks to :
    - Sony for their original copyleft kernel sources
    - Tasssadar for the original libbootimg / MultiROM sources
    - The XperiaMultiROM team for our evolution of MultiROM
    - Everyone involved in testing it​


    XDA:DevDB Information
    Sony Stock Patcher for Xperia X Performance, Kernel for the Sony Xperia X Performance

    Contributors
    Adrian DC
    Source Code: https://github.com/AdrianDC/kernel-sony-copyleft

    Kernel Special Features:

    Version Information
    Status: No Longer Updated

    Created 2016-12-29
    Last Updated 2020-08-15
    6
    Reserved

    Changelog
    Code:
    Sony Stock Patcher for X Performance - 23/10/2019
    =================================================
    * Update release to resolve 3.18 ramoops (o_v7.2.157)
    > See commit 71d1aa14bdae1f38a56be10468556d43f108478a
    
    Sony Stock Patcher for X Performance - 08/09/2018
    =================================================
    * Upgrade to Oreo 8.0.0 41.3.A.2.149/157 (o_v6.2.157)
    
    Sony Stock Patcher for X Performance - 19/05/2018
    =================================================
    * Upgrade to Oreo 8.0.0 41.3.A.2.128 (o_v5.2.128)
    
    Sony Stock Patcher for X Performance - 24/03/2018
    =================================================
    * Upgrade to Oreo 8.0.0 41.3.A.2.99 (o_v4.2.99)
    
    Sony Stock Patcher for X Performance - 12/03/2018
    =================================================
    * Upgrade to Oreo 8.0.0 41.3.A.2.75 (o_v3.2.75)
    
    Sony Stock Patcher for X Performance - 25/12/2017
    =================================================
    * Upgrade to Oreo 8.0.0 41.3.A.2.24 (o_v2.2.24)
    
    Sony Stock Patcher for X Performance - 17/12/2017
    =================================================
    * Upgrade to Oreo 8.0.0 41.3.A.0.401 (o_v1.0.401)
    
    Sony Stock Patcher for X Performance - 26/11/2017
    =================================================
    * Upgrade to Nougat 7.1.1 41.2.A.7.76 (n_v12.7.76)
    
    Sony Stock Patcher for X Performance - 25/09/2017
    =================================================
    * Upgrade to Nougat 7.1.1 41.2.A.7.65 (n_v11.7.65)
    
    Sony Stock Patcher for X Performance - 19/08/2017
    =================================================
    * Upgrade to Nougat 7.1.1 41.2.A.7.53 (n_v10.7.53)
    
    Sony Stock Patcher for X Performance - 16/07/2017
    =================================================
    * Upgrade to Nougat 7.1.1 41.2.A.7.35 (n_v9.7.35)
    
    Sony Stock Patcher for X Performance - 08/06/2017
    =================================================
    * Upgrade to Nougat 7.1.1 41.2.A.7.8 (n_v8.7.8)
    
    Sony Stock Patcher for X Performance - 21/05/2017
    =================================================
    * Upgrade to Nougat 7.1.1 41.2.A.2.223 (n_v7.223)
    
    Sony Stock Patcher for X Performance - 26/04/2017
    =================================================
    * Upgrade to Nougat 7.1.1 41.2.A.2.199 (n_v6.199)
    
    Sony Stock Patcher for X Performance - 16/03/2017
    =================================================
    * Upgrade to Nougat 7.0 39.2.A.0.442 (n_v5.442)
    
    Sony Stock Patcher for X Performance - 04/02/2017
    =================================================
    * Upgrade to Nougat 7.0 39.2.A.0.417 (n_v4.417)
    
    Sony Stock Patcher for X Performance - 13/01/2017
    =================================================
    * Minor fix for enforcing SELinux (n_v3.361, m_v3.297)
    
    Sony Stock Patcher for X Performance - 08/01/2017
    =================================================
    * Remove permissive for Stock 7.0 (n_v2.361, 39.2.A.0.361)
    * Remove permissive for Stock 6.0, to fix WiFi (m_v2.297, 35.0.A.1.297)
    
    Sony Stock Patcher for X Performance - 29/12/2016
    =================================================
    * Initial release for Stock 7.0 (n_v1, 39.2.A.0.361)
    * Initial release for Stock 6.0 (m_v1, 35.0.A.1.297)
    5
    No, I didn't! It is somewhere at v2. Weird!!
    And now I did it this way:
    - Flashed modified stock kernel (tobias.waldvogel's tool: dm-verity, ric, drmfix, and busybox) - Reboot >> Enforcing
    - Flashed latest SuperSU - Reboot >> Enforcing
    - Flashed modified Sony Stock Patcher v2 (sony_stock_patcher.sh: removed dm-verity and ric related lines) - Reboot >> Permissive

    Minor update v3, removed a remaining kernel commit that allowed to override the enforcing/permissive status,
    in some situations it can cause the permissive status even if not wished, you might be fine now.
    Works fine on mine (Enforcing, running 7.0 from my MicroSD & no issue so far).

    v2 removed as it almost identical to v3 with this minor removal.
    4
    @Adrian DC Congrats buddy!!
    This is absolutely amazing. Confirmed that it is working on my XP with stock MM firmware (35.0.A.1.297).

    Thanks, glad it works fine for you too


    But I have a question regarding whole process, is Permissive mandatory (# Inject the permissive cmdline)?
    Edit.: It looks like it is, but Permissive does break device's wifi connectivity (and maybe other things)!! Is there a way to set Permissive only if we choose to boot up into recovery?

    Nice catch, I had forgotten I had an issue 2 months ago on M with WiFi not working entirely,
    and it's not an issue that can be found on Nougat so left it aside for the time.

    It is indeed related to permissive, and with the recent changes I made for the Nougat support,
    permissive is actually totally useless, therefore I made a new release for both M / N with updated kernel & no permissive changes.

    Tested both situations with Stock M and Stock N, all works fine.
    4
    New release for the new Sony 41.2.A.7.53 firmware, Android 7.1.1.