• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

[ROM][8.1/9/10/11][Unofficial] LineageOS for Mi-4c/Mi-4s

Search This thread

klisanor

Member
Jun 9, 2009
18
2
After wipe + format It still very hard to get GPS lock. Is there any solution out there?
If you are not in China (Google is not blocked for you), you can try using SUPL from Google. Compare your /etc/gps.conf with my version (I took it from some older sources, don't forget to make a backup).
su -c 'mount -o rw,remount /system/etc/gps.conf' su -c '/data/data/com.termux/files/usr/bin/vimdiff /etc/gps.conf /sdcard/gps.conf'
Code:
# XTRA_SERVER_QUERY (1=on, 0=off)

# If XTRA_SERVER_QUERY is on, the XTRA_SERVERs listed
# below will be ignored, and instead the servers will
# be queried from the modem.
XTRA_SERVER_QUERY=0
# XTRA_SERVERs below are used only if XTRA_SERVER_QUERY
# is off.
XTRA_SERVER_1=http://xtra1.gpsonextra.net/xtra2.bin
XTRA_SERVER_2=http://xtra2.gpsonextra.net/xtra2.bin
XTRA_SERVER_3=http://xtra3.gpsonextra.net/xtra2.bin

# Error Estimate
# _SET = 1
# _CLEAR = 0
ERR_ESTIMATE=0

#Test
# NTP_SERVER=time.gpsonextra.net
#Asia
# NTP_SERVER=asia.pool.ntp.org
#Europe
NTP_SERVER=europe.pool.ntp.org
#North America
# NTP_SERVER=north-america.pool.ntp.org

# DEBUG LEVELS: 0 - none, 1 - Error, 2 - Warning, 3 - Info
#               4 - Debug, 5 - Verbose
# If DEBUG_LEVEL is commented, Android's logging levels will be used
# DEBUG_LEVEL = 2
DEBUG_LEVEL = 5

# Intermediate position report, 1=enable, 0=disable
INTERMEDIATE_POS=0

# Below bit mask configures how GPS functionalities
# should be locked when user turns off GPS on Settings
# Set bit 0x1 if MO GPS functionalities are to be locked
# Set bit 0x2 if NI GPS functionalities are to be locked
# default - non is locked for backward compatibility
#GPS_LOCK = 0

# supl version 1.0
SUPL_VER=0x10000

# GPS Capabilities bit mask
# SCHEDULING = 0x01
# MSB = 0x02
# MSA = 0x04
# ON_DEMAND_TIME = 0x10
# GEOFENCE = 0x20
# default = ON_DEMAND_TIME | MSA | MSB | SCHEDULING | GEOFENCE
CAPABILITIES=0x37

# Accuracy threshold for intermediate positions
# less accurate positions are ignored, 0 for passing all positions
# ACCURACY_THRES=5000

################################
##### AGPS server settings #####
################################

# FOR SUPL SUPPORT, set the following
# SUPL_HOST=supl.host.com or IP
# SUPL_PORT=1234
SUPL_HOST=supl.google.com
SUPL_PORT=7276

# FOR C2K PDE SUPPORT, set the following
# C2K_HOST=c2k.pde.com or IP
# C2K_PORT=1234

####################################
#  LTE Positioning Profile Settings
####################################
# 0: Enable RRLP on LTE(Default)
# 1: Enable LPP_User_Plane on LTE
# 2: Enable LPP_Control_Plane
# 3: Enable both LPP_User_Plane and LPP_Control_Plane
LPP_PROFILE = 0

################################
# EXTRA SETTINGS
################################
# NMEA provider (1=Modem Processor, 0=Application Processor)
NMEA_PROVIDER=0

##################################################
# Select Positioning Protocol on A-GLONASS system
##################################################
# 0x1: RRC CPlane
# 0x2: RRLP UPlane
# 0x4: LLP Uplane
A_GLONASS_POS_PROTOCOL_SELECT = 0

You might find su -c 'dumpsys location' useful to debug the TTFF (Time to first fix):
TTFF mean (sec): 106.0

For indoor positioning I'm using MicroG 0.2.17.204714 (flashed with NanoDroid, Stable Releases) with 4 location backends (via FDroid). 2 of them are always on 1) Apple Wi-Fi for quite accurate coarse locations, 2) Mozilla Location Service (Use Wi-Fi and Cell) less accurate. For long-distance trips I'm turning on temporary 3) GSM Location Service and 4) Deja Vu.
 

