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)
Xperia X Performance : https://mega.nz/#F!ClMRQZaT!vY2aFhVHlGqnqkgJZyDOrQ
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
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)
@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).
I need to say that I was afraid of losing all my data due "encryptable" flag, but they were preserved.
Recovery working flawlessly on both ways to enter on it (combo-keys with device turned off, or normal boot with volume + key press).
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?
Also, I'm creating a script to do the same! Gonna try it out.
Edit 2: Done, script is working like a charm!
serajr said:
@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).
Click to expand...
Click to collapse
Thanks, glad it works fine for you too
serajr said:
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?
Click to expand...
Click to collapse
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.
Adrian DC said:
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.
Click to expand...
Click to collapse
Thank you so much Adrian... everyting are working now. You're the one!
Just one thing, getenforce returns Permissive (yet)! Not a problem for me at all, but is that right?
I'm still on MM due development of my xposed framework modules.
serajr said:
Thank you so much Adrian... everyting are working now. You're the one!
Just one thing, getenforce returns Permissive (yet)! Not a problem for me at all, but is that right?
I'm still on MM due development of my xposed framework modules.
Click to expand...
Click to collapse
Thanks.
You patched the v2 on top of v1 ?
I don't share full boot or ramdisk, I modify them, hence better compatibility & less invasive changes,
and the permissive part is no longer touched, hence if you patched it, the kernel cmdline just stayed as it was.
If you want to, just reflash the boot from ftf (Kernel only listed), then reflash the v2.
You can also edit the bootimage with regular tools now that it's converted away from ELF.
And I could also upload you my N & M bootimages flasher if you need, let me know.
Adrian DC said:
Thanks.
You patched the v2 on top of v1 ?
I don't share full boot or ramdisk, I modify them, hence better compatibility & less invasive changes,
and the permissive part is no longer touched, hence if you patched it, the kernel cmdline just stayed as it was.
If you want to, just reflash the boot from ftf (Kernel only listed), then reflash the v2.
You can also edit the bootimage with regular tools now that it's converted away from ELF.
And I could also upload you my N & M bootimages flasher if you need, let me know.
Click to expand...
Click to collapse
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
serajr said:
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
Click to expand...
Click to collapse
Nice job.
working well with stock
V2 is working with latest kernel
Thank you
Keep updating
serajr said:
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
Click to expand...
Click to collapse
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.
Thank you working good with xz
karrouma said:
Thank you working good with xz
Click to expand...
Click to collapse
Do you mean you're using this directly on an Xperia XZ ? Or used my zip installer & a modified kernel ?
I could apply my patcher on XZ 39.0.A.1.xxx if you're interested and release it after validated test like this thread.
Adrian DC said:
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.
Click to expand...
Click to collapse
Thank you so much. Everything working as expected with v3! Great job as always!!
Could you please explain some points of the script?
What does "# Inject the cleared DTB" actually do?
Are there changes made into injected kernel to disable sony ric (or the ones into ramdisk only >> "# Patch the Sony RIC")?
serajr said:
Could you please explain some points of the script?
What does "# Inject the cleared DTB" actually do?
Are there changes made into injected kernel to disable sony ric (or the ones into ramdisk only >> "# Patch the Sony RIC")?
Click to expand...
Click to collapse
During the patch, I unpack the bootimage (Original ELF 64 bits or regular Android if already patched once),
do all the necessary changes & repack to regular Android, that just puts back all parts of the bootimage.
The kernel zImage is replaced, injected, inside the bootimage from the one I provide in the zip.
You can look at the kernel sources on GitHub linked in the OP
that hold the kernel patches including the removal of Sony RIC elements.
Adrian DC said:
Do you mean you're using this directly on an Xperia XZ ? Or used my zip installer & a modified kernel ?
I could apply my patcher on XZ 39.0.A.1.xxx if you're interested and release it after validated test like this thread.
Click to expand...
Click to collapse
Used your zip with androplus kernel
karrouma said:
Used your zip with androplus kernel
Click to expand...
Click to collapse
Ok then I can prepare a clean XZ kernel & let you try.
The init_sony is also different for Kagura, I built one a few days ago for an AOSP test, will be part of that.
Can anyone tell me what will be the sequence installation after TWRP to install modification and bring SU?
1st Flash SU
2nd Flash Mod
3rd Flash Androplus kernel
is that Correct?
This project is standalone, and goes on top of your Stock ROM.
Flash the patcher, then flash SuperSU.
After installing the patch I cant boot into recovery.
R_captivate said:
After installing the patch I cant boot into recovery.
Click to expand...
Click to collapse
What Recovery, what version, from where ?
Both my MultiROM and my regular TWRP recoveries work fine for me,
from Power & Volume- keys & from boot with init_sony (Volume+).
Already work. Thanks
Related
This is a kernel you can flash on any rom for amami, which uses the caf-based libraries and stock rom.
The most work on this was not done by me, this is more a package of work done by other people.
See the next post for installation instructions.
Features
- f2fs support
- cpuquiet cpu hotplug driver(disabled mpdecision automatically)
- lz4 support and lz4 kernel compression
- optional underclocking to 268 Mhz
- fiops i/o scheduler
- lcd color calibration support
- cpu undervolting support
- enabled zram
- faux123's sound control
- fastcharge support
- dynamic sync control by faux123
- '-Ofast'-optimizations
- 'proc/last-kmsg'
- vibration density sysfs interface
- TWRP recovery with f2fs support(stock-based only)
- [WIP] f2fs-compatible ramdisk(stock-rom only, for aosp-based check this
- init.d support(stock romonly, but already included in the most aosp-based roms)
- disabled ric service(stock only, not needed with aosp-based roms)
- prima wifi module
Issues
- exfat sdcards and usb storage can't get mounted
XDA:DevDB Information
MoshKernel-amami[aosp-based + stock], Kernel for the Sony Xperia Z1 Compact
Contributors
CoolDevelopment, faux123, DooMLoRD, FreeXperia, every android kernel developer
Kernel Special Features:
Version Information
Status: Testing
Current Beta Version: 0.3
Beta Release Date: 2014-09-08
Created 2014-07-16
Last Updated 2014-09-08
Reserved
How to configure cpuquiet
You can configure cpuquiet to the pefect use with your phone. You need root permissions and any shell, i. e. Terminal Emulator.
First run 'su' to get root permissions.
Change the minimum and maximum amount of online cpu cores:
Code:
file for max. amount of online cpus: /sys/devices/system/cpu/cpuquiet/cpuquiet_driver/max_cpus
file for min. amount of online cpus: /sys/devices/system/cpu/cpuquiet/cpuquiet_driver/min_cpus
Example:
echo 3 > /sys/devices/system/cpu/cpuquiet/cpuquiet_driver/max_cpus
echo 2 > /sys/devices/system/cpu/cpuquiet/cpuquiet_driver/min_cpus
The cpuquiet driver supports different governors, a bit like cpufreq governors. The governors which are currently present are: "runnable", "rq_stats", "load_stats", "balanced"
Find the best one for you by yourself
Code:
sysfs file: /sys/devices/system/cpu/cpuquiet/current_governor
Example: echo balanced > /sys/devices/system/cpu/cpuquiet/current_governor
Change the max screen-off cpu frequency and online cpus:
Code:
sysfs file for max. screen-off-freq: /sys/devices/system/cpu/cpuquiet/cpuquiet_driver/screen_off_cap
syfs file for max. screen-off online cpus: /sys/devices/system/cpu/cpuquiet/cpuquiet_driver/screen_off_max_cpus
Example:
echo 960000 > /sys/devices/system/cpu/cpuquiet/cpuquiet_driver/screen_off_cap
echo 1 > /sys/devices/system/cpu/cpuquiet/cpuquiet_driver/screen_off_max_cpus
Disable cpuquiet(and enable mpdecision):
Code:
sysfs file: /sys/devices/system/cpu/cpuquiet/cpuquiet_driver/enabled
Example:
echo 0 > /sys/devices/system/cpu/cpuquiet/cpuquiet_driver/enabled
start mpdecision #enable mpdecision
These settings only stick until you reboot. So better setup an init.d script, which applies your settings every boot.
If you aren't sure, what init.d scripts are, ask google.
Reserved
AOSP-based roms
The kernel for asop-based roms gets flashed using a special .zip, which only flashes zImage and dt. That means, there are no ramdisk-problems, which you didn't got before. The scripts inside the script are also modifying the ramdisk to don't have mpdecision enabled by default.
Installation
1. Flash the zip file through a recovery
Download
https://s.basketbuild.com/devs/CoolDevelopment/MoshKernel-amami/aosp-based/
Source: https://github.com/CoolDevelopment/MoshKernel-amami/tree/caf
Stock rom/Stock-based roms
Installation
1. Be sure you have an unlocked bootloader
2. Be sure you have installed busybox
3. Flash the zip file through a recovery
Download
https://s.basketbuild.com/devs/CoolDevelopment/MoshKernel-amami/stock-based/
Source: https://github.com/CoolDevelopment/MoshKernel-amami/tree/14.4.A.0.xxx
https://github.com/CoolDevelopment/MoshKernel-amami-stock-based-initramfs
Changelog
0.1
- initial commit
0.1.1
- revert back to row as default i/o scheduler
0.1.2
- update f2fs to current upstream
- replace Cyanogenmod branding with mine
- strip kernel modules, you don't need to download 30mb+ anymore
0.2
- removed intelliplug
- added cpuquiet cpu hotplug driver
- automatically disabled mpdecision(the scripts are modifying the ramdisk)
- fastcharge support
- '-O3'-optimizations
- lz4 support and kernel compression
- remove overclocking
0.3
- stock-rom support
. dynamic fsync control by faux123
- changed default configuration for cpuquiet
- prima wifi module for stock rom
- upstreamed f2fs commits from linux 3.17rc4
Any roms, Also cm11?
Inviato dal mio Xperia Z1 Compact
cicci0 said:
Any roms, Also cm11?
Inviato dal mio Xperia Z1 Compact
Click to expand...
Click to collapse
Yes
Whaa!! for CM based ROMs and Sony based ROMs!! that would be interesting,
also I like the idea of not having a ramdisk inside the zip, I'll probably use it for next releases of Pimped kernel,
And did you strip the kernel modules before putting them inside the zip??
the wlan.ko module is 43.5MB!! the kernel's zip is around 35MB!!!! that is alot.
BTW, great work, thanks for contributing again and again for our beloved device,
hope you the best:angel:
OmarEinea said:
Whaa!! for CM based ROMs and Sony based ROMs!! that would be interesting,
also I like the idea of not having a ramdisk inside the zip, I'll probably use it for next releases of Pimped kernel,
And did you strip the kernel modules before putting them inside the zip??
the wlan.ko module is 43.5MB!! the kernel's zip is around 35MB!!!! that is alot.
BTW, great work, thanks for contributing again and again for our beloved device,
hope you the best:angel:
Click to expand...
Click to collapse
I am sorry but it may not work on sony roms, you can try if you want. I didn't test it.
I did not even know that kernel modules can be stripped
Sent from my Xperia Z1 Compact using XDA Premium 4 mobile app
CoolDevelopment said:
I am sorry but it may not work on sony roms, you can try if you want. I didn't test it.
I did not even know that kernel modules can be stripped
Sent from my Xperia Z1 Compact using XDA Premium 4 mobile app
Click to expand...
Click to collapse
Well yeah that is the problem, I'm kinda sure that you can't use the same kernel for Sony and AOSP based ROMs in the same time!!
so you should mention in OP or in title that this kernel is for AOSP based ROMs so that users don't get confused...
Also if you haven't searched and found out about the stripping, you can do it by executing this:
<dir-to-toolchain>/bin/arm-eabi-strip --strip-unneeded <dir-to-modules-folder>/*
of course the arm-eabi-strip part depends on what toolchain you're using.
Hopefully that would help.
Works on unofficial slimkat
Sent from my Xperia Z1 Compact using XDA Premium 4 mobile app
It also works great with this : http://download.mokeedev.com/?device=amami
ps: Always love to use the FauxSound Audio/Sound Control and FauxClock apps
Thank You !!!!
:good:
Version 0.1.2:
- update f2fs to current upstream
- replace Cyanogenmod branding with mine
- strip kernel modules, you don't need to download 30mb+ anymore
If you want to use f2fs, I really suggest you to install this, the fixed bugs are really important. Else it is almost unneccessary
@CoolDevelopment
Very nice job! Finally we get a dedicated custom kernel for Amami
Oh and I saw the commits on CM gerrit. Nice job man :good:
I'll try flashing this on PAC. If what you say is true, that it doesn't modify the ramdisk, then it should boot. Otherwise I'll get stuck in a bootloop because PAC has custom jar files.
Finally some exciting development on Amami, testing now
EDIT: just a tip, you should ask a mod to move this thread to original development, because it really belongs there
EDIT2: it works perfectly
Yes it doesnt work on pa aslo :/
ygecesefa said:
Yes it doesnt work on pa aslo :/
Click to expand...
Click to collapse
Please give me details else i can't help
Sent from my Xperia Z1 Compact using XDA Premium 4 mobile app
it work on candykat rom
@cooldevekopment Is it possible to include TWRP instead of CWM in your kernel. I know there is a patch for f2fs that has TWRP buid-in, but anyway.
da900 said:
@cooldevekopment Is it possible to include TWRP instead of CWM in your kernel. I know there is a patch for f2fs that has TWRP buid-in, but anyway.
Click to expand...
Click to collapse
this kernel has no ramdisk, meaning it doesn't contain nether CWM nor TWRP,
whatever recovery you'll flash the kernel through, it won't be replaced with any other recovery
OmarEinea said:
this kernel has no ramdisk, meaning it doesn't contain nether CWM nor TWRP,
whatever recovery you'll flash the kernel through, it won't be replaced with any other recovery
Click to expand...
Click to collapse
Does this mean I can flash it even on a rooted stockrom?? 4.4.4 108 for example
djdana said:
Does this mean I can flash it even on a rooted stockrom?? 4.4.4 108 for example
Click to expand...
Click to collapse
Nope, because it is based on AOSP kernel source, which won't work on Sony based ROMs,
this kernel will only work on AOSP-based (CM-based) ROM..
To bad haha thanks for the quick reply
Intro:
CyanogenMod is a free, community built, aftermarket firmware distribution of Android 4.4 (KitKat), which is designed to increase performance and reliability over stock Android for your device.
Code:
#include
/*
* Your warranty is now void.
*
* We are 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 us for messing up your device, we will laugh at you.
*
*/
About CyanogenMod:
CyanogenMod is based on the Android Open Source Project with extra contributions from many people within the Android community. It can be used without any need to have any Google application installed. Linked below is a package that has come from another Android project that restore the Google parts. CyanogenMod does still include various hardware-specific code, which is also slowly being open-sourced anyway.
All the source code for CyanogenMod is available in the CyanogenMod Github repo. And if you would like to contribute to CyanogenMod, please visit out Gerrit Code Review. You can also view the Changelog for a full list of changes & features.
Not working:
- Using device microphone instead of headset mic in calls
You need the newest version of TWRP to flash this rom!
Downloads:
20160826
Google Apps (not required)
Installing guide (thanks to @Amish):
Download the rom and copy it to sd card
Boot into bootloader and flash this recovery
Boot into recovery
Wipe data/factory reset
Wipe cache partition
Select install zip from sd card.
Install the rom-zip.
Extract boot.img inside the roms zip-file.
Boot into bootloader and flash the kernel:
Code:
fastboot flash boot boot.img
Reboot your device, it will take about 10 to 20 min to boot.
Russian installing guide (thanks to @VFox777):
XDA:DevDB Information
CyanogenMod 11, ROM for the HTC One V
Contributors
jonas2790, rastomanchik
Source Code: https://github.com/AndroidPrimou/android_device_htc_primou/tree/cm-11.0
ROM OS Version: 4.4.x KitKat
ROM Kernel: Linux 3.0.x
Version Information
Status: Stable
Stable Release Date: 2016-08-26
Created 2015-03-15
Last Updated 2016-08-26
Changelog:
20160826:
- Security fixes
- Reverted some wifi changes
20160702:
- Fixes of the may and june android security bulletin
- Kernel security fixes
- Increased wifi voltage and other wifi changes
20160413:
- Fixes of the april android security bulletin
- Kernel security fixes
- Added a workaround to use handset microphone when calling with headset
- Fixed some audio bugs
20160312:
- Fixes of the March android security bulletin
- Added vdd sysfs interface for voltage control
20160207:
- Fixes of the February android security bulletin
20160108:
- Important security fixes from the android security bulletins
20150916:
- Set the default scheduler to FIOPS
- Added some NAND tweaks
- Minor kernel security fix
20150826:
- Security fixes for new Mediaserver vulnerability
- OTA server optimizations
20150816:
- Fixed the stagefright vulnerability
- Increased available ram
20150712:
- Based on final cm11 snapshot
- Enabled standalone power collapse for battery saving
- Increased earpiece volume
20150620:
- Wifi disconnecting bug fixed
- Music force-close bug fixed
- Wifi-direct support added
- Fixed screen flickering bug
- Panel initialization time improved
- Flashlight now also works when screen is off
- Disabled low-ram ui
20150527:
- Internal storage support (Micro-sd still is the default storage)
- Added DeviceSettings control for doubletap2wake tapping-height
- OTA-Updating support
- Enabled app switching button
- Reduced wifi scanning interval to 15s
- New bcmdhd kernel driver with updated firmware
- Fixed wifi and bluetooth bugs
- Decreased zram size to 128mb
- Fixed noise cancellation for speakerphone
- Improved earpiece sound quality
- Much smaller changes
20150502:
- Using better memory allocation
- Camera bugs and crashes fixed
- Performance improvements
- Changed default governor (Intelliactive)
- Has some wifi bugs again...
20150425:
- Wifi bugs fixed
- Bad earpiece sound fixed
- Added flashlight toggle for quicksettings
- Enabled sd card swapping without reboot
20150421:
- Much more available ram (363mb)
- Device specific settings app added
- Added sweep2wake and doubletap2wake
20150414:
- Video recording bug fixed
- Bass bug fixed
- New kernel with much changes
- Increased zRam size (256mb)
- Much other changes
20150321:
- Headset button issue fixed
- Signal-strength fixed
- ro.config.low_ram enabled (everything should be faster and smoother now)
- Set permissions for /dev/diag
- Enabled zRAM
20150319:
- Earpiece bug fixed
20150318:
- No Gapps workaround needed
- ADB security turned on again
- Disabled KSM
- Updated CM sources
- Some minor changes
- Bug: Earpiece doesn't work
20150315:
- First release
- ADB auth turned off
What are the differences between this and Rastomanchiks file?
Neff_V said:
What are the differences between this and Rastomanchiks file?
Click to expand...
Click to collapse
Not really much differences, I disabled the low_ram prop to get some nice kk effects and I enabled ksm, which may improve performance.
CM file manager works and I didn't include OpenCamera.
By the way: I wrote 1ceb0x, who also had this problem with shpongle and he used precompiled binaries. If we can get those binaries to run on kitkat, bass will work.
Its like dream come true i will flash it asap
gapps and some screenies please.
Thanks.
Installation failed
Amish. said:
Installation failed
Click to expand...
Click to collapse
Short answer: Use my latest twrp.
Long answer: You need a selinux enabled kernel in your recovery. The function set_metadata_recursive which sets selinux-contexts and permissions doesn't work without a selinux supporting kernel.
jonas2790 said:
Short answer: Use my latest twrp.
Long answer: You need a selinux enabled kernel in your recovery. The function set_metadata_recursive which sets selinux-contexts and permissions doesn't work without a selinux supporting kernel.
Click to expand...
Click to collapse
yes i did that..and installation was successfull but now my phone is bricked or what idk...htc logo came once and then black screen past 1-2hrs...cant get into bootloader..no adb..no response to any button..
Amish. said:
yes i did that..and installation was successfull but now my phone is bricked or what idk...htc logo came once and then black screen past 1-2hrs...cant get into bootloader..no adb..no response to any button..
Click to expand...
Click to collapse
Did you flash the kernel (boot.img in archive)?
Hold the power button for about 15 seconds and it should reboot into recovery.
jonas2790 said:
Did you flash the kernel (boot.img in archive)?
Hold the power button for about 15 seconds and it should reboot into recovery.
Click to expand...
Click to collapse
i did a full wipe and flashed the cm11.zip..i tried all those things..holding power button and all nothing..on using adb commands now its saying device is offline.
Thanks for screenies.
Amish. said:
i did a full wipe and flashed the cm11.zip..i tried all those things..holding power button and all nothing..on using adb commands now its saying device is offline.
Thanks for screenies.
Click to expand...
Click to collapse
You can't brick your device by flashing a rom.
Is your phone S-Off or S-On?
Try plugging it into a charger, maybe it has run out of battery.
jonas2790 said:
You can't brick your device by flashing a rom.
Is your phone S-Off or S-On?
Try plugging it into a charger, maybe it has run out of battery.
Click to expand...
Click to collapse
s-on is root right? s-on as per my memory.
Amish. said:
s-on is root right? s-on as per my memory.
Click to expand...
Click to collapse
No, S-On is the HTC restriction for rewriting some partitions, like the kernel partition if you're in recovery mode.
If your phone is S-On (it is by default, even with root and unlocked bootloader), you have to flash a kernel by rebooting into fastboot mode.
So if you didn't flash the kernel, you know the problem now. Did you already get it working again?
jonas2790 said:
No, S-On is the HTC restriction for rewriting some partitions, like the kernel partition if you're in recovery mode.
If your phone is S-On (it is by default, even with root and unlocked bootloader), you have to flash a kernel by rebooting into fastboot mode.
So if you didn't flash the kernel, you know the problem now. Did you already get it working again?
Click to expand...
Click to collapse
I used to directly flash the roms.zip file..never flashed kernel separately..nope its not working..htc one v is the only phone i have..:*
Amish. said:
I used to directly flash the roms.zip file..never flashed kernel separately..nope its not working..htc one v is the only phone i have..:*
Click to expand...
Click to collapse
Can you open a thread in the help forum for this please? What exactly is happening with the phone?
jonas2790 said:
Can you open a thread in the help forum for this please? What exactly is happening with the phone?
Click to expand...
Click to collapse
i guesss it was battery drain or what...it started now...i flashed the kernel using fastboot and adb commands..i guess i will fall in love within few minutes...does boot take long time?
Amish. said:
i guesss it was battery drain or what...it started now...i flashed the kernel using fastboot and adb commands..i guess i will fall in love within few minutes...does boot take long time?
Click to expand...
Click to collapse
Just finished uploading my new build
Yes, first boot does take a really long time.
jonas2790 said:
Just finished uploading my new build
Yes, first boot does take a really long time.
Click to expand...
Click to collapse
Put installation section also..now what should i do...update? i had flashed pico PA-gapps
Amish. said:
Put installation section also..now what should i do...update? i had flashed pico PA-gapps
Click to expand...
Click to collapse
You can do it without a wipe, but I wouldn't, I always do a full wipe.
jonas2790 said:
You can do it without a wipe, but I wouldn't, I always do a full wipe.
Click to expand...
Click to collapse
can we start dreaming about cm12?
This Thread is deprecated!
Please use https://forum.xda-developers.com/sony-xperia-z1-compact/development/rom-lineageos-15-1-xperia-z1-compact-t3884247/
We'll provide Lineage 15.1 builds there as well. They come in two different flavours:
pure LineageOS
Security hardened microG LineageOS
Functionality is completely the same as provived by the builds from this thread - they are build from the same sources. Only difference: The new builds are signed to guarantee a maximum of security.
Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* We are 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 us for messing up your device, we will laugh at you. Hard & a lot.
*
*/
Status
List template by AdrianDC
Code:
- Boot : Ok
- GApps : OpenGApps Micro recommended
- Partitions (Data, Cache) : Ext4 and F2FS supported
- Bluetooth : Ok
- WiFi : Ok
- WiFi Hotspot : Ok
- RIL - Phone - Data : Ok
- GPS : Ok
- Camera : Ok
- Camcorder : Ok
- Lights : Ok
- MicroSD : Ok
- Accelerometer : Ok
- Compass : Ok
- Gyroscope : Ok
- Touchscreen : Ok
- FM Radio : Ok
- ANT+ : Ok
- Vibrator : Ok
- Microphone : Ok
- Audio & music : Ok
- Bluetooth audio : Ok
- MHL: didn't test
- NFC : Ok
- Kernel : Ok
- Graphics : Ok
- 3D Rendering : Ok
- Clock : Ok
- Offline Charging : Ok
- USB : Ok
- USB OTG : Ok
- Encryption : Ok, but installing updates only works with adb sideload!
- SEPolicies : Enforcing
Download
https://androidfilehost.com/?w=files&flid=269301
latest version: https://www.androidfilehost.com/?fid=11410963190603873784
Click to expand...
Click to collapse
FAQ
What about device encryption?
Device encryption is working. You only have to keep in mind that you need a PC with adb to install systemupdates.
Flashing via recovery isn't working until now, because there isn't a recovery capable of decrypting Oreo /data partitions at the moment. But an easy "adb sideload" should do the job. Or installing from the external SD card.
Click to expand...
Click to collapse
What about reboot to recovery?
Reboot to recovery is only working with magisk installed. Investigating this...
Reboot to recovery is working as it should now (and of course also without magisk).
Click to expand...
Click to collapse
What about GPS?
GPS apps like GPS Status&Toolbox or SatStat don't get location fixes. Nevertheless navigating with Osmand or googleMaps should work. Positionfinding is also slow. Got better
Click to expand...
Click to collapse
I found a bug. What should I do?
We need your feedback for optimization. But your feedback is only useful in connection with logs --> see section Bugreports
Click to expand...
Click to collapse
What about root access?
Root isn't included per default (except root over adb, but it's off by default).
If you want to gain root access to your apps use one of these (depending on your taste/needs):
Official Lineage Add-on https://download.lineageos.org/extras use su (arm) 15.1 here and flash via TWRP
Magisk https://forum.xda-developers.com/apps/magisk/official-magisk-v7-universal-systemless-t3473445
Click to expand...
Click to collapse
Bugreports
You'll find information about logging here.
Please also note how you got the error or how it can be reproduced.
Click to expand...
Click to collapse
Sources
Kernel: https://github.com/AICP/kernel_sony_msm8974
Manifest: https://github.com/115ek/manifest
Click to expand...
Click to collapse
Credits
SpiritCroc: big thanks to him for maintaining the device trees and a lot of very useful hints
rcstar6696
SuperLamic
drakonizer
AdrianDC
munjeni: thanks for tips and tricks
nailyk: thanks for tips and tricks
All the other contributors on sony msm8974 platform
LineageOS team
Click to expand...
Click to collapse
XDA:DevDB Information
Lineage OS 15.1 for Xperia Z1 compact - amami, ROM for the Sony Xperia Z1 Compact
Contributors
115ek, SpiritCroc, drakonizer, rcstar6696, SuperLamic, AdrianDC, nailyk, LineageOS team
Source Code: https://github.com/115ek/manifest
ROM OS Version: 8.x Oreo
ROM Kernel: Linux 3.4.x
Version Information
Status: Beta
Beta Release Date: 2018-09-10
Created 2018-09-10
Last Updated 2019-03-18
Changelog
13.12.2018
fixed wrong bluetooth MAC address (00:00:00:00:5a:ad on all devices), now displaying correct device specific one
12.12.2018
synced LineageOS sources (security patch level December 05, 2018)
11.11.2018
fix problem with Lineage SU addon by using 64-bit binder API (thanks @NyQuilXT)
synced LineageOS sources (security patch level November 05, 2018)
14.10.2018
fixed GPS 3D fix
08.10.2018
fixed MHL (thanks @koron393)
added callrecording
synced LineageOS sources (security patch level October 05, 2018)
23.09.2018
fixed reboot to recovery without magisk
minor improvements from AICP devices trees (thanks @SpiritCroc)
synced LineageOS sources
10.09.2018
initial release
Hi 115ek. Thanks for making this. I'm not new to flashing but I have a question nonetheless. What do you mean by
Encryption : Ok but needs recovery capable of Oreo decryption for installing updates (AFAIK such a recovery doesn't exist until now for our device...)
Click to expand...
Click to collapse
I'm actually having some trouble finding a up-to-date recovery.
Jeroen1000 said:
Hi 115ek. Thanks for making this. I'm not new to flashing but I have a question nonetheless. What do you mean by
I'm actually having some trouble finding a up-to-date recovery.
Click to expand...
Click to collapse
You can use this https://androidfilehost.com/?fid=5862345805528046823 or that https://forum.xda-developers.com/sony-xperia-z1-compact/orig-development/recovery-twrp-3-2-1-t3759450.
For Lineage 15.x flashing you need TWRP>=3.2.x If the version is older you'll end up in a error 7.
Concerning decryption: Google introduced some new encryption stuff and so the decryption of /data from inside TWRP is broken. Some guys are working on it (@nailyk).
Encrypting the device should work fine, but I don't know what happens if you want to update the encrypted device. (I'm going to test that ).
Basically you need to store the update package outside of encrypted partitions... Maybe adb sideload works - but it's circumstantial.
Edit:
That's only interesting if you plan to encrypt your device. Otherways you can relax.
Edit2:
adb sideload should do the job. But you need a PC for updating. Installing an image directly via recovery isn't possible until now.
With sources for both kernel and system unlike the other port! Thanks, I'll definitely be using this!
Xperia J1 Compact
could this work on an Xperia J1 Compact?
it's basically the same phone with the same specs right?
The rom looks very stable and balance, but I've some problems with root procedure. I tried the lineage addon, the root seems active, but opening apps (es. Ad away) results unrooted, any ideas?
Update: Now Works. Flashed lastest Magisk
Amazing to see this old device on Oreo, just installed and it feels smooth and nice. Just a pity that I have broken the sim card connectors inside so I cant use it as a phone but I will fins use of it at home just for fun. Thank you for your work 115ek :good:
Great to see this rom realy! This rom have stock camera?
munjeni said:
Great to see this rom realy! This rom have stock camera?
Click to expand...
Click to collapse
What do you mean with stock camera?
There was a thing with kernel versions 3.4 and 3.10, wasn't it? We're using 3.4.
Concerning the camera: I'm not that expert, but it looks okay I would say.
Feel free to contribute: There's still the reboot-to-recovery problem and Pie is in the starting blocks.
115ek said:
Feel free to contribute: There's still the reboot-to-recovery problem and Pie is in the starting blocks.
Click to expand...
Click to collapse
my phone reboots to recovery.
Need to install Magisk
without it I also do not reboot to recovery
raschad said:
my phone reboots to recovery.
Need to install Magisk
without it I also do not reboot to recovery
Click to expand...
Click to collapse
Thanks, but I already knew this
But I like to reboot to recovery without magisk. I think there are people around who don't like/need magisk (including me).
The fact that it works with magisk may locate the problem to the boot.img. I have init_sony in mind and will check that.
Any ideas welcome
115ek said:
Thanks, but I already knew this
But I like to reboot to recovery without magisk. I think there are people around who don't like/need magisk (including me).
The fact that it works with magisk may locate the problem to the boot.img. I have init_sony in mind and will check that.
Any ideas welcome
Click to expand...
Click to collapse
I meant does this rom have stock camera blobs? Do you have property: ro.bootmode
and does /proc/cmdline shows diferent bootreason when you set reboot reason to recovery?
munjeni said:
Do you have property: ro.bootmode
and does /proc/cmdline shows diferent bootreason when you set reboot reason to recovery?
Click to expand...
Click to collapse
Good news: an easy import of your init_board_device.h did the trick. Maybe a timing problem?
Anyway: reboot to recovery is now working correctly, even without magisk
Is that okay for you: http://gerrit.aicp-rom.com/c/AICP/device_sony_msm8974-common/+/73688 ?
I just found this https://github.com/LineageOS/androi...neage-15.1/init/init_sony/init_board_device.h its just prototype so seems you have missed init_sony/init_board_device.h in your device tree...
munjeni said:
I meant does this rom have stock camera blobs?
Click to expand...
Click to collapse
We're using them https://github.com/AICP/proprietary_vendor_sony/tree/o8.1/rhine-common/proprietary/vendor, so I guess yes.
You're more into topic, aren't you? How to distinguish between AOSP and stock blobs? There were some mysteries around DRM, camera quality and so on. I remember a separate thread you also participated in...
But I'm not really into this topic.
munjeni said:
I just found this https://github.com/LineageOS/androi...neage-15.1/init/init_sony/init_board_device.h its just prototype so seems you have missed init_sony/init_board_device.h in your device tree...
Click to expand...
Click to collapse
No, it's actually in here: https://github.com/AICP/device_sony_msm8974-common/blob/o8.1/include/init_sony/init_board_device.h
But It's different from yours. Yours performs another keycheck.
Seems rom have stock blobs. To distinguish between AOSP and stock blobs... depends on kernel you have using, aosp kernel can't be used with stock blobs since aosp camera kernel module is diferent, but I'm out of development for long, have no free time and to be honest I still didn't forgot treatment & injustice for my status on xda, that made me more inactive here. Recognised members have bad treatment here, seems senior members have much more priority than recognised members, and thats reason why everybody here need to care how many hours per day to waste here. I decided to stop wasting my time on xda since xda leaders do not respect anybody's hard work here. I recommend the same to everyone here.
I tried "reboot to recovery", after Sony logo the phone reboot again (also if you press recovery button), and to enter in recovery you've to push again the button at the second reboot.
It is like a normal reboot... But it's not a problem ?
ULT][MO said:
I tried "reboot to recovery", after Sony logo the phone reboot again (also if you press recovery button), and to enter in recovery you've to push again the button at the second reboot.
It is like a normal reboot... But it's not a problem
Click to expand...
Click to collapse
What recovery are you using? I recommend this one: https://forum.xda-developers.com/sony-xperia-z1-compact/orig-development/lineageos-12-1-z1c-current-sec-patches-t3614936.
With mine from here https://forum.xda-developers.com/sony-xperia-z1-compact/orig-development/recovery-twrp-3-2-1-t3759450 it still won't work. Maybe a timing thing.
But it's okay if we have at least one working TWRP.
And oreo /data decryption is still an issue we have to address.
This is basically a tl;dr thread.
I don't want to make a thread that everyone will lazy to read.
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. It's a fully touch driven user interface; no more volume rocker or power buttons to mash. The GUI is also fully XML driven and completely theme-able. You can change just about every aspect of the look and feel.
Disclaimer
Code:
/*
* Your warranty is... still valid?
*
* 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 RECOVERY
* 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.
*/
Requirements
ASUS ZenFone Max Pro (M1) ZB601/2KL (of course)
Unlocked bootloader, in either ways (official, unofficial)
Some knowledge on how to deal with your device... and patience.
Flashing InstructionsI assume you've done (very) basic steps on preparing to flash your device.
Reboot device to bootloader. If device is powered off, press and hold Power + Volume Up button until ASUS logo with "FASTBOOT MODE" message appears.
Under same directory as TWRP image and ADB/Fastboot executables (if ever required), type this command:
Code:
fastboot flash recovery twrp-3.x.x_9-<kernel>-y-KudProject-X00T.img
Where:
x and y are version of TWRP you're going to flash.
kernel: k4.4 - stock firmware or custom ROMs with FDE encryption; and k4.14 - FBE for custom ROMs with FBE encryption.
IMPORTANT: After flashing, immediately press and hold Power + Volume Down for about 10 seconds button to reboot to recovery.
Swipe the option to allow modifications. This way, you'll trip Android Verified Boot (AVB) and it's required to flash no verity zip in order to be able to boot stock ROM.
Downloads
Webserver | MEGA
Old releases only: OSDN | AndroidFileHost
Known Issues
k4.4: Due to QTI keymaster's behavior, only specific stock firmware as well as custom ROMs with same platform security patch level that can only be decrypted by TWRP. Applicable versions will be indicated explicitly in the changelog.
k4.14: Recovery may start with very low vibration level. You can adjust vibration intensity in settings later.
k4.14: Recovery can only decrypt userdata partition encrypted using AES-256-XTS algorithm. Only ROMs using Qualcomm's Inline Crypto Engine (ICE) with 4.14 kernel may also be decrypted by the recovery as well. This can be assumed an intended behavior since implementation of fscrypt_ice on msm-4.14 and msm-4.19 kernels are completely different. Tell ROM maintainers wanting to switch to FBE to use AES-256-XTS instead.
Special Thanks
Dees_Troy and everyone behind TWRP
shakalaca - base device tree used for older releases
Ankit Gourav - his work on whyred
Shivam Kumar Jha - person who kickstarted ZenFone Max Pro (M1) development
Everyone involved in testing numbers of test builds.
Sources
TWRP repository fork
Device tree
Kernel source: k4.4 - k4.14
Some stuffs...Another TWRP thread? Why?
I like to keep discussions about my builds separate. Moreover, the existing TWRP that already available on XDA before doesn't seem to be maintained anymore.
I flashed via fastboot but it always fails.
Check or change your cable, use other USB slot (especially 2.0 one if 3.0+ doesn't work), or if needed try to flash recovery with USB connected to a hub.
Changelogstwrp-3.5.2_9-1-KudProject-X00T
Merged TWRP source changes up to 25 April 2021 (UTC+8)
Builds are now splitted for devices running FDE (targetting stock, running 4.4 kernel) and FBE encryption (targetting custom ROMs, running 4.14 kernel, only works with ROMs using AES-256-XTS encryption)
FDE: Can decrypt 16.2017.2009.087 stock firmware and any custom ROM with 5 September 2020 security patch
Restored ability to backup system and vendor partition (images backup for these partitions are recommended)
Switched to build system libraries from source
Added persist partition backup support
Added support for NFC availability check in recovery
Added support for formatting asusfw partition in GUI
Updated set_version script to match up Android 10's system-as-root behavior
FBE: Updated crypto blobs from 17.2017.2012.438 stock firmware
twrp-3.4.0-0-KudProject-X00T
Merged TWRP source changes up to 11 June 2020 (UTC+8)
Can decrypt 16.2017.2005.082 stock firmware and any custom ROM with 5 May 2020 security patch
Switched f2fs-tools to latest AOSP master
Only allow user to backup system and vendor images
set_version script doesn't longer touch persist partition; script now has hardcoded SKU and version instead in case ASUS props can't be found
Updated prebuilt kernel based on S082 source drop
F2FS kernel driver updated to 5.3-rc1 with backports up to 5.7-rc1 from 4.9
Switched to arter97's fork of exFAT
Switched from NTFS kernel driver to FUSE ntfs-3g due to incomplete write support
twrp-3.3.1-0-X00T-20190526
Fixed stock ROM flashing due to missing prop
Fixed FDE decryption
twrp-3.3.1-0-X00T-20190525
Updated F2FS on kernel to 5.2-rc1
TWRP 3.3.1 + upstream changes
twrp-3.3.0-0-X00T-20190513
Updated base to android-9.0
Updated blobs from 16.2017.1903.050
Support for flashing unmodified stock firmware (please read notes!)
Rebased kernel to S050 source drop
Updated F2FS on kernel to 5.1-rc1
TWRP 3.3.0 + upstream changes
twrp-3.2.3-0-X00T-20190217
Now based on whyred official TWRP tree
Reverted kernel to stock-based as-released (S339) with F2FS upstream and sdFAT included
(this should fix USB-OTG support while retaining support with latest f2fs-tools)
TWRP upstream changes
twrp-3.2.3-0-X00T-20190118
Pick more patches from LineageTWRP project
Updated f2fs-tools to latest development branch
Slight cleanup
TWRP upstream changes
twrp-3.2.3-0-X00T-20190115
ADB sideload fixed for everyone
f2fs-tools v1.12.0
Disabled Synaptics' firmware update driver entirely
Removed qcacld-3.0 from kernel
TWRP upstream changes
twrp-3.2.3-0-X00T-20190108
Removed ntfs-3g from recovery
Included several extra recovery keys
Updated kernel to S338-based
Disabled Synaptics' startup firmware update
TWRP upstream changes
twrp-3.2.3-0-X00T-20181231
Updated platform security patch override to 2018-11-01 (matches 338 firmware)
twrp-3.2.3-0-X00T-20181226
Imported more proprietary blobs from stock 337 firmware
TWRP upstream changes
twrp-3.2.3-0-X00T-20181224
Allow wiping vendor partition
2nd CPU target set to Cortex-A73
Initial import of proprietary blobs from stock 337 firmware
Updated kernel to S337-based
TWRP upstream changes
twrp-3.2.3-0-X00T-20181215
Removed texfat and tntfs stock modules
Enabled DT2W
twrp-3.2.3-0-X00T-20181214
Rebased to shakalaca's tree
CPU target set to kryo
Updated platform security patch override to 2018-10-01 (matches 337 firmware)
Switched to my rebased kernel
TWRP upstream changes (android-9.0 branch)
twrp-3.2.3-0-X00TD-20181024
Initial build, based on ASUS-X00TD tree
Notes
"fastboot boot" command isn't supported by our bootloader. Don't ever try that. (blame ASUS/Huaqin)
I'll try to always keep this recovery updated especially when ASUS releases firmware update that also updates AOSP security patch. Security patch set in TWRP needs to match stock firmware used so TWRP can decrypt data partition. This isn't possible with current state as the bump is useless.
Unmodified Stock Firmware SupportWith introduction of unmodified stock firmware support, I need to clear up some confusions you've if any. Notes below are copy-pasta from my post elsewhere:
Code:
Starting this build, recovery supports flashing stock firmware without modifying the updater-script. In order for it to be possible, ro.product.device has to be set to ASUS_X00TD.
This, however, breaks flashing of custom ROMs that check for either X00TD or X00T.
Simply supporting it doesn't mean that you can flash stock firmware directly; you need to be at least on stock when you flash the recovery, so required properties can be exported to /persist which then will be set on every recovery boot up.
Still not sure though, as some ROMs check for ro.product.device and then fallback to ro.build.product for matching devices.
Flashing incremental OTAs are supported but not recommended, since you'll most likely flash verity disabler at the minimum and get the flashing failed upon patching boot.
In plain text:
The recovery has ro.product.device set to ASUS_X00TD that may break custom ROM flashing.
You need to be on stock before booting the recovery for the first time, then afterwards you can flash any stock firmware. 21 June 2020 UPDATE: Now not required, as it's now hardcoded in the script itself and since touching persist is never a good idea to begin with.
If you modify your system in any ways and don't have any system backup to restore, don't flash incremental OTAs. This also includes TWRP tampering system to prevent stock recovery from overwriting TWRP.
Verifying released buildsThis was originally posted on KudProject's Telegram channel and copy pasted here with minor edits for easier access.
Following TeamWin's stance about unofficial TWRP downloads here, all release builds from KudProject will start to be signed using my GPG key to ensure that you get a copy of legitimate builds directly from me.
You can download both of my currently active public keys here. Importing from PGP keyserver will be made available in the future.
To import on Linux:
Code:
gpg --import krascgq.gpg
To verify builds on Linux:
Code:
gpg --verify <build-name>.sig <build-name>
Windows users will need to search for compatible tools.
size is almost half from official recovery ?
I have been using official TWRP 3.2.3.0 since last 2-3 FW updates and haven't faced any problem. However, it's good to have a specific updated TWRP for 601KL.
theraaj said:
size is almost half from official recovery ?
Click to expand...
Click to collapse
And that almost half size comes from unwanted and unused SDM630, SDM636, and SDM660 DTBs concatenated inside kernel image used.
Sent from my ASUS_X00TD using XDA Labs
First of all thank you for updating the twrp. Could you make something clear.
Is it synaptic only twrp if not can it be flashed over the older twrp?
Will it be supporting encryption?
Ak-64 said:
First of all thank you for updating the twrp. Could you make something clear.
Is it synaptic only twrp if not can it be flashed over the older twrp?
Will it be supporting encryption?
Click to expand...
Click to collapse
1. It's not a Synaptics' exclusive version, and well you can override any installed TWRP versions.
2. Not tested on my side since my data isn't encrypted, but I try to keep the platform patch inline with latest firmware so feel free to test.
Sent from my ASUS_X00TD using XDA Labs
Thank you very much for your amazing work.... hope this TWRP will get the official tag soon??
Can this decrypt encrypted data partition yet?
Thank you for your excellent work, @krasCGQ
@krasCGQ Have you been able to fix the adb sideload function that doesn't work in the older twrp builds? Thanks. Otherwise, this is good as official. Thanks for your hardwork!
I couldn't able to touch anything after booting in to recovery
I need to press power button twice to use it
Any solution
krasCGQ said:
2. Not tested on my side since my data isn't encrypted, but I try to keep the platform patch inline with latest firmware so feel free to test.
Click to expand...
Click to collapse
Hi,
you have to overwrite init.recovery.vold_decrypt.keymaster-3-0.rc in /recovery/root/ (like in shakalaca version), because the name of ven_keymaster-3-0 service is [email protected] with "-qti" at the end. Than encrypted data will work. I already test it.
vladlp said:
Hi,
you have to overwrite init.recovery.vold_decrypt.keymaster-3-0.rc in /recovery/root/ (like in shakalaca version), because the name of ven_keymaster-3-0 service is [email protected] with "-qti" at the end. Than encrypted data will work. I already test it.
Click to expand...
Click to collapse
I pushed a test build on selected Telegram device testing groups with several init files replaced. I'll make it available for public today or tonight.
ADB sideload has been fixed on that build, BTW.
Sent from my ASUS_X00TD using XDA Labs
krasCGQ said:
I pushed a test build on selected Telegram device testing groups with several init files replaced. I'll make it available for public today or tonight.
ADB sideload has been fixed on that build, BTW.
Click to expand...
Click to collapse
Any planning to official sir ?
Sorry if asking.
gusbalaa said:
Any planning to official sir ?
Sorry if asking.
Click to expand...
Click to collapse
Nope.
Sent from my ASUS_X00TD using XDA Labs
sorry for noob question, if i flash this new twrp it wipe my current OS or replacing twrp only? tyvm
SlamDec said:
sorry for noob question, if i flash this new twrp it wipe my current OS or replacing twrp only? tyvm
Click to expand...
Click to collapse
The latter if you flash it on the right partition; if not... :silly:
Sent from my ASUS_X00TD using XDA Labs
krasCGQ said:
I pushed a test build on selected Telegram device testing groups with several init files replaced. I'll make it available for public today or tonight.
ADB sideload has been fixed on that build, BTW.
Click to expand...
Click to collapse
And... ~24 hours late from expectations, lol.
It's up for public now.
Sent from my ASUS_X00TD using XDA Labs
Kirisakura-Kernel for the Asus Rog Phone 2
Hello everyone,
I proudly present Kirisakura-Kernel made for the Asus Rog Phone 2 aka Yoda!
Kirisakura - Kernel is designed to bring a handful of beneficial features to the device, while ensuring excellent performance and smoothness to get you safely through the day!
This project aims to keep most of the subsystems updated, way ahead of the stock kernel, thereby improving security and performance, while keeping stability as the foucs during testing! This includes Linux-Stable, CAF-Upstream and kernel/common.
Kernel Control Flow Integrity (Kernel-CFI), which is achieved by linking the kernel with LLD and Link Time Optimization (LTO), more precisely ThinLTO, are quite unique security features. In fact this may be one of the only 4.14 msm kernels with a fully working Kernel-CFI implementation and CFI-Violations fixed on a smartphone.
The only kernels made by OEMs offering this security feature are the ones for the Pixel 3 and Pixel 4 devices.
If that got you curious,have a read about Linux-Stable and why it is important here. The stable-process is not the same for every subsystem, but the general idea, rule of thumb and benefits are applicable for other subsystems as well.
Quick explanation of CAF-Upstream. CAF is short for Codeaurora-Forums. This is the place where development from Qualcomm for their SoCs happens. This includes the Snapdragon 855+ that´s built into the Asus Rog Phone 2.
The kernel-bases available on the Codeaurora-Forums, are basically the foundations OEMs use to build their own kernel additions on top, for devices featuring Qualcomm SoCs.
The Qualcomm developers push regular updates to the bases of the different SoCs, a bit similar to how Linux-Upstream works. OEMs usually stop updating the initial base after the phone is released.
This kernel focuses amongst others to provide the latest CAF-Updates merged in a regular manner, to provide updates, improvements and enhancements for SoC specific drivers and subsystems! This might take a while, because a lot of device specific testing is done on my end to ensure stability.
The kernel includes a lot of improvements and contributions from other developers as well. Without this kernel would not exist.
Many others contributed in some way or another to this kernel.
A big thanks to all of them at this place!
Now lets continue with a list of features in the next paragraph!
Main Features:
- Based on latest kernel sources from Asus for Android 11 and intended for use on Asus Stock Rom
- compiled with Clang 13.0.1 and built with -O3 speed optimizations
- Linux-Stable-Upstream included to 4.14.243
- CAF-Upstream merged
- Link the kernel with LLD and use KASLR
- include all important fixes/improvements from kernel/common
- F2FS implementation updated to latest state of kernel/common and kernel.org maintained by Jaegeuk Kim.
- Safety Net patches are included -> Kernel passes Safety Net
- Flashing the kernel will keep root!
- Sweep to sleep functionality
- Flashable via EXKM and FKM on a rooted system!
- specifically tuned EAS for the Asus Rog Phone 2
- removed nolog usage, remove rtb logging from the kernel
- remove selinux auditing from kernel for lower overhead
- remove IPC logging from the kernel
- Anykernel zip is based on the all new Anykernel3 release from @osm0sis
- option for 144hz refresh rate (Android 10 only)
- option to improve visibility in dark scenes
EAS related features:
- EAS implementation patched up to latest CAF state
- disable autogroups and use cgroups for more efficient task placement!
- Dynamic Stune Boost to inflate task utilization and not overload cores on interaction (thanks to @RenderBroken and @joshuous )
- improved schedutil governor
- updates from kernel/common
CPU related features:
- Power saving workingqueues enabled by default
have a read here: https://lwn.net/Articles/731052/
this complements EAS in general
- Change various drivers (WLAN, MM, audio, charger, power, thermal, glink etc) to user power efficient workingqueues. This should work well in conjunction with EAS
- include cpuidle patches from CAF
- improvements to cpufreq/times/stats
- vDSO 32 patches to improve 32-bit performance
- arm64: lse: Prefetch operands to speed up atomic operations (thanks to @kdrag0n )
File System related features:
- F2FS implementation updated to latest state of kernel/common and F2FS-Mainline on kernel.org maintained by Jaegeuk Kim.
- Include rapid GC by @arter97 ( best thing is to read the commit description linked here. I compared GC on stock google f2fs, upstreamed f2fs and f2fs with rapid GC. Rapid GC is the most effective, followed by upstreamed f2fs.)
- adapt F2FS to be inline with Pixel 4s code from Google, which is also directly maintained by Jaegeuk Kim
- include a few F2FS fixes from the Pixel 4 kernel
- include optimizations to UFS-Driver from Pixel 4
- various improvements to FS-Performance from the Pixel 4
- f2fs fix to prevent data loss in case of sudden power failure
GPU related features:
- Update GPU driver to latest CAF state
- remove debugging and non-sd855+ specific code from the GPU driver
- introduce low priority worker thread to improve performance in UI-critical situations
Network related features:
- Wireguard Support (Details)
- advanced TCP algorithms enabled
- includes new bbr and bbr2
Memory related features:
- Speculative Page Faults (1. 2) (CAF default)
- enabled per process reclaim (CAF default)
- Fix various memory leaks in different subsystems
- improved mm with patches from latest mainline
- various other changes from mainline
- included zstd and lz0-rle as options for ZRAM-algorithm (lz4 is probably the best all around, so only change it if you know why and what you are doing)
- allow swappiness up to a value of 200
- remove unused mem regions to free more RAM (thanks to @kdrag0n )
Security related features:
- Control-Flow-Integration (CFI) andLink-Time-Optimization (LTO) ported from 4.14 kernel/common and Pixel 4 Kernel
- Shadow Call Stack ported from 4.14 kernel/common and Pixel 4 Kernel
- enable init_on_alloc for even more security, more information can be found in the commit message
Misc Features:
TCP Congestion Algorithms:
- advanced algorithms enabled
- includes new bbr2
Wakelock Blocker:
- advanced wakelock blocker with the ability to block any wakelocks (dangerous, use with caution)
- please read [URL="https://arstechnica.com/gadgets/2018/08/p-is-for-power-how-google-tests-tracks-and-improves-android-battery-life/"]this for further info
Other features:
- disable logging and debugging to make the kernel more lightweight in various places (includes binder, mm, vma, gpu, ipa etc)
- remove VLAs from the kernel (more info)
- add support for steam controller
- add support for nintendo switch controller
Feature section for the "non visible" but perceptible improvements:
- updated binder section (responsible for interprocess communication)
- updated sdcardfs ; have a read about it here:
- fix CFI violations
- add ramoops/pstore support (thanks @luca020400)
Requirements
- unlocked Bootloader
- USB-Debugging in developer options enabled
- latest adb and fastboot binaries
- working adb and fastboot environment
- magisk root
- a backup of boot.img and dtbo.img to be able to restore to stock. you should be able to do this easily via TWRP.
How to flash the Kernel:
1. Download the latest kernel.zip and make sure you have properly updated to the latest Asus Firmware
1a. Optional: While it may not be necessary all times, you may want to restore stock boot.img and dtbo.img, re-root with magisk and optionally install twrp.zip if coming from another kernel. Before reporting issues make sure you do that! Thank you!
2. Make sure to use latest Magisk stable. (not the latest canary!)
3. Flash the kernel.zip via latest EXKM or FKM app, or TWRP (haven´t tested TWRP myself as I don´t need it) and do a full reboot.
4. Flash the kernel again. This step is needed because flashing the kernel disables verity on vendor in order to modify two files. Disabling verity takes a reboot. Flashing the second time allows the two files to be changed correctly. This step is necessary if you flashed a firmware update. (This step should not be necessary when updating my kernel, if you are already running it, but if you want to be on the safe side just flash it twice)
5. Reboot and profit. It will take around 15 seconds for the kernel and the system to execute all changes done by flashing the kernel.zip. After 15 seconds 120fps will kick in, if you use 120fps setting!
DOWNLOAD:
Download is located always in this folder:
https://www.androidfilehost.com/?w=files&flid=303784
Important: Read after Download
Please take a look at the second post after flashing the kernel!
Changelog:
Android 9
1.0.0 Initial Release
1.0.2 https://forum.xda-developers.com/showpost.php?p=81389411&postcount=33
Android 10
2.0.0 https://forum.xda-developers.com/showpost.php?p=82238713&postcount=141
2.1.0 https://forum.xda-developers.com/showpost.php?p=82317211&postcount=191
2.6.0 https://forum.xda-developers.com/showpost.php?p=82495531&postcount=252
2.6.2 https://forum.xda-developers.com/showpost.php?p=82560081&postcount=261
2.6.4 https://forum.xda-developers.com/showpost.php?p=82602927&postcount=267
2.7.2 https://forum.xda-developers.com/showpost.php?p=82834055&postcount=281
2.7.5 https://forum.xda-developers.com/showpost.php?p=82837791&postcount=285
2.9.0 https://forum.xda-developers.com/showpost.php?p=83100663&postcount=306
3.0.6 https://forum.xda-developers.com/showpost.php?p=83526987&postcount=391
3.1.0 https://forum.xda-developers.com/showpost.php?p=83606511&postcount=406
3.1.3 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-84124933
3.1.5 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-84617449
3.2.0 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-84717691
3.2.1 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-84799241
3.2.2 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-85145887
3.2.3 https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-85431627
Android 11
1.0.0_R https://forum.xda-developers.com/t/...us-rog-phone-2-aka-yoda.4028237/post-86201183
Donations:
Donations are not mandatory but very welcome if you want to support development or just buy me a coffee
If you like my work: http://paypal.me/freak07
Credits:
Asus for the Rog Phone 2
@osm0sis for all his work, including the ak3 installer!
@tbalden for being the best HTC wingman!
@LeeDroid for his awesome roms!
@Captain_Throwback for all the mentoring and guidance!
@Eliminater74 for bringing me into the game and the Inspiration
@nathanchance for his upstream guidance and assistance
@RenderBroken for helping me out
@flar2 for all his work
@joshuous for all the help he provided to me in the past!
@arter97 for giving me advice
@kdrag0n for his help too
@topjohnwu for magisk!
@osm0sis for anykernel!
XDA:DevDB Information
Kirisakura Kernel, Kernel for the ASUS ROG Phone II
Contributors
Freak07
Source Code: https://github.com/freak07/Kirisakura_Yoda
F.A.Q:
Question: Why does the kernel version show as "unavailable" in settings after flashing it.
Answer: Asus does not allow for custom kernel names in their settings. Use a kernel manager to check the kernel version.
Question: Is root preserved when flashing this kernel?
Answer: Yes the Anykernel Zip will detect root and keep it.
Question: How do I return back to stock or another kernel.
Answer: Extract boot.img as well as dtbo.img from matching firmware you are on and flash the extracted boot.img via fastboot.
Question: How to report bugs properly?
Answer: Have a look at post #3 in this thread. The linked guide is a pretty good starting point.
Before reporting any bug make sure you´re not using any mods, magisk modules, scripts or other modifications that alter various functions like sound mods, data traffic etc.
Try to describe the issue as detailed as possible! Give your exact setup, like rom, magisk version, kernel version.
Is the issue reproducible? Does it happen frequently?
Provide logs, otherwise debugging is a lot harder. If you can already reproduce the issue and provide logs it greatly limits the amount of time I have to spent until I figure out how to reproduce it.
If the device force reboots/randomly reboots (that means you see the bootloader unlocked screen!) provide a ramoops file.
Easiest way is immediately after booting up, with a root explorer navigate to sys/fs/pstore. Copy the contents to your internal storage, zip it up and send it to me.
If the issue happens while the device is running provide a dmesg plus a logcat that you take while/shortly after the issue happens. This will log what´s running in the current session. Try to be as detailed as possible what´s happening when the issue appears. It will also help me in reading the log!
Useful Resources
How to report bugs:
It is incredibly useful if bug reports are done in a proper way. That saves everyones time and will ultimately lead to a faster bugfix (hopefully).
The following guide from @nathanchance is a very good guideline on how to properly report a bug!
android-tools/guides/proper_bug_reporting.txt at main · nathanchance/android-tools
Publicly available Android stuff. Contribute to nathanchance/android-tools development by creating an account on GitHub.
github.com
and one more for me
Wow!!! Awesome! Plans for kcal in the future?
Thank you so much for giving me a reason to unlock the bootloader. Finally am happy to see development for the device and that too from a well known developer ???? cheers mate and a very happy new year.
Can I flash Android 10 beta fota file to my cn version phone using this recovery?
I love your work bro keep this devlopment continue
All rog2 user support your hardwork ,
And more developer will come after seeing your hardwork
a5he said:
Can I flash Android 10 beta fota file to my cn version phone using this recovery?
Click to expand...
Click to collapse
please help..now my device stuck and keep looping in bootloader mode after trying to flash this kernel on Android 10 beta fota..and i cant reboot into twrp recovery and system..
sakamaki izayoi said:
please help..now my device stuck and keep looping in bootloader mode after trying to flash this kernel on Android 10 beta fota..and i cant reboot into twrp recovery and system..
Click to expand...
Click to collapse
flash the boot.img extracted from the android 10 beta firmware via fastboot.
Kernel is made for Android Pie as stated in the OP.
Welcome bro and thanks for the first rog 2 custom kernel.. ?
After flashing in twrp it says i should flash companion magisk module. Is there one yet?
mohammed510 said:
Welcome bro and thanks for the first rog 2 custom kernel.. ?
After flashing in twrp it says i should flash companion magisk module. Is there one yet?
Click to expand...
Click to collapse
Oh that’s a remnant of another kernel in the flashing script.
No there is none needed. I’ll remove that message in the next release!
thanks for the hint!
You just gave me a reason to unlock my bootloader and go back to Pie
What a day! Thanks a lot @Freak07! I'm happy for you being around!
Cheers,
anthonws.
sakamaki izayoi said:
please help..now my device stuck and keep looping in bootloader mode after trying to flash this kernel on Android 10 beta fota..and i cant reboot into twrp recovery and system..
Click to expand...
Click to collapse
Extract the boot.img from Update and flash it under .img in twrp.
Goodluck
Very thanks
Please work on power saving and governor
Thank you for joining the ROG 2 Forums @Freak07
apollo3x said:
Extract the boot.img from Update and flash it under .img in twrp.
Goodluck
Click to expand...
Click to collapse
How to extract the Payload file of Android 10 FOTA?
The current Payload dumper doesn't support it.
Thank you so much for your hard work, I can't wait for you to make an version for Android 10 , hopefully once we have a custom kernel we can finally enjoy the 6000 mah battery
Mohamad313 said:
Very thanks
Please work on power saving and governor
Click to expand...
Click to collapse
avivv said:
Thank you so much for your hard work, I can't wait for you to make an version for Android 10 , hopefully once we have a custom kernel we can finally enjoy the 6000 mah battery
Click to expand...
Click to collapse
No idea about Android 10, but I’m enjoying the 6000mah on Pie already. That Android 10 build floating around is no finished or final piece of software.
I’ll attach my current stats from this morning.
No extensive gaming, mainly browsing, exploring the phone, massaging, videos, some calls etc.
but all on constant 120hz.
Wow that's great stats, when I had android 9 I the battery life was worst than I expected, if there was a way to rollback to android 9 without wiping the data I would have done it just to try this kernel.
would it be possible to add battery charge limiting support? currently apps like ACC don't work with this phone.