yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi 2] dava0086:
Hello Windbells,Thnx 4 your great work!Your package seems prety good now!
[Xiaomi Mi 2] 落笔成酌:
It seems to have some problems with several magisk modules. My 2s can't reboot unless i uninstall certain modules. Is there any chance to fix that?:svetius:Even not I will still use this rom:svetius:
[Xiaomi Mi 2] windbells:
There is nothing I can do. Contact the module developers.
[Xiaomi Mi 2] windbells:
Latest kernel and devices source have been updated to github.
[Xiaomi Mi 2] Koleykus:
Did anyone manage to pass safetynet with this rom?
[Xiaomi Mi 2] _Roysten:
Thank you so much for your work! I've been using this ROM for a couple days now and so far no issues at all :good: Am I correct in thinking that you combined code from several devices to get it to work? How do you know what sources to use, and how do you debug the device? I have tried to develop some ROMs myself, but I never understood how ROM developers know what sources to use, and what commits to cherrypick.
[Xiaomi Mi 2] windbells:
Yes, I picked some changes from other devices(mako and huashan mostly, they6 are same msm8960/apq8064 platform and well maintained).

Debug? Print logs (logcat/dmesg), sometime you have to use gdb.

How do I know those commits work? emmm, the only things I can tell is get through the docs/sources/commits and try, compare the logs and do it again.
[Xiaomi Mi 2] yanglw:
Thank you so much for your work!

I found some problems during use.

1. USB debugging starts automatically. Even if it is turned off manually, it will still be on after the device is restarted.

2. When setting the screen lock(PIN), the phone is cotton, about 1 minutes. Clearing lock is also the same.

3. Turn off the device manually, the phone probability stay in the MI page.

Thanks.
[Xiaomi Mi 2] jumali95:
Hi windbells,

I have a question. I wanna push the right key layout into the rom. But sadly with the Magisk root system, adb doesn't gain root access.

The command "adb root && adb remount rw" gives me:

"Not running as root. Try "adb root" first."

Is there a way to gain root access for adb?

I already tried "adb shell" and giving the shell root access with the command "su". But that didnt help!
[Xiaomi Mi 2] fuyuan1221:
Is it possible to fix the 8.1 multi-touch problem?
[Xiaomi Mi 2] windbells:
1. USB debugging works fine on my device.

2. confirm, I forgot to patch the source.

3. Poweroff and Reboot also work well on my device.
[Xiaomi Mi 2] windbells:
Default Magisk makes the device to be a "user" system(not "userdebug"), which do not allow adb run in root, post an issue to Magisk author to find a solution.

Or you can push your file before install Magisk.
[Xiaomi Mi 2] windbells:
I am waiting upstream merging the fix. (Google might release it with next update, it might be next month, I think)
[Xiaomi Mi 2] Svadkos:
Windbells, thanks for the great work you've done.

Can you add encryption and signature spoofing for microg? Here's the patch for signature spoofing github /FreeMobileOS/android_packages_apps_GmsCore/blob/fmo-O-for-upstream/patches/android_frameworks_base-O.patch
[Xiaomi Mi 2] yanglw:
I just want disable USB debugging. After I disable USB debugging, reboot the device and USB debugging will be enabled automatically.
[Xiaomi Mi 2] torukk:
guys, this might interest some of you:

bugers released his CM12.1 ROM with only one fix applied for the bug, which was causing crashing new apps built with some recent android studio, so application updates are now woking again
[Xiaomi Mi 2] windbells:
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. CDMA data connection not working on some device. (?, not sure, need test).

3. Selinux status is permissive.

Changelog:

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).
[Xiaomi Mi 2] LaiCORE:
Hi, [MENTION=8544718]windbells[/MENTION]

thanks for the work you've done

In the new version I have after connecting to WIFI point, it is written that there is no Internet.
[Xiaomi Mi 2] NightHeron:
Thanks [MENTION=8544718]windbells[/MENTION] for the effort, for everything,

Also a question to all you, I have found out that the phone doesn't fall into deep sleep, is it fixed in this version?

I tried 8.1 mokee, but it was awful and buggy, not as good as 7.1 from mokee.

---------- Post added at 08:34 PM ---------- Previous post was at 08:33 PM ----------