syl1979

New member
Nov 8, 2016
4
2
Got back my good old Mi4c that was used as simple cell phone under lineage OS 14.1.

Seeing this topic I decided to go on with latest 18.1

I believe I had TWRP 3.0.2 install, but refused to install latest rom
Tried to load through fastboot other versions (3.1.1) but did not work.
Seeing some other thread I was able to install ORANGEFOX as bootloader.

Then flashed within orangefox the patch libra_miui_fw_patch_MI4c_V9.5.1.0.NXKCNFA.zip
I believe I cleared the caches ?
Then reboot, flashed within fox the ROM 18.1
cleaned the caches

After reboot I was getting the android logo, but was returning to Fox.

Not knowing what I am doing, I believed I wiped all including system , but I got errors.
Reboot , going again to Fox

Then in fox I went into Menu > Fix contexts .

Miracle, very fast boot into Lineage start screen !

Seems to work correctly,booting into lineage each time.

Thanks for the hard work on updating this good old phone

(now the problem is more the battery that has arrived at the end of his life => any recommendations ?)

Trust is reporting SELinux as disabled, is it normal ?
 
Last edited:

silverchairbg

Senior Member
May 13, 2012
104
10
@syl1979 From first post:
Not working
  • SELinux permissive [16.0 +]
My mother just had Redmi 2 die and I gave her a mi 4c flashed with the 17.1 Lineage from this thread. She complains from signal strength issues, although we never had such when we used it. I remember way back when Cyanogenmod was a thing, there were often radio packages to flash if need be. Are such available for LineageOS and our device? Or has anyone found a way to improve signal strength of their device? Sadly when I try to google this, all posts are about a wifi router with the same name as the phone.
 

WJXXBSH

Senior Member
Dec 22, 2018
154
80
Xiaomi Mi 4C
Xiaomi Mi Mix 2
@syl1979 From first post:
Not working
  • SELinux permissive [16.0 +]
My mother just had Redmi 2 die and I gave her a mi 4c flashed with the 17.1 Lineage from this thread. She complains from signal strength issues, although we never had such when we used it. I remember way back when Cyanogenmod was a thing, there were often radio packages to flash if need be. Are such available for LineageOS and our device? Or has anyone found a way to improve signal strength of their device? Sadly when I try to google this, all posts are about a wifi router with the same name as the phone.
If you have flashed the latest firmware (or full MIUI rom based on Android 7.0) on your Mi-4c, the latest baseband (radio) package will be used. Theoretically, the quality of signal or the features about mobile networks depend on the hardware and baseband (which is not open-source and hard to modify) of a device, so most custom ROMs should work similar as stock ROMs. Also, if your operator uses some bands that are not supported by Mi-4c (only LTE band 1/3/7/38/39/40/41 are available), the signal might be weak or not useable.
 

silverchairbg

Senior Member
May 13, 2012
104
10
If you have flashed the latest firmware (or full MIUI rom based on Android 7.0) on your Mi-4c, the latest baseband (radio) package will be used. Theoretically, the quality of signal or the features about mobile networks depend on the hardware and baseband (which is not open-source and hard to modify) of a device, so most custom ROMs should work similar as stock ROMs. Also, if your operator uses some bands that are not supported by Mi-4c (only LTE band 1/3/7/38/39/40/41 are available), the signal might be weak or not useable.
Yes, latest firmware is installed. My mother claims that she had better signal with the Redmi 2 phone on the same spots where she usually talks from home. I've compared them from here and the mi 4c seem to support the same bands plus more https://www.gsmarena.com/compare.php3?idPhone1=6884&idPhone2=7512 So the only conclusion is the mi 4c just has weaker signal than the cheaper Redmi 2
 

