[FLASHABLE] LineageOS/AOSP Camera Fixes for US996/LS997 - (aka s5k2p7 sensor variant) - LG V20 ROMs, Kernels, Recoveries, & Other Developm

UPDATE: As of today this fixes already went into LineageOS official, but keeping the thread for future reference and extra info...
PROBLEM
Some users report that their US996 and LS997 variants are only able to utilize 2 cameras in LineageOS or AOSP based ROMs.
The problem happens regardless of camera being used.
This is not the 'dark screen' capture on the Snap Camera happening on LineageOS, the problem is the 3rd camera not being active at all.
On further investigation this phones use a similar (spec wise) but different camera sensor and actuators for the 3rd camera.
DESCRIPTION
As of today (Sep-12-2017) The current LineageOS and AOSP builds that use LGE 8996 common repository are still missing some information for some variants of our beloved US996 and LS997 phones. Seems like these variants use a different camera sensor on some called the s5k2p7.
So I have decided to share my personal patches for users who might have problems with only being able to utilize 2 cameras (users whose only cameras that work are wide angle and selfie, and not the normal rear camera). I hope this is temporary and that we can get the fixes upsteam sometime soon but I am sure I can make some V20 users happy with this.
The other added benefit of using this is that this Kernel is based on CM's August version and will not have the touch-screen bug that has been recently seen and experienced on LineageOS recent automated builds.
The way it works is that in order for LineageOS or any AOSP ROM to see and activate this camera it needs a proper library and binary blobs for qcamera server. I have extracted these new'ish updated binary blobs from the US996 firmware and after doing so and flashing them on top of your ROM you should now be able to see the 3rd camera on these phones. However after patching the above it is still lacking proper Kernel support so that focusing works and hence will need to flash a re-compiled Kernel on top of your ROM to make it work.
INSTRUCTIONS
Be in recovery, if you are looking for this post you most likely already have AOSP and are facing these issues
Please just try the builds from this post #20 and flash it as @x86cpu has incorporated those fixes in this UNOFFICIAL builds
Flash the optional "flashable-snap.zip" if your Snap camera starts up black by default. This will make some users happy, this is not related to the sensor fix but it is just using an older Snap version that does proper auto shutter speed.
Reboot
KERNEL CHANGES
The changes lie in the following files that can be obtained and extracted from LG's LS997 Kernel sources:
Code:
drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c
drivers/media/platform/msm/camera_v2/sensor/ois/msm_ois.c
drivers/media/platform/msm/camera_v2/sensor/ois/Makefile
drivers/media/platform/msm/camera_v2/sensor/ois/lgit_s5k2p7_rohm_ois.h
drivers/media/platform/msm/camera_v2/sensor/ois/lgit_s5k2p7_rohm_ois.c
DOWNLOADS
flashable-lge-v20-s5k2p7-eeprom-camera-libs.zip [NOT NEEDED ANYMORE, THIS IS JUST A PLACEHOLDER, READ THE INSTRUCTIONS]
flashable-snap.zip
Please just try the builds from this post #20
<< If you like my work here is my hat, please donate! >>​
​

CHANGELOG
v1.0
Added support for US996 (Tested Kernel and libraries on two phones, all working well).
Added support for LS997 (Kernel Untested, I hope to get feedback soon).
Binary blobs based on US996 latest version of 10h.

I'll be testing it out soon as I get home. I love aosp and if all 3 cameras work it will be awesome.
Sent from my LG-LS997 using XDA-Developers Legacy app
---------- Post added at 04:48 PM ---------- Previous post was at 04:07 PM ----------
I keep getting error 1 when installing the kernel.
Sent from my LG-LS997 using XDA-Developers Legacy app

philiptibbs said:
I'll be testing it out soon as I get home. I love aosp and if all 3 cameras work it will be awesome.
Sent from my LG-LS997 using XDA-Developers Legacy app
---------- Post added at 04:48 PM ---------- Previous post was at 04:07 PM ----------
I keep getting error 1 when installing the kernel.
Sent from my LG-LS997 using XDA-Developers Legacy app
Click to expand...
Click to collapse
Thanks for testing for the LS997, I was explicitly waiting this to happen ... since I hadn't tested this myself on LS997. Can you check the zip and open anykernel.sh:
Change
Code:
do.devicecheck=1
to
Code:
do.devicecheck=0
Save the *.zip and reflash?
Since I used an equivalent zip I created for US996, I had used the following:
Code:
device.name1=omni_us997
device.name2=ls997
device.name3=LG-LS997
But seems like none of those names match the LS997 device, do you know what name it uses so that I can fix it properly?

Elsa is what TWRP has it for and ls997 .
Sent from my LG-LS997 using XDA-Developers Legacy app
---------- Post added at 05:44 PM ---------- Previous post was at 05:43 PM ----------
I will try in a little bit going to dinner.
Sent from my LG-LS997 using XDA-Developers Legacy app

I still get error 1 after changing the do.devicecheck=0 file ? I tried it on TWRP 3.0.2.1 and 3.1.1.0

Omar-Avelar said:
PROBLEM
Some users report that their US996 and LS997 variants are only able to utilize 2 cameras in LineageOS or AOSP based ROMs.
The problem happens regardless of camera being used.
This is not the 'dark screen' capture on the Snap Camera happening on LineageOS, the problem is the 3rd camera not being active at all.
On further investigation this phones use a similar (spec wise) but different camera sensor and actuators for the 3rd camera.
DESCRIPTION
As of today (Sep-12-2017) The current LineageOS and AOSP builds that use LGE 8996 common repository are still missing some information for some variants of our beloved US996 and LS997 phones. Seems like these variants use a different camera sensor on some called the s5k2p7.
So I have decided to share my personal patches for users who might have problems with only being able to utilize 2 cameras (users whose only cameras that work are wide angle and selfie, and not the normal rear camera). I hope this is temporary and that we can get the fixes upsteam sometime soon but I am sure I can make some V20 users happy with this.
The other added benefit of using this is that this Kernel is based on CM's August version and will not have the touch-screen bug that has been recently seen and experienced on LineageOS recent automated builds.
The way it works is that in order for LineageOS or any AOSP ROM to see and activate this camera it needs a proper library and binary blobs for qcamera server. I have extracted these new'ish updated binary blobs from the US996 firmware and after doing so and flashing them on top of your ROM you should now be able to see the 3rd camera on these phones. However after patching the above it is still lacking proper Kernel support so that focusing works and hence will need to flash a re-compiled Kernel on top of your ROM to make it work.
INSTRUCTIONS
Be in recovery, if you are looking for this post you most likely already have AOSP and are facing these issues
Flash your favorite AOSP based ROM (I recommend lineage-14.1-20170728-nightly-us996-signed.zip for US996 if you want Bluetooth working).
Flash "flashable-lge-v20-s5k2p7-eeprom-camera-libs.zip".
Flash "flashable-*-gamma-kernel-1.0.zip".
Flash the optional "flashable-snap.zip" if your Snap camera starts up black by default. This will make some users happy, this is not related to the sensor fix but it is just using an older Snap version that does proper auto shutter speed.
Reboot
KERNEL CHANGES
The changes lie in the following files that can be obtained and extracted from LG's LS997 Kernel sources:
Code:
drivers/media/platform/msm/camera_v2/sensor/actuator/msm_actuator.c
drivers/media/platform/msm/camera_v2/sensor/ois/msm_ois.c
drivers/media/platform/msm/camera_v2/sensor/ois/Makefile
drivers/media/platform/msm/camera_v2/sensor/ois/lgit_s5k2p7_rohm_ois.h
drivers/media/platform/msm/camera_v2/sensor/ois/lgit_s5k2p7_rohm_ois.c
DOWNLOADS
flashable-lge-v20-s5k2p7-eeprom-camera-libs.zip
flashable-ls997-gamma-kernel-1.0.zip
flashable-us996-gamma-kernel-1.0.zip
flashable-snap.zip
<< If you like my work here is my hat, please donate! >>​
​
Click to expand...
Click to collapse
Do you have the exact source (against the LOS kernel) you changed? And what blobs had to be updated. I did try this adding into the LOS kernel on my us996 and blobs. Except it didn't work, nothing could open the camera any more. Kernel compiles, but not sure if I got an mis-config there or missing some blobs. https://review.lineageos.org/189552