Thanks [MENTION=8544718]windbells[/MENTION] for the effort, for everything,

Also a question to all you, I have found out that the phone doesn't fall into deep sleep, is it fixed in this version?

I tried 8.1 mokee, but it was awful and buggy, not as good as 7.1 from mokee.
[Xiaomi Mi 2] windbells:
If you can connect to the internet without troubles, it means your network has problems connecting to default Android captive portal server.
[Xiaomi Mi 2] windbells:
If the phone cannot fall into deep sleep, install some tools to kill apps after screen off.
[Xiaomi Mi 2] LaiCORE:
On previous versions of the ROM(AOSP) and on MIUI ROM, the phone connected to this WIFI point (same like screenshot) without any problems

And what about Doze system?

And it's strange that on the official MIUI ROM the battery discharge is not so strong
[Xiaomi Mi 2] dava0086:
Hello Windbells,

I'm using the package you released on 8.4.20. While using this package I have found several problems below:

*It seems that compass doesn't work properly.

*It seems that OTG doesn't work properly either.
[Xiaomi Mi 2] windbells:
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. CDMA data connection not working on some device. (?, not sure, need test).

3. Not support 1080P camera record due to outdated kernel driver.

4. Selinux status is permissive.

Changelog:

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.
[Xiaomi Mi 2] windbells:
1. enable adb and run

adb shell "settings get global captive_portal_https_url"
adb shell "settings get global captive_portal_http_url"

attach your output

2. Doze should enable in new build, please have a try and test again.

Official MIUI is based Android 5.0.2, it means libs(sensor, camera blobs etc) and kernel is not target for Android 8.x. We have done lots of tweaks to make all things run on oreo, some changes are so ugly indeed, because we don't have the source code, and our kernel branch is 3.4.x, which is far outdated to mainline(4.4.x to oreo), we have to do lots of things to make it run on new Android way, and more things have to be done for more optimization, and the bad news that maybe is worst: expert developers are leaving those ancient devices.
[Xiaomi Mi 2] windbells:
Try new builds and test OTG works?
[Xiaomi Mi 2] 丶Nanmu:
OTG has been able to work! If you have a follow-up version, can you build it on debug? One of the software I use needs usbdebug to remain open. I don't want to reset each reboot, or can you tell me how to keep the usbdebug in the open state?
[Xiaomi Mi 2] windbells:
unpack boot.img, remove file init.qcom.usb.sh, repack boot image, flash it by 'sudo fastboot flash boot new-boot.img'
[Xiaomi Mi 2] trewq1:
Hidden wifi is useful for network security...
[Xiaomi Mi 2] akarin1:
Mi 2SC with the latest build. (2018-05-06)

I don't have a CDMA Sim card so I can't test the CDMA network, but someone else may help you test it though.

1. UI is smooth.

2. OTG seems work.

3. Compass seems work.

4. GPS seems work, although it takes a few minutes to find satellites.

5. An UI bug in Chinese when handling permission requests: [IMG="UI bug"]https://i.loli.net/2018/05/08/5af11b66dc515.png[/IMG]

6. Sometimes it can't connect to computer (reboot can fix it).

7. Can't test the WiFi battery issue because it turns on automatically (I don't know why because I just install 5 apps without this behavior).

