[ROM][Android 8/9/10][Unofficial] LineageOS for Mi-4c/Mi-4s

indrasatrya

Senior Member
May 17, 2012
316
63
0
You're welcome.
I recommend to keep less apps in background on a 2GB device, as ZRAM is only an assistance measure. Also be careful to set swappiness to 100, as ZRAM will take lots of CPU time to move pages in and out. Today's app takes more ram than it was in 2015 (the release time of Mi-4c), that's why some new devices has up to 16GB ram (the more ram most devices have, the more ram most app developers will take, which isn't friendly enough for legacy devices).
sir, can you reupload last twrp. I cant download from androidfilehost. that's weird
 

lousido

Member
Jul 12, 2009
10
1
23
Hello: Installed the lineage-17.1-20200311-UNOFFICIAL-libra.zip ROM on 4 devices and working very well. Without installing the Gapps, with microG. There are some apps that depend on Google and cannot be installed, but they are few.
When I installed them, a device gave problems with screen lock and subsequent restart. I did several installs with Wipes and in the end I formatted DATA. I got it to work properly.
Is there the possibility of saving the contacts in some email account?
Thank you.
 

abbba

Member
Apr 16, 2011
10
0
0
Hello
Need problem with LOS installation.
I had xiaomi.eu 8.9.13 ROM and TWRP-20190418-3.3.0.0-libra.img as recovery.
1. wiped everything except the storage
2. I installed lineage-16.0-20200220-UNOFFICIAL-libra.zip.
3. no gaps installed
4. I see boot animation for 5 minutes, then the phone reboots and enters TWRP again
and it gets pretty hot

Thanks
 

WJXXBSH

Senior Member
Dec 22, 2018
86
56
18
Hello: Installed the lineage-17.1-20200311-UNOFFICIAL-libra.zip ROM on 4 devices and working very well. Without installing the Gapps, with microG. There are some apps that depend on Google and cannot be installed, but they are few.
When I installed them, a device gave problems with screen lock and subsequent restart. I did several installs with Wipes and in the end I formatted DATA. I got it to work properly.
Is there the possibility of saving the contacts in some email account?
Thank you.
For the occasionally freeze on lock screen, it's a known problem that also happens on my device (may depend on the ram size?). Try to wait one minute after every reboot, then unlock the screen as usual (don't unlock too fast if there is a password/pin). If the device reboot unexpectedly, it should be caused by the lockscreen problem or the crash of WLAN.
If you want to install GAPPs, something must be done to save more free space in /system. For example, if you have installed Google Webview, you could delete "/system/product/app/webview" to save 130MB. Also, if Chinese/Japanese/Korean is not your main language, you could delete "/system/fonts/NotoSansCJK.ttc" to save another 100MB.
The AOSP Email and Exchange2 apps were not updated since Android 7, so I removed them to save more free space. If you really need it, I could build those to apps for you.
 
Last edited:

WJXXBSH

Senior Member
Dec 22, 2018
86
56
18
Hello
Need problem with LOS installation.
I had xiaomi.eu 8.9.13 ROM and TWRP-20190418-3.3.0.0-libra.img as recovery.
1. wiped everything except the storage
2. I installed lineage-16.0-20200220-UNOFFICIAL-libra.zip.
3. no gaps installed
4. I see boot animation for 5 minutes, then the phone reboots and enters TWRP again
and it gets pretty hot

Thanks
That's strange if you have the right firmware version and wiped /data (without storage, including /system). Normally, 16.0 will finish booting in 2 minutes (if it goes into recovery, the boot process should be failed).
Did you try to install 17.1 or the latest 16.0 uploaded yesterday? If the problem persists, please tell me.
 

Szuter

New member
Mar 29, 2020
3
0
0
LOS 16 on Mi 4s

Hey,
Thank you for that, I was looking for LOS for my aqua (mi 4s) and found it here! Flashed the latest LOS 16 using the TWRP in previous thread and pico Gapps. Everything is working so far apart of bluetooth.
My Sony Headphones connects and disconnects every 2s - it appears the bluetooth turns itself off and on when Headphones connected.
Any idea where to start digging to resolve bluetooth issues?

Thanks
 

Smile31768

Member
Feb 17, 2016
8
1
0
Hey,
I just flash the newest 17.1., then boot system. But after about 2 min it auto reboot to twrp. Then I uninstall my magisk or even wipe data, cache, and ART Cache. It doesn't work. Even though I reflash so many times.

---------- Post added at 08:24 AM ---------- Previous post was at 07:52 AM ----------

Hey,
I just flash the newest 17.1., then boot system. But after about 2 min it auto reboot to twrp. Then I uninstall my magisk or even wipe data, cache, and ART Cache. It doesn't work. Even though I reflash so many times.
Seems the problem maybe on the gapps. You know, on Lineage, reflash ROM wouldn't delete Gapps. I wipe my /system then it boot successfully. Now I'm trying to switch Gapps to microG.
 
  • Like
Reactions: lousido

lousido

Member
Jul 12, 2009
10
1
23
I updated the rom 17.1 lineage OS 20200330 and I can't stabilize the battery. The screen is locked and reboots. I went back to the previous version and it has the same fault. (Clean install: All Wipe, data formatting)
To check that it was not a battery problem, I installed the latest version of MIUI 9.5.2.0 (NXKCNFA) and it works perfectly (the battery and the ROM)
Does anyone have any ideas to fix the problem?
Thank you
 
