yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi 2] windbells:
First of all, thank you for your contribution to XIAOMI2

I come from china and my english is poor,sorry. in my country,many users can't register to xda For some reason.

the test phone is Mi 2SC, when i first flash the system,the singe 3g is good and data not work. camera is good. then i reboot the phone many times, then show no sim card ,i input *#*#4636*#*#, show the network type is Unkonw,i set it to CDMA auto (rpl),but it had no effect . thank you again[/QUOTE]

OK, CDMA data connection is still unavailable.
[Xiaomi Mi 2] windbells:
I don't know why some device will get a serious performance issuse. Is it there some difference hardware with same model? You can compare GPU profile result with mine: https://streamable.com/derzm. I will get a little stuck when there is too many large pictures sliding, too. But I think it is not a kernel issue.

I am working on moving to a new kernel base. It is based AdrianDC's kernel(https://github.com/AdrianDC/android_kernel_sony_msm8960t) which can be a better replacer, and here is a new build.

[TEST USE] https://mega.nz/#!FCA0mY7A!tJ1PZta1sH0QlTIjrIPJsN7P_s4ZT9A9EUZzwJ7hVPw

Also I have fix alarm not working in previous update. But there is some bug in kernel (for example menu and back key will wakeup system), I need to more time to tune it. You can have a test if you have time to do it:

1. Open screen recorder

2. Turn on gpu profile

3. Record some cases that show UI lags

4. If possible, take a memory use screenshot.

4. Upload the result
[Xiaomi Mi 2] windbells:
I use Google AOSP with some feature patches(Network traffic, permission enhancement, volume key wakeup etc...).

I think you can use LineageOS instead of AOSP if you want a stable ROM. You can also refer https://github.com/AdrianDC/aosp_development_sony8960_n if you want a pure AOSP ROM.
[Xiaomi Mi 2] werty100:
I am downloading LineageOS source...

Phone was chargin and battery didnt update it state...I reboot phone and now bootloop
[Xiaomi Mi 2] LaiCORE:
Xiaomi Mi2 have two model: MI2(MSM8960T) and MI2S(APQ8064T)

May be this the reason?

in the video, the interface is much faster than in real life

https://streamable.com/ou663

screenshot "memory use"

logcat:View attachment uislow.zip
[Xiaomi Mi 2] ADRez:
I have Mi2S 32GB and got the slow UI problem too, haven't done a recording because GPU profile is the same as the one from [MENTION=5889685]LaiCORE[/MENTION]

Great work anyway [MENTION=8544718]windbells[/MENTION]!
[Xiaomi Mi 2] windbells:
How about this boot image:

https://mega.nz/#!laoUUDaI!yiwRkVMwntNoMtUscIkyFFlDi8Ei2QZHj1txD6x2yjo

boot in fastboot mode:

sudo fastboot boot boot.img
[Xiaomi Mi 2] clps995202:
Ok so finally my screen came. Tested and the rom is really smooth. Don't have the slow ui problem. everything works great. I'm using the Mi 2s 32G version. It's pretty weird that I didn't face any problem that the 32G version had, gonna test more to ensure it.

BUT, I did get a strange thing that is freaking me out. If I put the back cover back, my home button will malfunction, if I remove it, then it will start to work. Pretty sure it isn't the rom's problem cuz I have flashed miui and it's still the same. Anyone has this problem before?
[Xiaomi Mi 2] LaiCORE:
the same result and new bag with brightness, after reboot brightness lvl on max low and don't change value, but after relock screen brightness on normal lvl.

https://streamable.com/rgpeb
[Xiaomi Mi 2] ADRez:
Same result, low brightness at boot but restored after locking and unlocking. UI still slow, videos play smoothly (without that boot image too).
[Xiaomi Mi 2] windbells:
Yes, it's a led driver bug. But it doesnot matter since this is a gpu test bootimage. All other bugs will be ignored.

I have compiled two kernel for test. befor test, you need to replace a system lib file(/system/lib/libsuspend.so), OR YOU CANNOT WAKEUP SYSTEM AFTER SLEEP.