By the way, this ROM is very close to perfect. Almost everything works well, but I want a ROM with more customization options(e.g. it's not convenient to take a screenshot now).

I try to flash Xposed framework (Oreo-beta3, also try the Magisk-modified version) but it doesn't work.

So would you build a ResurrectionRemix-Oreo after finish this ROM please? Thank you very much~
[Xiaomi Mi 2] windbells:
Thanks for your feedback.

5. Confirm. I will have some investigations when I'm free.

6. adb and mtp are all work fine on my device with my computer(Linux, not sure about Windows)

No. I'm afraid not.

But I have an idea about trying to introduce other Nexus 4 ROMs to Xiaomi Mi2 by replacing vendor blobs and repacking system image to convert a mako ROM to aries's. It's just an idea and needs lots of works to do to get all things run well, I will go to investigate it when I got enough time, so don't ask me ETA.
[Xiaomi Mi 2] dava0086:
OTG works well now. Thank you.
[Xiaomi Mi 2] 丶Nanmu:
I can't find a tool to decompress the.Img format on Android, because I have no computer. Can you help me with this job? Thank you
[Xiaomi Mi 2] kazin08:
Hi, i'm using the march build and i cant install Netflix from google play, anyome have this issue?

Thanks, its an awsome rom!
[Xiaomi Mi 2] jumali95:
What Screen on Times are you guys getting with the new version of the Rom?
[Xiaomi Mi 2] jacid:
Thanks,it's very well for me to use,

But I have a question:Will you build a Android P for MI2(aries) in the future?
[Xiaomi Mi 2] kagec:
thanks
[Xiaomi Mi 2] kagec:
my phone is working on CDMA SIM card,( network need setting APN) , expecting u fix other issues.thanks for your work.:good:
[Xiaomi Mi 2] oile:
With this build the UI seems fluid and I didn't seem to find any other bug in my limited testing.

My testing is in continuous wifi without sim.

But battery drains too fast in this mode.

I've installed betterbatterystats in root mode to try to know what makes the battery drain but I cannot seem to find a specific culprit.

The phone goes in deep sleep normally, with 81% of Doze idle mode time and 6% of doze interactive time.

The major kernel wakelock is sns_async_ev_wakelock 7%

Sensors seems ok too.

I hope it is useful in someways because it is a huge effort from you windbells and we strongly appreciate it, this device is still useful thanks to very few developers.

Mokee 7.1 is unusable for me because video recording is totally broken ,with this Rom instead video recording is available at 720p wich is totally fine for me
[Xiaomi Mi 2] kunan Imran:
Sir, Please release new update rom with more customizing features. I use your rom build of 6 May,2018. Sir , Please.
[Xiaomi Mi 2] jumali95:
What Screen on Times are you getting? Are they better then the MIUI stock ROM?
[Xiaomi Mi 2] GeekZJK:
I have the same issue. I found that in the older build(without CAF version) I use the rom with ivan's kernel(built by Windbells) the issue didn't exist. But in the latest build with CAF I found that the ivan's kernel can't work(I got a bootloop). So maybe we can ask windbells to help us compile an ivan's kernel for the latest rom. I think everything will work perfectly then.
[Xiaomi Mi 2] joe820730:
Ivan's kernel source is too old, and I think Ivan solved some issue but he doesn't release these code.

By the way, I also have Wi-Fi battery draining issue in my 32gb device.

And I can't find any useful information with adb logcat and /proc/kmsg.
[Xiaomi Mi 2] GeekZJK:
Well after I use it for four days I found the battery calculation is actually accurate. ( I gave it a full charge and used it till 0%, than I power on again the battery level went to 50%, then continue to use it till 0%. Just repeat this.) After several times the battery calculation works normally. But I found that even when it's sleeping the battery level goes down quickly. I also use the kernel adiutor to limit the cpu frequency and it's now better then before. But still, the battery runs out quickly.

Also, I fount that when the screen is off, the touch buttons still works. Maybe this results in the battery issue.

BTW, I'm using a 3000mah battery.
[Xiaomi Mi 2] windbells:
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-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, see pictures below(moderate usage, no gaming).

2 days standby (45-50 hours).

3-4 hours(?) using cellular data.
[Xiaomi Mi 2] trewq1:
Battery usage error still exist on my device.

And no gapps in this rom, it's hard to install correct ly.
[Xiaomi Mi 2] stradfred:
Same for me, battery usage is correct on 100% to 85% but after, i have 85% to shutdown phone on 3 mins...
[Xiaomi Mi 2] liangyong:
SIM cards are sometimes closed. No internet.

The latest version of 2018.06.16.
[Xiaomi Mi 2] clps995202:
I think you've got a dead battery..., try switching the battery to another one.
[Xiaomi Mi 2] stradfred:
I tried on 3 different batteries, with the same result.

I said that I made a clean installation of the ROM.
[Xiaomi Mi 2] javichampi:
Great news!! I'll test the latest ROM asap. Are you planning to update your device tree on github? I want to test some tweaks and see if I can make other ROMs for our device.
[Xiaomi Mi 2] joe820730:
Awesome, this build almost perfect.

WiFi battery draining is not exist for me.

And I tried to play Fate/GO about 1 hours, everything works well.
[Xiaomi Mi 2] GeekZJK:
Thanks a billion to you windbells !

Now everything works quite perfectly on my Mi2SC 32GB device.

The battery issue no longer exists.
[Xiaomi Mi 2] LaiCORE:
[MENTION=8544718]windbells[/MENTION]

latest build is amazing! battery discharge became slower

but exists issue with micro

interlocutor hear own voice, creates an Echo effect

and not fixed with change of lines

persist.audio.vns.mode = 1
ro.qc.sdk.audio.fluencetype=none
persist.audio.fluence.voicecall=false

in build.prop
[Xiaomi Mi 2] EXSERENS:
99999 x Thanks to windbells

for enlonger lifetime to MI2
[Xiaomi Mi 2] miuifans:
battery is well
[Xiaomi Mi 2] CBpbxEcmecmBeH:
For me it's also well :) thanks [MENTION=8544718]windbells[/MENTION]
[Xiaomi Mi 2] miuifans:
Hello, Dear developer [MENTION=8544718]windbells[/MENTION] , your ROM is really great, fluency and battery are very good.

But I'm really sorry that I haven't been able to adapt to ROM's button logic for a long time.

So I have a rather bold request, I do not know whether you agree. I would like to ask, can you provide me with some replacement files to change the button logic ?

For example,remove the double click home into multitasking management, click the menu into the multitasking management, double click menu switch to the last app.

I try to extract some of the Lineage15.1's files (the directory is: system/usr/keylayout/) into Magisk module and Flash it into the phone, but I can only succeed in changing the logic of Menu, double clicking the home still enter the multitasking management interface. It's really a pity.

Or, Could you provide the Lineage15.1 button setting to the system settings? It seems to satisfy everyone.
[Xiaomi Mi 2] CBpbxEcmecmBeH:
I beg to differ.. ;)
[Xiaomi Mi 2] miuifans:
In fact, clicking the menu button to enter the app settings menu is actually not many, and using the existing button logic, sometimes clicking home is easy to double touch into multi-tasking management.