Last edited:

mr_rious

Member
Sep 27, 2013
14
2
0
I did a dirtyflash from the version 20200311 to the last version.
For me the last version 20200330 works fine. may thats the best version for daily use for now.

Edit: ok, now it looks like it is going sometimes into a deepsleep and it need than a reboot ...
 
Last edited:

WJXXBSH

Senior Member
Dec 22, 2018
86
56
18
Hey,
Thank you for that, I was looking for LOS for my aqua (mi 4s) and found it here! Flashed the latest LOS 16 using the TWRP in previous thread and pico Gapps. Everything is working so far apart of bluetooth.
My Sony Headphones connects and disconnects every 2s - it appears the bluetooth turns itself off and on when Headphones connected.
Any idea where to start digging to resolve bluetooth issues?

Thanks
Which codec does your Sony headphones use (SBC/APTX/AAC...)?
Does that problem happen on other Bluetooth devices (if no other headphones, you could send files to other device for testing)?
 

WJXXBSH

Senior Member
Dec 22, 2018
86
56
18
I updated the rom 17.1 lineage OS 20200330 and I can't stabilize the battery. The screen is locked and reboots. I went back to the previous version and it has the same fault. (Clean install: All Wipe, data formatting)
To check that it was not a battery problem, I installed the latest version of MIUI 9.5.2.0 (NXKCNFA) and it works perfectly (the battery and the ROM)
Does anyone have any ideas to fix the problem?
Thank you
Do you mean the rom couldn't recognize your battery? I'm also using a 3rd-party battery but it works properly.
If you unlock the lockscreen too fast (especially the first time after a reboot), the SystemUI may get 5% possibility to crash. This promlem happened after I switched to lineage-17.1 (as 17.0 is EOL by lineage teams), but I haven't found exactly what caused it (maybe an I/O fault in JVM layer?).
If you want to reflash a rom, remember to wipe "/system" (to avoid some addon.d scripts).
 
  • Like
Reactions: lousido

WJXXBSH

Senior Member
Dec 22, 2018
86
56
18
I did a dirtyflash from the version 20200311 to the last version.
For me the last version 20200330 works fine. may thats the best version for daily use for now.

Edit: ok, now it looks like it is going sometimes into a deepsleep and it need than a reboot ...
Do you mean the device keeps a black screen even if you pressed the power button for many times? This problem happens only in my test versions (newer than 20200330) and got fixed now (no longer happens on my device).
Besides, in some specific situations, the WLAN driver may carsh and cause (I don't think it's a hardware issue) the whole system working weirdly. But it shouldn't happen in most times with most wireless APs.
 
  • Like
Reactions: lousido

Szuter

New member
Mar 29, 2020
3
0
0
Bluethoot, LOS 16

Which codec does your Sony headphones use (SBC/APTX/AAC...)?
Does that problem happen on other Bluetooth devices (if no other headphones, you could send files to other device for testing)?
THank you for getting back to me.

Sony headphones WH-CH700N Specs
Supported Audio Codecs AAC, SBC, aptX, aptX HD
Bluetooth Profiles A2DP AVRCP HFP HSP
Bluetooth 4.1

Bluetooth communicates with Fitbit no problems. I can receive files from my notebook via Bluetooth. I am not able to send files to my notebook.

Only with the headphones the bluetooth turns on and off constantly. When on (for max of 5s) the headphones connect.

Not a big deal. I am thinking about going to LOS 17.1 or upgrade to MI9 t pro.
 

WJXXBSH

Senior Member
Dec 22, 2018
86
56
18
Mi4S
lineage-17.1-20200330-UNOFFICIAL-libra
- music volume is MAX and without controling
- fingerprint sensor - not working.
For the first one, it's a known problem which happens on audio files with PCM codec (it affects local music player mostly). However, it doesn't happen on lineage-16.0 (with the same kernel and similar configs) and I haven't found an exact way to fix it.
For the second one, I think it should work (theoretically), but I don't have a Mi-4s to test it (the Mi-4c is my only mobile phone). It might be caused by the kernel change which brings oneplus fingerprint stacks. I could send you a kernel with that change removed later.

Edit #1: The new kernel is uploaded as an attachment. Please rename it to "boot.7z" and decompress, then flash the "boot.img" in TWRP.
 

Attachments

Last edited:

WJXXBSH

Senior Member
Dec 22, 2018
86
56
18
THank you for getting back to me.

Sony headphones WH-CH700N Specs
Supported Audio Codecs AAC, SBC, aptX, aptX HD
Bluetooth Profiles A2DP AVRCP HFP HSP
Bluetooth 4.1

Bluetooth communicates with Fitbit no problems. I can receive files from my notebook via Bluetooth. I am not able to send files to my notebook.

Only with the headphones the bluetooth turns on and off constantly. When on (for max of 5s) the headphones connect.

Not a big deal. I am thinking about going to LOS 17.1 or upgrade to MI9 t pro.
If you have time, try to connect the headphones and switch the default codec to "SBC" in "Settings-System-Developer settings". If it keeps disconnect, try to use some other codes.
I think the headphone should use aptX by default. If aptX codec doesn't work, try to replace "libaptX_encoder.so" and "libaptXHD_encoder.so" with the one below (location: /system/vendor/lib64/):
libaptX_encoder.so
libaptXHD_encoder.so
 
  • Like
Reactions: Szuter
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone