Remove All Ads from XDA

[ROM][7.1.2_r36][27Jan2018 LineageOS-14.1] Custom Roms

1,630 posts
Thanks Meter: 5,309
By daniel_hk, Recognized Contributor on 5th December 2016, 07:08 PM
Post Reply Email Thread
Nougat ROM and beyond?
It's been almost three months that I started the development of K3-Note, challenging and funny. The last few minor issues are also fixed now. Since all the major issues are fixed, it's time to move on to other devices. I might take another look when I find something or when new Android arrive.
As a promise at the beginning, I built another custom ROM -- SlimRom. With the Lineage's setup, it only took me a hour to prepare and patch the platform. After the ROM was out, I polished a few things. I built the CarbonROM too. I also have DU in my hard drive but DU-team had forbidden releasing in xda earlier. My 1T hard drive is almost full and there is no room for another ROM. If anyone interest in taking over any of these, please let me know and I might guide you through. The requirement is simple -- you need to share your work too.

The objective of this project is not releasing a particular ROM. With the solutions to the issues, I hope it would enlighten more people to join our development.
After releasing the kernel, I'm glad there are new kernels come. I was hoping many custom ROM would follow. Sadly, seems Lenovo and Mediatek are not friendly to custom ROM developers. I don't think it's intentional. The changes in the AOSP source by MTK and each manufacturer would likely be the reason. Even if we have the full source, it would probably for LP or MM. Making the proprietary blobs to work for Nougat is not a simple task. I think that's the reason why devices with MTK chips haven't received Nougat updates yet. Most of the manufacturer might be waiting for the update from MTK too.
When I finished the job in hand earlier last month, I decided to try it myself. I already had the Carbon CR-5.1 (Android 7.1.1) source ready so I started with it first. Building it out and made it boot was not too difficult. With a few attempts, my first custom ROM for k3-note was out. Some of the features were not working as expected. RILD not started, no audio and GPS, camera crash, etc... RIL logs are disabled by default so I started fixing the camera which I thought would be easier. That was proved over optimistic soon. My experience told me CM always one step ahead so I downloaded the source when I stated. It's time switching to CM. In a week or two, I finally built a barely presentable ROM. There were questions from a few guys from time to time. All I heard were camera not a problem, audio not a problem, etc... I'm new to K3-note and I just can't imagine how "easy". I don't think I'm that good. I also don't have the patience and experience to try all the blobs. Therefore I upload the test builds for those guys to try. Sadly, up to this moment, no respond yet.
Although there is no complete source from Lenovo, other devices might provide something here and there. Fortunately, only a few pieces are required. The source we can found are for LP and for other devices. Make if work for us would be quite a challenge. I finally managed to fix a few things. I seldom release anything that early but there are just so many requests. I don't think I have enough time to make everything work soon. Seeking for other opinions is never a bad move.
I'm now sharing my experiences again. You are welcome to use and share my works. All I asked is "don't keep it to yourself, share yours too!"
If possible, I'll build a few different ROMs later. However, there won't be any weekly or monthly in schedule. This thread is more or less a stepping stone.
At this stage, report is not essential. You don't have to repeat what already mentioned. Thanks!

Existing issues:
I. Missing symbols
To deal with missing smybols (usually name space changed in platform upgrade), we may use a shim library and assigned it to LD_PRELOAD at init. GCC doesn't care who provide it. As long as it was loaded, others can access it. The up side is, this way would not touch the original source. The down side is it would be loaded/checked whenever a dlopen() is called. Clearly, it would increase overheads and affect the performance. For our K3-Note, there are also some missing symbols in blobs.
I personally don't like LD_PRELOAD libraries. I would usually add a build flag to and add a new file if possible.
**In CM14.1, it already added the build flag BOARD_USES_MTK_HARDWARE in vendor_cm.
Set it to true would define a global flag MTK_HARDWARE.**

The patches are grouped in the device tree. At this moment, there are 4 group of patches:-
1. system_core
1.1 liblog (add the xlog function __xlog_buf_printf() and override the RLOG, see following section)
1.2 libnetutils (required by thermal and RIL). Can use the blob from stock ROM.
2. framework_av
2.1 a file mtkaudio_stubs.cpp was added
2.2 missing CameraParameteres
2.3 add extra profiles to AudioPolicy (2016/12/17)
2.4 fix audio recording in AudioFlinger (2016/12/17)
3. framework_native
3.1 Add a few symbols for backward compatible with MM calls.
4. sepolicy. - not compulsory
Mediatek never takes sepolicy seriously. They use permissive all the time. I planed to use enforcing eventually so I dealt with all the sepolicy from day one.