Maybe this is the way you use it, but I believe my phone has three buttons instead of just one button. And I think my phone is an Android phone, not something else.

I'm terribly sorry for offending you. :)
[Xiaomi Mi 2] CBpbxEcmecmBeH:
IMHO, this is better.

Even on MIUI, holding the menu button takes you to multitasking :).

I know of the current behaviour because of Smartisan OS and T2 (physical buttons - https://www.smartisan.com/t2/#/overview)

And you are not offending anyone. Everyone is entitled to an opinion :).
[Xiaomi Mi 2] miuifans:
All right，maybe you are a Smartisan user，I am a Xiaomi user, only this difference. :fingers-crossed:

In China, there are also some people who have obtained this ROM through some means and used this ROM.

Actually some Chinese have expressed that they are not used to or do not like such button logic. but most of them do not use xda，and in fact they rarely participate in feedback.

So maybe you are right~ :)

I'm just one of everyone，this is nothing. :D
[Xiaomi Mi 2] kunan Imran:
Hello Sir, I use your Rom build 6/16/18 . This rom is almost perfect for me. But after two week of use , It cause battery problem. Phone show battery is fully charged but after next restart it shows 47%. I replaced my battery twice. But problem keep same. So I try clean install of mokee rom and my problem is fixed. Sir please fix this issues beacause your rom is better than anyone rom.
[Xiaomi Mi 2] windbells:
New boot image for some people testing who have battery issue, please flash by fastboot and report it works or not. (extract modules.zip first, push modules folder using TWRP adb, please mount /system partition first)

sudo fastboot flash boot boot.img
adb push modules /system/vendor/lib/

https://mega.nz/#F!QfQCUAjA!cpX6JmN5rfsszOVd9asJbQ

Also someone can tell me OTG is working or not? Someone told me OTG broken again.
[Xiaomi Mi 2] windbells:
Check #253 for how to change keylayout.

AOSP doesn't support double home switching to last app, Refrence. If you want to switch to last app, simply double click HOME twice.
[Xiaomi Mi 2] miuifans:
Sorry, I am talking about double menu switching to last app , not double home. ^_^

and click menu to multitask management.

If you use your ROM, you can also click the home button 4 times switch to last app. you can try.

