• XDA Forums have been migrated to XenForo. To discuss, report bugs and other issues, use this thread.

[TWRP]+[KERNEL]+[ROOT]-Xperia XA1 Plus with more features

Ab.Shaheen

New member
Jul 18, 2015
259
640
0
I am not having XA1 Plus anymore. This kernel is development discontinued. Sorry for that.

Hello Xperia lovers :mad: , Today i am going to present you Xperia XA1 Plus Stock kernel with more usefull features :D :D . Since Xperia xa1 plus is not added into XDA yet, Project device is selected temporarily. Will move it later when form Moderators will add this device. ;)
No need to tell about what is kernel and what it do :confused: . because almost everyone know these days about kernel and its working process.
So with this kernel you will get twrp 3.2.1 (Latest build) which i have moded to work with MTP devices.
More ever in some devices Data in encrypted automatically. Forcefully data encryption is disabled in this kernel.




Just simply turn on your device, wait for viberation and white led. then press Vol+ OR Vol- button to enter recovery mood Both will work.
This is intial release of this kernel, will update it with more features time by time.
wait for next release with more useful mods and features
To flash this kernel simply install Fastboot and ADB drivers and use flashtool in fastboot mood OR
install ADB and Fastboot drivers,

Then put boot.img in adb and fastboot home path and Or switch off your device and press Vol+ button and attach usb cable


Code:
Fastboot flash boot boot.img

Fastboot reboot
Warning :
Code:
This kernel needs unlocked bootloader
Your Warrenty is void.
i am not responsible if something goes wrong with flashing.
Attaching Stock Boot.img also in case if anyone want to move to stock kernel again.
Many Thanks to developers who inspired us and created tools to work smoothly.

XDA:DevDB Information
[TWRP]+KERNEL+ROOT-Xperia XA1 Plus with advanced features, Kernel for the Sony Xperia XA1

Contributors
Ab.Shaheen
Kernel Special Features: Added TWRP 3.2.1 (Go Through Vol+ OR Vol- on boot) , Disabled Force Encryption of data, Fully Supported Xperia XA1 Plus .117 Stock ROM. (Not Tested With Other ROMs), Disabled Force encryption of userdata,

Version Information
Status: Stable
Current Stable Version: 1.0
Stable Release Date: 2018-01-04

Created 2018-01-04
Last Updated 2018-10-09
 
Last edited:

Chainedge

New member
Aug 28, 2020
2
1
0
Backing up TA partition

My phone just went out of warranty, got into rooting business, struggled quite the bit about that TA partition. I see people here (albeit a year ago) not knowing how to as well.

It's doable via a Mediatek exploit that gives you (temporary) root access. Then you can use dd to copy off the partition. The dev did an exceptional job documenting, but it's good to have a wrap up here for the next person searching. (and yes, you can use that to install a locked Magisk, but lots of strings attached)

You need to understand a few things first:
  • If you have unlocked your bootloader without backing the partition up, sorry for you. These are specific to the device.
  • As they are bound to the device, there is no TA partition on stock firmware you download, nor you can use another phone's (even if it's the exact same phone) TA, you'll just brick your device.
  • Bootloader needs to be in a locked and untampered state to be able to utilize the DRM keys stored. The intention of backing them up is so you can reflash them after you unroot. They can't be used on a rooted phone unless some bright person shows up with a way. (Apparently there might be patchers that can patch keys on root, but that's up to you to look at.)
  • You can check the status of DRM keys by dialing *#*#7378423#*#* then tapping Service Tests>Security. All of them should be OK and FIDO should say Provisioned.
  • For the love of Linus, DO NOT LOSE THE TA.IMG FILE. If you do, you can say goodbye to those DRM features forever.
  • Obviously, just because it worked for me does not mean it will %100 work for you. Even though it involves a really low risk process compared to what people here call it a day, it still involves root commands (and gaining root access through an exploit) and may result in things not to be spoken of. Your call doing it or not. Read the docs, be sure your phone is on the list, double check each root command. And I, nor the devs behind the programs, don't take responsibility.
  • This will not wipe data off your device. Still, take a backup.