Hey @x86cpu, thanks... So I had to do it con branch cm-14.1_20170811.
I didnt get to try it with the latest upstream, and for the blobs it is all contained un that zip (libs, and *.xml). Sorry that I cannot be more verbose as I am away from my computer.
Btw, updating the prebuilts on an already flashed system requires you to update the SELinux policies to match again:
Code:
chown root:shell /system/bin/mm-qcamera-*;
chmod 0755 /system/bin/mm-qcamera-*;
chcon -t system_file /system/bin/mm-qcamera-app;
chcon -t mm-qcamerad_exec /system/bin/mm-qcamera-daemon;
set_perm_recursive 0 0 0755 0644 /system/vendor/lib;
set_perm_recursive 0 0 0755 0644 /system/vendor/lib64;
set_perm_recursive 0 0 0755 0644 /system/etc/camera;
chmod 0644 /system/media/*.bin;
restorecon -r /system/vendor/lib;
restorecon -r /system/vendor/lib64;
restorecon -r /system/etc/camera;
restorecon -r /system/media;

Omar-Avelar said:
Hey @x86cpu, thanks... So I had to do it con branch cm-14.1_20170811.
I didnt get to try it with the latest upstream, and for the blobs it is all contained un that zip (libs, and *.xml). Sorry that I cannot be more verbose as I am away from my computer.
Btw, updating the prebuilts on an already flashed system requires you to update the SELinux policies to match again:
Code:
chown root:shell /system/bin/mm-qcamera-*;
chmod 0755 /system/bin/mm-qcamera-*;
chcon -t system_file /system/bin/mm-qcamera-app;
chcon -t mm-qcamerad_exec /system/bin/mm-qcamera-daemon;
set_perm_recursive 0 0 0755 0644 /system/vendor/lib;
set_perm_recursive 0 0 0755 0644 /system/vendor/lib64;
set_perm_recursive 0 0 0755 0644 /system/etc/camera;
chmod 0644 /system/media/*.bin;
restorecon -r /system/vendor/lib;
restorecon -r /system/vendor/lib64;
restorecon -r /system/etc/camera;
restorecon -r /system/media;
Click to expand...
Click to collapse
Yeah, I built the entire ROM. Kernel changes went it, but for LOS to use it it'll need to have the other g5 (lucye) changes in there too. kernel is the same source for both sets. The touchscreen kernel bug should be fixed shortly. Trying to get this into LOS might be next. My us996 though doesn't have that sensor, so I can only test that my builds do not break my camera (which they do currently).

What would happen if i would flash the camera libs on a h990ds which has the same s5k2p7 sensor?

jody2k said:
What would happen if i would flash the camera libs on a h990ds which has the same s5k2p7 sensor?
Click to expand...
Click to collapse
You would get the 3rd camera 'working' and showing in the apps. But without focus (OIS). Once @x86cpu gets the Kernel changes upstream then we could get the DS Kernel built and hopefully get this working soon for your device.

x86cpu said:
Yeah, I built the entire ROM. Kernel changes went it, but for LOS to use it it'll need to have the other g5 (lucye) changes in there too. kernel is the same source for both sets. The touchscreen kernel bug should be fixed shortly. Trying to get this into LOS might be next. My us996 though doesn't have that sensor, so I can only test that my builds do not break my camera (which they do currently).
Click to expand...
Click to collapse
I see, yeah... seems like it still needs more dissecting to cherry-pick and keep the support for the G5/G6's intact... :highfive: thanks for being proactive on getting these upstream as I haven't had much extra time

Omar-Avelar said:
I see, yeah... seems like it still needs more dissecting to cherry-pick and keep the support for the G5/G6's intact... :highfive: thanks for being proactive on getting these upstream as I haven't had much extra time
Click to expand...
Click to collapse
I think I got it. Those kernel changes are correct. The blobs I had were messed up. I'm hoping to have a build (UNOFFICAL) shortly that will have the latest LOS, kernel no touchscreen fixed, blueborne patches in too. Only for us996, but it is a start. I'll validate it works for me and does not break my camera at least. I won't be able to tell if it works for the s5k2p7 sensor as mine does not appear to have it.

Omar-Avelar said:
You would get the 3rd camera 'working' and showing in the apps. But without focus (OIS). Once @x86cpu gets the Kernel changes upstream then we could get the DS Kernel built and hopefully get this working soon for your device.
Click to expand...
Click to collapse
My friend we have working focus already thx to jahlex
https://forum.xda-developers.com/v20/development/dirtysanta-h990-t3624296/page71
But the kernel is bit basic for moment, no kcal colors tweaking and no gouvernors or schedulers etc but we cant complain
I'm currently using kernel with lot of features (from leicxan) but focus is not working thats why i asked about the libs maybe i could get focus to work on that kernel with flashing libs

x86cpu said:
I think I got it. Those kernel changes are correct. The blobs I had were messed up. I'm hoping to have a build (UNOFFICAL) shortly that will have the latest LOS, kernel no touchscreen fixed, blueborne patches in too. Only for us996, but it is a start. I'll validate it works for me and does not break my camera at least. I won't be able to tell if it works for the s5k2p7 sensor as mine does not appear to have it.
Click to expand...
Click to collapse
https://drive.google.com/open?id=0B51rjK5Hd_P5NmpwY1o4VmlyaUk
us996 test one to ensure what I did is sane. My us996 works still. In the s5k2p7_sensor_test folder.

jody2k said:
My friend we have working focus already thx to jahlex
https://forum.xda-developers.com/v20/development/dirtysanta-h990-t3624296/page71
But the kernel is bit basic for moment, no kcal colors tweaking and no gouvernors or schedulers etc but we cant complain
I'm currently using kernel with lot of features (from leicxan) but focus is not working thats why i asked about the libs maybe i could get focus to work on that kernel with flashing libs
Click to expand...
Click to collapse
Seems like you only need to flash the libs and propeitary files (flashable-lge-v20-s5k2p7-eeprom-camera-libs.zip) without my Kernel then and it should work. I wasn't aware of that Kernel
x86cpu said:
https://drive.google.com/open?id=0B51rjK5Hd_P5NmpwY1o4VmlyaUk
us996 test one to ensure what I did is sane. My us996 works still. In the s5k2p7_sensor_test folder.
Click to expand...
Click to collapse
Awesome! Can anyone with the US996 with the s5k2p7 sensor try this build? I gave that phone to my sister and cannot test it myself either... this would bring confidence on the fixes all together and getting this upstream in a not too distant future

Omar-Avelar said:
Seems like you only need to flash the libs and propeitary files (flashable-lge-v20-s5k2p7-eeprom-camera-libs.zip) without my Kernel then and it should work. I wasn't aware of that Kernel
Awesome! Can anyone with the US996 with the s5k2p7 sensor try this build? I gave that phone to my sister and cannot test it myself either... this would bring confidence on the fixes all together and getting this upstream in a not too distant future
Click to expand...
Click to collapse
Not sure what you mean with properitary files ? My knowledge is pretty low of tweaking files

Oh oxejar whats gama kernel
---------- Post added at 09:58 PM ---------- Previous post was at 09:51 PM ----------
Omar whats gama kernel

Omar-Avelar said:
Seems like you only need to flash the libs and propeitary files (flashable-lge-v20-s5k2p7-eeprom-camera-libs.zip) without my Kernel then and it should work. I wasn't aware of that Kernel
Awesome! Can anyone with the US996 with the s5k2p7 sensor try this build? I gave that phone to my sister and cannot test it myself either... this would bring confidence on the fixes all together and getting this upstream in a not too distant future
Click to expand...
Click to collapse
I'm hoping to have an UNOFFICIAL build for this today (us996/ls997/h918/vs985). This would have the necessary blobs/configs that you had in your .zip file as well as the update into the kernel at the latest LOS release. I want to test first with my us996 just to ensure that I do not break my own camera. I do not have the s5k2p7 sensor, so I cannot test if that part works, but it should not prevent my camera from working either.

Omar-Avelar said:
Seems like you only need to flash the libs and propeitary files (flashable-lge-v20-s5k2p7-eeprom-camera-libs.zip) without my Kernel then and it should work. I wasn't aware of that Kernel
Awesome! Can anyone with the US996 with the s5k2p7 sensor try this build? I gave that phone to my sister and cannot test it myself either... this would bring confidence on the fixes all together and getting this upstream in a not too distant future
Click to expand...
Click to collapse
Are you able to test: https://drive.google.com/drive/folders/0B51rjK5Hd_P5NmpwY1o4VmlyaUk The ls997 for 09202017 has the necessary files/kernel fixes to make this sensor work....or at least I think it does. Just need confirmation things might work.

Related

[CM12][5.0.2][Unofficial][Dior][Stable] Optimized CM 12 for QCOM Redmi Note 4G

Optimized CyanogenMod 12 Android 5.0.2 Lollipop for the Redmi Note 4G(QCOM) brought to you by haoyangw
NOTE: This is for the QCOM variant of the Redmi Note, otherwise known as Redmi Note 4G, and NOT the MTK variant of the Redmi Note. In short, this ROM will NOT work on the MTK variant of Redmi Note 4G
NOTE: GApps is NOT provided, use any GApps package you can find. I would recommend Open GApps for Lollipop(link below).​
Code:
#include <std_disclaimer.h>
/*
* Your warranty is now void.
*
* We're 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.
*
*/
Version Number explanation is in the #2 post, changelog and device tree branches for my github repositories explanation is listed in the #3 post
Comment your reviews below or even better, PM me as I won't be regularly monitoring this thread. Thanks again! You will be listed in the credits too ​
Downloads
ROMs
All ScarletRice builds and addons(AndroidFileHost)
All ScarletRice builds and addons(BasketBuild)
ScarletRice selected builds and addons(XDA)
I don't have the time to link specific builds everytime there is a new one anymore, so unfortunately you all have to go into XDA downloads or AndroidFileHost folder and download the latest one. So sorry!
Recoveries(compiled by me )
CWM, Philz touch and twrp recoveries(AndroidFIleHost)
Addons(includes my custom kernels So keep an eye on it)
Addons(AndroidFileHost)
Addons(BasketBuild)
XDA Downloads(Addons and ROMs)
Older downloads:
ScarletRice Beta 0.1
ScarletRice Alpha 0.02: https://mega.co.nz/#!40cXxKQL!Dd-pk41oJOPJbhLILLGnS9yAE09ly6nKIIfgRzLCpak
ScarletRice Beta 0.1 AndroidFileHost mirror
ScarletRice Alpha 0.01: https://mega.co.nz/#!EgN1lIxY!n7f-o9bujoh6eAu0H8iuaiiGrQ1fG3OCxYoodAyuLSA
The battery life so far on this ROM is amazing! It doesn't face any kind of drain issues so far, except maybe for the infamous Google Play Services wakelocks. To quote:
Swordsman0815 said:
Battery life seems to be amazing... I am off the charger for over 12hrs and still have around 46% of charge left
Click to expand...
Click to collapse
Well good/bad battery life is actually really subjective, some people might have higher standards due to their past experience etc so it all depends! Try it out yourself and see
Not working:
Cast screen/Screen mirroring
FM Radio
Compass
Back Camera and front camera video Fixed now
Buggy power detection Fixed
Flashing red borders(chrome only) Fixed
Working:
Back and Front camera(video + photo)(wipe dalvik if doesn't work)
Wifi
Headphones
Touch
Auto brightness
Gyroscope
Alarms
Location
Double tap 2 wake(built into ROM zip's kernel and my custom kernels) Removed due to bugs
Anything else
Installation
Download the ROM from the link above
Download GApps package for Lollipop(Recommended: OpenGapps, for 4.4+ and all architectures)
Download any addons/custom kernels from links above or anywhere else
Put the zip files on your SDCard
Reboot in Recovery(choose one of the 3 above if you wish )
Wipe Data / Factory Reset(ONLY IF you are coming from another ROM/upgrading to beta 0.2.x to get working camera)
Recommended: Wipe dalvik-cache
Select "Install zip from SDCard"
Choose CM12 zip file
Select "Install zip from SDCard"
Choose GApps zip file
Optional: Select "Install zip from SDCard"
Optional: Choose addon/kernel zip
Reboot system
Reporting bugs
If you have found a bug, make sure you fill up a form here: Google Form: Bug reporting This allows me to easily track all bugs reported without scanning the whole thread. Do make SURE that you fill in a VERY detailed description! And don't forget logs! For a tutorial on how to get logs, here you go! Log tutorial Of course, feel free to still report bugs here as I will be monitoring this thread But you MUST fill up a form, reporting on XDA is optional
Sources
Manifest
For those who would like a shortcut to sync all the neccessary repos to build stable cm12, just download/copy the contents of this file into .repo/local_manifest: Local manifest xml and the next time you repo sync everything will be there Then just 'lunch cm_dior-userdebug' and 'make -j4 otapackage'
Manually
I've finally given up making my own trees and fixing the annoying bugs in Xiaomi's kernel sources, so here are all the working tree/sources brought to you by our awesome devs! I take no credit for this! GO AND THANK THEM!
Edit: I've made some minor updates and fixes to the trees, but still credit goes to them!
Updated trees(updated by me but originally created by the following devs)
Device tree
Kernel source
Vendor tree(a.k.a. prebuilt/proprietary blobs tree)
Original trees:
@Silesh.Nair's device tree
@Silesh.Nair's vendor tree
@audahadi's kernel source
@stane1983's kernel source
I've uploaded the device tree I used to compile twrp to my device tree above, the branch name is 'twrp'. It's based on syhost's outdated twrp device tree, with problematic flags removed to fix bugs and also translated back into english, so there you go!
NOTE: Currently this device tree is ONLY for compiling CM12, you can face all kinds of build errors if you compile CM11 with it. For example, you will not be able to compile sepolicy in the device tree. You have been warned. Have fun building
Credits
CyanogenMod
XDA
syhost(for his twrp device tree)
Stane1983(for his first working trees)
Silesh.Nair(for his updated trees)
sm_94(for his suggestions on fixes)
And everyone else who contributed logcats and findings and worked hard for the better of all Note 4G users. Thanks!
XDA:DevDB Information
ScarletRice, ROM for the Xiaomi Redmi Note
Contributors
haoyangw
Silesh.Nair
sm_94
stane1983
sadlmadl(Contributed best and most logs and reports)
Swordsman0815(Contribute working/not working reports and logs )
@suhasgta(contributed logs, suggestions and reports )
And all others who contributed logs and reports! Thanks A LOT!
ROM OS Version: 5.0.x Lollipop
ROM Kernel: Linux 3.4.x
Based On: CyanogenMod
Version Information
Status: Stable
Created 2015-03-17
Last Updated 2015-11-29
Version numbers
Version Number explanation
There will be 4 naming conventions for builds, namely Alpha, Beta, Release Candidate and Stable.
Alpha - Build is NOT tested and may not boot
Beta - Build has been tested and boots up, but there are many device-related issues and bugs
Release Candidate, or RC - Build has been tested and device-related issues and most bugs are fixed
Stable - No more than 3 minor bugs and no performance or battery drain issues(caused by ROM on my side)
Changelog + Github Repos' Branches
Changelog:
1.0
Device:
Fixed front and back camera(photo+video) as well as video playback
ROM:
Optimized with O3 and graphite
Enabled optimizing compiler for ART
Kernel:
Added more cpu governors(total 23)
Added gamma control
Added faux sound control
Added alucard and intelli hotplug
Compiled with O2
Maybe more(can't remember)
0.2.4
Device:
Merged changes from sileshn
Fixed some more webview problems(that were not caused by the previous absence of webview completely)
Added FM blobs, FM radio should work properly now (also means you'll need my new local manifest to sync qcom's fm stuff)
Tweaked media configs, hopefully improves some stuff(but playing youtube videos and the like still not working )
0.2.3.1
ROM:
Fixed superuser
Device:
Fixed google play store crashes
Tweaked button brightness, hopefully it isn't too bright nor dim
Old builds' changelogs:
0.2.3
ROM:
Compiled with user instead of eng, should result in increased performance!
Fixed performance issues! Now it's faster than syhost's cm12.1! You know what that means? if we build for cm12.1, then bam, performance will be faster than a rocket! And did I mention Justarchi optimizations and graphite flags?
Many vulnerability fixes like the new Serialization vulnerability
Device:
Bright button lights should now be fixed No light at all Sorry!
Location should be working properly now, without relying on Xiaomi's partners like Qualcomm
Fixed annoying flashing red borders ONCE AND FOR ALL!
0.2.2
Clean install(i.e. with factory reset required for working front camera)
ROM:
Fix Gapps problems(e.g. Play store and google keyboard crashes) by removing system jar compression tweak
Improved performance a little
0.2.1
ROM:
Fix prebuilt WebView that caused browser crashes
Add some missing blobs to increase performance
0.2.0
ROM:
Integrate home button fix
Upstream fixes(most notably stagefright vulnerability fix)
Use prebuilt WebView
System jars 0 compression(store only), but causes problems
Add Open Camera as system app
0.1
ROM:
Finally boots
Fix front camera
Device:
Use Silesh.Nair's device tree to fix problems and make ROM boot
Custom kernel:
V1.2.4:
Updated intelliactive and intellidemand to faux's latest sources, no longer using some outdated files that I got because of laziness So intelliactive is finally working properly(no reboot), and also better performance/battery etc
Added intelli hotplug driver, do check it out!
Updated simple and simpleondemand gpu governors, but they still don't work So do AVOID them!
V1:
Add intelliactive and smartmax governors
Add SIO and ZEN I/O schedulers
Experimental fix for back camera
Github Repository Branch Explanations:
Kernel source repo
cm-12.0: stock cm12 kernel without extra governors and I/O schedulers
cm-12.0-custom: CM12 custom kernel with extra governors and I/O schedulers
stock: Original kernel source from Xiaomi with only fixes for compilation errors
cm-12.0-wip: latest fixes/additions for cm12 that may not work/compile successfully
Upcoming(when it appears on the kernel source repo, cm12.1 is coming ):
cm-12.1: CM12.1 custom kernel with extra governors and I/O schedulers
cm-12.1-custom: stock cm12.1 kernel without extra governors and I/O schedulers
wip-cm12.1: latest fixes/additions for cm12.1 that may not work/compile successfully
Hi, I tried your rom just now on my Redmi Note 4G but it doesn't boot at all.
I wouldn't mind being a tester! I'm installing now and I'll see how it works.
fix
what about camera. fixed or not yet
It's stuck on the MI boot screen.
Finaly
thanks haoyangw for this thread. I would to participate but I just a noob and don't have skill about devs . I just follow and subscribe this thread, hope you can fix any problem about this devices. :good:
i can also help testing,i have min knowledge about what a rom is and logcat.
robreyes07 said:
Hi, I tried your rom just now on my Redmi Note 4G but it doesn't boot at all.
Click to expand...
Click to collapse
Hi, can you send me a logcat please? Or install LiveBoot by ChainFire through recovery and post all the errors you see printed. Thanks a lot! Sorry if the ROM doesn't boot
Good to see someone is working on CM12 for our phone. I tried CM12 syhost version and it's awesome but camera doesn't work and I need it. If you manage to get camera to work that would be awesome.
Thanks for your work. You may want to check the source code for the official cm12 version of the htc desire 816. It has the same gpu/cpu combination so there must be some similarities.
What is the point of this thread when the rom doesn't even boot
i think,
shyampareek said:
What is the point of this thread when the rom doesn't even boot
Click to expand...
Click to collapse
I didn't know but i hv subscribe
shyampareek said:
What is the point of this thread when the rom doesn't even boot
Click to expand...
Click to collapse
The point is to encourage someone to work on device. Right now it gathers little to no interest at all.
shyampareek said:
What is the point of this thread when the ROM doesn't even boot
Click to expand...
Click to collapse
Point is to give support to developer, or this thread will die. I think u shouldn't be on this forum, so ungrateful
haoyangw said:
Hi, can you send me a logcat please? Or install LiveBoot by ChainFire through recovery and post all the errors you see printed. Thanks a lot! Sorry if the ROM doesn't boot
Click to expand...
Click to collapse
Sure, maybe this weekend kind of busy this workdays.
robreyes07 said:
Hi, I tried your rom just now on my Redmi Note 4G but it doesn't boot at all.
Click to expand...
Click to collapse
Nemado said:
Thanks for your work. You may want to check the source code for the official cm12 version of the htc desire 816. It has the same gpu/cpu combination so there must be some similarities.
Click to expand...
Click to collapse
Yeah I thought of that, I copied some bits from the desire 816 device tree for Redmi Note 4G. I've tried building recovery with my sources and device tree and the recovery works perfectly, so I think it must be something in the ROM that is the problem. I'll need a logcat for tracking the malfunctioning part.
robreyes07 said:
Sure, maybe this weekend kind of busy this workdays.
Click to expand...
Click to collapse
Thanks a lot! Hope I can get this ROM working soon, then our beloved device will get Lollipop sweetness.
Have you tried to compile kernel that xiaomi relased for our device?

[SOURCES][DEVONLY][SM-G850F] LineageOS 14.1

Hello,
I've started to bring the ROM forward to LineageOS X.x for the G850F. If anybody knows how to port a ROM or knows C/C++ and want to work together, feel free to contact me! Reading and understanding strace output is essential.
SOURCES
I will post my progress in this thread.
I already booted it but it has many bugs : Ril, Camera, Etc...
나의 IM-100S 의 Tapatalk에서 보냄
good job bros keep going
SerenityS said:
I already booted it but it has many bugs : Ril, Camera, Etc...
나의 IM-100S 의 Tapatalk에서 보냄
Click to expand...
Click to collapse
So you already fixed ril.h, kernel build issues, SlteRIL.h, gralloc.h ... ???
modpunk said:
So you already fixed ril.h, kernel build issues, SlteRIL.h, gralloc.h ... ???
Click to expand...
Click to collapse
Check this - https://github.com/SerenityS/android_device_samsung_slte
Im using CM13 kernel source with SELinux permissive , CM13 vendors.
It has little bit dirty commit status & sources because i try many things to fix errors.
SerenityS said:
Check this - https://github.com/SerenityS/android_device_samsung_slte
Im using CM13 kernel source with SELinux permissive , CM13 vendors.
It has little bit dirty commit status & sources because i try many things to fix errors.
Click to expand...
Click to collapse
I've started too, the main repo is now here:
https://git.cryptomilk.org/projects/android/android_device_samsung_sltexx.git/
The kernel already has all the fixes and compiles.
I would be great if you could start again based on my android_device_samsung_sltexx.git branch and we work together to get things done. There is #cyanogenmod-exynos5 on irc.freenode.net for developers.
A lot of stuff will not work, because the features have not been ported to cm-14.1 yet. For example the Samsung camera code is not in framworks_av, color support is missing etc.
So the first steps are just to get it compiling.
Next:
Update ril.h (this is a manual task which needs to be done carefully)
Update sepolicy
modpunk said:
A lot of stuff will not work, because the features have not been ported to cm-14.1 yet. For example the Samsung camera code is not in framworks_av, color support is missing etc.
So the first steps are just to get it compiling.
Next:
Update ril.h (this is a manual task which needs to be done carefully)
Update sepolicy
Click to expand...
Click to collapse
https://github.com/SerenityS/android_device_samsung_slte
In branch cm-14.1, I updated ril.h & some other fixs, so we need to verify it.
+ source are based on your cm-14.1
SerenityS said:
https://github.com/SerenityS/android_device_samsung_slte
In branch cm-14.1, I updated ril.h & some other fixs, so we need to verify it.
+ source are based on your cm-14.1
Click to expand...
Click to collapse
Yes, I've looked into your changes already but a lot of some are not really correct.
SLTE doesn't need a modemloader, this is only required for treltexx and gts2 devices. We also do not have to set the hwrevison for cbd.
I like your ril.h changes, they are small and easy to review! Great work!
I review and cherry-pick them tomorrow. I don't have time today.
Thanks for your help!
That will be great!
modpunk said:
Yes, I've looked into your changes already but a lot of some are not really correct.
SLTE doesn't need a modemloader, this is only required for treltexx and gts2 devices. We also do not have to set the hwrevison for cbd.
I like your ril.h changes, they are small and easy to review! Great work!
I review and cherry-pick them tomorrow. I don't have time today.
Thanks for your help!
Click to expand...
Click to collapse
Okay I revert commits what we doesnt need.
I've just tried to test about seclabels and domain_deprecated just now, but I think it doesn't need now.
I don't know why it work soon without that patches, maybe there is something about the work at Cyanogen Team.
Now I'm in clean build, I'll let you know that we need patches surely when the build is done.
+ Please check my hardware_5430 repo and vendor repo.
Mobicore works without any error (according to logs).
@SerenityS can you tell me what works and what doesn't so far:
RIL (radio)
phone calls
Wifi
Camera
Audio
...
modpunk said:
@SerenityS can you tell me what works and what doesn't so far:
RIL (radio)
phone calls
Wifi
Camera
Audio
...
Click to expand...
Click to collapse
No problem.
I will rebuild with your source and notice which function working or not working.
modpunk said:
@SerenityS can you tell me what works and what doesn't so far:
RIL (radio)
phone calls
Wifi
Camera
Audio
...
Click to expand...
Click to collapse
Work
WIFI
Bluetooth
Audio
NFC
etc,,
Not work
RIL (slte.java?)
Camera (SHIM not working properly now + maybe more framework's problem)
GPS (Need hexedit : https://github.com/TheMuppets/propr...mmit/976064c4c69acbb91c8355b09c0c7645ba6cd76d)
In cm-14.1_dev branch
Fix more sepolicy denied (Fix for CBD - now can working cpboot service normally)
Fix settings FC
Update README
Fix module name for stlport (I don't know why you using stlport instead of libstlport)
logcat : https://gist.github.com/SerenityS/d437342e6516461b402cde28aead6b1f
SerenityS said:
Work
WIFI
Bluetooth
Audio
NFC
etc,,
Not work
RIL (slte.java?)
Camera (SHIM not working properly now + maybe more framework's problem)
GPS (Need hexedit : https://github.com/TheMuppets/propr...mmit/976064c4c69acbb91c8355b09c0c7645ba6cd76d)
In cm-14.1_dev branch
Fix more sepolicy denied (Fix for CBD - now can working cpboot service normally)
Fix settings FC
Update README
Fix module name for stlport (I don't know why you using stlport instead of libstlport)
logcat : https://gist.github.com/SerenityS/d437342e6516461b402cde28aead6b1f
Click to expand...
Click to collapse
I will try to look into RIL tonight.
The Samsung Camera support in frameworks/av is missing.
Can you give more details on the GPS hexedit ...
modpunk said:
I will try to look into RIL tonight.
The Samsung Camera support in frameworks/av is missing.
Can you give more details on the GPS hexedit ...
Click to expand...
Click to collapse
Check commit message in themuppets'.
Now camera is working
+ If sepolicy permissive, video recording and shim working too.
So we need to fix sepolicy..
나의 IM-100S 의 Tapatalk에서 보냄
Is it usable now ? And where can i download the file if yes ?
What works:
RADIO
Camera taking normal picture
Audio
Wifi
What doesn't work:
GPS
Video decoding
Haven't tested more yet ... time to go to bed ...
@SerenityS Do you have gpsd working. Did you use a newer gpsd binary?

[Kernel][harpia] SomeFeaK 2 for Moto G4 Play

Because you all loved SomeFeaK 1 (no1 cur if you didn't), here it comes SomeFeaK 2 kernel for device codename "harpia".
The kernel should work in any Android Oreo (8.0) custom ROM.. Tested and working in XT1601 (LATAM).
Disclamier:
Code:
[COLOR="red"]* 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.
*[/COLOR]
Features:
Added by me:
Upstreamed to Linux v3.10.108!
Governors: impulse and elementalX, yankactive, zzmoove, darkness and bioshock.
Double tap to wake (DT2W).
Enabled advanced TCP congestion managers: veno, westwood, vegas, illinois, and more.
Automatic thermal throttling and CPU cooling driver added and enabled.
Enabled CPU current throttling driver
Fixed temperature handling.
Dev info:
In order to make use of the new hidden LED's available behavior, it's needed that some Java developer (not me, I don't know a thing about Java) to develop an application. Here I'll give you a sort of "API" that you should use to wake up the required triggers for "if there's a notification or not".
To turn on the LED set trigger to default-on:
Code:
su -c "echo default-on > /sys/devices/soc.0/leds-atc-e3be1600/leds/charging/trigger"
To turn off the LED set trigger to none:
Code:
su -c "echo none > /sys/devices/soc.0/leds-atc-e3be1600/leds/charging/trigger"
I've also added the required modules for the LED to be able to process a hold on during "x" milliseconds and keep off during "x" milliseconds. To set it do it like as follows.
Switch trigger to timer:
Code:
su -c "echo timer > /sys/devices/soc.0/leds-atc-e3be1600/leds/charging/trigger"
Now, set time on during 0,5 seconds (500 milliseconds):
Code:
su -c "echo 500 > /sys/devices/soc.0/leds-atc-e3be1600/leds/charging/delay_on"
Now, set time off during 1 second (1000 milliseconds):
Code:
su -c "echo 1000 > /sys/devices/soc.0/leds-atc-e3be1600/leds/charging/delay_off"
For now, you must have a charger connected. It seems to be a hardware issue but I'll try to investigate it anyways.
Click to expand...
Click to collapse
Downloads:
Click here or go to Downloads tab at the top of the thread, if something goes wrong, just go for AFH here.
Bugs:
No known issues.
Bugs marked with a "*" will be fixed in the next release.
Testing: (by users and me)
UltraAOSP: no bugs found.
XDA:DevDB Information
SomeFeaK 2 for Moto G4 Play, Kernel for the Moto G4 Play
Contributors
facuarmo, ishubhamsingh, infinite4ever, squid2
Source Code: https://github.com/FacuM/android_kernel_motorola_msm8916-3
Kernel Special Features: everything from r20 Squid2's build, advanced LED control, DT2W, impulse and elementalX governors and much more!
Version Information
Status: Stable
Created 2017-12-11
Last Updated 2018-01-10
Reserved
Changelog (v1.65):
Kernel changes: (as of latest private testing build)
First public release!
Update to Linux v3.10.108. (thanks to @nathanchance for his detailed guide)
Other changes:
Reduced zip size.
Fix flashing on new TWRP versions, still working on old ones.
Fix the Aroma colorspace bug.
Download:
Main link: https://forum.xda-developers.com/devdb/project/dl/?id=27651
Alternative link: https://www.androidfilehost.com/?fid=745849072291694065
MD5: e5c92e7b066d35f8336846b3878647ef
Bugs:
No known issues.
Thank you for work and dedication. I was a fan of your kernel from the first release. So this kernel now supports Oreo, but is there any good Oreo Rom for harpia yet? I only know of crdroid.
can I install normal on top of version 1.60? I'm using that
Problem WiFi!! Not active and no connect
misutogan123 said:
Thank you for work and dedication. I was a fan of your kernel from the first release. So this kernel now supports Oreo, but is there any good Oreo Rom for harpia yet? I only know of crdroid.
Click to expand...
Click to collapse
If I remember well, UltraAOSP and AEX were running fine. Only bugs were sometimes crashing UI and camcorder not working.
albertwesker17 said:
can I install normal on top of version 1.60? I'm using that
Problem WiFi!! Not active and no connect
Click to expand...
Click to collapse
Sure, you can flash it on top of old versions.
Is this only for Oreo ROMs?
Install version 1.65 in the new publication, not the one in the download section, and I get a WiFi error, it does not enable and remains searching without being on
NoobNeutralizer said:
Is this only for Oreo ROMs?
Click to expand...
Click to collapse
Yes!
albertwesker17 said:
Install version 1.65 in the new publication, not the one in the download section, and I get a WiFi error, it does not enable and remains searching without being on
Click to expand...
Click to collapse
Thanks for reporting, in which ROM?
facuarmo said:
Yes!
Thanks for reporting, in which ROM?
Click to expand...
Click to collapse
RR 5.8.5
No problem I will be using the version 1.60 and it works perfect only that I could not activate the option to turn on the screen with double tap
Wifi NOT working
I get a WiFi error, it does not enable and remains searching without being on
Latest Lineage 14.1
Working good on Viper 3.1 on Nougat 7.1.2, Thanks @facuarmo (I hited the thanks button already)
Thanks for giving feedback, anyways, take in mind that this kerrnel is no way intended for Android versions earlier than Oreo, so no bug reports will be taken in mind from these versions.
facuarmo said:
Thanks for giving feedback, anyways, take in mind that this kerrnel is no way intended for Android versions earlier than Oreo, so no bug reports will be taken in mind from these versions.
Click to expand...
Click to collapse
Then to wait for oreo to be stable to be able to prove it :bueno:
led notification
Where do I have to edit the lines to activate the notifications led?
facuarmo said:
Thanks for giving feedback, anyways, take in mind that this kerrnel is no way intended for Android versions earlier than Oreo, so no bug reports will be taken in mind from these versions.
Click to expand...
Click to collapse
Back to the latest v1, but SFkernel 2 is awesome, did't found any bugs in oreo so far.
An update filled with tons of performance and stability improvements was scheduled for today, but I'll delay it 'till tomorrow or maybe even more later (xmas gift? ). Idk, but I hope I can fix my local clone corruption ASAP.
Merry Christmas to everyone who celebrates it!
facuarmo said:
An update filled with tons of performance and stability improvements was scheduled for today, but I'll delay it 'till tomorrow or maybe even more later (xmas gift? ). Idk, but I hope I can fix my local clone corruption ASAP.
Merry Christmas to everyone who celebrates it!
Click to expand...
Click to collapse
Merry Xmas... And yeah.waiting for the xmas gift ..:silly:
Changelog (v5.00):
Kernel changes:
Finally corrected sdcardfs! Thanks to @ishubhamsingh .
Now working with 8.1.x!
Updated binder.
General performance improvements.
Other changes:
None.
Download:
Main link: https://forum.xda-developers.com/devdb/project/dl/?id=28025
Alternative link: https://www.androidfilehost.com/?fid=817906626617957396
MD5: ca73fb401fb68120ae7228f3faef2bbc
Bugs:
No known issues.
Great !!

[REFERENCE] [OOS/CUSTOM] OnePlus 5T kernel source with linux-stable (4.4.162)

Introduction
Hello everyone, this is a thread to introduce both users and kernel developers to the concept of linux-stable as well as give developers some tips and a tree to either merge into their own, use as a base, or just as a reference. Feel free to ask questions and enjoy!
What is it?
linux-stable is, as the name implies, the stable branch of the Linux kernel, the base of Android. The phone could not run without the Linux kernel (at least not without reworking a lot of stuff). The Android kernels are based on the longterm stable trees:
Longterm
There are usually several "longterm maintenance" kernel releases provided for the purposes of backporting bugfixes for older kernel trees. Only important bugfixes are applied to such kernels and they don't usually see very frequent releases, especially for older trees.
Click to expand...
Click to collapse
Source: https://www.kernel.org/category/releases.html
All Linux development happens on the master branch, which is governed by Linus Torvalds. When issues are discovered there, the fixes are applied then backported to these various stable trees for consumption. It is not uncommon for a fix to need to go back a few years.
There is a LOT more information available in the notes repo in the android-linux-stable organization if you care to learn more in-depth: https://github.com/android-linux-stable/notes
What does this mean for me?
If you are a developer, this means you should be merging these changes into your own tree. These are vetted, stable fixes to real world problems and they are being handed out for free. It does not take long to get up to date (as you can just merge this tree directly into your own or do it yourself using the tree as a reference) and once you are up to date, there is usually a release once every two weeks, give or take. I provide a rebuttal to a lot of various complaints here. If you still feel like there is a good reason not to do this, please let me know, I'll be happy to try and debate on it!
If you are a user, it means that you should be looking for and using kernels that have these fixes, as it shows the developers care for your security and stability. The current version for this device is 4.4.78 on OOS and 4.4.100 on Lineage while the current version upstream is 4.4.162 so all you need to do is go into Settings > About phone and look at the kernel version to know if you are up to date.
How do I use?
If you are a developer, the reference tree is located in the android-linux-stable organization: https://github.com/android-linux-stable/op5
There are three branches, one for OxygenOS 8.0 stable, one for OyxgenOS 8.1 beta, and one for Lineage 15.1.
This can either be merged into your existing kernel tree if you have one or be used as a fresh base. You do not need my permission to use it nor do you need to give me credit (although it would be appreciated).
If you are a user, use a kernel that has the changes added in!
Getting notified about updates
There are a few ways to get notified of linux-stable updates:
The linux-kernel-announce mailing list: http://vger.kernel.org/vger-lists.html#linux-kernel-announce
The android-linux-stable Telegram channel: https://t.me/alsupdates
Subscribe to this thread
Follow me on Google+ or Twitter
Getting help
If you have any issues with getting these changes into your tree or want to ask a question, there are a few different ways to do it:
Post in this thread
Join the linux-stable support chat on Telegram: https://t.me/joinchat/C1UAJ1EMSX31PCFdwLnOSg
File an issue either in the android-linux-stable notes repo or the android-linux-stable repo for this device
When requesting help, please give some solid details as to what you are struggling with, as I am happy to provide assistant and clarity but not to do something for you (unless I screwed up).
The OP has been updated, including some more information for users as well as some more ways of getting help and notified of updates! Enjoy
Very Nice.!!! :fingers-crossed:
nathanchance said:
The OP has been updated, including some more information for users as well as some more ways of getting help and notified of updates! Enjoy
Click to expand...
Click to collapse
Thanks for everything Sir.
You really are techno-Jesus, here to teach the ways of kernel perfection. I love your work, dedication, and care for your kernel users. Flash4lyfe.
Yes, please flame me for being a fanboy. You can never show enough appreciation for our beloved xda developers (especially the ones that don't treat users like ****).
Many thanks for your work and initiative @nathanchance :good: appreciated :highfive:
Currently giving a try to make a kernel version based from linux .116 of your op5 branch and looks like I have the following error :
Code:
fs/f2fs/f2fs.h:136:20: error: static declaration of 'inode_nohighmem' follows non-static declaration
Any idea ? I was thinking of a "KBUILD_CFLAGS" addition into Makefile (or something like that), but I'm probably wrong I guess.
FYI I'm using stock 4.9 android google toolchain
AndroidGX said:
Many thanks for your work and initiative @nathanchance :good: appreciated :highfive:
Currently giving a try to make a kernel version based from linux .116 of your op5 branch and looks like I have the following error :
Code:
fs/f2fs/f2fs.h:136:20: error: static declaration of 'inode_nohighmem' follows non-static declaration
Any idea ? I was thinking of a "KBUILD_CFLAGS" addition into Makefile (or something like that), but I'm probably wrong I guess.
FYI I'm using stock 4.9 android google toolchain
Click to expand...
Click to collapse
Wow I am so sorry about that, I must not have built 4.4.116 I removed all of the upstream f2fs code in my own kernel tree so I didn't encounter this error. I have pushed the fix that popped up in kernel/common, should be able to pull and build successfully now :good: :highfive:
nathanchance said:
Wow I am so sorry about that, I must not have built 4.4.116 I removed all of the upstream f2fs code in my own kernel tree so I didn't encounter this error. I have pushed the fix that popped up in kernel/common, should be able to pull and build successfully now :good: :highfive:
Click to expand...
Click to collapse
No worries
Thanks, it works like a charm now (currently trying my kernel on .116), again good job :highfive:
Cheers'
4.4.117 has been merged in.
4.4.118 has been merged in (conflict notes).
4.4.119 and OOS 5.0.4 have been merged in.
4.4.120 has been merged in (conflict notes).
thanks for making this, trying to build lineage and I keep getting the following error:
Code:
drivers/bluetooth/btfm_slim.c:26:23: fatal error: btfm_slim.h: No such file or directory
Any ideas?
---------- Post added at 10:47 PM ---------- Previous post was at 10:20 PM ----------
lol, found one of your comments on another post that helped
Use an out folder.
mkdir out
make O=out mata_defconfig
make O=out -j$(nproc --all)
Click to expand...
Click to collapse
new problem, the kernel compiles into an Image.gz, how would I go about getting a zImage for use in AnyKernel
aeppacher said:
thanks for making this, trying to build lineage and I keep getting the following error:
Any ideas?
---------- Post added at 10:47 PM ---------- Previous post was at 10:20 PM ----------
lol, found one of your comments on another post that helped
new problem, the kernel compiles into an Image.gz, how would I go about getting a zImage for use in AnyKernel
Click to expand...
Click to collapse
That is the zImage (you'll actually want to use Image.gz-dtb), you can just add it to the AnyKernel2 zip as is, the backend handles that name.
Sent from my Google Pixel 2 XL using XDA Labs
nathanchance said:
That is the zImage (you'll actually want to use Image.gz-dtb), you can just add it to the AnyKernel2 zip as is, the backend handles that name.
Sent from my Google Pixel 2 XL using XDA Labs
Click to expand...
Click to collapse
It booted perfectly, thanks so much! I would use the thanks button but it doesn't seem to be working :/
4.4.121 has been merged in.
I will have a new tree based on the 8.1 sources out tonight.
Sent from my Google Pixel 2 XL using XDA Labs
I have added a new branch for the 8.1 beta source; I will continue to update both 8.0 and 8.1 until 8.1 goes stable.
https://github.com/android-linux-stable/op5/commits/oneplus/QC8998_O_8.1
4.4.122 has been merged in.
4.4.123 has been merged in.

[ROM][10.0][UNOFFICIAL] LineageOS 17.1

{
"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.
*
* 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.
*
*/
Introduction
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.
Base source code is available in the LineageOS Github repo. And if you would like to contribute to the project, please visit our Gerrit Code Review.
What's working
It boots!
Display, touch
Audio
USB
Wi-Fi
Bluetooth
RIL (IMS / VoLTE untested)
Camera (buggy)
NFC
Fingerprint scanner - Oreo modem firmware required
GPS
OTG
FM Radio
Treble - GSIs don't boot
Bugs
Camera (might be buggy; recording breaks after some time but should work right after a reboot)
SELinux permissive
GSIs don't boot
Installation instructions
Make sure you have: Oreo modem firmware and a 64-bit TWRP with treble and system-as-root support installed. Official TWRP by JarlPenguin recommended.
Download the ROM to the device's storage
Wipe: system, data, dalvik-cache, cache, and vendor in TWRP
Install the zip in TWRP
Install GApps if you fancy, OpenGapps recommended
If installing Magisk, reboot to recovery again first - otherwise it will fail at (un)mounting /system. This is a bug either in the Magisk installer script or TWRP.
Changelog
Newest build - 2020-08-24:
Code:
* ROM sources updated
* Updated camera HAL from deen Q
** fixes HAL3 one photo bug
* Reverted rear camera libraries
** fixes green tint when using the flash
** fixes image being too dark
* Reverted QMI blobs
** should fix GPS
* Reverted netmgr
** should make mobile data work with the reverted QMI blobs
Older builds:
Code:
2020-08-16:
* Removed compass HAL
* Corrected a file path for NFC removal
* Compass permissions are now removed from XT1792 and XT1795 - might fix ro.hw.ecompass being incorrectly set
* Updated media configs from aljeter Pie
* Vendor blob updates:
** libril*, libqmi*, libmdm*, netmgrd: from deen Pie - should fix mobile data
** libmot_gpu_mapper.so: from aljeter Pie
** libchromatix_s5k3p3* and libmmcamera_s5k3p3.so: from deen Pie - fixes all kinds of camera glitches in low light conditions
** some remaining camera blobs from our stock Oreo
2020-08-14:
* Vendor blobs updated:
** Reverted netmgrd and libdiag to deen Pie
** mm-qcamera-daemon from montana stock Oreo
2020-08-13:
* Updated netmgrd blobs
* Updated thermal-engine blobs
2020-08-12:
* Initial release
Downloads
Latest build:
lineage-17.1-20200824-UNOFFICIAL-montana.zip [MediaFire]
Old builds:
lineage-17.1-20200816-UNOFFICIAL-montana.zip
lineage-17.1-20200814-UNOFFICIAL-montana.zip
lineage-17.1-20200813-UNOFFICIAL-montana.zip
lineage-17.1-20200812-UNOFFICIAL-montana.zip
Sources
(branch lineage-17.1 in all the repos)
Device tree
Kernel source
Vendor blobs
Credits
Everyone who contributed to LineageOS 17.1 for the Moto G5 - the G5S device and vendor repositories are based on sources from that project.
Kernel source is based on the moto-msm8937 repository.
Code:
* The LineageOS team
* JarlPenguin
* wiktorek140
* KalilDev
Contributors to LineageOS 17.1 for the Moto G5:
* CodeZero
* m_vaisakh
* wzedlare
* vache
* kubersharma
* TeamMex
* nonesovile96
* FelipeRizzon
* ADHILR
XDA:DevDB Information
LineageOS 17.1, ROM for the Moto G5S
Contributors
AsD Monio, The LineageOS team, JarlPenguin, wiktorek140, KalilDev, CodeZero, m_vaisakh, wzedlare, vache, kubersharma, TeamMex, nonesovile96, FelipeRizzon, ADHILR
Source Code: https://github.com/LineageOS
ROM OS Version: Android 10
ROM Kernel: Linux 3.x
ROM Firmware Required: stock Oreo modem firmware
Version Information
Status: Stable
Created 2020-08-12
Last Updated 2020-08-12
THIS IS AWESOME!
Seriously, you're doing gods work in this community. I'll flash it right now!
---------- Post added at 06:30 AM ---------- Previous post was at 05:37 AM ----------
OK, just flashed it and so far it is very fast! For some reason tho, the SIM card IS detected but I have "no service"... Tomorrow I'll try to remove and insert the SIM again to see if the problem solves, but I honestly don't think it will. I flashed this coming from ViperOS 6.6, and the signal was perfectly fine there. Anyways, this is a huge project and thanks again for keeping it up with the ROMs
does not load after installing xt1799-2
Mutcholoko said:
THIS IS AWESOME!
Seriously, you're doing gods work in this community. I'll flash it right now!
---------- Post added at 06:30 AM ---------- Previous post was at 05:37 AM ----------
OK, just flashed it and so far it is very fast! For some reason tho, the SIM card IS detected but I have "no service"... Tomorrow I'll try to remove and insert the SIM again to see if the problem solves, but I honestly don't think it will. I flashed this coming from ViperOS 6.6, and the signal was perfectly fine there. Anyways, this is a huge project and thanks again for keeping it up with the ROMs
Click to expand...
Click to collapse
Thanks As for the RIL, I noticed that on the first boot it says no service for a little while, I get signal shortly after the "finishing update" notification disappears. Aside from that, it works fine on my XT1794, so I can't reproduce the bug. Please flash this zip and send me a radio logcat (adb logcat -b radio). The zip will set a prop on boot (persist.vendor.radio.adb_log_on) to make libril output to the logcat. Also please start the logcat while booting because I need to know what's going on when the RIL is starting.
omonra2004 said:
does not load after installing xt1799-2
Click to expand...
Click to collapse
Sorry, but XT1799-2 is unsupported. It is like an entirely different device (montana_retcn, this ROM if for montana) and would require making a separate device tree, kernel etc. and a separate build just for it.
AsD Monio said:
Thanks As for the RIL, I noticed that on the first boot it says no service for a little while, I get signal shortly after the "finishing update" notification disappears. Aside from that, it works fine on my XT1794, so I can't reproduce the bug. Please flash this zip and send me a radio logcat (adb logcat -b radio). The zip will set a prop on boot (persist.vendor.radio.adb_log_on) to make libril output to the logcat. Also please start the logcat while booting because I need to know what's going on when the RIL is starting.
Sorry, but XT1799-2 is unsupported. It is like an entirely different device (montana_retcn, this ROM if for montana) and would require making a separate device tree, kernel etc. and a separate build just for it.
Click to expand...
Click to collapse
It is a pity that the device that you can still buy a new one is not engaged in anyone. I put the previous build LineageOS some even worked in addition to the front camera and NFC.
Nice work, I am going to test it, from our more known main Dev Jarl, I did find out this isn't treble tho
Maybe you should "Collab" in the future?
AsD Monio said:
Thanks As for the RIL, I noticed that on the first boot it says no service for a little while, I get signal shortly after the "finishing update" notification disappears. Aside from that, it works fine on my XT1794, so I can't reproduce the bug. Please flash this zip and send me a radio logcat (adb logcat -b radio). The zip will set a prop on boot (persist.vendor.radio.adb_log_on) to make libril output to the logcat. Also please start the logcat while booting because I need to know what's going on when the RIL is starting.
Sorry, but XT1799-2 is unsupported. It is like an entirely different device (montana_retcn, this ROM if for montana) and would require making a separate device tree, kernel etc. and a separate build just for it.
Click to expand...
Click to collapse
I'm using montana XT1792 and I can confirm that RIL is working, but I can't have mobile data access.
GivFNZ said:
I'm using montana XT1792 and I can confirm that RIL is working, but I can't have mobile data access.
Click to expand...
Click to collapse
Oh hey giv
Some random said:
Oh hey giv
Click to expand...
Click to collapse
Oh hey Rush
Lmfao
Some random said:
Nice work, I am going to test it, from our more known main Dev Jarl, I did find out this isn't treble tho
Maybe you should "Collab" in the future?
Click to expand...
Click to collapse
It definitely is treble, the ROM contains a vendor partition image (check the attached screenshot). It might not be fully working, we may need to tweak the VNDK or some other things in order to boot GSIs, probably move a bunch of vendor blobs around as well. And I'm pretty sure the new (well, it existed before but we didn't use it in Pie and earlier) /product partition will be an issue, since we don't have one and just put everything it's supposed to contain in /system. I have a (dumb?) idea though - use /cache, AFAIK it's only used for storing OTA packages on stock.
GivFNZ said:
I'm using montana XT1792 and I can confirm that RIL is working, but I can't have mobile data access.
Click to expand...
Click to collapse
I forgot to test that, it is (or was) broken on my device too. I fixed it right now, so I'll try to get a new build uploaded soon.
GivFNZ said:
I'm using montana XT1792 and I can confirm that RIL is working, but I can't have mobile data access.
Click to expand...
Click to collapse
Do you have "no service"?
Also, I just checked and my IMEI is 0, but that was probably my fault. But it also doesn't make sense tho, I was on ViperOS 6.6 which is Android 9 and then flashed this right after. Shouldn't be considered as a downgrade.... I'll try to flash stock and then flash this again.
---------- Post added at 02:16 PM ---------- Previous post was at 02:14 PM ----------
AsD Monio said:
It definitely is treble, the ROM contains a vendor partition image (check the attached screenshot). It might not be fully working, we may need to tweak the VNDK or some other things in order to boot GSIs, probably move a bunch of vendor blobs around as well. And I'm pretty sure the new (well, it existed before but we didn't use it in Pie and earlier) /product partition will be an issue, since we don't have one and just put everything it's supposed to contain in /system. I have a (dumb?) idea though - use /cache, AFAIK it's only used for storing OTA packages on stock.
I forgot to test that, it is (or was) broken on my device too. I fixed it right now, so I'll try to get a new build uploaded soon.
Click to expand...
Click to collapse
I have Montana too and I can't get data access too. Waiting for the build
Mutcholoko said:
Do you have "no service"?
Also, I just checked and my IMEI is 0, but that was probably my fault. But it also doesn't make sense tho, I was on ViperOS 6.6 which is Android 9 and then flashed this right after. Shouldn't be considered as a downgrade.... I'll try to flash stock and then flash this again.
Click to expand...
Click to collapse
The "no service" thing, is "normal" for now, new build later
About full custom ROMs
Make sure, that IF you dirty flash, to flash from Lineage 16
If you want to switch to this, do a [Bold]Clean Install[Bold/]
---------- Post added at 02:18 PM ---------- Previous post was at 02:17 PM ----------
AsD Monio said:
Introduction
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.
Base source code is available in the LineageOS Github repo. And if you would like to contribute to the project, please visit our Gerrit Code Review.
What's working
The ROM has not been tested for very long, bugs may occur.
It boots!
Display, touch
Audio
USB
Wi-Fi
Bluetooth
RIL (IMS / VoLTE untested)
Camera
NFC
Fingerprint scanner - Oreo modem firmware required
GPS
OTG
Treble - GSIs untested
Everything else?
Bugs
SELinux permissive
Installation instructions
Make sure you have: Oreo modem firmware and a 64-bit TWRP with treble and system-as-root support installed. Official TWRP by JarlPenguin recommended.
Download the ROM to the device's storage
Wipe: system, data, dalvik-cache, cache, and vendor in TWRP
Install the zip in TWRP
Install GApps if you fancy, OpenGapps recommended
If installing Magisk, reboot to recovery again first - otherwise it will fail at (un)mounting /system. This is a bug either in the Magisk installer script or TWRP.
Changelog
Downloads
lineage-17.1-20200812-UNOFFICIAL-montana.zip [MediaFire]
Sources
(branch lineage-17.1 in all the repos)
Device tree
Kernel source
Vendor blobs
Credits
Everyone who contributed to LineageOS 17.1 for the Moto G5 - the G5S device and vendor repositories are based on sources from that project.
Kernel source is based on the moto-msm8937 repository.
XDA:DevDB Information
LineageOS 17.1, ROM for the Moto G5S
Contributors
AsD Monio, The LineageOS team, JarlPenguin, wiktorek140, KalilDev, CodeZero, m_vaisakh, wzedlare, vache, kubersharma, TeamMex, nonesovile96, FelipeRizzon, ADHILR
Source Code:https://github.com/LineageOS
ROM OS Version: Android 10
ROM Kernel: Linux 3.x
ROM Firmware Required: stock Oreo modem firmware
Version Information
Status: Stable
Created 2020-08-12
Last Updated 2020-08-12
Click to expand...
Click to collapse
What is the theme/mod you used for that altered dark mode by the way?
---------- Post added at 02:28 PM ---------- Previous post was at 02:18 PM ----------
@Asd Monio
Currently video recording is broken on any tested app. Including the stock camera
---------- Post added at 03:06 PM ---------- Previous post was at 02:28 PM ----------
@AsDMonio
Did you ever have Google Play Problems btw?
(Some apps wouldn't display)
If so, how did you fix it?
New build is uploading now, should be up in an hour or so.
Mutcholoko said:
Do you have "no service"?
Also, I just checked and my IMEI is 0, but that was probably my fault. But it also doesn't make sense tho, I was on ViperOS 6.6 which is Android 9 and then flashed this right after. Shouldn't be considered as a downgrade.... I'll try to flash stock and then flash this again.
---------- Post added at 02:16 PM ---------- Previous post was at 02:14 PM ----------
I have Montana too and I can't get data access too. Waiting for the build
Click to expand...
Click to collapse
If the IMEI does not show up (0 is probably default) then I think the mobile data fix won't help you. What exact device model do you have (XT179x)? I had to try a few different sets of RIL blobs (libril and libqmi) to get it working on mine, so maybe yours needs a different one. Also, you can try to wipe the modemst1 and modemst2 partitions (make a backup just in case). I did that on my device somewhere along the way.
Some random said:
What is the theme/mod you used for that altered dark mode by the way?
Click to expand...
Click to collapse
Swift Dark Substratum theme
Some random said:
Currently video recording is broken on any tested app. Including the stock camera
Click to expand...
Click to collapse
It turns out the updated libqmi (or libril) I used to fix the RIL also broke thermal-engine, which in turn broke recording. I tested the camera when the RIL was still fully broken, so I had no idea. Will be fixed in the new build.
Some random said:
Did you ever have Google Play Problems btw?
(Some apps wouldn't display)
If so, how did you fix it?
Click to expand...
Click to collapse
Nope, no Google Play problems here, and I never used that build. For this ROM, I used CodeZero's cedric device and vendor trees as base and those never had that problem.
AsD Monio said:
If the IMEI does not show up (0 is probably default) then I think the mobile data fix won't help you. What exact device model do you have (XT179x)? I had to try a few different sets of RIL blobs (libril and libqmi) to get it working on mine, so maybe yours needs a different one. Also, you can try to wipe the modemst1 and modemst2 partitions (make a backup just in case). I did that on my device somewhere along the way.
Click to expand...
Click to collapse
I have a XT1792, aka montana. I'll wait for your new build and see if it works. I'm guessing the problem ain't the rom itself, because now I flashed stock via Fastboot and my IMEI is non-existent there too... Anyways, thanks for your kindness
New build is up
lineage-17.1-20200813-UNOFFICIAL-montana.zip
Changelog:
Code:
* Updated netmgrd blobs
* Updated thermal-engine blobs
* ^ fixes camera
Mutcholoko said:
I have a XT1792, aka montana. I'll wait for your new build and see if it works. I'm guessing the problem ain't the rom itself, because now I flashed stock via Fastboot and my IMEI is non-existent there too... Anyways, thanks for your kindness
Click to expand...
Click to collapse
If there's no IMEI even on stock, then I'm like 90% sure there is something wrong either with the modem data in your /persist partition, or the modem cache (modemst1 and modemst2). Check that you have dhob.bin, dhob.bin.bak and shob.bin in /persist/rfs/msm/mpss. If not, then we can't do anything, but you may still be able to run the modem on whichever ROM works with the modem cache you currently have. If you do have those files, check the permissions, especially owner user and group. On my device it looks like this in adb shell:
Code:
montana:/ # ls -l /persist/rfs/msm/mpss/
total 96
drwx------ 2 vendor_rfs vendor_rfs 4096 2017-08-09 05:56 datablock
-rw------- 1 vendor_rfs vendor_rfs 16384 2017-08-09 05:56 dhob.bin
-rw------- 1 vendor_rfs vendor_rfs 16384 2017-08-09 05:56 dhob.bin.bak
drwxrwx--x 2 vendor_rfs vendor_rfs 4096 1970-11-06 01:44 mot_rfs
-rw------- 1 vendor_rfs vendor_rfs 5 2020-08-13 18:31 server_check.txt
-rw------- 1 vendor_rfs vendor_rfs 43695 2017-09-01 09:38 shob.bin
montana:/ # id vendor_rfs
uid=2903(vendor_rfs) gid=2903(vendor_rfs) groups=2903(vendor_rfs), context=u:r:magisk:s0
montana:/ #
^ So if it doesn't say vendor_rfs vendor_rfs for those files you should run: chown 2903:2903 /persist/rfs/msm/mpss/{d,s}hob.bin*
If you have the files and setting permissions doesn't help on stock (Oreo, because Nougat had different user and group IDs), try wiping the modem cache in TWRP (adb shell or terminal):
Code:
# to backup to internal storage:
dd if=/dev/block/bootdevice/by-name/modemst1 of=/data/media/0/modemst1.img
dd if=/dev/block/bootdevice/by-name/modemst2 of=/data/media/0/modemst2.img
# to backup to external microSD:
dd if=/dev/block/bootdevice/by-name/modemst1 of=/external_sd/modemst1.img
dd if=/dev/block/bootdevice/by-name/modemst2 of=/external_sd/modemst2.img
# to wipe:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2
AsD Monio said:
New build is up
lineage-17.1-20200813-UNOFFICIAL-montana.zip
Changelog:
If there's no IMEI even on stock, then I'm like 90% sure there is something wrong either with the modem data in your /persist partition, or the modem cache (modemst1 and modemst2). Check that you have dhob.bin, dhob.bin.bak and shob.bin in /persist/rfs/msm/mpss. If not, then we can't do anything, but you may still be able to run the modem on whichever ROM works with the modem cache you currently have. If you do have those files, check the permissions, especially owner user and group. On my device it looks like this in adb shell:
^ So if it doesn't say vendor_rfs vendor_rfs for those files you should run: chown 2903:2903 /persist/rfs/msm/mpss/{d,s}hob.bin*
If you have the files and setting permissions doesn't help on stock (Oreo, because Nougat had different user and group IDs), try wiping the modem cache in TWRP (adb shell or terminal):
Click to expand...
Click to collapse
deleted
Reason:
Turns out my carrier is an asshole and locked me out for not having filled up using a 5$ card :|
@Some random Actually, you're right, mobile data is broken for me as well again. It must be this thermal-engine messing with the new netmgrd (once again, I tested mobile data before fixing the camera with the broken thermal-engine). I've updated the posts, I'm going to find a version that works and update again soon.
AsD Monio said:
@Some random Actually, you're right, mobile data is broken for me as well again. It must be this thermal-engine messing with the new netmgrd (once again, I tested mobile data before fixing the camera with the broken thermal-engine). I've updated the posts, I'm going to find a version that works and update again soon.
Click to expand...
Click to collapse
Wait, but it works for my friend (Giv)
Tf
Wait do you have XT1794 too? (RetEU, Europe Model)
AsD Monio said:
New build is up
lineage-17.1-20200813-UNOFFICIAL-montana.zip
Changelog:
Code:
* Updated netmgrd blobs
* Updated thermal-engine blobs
* ^ fixes camera
If there's no IMEI even on stock, then I'm like 90% sure there is something wrong either with the modem data in your /persist partition, or the modem cache (modemst1 and modemst2). Check that you have dhob.bin, dhob.bin.bak and shob.bin in /persist/rfs/msm/mpss. If not, then we can't do anything, but you may still be able to run the modem on whichever ROM works with the modem cache you currently have. If you do have those files, check the permissions, especially owner user and group. On my device it looks like this in adb shell:
Code:
montana:/ # ls -l /persist/rfs/msm/mpss/
total 96
drwx------ 2 vendor_rfs vendor_rfs 4096 2017-08-09 05:56 datablock
-rw------- 1 vendor_rfs vendor_rfs 16384 2017-08-09 05:56 dhob.bin
-rw------- 1 vendor_rfs vendor_rfs 16384 2017-08-09 05:56 dhob.bin.bak
drwxrwx--x 2 vendor_rfs vendor_rfs 4096 1970-11-06 01:44 mot_rfs
-rw------- 1 vendor_rfs vendor_rfs 5 2020-08-13 18:31 server_check.txt
-rw------- 1 vendor_rfs vendor_rfs 43695 2017-09-01 09:38 shob.bin
montana:/ # id vendor_rfs
uid=2903(vendor_rfs) gid=2903(vendor_rfs) groups=2903(vendor_rfs), context=u:r:magisk:s0
montana:/ #
^ So if it doesn't say vendor_rfs vendor_rfs for those files you should run: chown 2903:2903 /persist/rfs/msm/mpss/{d,s}hob.bin*
If you have the files and setting permissions doesn't help on stock (Oreo, because Nougat had different user and group IDs), try wiping the modem cache in TWRP (adb shell or terminal):
Code:
# to backup to internal storage:
dd if=/dev/block/bootdevice/by-name/modemst1 of=/data/media/0/modemst1.img
dd if=/dev/block/bootdevice/by-name/modemst2 of=/data/media/0/modemst2.img
# to backup to external microSD:
dd if=/dev/block/bootdevice/by-name/modemst1 of=/external_sd/modemst1.img
dd if=/dev/block/bootdevice/by-name/modemst2 of=/external_sd/modemst2.img
# to wipe:
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst1
dd if=/dev/zero of=/dev/block/bootdevice/by-name/modemst2
Click to expand...
Click to collapse
Camera crashes when I set to video mode. I didn't have problems with RIL anymore.

Categories

Resources