Tool: To find out what's wrong, the logs are essential. I had made a patch to liblog. A new property "" is added. Set it to 1 will push all RLOGs to main.
1. A missing symbol in mtkrild
With this help, I found a missing symbol in mtkrild. This symbol is in You may either use the file in stock ROM as a blob or rebuilt it.
2. The ccc_util
During debugging, I noticed there were garbage in the ccc_util logs. A source can be found for mt6595. After disassembled the binary blob, I found a few differences. I rewrote some part and added support for the two new properties. The final sources are grouped in the new project android_hardware_lenovo_aio_otfp
3. Default modem selection
There are two modem binaries in stock ROMs -- 5 (LWG) and 6 (LTG). They are in /system/etc/firware. In stock ROMs, the default modem is read from nvram. For some unknown reason (seems protection issue), ccci_mdinit can't get this value from nvram in custom ROMs. It would use the default value in Kernel (was 6). I noticed LWG was shown in About of stock ROM so I changed the kernel default to 5. Other areas might required this to be 6. Check the Modem in About for your area. If it is LTG, you may either swap the names of the two modems or change the kernel default. I wanted to use a build.prop but turn out that ccci_dminit is a blob from Mediatek. There are only binaries available. No way to add anything.
4. Custom RIL Class
This class is to handle MTK specific modem messages. Usually its for emergency dialling and modem info. It is not handled in AOSP. CM14.1 already taken care of it and that's one of the reason I switched to CM for testing.
A Custom class can be found in CM's device tree for mt6735. I think its too much to handle the emergency number list but don't want to waste time rewriting it. With a few modifications, it can work for us in Nougat. Seems there are unused/unhandled messages. **Need to verify it later.**

III. The Camera
After my first ROM was out, the most eye catching in the log would be the stack corruption in
11-24 21:53:55.967   490   490 F DEBUG   :     #08 pc 00017459  /system/lib/ (_ZN12ImgSensorDrv13getResolutionEPP34ACDK_SENSOR_RESOLUTION_INFO_STRUCT+60)
After study the source for mt6735, I found it was called within the blob In the function ImgSensorDrv::getResolution(), an ioctl() call was passed to the kernel. I was thinking it was caused by user space data handling in the kernel. After a series of trials and dumping, I remarked that part of code from the kernel. The crash persisted. That means it was from the blob itself. I tried a shim library to replace the function ImgSensorDrv::getResolution() but the result is the same. That means the callee was responsible.
After some digging, I was pretty sure it was caused by the alignment (address sanitize) of struct addresses. The latest blob from Lenovo dev.1631 (also the latest for mt6752 devices) were built with gcc 4.9 Clang 3.6. Nougat now use Clang 3.8 by default. Those blob already have alignment support in Clang 3.6 might have issues with the new Clang 3.8.
What is address alignment? In short, a 32 bit processor can handle 32 bit at a time. It would be a easier for the register to locate memories in 32 bits (4 bytes) cells (aligned). If the head or tail for a block of memory is not aligned, extra code would required to separately handle those loose ends. The new clang compiler would fill leading bytes with its own algorithm to make the pointer or variable aligned. Why is ImgSensorDrv::getResolution() being "affected"? The argument of it is a pointer to ACDK_SENSOR_RESOLUTION_INFO_STRUCT. Its definition can be found in the kernel. It is a struct of an array of pointers to another struct. The source from Mediatek use direct reference to the address of struct variables all the time. This is inappropriate in sense of address alignment. Early compilers didn't handle alignments and won't have problem with that. Newer compiler would use its own algorithm to align the structs and pointers. I guess Clang 3.6 didn't handle the above complex struct as argument well. Nougat linker and loader are all built with Clang 3.8. Local variables are allocated at load time which might be handled differently. Thus a call to ImgSensorDrv::getResolution() would cause the stack corruption.
** Those interested may read this article for detail. **
1. Work around
Using older blobs built by gcc 4.8 or earlier might work. Jiayu S3's AOSP were using those old blobs. I'm new to K3-note. I don't think I have the patience and experience to test all the existing blobs. That's the main reason I uploaded the last two test ROM. Trying blobs and hoping some combination would work is passive. Stlport is also obsolete for some time now. I rather deal with the problem directly.
2. The solution
Without the source, building the whole blob is impossible. Even if we have the source from other devices, those custom parameters are unique to each image sensor. It's impossible to guess or back engineer...
If we can change the way ImgSensorDrv::getResolution() is being called or didn't touch the argument within the function. It would avoid the crash. Unfortunately, the function need to fill a local struct within the ImgSensorDrv class. That means it is not seen outside ImgSensorDrv. The only way is to replace the whole ImgSensorDrv class. Fortunately, it is self contained. We can write a wrapper to replace the ImgSensorDrv class only. The source from mt6735 or mt6595 are a bit different and obviously can't be used directly. Most of the struct can be cross referenced to the kernel source. There are two local sturct left unknown. One is for the commands sent to the kernel. The other is some info. collected from the kernel.
With the wrapper, the crash was gone but still no preview. I wrote a test HAL to dump the values in stock ROM. Guessing the values against the names was not a decent job. Fortunately, there were only a few differences. After nights of trial and error, I finally pulled everything together. Camera is working now! Video recording is still not working. Seems codec related. Some say it's not a problem "again". Hoping there will be some real solutions and helps soon...
TODO: HDR crashed