/system/lib/libsuspend.so

https://mega.nz/#!YD4FxJaL!pi1dvJ9NixfdxY9Y8kWzjuYjrPGqbMmANaJDt6ql1Lo

adb root && adb remount rw
adb shell mv /system/lib/libsuspend.so /system/lib/libsuspend.so.bak
adb push libsuspend.so /system/lib

Here is two new boot images:

https://mega.nz/#!Vag2nApb!jP7oUrmpFyCg5C2F2jvytyy9dnrEFNxo2Il4mMHAnEE

and ivan kernel:

https://mega.nz/#!pLZzQSYR!KfCxaewVHSH65SNw-grj8rN312kdVIxmTd7q3nFmxbQ

Good luck
[Xiaomi Mi 2] miuifans:
great！ inva kernel is well，thank you very much！
[Xiaomi Mi 2] LaiCORE:
sony(?) kernel

https://streamable.com/3tche

View attachment gfxinfo.txt

ivan kernel

https://streamable.com/dgiz1

View attachment gfxinfoivan.txt

results: ivan kernel win
[Xiaomi Mi 2] GeekZJK:
I directly tried this zip without any other kernel you gave below and to my surprise it works quiet well on my Mi2sc. The UI smooth problem didn't exist!!! But I got a problem of camera. I can use the camera for only one time after I flashed it. I took a photo, it works. Then I tried to record a video(I forgot to change it to 720p), it reboot automatically after that I couldn't open the camera again. Every time it gets a reboot.

Anyway thanks for your work a lot !!!

