[ROM][UNOFFICIAL] LineageOS-18.1 [mako]

Search This thread

voron00

Senior Member
Mar 8, 2011
343
1,102
Google Nexus 4
LeEco Le Pro3
HTML:
#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.
*/

IMPORTANT: You need to have a /system partition at least 1272 MB size to flash this ROM.

A few options to repartition the device:
https://xdaforums.com/nexus-4/general/guide-increase-nexus-4s-partition-space-t3800264
https://xdaforums.com/nexus-4/orig-development/repartition-nexus-4-repartition-t3844383

Also quick and easy repartitioning script for flashing on stock partition table only: https://drive.google.com/file/d/1GNbxlqG78WYOeXBxgmfGgMmsf02KMVOX/view?usp=sharing
Use at your own risk.

Any repartitioning is done at your own risk.

Works:

- WiFi
- Bluetooth
- RIL
- Camera
- GPS
- Sensors
- Audio
- NFC

Doesn't work:

- L1 Widevine DRM
- Slimport

Flashing Instruction:

1. Backup all your data (Important)
2. Wipe system, data and cache.
3. Flash the ROM and Gapps.
4. Reboot.

Downloads:

ROM: https://drive.google.com/open?id=1e-mO4qaEP1y0wrBbbPwsISdJuW_TeLQo
Gapps: https://opengapps.org/

Sources:

Device: https://github.com/voron00/android_device_lge_mako
Kernel: https://github.com/voron00/android_kernel_lge_mako
Vendor: https://github.com/voron00/proprietary_vendor_lge

Credits:
- LineageOS team.
- @Ziyan for his great work on camera and other things.
- @Clamor repartitioning scripts.
- If i forgot someone, please tell me.

Contributors
voron00

Source Code: https://github.com/LineageOS
 
Last edited:

moriel5

Senior Member
Jul 20, 2013
1,842
630
Google Nexus 4
Nexus 7
This looks great so far, enough that I am extremely tempted to switch over from CRDroid (but alas, I do not have the time).