Conti93

Member
Jun 2, 2020
6
4
Forlì
On 18.1 even after deleting NotoSansCJK.ttc there wasn't enough space even for the pico GApps package.
So I resized the goddamn system partition. More info here:

Shortly, boot the phone in TWRP, push parted with adb, open a shell with adb and chmod +x parted. Mount and backup the cust partition (and permissions, possibly.), open parted by selecting /dev/block/mmcblk0 as device, take note of the actual dimensions and delete the last four partitions:
Immagine 2021-10-07 152231.png

Good, now recreate them, giving 2-300MB more for the system partition and shifting the other three partitions accordingly. You may have to reboot, then reinstall the ROM and do a TWRP backup of your system partition. This is needed to use the "ResizeFs" command of TWRP, since upon install the system partition will go back to the original ~1800MB instead of the new value. Go to Wipe, Advanced Wipe, select "system" and resize the partition. This operation will probably screw up the data in system, so wipe system again and restore the backup you created before. Oh, restore the cust partition if needed.
1633613973509.png

Done. Now you can keep everything in system and install GApps.
YMMV.

BTW, is there no deep sleep on this device?
Screenshot_20211007-145917_Simple_System_Monitor.png
 
Last edited:
  • Like
Reactions: bmleite and jhowdbv

silverchairbg

Senior Member
May 13, 2012
104
10
Yes, latest firmware is installed. My mother claims that she had better signal with the Redmi 2 phone on the same spots where she usually talks from home. I've compared them from here and the mi 4c seem to support the same bands plus more https://www.gsmarena.com/compare.php3?idPhone1=6884&idPhone2=7512 So the only conclusion is the mi 4c just has weaker signal than the cheaper Redmi 2
Continuing with the signal problems, does anybody know which is the "only 2g" or gsm option in Preferred network type? There are numerous settings with confusing abbreviations that have me baffled. My OnePlus phone has only 3 options there: 4g, 3g, 2g only - clear as day compared to these 10 options. More importantly is why does it show 5G bands when this phone does not support 5G? @WJXXBSH can these be removed to avoid confusion?
 

Honko

Member
Sep 1, 2011
9
1
Germany
Hi,

I tried installing the latest build (20210929) on my trusty ol' Mi 4C (previously running Resurrection Remix Android 6.01) via OrangeFox recovery.
Steps I took:
1. wiped everything
2. installed the zip (lineage-18.1-20210919-UNOFFICIAL-libra.zip)
3. wiped caches
After rebooting, the device only shows the mi logo and is stuck in a bootloop.
I tried the same process again with the additional step of fixing contexts (as mentioned by syl1979) but to no avail.

I can still access recovery without problem, but I haven't managed to get LineageOS to boot properly.

Any tips on what else I could try?
Thanks for still trying to keep this great device alive :D

Edit: I read through the posts here a little and realized, I need to flash the firmware mentioned in this post first.
I can boot into Lineage successfully now :)

However, I can't seem to pull down the status bar at all? Edit 2: Nvm, a reboot fixed this as well :)
 
Last edited:
  • Like
Reactions: Conti93

lousido

Member
Jul 12, 2009
16
2
Hola: Estoy usando el Xiami 4c (ROM 18.1 - 20211113) como GPS con aplicaciones como Sygic, Igo o Google Maps y se tarda mucho en obtener la posición y, a veces, desde que se sintoniza, la señal no es estable. Tengo el archivo gps.conf con la configuración de este hilo.
Hay alguien en España o Europa que funciona correctamente para ti y que puede compartir la configuración que tienes.
Gracias