While comparing my log to the stock's, I found all daemons are working properly. It must be the problem of the interface. The java interface of GPS was changed in Nougat. Seems there were transitions from GPS struct to GNSS struct. I accidentally noticed a line in the thousands lines of log.
gps_mtk : copy_GpsCallbacks_mtk: line = 4124Bad callback, size: 96, expected: 88 or 80
This showed some proof for my guess. After comparing the hardware/gps.h from MM and Nougat, I think the main problem is the difference in callbacks. There were a few ways in my mind. We can change the JNI and handle MTK differently to adopt the old style. Or, use another wrapper to shield the GPS HAL.
The solution
The best way is naturally to rebuild the GPS HAL. The sources I had were outdated. After another intensive search, I found the source for mt6795 from xiaomi and another source for mt6753 from ulefone. They were almost identical and matched all the symbols in the blob from Vibeui 3.5 1631. Their contents were quite standard GPS HAL but a lot had to patch for Nougat. Mediatek already handled some transitions to GNSS which made things a bit easier. The last piece left was the prebuilt libepos. There was no 64 bit library from xioami but there were a few from other devices. Nougat already have the open source curl in extension so everything seemed ready. In a few attempts, I managed to build the new HAL out. I also include Mediatek's apk YGPS for testing. Another reason is the uniqueness of GPS from MTK. Common GPS utilities like GPS Status doesn't work. Anyway, GPS is working now! Cheers!
update (2017/2/17): I was using a mt6795 source from github. Turn out that it was already modified. There were something missing. I rewrote the HAL from the official mt6797 source. Now it is fully support GPS, GLONASS and BEIDOU. It is also backward compatible with the AOSP callbacks. Most of the GPS apks (eg. GPS status which was not working in stock MM) would be working now.
update (2017/6/5): For some unknown reason, the country code can not be read from nvram. Thus mnld would use default value which disabled the GLONASS access. I made a patch in post #520. It would generate the file /data/misc/gps/mnl.prop. This is the default property file which never been used. Read the comment inside this file for detail. There are other default settings available. Anyone interested may PM me for detail.

V. Audio recording
After checking with a few test apks, I'm pretty sure the issue was the audio recording solely not Mic. related. Actually, I already fixed it for some time but I didn't know. I was mislead by the pause feature in CM's SoundRecorder apk. That pause feature is unique to CM. MTK's (probably some others) HAL didn't handle it at all. Whenever I pressed the pause, it would call the missing function in HAL and hang. I wrote a test apk myself and found that it worked! I then looked into the source of AOSP. That cleared things up immediately. I don't want to modify CM's apk so I replace it with the one from AOSP.
The solution
The definition of the struct audio_stream_in has changed in Nougat. The function get_capture_position() was added. It's just for reporting the time stamp. The audio HAL blob from MTK didn't have this function. When the input streams were loaded, it would crash. I reinstated the untouched BOARD_USES_LEGACY_MTK_AV_BLOB flag and made a patch in AudioFlinger service. I added the specific header "audio.h" in device tree. Check the source on my github for detal.
One less thing on the list now! Cheers!