Woah, the warnings are already long. What you'll need is:
  • A copy of mtk-su, by Diplomatic, from https://forum.xda-developers.com/android/development/amazing-temp-root-mediatek-armv8-t3922213. Take note of your architecture before downloading (AIDA64 Mobile is a good way to know)
  • The dd-backup script by bigrammy (which will create a handy text file full of dd commands for each partition that'll let you copy them off) from https://forum.xda-developers.com/xa1/how-to/april-2019-ta-backup-unlocking-t3922565
  • A MTK chipped, compatible phone that is not patched against mtk-su exploit (Your security patch date should be before March 2020. As I remember XA1 Plus G3421 is August 2019), If patched, you will need to downgrade.
  • Termux Android app or ADB through a PC to to use a shell (I'll explain Termux becase ADB and mtk-su does create a bit of security concerns. If you still want to use that way, the page has it all)
  • A tiiiiny bit of knowledge about terminal commands such as cd, pwd, dir etc.
  • Some free space on your phone (TA is pretty small but if you want to back up all partitions including userdata and system, be sure to have 4-20 GB of space at hand. You can use the SD card, but you'll need to make a few changes to the DD commands for that. Will explain)
  • Optionally a file manager to see things around graphically.
  • The capability of thanking the devs who made it possible.

    NOTE: The moment you download mtk-su, whatever security program you have on your phone or PC will scream bloody murder. It's normal, you're downloading a known security exploit that can grant root access to an intruder. Make exceptions if you need to. Also, if you are backing it up all over the SD card make sure it's NOT FAT32 formatted or dd will fail once a single file exceeds 4 GB. Formatting it right inside Android will do the job.

  • First step, install Termux and get things needed. Run the app and run these:
    Code:
    apt update && apt upgrade
    Code:
    termux-setup-storage
    (sets up storage access)
    Optionally, to create a bash script to run the dd commands in one go (I won't explain how, but you can google that)
    Code:
    pkg install <code editor of your choice>
  • Then, time to pull the scripts into Termux's storage. First off copy the dd-backup.sh and mtk-su files to the root directory of your internal /sdcard, then run
    Code:
    cp /sdcard/mtk-su $HOME
    Code:
    cp /sdcard/dd-backup.sh $HOME
  • You'll need to grant executable permissions for these before running.
    Code:
    chmod 755 mtk-su
    Code:
    chmod 755 dd-backup.sh
  • Time to cross fingers and let the exploit do its job.
    Code:
    ./mtk-su -v
    You should see:
    Code:
    new UID/GID:0
    and the icon before your command line should be a # instead of $. If not, run again a few times. If yes, congratulations, you now have root access through that Termux session. It'll be gone the moment you close it though. (pro tip: DO NOT try to mount /system partition as read-write. You'll need to reflash stock to be able to barely boot thanks to dm-verity. Hopefully this code does not need that to work)
  • If all is well, run the dd-backup script
    Code:
    ./dd-backup.sh
    This will create a folder inside /sdcard called dd-backup and a dd-backup.txt inside it full of dd commands that'll each copy off a partition from the device, and pack it to an easily flashable .img file inside that dd-backup folder. The backup is not done yet, you need to paste each one, one by one, to the rooted Termux shell to do it.
  • (Optional)To use an SD card as the destination for backing up, you should open a new Termux shell, then path your way to the SD card using the cd (cd <folder> to go to the folder, cd .. to go up one directory) dir (show what's in the current folder) and pwd (shows the current path) commands. Hint, go up a few directories until you see the storage folder. The SD card is in it, most likely marked up with 8 alphanumeric characters, four, dash, another four. Such as 9021-4E27, NOT sdcard. Then note down the path. Then go create a new folder named dd-backup on the root directory of the SD card. After that, edit the dd-backup.txt the script just created, replace every /sdcard/dd-backup/blabla.img to /path/to/sd/dd-backup/blabla.img. Grant permissions and run mtk-su, then run the new commands to copy partitions to the SD card.
 

thrilller13

New member
Nov 3, 2013
21
0
0
Help plz bricked xperia xa1 plus no flashmode no fastboot mode no vibration no screen on only red light and fastboot says connected with usb debugging off
 

Vikingo1ero

New member
Jun 3, 2015
3
0
0
Dont work on my phone

I'm try on my phone and only boot again and gain on the logo, what is you recommendation?


I am not having XA1 Plus anymore. This kernel is development discontinued. Sorry for that.

Hello Xperia lovers :mad: , Today i am going to present you Xperia XA1 Plus Stock kernel with more usefull features :D :D . Since Xperia xa1 plus is not added into XDA yet, Project device is selected temporarily. Will move it later when form Moderators will add this device. ;)
No need to tell about what is kernel and what it do :confused: . because almost everyone know these days about kernel and its working process.
So with this kernel you will get twrp 3.2.1 (Latest build) which i have moded to work with MTP devices.
More ever in some devices Data in encrypted automatically. Forcefully data encryption is disabled in this kernel.




Just simply turn on your device, wait for viberation and white led. then press Vol+ OR Vol- button to enter recovery mood Both will work.
This is intial release of this kernel, will update it with more features time by time.
wait for next release with more useful mods and features
To flash this kernel simply install Fastboot and ADB drivers and use flashtool in fastboot mood OR
install ADB and Fastboot drivers,

Then put boot.img in adb and fastboot home path and Or switch off your device and press Vol+ button and attach usb cable


Code:
Fastboot flash boot boot.img

Fastboot reboot
Warning :
Code:
This kernel needs unlocked bootloader
Your Warrenty is void.
i am not responsible if something goes wrong with flashing.
Attaching Stock Boot.img also in case if anyone want to move to stock kernel again.
Many Thanks to developers who inspired us and created tools to work smoothly.

XDA:DevDB Information
[TWRP]+KERNEL+ROOT-Xperia XA1 Plus with advanced features, Kernel for the Sony Xperia XA1

Contributors
Ab.Shaheen
Kernel Special Features: Added TWRP 3.2.1 (Go Through Vol+ OR Vol- on boot) , Disabled Force Encryption of data, Fully Supported Xperia XA1 Plus .117 Stock ROM. (Not Tested With Other ROMs), Disabled Force encryption of userdata,

Version Information
Status: Stable
Current Stable Version: 1.0
Stable Release Date: 2018-01-04

Created 2018-01-04
Last Updated 2018-10-09
 

Ab.Shaheen

New member
Jul 18, 2015
259
640
0
Reserved

version 1
~Initial Release
~Based on XA1 PLUS Nougat (.117)
~Disabled force encryption
~Added latest version of TWRP (3.1.2)
~Added SELINUX status in settings > about > SELinux Status

Version 2
~Based on XA1 PLUS Nougat (.131)
~Initrd support added
~Disabled DM Verity.
~Set selinux to permissive

Version 3
~Based on latest Oreo update (.116 & .129)
~Disabled Force encryption (New method)
~Disabled DM-Verity (New Method)
~Updates twrp recovery to new and stable version.
~Battery life is extremely good. using since last week.
~Added some other tweeks.
~init.d still under process. (But you can use magisk module for init.d)

Version 4
~All Points from Version 3
~And new added features.
~If your data is already encrypted, you can decrypt your data from settings,
~Reworked magisk installer. ( Patch boot.img from magisk App by keep selecting preserve "force encryption" and "DM Verity options" Otherwise it may stuck at boot animation. )

Version 5
~Based on Oxa1 plus OREO (.138)
~reworked selinux to permissive
~reworked init.d support
~more stable and working "adb authorization prompt" and "developer options"
just install latest magisk zip to get root access.

Version 6
Updated kernel for 101 firmware.
 
Last edited:

Ab.Shaheen

New member
Jul 18, 2015
259
640
0
It's for latest firmware only? .117 one?
Does it support MAGISK or only SuperSU?
What about DRM fix/patch?

Sorry for so many questions, but probably some other user would ask them anyway :)
Yes , it support systemless magisk and supersu. I did'not checked with the other versions, may be supporting them or may be not.
DRM patch will be also in next releases of this kernel..
 
Last edited:

Ab.Shaheen

New member
Jul 18, 2015
259
640
0
root for 3426 dual is possible? thanks everyone

i had unlocked bootloder successiful, after i had installed this

https://forum.xda-developers.com/devdb/project/dl/?id=27994

phone restart normal.... not in twrp...

how can i install twrp and then install superuser for root....
thanks you...
I have not tested it on 3426. but it should work on that, just download Here It should work, but if not working then please provide kelnel.elf from stock ftf, i can compile it with twrp for you.
 
  • Like
Reactions: Broudi

enrik98

New member
Oct 31, 2017
14
3
0
thats not a big deal bro, now working on DRM patch, will update it later..
Hi!
I tried to change the frequency of the cpu with the app "kernel audiutor" and many other apps, but none of them managed to change the frequency of the cpu. I think the problem may be SONY ric
 

Alekim91

New member
Jun 30, 2012
258
17
0
I have not tested it on 3426. but it should work on that, just download Here It should work, but if not working then please provide kelnel.elf from stock ftf, i can compile it with twrp for you.
ok thanks you.... this twrp on my G3426 work very well, but i have try to instal superuser.zip.... just say fail....
how can i root my sony now? thanks you...
 

Ab.Shaheen

New member
Jul 18, 2015
259
640
0
ok thanks you.... this twrp on my G3426 work very well, but i have try to instal superuser.zip.... just say fail....
how can i root my sony now? thanks you...
SuperSu is also working very well on it, but if you will flash systemless zip from Here . System mode Supersu will cause bootloops or stuck at boot animation. And magisk works without any error, tested by me.
 
  • Like
Reactions: Broudi

Ab.Shaheen

New member
Jul 18, 2015
259
640
0
Hi!
I tried to change the frequency of the cpu with the app "kernel audiutor" and many other apps, but none of them managed to change the frequency of the cpu. I think the problem may be SONY ric
Still busy with DRM patch, ric is enabled therefore you are facing this problem, will update it now.
 

Alekim91

New member
Jun 30, 2012
258
17
0
for xa1 plus there is android oreo? nothing of news? thanks you

is possible to activate double tap to wake? i miss this feature from my z4+...... help me pls