Do you think that you may be able to take care of the GPS issue (although GPS works fine on CRDroid (perhaps you may want to take a look at whatever changes they had done in the matter from LOS).

By the way, do you have any idea why GLONASS does not work properly for me?
My phone detects GLONASS satellites, however it fails to connect to them.
This may help you out with your build of LOS15.1.
 
Last edited:

mohsalfa

New member
Jul 8, 2014
2
0
Thanks Man! You bring back the legend (Nexus 4) phone new life

Btw can you give more detail to install Gapps on this ROM? because I've still got a problem Error #70 Insufficient Space Available in System Partition even with Pico and Gapps-Config. Thanks, Man! :)
 

n0b0dy666

Senior Member
Apr 5, 2012
337
190
Awesome work, thank you! I've successfully flashed the ROM and Pico GApps (excluding the Google Text-to-Speech as I never did, never will use it anyway) using the following config

Code:
Include

CalSync
DialerFramework
PackageInstallerGoogle

Copy this in your txt editor and save it as gapps-config.txt to the same folder as GApps zip file.
 

Wiltron

Senior Member
Latest TWRP, Bootloader & Radio - Full wipe, from within TWRP and/or by manually erasing/formatting partitions using Fastboot.

Using latest OpenGapps Aroma installer, and selecting nothing from any of the lists in the installer, so that it only installs the core files required to add a Google account to the device.

Google Services Framework crash-loop - never goes away, "keeps stopping".

Tried manually installing the latest APK from APK Mirror, and it does get farther by asking me if I want to restore from a cloud, copy from iPhone or setup as new, but all three options result in the same crash.

Tried rooting with Magisk 16, and without rooting, obviously a clean flash between, and result remains unchanged.
 

voron00

Senior Member
Mar 8, 2011
343
1,102
Google Nexus 4
LeEco Le Pro3
Latest TWRP, Bootloader & Radio - Full wipe, from within TWRP and/or by manually erasing/formatting partitions using Fastboot.

Using latest OpenGapps Aroma installer, and selecting nothing from any of the lists in the installer, so that it only installs the core files required to add a Google account to the device.

Google Services Framework crash-loop - never goes away, "keeps stopping".

Tried manually installing the latest APK from APK Mirror, and it does get farther by asking me if I want to restore from a cloud, copy from iPhone or setup as new, but all three options result in the same crash.

Tried rooting with Magisk 16, and without rooting, obviously a clean flash between, and result remains unchanged.

No such issue here with opengapps nano + gapps-config posted above, maybe you should try that way and see if it works.
 

voron00

Senior Member
Mar 8, 2011
343
1,102
Google Nexus 4
LeEco Le Pro3
Update:
HTML:
2018-03-07:
 - March security patch.
 - Ancient mako kernel that came way back from cyanogenmod days has been rebased off the AOSP upstream (3.4.113).
 - Enabled F2FS support (untested).
 - Fixed power hal, stuff like touch and interation boosts, low power mode freq limit works properly now.
 - Very efficient interactive governor from franco kernel (works much better than ondemand, also modern devices use interactive as their default governor)
 

voron00

Senior Member
Mar 8, 2011
343
1,102
Google Nexus 4
LeEco Le Pro3
is that means, stable build coming soon?

Not 100% stable, there are still some minor bugs. Also enabling hardware encoder broke the built in screen recorder app so i had to temporary remove it from the build for now.

Anyway, update is up:

HTML:
2018-03-10:
 - Synced lastest LineageOS sources.
 - Fixed video recording.
 - Minor kernel tweaks to improve overall performance.
 

AndyYan

Recognized Contributor
Jan 30, 2012
4,773
4,401
Beijing
Impressive work! 5 years already and N4 still keeps going and going...

Sent from Xiaomi Mi Mix 2 @ LineageOS 15.1
 

AndyYan

Recognized Contributor
Jan 30, 2012
4,773
4,401
Beijing
Tried to build this from the source in OP (there are some aesthetic changes I need to build with and use), got cut short:
Code:
device/lge/mako/camera/QCameraHWI_Record.cpp:354:11: error: member access into incomplete type 'android::media
_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
    packet->meta_handle = mNativeHandle[frame->video.video.idx];
          ^
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandl
e_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:355:11: error: member access into incomplete type 'android::media
_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
    packet->buffer_type = kMetadataBufferTypeNativeHandleSource;
          ^
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandl
e_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:480:41: error: invalid application of 'sizeof' to an incomplete t
ype 'android::media_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
            mHalCamCtrl->mGetMemory(-1, sizeof(media_metadata_buffer), 1,
                                        ^     ~~~~~~~~~~~~~~~~~~~~~~~
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandl
e_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:484:15: error: member access into incomplete type 'android::media_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
        packet->meta_handle = mNativeHandle[cnt];
              ^
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandle_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:486:15: error: member access into incomplete type 'android::media_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
        packet->buffer_type = kMetadataBufferTypeNativeHandleSource;
              ^
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandle_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:560:33: error: member access into incomplete type 'android::media_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
            if (packet && packet->buffer_type == kMetadataBufferTypeNativeHandleSource) {
                                ^
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandle_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:561:73: error: member access into incomplete type 'android::media_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
              native_handle_t *nh = const_cast<native_handle_t *>(packet->meta_handle);
                                                                        ^
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandle_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:561:75: error: expected ')'
              native_handle_t *nh = const_cast<native_handle_t *>(packet->meta_handle);
                                                                          ^
device/lge/mako/camera/QCameraHWI_Record.cpp:561:66: note: to match this '('
              native_handle_t *nh = const_cast<native_handle_t *>(packet->meta_handle);
                                                                 ^
8 errors generated.
Am I missing something?
 

voron00

Senior Member
Mar 8, 2011
343
1,102
Google Nexus 4
LeEco Le Pro3
Tried to build this from the source in OP (there are some aesthetic changes I need to build with and use), got cut short:
Code:
device/lge/mako/camera/QCameraHWI_Record.cpp:354:11: error: member access into incomplete type 'android::media
_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
    packet->meta_handle = mNativeHandle[frame->video.video.idx];
          ^
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandl
e_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:355:11: error: member access into incomplete type 'android::media
_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
    packet->buffer_type = kMetadataBufferTypeNativeHandleSource;
          ^
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandl
e_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:480:41: error: invalid application of 'sizeof' to an incomplete t
ype 'android::media_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
            mHalCamCtrl->mGetMemory(-1, sizeof(media_metadata_buffer), 1,
                                        ^     ~~~~~~~~~~~~~~~~~~~~~~~
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandl
e_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:484:15: error: member access into incomplete type 'android::media_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
        packet->meta_handle = mNativeHandle[cnt];
              ^
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandle_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:486:15: error: member access into incomplete type 'android::media_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
        packet->buffer_type = kMetadataBufferTypeNativeHandleSource;
              ^
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandle_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:560:33: error: member access into incomplete type 'android::media_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
            if (packet && packet->buffer_type == kMetadataBufferTypeNativeHandleSource) {
                                ^
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandle_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:561:73: error: member access into incomplete type 'android::media_metadata_buffer' (aka 'android::encoder_nativehandle_buffer_type')
              native_handle_t *nh = const_cast<native_handle_t *>(packet->meta_handle);
                                                                        ^
device/lge/mako/camera/QCameraHWI_Record.cpp:32:18: note: forward declaration of 'android::encoder_nativehandle_buffer_type'
  typedef struct encoder_nativehandle_buffer_type media_metadata_buffer;
                 ^
device/lge/mako/camera/QCameraHWI_Record.cpp:561:75: error: expected ')'
              native_handle_t *nh = const_cast<native_handle_t *>(packet->meta_handle);
                                                                          ^
device/lge/mako/camera/QCameraHWI_Record.cpp:561:66: note: to match this '('
              native_handle_t *nh = const_cast<native_handle_t *>(packet->meta_handle);
                                                                 ^
8 errors generated.
Am I missing something?

You have to pick hal1 patches to hardware/qcom/media stack before building:

HTML:
cd hardware/qcom/media

git fetch https://github.com/Unlegacy-Android/android_hardware_qcom_media aosp-8.1

git cherry-pick ee3524b0c8fc84e478a3b5af6859e99be9a0cc77
git cherry-pick 6e1e771b60535deae8e6dac6f35193ca40c7dfd3
git cherry-pick fb6c95a7f31f8612171f88c92e6899627e4319d7
git cherry-pick c7202d9283cf78b6f1d5356be918d107887aa3e5
git cherry-pick 748e30c9b79a4b716df6de3067887f997774c783
git cherry-pick 77e62c0fc5b1804ccbd8a433b7b5f91056a23f29
git cherry-pick adfa23dadc4f959e5f5049f4f9b952ec363e3a58
 

Islam Looca

Senior Member
Feb 7, 2013
172
62
Cairo
I had some issues with AOSP oreo builds, in nitrogen and unlegacy roms that not fixed till now, i don't know if you can fix it or not, i'll copy and paste what i reported before so you can check again if it's able to fix or not.

" Sometimes i can't end a call, i keep pressing end call and the call screen is not responding, also had another issue, sometimes when i'm in the middle of the call and want to use the phone to check another number for someone, the screen is still off and i have to press power button to get the screen back on. "

And @Karan.S reported the same issue :

" I had reported the same issue a few weeks back. Same happens with me too. As long as the call is active, it is as if the proximity sensor doesn't work. Have to use the power button to wake the screen up. It works when the call is being dialed and after the call has ended. Just to make sure the proximity sensor isn't the cause I rolled back to Nitrogen 7.1.2, on there the dialer works just as intended. Using Google Phone app if that matters. Not sure what is wrong. "

This issue was reported in nitrogen os thread, and when i wanted to check if it's rom issue i've flashed unlegacy rom and it's present too, never faced it in nougat or marshmallow.
The other one is the focus issue in google camera and it's present since nougat and still there in oreo, the focus i think sets to continuous not auto and when using flash, it keeps on for 4 seconds or 5 before capturing the photo.

Thanks in advance
 

nitin.chobhe

Recognized Contributor
Jan 3, 2013
8,298
19,955
India
Google Pixel 2 XL
Google Pixel 7 Pro
I had some issues with AOSP oreo builds, in nitrogen and unlegacy roms that not fixed till now, i don't know if you can fix it or not, i'll copy and paste what i reported before so you can check again if it's able to fix or not.

" Sometimes i can't end a call, i keep pressing end call and the call screen is not responding, also had another issue, sometimes when i'm in the middle of the call and want to use the phone to check another number for someone, the screen is still off and i have to press power button to get the screen back on. "

And @Karan.S reported the same issue :

" I had reported the same issue a few weeks back. Same happens with me too. As long as the call is active, it is as if the proximity sensor doesn't work. Have to use the power button to wake the screen up. It works when the call is being dialed and after the call has ended. Just to make sure the proximity sensor isn't the cause I rolled back to Nitrogen 7.1.2, on there the dialer works just as intended. Using Google Phone app if that matters. Not sure what is wrong. "

This issue was reported in nitrogen os thread, and when i wanted to check if it's rom issue i've flashed unlegacy rom and it's present too, never faced it in nougat or marshmallow.
The other one is the focus issue in google camera and it's present since nougat and still there in oreo, the focus i think sets to continuous not auto and when using flash, it keeps on for 4 seconds or 5 before capturing the photo.

Thanks in advance

This is issue with your device's proximity sensor. I do not see any other reason for it not to work.

Regarding camera - we need to understand that this device is 6 years old and the camera original blobs are updated since long. We should be thankful that at least we have fully working camera ;)

Nitin
 

Top Liked Posts