• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!
  • Fill out your device list and let everyone know which phones you have!    Edit Your Device Inventory

[ROM][AOSP/AOSP-CAF][Oreo/Nougat/Pie] Android 9/8.x/7.1 for Xiaomi Mi 2/2S

Search This thread

windbells

Senior Member
Sep 11, 2017
134
217
Although the Xiaomi Mi 2 is almost five years old, and it seems there would never be a working nougat/oreo ROM after ivan stopped the development of his AOSP project, but it's not the truth. As the issue of light and proximity sensor have been fixed, I think most of the system components are stable enough for dialy usage after my couple days tests, so I decide to release the AOSP 8.0.0 to you today.

Install:
Please make sure your phone haven't modified the stock partition. It means my rom only work with the latest miui-dev partition table, so you have to Download lastest Mi 2 Developer tar file and flash using fastboot before install my oreo/nougat ROM . This process will earse all data on you phone, so backup all data before you getting start.
1. flash stock miui developer by fastboot update (http://en.miui.com/a-234.html)
2. flash twrp recovery use fastboot and reboot
3. hold power and volume up key to boot into recovery mode
4. install oreo or nougat ota package
5. wipe data and cache (you have to do this even if you are using ivan's aosp marshmallow/lollipop)

Working:
(Note: I use Mi 2SC with CDMA network support, but I don't have an available CDMA SIM card right now for test, so users with CDMA network might have trouble with RIL)
- Audio (bluetooth headset not test)
- Bluetooth
- Camera
- RIL
- WIFI
- FM
- Sensors
- GPS

Credit/Thanks
Special thanks to ivan for the initial device source tree and his preview works on Mi2 device.
Many Thanks to @AdrianDC @Ziyan for their great work to bring Android Oreo to MSM8960 platform.
Also thanks to @m11kkaa (M1cha) @zaclimon for their projects.

- Xiaomi Opensource Project
- Google Android Opensource Project
- Team LineageOS/CyanogenMod
- Team Omnirom and Team TWRP recovery
- Team Unlegacy Android

Source:
device tree: https://github.com/windbellx/android_device_xiaomi_aries
https://github.com/windbellx/android_device_xiaomi_msm8960-common
kernel source: https://github.com/windbellx/android_kernel_xiaomi_msm8960
vendor: https://github.com/windbellx/proprietary_vendor_xiaomi

Screenshot:
 

Attachments

  • Screenshot_20181119-1.jpg
    Screenshot_20181119-1.jpg
    93.8 KB · Views: 4,815
  • Screenshot_20181119-2.png
    Screenshot_20181119-2.png
    78 KB · Views: 4,618
  • Screenshot_20181119-3.jpg
    Screenshot_20181119-3.jpg
    51.1 KB · Views: 4,376
  • Screenshot_20181119-4.png
    Screenshot_20181119-4.png
    64.3 KB · Views: 4,156
  • Screenshot_20181119-5.png
    Screenshot_20181119-5.png
    66.3 KB · Views: 3,974
  • Screenshot_20181119-6.png
    Screenshot_20181119-6.png
    85.3 KB · Views: 3,927
Last edited:

windbells

Senior Member
Sep 11, 2017
134
217
Download
https://mega.nz/#F!naRFGQDR!d9Uv-Maw56vyYsphAj00Kw

Known issues
1. APN needs setting manually to use CDMA data network. (?, not sure, need more tests).
2. Selinux status is on permissive status.

Root
1. download all files under superuser
2. reboot to fastboot, flash boot.img
Code:
fastboot flash boot boot.img
3. boot into recovery, mount /system, push su binary and superuser.rc to your phone
Code:
adb push su /system/xbin/su
adb push superuser.rc /system/etc/init/
4. reboot

Gapps
select one way of below
1. flash MindTheGapps-9.0.0-arm-20181119.zip
2. download OpenGapps Pico (Not support other version due to limited space of /system
upload gapps-config.txt and opengapps zip file to the same folder and flash opengapps

Changelog
2019-01-01
* fixed wrong 1080p parameter in AOSP camera, both rear and front camera support 1080P record now.
* fixed wifi hotspot and usb tethering cannot open.
* fixed echo reappear after first call.
* rebase kernel, improve wakeup speed and stability.
* add percent text for offline charging.
* reimport MHL releted code, try to bring up MHL. (not tested)
* QS UI improved for small-size screen.
* keep the crypto name same with AOSP, try to make disk encryption work. (not tested, format /data and storage before encryption if too many files, or get out of memory error and system reboot).
* stop maintaining this device if no critical bug in this update.

2018-11-19
-> Upgrade to Android Pie(CAF 9.0.0), tag: LA.UM.7.2.r1-05300-sdm660.0
-> Features added:
1. Privacy Guard(with optional su support, thanks LineageOS)
2. App Firewall(data, wlan and vpn, thanks LineageOS)
3. Showing Network Speed(thanks Jon Haus, ezio84 and other commiters)
4. Launcher with icon pack support(thanks tfitts1212, maxwen, eldainosor and other commiters)​
-> Fix hidden wireless connection
-> Add DRM support (For Netflix, L3 level, not support HD and higher)
-> Try to fix echo in calls again(not tested, report if not working)


===========================================================
Android Nougat/Oreo start

Download Link:
Only twrp >= 3.2.1 works with ROM >= 20180101
https://mega.nz/#F!VKRggSoL!WAFIK45_IFKhnvlK1eyY4w

Known issues:
1. Hidden network cannot connect.
2. APN needs setting manually to use CDMA data network. (?, not sure, need more tests).
3. Not support 1080P camera record due to outdated kernel driver.
4. Selinux status is on permissive status.

Changelog:
2018-11-01
* md5sum: b957fa0274819a09fd81d2af2958cc69
* echo in calls should fix now, only tested VOIP, need more tests(headset, bluetooth etc).
* with echo fixed, an issue related ES310 chip sleeping that make battery draining fast is also fixed.
- Standby battery time estimate: > 5 days.
- Normal Screen on usage: 5~6 hours.

2018-10-21
*md5sum: 8cbfdceb23c3aa6f382f1a9a79c29004
* fix noise in headset mic

2018-10-19
* md5sum: 9304de676e0dd6428db566b072488e3f
* fix echo audio during calls
* performance tweaks, fix too hot when too many heavy background tasks, now enable all 4 cpu cores by default
* HALs and blobs changes prepare for P

2018-09-01
* md5sum: b7e60c0033b526278468a38cb00f373e
* minor updates and stability improved.
* last update as I'm going to remove all 8.1 source, source will update to github as soon as possible.
* I will try to bring up pie once I get free, but no guarantee and no ETAs.

2018-06-16
* md5sum: da677903b4c5092d57e91f0dc2210a90 aosp-caf-8.1.0-20180616-aries-arch.zip
* bring back Privacy Guard and synchronize to latest LineageOS version.
* fixed sometime the device is too hot while too many background apps and optimize screen-on battery usage.
full battery usage estimated:
>5 hours online surfing with wifi opened(moderate usage, no gaming).
2 days standby (45-50 hours).
3-4 hours(?) using cellular data.


2018-05-06
* md5sum:
- b7121d3f95e91350722da01c8dfdea22 aosp-caf-8.1.0-20180506-aries-arch.zip
- 6988262c9f99c00371a1bc238ffbdf26 aosp-caf-8.1.0-20180506-aries-arch-gapps.zip
* fix gps and compass broken in last build.
* revert media profile changes so screen record now works normally.
* bring back Xiaomi usb otg driver. (Not tested, tell me if it not work)
* enable doze correctly.
* reduce battery usage when WIFI turned off.
* thermal and some kernel tweaks.

2018-04-20
* md5sum: e8fc7f3793d820f279580726f2c34e93 aosp-caf-8.1.0-20180420-aries-arch.zip
* this version is NOT compatible with previous ROM, SO CLEAN DATA/CACHE OPERATION IS REQUIRED.
* switch to CAF source(tag: LA.UM.6.6.r1-07200-89xx.0) instead of Google generic repository. This build contains Qualcomm specific enhancements plus some comunity optimizations, so it gives some improved performanence to this old device (especially pictures slipping and system animation). Thanks to AOSPA and AOSP-CAF.
* fix WiFi hotspot, tethering should work fine now.
* fix audio call volume cannot adjust.
* add firewall(app wifi/data restriction) support to oreo(App info -> Data Usage -> Disable all cellular data access/Disable all Wi-FI data access). Port from Lineage/CM, thanks again for their great works.
* add multiple pointers patch.
* add fake signature patch, for some MicroG users.
* update media profiles, remove 1080p option from camera records.
* now the build type is "user", which will disable adb debugging by default, "adb root" also disabled.
* repatch telephony framework for CDMA users(NOT TESTED).
* it's the final update if no serious issues(this update is to resolve the call volume issue).

2018-03-17:
* This version is expected to be the final version and wouldn't update anymore if no critical issues. I hope you can enjoy this one without obstacles. Source will be updated to github in a few days.
* update to 8.1.0_r17
* update audio configuration files so audio should work flawlessly now.
* update power hal and tweak cpu scheduler, try to make a better battery life.
* remove Privacy Guard (seem have unnormal power usage when data connection opened), revert Apps data path tweak, remove addtion Internet/Sensor permissions(it makes Google Setup Wizard FC).
* fix device hangs while trying power on machine in offline charging mode.

2018-01-27:
(NOTE: new kernel might have problems with some device, please attach your logcat, dmesg and top command result(adb shell -> top -> take a screenshot), plus you device model)
(NOTE 2: If you have installed gapps and don't want to clean data, flash gapps after flash the new ROM, before your first boot, or some app will get a FC, unless reinstall the app)
* Revert to old audio hal so that calling audio works with old configs
* Fix some storage access permission issues. Move all Apps data to /sdcard/AppData, so external storage path that apps got will be /sdcard/AppData/<package name>/

2018-01-19:
* fix system crash when openning gps with IPv6 network
* fix the audioserver crash when using a headphone
* fix app crash when not granted WRITE_STORAGE permission

2018-01-17:
* update to 8.1.0_r7
* switch to new kernel base. After almost one month dialy use test, I decide to abandon the old kernel tree and enable new kernel source tree, so Xiaomi aries now share the same kenel base code with sony huashan(https://github.com/AdrianDC/android_kernel_sony_msm8960t). Adrian DC have been working on AOSP/LineageOS of Sony msm8960 platform for a long time, he also is a recognized and trusted developer of LineageOS. With new kernel, I believe it will be more quickly to bring a features-ready and more stable aries ROM to you. Thanks @AdrianDC for his great work.
* switch to new audio/display/media HAL, report if you have any trouble to aduio, video play and records.
* new kernel support new auto sleep and wakeup (instead of earlysuspend), and many other changes to improve deep-sleep in oreo, so it will be a better battery life when phone is idle.
* adopt some code from Lineage to support CDMA data connection. if you want to report RIL releated issues, please attach both full logcat(adb logcat) and radio logcat(adb logcat -b radio)
* fix power menu not shows correctly
* fix some app cannot open again after force stop
* make lockscreen swipe more easier to unlock
* magisk now can boot properly

2018-01-01:
* fix UI performance. (NEED MORE TESTS)
* port Privacy Guard to aosp-8.1, thanks to team Lineage/CM/SlimROMs (Settings > App & notifications > Privacy Guard)
* superuser now is optional
* isolate app data/files on /sdcard (app now saved data to /sdcard/<package name>/ install of /sdcard/, It make external storage root more neat and more secure in some cases)
* fix alarm not work
* disable permission review, or permissions will reset after every updates
* disable liveshot in case of crashing when touched in video record mode
* secondary try to fix CDMA data connection. (Need feedbacks, plus model)
* fix setting lockscreen pin/pattern nonresponse
* update battery data, try to fix battery value reset. (NEED TEST and FEEDBACK)
* update twrp to 3.2.1

2017-12-09: (Download from here #65)
* Update to 8.1.0_r1
* Enhance security and privacy settings (many thanks to thestinger and CopperheadOS)
** I have added Internet permission and enable permission review for app with targetSdkVersion < 23, If you are not a clean installation, some app might get a FC. Reinstall app and give the permissions(PHONE OR INTERNET) can solve problem.
* Fix Mi2s 32gb with 13MP camera. (NEED TEST)
* Revert kernel gpu driver. Try to solve UI unsmoothly sometime. (NEED FEEDBACK)
* Add CDMA dummy APN patches. Try to solve data connection with CDMA network. (NEED TEST)
* Use old power and charger driver. It works better.

2017-11-19
* initial 7.1.2 and 8.0
Download: OUTDATED! FIND UPDATES FROM CHANGELOG
twrp recovery 3.1.1: https://mega.nz/#!RewDnB5Z!1JaIxJ2-wQpd9BmY1MoqIrt0z9rI2pLg6lKL5Z2lsKg
aosp 8.0.0: https://mega.nz/#!FHpTRCQL!j_Z-XirV12iPhxmnIAWA33W5HB1ca0Mep8lsKSiB10g
aosp 7.1.2: https://mega.nz/#!hTIgGT5a!gfap1JU95VeyfYauYcvlaR-VnHwRLRzklLENMwS2jgs
 
Last edited:

ziiimy

New member
Nov 20, 2017
1
0
lol,cdma 1x can be load ,but network doesn't

---------- Post added at 02:38 PM ---------- Previous post was at 02:35 PM ----------

---------- Post added at 02:41 PM ---------- Previous post was at 02:38 PM ----------

Good work. I'm working on mi2 as well, can I use your rom as a base for fixing the ril? thanks!

huo zhuo huda
 

QiuJiayang

New member
Nov 21, 2017
1
1
我是中国用户,小米2太厉害了,居然能用上功能正常的安卓8.0,感谢xda论坛
I am a Chinese user, millet 2 is too powerful, actually able to use the normal function of Android 8.0, thank xda forum
 
  • Like
Reactions: kagec

windbells

Senior Member
Sep 11, 2017
134
217
UI is very unsmooth. After installing gapps got 'setup wizard has stoped' error. Can it be fixed?

if you open logcat and got error like this:
Code:
I zygote  : Rejecting re-init on previously-failed class java.lang.Class<com.google.android.gms.org.conscrypt.NativeCrypto>: java.lang.UnsatisfiedLinkError: dalvik.system.PathClassLoader[DexPathList[[zip file "/system/framework/com.android.media.remotedisplay.jar", zip file "/system/framework/com.android.location.provider.jar", zip file "/system/priv-app/PrebuiltGmsCore/PrebuiltGmsCore.apk"],nativeLibraryDirectories=[/system/priv-app/PrebuiltGmsCore/lib/arm, /system/lib, /system/vendor/lib, /system/lib, /system/vendor/lib]]] couldn't find "libgmscore.so"
this is a temporary solution.
1. extract Phonesky.apk and PrebuiltGmsCore.apk from Core/vending-arm.tar.lz Core/gmscore-arm.tar.lz (320/priv-app/PrebuiltGmsCore) in opengapps zip file.
2. extract Phonesky.apk to Phonesky and extract PrebuiltGmsCore.apk to PrebuiltGmsCore use any zip software, or you can run:
Code:
unzip PrebuiltGmsCore.apk -d PrebuiltGmsCore
unzip Phonesky.apk -d Phonesky

the Phonesky and PrebuiltGmsCore folders should like this:
Code:
 ➜ ls Phonesky
AndroidManifest.xml
android-support-multidex.version.txt
assets
build-data.properties
classes2.dex
classes.dex
com
lib
libs
META-INF
org
res
resources.arsc
Code:
 ➜ ls PrebuiltGmsCore
AndroidManifest.xml
assets
build-data.properties
classes2.dex
classes3.dex
classes4.dex
classes.dex
com
googledata
HACKED-META-INF
lib
META-INF
org
res
resources.arsc
3. then, push the lib to your phone by adb:
Code:
adb root && adb remount rw
adb shell mkdir -p /system/priv-app/PrebuiltGmsCore/lib/arm/
adb push PrebuiltGmsCore/lib/armeabi-v7a/* /system/priv-app/PrebuiltGmsCore/lib/arm/
adb shell mkdir -p /system/priv-app/Phonesky/lib/arm/
adb push Phonesky/lib/armeabi-v7a/* /system/priv-app/Phonesky/lib/arm/
it should works now, tested with gapps nano.

It seem like an uncorrectly odex/install problem, I need more time to investigate it.
 
Last edited:
  • Like
Reactions: gollum82

windbells

Senior Member
Sep 11, 2017
134
217
Should i do this after installing gapps or do it instead of installing gapps? What about ui smoothness?
After installing and reboot to system.

If you are still facing ui Smith less after solve the gapps opening, try clean data and cache, if still exists, please attach logcat log and describe you r usecase in a more detailed way, and also, what's your phone model name? 2? 2S? 2S with 13m camera?
 

joe820730

Member
May 21, 2013
35
3
I just tried on my Mi2S 16G with 8MP camera,
Almost everything works well, but UI is very unsmooth.
I have 32GB with 13MP camera, but this is my daily use phone, so I don't want try on it.

Update:
I tried to grab logcat and dmesg to try to find the reason about UI unsmooth.
But the information is too much that I have no idea to find...
So I upload them to my mega.co.nz
logcat:
https://mega.nz/#!KYMVHByT!Mytx_PG8BqhOrMauhr-NtcsqO7Qw7RIw7i2ydJsNj-4
dmesg:
https://mega.nz/#!6UF30KRS!4qzlNs0UFMBHacNX_WsJIrlVmINNsqzVHCYAdkvkaAI
 
Last edited:

-Tex-

Senior Member
Jan 19, 2007
152
11
Dnipro
After installing and reboot to system.

If you are still facing ui Smith less after solve the gapps opening, try clean data and cache, if still exists, please attach logcat log and describe you r usecase in a more detailed way, and also, what's your phone model name? 2? 2S? 2S with 13m camera?
I will try tomorrow. My phone model mi2sc 16 Gb with 8m camera.
 

windbells

Senior Member
Sep 11, 2017
134
217
I just tried on my Mi2S 16G with 8MP camera,
Almost everything works well, but UI is very unsmooth.
I have 32GB with 13MP camera, but this is my daily use phone, so I don't want try on it.

It seems that my kernel not working on 13MP camera, according to the feedback.
I think Mi2S with 8MP camera should work fine as I using 2SC 16GB with 8MP camera. I think it's really smooth after had a data cleaned boot. Even after I installed the opengapps, it's smooth as usual. Can you describe you usecase or record a short video that shows UI stucked.
 

Top Liked Posts

  • There are no posts matching your filters.
  • 55
    Although the Xiaomi Mi 2 is almost five years old, and it seems there would never be a working nougat/oreo ROM after ivan stopped the development of his AOSP project, but it's not the truth. As the issue of light and proximity sensor have been fixed, I think most of the system components are stable enough for dialy usage after my couple days tests, so I decide to release the AOSP 8.0.0 to you today.

    Install:
    Please make sure your phone haven't modified the stock partition. It means my rom only work with the latest miui-dev partition table, so you have to Download lastest Mi 2 Developer tar file and flash using fastboot before install my oreo/nougat ROM . This process will earse all data on you phone, so backup all data before you getting start.
    1. flash stock miui developer by fastboot update (http://en.miui.com/a-234.html)
    2. flash twrp recovery use fastboot and reboot
    3. hold power and volume up key to boot into recovery mode
    4. install oreo or nougat ota package
    5. wipe data and cache (you have to do this even if you are using ivan's aosp marshmallow/lollipop)

    Working:
    (Note: I use Mi 2SC with CDMA network support, but I don't have an available CDMA SIM card right now for test, so users with CDMA network might have trouble with RIL)
    - Audio (bluetooth headset not test)
    - Bluetooth
    - Camera
    - RIL
    - WIFI
    - FM
    - Sensors
    - GPS

    Credit/Thanks
    Special thanks to ivan for the initial device source tree and his preview works on Mi2 device.
    Many Thanks to @AdrianDC @Ziyan for their great work to bring Android Oreo to MSM8960 platform.
    Also thanks to @m11kkaa (M1cha) @zaclimon for their projects.

    - Xiaomi Opensource Project
    - Google Android Opensource Project
    - Team LineageOS/CyanogenMod
    - Team Omnirom and Team TWRP recovery
    - Team Unlegacy Android

    Source:
    device tree: https://github.com/windbellx/android_device_xiaomi_aries
    https://github.com/windbellx/android_device_xiaomi_msm8960-common
    kernel source: https://github.com/windbellx/android_kernel_xiaomi_msm8960
    vendor: https://github.com/windbellx/proprietary_vendor_xiaomi

    Screenshot:
    23
    Download
    https://mega.nz/#F!naRFGQDR!d9Uv-Maw56vyYsphAj00Kw

    Known issues
    1. APN needs setting manually to use CDMA data network. (?, not sure, need more tests).
    2. Selinux status is on permissive status.

    Root
    1. download all files under superuser
    2. reboot to fastboot, flash boot.img
    Code:
    fastboot flash boot boot.img
    3. boot into recovery, mount /system, push su binary and superuser.rc to your phone
    Code:
    adb push su /system/xbin/su
    adb push superuser.rc /system/etc/init/
    4. reboot

    Gapps
    select one way of below
    1. flash MindTheGapps-9.0.0-arm-20181119.zip
    2. download OpenGapps Pico (Not support other version due to limited space of /system
    upload gapps-config.txt and opengapps zip file to the same folder and flash opengapps

    Changelog
    2019-01-01
    * fixed wrong 1080p parameter in AOSP camera, both rear and front camera support 1080P record now.
    * fixed wifi hotspot and usb tethering cannot open.
    * fixed echo reappear after first call.
    * rebase kernel, improve wakeup speed and stability.
    * add percent text for offline charging.
    * reimport MHL releted code, try to bring up MHL. (not tested)
    * QS UI improved for small-size screen.
    * keep the crypto name same with AOSP, try to make disk encryption work. (not tested, format /data and storage before encryption if too many files, or get out of memory error and system reboot).
    * stop maintaining this device if no critical bug in this update.

    2018-11-19
    -> Upgrade to Android Pie(CAF 9.0.0), tag: LA.UM.7.2.r1-05300-sdm660.0
    -> Features added:
    1. Privacy Guard(with optional su support, thanks LineageOS)
    2. App Firewall(data, wlan and vpn, thanks LineageOS)
    3. Showing Network Speed(thanks Jon Haus, ezio84 and other commiters)
    4. Launcher with icon pack support(thanks tfitts1212, maxwen, eldainosor and other commiters)​
    -> Fix hidden wireless connection
    -> Add DRM support (For Netflix, L3 level, not support HD and higher)
    -> Try to fix echo in calls again(not tested, report if not working)


    ===========================================================
    Android Nougat/Oreo start

    Download Link:
    Only twrp >= 3.2.1 works with ROM >= 20180101
    https://mega.nz/#F!VKRggSoL!WAFIK45_IFKhnvlK1eyY4w

    Known issues:
    1. Hidden network cannot connect.
    2. APN needs setting manually to use CDMA data network. (?, not sure, need more tests).
    3. Not support 1080P camera record due to outdated kernel driver.
    4. Selinux status is on permissive status.

    Changelog:
    2018-11-01
    * md5sum: b957fa0274819a09fd81d2af2958cc69
    * echo in calls should fix now, only tested VOIP, need more tests(headset, bluetooth etc).
    * with echo fixed, an issue related ES310 chip sleeping that make battery draining fast is also fixed.
    - Standby battery time estimate: > 5 days.
    - Normal Screen on usage: 5~6 hours.

    2018-10-21
    *md5sum: 8cbfdceb23c3aa6f382f1a9a79c29004
    * fix noise in headset mic

    2018-10-19
    * md5sum: 9304de676e0dd6428db566b072488e3f
    * fix echo audio during calls
    * performance tweaks, fix too hot when too many heavy background tasks, now enable all 4 cpu cores by default
    * HALs and blobs changes prepare for P

    2018-09-01
    * md5sum: b7e60c0033b526278468a38cb00f373e
    * minor updates and stability improved.
    * last update as I'm going to remove all 8.1 source, source will update to github as soon as possible.
    * I will try to bring up pie once I get free, but no guarantee and no ETAs.

    2018-06-16
    * md5sum: da677903b4c5092d57e91f0dc2210a90 aosp-caf-8.1.0-20180616-aries-arch.zip
    * bring back Privacy Guard and synchronize to latest LineageOS version.
    * fixed sometime the device is too hot while too many background apps and optimize screen-on battery usage.
    full battery usage estimated:
    >5 hours online surfing with wifi opened(moderate usage, no gaming).
    2 days standby (45-50 hours).
    3-4 hours(?) using cellular data.


    2018-05-06
    * md5sum:
    - b7121d3f95e91350722da01c8dfdea22 aosp-caf-8.1.0-20180506-aries-arch.zip
    - 6988262c9f99c00371a1bc238ffbdf26 aosp-caf-8.1.0-20180506-aries-arch-gapps.zip
    * fix gps and compass broken in last build.
    * revert media profile changes so screen record now works normally.
    * bring back Xiaomi usb otg driver. (Not tested, tell me if it not work)
    * enable doze correctly.
    * reduce battery usage when WIFI turned off.
    * thermal and some kernel tweaks.

    2018-04-20
    * md5sum: e8fc7f3793d820f279580726f2c34e93 aosp-caf-8.1.0-20180420-aries-arch.zip
    * this version is NOT compatible with previous ROM, SO CLEAN DATA/CACHE OPERATION IS REQUIRED.
    * switch to CAF source(tag: LA.UM.6.6.r1-07200-89xx.0) instead of Google generic repository. This build contains Qualcomm specific enhancements plus some comunity optimizations, so it gives some improved performanence to this old device (especially pictures slipping and system animation). Thanks to AOSPA and AOSP-CAF.
    * fix WiFi hotspot, tethering should work fine now.
    * fix audio call volume cannot adjust.
    * add firewall(app wifi/data restriction) support to oreo(App info -> Data Usage -> Disable all cellular data access/Disable all Wi-FI data access). Port from Lineage/CM, thanks again for their great works.
    * add multiple pointers patch.
    * add fake signature patch, for some MicroG users.
    * update media profiles, remove 1080p option from camera records.
    * now the build type is "user", which will disable adb debugging by default, "adb root" also disabled.
    * repatch telephony framework for CDMA users(NOT TESTED).
    * it's the final update if no serious issues(this update is to resolve the call volume issue).

    2018-03-17:
    * This version is expected to be the final version and wouldn't update anymore if no critical issues. I hope you can enjoy this one without obstacles. Source will be updated to github in a few days.
    * update to 8.1.0_r17
    * update audio configuration files so audio should work flawlessly now.
    * update power hal and tweak cpu scheduler, try to make a better battery life.
    * remove Privacy Guard (seem have unnormal power usage when data connection opened), revert Apps data path tweak, remove addtion Internet/Sensor permissions(it makes Google Setup Wizard FC).
    * fix device hangs while trying power on machine in offline charging mode.

    2018-01-27:
    (NOTE: new kernel might have problems with some device, please attach your logcat, dmesg and top command result(adb shell -> top -> take a screenshot), plus you device model)
    (NOTE 2: If you have installed gapps and don't want to clean data, flash gapps after flash the new ROM, before your first boot, or some app will get a FC, unless reinstall the app)
    * Revert to old audio hal so that calling audio works with old configs
    * Fix some storage access permission issues. Move all Apps data to /sdcard/AppData, so external storage path that apps got will be /sdcard/AppData/<package name>/

    2018-01-19:
    * fix system crash when openning gps with IPv6 network
    * fix the audioserver crash when using a headphone
    * fix app crash when not granted WRITE_STORAGE permission

    2018-01-17:
    * update to 8.1.0_r7
    * switch to new kernel base. After almost one month dialy use test, I decide to abandon the old kernel tree and enable new kernel source tree, so Xiaomi aries now share the same kenel base code with sony huashan(https://github.com/AdrianDC/android_kernel_sony_msm8960t). Adrian DC have been working on AOSP/LineageOS of Sony msm8960 platform for a long time, he also is a recognized and trusted developer of LineageOS. With new kernel, I believe it will be more quickly to bring a features-ready and more stable aries ROM to you. Thanks @AdrianDC for his great work.
    * switch to new audio/display/media HAL, report if you have any trouble to aduio, video play and records.
    * new kernel support new auto sleep and wakeup (instead of earlysuspend), and many other changes to improve deep-sleep in oreo, so it will be a better battery life when phone is idle.
    * adopt some code from Lineage to support CDMA data connection. if you want to report RIL releated issues, please attach both full logcat(adb logcat) and radio logcat(adb logcat -b radio)
    * fix power menu not shows correctly
    * fix some app cannot open again after force stop
    * make lockscreen swipe more easier to unlock
    * magisk now can boot properly

    2018-01-01:
    * fix UI performance. (NEED MORE TESTS)
    * port Privacy Guard to aosp-8.1, thanks to team Lineage/CM/SlimROMs (Settings > App & notifications > Privacy Guard)
    * superuser now is optional
    * isolate app data/files on /sdcard (app now saved data to /sdcard/<package name>/ install of /sdcard/, It make external storage root more neat and more secure in some cases)
    * fix alarm not work
    * disable permission review, or permissions will reset after every updates
    * disable liveshot in case of crashing when touched in video record mode
    * secondary try to fix CDMA data connection. (Need feedbacks, plus model)
    * fix setting lockscreen pin/pattern nonresponse
    * update battery data, try to fix battery value reset. (NEED TEST and FEEDBACK)
    * update twrp to 3.2.1

    2017-12-09: (Download from here #65)
    * Update to 8.1.0_r1
    * Enhance security and privacy settings (many thanks to thestinger and CopperheadOS)
    ** I have added Internet permission and enable permission review for app with targetSdkVersion < 23, If you are not a clean installation, some app might get a FC. Reinstall app and give the permissions(PHONE OR INTERNET) can solve problem.
    * Fix Mi2s 32gb with 13MP camera. (NEED TEST)
    * Revert kernel gpu driver. Try to solve UI unsmoothly sometime. (NEED FEEDBACK)
    * Add CDMA dummy APN patches. Try to solve data connection with CDMA network. (NEED TEST)
    * Use old power and charger driver. It works better.

    2017-11-19
    * initial 7.1.2 and 8.0
    Download: OUTDATED! FIND UPDATES FROM CHANGELOG
    twrp recovery 3.1.1: https://mega.nz/#!RewDnB5Z!1JaIxJ2-wQpd9BmY1MoqIrt0z9rI2pLg6lKL5Z2lsKg
    aosp 8.0.0: https://mega.nz/#!FHpTRCQL!j_Z-XirV12iPhxmnIAWA33W5HB1ca0Mep8lsKSiB10g
    aosp 7.1.2: https://mega.nz/#!hTIgGT5a!gfap1JU95VeyfYauYcvlaR-VnHwRLRzklLENMwS2jgs
    9
    Download Link:
    Only twrp >= 3.2.1 works with ROM >= 20180101
    https://mega.nz/#F!VKRggSoL!WAFIK45_IFKhnvlK1eyY4w

    How to ROOT:
    Flash the lastest Magisk.

    Known issues:
    1. Hidden network cannot connect.
    2. APN needs setting manually to use CDMA data network. (?, not sure, need more tests).
    3. Not support 1080P camera record due to outdated kernel driver.
    4. Selinux status is permissive.

    Changelog:
    2018-09-01
    * md5sum: b7e60c0033b526278468a38cb00f373e
    * minor updates and stability improved.
    * last update as I'm going to remove all 8.1 source, source will update to github as soon as possible.
    * I will try to bring up pie once I get free, but no guarantee and no ETAs.
    8
    Download Link:
    https://mega.nz/#F!VKRggSoL!WAFIK45_IFKhnvlK1eyY4w

    How to ROOT:
    1. download su and superuser.rc in superuser folder
    2. run command:
    Code:
    adb root && adb remount rw
    adb push superuser.rc /system/etc/init/
    adb push su /system/xbin/su
    adb shell chmod 755 /system/xbin/su
    3. reboot
    4. It is no need to install Superuser.apk or Supersu.apk. App root control was built in Privacy Guard.
    5. Developer options > root access > Disabled can disable root temporarily

    Changelog:

    2018-01-17:
    * update to 8.1.0_r7
    * switch to new kernel base. After almost one month dialy use test, I decide to abandon the old kernel tree and enable new kernel source tree, so Xiaomi aries now share the same kenel base code with sony huashan(https://github.com/AdrianDC/android_kernel_sony_msm8960t). Adrian DC have been working on AOSP/LineageOS of Sony msm8960 platform for a long time, he also is a recognized and trusted developer of LineageOS. With new kernel, I believe it will be more quickly to bring a features-ready and more stable aries ROM to you. Thanks @AdrianDC for his great work.
    * switch to new audio/display/media HAL, report if you have any trouble to aduio, video play and records.
    * new kernel support new auto sleep and wakeup (instead of earlysuspend), and many other changes to improve deep-sleep in oreo, so it will be a better battery life when phone is idle.
    * adopt some code from Lineage to support CDMA data connection. if you want to report RIL releated issues, please attach both full logcat(adb logcat) and radio logcat(adb logcat -b radio)
    * fix power menu not shows correctly
    * fix some app cannot open again after force stop
    * make lockscreen swipe easier to unlock
    * magisk now can boot properly
    8
    Download Link:
    Only twrp >= 3.2.1 works with ROM >= 20180101
    https://mega.nz/#F!VKRggSoL!WAFIK45_IFKhnvlK1eyY4w

    How to ROOT:
    Flash lastest Magisk.

    Old rom with privacy guard:
    1. download su and superuser.rc in superuser-old folder
    2. run command:
    Code:
    adb root && adb remount rw
    adb push superuser.rc /system/etc/init/
    adb push su /system/xbin/su
    adb shell chmod 755 /system/xbin/su
    3. reboot
    4. It is no need to install Superuser.apk or Supersu.apk. App root control was built in Privacy Guard.
    5. Developer options > root access > Disabled can disable root temporarily

    Known issues:
    1. Not support 1080P video record due to outdated kernel camera driver.
    2. CDMA network not working on some device.
    3. Hidden network cannot connect.
    4. Flashlight in stock camera cannot open manually (always on mode not work)
    5. WiFi hostpot(tethering) not work.
    6. Selinux is in permission status, adb enable by default

    Changelog:
    2018-03-17:
    * This version is expected to be the final version and wouldn't update anymore if no high issues. I hope you can enjoy this one without obstacles. Source will be updated to github in a few days.
    * update to 8.1.0_r17
    * update audio configuration files so audio should work flawlessly now.
    * update power hal and tweak cpu scheduler, try to make a better battery life.
    * remove Privacy Guard (seem have unnormal power usage when data connection opened), revert Apps data path tweak, remove addtion Internet/Sensor permissions(it makes Google Setup Wizard FC).
    * fix device hangs while trying power on machine in offline charging mode.