VI. MTK Codec
Codecs are essential for recording and playback. Although we can use the software codec from CM or Google for playback, video recording normally required the codec from the manufacturer. That's why I spent a lot of time to make them work first. Samsung and Qcom usually put the codecs in kernel drivers but Mediatek didn't. MTK's codec use the gralloc_ext, ui_ext and gui_ext helper libraries to "assist" the allocations and queries. Unfortunately, platform changes arose some issues in these blobs.
The solution
Naturally, to make it fully support Nougat, we have to rebuild it. I found the sources for mt6797. They are small but have some dependencies. Only minor changes would make them Nougat compliant. Both depend on the dpframework and gralloc.mt6752 which are proprietary. I already rebuilt gralloc_ext from source. Proved to be the right move now. I grouped them into the graphics folder in the hardware_lenovo_aio_otfp project. With these newly built libraries, all codecs are working now.
update (2017/3/18): Found the latest codecs for mt6750t. They work for YouTube, Snapchat, etc. Check the attachment in post #272.
TODO: WVM not handled

VII. Video Recording
For my Samsung devices and Tilapia, I can make the cameraservice work on both camera and camcorder. I don't need the HAL1 flag reverting to the mediaserver. After fixing the extra allocation libraries for my K3-note, I could record the video to a mp4 file. Audio was normal but video wasn't. I had studied for a while. I thought it was colour format related but I don't know why yet. There would be too much changes to the original source so I decided to put aside first.
The solution
Although it's not my wish, I compromised. Everything went well when I use the HAL1 flag switching back to mediaserver. It's time to move on to the WifiHAL now. Would return to this part later. Anyway, it's kinda fixed now!
TODO: Reinstate Cameraserver

VIII. WifiHAL for Nougat
WifiHAL has been introduced for a few generations. It provides another way to access the WiFi in the frameworks. MediaTek's WifiHAL was clearly derived from Broadcom's source. LP and MM only used a small portion of the callbacks. Nougat uses a few more and some of them haven't supported in the kernel driver yet. I used a patched Brodcom's WifiHAL in my earlier builds. It could only be loaded to pass the check. Things like hotspot, 5G, hidden ssid, etc. were not handled. I then ported the sources from mt6795 and mt6797 to my early WiFiHAL. It took me a few days to handle most of the Wifi commands and queries. Together with the minor patch in netd, hotspot is working. An immediate issue arose -- WiFi wouldn't auto reconnect. It required to turn on manually. Hidden ssid was still not working. When a network was manually added, Wifi would fail to scan for APs. Clearly it was another major problem I overlooked...
A long road to the solution
I enabled the logs in all the relevant java and c files. Nothing seemed special pop up. I then added my own extra logs. An odd scenario appeared on the channel list. I traced back to the callee in libwifi-service. It was a query message for the available channel lists for 2.4G, 5G and 5G DFS bands. However, the lists to all bands were the same. There were 3 channels all started with 2412 (which is the 1st channel of 2.4G band). The default log in GetChannelListCommand only dump the first entry so I add a for loop to dump all. I got 2412,2413 and 2414! That was definitely impossible. I realized there must be something wrong with this vendor data. Clearly the firmware and proprietary blobs won't be the problem. There were also nothing similar in the nvram. I then traced back to its source -- the kernel driver. Following the defconfig and Makefiles, I found the handler for this message in drivers/misc/mediatek/connectivity/conn_soc/drv_wlan/mt_wifi/wlan/os/linux/gl_cfg80211.c.
Looking at the function mtk_cfg80211_vendor_get_channel_list() made me cry and laugh...
	kalMemZero(channels, sizeof(wifi_channel) * 4);
	/*rStatus = kalIoctl(prGlueInfo,
	   &u4BufLen); */

	/* only for test */
	num_channel = 3;
	channels[0] = 2412;
	channels[1] = 2413;
	channels[2] = 2414;
	NLA_PUT(skb, GSCAN_ATTRIBUTE_CHANNEL_LIST, (sizeof(wifi_channel) * num_channel), channels);
