Related
Hey there,
so I recently wondered if there are any open source rooting apps for the S5 .. started with Towelroot, which is closed source but has been largely reverse engineered (http://forum.xda-developers.com/not...t-adb-ghettoroot-v0-1-towelroot-port-t2864125, https://github.com/timwr/CVE-2014-3153/, http://pastebin.com/PvF2kSjD).
I successfully rooted my device (SM-G900F, Android 4.4.2, Kernel 3.4.0-1182732 (built 31.03.20014 12:21:23 KST)) using the latest Towelroot, just to verify it works. Next I set up a build environment for the device, getting the Kernel from http://opensource.samsung.com/reception/receptionSub.do?method=sub&sub=F&searchValue=G900F and the Android NDK Revision 9d from http://dl.google.com/android/ndk/android-ndk-r9d-linux-x86_64.tar.bz2, which should be the correct one according to the table at https://developer.android.com/ndk/downloads/revision_history.html. I built all of the above "open source" versions, and tried but none worked.. in particular my phone rebooted and showed "Kernel Panic Dump Mode" with "list_add corruption. prev->next should be next (a0000820), but was bf000000. (prev=e5bc4008)" I then have to do a hard reset (pressing power button a long time, wait 2 seconds and power on again) to get it booting again.
Looking into where this message came from, I found that the respective kernel was compiled using CONFIG_DEBUG_LIST set, causing the __list_add implementation of source/lib/list_debug.c to be linked (instead of the one from source/include/linux/list.h), which has additional checks:
WARN(next->prev != prev, "list_add corruption. next->prev should be prev (%p), but was %p. (next=%p).", prev, next->prev, next);
WARN(prev->next != next, "list_add corruption. prev->next should be next (%p), but was %p. (prev=%p).", next, prev->next, prev);
Now you will need some understanding in how the FUTEX exploit works (cf. http://tinyhack.com/2014/07/07/exploiting-the-futex-bug-and-uncovering-towelroot/ and http://blog.nativeflow.com/the-futex-vulnerability), but for those of you who do, now (finally LOL) my question:
How the **** does he manage to get root in the presence of these checks?
The prior reversed versions from above all fail at this point, which makes 100% sense to me, because it effectively prevents us from writing the address of an rt_waiter (new) to an address controlled by us (prev.next), which we set to point to the current task's thread_info.address_limit, in order to extend our reach beyond 0xbf000000 and write to kernel space. Am I missing something? Any ideas are welcome, because at this point I don't know how to proceed really..
FEATURED ON THE PORTAL
Thanks @Doug Lynch for the mention!
Team Win Recovery Project 3.x, or twrp3 for short, is a custom recovery built with ease of use and customization in mind. Its 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.
CHANGELOG for 3.0.2-0:
-Fix a bug with the input box that affected masked inputs (passwords). This fixes decrypt of full device encryption on devices that support decrypt. This bug also impacts encrypted backups. Users are highly encouraged to stop using 3.0.1 if you use encrypted backups or if you need decrypt of data in TWRP.
-Add Greek translation to some builds.
CHANGELOG for 3.0.1-0:
-support new CM 13.0 pattern encryption (sultanqasim)
-fix slow flashing issue due to modprobe (present on only some devices) (#twrp)
-libtar updated to latest upstream and fixes (jcadduono)
-fixes for loading custom themes (_that)
-TWRP will now detect and install TWRP themes automatically through the normal zip install process (Dees_Troy)
-translation updates - added Italian, Czech and Polish and significant updates to Dutch
-progress bar improvements - progress bar updates during image flashing and better tracks progress during file system backups (tar) (Dees_Troy)
-fix input box text display (Dees_Troy)
-reboot option after zip install complete (bigbiff)
-other mostly invisible bug fixes and improvements
CHANGELOG for 3.0.0-0:
-Completely new theme - Much more modern and much nicer looking (by z31s1g)
-True Terminal Emulator - Includes arrow keys, tab and tab completion, etc. (by _that)
-Language translation - It won’t be perfect and especially some languages that require large font files like Chinese & Japanese won’t be availble on most devices. Also some languages may only be partially translated at this time. Feel free to submit more translations to OmniROM’s Gerrit. (mostly by Dees_Troy)
-Flashing of sparse images - On select devices you will be able to flash some parts of factory images via the TWRP GUI (by HashBang173)
-Adopted storage support for select devices - TWRP can now decrypt adopted storage partitions from Marshmallow
-Reworked graphics to bring us more up to date with AOSP - includes support for adf and drm graphics (by Dees_Troy)
-SuperSU prompt will no longer display if a Marshmallow ROM is installed
-Update exfat, exfat fuse, dosfstools (by mdmower)
-Update AOSP base to 6.0
-A huge laundry list of other minor fixes and tweaks
WARNING: This is our first release in a long time. We have a lot of new and somewhat aggressive changes in this new release. The changes to the graphics back-end may cause some devices to not boot up properly or have other display-related issues. If you are not in a position to reflash an older build of TWRP, then wait until you are or at least wait until others have tried the new version for your specific device. You don’t want to end up with a non-working recovery and have to wait several hours or days to get to a computer to be able to fix it.
Notes for themers: In addition to the udpated theme, we have introduced a theme version variable to the TWRP theme system. If the theme version does not match the version that TWRP expects, TWRP will reject the custom theme and load its stock theme. This change will ensure that people who update TWRP without updating their theme will still have a workable recovery. We have removed libjpeg support. The stock theme was only using a jpeg image for the splash / curtain. This change means that any custom themes will no longer be able to use jpeg images. It also means that tools used to repack recovery images with a different curtain / splash will need to be updated to use the new method.
Version number notes: For a while we’ve been using a 4 digit version number and reserved the 4th digit for device-specific updates. For instance, we find and fix a device-specific issue like decryption of data on Nexus 5, we would release that as a 2.8.7.1. After a while, some people would start asking where 2.8.7.1 was for other devices. So, going forward we have decided to change the numbering scheme to 3.0.0-2, etc. Our hope is that this version numbering scheme will more clearly identify that the 4th digit does not indicate a version change for the code base.
We need your help! The bulk of TWRP work is done by 3 people on a volunteer basis. We have pushed most of our device files to our github and we have a gerrit instance. If you have the ability, please help us maintain our official devices and/or add your device to our official device list. Thanks in advance!
CHANGELOG for 2.8.7.0:
-Initial ground work for software drawn keyboard (_that)
-Fix handling of wiping internal storage on datamedia devices (xuefer)
-Allow DataManager to set and read values from the system properties (xuefer)
-Fix crash when taking screenshots on arm64 devices (xuefer)
-Fix error message after an ORS script completes (Dees_Troy)
-Fix crashes / error when creating encrypted backups (_that, Dees_Troy)
-Add system read only option – more details below (Dees_Troy)
-Add resize2fs and GUI option to run resize2fs (Dees_Troy)
-Fix crash loop caused by empty lines in AOSP recovery command file (_that)
-Prevent duplicate page overlays such as multiple lock screens (mdmower)
Note: As always, be sure your custom theme is up to date (or remove your custom theme) before updating TWRP.
System read only option: Devices that ship with 5.0 and higher as their initial OS are using block level OTA updates. With this style of OTA update, the update script checks to see if the system partition has ever been mounted read/write. Further, the script also usually runs an SHA sum of the entire system partition to detect if any changes have been made. If any changes have been made, the OTA update will refuse to install. Since not all OEMs and devices have factory images available, we have created a new feature in TWRP that detects if the system partition has ever been mounted read/write. If not, you will be prompted asking if you want TWRP to mount system as read/write. If you choose not to allow TWRP to mount as read/write, TWRP won’t prompt to install SuperSU and TWRP won’t try to patch the stock ROM to prevent TWRP from being replaced by stock recovery. The goal of this option is to hopefully allow the user to make a raw system image backup that they can use to get back to a state where they can take OTA updates again.
resize2fs feature: On some devices like the Nexus 6, the factory images include a userdata image that is the proper size only for the 32GB units. If you flash the factory image to a 64GB Nexus 6, the data partition will appear as if it only has the free space of a 32GB device. Using the resize2fs option, TWRP can resize your data partition to take up the full space available. The resize2fs may also be useful to resize system partitions on devices where custom ROM system images don’t take up the full partition space. Lastly, resize2fs may be useful in some cases to reserve the proper space at the end of a data partition for a full disk encryption key, should your partition be formatted incorrectly for some reason.
This new version also marks our first set of full builds using our new jenkins build server. You can track the progress of builds at https://jenkins.twrp.me and we have taken additional steps to make it easier for device maintainers to step up and submit patches to our gerrit server at https://gerrit.twrp.me to help us keep devices up to date and working.
DOWNLOAD:
Most devices can be updated quickly and easily within TWRP if you already have version 2.8.4.0 or higher installed
1) Download the latest version from our website on your device
2) Reboot to TWRP
3) Hit Install and tap the "Images..." button in the lower right
4) Browse to the location of the TWRP image on your device and select it
5) Select recovery from the partition list and swipe to flash
OR:
You can find more information and download links on our website.
BUGS:
If you have found a bug, please consider posting it to our github issues log. It's pretty much impossible for us to keep up with the more than 40 threads that we have for the devices that we "directly" support. If you have a significant problem that cannot be answered in this thread, your best bet is to PM me directly, contact us via our website, or find us in our IRC channel below. If you see someone that's struggling, feel free to point it out to us. We need your help to help us keep track of all of our devices! Thanks!
SUPPORT:
Live support is available via #twrp on Freenode with your IRC client or just click this link.
XDA:DevDB Information
TWRP 3.0.2-0 for LAVA Pixelv1, Tool/Utility for the OEM Cross Device Development
Contributors
MSF Jarvis, varun.chitre15
Version Information
Status: Stable
Created 2016-04-06
Last Updated 2016-04-20
Reserved
Credits
varun.chitre15 for his base trees
@DHARMESH17 for being a great tester
@arvinquilao for making me jealous!
Reserved
I would like you to recognize some misunderstanding.
On the official website of TWRP are 2 different Android One devices listed.
The first is "sprout" which stand for MTK powered devices
The other entry is called "2nd generation MTK (seedmtk)" which is simply wrong and might mislead some people. 2nd gen devices are powered by Snapdragon 410 CPUs.
You may want to change the listing on your website for a better understanding.
body150165 said:
I would like you to recognize some misunderstanding.
On the official website of TWRP are 2 different Android One devices listed.
The first is "sprout" which stand for MTK powered devices
The other entry is called "2nd generation MTK (seedmtk)" which is simply wrong and might mislead some people. 2nd gen devices are powered by Snapdragon 410 CPUs.
You may want to change the listing on your website for a better understanding.
Click to expand...
Click to collapse
@body150165, you might wanna do some homework now. Second gen devices are victim of fragmentation, causing two different variants to exist. The first, the Snapdragon 410-powered seed devices, have TWRP from @arvinquilao, and he's also running CM13 builds. The second one, the MT6582-powered Infinix Hot One and Lava Pixel v1, are classified as sprout by their manufacturers, which would have caused the confusion it somehow triggered in you. All said and done, as the only developer actively working towards CM13 and TWRP for the device, I took the liberty of renaming the device.
@body150165 thanks for bringing up your concern. Official TWRP build for the Snapdragon variant is already available via dl.twrp.me/seed, but the website is yet to be updated (probably in the next couple of days). As soon as it's updated I'll make a new thread here for the Snapdragon variant.
Second Partitiin (SD partition) working??
Sent from my SM-J500F using XDA-Developers mobile app
Nur_Alom said:
Second Partitiin (SD partition) working??
Sent from my SM-J500F using XDA-Developers mobile app
Click to expand...
Click to collapse
Who needs it?
I ported this TWRP 3.0.0-2 for my smartphone (Ulefone Paris, MTK6753), but I have 2 problems....I wrote here, because I want know if is a porting bug or also in others terminal there are the same bug:
1) I created in past a backup of my rom with TWRP 2.8.7.0 Version, and the 3.0.0-2 version isn't able to see my backup when I go on "restore" and choose my MicroSD, but if I navigate with file explorer, I can find it.
2) Battery bug: Always show me 50% of charge, no more, no less...
Are this common bugs, or porting bugs??? How can I fix it??
Thanks!!!
cuvetto said:
I ported this TWRP 3.0.0-2 for my smartphone (Ulefone Paris, MTK6753), but I have 2 problems....I wrote here, because I want know if is a porting bug or also in others terminal there are the same bug:
1) I created in past a backup of my rom with TWRP 2.8.7.0 Version, and the 3.0.0-2 version isn't able to see my backup when I go on "restore" and choose my MicroSD, but if I navigate with file explorer, I can find it.
2) Battery bug: Always show me 50% of charge, no more, no less...
Are this common bugs, or porting bugs??? How can I fix it??
Thanks!!!
Click to expand...
Click to collapse
I'll get back to you in a while after checking these. And this is TWRP 3.0.2-0, not 3.0.0-2.
I would like to know what steps have you taken to port it to determine whether I can source build for the device and make it official.
cuvetto said:
I ported this TWRP 3.0.0-2 for my smartphone (Ulefone Paris, MTK6753), but I have 2 problems....I wrote here, because I want know if is a porting bug or also in others terminal there are the same bug:
1) I created in past a backup of my rom with TWRP 2.8.7.0 Version, and the 3.0.0-2 version isn't able to see my backup when I go on "restore" and choose my MicroSD, but if I navigate with file explorer, I can find it.
2) Battery bug: Always show me 50% of charge, no more, no less...
Are this common bugs, or porting bugs??? How can I fix it??
Thanks!!!
Click to expand...
Click to collapse
@cuvetto : No, these bugs don't exist in my build. Tested as working fine by @DHARMESH17.
Will these work on 1st generation android one device i mean sprout 4 ?
DarkHeart Z said:
Will these work on 1st generation android one device i mean sprout 4 ?
Click to expand...
Click to collapse
It will not, sadly. TWRP seems to have not updated sprout devices for ages, so I'll run you guys a 3.0.2-0 build in some time and post it here.
MSF Jarvis said:
It will not, sadly. TWRP seems to have not updated sprout devices for ages, so I'll run you guys a 3.0.2-0 build in some time and post it here.
Click to expand...
Click to collapse
Then I am waiting for that
Bootloop
My device is lava pixel v1. After flashing this recovery from fastboot my device goes into bootloop. It always start with recovery and then says failed to mount /data etc and again reboots.
ashokvishnoi1994 said:
My device is lava pixel v1. After flashing this recovery from fastboot my device goes into bootloop. It always start with recovery and then says failed to mount /data etc and again reboots.
Click to expand...
Click to collapse
After fastboot flash recovery twrp-3.0.2-0-seedmtk.img, what exactly did you do?
You need to press both Volume Up + Power for about 15 seconds till device reboots back into bootloader mode and then go to recovery mode and open it. This has been tested as working. What steps did you take?
MSF Jarvis said:
@body150165, you might wanna do some homework now. Second gen devices are victim of fragmentation, causing two different variants to exist. The first, the Snapdragon 410-powered seed devices, have TWRP from @arvinquilao, and he's also running CM13 builds. The second one, the MT6582-powered Infinix Hot One and Lava Pixel v1, are classified as sprout by their manufacturers, which would have caused the confusion it somehow triggered in you. All said and done, as the only developer actively working towards CM13 and TWRP for the device, I took the liberty of renaming the device.
Click to expand...
Click to collapse
It should be Infinix Hot 2. Also I tried flashing via flashify and the recovery does not boot on Hot 2.
anarchtic said:
It should be Infinix Hot 2. Also I tried flashing via flashify and the recovery does not boot on Hot 2.
Click to expand...
Click to collapse
That's bad.... Can you provide me with your boot image? I will have to end up deunifying this recovery if it isn't booting :/
I would recommend that you also try a fastboot flash to see if it's a flashify thing.
MSF Jarvis said:
@body150165, you might wanna do some homework now. Second gen devices are victim of fragmentation, causing two different variants to exist. The first, the Snapdragon 410-powered seed devices, have TWRP from @arvinquilao, and he's also running CM13 builds. The second one, the MT6582-powered Infinix Hot One and Lava Pixel v1, are classified as sprout by their manufacturers, which would have caused the confusion it somehow triggered in you. All said and done, as the only developer actively working towards CM13 and TWRP for the device, I took the liberty of renaming the device.
Click to expand...
Click to collapse
MSF Jarvis said:
That's bad.... Can you provide me with your boot image? I will have to end up deunifying this recovery if it isn't booting :/
I would recommend that you also try a fastboot flash to see if it's a flashify thing.
Click to expand...
Click to collapse
I will when I get home, I am at work now which is why I used Flashify. Did you test using Hot 2?
anarchtic said:
I will when I get home, I am at work now which is why I used Flashify. Did you test using Hot 2?
Click to expand...
Click to collapse
Don't own one. I believed it would boot, just like it does for Android One first gen devices(One recovery for all devices)
I am posting this here because apparently I cannot post to a "dev" forum , since I am just registered.
Pity.
Anyway, just to report that I successfully installed CM14.1 on my phone, and video recording WORKS , even though I still have my original M baseband...
The fingerprint recorder says that extra tps beyond the first one are not recorded, but actually they are and they work.
To summarize, I started from a stock X1641 phone bought in Canada via Amazon a few weeks ago, rooted (but that is not important) and with twrp 3.0.2r4.
I flushed data partitions as per instructions, flashed the cm14.1 image from Nov. 20th, then the opengapps, rebooted, and everything works. I used "ADB sideload" to flash the 2 images.
So far, everything works for me, including "Linux Deploy" but I had to re-build my linux images from scratch. Something in CM 14.1 prevented from loading them. No big deal.
I summary: No need to contaminate your modem with unknown firmware in order to enjoy CM 14.1. Just flash it (Nov 20th or later) and things just work.
Heating issues
Hi ...
Again, writing in this thread because this bulletin board thinks I should not write in the dev forume...
Message to Silesh Nair: Your 20/11 ROM seems to have the 'ksm' kernel feature enabled. That in itself is not really a problem (however it is quite useless in phones) BUT the default value for sleep_millisecs seems to be set at 20 ms (the default). This might explain the heating issues some people have.
You might want to disable ksm entirely in your kernel. Or at least make sure /sys/kernel/mm/ksm/sleep_millisecs is at some much higher value than 20.
yodalf said:
Hi ...
Again, writing in this thread because this bulletin board thinks I should not write in the dev forume...
Message to Silesh Nair: Your 20/11 ROM seems to have the 'ksm' kernel feature enabled. That in itself is not really a problem (however it is quite useless in phones) BUT the default value for sleep_millisecs seems to be set at 20 ms (the default). This might explain the heating issues some people have.
You might want to disable ksm entirely in your kernel. Or at least make sure /sys/kernel/mm/ksm/sleep_millisecs is at some much higher value than 20.
Click to expand...
Click to collapse
You can install kernel Adiutor and disable ksm or change the sleep value on your own. That's easy going
Background
It has been a long time since the Qualcomm first launched the IMS support in its AMSS(Adavanced Mobile Subscriber Software) subsytem since CDMA platforms,which is the major function part of VoLTE implementation on MSM platforms,but even years later,almost no one talks about this topic on internet,someone noticed about the Samsung IMS configuration,but it's higher layer and not applicable to original MSM platform phones.
Why no one talked about manual VoLTE configuration in the past
There are many reasons that caused such situation,first,the Qualcomm have NDA on its platform internal scheme,many engineers hesitate to share even some simple magic value about some NV items,which results complete blackbox to the APSS Android environment developers.Second,when there is limited number of available VoLTE phones,the manual configuration methods are hide by the selfish drive-test related device sellers,and they even try to block some useful info on some websites by abuse in order to hide the top business secret.I tried to talk about such topic in past days,but all got blocked in the end.Third,the phone vendors want you just to buy new phones to support the VoLTE,and they just choose to not support the sold devices,in some time,even add barricade,this is something that are not noticed by many customers
How it worked
Most of the Qualcomm IMS feature are implement in the AMSS subsystem,which means the configuration is saved in modem's memory,in this case,the EFS on QC phones,which means you will not got the VoLTE work through some Android side prop modification,like the most talked Magisk VoEnabler.Although these props in android environment are the key switch to launch the IMS function routine,but it will not work when you just opened the switch.They are just some RILJ/RIL control flags that decide which phone to be used(the imsphone or gsmphone in RILJ code).And such prop flags may vary from vendor to vendor,it might need extra prop to be set to make sure the IMS routine are properly called.In English,the Android side is just a client of the IMS-client inside modem AMSS subsystem,all of the actual IMS procedures are all completed in the modem environment.
How is it configured
There are many tools to configure such thing right now,I guess even some private ones,but the major way to configure the IMS configuration is through QXDM,it will have a plenty of NV items and EFS configuration in IMS section,the Qualcomm have internal guide since MSM8960,which talked about how to manually set those values to make the IMS VoLTE work.however I haven't see anyone even talked about it,may due too the reasons I talked above.Obviously,such manual configuration way is user un-friendly,the QC have to find some way else.This had introduced the MBN MCFG when Chinese rolling out the VoLTE,and such methods were invented by the OPPO I guess(patents about it).MBN format had been used by QC for years,but the mcfg mbn is different at least in some way,so no current available tools to parse it on other platform except the AMSS itself.So The MCFG MBN contains IMS related configuration stuff,but how to find what it actual contains?This problem remains unsolve until I found the ORCT by linneman in 2018,a simple and buggy toolkit to parse at least some recent MSM8996 platform MBNs ,and finnally got the proper contents in sw_mcfg.mbn file,Then it's the time to manually add those NV and items file into EFS through QPST,after all that the VoLTE finally worked.
Misconception about MCFG MBN
I guess people noticed something about MBN when some guy tried to use VoLTE on Pixel 2,then they made the Magisk VoEnabler,they thought they had loaded the proper sw_mcfg.mbn by replaceing the MBNs inside vendor partition,but none of them realized that they actually falled back to the generic 3GPP configuration of MSM platform,and after MSM8996,that configuration defaultly enabled the IMS feature to work on some 3GPP lab setting networks,interestingly very coincident work on live network
Further work
Android PDC
In fact,there is an app called MBN test which is considered as bloatware for many users,none of them realized it's the important tool kit like PDC used to choose the MBN for carriers,but on phone it self,it works through the RIL_PDC related command and have the same feature like Windows PDC,but this app got misconfigured when outside the factory,and its configuration methods are highly secreted by the vendors.no one willing to answer this question.
Android IMS NV configuration
After Android Lolipop,Google had introduced the carrierconfig framework,which provided some internal methods like nvReaditem,which can actually be used to configure the IMS parameters in modem side,but it's really weired that no one had realised about this usage on whole internet.I think it will be a more generic and one-click way to DIY VoLTE even on some other platform through those API,but no one ever talked about it
Add the ORCT mirror
GitHub - vtsingaras/orct: Open Radio Calibration Toolkit, an enhanced Open Source Implementation to replace Qualcomm's QRCT
Open Radio Calibration Toolkit, an enhanced Open Source Implementation to replace Qualcomm's QRCT - GitHub - vtsingaras/orct: Open Radio Calibration Toolkit, an enhanced Open Source Implementat...
github.com
Hey I'm wondering if you know how to change the identification domain. My carrier, Bell mobility, uses "ims.bell.ca" instead of the standard "ims.mnc610.mcc302.3gppnetwork.org".
My OnePlus 8 phone uses [email protected] as it's identification and the IMS core answer with 403 Forbidden.
A pixel 5 request [email protected] and it's working.
What do I need to change in the MBN to make it use "ims.bell.ca"?
Any news about this topic?
Based on other guides I am trying to load MBN files from other smartphones rom having the same soc (Snapdragon 845), but the new MBN file is not loaded and I see no error.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
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.
*
LineageOS is a free, community built, aftermarket firmware distribution of Android 12L (Sv2), which is designed to increase performance and reliability over stock Android for your device.
LineageOS 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. LineageOS does still include various hardware-specific code, which is also slowly being open-sourced anyway.
All the source code for LineageOS is available in the LineageOS Githup repo. And if you would like to contribute to LineageOS, please visit out Gerrit Code Review.
Installation:
If you are on stock OS, you need a custom recovery first. You can get the recommended LineageOS recovery in the official installation instructions link below.
You can use TWRP for installation, however it is no longer officially supported since we do not have full control of its update cycle and potential issues.
If you are coming from stock or other ROMs, you need to make a factory reset.
As always, make sure to backup before installing this ROM.
Installation Instructions:
Backup your data and see the next post below
Recommended TWRP Image:
twrp-3.7.0_9-0-kuntao.img
ROM Download Links:
Google Drive | SourceForge
Recommended Google Apps Package:
NikGapps-core-12.1
NikGapps-SetupWizard
NikGapps-AndroidAuto
Or
MindTheGapps-12.1 (Google Drive mirror)
Root Access:
Magisk v25.2 (more stable experience)
Magisk v26.1 (more updated build)
Recommended Useful Add-on:
p2oggle-1.2
Source Code:
https://github.com/LineageOS
ROM Firmware Required:
Any version of stock 6.0. Recommended P2a42_S251_171107_ROW
Acknowledgements:
Thanks to @mikeioannina for his hard work regarding kuntao and to all other Lineage OS developers
Special thanks to @Astridxx for the device tree sources and for helping me out and to @en666 for early testing the initial build
Important Notes:
As you can see from my profile, I'm not an experienced developer. I've made some builds as a considerable amount of users showed interest in having their devices updated with latest LineageOS code. Therefore, my main objective here is to bring the latest Android security patches to kuntao making monthly builds.
To be clear, I'm more in a situation of "user became builder" than of "ROM developer". Please, understand this.
Long live to our beloved kuntao!
XDAevDB Information
[ROM][12.1][UNOFFICIAL] LineageOS 19.1 for Lenovo P2
Contributors
@Astridxx ,@XiaoAk ,@Sohit5s, @mikeioannina
ROM OS Version: 12.x
ROM Kernel: Linux 3.18.x
Based On: LineageOS
Version Information
Status: Stable
Created 2023-02-22
Last Updated 2023-06-11
Installation Instructions
Remember, making a backup of your data before proceeding is recommended
If you are coming from Stock ROM, please refer first to the instructions below:
Install LineageOS on kuntao
If you are coming from astridxx previous build (aka lineage-19.1-20220822-UNOFFICIAL-kuntao) or my initial build (aka lineage-19.1-20230222-UNOFFICIAL-kuntao) or any version of LOS18.1 or below, you must perform a clean flash. Clean flash instructions:
0- Make a backup (optional, but recommended)
1- Reboot to recovery
2- Format data (will delete all your data!)
3- Reboot to recovery again
4- Wipe > Advanced Wipe:
- Dalvik
- System
- Vendor
- Data
- Cache
- Internal Storage (optional, but recommended)
5- Flash ROM ZIP, Gapps, Gapps add-ons, Magisk add-on, etc
6- Reboot to system
7- Wait until it boots for the first time (may take some minutes)
Update Instructions
NOTE: Dirty flash from any of the aforementioned builds is not supported, device trees were changed. You have been warned!
For updating from one of my builds to another (aka dirty flashing), please do the following:
1- Download ROM ZIP and copy it to the phone
2- Reboot to recovery
3- Flash ROM ZIP
4- Clean cache
5- Reboot to system
Known Issues- Storage encryption is partially broken (if your /data partition is unencrypted, trying to encrypt it using ROM menu will result in a dead OS; if already encrypted, storage encryption may or may not work. IFAIK, it's a kernel side issue)
- Device may not go to deep sleep
- Storage forceencrypt flag is disabled (to encrypt /data partition follow the instructions below)
- TWRP backups are broken (read notes below)
- You tell
Google Play Store Update Bug
If Google Play Store app keeps failing to find updates for apps with message "Something went wrong. Try again.", just clear its data and then it should work again
SafetyNet Check Fails
If your device is rooted, please, follow the instructions contained here
Magisk is Gone After First Boot
Please, just reflash Magisk again (i.e. Reboot to recovery > Flash ZIP > Reboot back to system)
How to encrypt data partition
0- Backup your files (this process will erase everything)
1- Boot to TWRP recovery
1.1- Wipe > Format data > Reboot to system
2- Settings menu > Security > Encryption & credentials > Encrypt phone
3- Reboot to system again
Error restoring TWRP system backups
It looks like TWRP backups are broken for now, so please, if this is a must have for you, you can try to install OrangeFox recovey and follow these instructions (thanks @Zdeslav for that)
ROM Change logs
Code:
02/22/2023
- Initial release
02/27/2023
- Sync latest LOS sources
- Device Tree change: Use old A12L dt instead of los
- Add Lenovo Parts menu (fp gestures, USB fast charge, in-call audio gain, screen kcal)
- Updates phone vibration strength
- Add fix to device deep sleep issue
- Many more changes
03/29/2023
- Fetch latest Device Tree sources
-- vendorsetup.sh: Add Trebuchet patch
-- AOSP WFD doesn't support protected Wi-Fi Display buffers
-- Overlays:
--- Enable voWIFI support
--- Disable IMS features for Turkiye networks
-- Don't warn user about FC in Vanced microG
-- DT rootdir:
--- Add cpuset for the camera daemon
--- Remove permission restrictions to the socket file
--- Restore iio sensor device6 on boot
-- Bump graphene camera version to 60
-- Don't force enable ims features
-- sepolicy: Address sensor hal denials
- Update LOS components
-- Manifest: Sync x86_64 webview prebuilts again
-- Update zlib source
- Sync latest LOS source
- Merge March security patch
04/09/2023
- Fetch latest Device Tree sources
-- Add navbar enable/disable support
-- fs: Revert sdfat update for OTG
-- block: Add zen io scheduler
-- dts: Decrease BCL low battery threshold to 5%
-- DeskClock:
--- Wallpaper based text coloring for digital
--- Adapt digital clocks to S style
--- Remove night mode
-- Trebuchet:
--- Kill haptics in recents
--- Make overview scrim transparent again
-- Nfc: Fix Mifare Classic reading
- Update LOS components:
-- lineage: Track the FMRadio App and dependencies
- Sync latest LOS source
04/19/2023
- Fetch latest Device Tree sources:
-- sepolicy: Silence tracingproxy_service neverallow denial
-- sepolicy: Allow system_app to access storaged via IPC
- Sync latest LOS source
- Merge April security patch
05/09/2023
- Fetch latest Device Tree sources:
-- Bump graphene camera version to 62
-- devicesettings: Protect broadcast to fingerprint gestures
-- rootdir: Remove permission restrictions to the socket file
- Sync latest LOS source
- Merge May security patch
06/11/2023
- Fetch latest Device Tree sources:
-- parts: Update few parts icon
-- vendorsetup.sh: Use depth=1
-- Remove pixel_2016_exclusive
-- Bump graphene camera version to 63
- Sync latest LOS sources:
-- Additional zstd cmdline tools
-- zstd compression support for rsync
-- 2023-06 ASB patching: packages/apps/Traceur
- Merge June security patch
ROM Screenshots
Attached below. Others are available here.
February 27th 2023 Release
Changelog:
- Sync latest LOS sources
- Device Tree change: Use old A12L dt instead of los
- Add Lenovo Parts menu (fp gestures, USB fast charge, in-call audio gain, screen kcal)
- Updates phone vibration strength
- Add fix to device deep sleep issue
- Many more changes
Download URLs: GDrive | SF
Dirty flash still not supported (tree changed), please make a clean flash
Thank you so much for keepng Lineage alive, its very much appreciated.
@leo_97 thank you for this new build! Installed it straight away and now the phone is running since then and also, I've flashed with battery at 67% and atm, after a quite hard usage to test out the new features, I'm on 13%. Basically, so far so good!
p2a42, twrp 3.7, rooted, unencrypted
Thank you @leo_97 !
I was frustrated that Lineageos 18.1 was no longer maintained when I saw this update!
It's amazing
To all users and developers who tested and created this ROM, is it time to switch on this version ?
Or is it better to wait ?
For example, automatic update is possible after install ?
bidulez said:
automatic update is possible after install ?
Click to expand...
Click to collapse
No
bidulez said:
Thank you @leo_97 !
I was frustrated that Lineageos 18.1 was no longer maintained when I saw this update!
It's amazing
To all users and developers who tested and created this ROM, is it time to switch on this version ?
Or is it better to wait ?
For example, automatic update is possible after install ?
Click to expand...
Click to collapse
You are welcome
If it's time to switch, I believe it's a matter of personal decision. Maybe you could wait the next build and then decide...
If with "automatic updates" you mean OTA updates, then the answer (as already pointed out by @utwer ) is no. But once the trees are stable enough, I hope every user will be able to just update to the newer versions flashing ROM ZIP through TWRP (just like it's done on LOS18.1)
BTW, IDK if you already saw it, but we are maintaining a monthly build of LOS18.1 which you can download from here. The source tree used there is far more tested (as it's older) than this one. Anyway, except by the encryption thing, you shouldn't have any problems using this LOS19.1 ROM as our amazing developers made an excellent job here.
Reg, Ive installed it and I may say it is quite good. Not tried to root it yet. Dont have direct problems with ROM and functionality, for me everything works. Camera, Location, GSM, Data, WiFi. With developer options I've turned off Animation scale on three options to OFF, and is good. Stable reliable.
MindTheGapps-12.1 works every app from Google, Phone, Contact, Gmail, maps...etc...
What I need root mostly is for Call recording (Skvalex) and Viper4Android.
Some words about twrp-3.7.0_9-0-kuntao.img,
With this I have only problems, so far I lost a few backups and I need to install it all over again a few times allready. Disappointed very. I can't rally on this when I make a nandroid ba.ckups.
Also lost backups for LOS18.1 and I am been very pis....ed off. Error 255 on System recovery, other Data, Boot, EFS, Vendor, etc.. recovery is good.
So I've installed OrageFox for Kuntao. Tried several backups to restore already and I may say I am very satisfied. Puh
What is on my mind, when I installed a Magisk 25.2, no matter of LOS 18.1 or 19.1 with very few modules, after 7-8 reboots I've got boot loops which is beyond repairable.. Try to remove modules in TWRP in file manager, uninstall whole magisk, no way, but what it is seems that DATA got corrupted some how, everytime.
There were also installed TWRP mentioned above.
Now I am with OrangeFox and I will try tomorrow to Root it and see is there any connection between Magisk and recovery software (OrangeFox or TWRP).
Reg
Tried quickly this ROM yesterday. In general all working, but didn't test much.
Few feedbacks:
-Scaler for brightness level is weird, very different from the original Lenovo roms. Anyway, not really important, but something that I noticed.
-Missing haptic feedback when using the fingerprint reader as a gesture button. Again, not critical, but I am really accustomed to it and thus I noticed immediately.
-Missing haptic feedback intensity regulation, or could not find it. It's there for general call/notification vibration, but if I remember correctly lineage could also change haptic.
Impressed that you could integrate also some lenovo features, even if of course not all of them
If you want me to test something more specific, please let me know. Ah, my model is the 4 GB/ 64 GB combination.
Cheers!
leo_97 said:
You are welcome
If it's time to switch, I believe it's a matter of personal decision. Maybe you could wait the next build and then decide...
If with "automatic updates" you mean OTA updates, then the answer (as already pointed out by @utwer ) is no. But once the trees are stable enough, I hope every user will be able to just update to the newer versions flashing ROM ZIP through TWRP (just like it's done on LOS18.1)
BTW, IDK if you already saw it, but we are maintaining a monthly build of LOS18.1 which you can download from here. The source tree used there is far more tested (as it's older) than this one. Anyway, except by the encryption thing, you shouldn't have any problems using this LOS19.1 ROM as our amazing developers made an excellent job here.
Click to expand...
Click to collapse
So for 18.1 we can just flash the newer versions via TWRP and do not have to reinstall the entire ROM?
Zdeslav said:
Reg, Ive installed it and I may say it is quite good. Not tried to root it yet. Dont have direct problems with ROM and functionality, for me everything works. Camera, Location, GSM, Data, WiFi. With developer options I've turned off Animation scale on three options to OFF, and is good. Stable reliable.
MindTheGapps-12.1 works every app from Google, Phone, Contact, Gmail, maps...etc...
What I need root mostly is for Call recording (Skvalex) and Viper4Android.
Some words about twrp-3.7.0_9-0-kuntao.img,
With this I have only problems, so far I lost a few backups and I need to install it all over again a few times allready. Disappointed very. I can't rally on this when I make a nandroid ba.ckups.
Also lost backups for LOS18.1 and I am been very pis....ed off. Error 255 on System recovery, other Data, Boot, EFS, Vendor, etc.. recovery is good.
So I've installed OrageFox for Kuntao. Tried several backups to restore already and I may say I am very satisfied. Puh
What is on my mind, when I installed a Magisk 25.2, no matter of LOS 18.1 or 19.1 with very few modules, after 7-8 reboots I've got boot loops which is beyond repairable.. Try to remove modules in TWRP in file manager, uninstall whole magisk, no way, but what it is seems that DATA got corrupted some how, everytime.
There were also installed TWRP mentioned above.
Now I am with OrangeFox and I will try tomorrow to Root it and see is there any connection between Magisk and recovery software (OrangeFox or TWRP).
Reg
Click to expand...
Click to collapse
So,
Resolved issue of bootloops:
after you install SU like Magisk, and wan to freeze apps by Titanium Backup or Neo-Backup, Apps which causes bootloops are ROM's Phone and Massages (In my case, for 16.1, 18.1, 19.1), I freeze Audio.apk who need to be shutdown for Viper4Android app who takes audio management and freezing is OK.
But Phone and Massages which are frozen cause bootloops, so you need to return from freeze state somehow in TWRP or OrangeFox with file management or revert backup. Revert backup is easier .
Camera; found issue when suddenly is out of work and cannot be connected to app. Also have problems with video cast Skype, Viber, Whatsapp, Telegram video is frozen. Hardly switch in Camera app from Camera mode to Video mode and vice-versa.
Clock & Info; missing dock icons and info, can't "capture" moment for reason when they disappear but after a while all is returned again.
P2oggle, left switch button work okey in form of 0.4 version.
Reg,
thanks on the development for this 19.1 ROM.
Zdeslav said:
Camera; found issue when suddenly is out of work and cannot be connected to app. Also have problems with video cast Skype, Viber, Whatsapp, Telegram video is frozen. Hardly switch in Camera app from Camera mode to Video mode and vice-versa.
Clock & Info; missing dock icons and info, can't "capture" moment for reason when they disappear but after a while all is returned again.
P2oggle, left switch button work okey in form of 0.4 version.
Reg,
thanks on the development for this 19.1 ROM.
Click to expand...
Click to collapse
Hello,
I've been using this ROM as my daily driver and couldn't confirm this camera bug, could you please give a few extra details? I tested on Telegram app. Which version are you using? The Play Store's one or the one from Telegram's official website? Did you give the app "While using app" permission or "Ask every time" permission for camera? Are you sure the QS Tile "Camera access" is activated (available) when the mentioned bug occurs?
Regarding the Clock widget, yes, there's a small glitch and I'm not sure on how to fix it, if it doesn't load at all, a system reboot should fix it.
P2oggle v1.2 is 100% working as far as I can tell, so you guys can try it too if you want.
MKbis said:
-Scaler for brightness level is weird, very different from the original Lenovo roms. Anyway, not really important, but something that I noticed.
-Missing haptic feedback when using the fingerprint reader as a gesture button. Again, not critical, but I am really accustomed to it and thus I noticed immediately.
-Missing haptic feedback intensity regulation, or could not find it. It's there for general call/notification vibration, but if I remember correctly lineage could also change haptic.
Click to expand...
Click to collapse
I'm not sure if it's possible to "fix" the brightness slider.
If with "haptic feedback" you mean the phone vibration, you can just adjust it to your liking in Settings > Lenovo parts > Vibration strength, it should affect fp reader too, dunno if it affects call vibration but IFAIK it should.
Regards
Leo_97
I've been using this ROM as my daily driver and couldn't confirm this camera bug, could you please give a few extra details? I tested on Telegram app. Which version are you using? The Play Store's one or the one from Telegram's official website? Did you give the app "While using app" permission or "Ask every time" permission for camera? Are you sure the QS Tile "Camera access" is activated (available) when the mentioned bug occurs?
Click to expand...
Click to collapse
Yes on latest Telegram app from web site, tried with Google Meet, Whatsapp, Viber.., always breaking connection with API/drivers. Yes I gave all permissions to Camera. If I am not giving permissions for camera, I have always noticed to confirm what I am giving, so I am excluded from this solution. And clean storage and cashe from app regular but not prevail.
But, in a while after installed a new ROM without giving SU/Root I noticed this behavior, right after I wrote earlier post up. My bad .
Choppy startup of camera, can't easily transfer from video 2 camera and vice-versa, so I tell to my self to test intensively.
Regarding the Clock widget, yes, there's a small glitch and I'm not sure on how to fix it, if it doesn't load at all, a system reboot should fix it.
Click to expand...
Click to collapse
Yes after a while it is returned back without reboot. weird.
P2oggle v1.2 is 100% working as far as I can tell, so you guys can try it too if you want.
Click to expand...
Click to collapse
Didn't know about P2oggle v1.2 app, thx
March 29th 2023 Release
Changelog:
- Fetch latest Device Tree sources
- Update LOS components webview & zlib
- Sync latest LOS source
- Merge March security patch
- Many more changes
Full change log available on the bottom of this post
Download URLs: GDrive | SF
Note: Please, before flashing, carefully read the instructions from the 3rd post above to avoid breaking your system.
Enjoy!
Big Thank you for this release. Will try it. - test
Great job, dude.
Previous versions had some buggy charging driver that left a wakelock running after each charging, and u had to restart phone each time or leave it to slowly drain battery by not going to sleep.
Somehow this problems seems to be gone in your build and that is awesome.
I've been using the build for about 2 weeks now and so far everything seems to be working fine.
April 09th 2023 Release
Change log:
- Fetch latest Device Tree sources (lots of changes)
- Update LOS components:
-- lineage: Track the FMRadio App and dependencies
- Sync latest LOS source
- Many more changes
Full change log available on the bottom of this post
Download URLs: GDrive | SF
Note: Dirty flash is unsupported for this build, please make a clean flash
Enjoy!