Do you think Google AOSP will create such troublesome operational logic?

Because this is the work of double-clicking the menu button (after Android 4.4, the menu button changed to multitask button). and you have changed the click menu to double home, so the original double menu become to click home 4 times.

In my all devices, their AOSP and all AOSP-based ROMs, After Android 4.4, their button logic all is:

Click menu: Multitask management.

Double click menu: Switch to last app.

Long click menu: Split screen.

Click home: Back to the desktop.

Double click home: Default undefined.

Long click home: Speech search, Speech assistant or Google screen search.

Click back: Return to the last step.

Double click back: Default undefined.

Long click back: Default undefined, but some ROMs can be customized to stop the current app.

Where did the app menu button go? You can see that all AOSP apps and third-party apps have settings entrance in the "…" of upper right corner, their bottom bar or their sidebar. The app menu button was eliminated on most phones.

Thanks, I tried it. but I can't change the logic of double home. Replacing these files really has no effect of the home logic, but I just want to make double home invalid.

Anyway, thank you for creating such an excellent ROM for us MI2 users.

And thank you very much for reading.
[Xiaomi Mi 2] LaiCORE:
[MENTION=8544718]windbells[/MENTION] , pla read my post, is real important

https://xdaforums.com/showpost.php?p=76861947&postcount=359

and sometimes lost mobile network
[Xiaomi Mi 2] windbells:
OK, I will apply your changes in next update, thank you.

I need bugsreport reports when mobile network lost.
[Xiaomi Mi 2] windbells:
Extract framework-res.apk, edit res/values/config.xml, change config_doubleTapOnHomeBehavior to 0, repack apk, push to your phone.

See https://github.com/aosp-mirror/plat...becd2f78/core/res/res/values/config.xml#L1151
[Xiaomi Mi 2] windbells:
Duplicated
[Xiaomi Mi 2] LaiCORE:
this bug is difficult to catch, I do not know the reasons that affect it, and how to reproduce it again

I want to wait until the microphone is repaired to continue to use the ROM and then try to catch this bug with the network
[Xiaomi Mi 2] miuifans:
Thank you very much! I will try it.
[Xiaomi Mi 2] CBpbxEcmecmBeH:
Did it work? ;)
[Xiaomi Mi 2] Harlur:
Can't add new APN, can't connect the internet by CDMA
[Xiaomi Mi 2] wangjia12366:
---------- Post added at 04:54 AM ---------- Previous post was at 04:40 AM ----------
[Xiaomi Mi 2] -Tex-:
It looks like ui rendered in 20 fps, all animations are slow with stuttering
[Xiaomi Mi 2] joe820730:
I just clean up the phone(format data and cache), and flash your rom (nougat ver.), then boot it up.

This is GPU rendering bar:

[IMG="GPU rendering"]https://i.imgur.com/FmqXjqN.png[/IMG]

Video: compare with my daily use Mi2S 32GB...

[YOUTUBE]-zMpjrluMCE[/YOUTUBE]
[Xiaomi Mi 2] Student Ma:
Thank you very much??

---------- Post added at 05:32 PM ---------- Previous post was at 05:26 PM ----------

I am a Chinese what can I do for you?
[Xiaomi Mi 2] Ja'c'k'cool:
Will you successfully install Gapps?
[Xiaomi Mi 2] windbells:
Thanks for your video and picture, I turned on GPU profile rendering on my phone as compared. Here are some pictures.

I don't expect the results are as good as your Mi2 32g's, but it's better than yours on nougat, and it has been in 60fps in most of the time.

If you have time, I would like to suggest something to you that trying to figure out what's wrong with your phone. Kernel driver? GPU driver? Or Android surface layer? Etc...
[Xiaomi Mi 2] windbells:
No, you need to extract some libs manually after flashing, follow the post at #15.
[Xiaomi Mi 2] windbells:
If you're a CDMA user or have a 13MP camera, you can help me to test something.
[Xiaomi Mi 2] joe820730:
I tried flash the latest miui(7.11.16), and reflash your rom(oreo) again, UI still unsmooth.

Any other suggestion?

By the way, UI unsmooth problem seems start from boot animation, the animation is slower than normal obviously.
[Xiaomi Mi 2] 月影叫兽:
nice