It was clearly not handled! I found similar codes among all mt67xx and mt65xx devices. The latest MTK's 3.18 kernel, however, paid back. The codes seemed promising. Only minor adjustments were required but this time I got nothing... I then dumped all the arguments and results after each function calls. Things were clear instantly. Platform used band 1,2,4 for 2.4G, 5G and 5G DFS respectively but MTK use 0 for 2.4G which was also different from its own enum definition (which is similar to the platform). I believed they didn't test it in 3.18 too! I used the parameter band directly. Then simplified the code to have both 2.4G and 5G sharing the same call. After that the channels were reported correctly to the platform. As a bonus, I found the part handled 5G which was disabled by default. I enabled it in the kernel now. As expected, both 2.4G and 5G channels are reported correctly now. After this fix, WiFi can now auto reconnect. To avoid further land mines, I checked all the WiFi commands in the WifiHAL. Turn out that only a handful was actually handled in the kernel. Most of the useless codes are removed and the rest are properly handled now. It took me over a week! The WifiHAL turn out to be a big chapter!
The next and more annoyed issue was Hidden SSID. I'm pretty sure the WifiHAL was OK so I looked into the vendor lib lib_driver_cmd_mt66xx. Enabled a few MTK flags and started with a very limited code all resulted the same. Finally, the following line in log caught my attention:
 E wpa_supplicant: wlan0: nl80211: Scan trigger failed: ret=-22 (Invalid argument)
A block of similar lines show repeatedly when a network was manually added. I believed wrong arguments were sent to wpa_supplicant. I downloaded the full wpa_supplicant manual and redirected the wpa_supplicants commands to the console. Nothing seemed special but I noticed there was an empty entry being pushed to the argument list. The error only occured when the added SSID appeared. With the empty entry, the arguments were one less. Even if its MTK's problem, wpa_supplicant should take care that. I saw a potential problem and I decided to add a check first. It really really paid back! That's the reason why hidden ssid not working! After two sweaty weeks of work, I would said WiFi is fully working now....
update (2017/6/22): p2p and WiFi-display is working.

VIII. FM radio
update (2017/2/27): After taking another look, I found that the FM radio was already fixed. Probably after the audio recording fix. So everything is more or less working now. Cheers!

- With no doublt the LineageOS community should have most of the credits
- The CarbonROM, OmniROM, SlimROM and many other custom ROM teams who bring us the alternatives.
- Those who release the sources for MTK devices.
- And finally Lenovo who had released a castrated kernel source which motivate us to DIY.


Download: AFH LineageOS, AFH SlimRoms, AFH CarbonROM
(百度网盘)LineageOS , (百度网盘)SlimRoms, (百度网盘)CarbonROM
My version of TWRP-3.1.1


** backup your current /boot, /data and /system partition first **
TWRP 3.0.x is the only recovery tested. There are many TWRP using different device names out there. I already included a few but there would be more. If you got error (6) at flashing, you may change the line in updater-script or use different TWRP.
1. Do a factory reset (wipe /data and /cache)
2. Flash the ROM
3. Flash the Gapps
4. Flash latest SuperSU
Step 1. is essential if you are from other ROMs, otherwise you might get ERROR:7.
Reboot and hoping its not a night mare...
** Note: you don't need to wipe other partitions. Some important device specific data are in nvram and misc. **

