[KERNEL][Z2] Advanced stock kernel Marshmallow 6.0.1 - 09/aug/2016 - Xperia Z2 Android Development

Stock zImage
Add features:
busybox auto-injection (/system/xbin)
init.d support - automatically creates init.d in (/system/etc)
twrp-sony-recovery-boot-script based (Thanks @nilezon /jackfagner github script)
TWRP recovery 3.0.2-0 Modified (vol up or down when Violet LED)
Removed SuperSU in TWRP recovery to root because this method will not work
Systemless root support
SElinux permissive
RIC disabled
Debugging enabled by default
Disable debugging notification icon in the status bar
Kernel insecure (ro.secure=0)
Fix swappiness (100 to 60) - as 3.4 kernel source - Improved memory management (23.5.A.1.291 not modified yet)
* Required Bootloader Unlocked!
* Installation:
Downloads:
Advanced_Stock_Kernel_Z2_MM_6.0.1_23.5.A.0.570
Advanced_Stock_Kernel_Z2_MM_6.0.1_23.5.A.1.291
-Flash via recovery or unpack and flash boot.img via fastboot
Code:
fastboot flash boot boot.img
* Root:
-Flash a Systemless SU: SuperSU-v2.76
Note:
- The first boot may take some time, and give the impression that you are in a bootloop. Just wait and it will boot up normally eventually.
* Restore DRM:
-Flash Restore DRM - SONY DRM FUNCTION RESTORATION FOR UB DEVICE
* Please, do not mirror!
Also give a special thank you to @shoey63 in which helped make this possible
Enjoy and press the Thanks button if you like! :good:
.

I'm gonna try it tonight when i plan to swap to MM

thx you.bro.

Gustavo RD78 said:
-Flash Restore DRM - SONY DRM FUNCTION RESTORATION FOR UB DEVICE
.
Click to expand...
Click to collapse
has anybody tried if this actually still works on MM?

Gustavo RD78 said:
Add features:
twrp-sony-recovery-boot-script based (Thanks @nilezon /jackfagner github script)
TWRP recovery 3.0.0-0 Modified (vol up or down when Violet LED)
Removed SuperSU in TWRP recovery to root because this method will not work
Systemless root support
SElinux permissive
RIC disabled
Debugging enabled by default
Disable debugging notification icon in the status bar
Kernel insecure (ro.secure=0)
Fix swappiness (100 to 60) - as 3.4 kernel source - Improved memory management
* Required Bootloader Unlocked!
* Installation:
Download:
Advanced_Stock_Kernel_Z2_MM_Beta_23.5.A.0.486_twrp _3.0.0-0
-Flash via recovery or unpack and flash boot.img via fastboot
Click to expand...
Click to collapse
:good: Thank you, it works for Z2

Works perfectly, thangs
Sent from my D6503 using Tapatalk

Will this give me recovery access without wiping everything on my phone? I have MM beta right now without recovery

edzilla said:
Will this give me recovery access without wiping everything on my phone? I have MM beta right now without recovery
Click to expand...
Click to collapse
Yes he will go

Please add Qc- 2.0 HACK in your Kernel )

pseudoheld said:
has anybody tried if this actually still works on MM?
Click to expand...
Click to collapse
Yes. I installed it . it works

Gustavo RD78 said:
Stock zImage
Add features:
twrp-sony-recovery-boot-script based (Thanks @nilezon /jackfagner github script)
TWRP recovery 3.0.0-0 Modified (vol up or down when Violet LED)
Removed SuperSU in TWRP recovery to root because this method will not work
Systemless root support
SElinux permissive
RIC disabled
Debugging enabled by default
Disable debugging notification icon in the status bar
Kernel insecure (ro.secure=0)
Fix swappiness (100 to 60) - as 3.4 kernel source - Improved memory management
* Required Bootloader Unlocked!
* Installation:
Download:
Advanced_Stock_Kernel_Z2_MM_Beta_23.5.A.0.486_twrp _3.0.0-0
-Flash via recovery or unpack and flash boot.img via fastboot
Code:
fastboot flash boot boot.img
* Root:
-Flash a Systemless SU: BETA-SuperSU-v2.68-20160228150503.zip
Note:
- The first boot may take some time, and give the impression that you are in a bootloop. Just wait and it will boot up normally eventually.
* Restore DRM:
-Flash Restore DRM - SONY DRM FUNCTION RESTORATION FOR UB DEVICE
* Please, do not mirror!
Also give a special thank you to @shoey63 in which helped make this possible
Enjoy and press the Thanks button if you like! :good:
.
Click to expand...
Click to collapse
Great. Thanks. Is this kernel with Kexec Hardboot Support for multirom Secondary too ?

Thanks (Pressed). Its work perfectly on Z2 MM. Great Man!!!

can anyone help?
everytime i download the systemless root SuperSU zip ,and i test it with winrar it says : ! C:\Users\xx\Desktop\mm\BETA-SuperSU-v2.68-20160228150503.zip: The file "common\file_contexts_image" header is corrupt

Thank you, you're a great man! Everything works well ....

WORKING FLAWLESSLY
You're epic...good job

v2 - busybox auto-injection (/system/xbin)
v2 - init.d support - automatically creates init.d in (/system/etc)
Note: when installing v2 flash again SuperSU

It works like charm.
Thanks @Gustavo RD78 for your great work ??

akshay2shah said:
Hey I m not able to flash this kernal.
I have unlocked bootloader.
I m on mm 6.0.1.
I don't have root.
Help me please.
Sent from my D6503 using XDA-Developers mobile app
Click to expand...
Click to collapse
unpack .zip and flash boot.img via fastboot
Code:
fastboot flash boot boot.img

Gustavo RD78 said:
unpack .zip and flash boot.img via fastboot
Code:
fastboot flash boot boot.img
Click to expand...
Click to collapse
Deleted.