Here is the screenshots (Since I can't post both links and pictures here. I can just use the link like the following:)

mega.nz/#!HQ5DQa6Y

mega.nz/#!eJ5XlIhL

mega.nz/#!mYgEQKSD
[Xiaomi Mi 2] GeekZJK:
Now everything works well on my device(32g with 13mp camera) with boot_ivan.img. Thanks a lot.

But I found that GPS doesn't work. When some app tries to use gps, it gets a reboot.
[Xiaomi Mi 2] windbells:
thank you all guys. I almost have figured out what's wrong. Test this bootimage again please.

https://mega.nz/#!JXojVbQZ!9L5asTqnv-SHVIkbyo32kud4_pD-VD51H3uP0RG1mpg
[Xiaomi Mi 2] windbells:
Anyone with a CDMA network wants to have a test for me?

Download this:

https://mega.nz/#!ROx2QJCb!H87LG4yEIDhD7kaRXQBW5qRk4o8EBgCG62_FX1vcm5M

and run this to upload to your phone:

adb root && adb remount rw
adb push telephony-common.jar /system/framework

reboot to see whether data connection works or not. (initial booting might take a long time)
[Xiaomi Mi 2] T3sla:
UI smooth with default kernel.Can't find gapps for 8.1 though.There are some like ground zero gapps but playstore doesn't work.Can you provide working gapps so we can test better the phone in daily use?
[Xiaomi Mi 2] windbells:
download link at #65
[Xiaomi Mi 2] LaiCORE:
[MENTION=8544718]windbells[/MENTION]

Nothing has changed:(

View attachment gfxinfonew.txt

View attachment logcatnew.txt

https://streamable.com/zrcxx
[Xiaomi Mi 2] windbells:
OK, you donnot need to record or get debug info anymore. Just tell me if boot image working, then you can save time.

How about this:

https://mega.nz/#!leJFRbLD!T8efPFCdMAdDbTRAaZx20byn05nwfOmJi8muAemT-3Q
[Xiaomi Mi 2] GeekZJK:
I have a CDMA card. I'll test it later:) (maybe next weekend)

What about the GPS problem? Isn't there anyone that has the same problem? I'll post the logs here later.
[Xiaomi Mi 2] windbells:
How about this one:

https://mega.nz/#!leJFRbLD!T8efPFCdMAdDbTRAaZx20byn05nwfOmJi8muAemT-3Q

To save you time, you dont need to record or get debug info anymore, just report it works or not.
[Xiaomi Mi 2] LaiCORE:
[MENTION=8544718]windbells[/MENTION]

The boot.ing is working, but the UI is slow
[Xiaomi Mi 2] 丶Nanmu:
I have the same problem , and I'm sure that most people have this problem . When I turn off the GPS my phone never reboot again . I have told some Chinese friend , they try it and their phones works well!:o

---------- Post added at 06:05 AM ---------- Previous post was at 06:02 AM ----------

Thanks for your work , but I think there's some thing wrong with the GPS . When some apps try to use it , my phone will reboot , and most people have the same problem.
[Xiaomi Mi 2] GuaiYiHU:
I managed to bring up lineage-15.1 for Mi2/2S. Do you use telegram? I hope we can give aries a second life.(In fact, you did XD)
[Xiaomi Mi 2] windbells:
Yes.

Good jobs!
[Xiaomi Mi 2] clps995202:
There's no advance restart options, even with the toggle inside the developer options. Also when I want to set a pin code, it will stuck at the screen for a pretty long time. Is this a bug or I messed up something?
[Xiaomi Mi 2] windbells:
Google AOSP don't have advance restart. Developer restart option is a void for now.

It's a bug. Secdiscard operation takes a long time. But setting pin works. It might be a unported(or bug?) kernel feature.
[Xiaomi Mi 2] GeekZJK:
well the cdma didn't work. both phone call and data network. I tried "cdma only""evdo only""cdma auto", nothing happened.

My device is Mi 2sc (cdma version, 32GB with 32mp camera).
[Xiaomi Mi 2] windbells:
OK, how about this:

https://mega.nz/#!QbhCDSzS!FOVG8ib7AfzoeoJ-DijFJGP5j_yRpyItvHGJMo2RVcg
[Xiaomi Mi 2] windbells:
OK, try this one, thanks

https://mega.nz/#!8XgwSR6Y!nvqqppQ6tX1GKzC3HadzeEGR1cRbdbor3blDVQyNM5c
[Xiaomi Mi 2] LaiCORE:
Great! The interface works fine!

You used the source of Ivan?

But again, the battery level from 65% down to 25%

And bad focus in camera
[Xiaomi Mi 2] ramir0:
You guys are awesome!

I'll post this thread link un some fórums of mi2s so ppl who know some stuff about development can help and test !
[Xiaomi Mi 2] windbells:
No. the problem is display driver. Some devices seem to have a incompatible problem with new mdp vsync driver. I need to do another test to figure out.
[Xiaomi Mi 2] -Tex-:
Many of mi2s users have not original display, maybe problem because of this.
[Xiaomi Mi 2] LaiCORE:
I have the original display

[MENTION=8544718]windbells[/MENTION] , pack it, I'm waiting.
[Xiaomi Mi 2] clps995202:
I did use the non-original display, but didn't encounter that problem.
[Xiaomi Mi 2] T3sla:
Agree, huge battery drain in airplane mode, about 3% per hour.But UI very smooth.
[Xiaomi Mi 2] Jezura:
I just installed the ROM on my Mi2s 32GB/13Mpx. UI is very smooth with default boot.img for me, I didn't test camera yet. I only noticed some weird screen tearing during initial setup, but after that it works without any problem.

I have one question: how to make live wallpapers work? I understand, that you removed it to make ROM smaller, but I have created my own KLWP theme and I kinda miss it. I tried installing LiveWallpapersPicker.apk but it always crashes when it's called.
[Xiaomi Mi 2] Jezura:
I found a bug with time sync. Someone might remember it from bugers CM12.1. It is noticeable in clock app, when you start a timer (video) or when playing in some media apps(on the timer). It also causes tiny pauses in audio playback over bluetooth (which otherwise works flawlessly for me) but not on audio playback over speakers. This bug isn't always appearing and reboot solves the issue for some time. Bugers on xiaomi.eu forum fixed it in his CM12.1 ROM, but sadly he never released his sources, so all that is available is boot.img file with this issue fixed (I can provide it to you).

Also the clock app is crashing when it's supposed to play any alaram, is it "normal" or it's an issue on my device?
[Xiaomi Mi 2] EXSERENS:
This Kernel works fine, thanks!
[Xiaomi Mi 2] windbells:
You can let me have a try. But it would not being fix since I don't have a blutooth device for now.

It's a bug, alarm not working will be fixed in next update.
[Xiaomi Mi 2] windbells:
It will be built in next update. Now you can download this apk:

https://mega.nz/#!EWAWWZCZ!tn4vFlcT-t8ghQ_xjQAMhTz0IsCIqhy3cyHfTsZsY0k

and run:

adb root && adb remount rw
adb shell mkdir -p /system/app/LiveWallpapersPicker
adb push LiveWallpapersPicker.apk /system/app/LiveWallpapersPicker/

reboot and you will get it.
[Xiaomi Mi 2] windbells:
This is a new one:

https://mega.nz/#!hHhyUD5b!pz5mEqHsw_kDciSM8aiY3X78i8laDHcgt30uhLPWY5A

Thank you agin.
[Xiaomi Mi 2] Jezura:
The bluetooth audio isn't the only thing it's causing. As you can see in the video, it makes count-down timer jump back and forth and it could possibly cause other issues. Although it's not that important in my opinion, as it doesn't always appear and it can be solved quickly by reboot.

Thank you very much for your work, you did an amazing job!
[Xiaomi Mi 2] LaiCORE:
[MENTION=8544718]windbells[/MENTION]

the user interface works fine.

The battery again jumps, but already in the recovery mode, there the charge level went down to 1 percent.

If you shoot a video in 720, and try to click on the screen, then the video recording stops working.

What should I check?

Can I use it or have significant bugs?
[Xiaomi Mi 2] windbells:
I will disable liveshot by default to avoid video recording crash.

Of course you can use it. I will try to reverse power driver to solve battery issue.

Most devices ported to Oreo cannot connect to a hidden ssid network, so does aries, but I think it's stable for daily use except this one.

I have ported lineage privacy guard to enhance privacy control. It will be shipped with superuser too.
[Xiaomi Mi 2] windbells:
Is CDAM data connection both works on 16GB and 32GB device? With latest telephony-common.jar or not?

Yes, there are some differences between all version of Mi2/Mi2S. Both kernel and frameworks need be patched to make all version works well, but there is no more time and all-version devices to test. What I can do is to make all members reported here can run a "daily-use" oreo.
[Xiaomi Mi 2] ramir0:
I want to try it. I have 2s 32gb. Which files i have to download? Vía twrp. Right?
[Xiaomi Mi 2] xzr0025:
It's really a good ROM!But there is still a little problem.GPS doesn't work. When I try to open apps like maps, the phone would reboot. Hope you can fix it.
[Xiaomi Mi 2] 丶Nanmu:
When I clean some apps ,them can't be opened until I reboot my phone again(like qq ) . If there is anyone else have this bug?
[Xiaomi Mi 2] fuyuan1221:
me too
[Xiaomi Mi 2] 丶Nanmu:
When I quit some applications, they cannot be opened again, I think this is because the background recovery mechanism problems (but the main interface cannot be displayed because the background process of his existence), but I can't crawl log, there is Chinese or other friends can grab the debug log? (an unusual application of QQ and QQ browsers, etc.):o
[Xiaomi Mi 2] LaiCORE:
[MENTION=893839]windbell[/MENTION], will it be possible to update the kernel to a new version? or will we stay on version 3.4.xx?
[Xiaomi Mi 2] -Tex-:
It's impossible to update to 3.10 kernel or higher, because of hardware incompatibility of snapdragon 600 cpu with this kernels
[Xiaomi Mi 2] GeekZJK:
I'm a bit busy these days so I'm sorry for my late reply.

I just tested the 16GB device last week because I use the 32GB as my daily device. I'll test the 32GB later. The CDMA works without the latest telephony-common.jar.

Thanks for your contributions good man.:cowboy:
[Xiaomi Mi 2] GeekZJK:
CDMA didn't work on 32GB device. Neither phone call nor data network. Then I try the latest telephony-common.jar but the com.android.phone got a FC.
[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:

1. download su and superuser.rc in superuser folder

2. run command:

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

happy new year!

Thanks for the new build

Set for long term testing.

The interface works fine.

Had some problems with installing apps after installing magisk.

There are some problems with memory, some prilojeniya see different memory, for example after restoring apps from Titanium Backup, ABBYY Language Dictionary offers to re-establish a new set of dictionaries, even Titanium Backup didn't see old backups had to enter the path to the folder itself, even the FX File Manager sees the internal memory(sdcard), instead showing the folder with the folder of Android(for the app). Using USB memory is displayed normally.

Also a small problem with DPI.

View attachment bugreport180101.zip
[Xiaomi Mi 2] clps995202:
Can't install Magisk on it. Flashed it in twrp, no errors were showed. After boot into system, I can't install any apps, and the Magisk manager doesn't show up. Only by uninstall Magisk can let me install apps. Since Magisk only modify boot.img so I guess maybe is the boot.img's problem?

---------- Post added at 05:19 PM ---------- Previous post was at 05:10 PM ----------

May I ask which version of magisk you are using? Cuz my magisk seems to malfunction and cause unable to install apps. I'm on v15.1
[Xiaomi Mi 2] LaiCORE:
[MENTION=7440884]clps995202[/MENTION]

Stable version 15.1

Initially I was also not working Magisk, the installation was successful, but icons magisk was not.

After I reinstalled the firmware from installing ROM+Gapps, after download and setup, I set top Magisk

And, [MENTION=8544718]windbells[/MENTION], I had the same problem as [MENTION=7440884]clps995202[/MENTION]

initially I was also not working install apps. Perhaps due to the incorrect installation Magisk.

####################################

# piece of logcat when i try to install new app

# View attachment 4376604

# and piece of logcat when app installed successfully

# View attachment install.txt

####################################
[Xiaomi Mi 2] -Tex-:
UI works fine but I can not figure out how to provide root for apps with Privacy Guard
[Xiaomi Mi 2] asd13751418:
Everything is fine in recent version,but the swipe screen lock is strange,it's hard to unlock.:p
[Xiaomi Mi 2] -Tex-:
Yeah, should be swipe allmost to the top of screen.
[Xiaomi Mi 2] _Roysten:
Hello Windbells,

First of all thank you for your work. The ROM works for the most part on my Mi2S 16GB, no GPU issues. I do have some issues with the RIL, I cannot unlock the SIM card as it keeps crashing when showing the SIM unlock screen. Dmesg shows the following error message:

Logcat doesn't show anything useful, but it seems to think the SIM card was removed:

But this is reported by the wifiservice so it might not be relevant for the mobile network (wifi works OK). The SIM card uses the KPN network (netherlands), which is UMTS (https://www.gsmarena.com/network-bands.php3?sCountry=Netherlands). Is there anything I can do to help pinpoint the cause of this problem?
[Xiaomi Mi 2] LaiCORE:
[MENTION=404479]-Tex-[/MENTION] [MENTION=8354910]asd13751418[/MENTION]

+1
[Xiaomi Mi 2] windbells:
I have modified some of the external storage API for some secure reason. Path of external storage that app got will append their package name, it means /sdcard/TitaniumBackupFolder should be /sdcard/<TitaniumPackageName>/TitaniumBackupFolder, so move your old backup folder to /sdcard/<TitaniumPackageName> that Titanium can access properly.

Power menu have incorrect showing right now, it might be a AOSP Oreo bug on some small screen, I won't fix this for now.
[Xiaomi Mi 2] windbells:
Magisk is still in beta to Oreo, I don't like to debug it since it is refactoring itself right now. wait it to be stable or use provided superuser.
[Xiaomi Mi 2] windbells:
Push su and superuser.rc to your phone, app control in Privacy guard > advanced > superuser ( last tab)
[Xiaomi Mi 2] windbells:
It's AOSP Oreo's bad.

One solution https://github.com/AdrianDC/android...mmit/7a760c908ac6c37f9804ede809dcfa5b71b7864a

I will add this if most of you want.
[Xiaomi Mi 2] windbells:
Attach your logcat and dmesg. Their is something logged when Android system activity crashed.
[Xiaomi Mi 2] _Roysten:
I added dmesg as attachment, logcat as gist https://gist.github.com/Roysten/339a6e53796b415c899f34c21418ccf9 because it was too large for xda.
[Xiaomi Mi 2] -Tex-:
There is one more thing, root must be enabled in developers options.
[Xiaomi Mi 2] gonewild87:
Hi to all and thanks to the developer for bringing up an oreo rom for our beloved xiaomi!

I flashed the rom on my xiaomi mi2 32 gb and it is seems pretty solid. My big problem is in the RIL, because flashing some rom in 2016 caused my phone to lose the imei (i also opened a topic on xiaomi.eu). Right now wifi and data are not working. If somebody has a mi2 32gb and he would like to share the qcn or xqcn file, please send me a pm
[Xiaomi Mi 2] LaiCORE:
[MENTION=8544718]windbells[/MENTION]

Maybe that'll help

Error installing the application

booting time logcat View attachment sda.zip

and this post
[Xiaomi Mi 2] gonewild87:
Even using another qcn didn't solve my problem. Can anybody please send me a twrp backup of efs partitions (in private, it's very easy to do and it could be a big help to me)? I really would like to see if I can manage to bring back my phone to life
[Xiaomi Mi 2] asd13751418:
Another problem,it still have huge idle battery drain:crying:
[Xiaomi Mi 2] AG0G:
The current build is fairly stable, but it has several bugs. Problem with DPI, fast discharge of battery and heating, and so is the problem with swipe on lock screen. If this helps, I'll be happy. Thanks for your work.
[Xiaomi Mi 2] windbells:
It seems to be the new telephony not compatible with old RIL blobs. I need to get more information to figure out what's wrong(RIL HAL or telephony framework). Please upload radio logcat only by run adb logcat -b radio. to ignore unrelated spam log.
[Xiaomi Mi 2] windbells:
Please send me a working patched boot.img(other devices are ok). It seems to be something exception while patching boot image.
[Xiaomi Mi 2] No1Alien:
RIL not working for CDMA

RIL Not Working for me, and here is the radio log pastebin.com/um8B9R9d
[Xiaomi Mi 2] windbells:
Full logcat is need to figure out the line of exception.
[Xiaomi Mi 2] LaiCORE:
[MENTION=8544718]windbells[/MENTION]

boot img with magisk

installing app not work

View attachment boot.zip

...and why it does not display the Magisk icon
[Xiaomi Mi 2] windbells:
Is this boot image works? I want to know what magisk have done to the boot.img. I don't have lots of time to go through the whole magisk source tree
[Xiaomi Mi 2] GeekZJK:
Hey man, I tried your latest rom, everything works well but the GPS issue still exists.

Here is the catlog after I open camera.(Camera use GPS to record the location data)
[Xiaomi Mi 2] LaiCORE:
yes, it's works and bootable.
[Xiaomi Mi 2] 丶Nanmu:
Application is turned off can not open the situation still exists, I don't think it's part of the code scardsf merger and cause problems, he has the serious influence to use those applications can be restarted (because only the phone open) again, but I don't have a computer can't grab log (these applications include QQ browser, QQ, baidu, input method, etc.), I hope you can solve this problem, thank you!
[Xiaomi Mi 2] ranmin:
However, power than miui9, wifi sometimes disappear for no reason
[Xiaomi Mi 2] Porske:
I went from lastest miui 7.11.16 by xiaomi.eu, I can flash with this partition table or I always need the China Developer version?

I have Mi2s 32gb wcdma, can it be useful for tests? [emoji57]

Inviato dal mio MI 2S utilizzando Tapatalk
[Xiaomi Mi 2] clps995202:
No need, just flash twrp, flash rom in twrp, then you're good to go~