Change Log:
2018/1/27 - LineageOS-14.1
- The latest LineageOS-14.1 source, Android-7.1.2_r36 (NJH47F) - Security patch Dec. 5,2017 - Kernel: New Bluetooth driver - Bluetooth HAL build from source - Adjust some Heap and VM settings
2018/1/2 - CarbonRom CR-5.1
- The latest Carbon CR-5.1 source, Android-7.1.2_r36 (NJH47F??) - Kernel: a few minor patches - Fix Hotspot issue in the last build
2017/12/29 - CarbonRom CR-5.1[/COLOR]
- The latest Carbon CR-5.1 source, Android-7.1.2_r36 (NJH47F??) - Cumulated patches from my previous Lineage-15.1 builds - Kernel: a few drivers update - Adjust some Heap and VM settings - Security patch Dec. 5, 2017
2017/12/16 - LineageOS-14.1
- The latest LineageOS-14.1 source, Android-7.1.2_r36 (NJH47F) - Security patch Dec. 5,2017
2017/12/3 - LineageOS-14.1
- The latest LineageOS-14.1 source, Android-7.1.2_r29 (NJH47F) - Update SELinux rules
2017/10/31 - LineageOS-14.1
- The latest LineageOS-14.1 source, Android-7.1.2_r29 (NJH47F) - Fix Sim settings crash - Kernel: binder update
2017/10/15 - CarbonRom CR-5.1
- The latest Carbon CR-5.1 source, Android-7.1.2_r29 (NJH47F) - Kernel: binder update
2017/10/1 - LineageOS-14.1
- The latest LineageOS-14.1 source, Android-7.1.2_r29 (NJH47F) - Fix PicoTTS from Lineage - Security patch Aug. 5,2017
2017/9/9 - CarbonRom CR-5.1
- The latest Carbon CR-5.1 source, Android-7.1.2_r29 (NJH47F) - Security patch Aug. 5,2017
2017/8/20 - LineageOS-14.1
- The latest LineageOS-14.1 source, Android-7.1.2_r29 (NJH47F) - Clean up unused RIL daemon and services - Security patch Aug. 5,2017
2017/8/13 - CarbonRom CR-5.1
- The latest Carbon CR-5.1 source, Android-7.1.2_r29 (NJH47F) - Clean up unused RIL daemon and services - Settings: Enable the Ambient Display switch - Security patch Aug. 5,2017
2017/7/29 - LineageOS-14.1
- The latest LineageOS-14.1 source, Android-7.1.2_r24 (NJH47D) - Kernel: a few minor patches (mainly for O ready) - Settings: Enable the Ambient Display switch - Security patch July 5,2017
2017/7/21 - CarbonRom CR-5.1
- The latest Carbon CR-5.1 source, Android-7.1.2_r24 (NJH47D) - Security patch July 5,2017
2017/7/2 - LineageOS-14.1
- The latest LineageOS-14.1 source, Android-7.1.2_r17 (NJH47B) - With all patches from the last Carbon. - AudioFX is removed. Seems useless now. - PerformanceControl: With Arabic translation from @ziad shawki - PerformanceControl: Improve the battery interface to report the battery voltage from MTK devices - Kernel: fix a bug in Lenovo's code. - Kernel: Further simplify the code in the touchscreen driver.
2017/6/29 - CarbonRom CR-5.1
- The latest Carbon CR-5.1 source, Android-7.1.2_r17 (NJH47B) - Kernel: enable native gesture support - Kernel: new touchscreen interface for gesture - Kernel: enter pocket mode when gesture wakeup enabled - PerformanceControl: upgrade to version 2.1.7 - PerformanceControl: New MediaTek settings with Slide and Gesture O and V handler - PerformanceControl: fix a bug in drawer - PerformanceControl: Filter out unnecessary system apps in Freezer
2017/6/20 - Kernel update
- Touchscreen: driver patch and clean up - enable native gesture support - enable native DT2W support, add double tap Home key to wakeup - Enter low power mode at suspend - pocket mode automatically enabled in native driver
2017/6/16 - LineageOS-14.1
- The latest LineageOS-14.1 source, Android-7.1.2_r17 (NJH47B) - all patches/fixes from CR-5.1 are included - Security patch June 5,2017
2017/6/14 - CarbonRom CR-5.1
- The latest Carbon CR-5.1 source, Android-7.1.2_r17 (NJH47B) - Rewrite fstab - Kernel: patches to a few drivers - Bug fixes in CarbonFibers - Security patch June 5,2017
2017/6/2 - CarbonRom CR-5.1
- The latest Carbon CR-5.1 source, Android-7.1.2_r8 (N2G47O) - Default Carbon Browser - Bug fixes in CarbonFibers - Security patch May 5,2017
2017/5/3 - CarbonRom CR-5.1
- The latest Carbon CR-5.1 source, Android-7.1.2_r8 (N2G47O) - Fixes from latest LOS-14.1 - codec update - Fix longpress and doubletap behaviour of nav buttons
2017/4/30 - LineageOS-14.1
- The latest LineageOS-14.1 source, Android-7.1.2_r2 (N2G47E) - kernel: default at 1.8G now - New HDR approach
2017/4/12 - AOSP-7.1.2_r6
- The Android-7.1.2_r6 (NHG47K) source - All fixes from previous builds - PerformanceControl is included - Equipped with the O/C kernel, default at 1.8G now - Fix the Camera crash in 7.1.2 *** see post #330 for how to install and download link ***
2017/4/8 - LineageOS 14.1
- The latest LineageOS-14.1 source, Android-7.1.1_r25 (NOF27B) - All fixes from previous builds - Workaround for HDR. Don't know if its better but faster than stock algorithm - Equipped with the O/C kernel - PerformanceControl is included - Update codecs - Include App Switch (Recent) in button settings.
2017/3/30 - CarbonRom CR-5.1
- The latest Carbon CR-5.1 source, Android-7.1.1_r25 (NOF27B) - All fixes from previous builds - patches to adapt the new Carbon build scripts. - Fix the flashlight while taking picture - Fix the custom key definition for menu key. - The O/C kernel is equipped
2017/3/19 Kernel update, see post#275 for detail and download link.
- O/C for CPU upto 2GHz (Adjustable with PerformanceControl and other kernel tools) - Voltage table control (Adjustable with PerformanceControl and other kernel tools) *** The default values are already optimized for the PLL and power chip. Don't mess with them if you don't know how. I already set the upper and lower limits. Should there be any damage caused, it would be at your own risk *** - OC for GPU upto 819MHz. - Work for most (hoping all, including stock) Roms with the VibeUI dev. 1631(and s433) blobs.
2017/3/18 Codec update, see post#272 and download link.
- Fix YouTube zooming issue - Fix SnapChat recording.
2017/3/12 - SlimRoms build 0.15
- The latest SlimRom 0.15 source, Android-7.1.1_r26 (NOF27C) - All patches/fixes in my 20170312 LineageOS-14.1 - Add long press AppSwitch (Recent) key for menu
2017/3/12 - LineageOS 14.1
- The latest LineageOS-14.1 source, Android-7.1.1_r25 (NOF27B) - The latest GPS HAL from CarbonROM - FMRadio: Fixed - Media Profiles: update to support common video formats. - Limit background processes to increase available RAM - Camera app: replaced with Snap by Lineage - Lineage is not ROOTED by default now
2017/2/18 - CarbonRom CR-5.1
- The latest Carbon CR-5.1 source, Android-7.1.1_r21 (NOF26W) - Initial beta release - New GPS HAL (fully working and faster) - Add long press AppSwitch (Recent) key for menu - All fixes from LineageOS-14.1
2017/2/14 - SlimRoms build 0.11
- The latest SlimRom 0.11 source, Android-7.1.1_r21 (NOF26W) - Initial alpha test build 0.11 - All fixes from LineageOS-14.1 - Add prebuilt Chromium (from CarbonROM)
2017/2/14 - LineageOS 14.1
- The latest LineageOS-14.1 source, Android-7.1.1_r9 (NMF26V) - Libstagefright: Add fixes to media streaming (Don't know if it work or not) - LiveDisplay: Add support and settings - RIL: Handle a few more MTK specific messages (WIP) - GPS: Add backwards support for MM and earlier - GPS: Fill up the extra fields in GNSS struct - GPS: Add a override property to select GPS mode (GNSS/GPS) (Testing only) - Fixed Power off charging screen - kpoc_charger: keep the stock images (which are in the LOGO partition) - Fixed LED notifications - liblight: Rewrite the lights HAL for better support in Nougats and beyond (WIP) - liblight: Add dual color support (WIP)
2017/1/17 - LineageOS 14.1
- The latest LineageOS-14.1 source, Android-7.1.1_r9 (NMF26V) - RIL: Add a fix in custom RIL class (thx. @Moyster for the tip), don't know if it helps. - hostap: build from source - netd: a minor patch (wlan0 to ap0) for hotspot - WifiHAL: Rewrite a new one (almost from scratch...) - WifiHAL: Handle extra callbacks for Nougat - Kernel: Handle the mtk_cfg80211_vendor_get_channel_list() correctly - Kernel: Enabled 5G by default - wpa_supplicant: Fix a potential bug (which fixed MTK's hidden SSID issue)
2017/1/5 - LineageOS 14.1
- The latest LineageOS-14.1 source, Android-7.1.1_r6 (NMF26Q) - RIL: use the full set of blobs from S433 (newer than dev. 1631) - MTKCodec: Fix the storage issue in MTK Codec - MTKCodec: Include the complete set of MTK codec in dev. 1631 - media_profiles.xml: Include the vorbis decoder - libion: Rebuilt with open source libion - VideoRecording: Fix video recording - SEPolicy: update for codec and media server - kpoc_charger: rebuilt kpoc_charger from source [WIP]
2016/12/17 - CM14.1
- The latest CM-14.1 source, Android-7.1.1_r6 (NMF26Q) - Camera: Fix the flashlight in taking picture - AudioRecording:Fix audio recording - SoundRecorder: Replaced with the one from AOSP - SEPolicy: update for 7.1.1_r6 - media_profiles.xml: Rewrote with the values in stock log - AudioPolicy: Add extra profiles - OMX: Fix the crash of nativeHandle in video recording (WIP) - libhealthd: fix a few things (WIP) - WifiHAL: Rewrote a new one for Nougat (WIP)
2016/12/11 - CM14.1
- The latest CM-14.1 source, Android-7.1.1_r4 (NMF26O) - init.mt6752.rc: A few patches - Rebuilt the GPS HAL from source - Use opensource curl - YGPS: Include MTK's test apk for GPS - SEPolicy: Further patches - Built-in VPN is working now - healthd: Add standard charging routines to (WIP)
2016/12/6 - CM14.1
- The latest DC-MTK kernel - Kernel: Enable UID CPU time - Kernel: Emulate the hardware random sysfs - Kernel: Treat all A/C chargers the same (same charging current and limits) - Kernel: rename led sysfs to AOSP defaults - Kernel: set default modem to 5 - Handle all extra SEPolicy - Fix the audio output - Add the RLOG override and xlog suppress properties - Fix RIL and mobile data - Fix all sensors - Add libhealthd.mt6752 to report battery status - Fix the camera
Known Issues:
 - may be more...