akshay2shah said:
I did this already !!
I shows 'failed'
What to do now ?
Sent from my D6503 using XDA-Developers mobile app
Click to expand...
Click to collapse
both versions 1 and 2 you face this problem?
He tried to FlashTool?

Related

[ICS][.13] emwno's.kernel w/ Dual Recovery - Discontinued

Discontinued
TWRP Version: 2.4.3
CWM Version : 5.5.0.4
E Kernel Version: Build 3 - U2
Presenting the first Dual Recovery Kernel for Arc/S and Pro. Your warranty is now void bla bla bla. I'm working on bringing TWRP to ICS based kernels (not cm9) and have been successful, worked on this alone for hours. Thankyou to @Rachit Rawat for allowing me to use some ramdisk files from his sources and Teamwin for creating TWRP. Ill write the rest of the thread later on. Both of the kernels are attached. And for those wondering, yes its been reported to be fast, pretty responsive with great battery life.
To use TWRP hit the volume down button when the led lights up pink. And to enter CWM hut the volume down key at the next led light up and vibration.
Note: TWRP and CWM are not the same when backing up or restoring, you will not be able to restore ones backup from another.
What works:
Twrp
Cwm
Flashing
Backup
Restore
Mount device partitions
Mount external partition
Boot
___________________________________
What Doesn't Work:
ADB sideload (twrp)
___________________________________
Whats There:
Init.d support
CWM
Built with Linaro
TWRP
Newest .13 kernel sources from Sony
Many Governers / IO schedulers
Overclocking support
Cache Compresion
___________________________________
Download:
Arc/S - Build 3 | Modules -- LIVE
Pro - Build 2 | Modules
___________________________________
Changelog:
Build 3 - U2
--boot--
Updated to TWRP 2.4.3
Minimal ramdisk changes
Better sleep
Build 3 - U1
--No boot--
Updated to TWRP 2.4.3
Minimal ramdisk changes
Better sleep
Build 2
TWRP updated to 2.4.1
Attempted fix for adb issues with twrp (need to test)
Fixed specific partition layouts (twrp)
Build 1
Xperia Arc/S boot
Official public release
Fillers added
Update 2
Removed fillers
New init.rc
Pro boot fixed
Modified mount points (pro / arc)
Arc/S still no boot
Update 1
Initial beta release
Much not working
Old stuff. not required.
Since I've got the 2nd post, let me point out the things which are working / not working in TWRP:
Working:
Flashing zips
File Manager
Backup (Haven't tried Restore)
Terminal Command (Little buggy keyboard)
Not Working:
ADB Sideload via TWRP
ADB and Mount USB Storage
(Bug) Aroma Installer works only half screen
A note on backup:
If you got any issue while making a nandroid backup, download the attachment, extract the file and move it to /sdcard/TWRP
If the check-box of .android_secure does not get displayed in Backup menu, go back and enter Mount Menu, unmount SD Card and mount it again. Go to Backup menu again and select Refresh Sizes. .android_secure will be visible now.
soumya_digi said:
Black screen for me. No bootlogo or anything.
Device : LT15i
Click to expand...
Click to collapse
Link updated for Arc. try the new one.
this is based on @Rachit Rawat kernel ???
Re: [.13] E Kernel w/ TWRP [Pro/Arc]
[noob] what is TWRP ?
leo_nidas said:
this is based on @Rachit Rawat kernel ???
Click to expand...
Click to collapse
not based on, just some ramdisk files acquired. for (.13) base.
steliosvola said:
[noob] what is TWRP ?
Click to expand...
Click to collapse
its a recovery like cwm. you can read more here: http://www.teamw.in/project/twrp2
download wow 11MB wifi modules includet or must be downloaded ???
leo_nidas said:
download wow 11MB wifi modules includet or must be downloaded ???
Click to expand...
Click to collapse
Oops, forgot to upload them. uploading now. will update op when done.
Same with e_anzu.img too.
i have a black screen on new link - i have ARC/S
leo_nidas said:
i have a black screen on new link - i have ARC/S
Click to expand...
Click to collapse
soumya_digi said:
Same with e_anzu.img too.
Click to expand...
Click to collapse
try this one. it should work. http://d-h.st/hqg
Guess ur replacing the link for new one ? Coz, ur arc link, is deleted.
vashta said:
Guess ur replacing the link for new one ? Coz, ur arc link, is deleted.
Click to expand...
Click to collapse
Links working
---------- Post added at 11:54 AM ---------- Previous post was at 11:48 AM ----------
Kernel is Working TWRP working Wifi working GPS working Good
test on my Xperia T mod by zohaib0001
Boot successful! :good:
Testing other things now.
BTW, the /vendor partition is not /system/vendor. Need to modify init.semc.rc or else people will have issues with sound enhancements.
Vermagic string is indicating Serene-ICS!
EDIT: Damn, this thing has dual recovery! :cyclops:
Is this dual boot ? After I install modules(1).zip, after i touch 'reboot system', I end up in cwm again.
But after i reboot system (from that cwm menu), its back to TWRP again when i press vol down.
Anyway.. the wifi works, so far no facing problems. no bootloop etc.
In the info, it's still serene kernel.
* Kinda not used with this touch screen menu in twrp .
Nice work mate.
Test on 4.1.B.1.13 ROM by Jader
vashta said:
Is this dual boot ? After I install modules(1).zip, after i touch 'reboot system', I end up in cwm again.
But after i reboot system (from that cwm menu), its back to TWRP again when i press vol down.
Anyway.. the wifi works, so far no facing problems. no bootloop etc.
In the info, it's still serene kernel.
* Kinda not used with this touch screen menu in twrp .
Nice work mate.
Test on 4.1.B.1.13 ROM by Jader
Click to expand...
Click to collapse
Yeah itll say that. I needed the .13 kernel as I wanted to base it on that, was away from my pc so I asked Rachit Rawat if I could use some files from his source and kernel. Its not supoosed to go into dual boot, may have added them by mistake to the new update. (Too early)
vashta said:
Is this dual boot ? After I install modules(1).zip, after i touch 'reboot system', I end up in cwm again.
But after i reboot system (from that cwm menu), its back to TWRP again when i press vol down.
Anyway.. the wifi works, so far no facing problems. no bootloop etc.
In the info, it's still serene kernel.
* Kinda not used with this touch screen menu in twrp .
Click to expand...
Click to collapse
When the notification light glows pink, Vol down enters TWRP, else when blue light+vibration, CWM Recovery.
Backup and Restore Workin GOOD on TWRP - Thanks for your work
Installing as well..
but mass storage doesn't. my PC didn't see my sdcard..
divest said:
Installing as well..
but mass storage doesn't. my PC didn't see my sdcard..
Click to expand...
Click to collapse
Working:
Flashing zips
File Manager
Backup (Haven't tried Restore)
Not Working:
ADB Sideload via TWRP
ADB and Mount USB Storage
Working on CWM recovery

[Script]Wipe kernel

This is project for who need change kernel without re-flash rom
So let me call wipe kernel script
First must told I am newbie on it [emoji4]
Now have for 2 kernel
- boeffla
- Agni
I tested only for 4.4.2 without bootloop
Download for wipe boeffla
https://mega.co.nz/#!yNsXwSiZ!GorIhMDkLH_FUv_gWd5whfoioANgOw0tNQ0N6gTC1X8
Download for wipe Agni
https://mega.co.nz/#!XYN0TCCa!Bxc90s3j04sIJtjlaFONMlIeRasXgY0GzCIFrgz5qTk
How to:
- uninstall config app for that kernel
- remove init.d script (only Angi)
- reboot to recovery mode
- flash wipe script
- reboot to recovery mode again (not normal reboot)
- flash your new kernel
- reboot it 's done
Aonja said:
This is project for who need change kernel without re-flash rom
So let me call wipe kernel script
First must told I am newbie on it [emoji4]
Now have for 2 kernel
- boeffla
- Agni
I tested only for 4.4.2 without bootloop
Download for wipe boeffla
https://mega.co.nz/#!yNsXwSiZ!GorIhMDkLH_FUv_gWd5whfoioANgOw0tNQ0N6gTC1X8
Download for wipe Agni
https://mega.co.nz/#!XYN0TCCa!Bxc90s3j04sIJtjlaFONMlIeRasXgY0GzCIFrgz5qTk
How to:
- uninstall config app for that kernel
- remove init.d script (only Angi)
- reboot to recovery mode
- flash wipe script
- reboot to recovery mode again (not normal reboot)
- flash your new kernel
- reboot it 's done
Click to expand...
Click to collapse
Thanks for this useful thread Aonja
Quick question: for wiping AgniKernel you mean remove the WHOLE scripts in init.d folder ?
Thanks
Yusuf

[ROOT][Kernel][TWRP] repack of the stock kernel with dm-verity and SONY RIC off

Changelog:
V5.23 Fix for Android 6 (Freeze on boot logo)
Installation of kcal kernel module for supported kernels. Get the app from https://forum.xda-developers.com/android/software-hacking/dev-kcal-advanced-color-control-t3032080
V5.22 Bug in the vendor overlay creation. Existing directories (like /vendor/bin) have not been replicated correctly
V5.21 Fix issue when running on Linux (some CR/LF)
Patch libsepol in bootimg for backwards compatibility with Android 6
V5.20 Support for superuser as an alternative to SuperSU (https://github.com/phhusson/Superuser)
Fix for the missing internal storage link in TWRP
V5.11 Support for Android 7.0
Fix in the overlay layout which could prevent some libraries from loading and cause battery drain
V5.1 Support for Android 7.0
Updated bootimg to deal with Android 7.0 policies
New tool inside bootimg for adding new contexts to binary file contexts
New system overlay layout due to a more restrictive linker in Android 7
V5.0 New system overlay method using the /vendor directory. As this directory is also in the library search path even libraries can be easily replaced without modifying the system partition
System-less SuperSU integration improved (Version 2.76 or higher recommended)
System-less xposed integration (using the standard distribution)
Support for 32.A.0.253
V4.51 Fix for awk script for Linux kernel version detection when running on Linux
V4.5 Fixed adb and mtp file access in TWRP for 32.2.A.0.224
V4.42 Added support for Z2 (Sirius) and TWRP fstab fix for leo and aries (thanks to waleedsq81)
V4.41 Fixed issue with Y/N choice on non-english Windows. Added support for Z3 (leo)
V4.4 Support for Z3+/Z4, Tablet Z2, Tablet Z3 and Tablet Z4 added (Z4 still has an issue with TWRP, but DRM fix works)
SuperSU integration reworked in order to need less SELinux exceptions and to be more secure
All tasks can now be individually selected. Therefore there is no separate DRM only script required
V4.31 Renabled Z5P (satsuki) and Z5C (suzuran) for TWRP and drmfix
V4.3 Support for older Lollipop added
Script execution for Linux fixed
V4.24 Fix for for a bug in SuperSU integration in V4.23
V4.23 Fix for repacking 3rd party kernel (Some permissions were on custom directories were lost)
V4.22 Bugfix for readta (flash_dk reported unit not)
V4.21 Fix for the Linux binary of bootimg
V4.2 Updated TWRP to 3.0.2
V4.1
Fix for WideWine (if you have your device key) Thanks a lot to goofnorf101 for testing
unpackinitfs and makeinitfs in my bootimg tool now maintain date/time of files correctly
Automatic SuperSU installation
V4.0
Fix for older kernels (Lollipop)
Binary for Linux (The older version had the ARM version packaged)
Device is not stored in the kernel image anymore
TWRP updated to version 3.0.1
FAQ - Please read
Is is possible to have root with locked bootloader?
Short answer: no
Long answer: The locked bootloader only boots unmodified kernel packages signed by Sony. The stock kernel only mounts unmodified /system partitions (dm-veritiy) -> No modification without unlocking
So any change to the kernel (like this script) or system partition requires unlocked bootloader
What is dm-verity?
A hash checksum on all blocks of a filesystem in order to verify the integrity
What is Sony RIC?
A protection to avoid mounting the root filesystem or system read/write
What happens if I unlock my bootloader
The device key (TA unit 0x1046b) will be wiped, which deactives everything DRM related. In addition a full wipe of your phone will be perfomed.
So extract your TA partition before with this great tool http://forum.xda-developers.com/crossdevice-dev/sony/iovyroot-temp-root-tool-t3349597 from zxz0O0
If you already unlocked the bootloader before, then at least the credentials will be restored, which will reactivate stuff like x-reality and camera de-noise
Why do I need to flash my device key?
Without your device only some functions can be reactivated, like x-reality. Other functions like widevine do not work with out your device key.
How do I enter TWRP recovery?
Restart your phone and press the volume key up as soon as the LED switches to yellow
I want to use a custom kernel with the DRM fix
Just say "N" to all other options. Nevertheless be prepared for problems if the custom kernel does not match your Android version.
What should I do if there is an update to this script?
First check if you really need to run this update by checking the changelog. E.g. if it says binary for Linux fixed and you are using Windows then probably you don't care. If you did not change your Android version then all you have to do is to update the kernel package with fastboot flash boot. If you do not use the automatic SuperSU integration then you have to reinstall SuperSU in TWRP.
This tool repacks an existing kernel package (usually the stock kernel) in order to make it rootable and adds TWRP recovery as well. Version 4 has been succesfully tested with LP and MM.
In particular it adresses the following issues:
DM-Verity: Android is now using dm-verity to verfy the integrity of the system partition. Until you switch it off your phone won't boot after modifying /system
SONY RIC: RIC is blocking the write access to the system partition
DRM Keys: After unlocking the bootloader your device key is wiped, which deactivates some functionaliy. E.g. x-reality, denoise in camera aso.
Recompiling the kernel is not required as only the init ramdisk needs to be modified. You can run these scripts either in Windows or Linux.
Thanks to the excellent work of zxz0O0 you can now backup the TA partition before unlocking the bootloader with this tool http://forum.xda-developers.com/crossdevice-dev/sony/iovyroot-temp-root-tool-t3349597
If you managed to backup your TA partition before you unlocked the bootloader then this version will fully reactivate your keys as well. (many thanks to addicted1900 for helping me with the testing)
As there has been some confusion I would like to point out one more time that you cannot run any kernel package which is not signed by Sony without unlocking the bootloader. So this works only with unlocked bootloader.
As it seems that it is not clear to everyone I also want to mention that <...> is a placeholder. E.g. <extracted kernel> means that you should replace it with then name of your extracted kernel, which could be kernel.elf
There was a report that having SuperSU in the system partition installed may lead to a bootloop. Therfore you shoud first install the bootimage created by this script and then install SuperSU afterwards, as it will then use the system-less strategy.
In order to use these scripts you need the kernel boot image of your current version. There two different ways to obtain it:
Method1:
If you have a .ftf image then open it with zip application (7Zip, WinZip, Windows Compressed Folder) and extract kernel.sin. Afterwards use Flashtool -> Tools -> SIN Editor to extract the kernel. You should end up with the boot image with extension .elf.
Method2:
Run your favourite recovery and connect via
Code:
adb -d shell
Now run
Code:
find /dev -name boot
dd if=<output of the find command before> of=/sdcard/kernel.img
Once you have the kernel image you are ready to use the script.
The newest version support superuser as an alternative to SuperSU. This is available open source and can be verified. In order to integrated you need the current superuser.zip from http://superuser.phh.me/superuser.zip and to be install the app afterwards from Google Play (look for superuser phh) or build it yourself from github.
To integrate the kernel part just place superuser.zip in the rootkernel directory.
You can also still use SuperSU, although it is causing a huge battery draining on my Z5 with Android 7.0 If you place SuperSU in the same directory (SuperSU*.zip, case sensitive) then it will be also installed automatically . It did all the tests with 2.76, but newer versions should work as well. Please be aware that you can not update SuperSU within the application. For a newer SuperSU version you need to rerun the script.
If you want to integrate xposed as well just place the distribution for you device and Android version in the same directory. (e.g. xposed-v86-sdk23-arm64.zip). Only support with Android 6.0 (sdk 23) and higher.
xPosed for Android 7.0+ is still not available.
Code:
rootkernel <extracted kernel> boot.img
You are prompted for several choices:
Sony RIC is enabled. Disable?
I prefer not to disable it in order to keep my phone more secure. Unfortunately there are a lot of bad guys in this world and SELinux and RIC still can save us if someone discovers a new kernel exploit.
Sony RIC basically prevents mounting the /system partition for write. You can still modify it in recovery of of course, but if you require write access to /system without entering recovery then you need to disable it.
Install TWRP recovery? Here you should say yes unless you are trying to patch a non-stock kernel, which comes already with a recovery
Install busybox? For security reasons I prefer not to install. In recovery you have it anyway. This choice is only available if you chose install TWRP
Found SuperSU-v....zip. Install? Integrates SuperSU. For this option to show up you have to place the SuperSU package into the same directory with the name SuperSU*.zip (case sensitive)
Found superuser.zip. Install? Integrates superuser. For this option to show up you have to place superuser.zip into the same directory (case sensitive)
# Make su permissive (Permits any action as su)? This only appears if you install superuser. Permissive means you can anything as root, without it is restricted mainly to file operations (sufficient for e.g. Titanium Backup)
Found xposed-v....zip. Install? Integrates xposed system-less. For this option to show up you have to place the xposed for your device and Android version into the same directory. (e.g. xposed-v86-sdk23-arm64.zip)
Install DRM fix? Installs the DRM fix. First it tries to use the device key which you flashed with flash_dk. If it does not exist it uses an alternative method which cannot fix everything (e.g. Widevine will not work, but X-reality, Camera denoise etc. will work)
Now put your phone into fastboot mode (Volume Up + connect USB) and then run:
To test it without actually flashing it:
Code:
fastboot boot boot.img
For flashing it:
Code:
fastboot flash boot boot.img
If you managed to backup for TA partition before then you can reactivate your original device key as follows:
Code:
flash_dk <ta backup image> DK.ftf
Flashing this file with flashtool will write your device key to an alternative unit, from where the drmfix library will pick it up.
This is a one-time task. It will survive a complete reset of the phone or Android system upgrade. The device key has a length of just 16 bytes, so it is correct that the resulting DK.ftf has a size of only aprox. 500 bytes.
If you like my work you can buy me a coffee
Some background information:
There are two main tools involved (for both Android and Windows)
- busybox
Probably everyone knows it
- bootimg
A multicall binary with several tools for unpacking and packing the boot image as well as adapting the SELinux policy. Part of the code is written by me from scratch, some other parts are cherry picked from other projects. I will also provide the source for it. As Windows doesn't have softlinks I modified the tools for unpacking and packing the init ramdisk to write text files with __lnk__ at the end instead.
Would be great if someone shared E6653 stock .200 kernel boot.img or flashable zip so we can try this out
Funkmasterchilla said:
Would be great if someone shared E6653 stock .200 kernel boot.img or flashable zip so we can try this out
Click to expand...
Click to collapse
Do you want the kernel.sin of stock . 200?
lordriguez said:
Do you want the kernel.sin of stock . 200?
Click to expand...
Click to collapse
I am downloading the whole firmware again from xperifirm. Thank you mate !
Edit: Working great! I'll stick to stock kernel now since Androplus' consumes more battery while asleep !
Edit2: I successfully flashed recoveries in command window from my PC but can't access TWRP at boot though, no LED flashing.
Edit3: Ok that's cuz there's no recovery boot script obviously, my bad. That's above my pay grade, if somebody is kind enough to create a stock. 200 with recoveries it'd be much appreciated PM me if so
Edit!: I flashed monx new stock based kernel
Thank you Tobias !
tobias.waldvogel said:
Hi everyone,
as most of you know, even after unlocking the bootloader there are a few more requirements before you can modify the system partition, i.e. install SuperSU, xposed etc.
- Android is now using dm-verity to verfy the integrity of the system partition. Until you switch it off your phone won't boot after modifying /system
- SONY RIC is blocking the write access to the system partition
The good news is, that it is not required to recompile the kernel. It is sufficent to modify the init scripts inside the init ram disk. So you can just stick to the stock kernel.
I created a package which precisely does this job for you. Just run it from TRWP after installing a new Android version
With this you don't have to wait anymore until someone creates the right kernel package for your phone
PS: It leaves a copy of the new boot image in the internal sdcard if you want to save it somewhere. (boot.img) It can be flashed with fastboot if required.
Click to expand...
Click to collapse
Hmm... I don't understand what this zip file do with phone.... Can you explain more primitive for me?!
Is that for recover stock kernel with stock drm keys?! I understand correct?!
zavpasha said:
Hmm... I don't understand what this zip file do with phone.... Can you explain more primitive for me?!
Is that for recover stock kernel with stock drm keys?! I understand correct?!
Click to expand...
Click to collapse
Before you can start to install thing like SuperSU and xposed you have to change the kernel, otherwise your phone won't boot anymore. In the past you had to wait for someone to come up with a compatible kernel for your phone, now this package just converts your existing kernel.
Regarding the DRM please install the package from the DRM restore thread.
Funkmasterchilla said:
I am downloading the whole firmware again from xperifirm. Thank you mate !
Edit: Working great! I'll stick to stock kernel now since Androplus' consumes more battery while asleep !
Edit2: I successfully flashed recoveries in command window from my PC but can't access TWRP at boot though, no LED flashing.
Edit3: Ok that's cuz there's no recovery boot script obviously, my bad. That's above my pay grade, if somebody is kind enough to create a stock. 200 with recoveries it'd be much appreciated PM me if so
Edit!: I flashed monx new stock based kernel
Thank you Tobias !
Click to expand...
Click to collapse
Thanks for the feedback. Future versions of this package will add TRWP as well. I am currently working on it.
tobias.waldvogel said:
Thanks for the feedback. Future versions of this package will add TRWP as well. I am currently working on it.
Click to expand...
Click to collapse
As promised the new package with TWRP is out
tobias.waldvogel said:
As promised the new package with TWRP is out
Click to expand...
Click to collapse
Great work thanks ,
How would I go about disabling the vibration for recovery?
Sent from my E6653 using Tapatalk
Well, the script which checks if recovery should be started is bin/init inside the zip. If you don't like the vibrate then just remove the line and run the package again
Gesendet von meinem E6683 mit Tapatalk
huh, so it is possible to have 2 recoveries at the same time? (and why would anyone want 2 recoveries? )
Three Recoveries are als possible
CWM, Phils Touch & TWRP
Sent from my E6653 @ XDA Portal
Sorry for being noob.
I miss my Oneplus one where things were so easy.
After unlocking BL what do i do with this zip.
Is it going to Root my phone and Install TWRP?
Thanks for help.
I flash the v2 and i got bootloop. 4 time red LED and the phone reboot and all over again. What's the problem?
Hi Tobias,
can you please build a v2 for the z5 compact too?
thx
stiffmeister
FakeSmile said:
I flash the v2 and i got bootloop. 4 time red LED and the phone reboot and all over again. What's the problem?
Click to expand...
Click to collapse
On which model did you use it and with which firmware version?
If you used flashtool before then you can just flash the kernel one more time (i.e. deselect everything else).
stiffmeister75 said:
Hi Tobias,
can you please build a v2 for the z5 compact too?
thx
stiffmeister
Click to expand...
Click to collapse
This should work on Z5 compact with stock kernel as well, without any change.
In case of any issues you can flash the kernel again via flashtool
If it did not work you can pass me the generated boot.img from your interal sdcard for further analysis
hi tobias,
i didn't try the v2, because i thought, that the twrp recovery wouldn't be compatible.
but when you say it's ok, than i'll try it
br
stiffmeister
stiffmeister75 said:
hi tobias,
i didn't try the v2, because i thought, that the twrp recovery wouldn't be compatible.
but when you say it's ok, than i'll try it
br
stiffmeister
Click to expand...
Click to collapse
I flashed zombie kernel without making backup of stock kernel, can you share it with me so I can try this method (I doubt it will work on zombie)
ps : I have .200 fw
tobias.waldvogel said:
On which model did you use it and with which firmware version?
If you used flashtool before then you can just flash the kernel one more time (i.e. deselect everything else).
Click to expand...
Click to collapse
E6653 on .200 firmware

[KERNEL][XZ] WorldKernel Oreo

Here is a kernel pretty much stock built through the sources
Build kernel from clean sources
Add features ramdisk:
*Patched from Rootkernel V5.23 (UNOFFICIAL 2) Thank's to serajr
then: disabled encryption, dm_verity...
Removed all dependencies dm_verity
Disable boot verification
Decreased swappiness from 100 to 60
Removed Sony RIC and all dependencies
Add features Zimage:
Build with aarch64-linux-android-4.9
Enable toggle for CRC (stock Y, changed to N disabled for default)
Removed dm_verity
Disabled ecryptfs
Note that not all resource requests will be granted, this is a custom kernel built for my private use
But I'll be ready to the experience you have with some other kernel and/or feature that will bring improvements
* Required Bootloader Unlocked!
* Do not forget to back up your DRM keys!
* Installation:
Downloads:
WorldKernel_v1
WorldKernel_v2
-Flash via fastboot:
Code:
fastboot flash boot worldkernel_v2.img
* Root:
Recommended Magisk_v14-5
* Please, do not mirror!
* Github
* ChangeLog:
v1:
Initial build from sources 41.3.A.2.24
v2:
Removed Sony RIC and all dependencies
Enjoy!
Awesome.does this support dual version?
BTW are DRM functions all working?
josephnero said:
Awesome.does this support dual version?
BTW are DRM functions all working?
Click to expand...
Click to collapse
Build from single (and ramdisk)
DRM patched from Rootkernel V5.23 (UNOFFICIAL 2)
thanks for the answer.
PS:I flashed it on dual sim.I only have one sim so I don't know if second slot works but DRM patch isn't working.
josephnero said:
thanks for the answer.
PS:I flashed it on dual sim.I only have one sim so I don't know if second slot works but DRM patch isn't working.
Click to expand...
Click to collapse
did you backup DRM?
followed the instructions of the post?
you flash DK.ftf?
Gustavo RD78 said:
did you backup DRM?
followed the instructions of the post?
you flash DK.ftf?
Click to expand...
Click to collapse
Hmmm.no. I missed the part that I should flash DK.ftf is it in the first post?
josephnero said:
Hmmm.no. I missed the part that I should flash DK.ftf is it in the first post?
Click to expand...
Click to collapse
check:
https://forum.xda-developers.com/xp...oot-automatic-repack-stock-kernel-dm-t3301605
Code:
If you managed to backup for TA partition before then you can reactivate your original device key as follows:
Code:
flash_dk <ta backup image> DK.ftf
Flashing this file with flashtool will write your device key to an alternative unit, from where the drmfix library will pick it up.
This is a one-time task. It will survive a complete reset of the phone or Android system upgrade. The device key has a length of just 16 bytes, so it is correct that the resulting DK.ftf has a size of only aprox. 500 bytes.
note: latest flashtool not flash DK.ftf
So
use Xflasher:
https://forum.xda-developers.com/crossdevice-dev/sony/dev-xflasher-command-line-flasher-t2986634
rename DK.ftf to DK.zip, unpack DK.ta and follow the instructions in the thread
Ok thanks.
Gustavo RD78 said:
check:
https://forum.xda-developers.com/xp...oot-automatic-repack-stock-kernel-dm-t3301605
Code:
If you managed to backup for TA partition before then you can reactivate your original device key as follows:
Code:
flash_dk <ta backup image> DK.ftf
Flashing this file with flashtool will write your device key to an alternative unit, from where the drmfix library will pick it up.
This is a one-time task. It will survive a complete reset of the phone or Android system upgrade. The device key has a length of just 16 bytes, so it is correct that the resulting DK.ftf has a size of only aprox. 500 bytes.
note: latest flashtool not flash DK.ftf
So
use Xflasher:
https://forum.xda-developers.com/crossdevice-dev/sony/dev-xflasher-command-line-flasher-t2986634
rename DK.ftf to DK.zip, unpack DK.ta and follow the instructions in the thread
Click to expand...
Click to collapse
Thanks for your work .. so with this kernel we can restore our backed up TA.img and have root ?
If yes please someone post detailed instructions with needed tools
korom42 said:
Thanks for your work .. so with this kernel we can restore our backed up TA.img and have root ?
If yes please someone post detailed instructions with needed tools
Click to expand...
Click to collapse
No, You cannot run a custom kernel once you restore your TA. restoring your TA relocks the bootloader. The method mentions 'spoofs' the DRM keys to restore DRM functionality but it does not restore the trim area.
korom42 said:
Thanks for your work .. so with this kernel we can restore our backed up TA.img and have root ?
If yes please someone post detailed instructions with needed tools
Click to expand...
Click to collapse
gregbradley said:
No, You cannot run a custom kernel once you restore your TA. restoring your TA relocks the bootloader. The method mentions 'spoofs' the DRM keys to restore DRM functionality but it does not restore the trim area.
Click to expand...
Click to collapse
As quoted by @gregbradley...
Flash Magisk as quoted in the post will get root
Gustavo RD78 said:
check:
https://forum.xda-developers.com/xp...oot-automatic-repack-stock-kernel-dm-t3301605
Code:
If you managed to backup for TA partition before then you can reactivate your original device key as follows:
Code:
flash_dk <ta backup image> DK.ftf
Flashing this file with flashtool will write your device key to an alternative unit, from where the drmfix library will pick it up.
This is a one-time task. It will survive a complete reset of the phone or Android system upgrade. The device key has a length of just 16 bytes, so it is correct that the resulting DK.ftf has a size of only aprox. 500 bytes.
note: latest flashtool not flash DK.ftf
So
use Xflasher:
https://forum.xda-developers.com/crossdevice-dev/sony/dev-xflasher-command-line-flasher-t2986634
rename DK.ftf to DK.zip, unpack DK.ta and follow the instructions in the thread
Click to expand...
Click to collapse
Hi,
1 time task only, does it mean we have no need to reflash again, even we upgrade your kernel, or flash another ROM/kernel in the future, and still keeping the drmfix?
wc_how said:
Hi,
1 time task only, does it mean we have no need to reflash again, even we upgrade your kernel, or flash another ROM/kernel in the future, and still keeping the drmfix?
Click to expand...
Click to collapse
Since you have already restored DRM using the posted method:
after flashing this kernel you only need to flash Magisk to get root and you do not need to flash DK.ftf again for DRM
Gustavo RD78 said:
Since you have already restored DRM using the posted method:
after flashing this kernel you only need to flash Magisk to get root and you do not need to flash DK.ftf again for DRM
Click to expand...
Click to collapse
I can't get what's "DK.ft" are you referring to rhe firmware from flashtool /XperiaFirm
By the way I got into a bootloop by flashing this kernel on my XZ Dual (F8332)
korom42 said:
I can't get what's "DK.ft" are you referring to rhe firmware from flashtool /XperiaFirm
By the way I got into a bootloop by flashing this kernel on my XZ Dual (F8332)
Click to expand...
Click to collapse
Check this for create DK.ftf, make a thorough reading
https://forum.xda-developers.com/xperia-z5/development/root-automatic-repack-stock-kernel-dm-t3301605
everything working perfectly. thanks
edit. i realised i had some problems relative to your kernel with a couple apps. with one metaposta.app i cant open pdf files and with inbox i had some lag. I flash my own kernel stock with dm verity disable sony ric and now works . cheers
DRMfix will be broken if I use Magisk v15?
Yes, broke. Use posted in thread insted
Gustavo RD78 said:
Here is a kernel pretty much stock built through the sources
Build kernel from clean sources
Add features ramdisk:
*Patched from Rootkernel V5.23 (UNOFFICIAL 2) Thank's to serajr
then: disabled encryption, dm_verity...
Removed all dependencies dm_verity
Disable boot verification
Decreased swappiness from 100 to 60
Removed Sony RIC and all dependencies
Add features Zimage:
Build with aarch64-linux-android-4.9
Enable toggle for CRC (stock Y, changed to N disabled for default)
Removed dm_verity
Disabled ecryptfs
Note that not all resource requests will be granted, this is a custom kernel built for my private use
But I'll be ready to the experience you have with some other kernel and/or feature that will bring improvements
* Required Bootloader Unlocked!
* Do not forget to back up your DRM keys!
* Installation:
Downloads:
WorldKernel_v1
WorldKernel_v2
-Flash via fastboot:
* Root:
Recommended Magisk_v14-5
* Please, do not mirror!
* Github
* ChangeLog:
v1:
Initial build from sources 41.3.A.2.24
v2:
Removed Sony RIC and all dependencies
Enjoy!
Click to expand...
Click to collapse
Can this be used in this version?

[RECOVERY] [TREBLE] TWRP 3.3.1-0 with Tissot Manager

Thread template from CosmicDan's thread.
About
This is a TWRP Installer ZIP and bootable IMG with extra capability such as Treble-izing and other power-user tools with integrated TWRP-powered submenus that CosmicDan originally called Tissot Manager.
Few months ago, CosmicDan officially decided to leave Tissot development, and his twrp was stuck on 3.2.3. So I decided to update that to 3.3 and convert all the aroma stuff into TWRP-powered menus etc, in order to preserve better future compatibility.
HIGHLY recommended reading and guide for everyone new to Treble - [TREBLE][GUIDE] From Stock to Treble - everything you need to know! by CosmicDan. It also has some general protips hidden within there, for example the seamless/slot system interactions and nuances, so it's worth reading for anyone who wants to be a master of the Android flashing domain
Features:
TWRP fully Treble-ready based on 3.3.1-0;
Fully compatible with non-Treble devices - can be used as normal without Treble partitioning;
Full USB-OTG support;
Full MTP support;
Optional TWRP Survival function, that works both in hotboot and real recovery;
Optional Active slot install method, selectable right before the zip flash;
Option to ignore Payload<>Recovery certificate failures (fix for newer LOS-based ROMs);
Added a Tissot Manager list item under Advanced Menu, totally built-into TWRP itself that allows you to do:
Has the option to shrink Userdata to create Vendor partitions. All relevant partitions will be resized and formatted in one go.
Treble-izing will ERASE DATA AND INTERNAL STORAGE COMPLETELY - but your device will stay compatible with all existing non-Treble ROM's
Adds a "Patches" section with the following current options:
Patch kernel from Enforcing to Permissive and vice versa
More features coming!
All of this info is detailed inside the Tissot Manager GUI.
See screenshots in post 2.
Since this is an early version (still stable), some original features from 3.2.3 are still not available. I'll do my best to constantly add new functions when possible!
Instructions
Optionally boot the boot-recovery.img to get a temporary TWRP if you don't have it installed, unzipped from TWRP-3.3-withTM-BOOT.zip
Code:
fastboot boot boot-recovery.img
Warning - do not EVER flash this img - hotboot it only.
Flash the TWRP Installer. Any slot, any ROM, any existing Recovery - it doesn't matter - it will be installed to both slot kernels.
Reboot Recovery
Optional - Use the "Advanced > Tissot Manager" option for repartition options and other advanced ROM patches, this time built-in TWRP itself for better compatibility with future versions.
About TWRP survival
Starting from 1.0, TWRP Survival will be able both in hotboot mode 'n real recovery mode. Just tick the checkbox 'n flash!
Download
All downloads (and source code) always at:
https://github.com/Giovix92/twrp_device_xiaomi_tissot/releases
Additional sources not able to be listed in DevBB:
Modified update_engine: https://github.com/Giovix92/android_system_update_engine
What's next?
See [TREBLE][GUIDE] From Stock to Treble - everything you need to know! by CosmicDan for detailed instructions and learning on how to Treble like a pro.
FAQ
Q) After I flash TWRP, I get kicked into a Recovery loop when trying to boot the ROM!
A) This is probably because you have a kernel that does not disable dm-verity. To fix this, flash Magisk.
Q) After I flash TWRP, I get kicked into fastboot when trying to boot the ROM!
A) Your kernel is not Treble-compatible.
Q) How do I update TWRP?
A) Just flash the ZIP installer again, then Reboot Recovery. Note that this will erase Magisk on BOTH slots if you have it installed to either, requiring you to reflash it to one/both slots. See my Treble guide FAQ section for more info on Magisk interaction.
Q) If I shrink Userdata for Treble, will stock and OTA work?
A) I have heard varying results on this. It does for some, not for others. Please assume that this will NOT work.
Q) Can I restore a non-Treble TWRP backup after I repartition for Treble? And the other way around?
A) Yes! In fact, this is the easiest way for using stock ROM on Treble repartition. May also require a custom kernel with dm-verity disabled (see Questions above regarding fastboot kick and recovery loop).
Q) I see "Failed to mount '/system' (Device or resource busy)" red error in TWRP after flashing a ROM
A) You can safely ignore it. You just need to reboot recovery before you can flash anything else (like Gapps) to this ROM. This may occur while flashing in the active slot.
Q) What "Inject TWRP after install" option does?
A) It's TWRP Survival. If you check that checkbox, then after the installation of your zip file the TWRP will automatically reinstall TWRP into your slot.
Bugs Report
If any bug/problem may occur, feel free to report it here! Explain the problem and attach the recovery log. You can get it by going to Advanced - Copy Log and sliding. Kernel log isn't necessary.
If, for some strange reasons, you are unable to get into that menu', connect your phone to PC, open up CMD (aka command prompt) and type:
Code:
adb pull /tmp/recovery.log
Credits and Thanks
- @CosmicDan for tips, helps and his amazing work on TWRP 3.2.3, which I've taken many things from
- @nicknitewolf for his DT
- @chondoe for always being present in testing and reporting bugs/good news
- @flex1911 for DT stuff
- @mauronofrio for inject twrp function
XDA:DevDB Information
TWRP 3.3.1-0 with Tissot Manager, ROM for the Xiaomi Mi A1
Contributors
Giovix92
Source Code: [url]https://github.com/Giovix92/device_xiaomi_tissot[/URL]
ROM OS Version: 9.x Pie
ROM Kernel: Linux 4.x
Version Information
Status: Stable
Current Stable Version: 1.0
Stable Release Date: 2019-10-01
Created 2019-10-01
Last Updated 2019-10-01
Reserved
Changelog:
**10-11-2019**
- Fixed error 28 and 13, this led to some issues while doing a clean installation.
- Restored active slot install functionality, now it's fully working.
**18-10-2019**
Version: 2.0 (MAJOR UPDATE)
- Fixed all kind of problems while flashing:
- Error 51, 15, 31, 17, 35 (postinstall)
- Unability to make a clean flash
- Removed changelog section from Tissot Manager
- Added ADB God Mode
- Added missing binary, required in order to let selinux changer work properly
- Now the 2 new checkboxes won't stay checked anymore after any zip install
- Added system remount to r/w after zip flash in order to flash multiple zips in the same recovery session (like ROM + magisk + gapps and then reboot)
- Fixed linker problem that was causing some options in Tissot Manager to fail
- Smoother experience
Older changelogs:
**01-10-2019**
Version: 1.0
- Initial release with Tissot Manager, now powered by TWRP
- Optional TWRP Survival
- Ability to install into same slot
- Ability to repartititon to Treble and vice versa
- More features coming!
Reserved
Great work.
Sent from my Mi A1 using Tapatalk
Thanks ??
Nice. Bro you carried legacy ?
nice work waiting for shrp version of this ??
Noice :good:
Sent from my Mi A1 using XDA Labs
This is an update of TWRP Comic Dan?
manchirua said:
This is an update of TWRP Comic Dan?
Click to expand...
Click to collapse
Read op
Any way to flash it using cosmic dan's twrp? I don't have any pc now
Anikur Rahman said:
Any way to flash it using cosmic dan's twrp? I don't have any pc now
Click to expand...
Click to collapse
Q) How do I update TWRP?
A) Just flash the ZIP installer again, then Reboot Recovery. Note that this will erase Magisk on BOTH slots if you have it installed to either, requiring you to reflash it to one/both slots. See my Treble guide FAQ section for more info on Magisk interaction.
Great job dude ?
Awesome work!
Thank you so much for this.
@Giovix92
Great Job.
Is there a way to show the current slot status like in CosmicDan's ?
sdeft said:
@Giovix92
Great Job.
Is there a way to show the current slot status like in CosmicDan's ?
Click to expand...
Click to collapse
You can check current slot from reboot menĂº.
Where is the survival checkbox??
What is this "inject twrp" does ?
oskrprez said:
Where is the survival checkbox??
Click to expand...
Click to collapse
Anikur Rahman said:
What is this "inject twrp" does ?
Click to expand...
Click to collapse
That's the TWRP survival option
Unipo said:
That's the TWRP survival option
Click to expand...
Click to collapse
So, Isn't it automatically reinstalled like Comic Dan's version?

Categories

Resources