EDITO: Por si puede ser de utilidad. En esta dirección puede obtener información sobre cómo adaptar el archivo gps.conf para varios países.
[URL unfurl = "true"] https://es.videotutorial.ro/localizare-gps-rapida-pe-orice-smartphone-android/ [/ URL]
 
Last edited:

bmleite

Member
Feb 27, 2010
8
0
On 18.1 even after deleting NotoSansCJK.ttc there wasn't enough space even for the pico GApps package.
So I resized the goddamn system partition. More info here:

Shortly, boot the phone in TWRP, push parted with adb, open a shell with adb and chmod +x parted. Mount and backup the cust partition (and permissions, possibly.), open parted by selecting /dev/block/mmcblk0 as device, take note of the actual dimensions and delete the last four partitions:
View attachment 5427485
Good, now recreate them, giving 2-300MB more for the system partition and shifting the other three partitions accordingly. You may have to reboot, then reinstall the ROM and do a TWRP backup of your system partition. This is needed to use the "ResizeFs" command of TWRP, since upon install the system partition will go back to the original ~1800MB instead of the new value. Go to Wipe, Advanced Wipe, select "system" and resize the partition. This operation will probably screw up the data in system, so wipe system again and restore the backup you created before. Oh, restore the cust partition if needed.
View attachment 5427497
Done. Now you can keep everything in system and install GApps.
YMMV.

BTW, is there no deep sleep on this device?
View attachment 5427505

Thanks, the resize info was great, we can at least install everything without removing stuff. From my understanding we will need to do this each time we want to flash the rom:
1) install Rom
2) backup "system"
3) resize "system" so that we have >2000MB
4) revert back the "system" backup
5) install GAPPS

Maybe that could be automated with a TWRP script that does that ?
 
Last edited:

WJXXBSH

Senior Member
Dec 22, 2018
154
80
Xiaomi Mi 4C
Xiaomi Mi Mix 2
  • Love
Reactions: Big Dumb Object

alexchalmov

Member
Dec 21, 2021
14
0
Hi, i tried to install the lastet build on mi4s of lineage 17.1 + AnyKernel3-aqua+libra-20210627-7085d01, it works good. Then i tried to install the lastet build of lineage 18.1, system works better, but i have a problem into TWRP(3.3.1-0) "unavailable to mount /data" Who can help me? And where to find Anykernel3 releases for mi4c\4s? I founded only AnyKernel3-aqua+libra-20210627-7085d01 on github... I am writing on this site for the first time, sorry if something goes wrong
 

Big Dumb Object

Senior Member
May 22, 2020
50
20
Hi, i tried to install the lastet build on mi4s of lineage 17.1 + AnyKernel3-aqua+libra-20210627-7085d01, it works good. Then i tried to install the lastet build of lineage 18.1, system works better, but i have a problem into TWRP(3.3.1-0) "unavailable to mount /data" Who can help me? And where to find Anykernel3 releases for mi4c\4s? I founded only AnyKernel3-aqua+libra-20210627-7085d01 on github... I am writing on this site for the first time, sorry if something goes wrong
Did you fall in this too? Upvote my last post just before yours and then flash the rebuilt TWRP from here.
 

alexchalmov

Member
Dec 21, 2021
14
0
Installed lineage 17.1 + AnyKernel3-aqua+libra-20210627-7085d01 on mi4c 2/16gb, quick settings panel freezes sometimes, and split screen function does not work(the same room on mi4s 3/64gb does not have this troubles) Split screen often turns off when ro.config.low_ram=true added to build.prop, but here it is done differently. How to fix this ? How to disable low_ram property ?
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    DESCRIPTION
    Unofficial LineageOS ROMs for Mi-4c (libra) and Mi-4s (aqua), with base-layer enhancements and performance optimizations.
    Version 15.1/16.0/17.1/18.1 are available for download, version 18.1 are in active development.


    FEATURE
    The following items may not be available for all versions, please use the latest build!
    • Build with user variant instead of userdebug (to reduce image size and improve performance).
    • CPU/GPU is overclocked with optimized voltage/bus-cci and 300 Hz/Jiffies kernel clock frequency. [16.0 +]
    • EAS (sched cpufreq governor from linux-3.18) CPU scheduler implemented. [16.0 +]
    • Full-weight NotoSansCJK fonts included (to display East Asian characters with more font weights).
    • High screen refresh-rate (75 Hz) support for Mi-4c with "Sharp-rsp61322 LCD" screen. [16.0 +]
    • Implement ZRAM with ZSTD crypto algorithm (KSM is used after 20210116) to improve I/O performance on devices with 2GB RAM. [16.0 +]
    • Linux kernel is built by clang-12 toolchains, with Polly + LTO + -Ofast optimization to get better performance. [17.1 +]
    • Pre-dex2oat with everything filter globally (sacrificing space and first-install time to improve efficiency).
    • Remove or disable unnecessary kernel configs and modules, also includes some other optimizations. [16.0 +]
    • Remove unnecessary apps/binaries/libraries/services from Android framework and more. [16.0 +]
    • Signature spoofing support (ready for MicroG, including Chinese translations).
    • User-friendly controller for special features in Settings app (like CPU overclock, Edge gesture and Screen refresh rate). [17.1 +]
    • ...

    STATUS
    Go to GitHub Issues for more details and give me feedback.
    • Working
      • Basic hardware
        • Baseband/SMS
        • Bluetooth
        • Camera/Flashlight
        • IR remote
        • Speaker/Microphone
        • Wi-Fi
      • Extras
        • Camera API2 (with patch) [17.1 +]
        • Edge gesture (in Settings > System > Buttons) [16.0 +]
        • Overclock control (in Settings > Battery > Battery saver and performance) [17.1 +]
        • Screen refresh rate (in Settings > Display) [17.1 +]
    • Not working
      • SELinux permissive [16.0 +]
      • VOLTE (won't fix because of no compatible IMS stacks) [16.0 +]

    DOWNLOAD

    SOURCE

    Thanks to all developers and users (Gah0 | Mortezadadgar | Xiaomi classic dev | ...) who contributed to Mi-4c/Mi-4s (including other devices shipped with MSM8992/8994 SOC) or gave me help!
    6
    TIPS
    Here are some tips which may improve your experience or resolve some problems.
    • Basic quality assurance: I only have one smart phone (3+32GB Mi-4c ×1), so the ROMs here should at least satisfy my daily usage.
      • This project will be kept maintained even after I bought my new mobile phone (8+128GB Mi-Mix-2 ×1) in 2021. My Mi-4c is one of the most meaningful items of my own, it's not easy to leave it behind in the drawer and say goodbye. The new battery and rear cover (thanks to yipinghuang1991) will refresh this old device and make it usable again.
    • Even though the signal icon in status bar shows "No signal" at the first minute after boot, the device is still able to receive SMS and phone calls (so the device does have signal, but the system doesn't admit it at all).
    • If the free space in /system is not enough to install GAPPs, try to delete /system/fonts/NotoSansCJK.ttc to get about 100MB free space (If Chinese/Japanese/Korean is not your main language). Removing the prebuilt Webview packages (about 120MB) after installed another one is also a solution.
    • If you found random reboot on your device with overclock enabled (or just updated to lineage-17.1-20201216 and left overclock option unchanged), please disable this feature to see if this issue is resolved. Go to Settings > System > Battery > Battery saver and performance, enable then disable "High performance mode", and reboot your device. If you are using lineage-17.1-20210209 or newer, it's no need to do such steps after a clean install (as both persist.sys.cpu_overclock and persist.vendor.edge_touch_mode are default to false by default).
    • It's highly recommended to disable system logs to reduce resource consumption (for better performance and privacy), unless you're going to collect system logs. Go to Settings > System > Developer options, and set the value of "Logger buffer sizes" to off.
    • It's not recommended to use SELinux enforcing mode even if it's supported in some builds. Also, please consider the negative effect of I/O performance before enabling disk encryption, unless you really want to.
    • You could download the latest (or nightly) kernel image for Mi-4c/4s (packed with AnyKernel3) on GitHub Releases or AFH. Different from the boot image (boot.img), AnyKernel3 will replace old kernel in device regardless of the ROM version. Therefore, this new kernel image is suitable for lineage-16.0/17.1/18.1, and 14.1/15.1 (may need to modify the init scripts to change CPU scheduler, as interactive has been replaced by sched). For installation, just flash the zip file aqua+libra-AnyKernel3-date-commit.zip in recovery like other custom kernels and ROMs.

    BUILD
    As all source codes and custom changes in my LineageOS ROMs are open-source, you are permitted to build your own ROM or kernel (not only for LineageOS) with my sources for non-commercial purpose.

    There are many documents about how to build custom Android ROMs in Linux/OSX, so I will not post these basic steps here to reduce redundancy. However, there are still some important things which may not be included in other documents. Here are some basic steps about what you should do (using lineage-17.1 as example), you can also take a reference to other tutorials.
    • Install necessary packages
      • There are a number of "necessary" packages listed in most tutorials, but not all of them are needed. Here are the packages you need to install manually on Ubuntu or Debian.
        • Necessary packages: sudo apt install bc bison git gnupg make rsync unzip zip
        • Optional packages: sudo apt install ccache repo
        • It's optional to install and setup ccache to reduce build time.
        • As libncurses5 is needed by some components, you should either install it (not recommend) or make symlinks to libncurses6 (which has been installed by default) like this: libncurses.so.5 -> libncurses.so.6 + libncursesw.so.5 -> libncursesw.so.6 + libtinfo.so.5 -> libtinfo.so.6
    • Sync Android sources
      • You need to download and update your local repo with upstream sources regularly, in order to get new changes as soon as possible (just like other open-source projects).
        • Init repo to current directory: repo init -u https://github.com/LineageOS/android.git -b lineage-17.1 --depth=1
        • Sync all repos and prune unused branches: repo sync --prune
      • If nothing wrong happened, the LineageOS sources have been downloaded to your computer (about 100GB). Here are some commands which might be useful in the future.
        • Show all local changes of your repos: repo status or repo diff
        • Perform any operations to all repos: repo forall -c "xxx"
    • Setup local manifest
      • To sync your Android sources with upstream repos easily, it's recommended to create a local manifest in ./repo/local_manifests/. The local manifest should be a XML file like the following one, any filename is accepted (file: libra.xml).
        XML:
        <?xml version="1.0" encoding="UTF-8"?>
        <manifest>
          <project name="BYZYB/android_device_xiaomi_libra" path="device/xiaomi/libra" remote="github" revision="lineage-17.1" />
          <project name="BYZYB/android_kernel_xiaomi_libra" path="kernel/xiaomi/libra" remote="github" revision="master" />
          <project name="BYZYB/android_vendor_xiaomi_libra" path="vendor/xiaomi/libra" remote="github" revision="lineage-16.0" />
          <project name="LineageOS/android_hardware_sony_timekeep" path="hardware/sony/timekeep" remote="github" revision="lineage-17.1" />
          <project name="LineageOS/android_hardware_xiaomi" path="hardware/xiaomi" remote="github" revision="lineage-17.1" />
        </manifest>
    • Resolve build errors
      • Due to some hacks in my device configurations which are conflict with Android build rules, there might be some build errors if using all my repos directly. To resolve this issue, you need to modify project build/make/manually on your disk. After that, you should be able to prepare the necessary environment for Android build without errors.
        • Setup build namespace only: . build/envsetup.sh
        • Prepare build environment for Mi-4c with a specified build variant (xxx = eng/userdebug/user): . build/envsetup.sh && lunch lineage_libra-xxx
      • If you want to build the ROM in "user" build variant instead of the default "userdebug", more changes are needed to avoid build errors or potential bootloop. The following commands are some ways to build a full ROM.
        • Build full ROM in "user" variant: brunch lineage_libra-user
        • Build full ROM in "userdebug" variant: brunch lineage_libra-userdebug
        • Build full ROM with a specified number of threads (x ≤ physical CPU cores): lunch lineage_libra-xxx && make -jx
        • If you have lunch before, here is the simplest way: m
      • As git patch files are similar to git diff, you can always do these changes manually without using git am xxx.patch && git reset HEAD^ or other shell commands.
    • Kernel build toolchains
      • The kernel supports to be built with gcc-9+ or clang-10+. As Link-Time-Optimization (LTO) for Clang is enabled by default (config: CONFIG_LTO_CLANG), building the kernel with GCC directly will result in build errors. In conclusion, it's recommended to choose Clang as your toolchains for both faster build speed and better performance.
      • As VDSO compat is enabled (config: CONFIG_COMPAT_VDSO), both arm and arm64 toolchains are needed to build the kernel. Clang could handle different cross compile targets easily (thanks to LLVM), but GCC could not. Also, though the kernel sources are compiled by clang, they will be linked by LD (included in GCC toolchains -> Binutils) with LLVM plugins. In conclusion, if the ROM you are building provides legacy gcc-4.9 toolchains, it should be safe to go ahead without installing GCC toolchains or Binutils. Otherwise, you need to install both Binutils and Clang packages in your computer to avoid build problems.
      • After 8/15/2021 (commit d4f4eb9), it's now possible to link the kernel with ld.lld and the integrated assembler of LLVM. Combined with LTO, ld.lld could reduce the size of kernel image (-1MB) with no performance impact.
      • If you are using Ubuntu or Debian on your computer, please install the following packages.
        • For Ubuntu or Debian: sudo apt install clang llvm-dev
        • For ROMs without legacy gcc-4.9 toolchains: sudo apt install binutils-aarch64-linux-gnu binutils-arm-linux-gnueabihf
      • Then you should be able to build the kernel without modifying build configs.
        • Build kernel image only: make bootimage
        • Build recovery image only: make recoveryimage
    • Apply custom changes (optional)
    2
    I want to flash this rom on my Mi4C, but cant get it to flash.
    i'm not sure what i do wrong.

    1. I installed the latest official twrp from twrp.me (version 3.1.1.-1).
    2. Downloaded the .zip file lineage-18.1-20210623-UNOFFICIAL-libra from github.
    3. Did a full wipe.
    4. Tried to flash the .zip file.

    The TWRP error is:

    E3004: This package is for device: 4C,libra; this device is .
    Updater process ended with ERROR: 1
    Error installing zip file '/sdcard/rom/lineage-18.1-20210623-UNOFFICIAL-libra.zip'


    It seems like TWRP doesn't know it is a Mi4C or something.
    Can anyone help me?
    Could you try this version of TWRP recovery (3.1.1 is too old)? Also, you need to unlock your Mi-4c with official method and flash the latest firmware before using this ROM.
    2
    Thanks for the fast reply. So it's not possible to disable the pop up without updating to LineageOS 17? It's not a big issue but I want to be sure.

    Technically, yes. We cannot get rid of the pop-ups unless disabling permission review. You may try to decompile framework-res.apk (or generate a RRO overlay to override default configs), find "config_permissionReviewRequired" in "res/values/config.xml" and set it to "false".
    2
    :good: :victory: Finally, my phone do no longer randomly reboots.
    I reduced the speed to around 144k with a root app called "CpuSpeed". Thanks for the important note!

    If CPU/GPU overclock is the reason that caused random reboot (it's surely possible), it means the CPU (or msm8992 SOC) in some devices has different hardware quality than others (just as the screen: only some of them support 75Hz refresh rate, others will stop working). That's why this problem doesn't happens to all Mi-4c/4s (My device doesn't reboot even when overclocking the big cores to 1.8GHz).