XDA:DevDB Information
Nougat and beyond?, ROM for the Lenovo K3 Note

Source Code:

ROM OS Version: 7.x Nougat
ROM Kernel: Linux 3.10.x
Based On: AOSP, LineageOS, SlimRoms, CarbonROM

Version Information
Status: Stable
Stable Release Date: 2017-06-14
Beta Release Date: 2017-06-03

Created 2016-12-05
Last Updated 2018-01-27
The Following 75 Users Say Thank You to daniel_hk For This Useful Post: [ View ] Gift daniel_hk Ad-Free
5th December 2016, 07:20 PM |#2  
Thanks Meter: 0
Never bear more than one kind of trouble at a time. Some people bear three kinds of trouble - the ones they've had, the ones they have, and the ones they expect to have.

- Everett Hale
I might just know who that person is...
Cheers mate
11th December 2016, 07:48 AM |#3  
Account currently disabled
Thanks Meter: 20
theres a bug when i flash modem of a7000 plus the simcard don't detected but the baseband is written in the build prop
The Following 2 Users Say Thank You to ziad shawki For This Useful Post: [ View ] Gift ziad shawki Ad-Free
11th December 2016, 10:47 AM |#4  
Junior Member
Thanks Meter: 0
thanks for your work
11th December 2016, 02:58 PM |#5  
Senior Member
Flag Beirut
Thanks Meter: 100
Maybe you can ask Jiayu S3 developers to provide you with the source code, as they have nougat 7.1.1 already with everything working. Jiayu S3 is very similar to our device's hardware with MT6752 chipset.
Thanks for your hard work.
12th December 2016, 02:16 PM |#6  
sandeep.sethi's Avatar
Senior Member
Flag Bhubaneswar
Thanks Meter: 324
Donate to Me
Originally Posted by agdroubi

Maybe you can ask Jiayu S3 developers to provide you with the source code, as they have nougat 7.1.1 already with everything working. Jiayu S3 is very similar to our device's hardware with MT6752 chipset.
Thanks for your hard work.

Lenovo Has Different source I have spoke with M.A.D.
The Following 2 Users Say Thank You to sandeep.sethi For This Useful Post: [ View ] Gift sandeep.sethi Ad-Free
12th December 2016, 04:20 PM |#7  
Junior Member
Thanks Meter: 1
Thanks for the effort . I am able to use jio4gvoice in this ROM mic is accessible and Gapps are also working fine, but as described in issue section wifi tethering , video recording is not working I tried so many apps but no success and also battery is draining fast so Best of luck for next release
13th December 2016, 07:57 AM |#8  
Junior Member
Thanks Meter: 0
Is it compatible with k50a40?
Is it compatible with k50a40?
13th December 2016, 12:32 PM |#9  
Thanks Meter: 0
Originally Posted by assaultsethu

Is it compatible with k50a40?

13th December 2016, 04:27 PM |#10  
Junior Member
Thanks Meter: 0
Originally Posted by Flypast


Are you tested in k50a40?
14th December 2016, 09:34 AM |#11  
Junior Member
Thanks Meter: 0
not working
i have lenovo k3 note k50a40, india version, at first have installed miui 8 rom from gooddeath version 6.11.24, and was working fine with rom version 5.0.1 blispop, but i wanted to upgrade so i tried urs but it is not working i have downloaded ur last 11 dec file with 400mb approx and have installed twrp with SuperSU v2.78 SR5, but ur rom is not installing the error says "e3004:THIS PACKAGE IS FOR DEVICE :K50-T5.AIO_M,K3NOTE;THIS DEVICE IS AIO_O.FP"
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes