yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi 2] zipalign:
tried that patch and it works flawlessly.

without that, I had two partitions, storage/emulated and vsdcard.

on the second one [vsdcard] there was all my previous sdcontent [before I flashed the new CM12.1 build], then on the first one [storage/emulated] I had all my new pics shooted with the phone [but with less space to use, which would have been fullfilled soon].

thanks spaxon and Michael.

you are the best!
[Xiaomi Mi 2] Shuvo_bd:
Thanks man. Reflashed after formating data partition and it worked like a charm.

btw, that ussd code chinese text pop up hasnt yet fixed? I thought that only exist in AOSP rom by Ivan. I noticed a fixed on 4pda forum. They used some kind of code to translate it to their native russian language. Is there any work around?
[Xiaomi Mi 2] eintr:
The reason is your partition was enlarged but the filesystem inside it was not. Just remake the filesystem to fix it.

If you are using linux:

Reboot your phone to dload mode by: adb reboot dload

Check the partition number by parted command.( It's easy, just find the biggest partition)

Run: mkfs -t ext4 YOUR_DATA_PARTITION

---------- Post added at 12:03 PM ---------- Previous post was at 11:53 AM ----------

Can you tell me the key name? I didn't find relevant lines about WCDMA at all.

Thanx!
[Xiaomi Mi 2] CBpbxEcmecmBeH:
I know it's not Xiaomi, but build.prop should work everywhere, no? :)

https://forums.oneplus.net/threads/rom-latest-coloros-mod.261689/page-62#post-11186963
[Xiaomi Mi 2] netweaver2009:
Any results so far with the latest build on Bluetooth connectivity: car audio/calling, headsets, bike accessories, medical devices etc?
[Xiaomi Mi 2] DaRoni:
bug

Outgoing calls are shown as made to unknown number

http://en.miui.com/thread-105299-1-1.html

http://en.miui.com/thread-102015-1-1.html
[Xiaomi Mi 2] pkswpnl:
hey m11kkaa

I'm facing problem with ussd code replies...which is in chinese. Earlier I had been using rom from Ivan which brought this problem. I hoped your new rom will fix it but it's still the same. Please help.
[Xiaomi Mi 2] SWADED:
[MENTION=3530648]m11kkaa[/MENTION] When I wipe/format data it doesn't work. I still have the old apps

How do I get a clean cm12.1 install?

I don't need to have dual boot just cm12.1
[Xiaomi Mi 2] DaRoni:
http://xdaforums.com/mi-2/orig-development/flashtools-miflash4linux-recovery-qdl-t3036730

boot into recovery(which is TWRP now), recreate the filesystems for all partitions(system,data,cache,sdcard to ext4) in the wipe menu and reinstall your ROM.
[Xiaomi Mi 2] acastrocab:
After (i dont know how many days...since the day after the upload) ive been testing the rom as a daily.I didnt have to many problems so far but one day calls didnt work and a reboot was the solution but i tried to recreate the error but i couldnt

I had some randoms reboot but i think its nothing you can fix because are the normal one 1 time a week with some apps

And the problem that makes this rom worst than asop its battery life while in deep sleep:With asop you receive notifications delayed but battery is good i now that you are working with that and probably in future releases is fixed but now is the only "problem" for me

(sorry if i had some mistake)
[Xiaomi Mi 2] lance6716:
Camera problem

In cm 12.1(0730) my camera apps can't work sometimes, a message says "Can't Connect To The Camera"
[Xiaomi Mi 2] erlgrey:
Deepsleep drains much battery compared to cm11 but apart from this i'm really happy wit this build.

No in-call bugs so far and performance is good, good job so far. :)
[Xiaomi Mi 2] acastrocab:
I dont know if its only my problem and i forget it before, i cant take screenshots

(Im with merged partitions)
[Xiaomi Mi 2] SkiFire13:
Also compared with ivan's Cm12.1

Ps: anything about stagefight fixes?
[Xiaomi Mi 2] erlgrey:
Testapp says not vulnerable..

and i never used Ivans roms.
[Xiaomi Mi 2] lance6716:
And when the problem arises, the flashlight in Quick Settings panel disappears. A reboot could solve.
[Xiaomi Mi 2] SkiFire13:
StageFight Detector (Lookout Mobile Security) say Not Vulnerable

StageFight Detector App (Zimpeium INC.) say Vulnerable (CVE-2015-3864)
[Xiaomi Mi 2] enyx.es:
Its vulnerable because this Android version is earlier than stagefight was detected and patched by Google.

Enviado desde mi MI 2 mediante Tapatalk
[Xiaomi Mi 2] Javajohn:
SAME BUG

USSD code is in chines
[Xiaomi Mi 2] m11kkaa:
I'm working on that too and I think I broke it down to the QMI(RIL) libs from Ivan. Maybe I should switch to the official ones from MIUIv6.

Also I'm aware of the crazy battery drain, I think it's a kernel problem and am trying to build some measuring hardware setup.
[Xiaomi Mi 2] mischler:
Miui v6 Lollipop builds are have chines USSD codes too. ;)

Gesendet von meinem MI 2S mit Tapatalk
[Xiaomi Mi 2] m11kkaa:
wow that's stupid. looks like I have to find the exact lib then by comparing with v5(does it work there? cm11 uses 4.1 libs).
[Xiaomi Mi 2] graw2:
USSD doesn't work in MIUIv6-L and MIUI7, but works perfectly in MIUIv5 and MIUI6-KK

Sent from Mi2S [MIUIv6-L] using Tapatalk
[Xiaomi Mi 2] Javajohn:
MIUI 6 based on KK works good all ussd codes > Ivan and Official L miui version use same libs
[Xiaomi Mi 2] XaoDefy:
Could the battery drain be caused by the Mobile Radio Active bug?
[Xiaomi Mi 2] SkiFire13:
In first post I see 1+1 Quickboot, but I don't see it on CM12.1. It's a bug or an error?
[Xiaomi Mi 2] m11kkaa:
what bug?
[Xiaomi Mi 2] SkiFire13:
There isn't quickboot... It's a bug or an error?
[Xiaomi Mi 2] UserC:
There's a known lolipop bug where apps cause the mobile radio to hang, causing significant battery drain. Basically, many apps, even those that aren't used, show a high battery usage even though the phone is in deep sleep.
[Xiaomi Mi 2] AndyYan:
Who's maintaining CM nightlies right now? I was just wandering around the newly-restyled nightlies download page that finally displays the device's market names alongside their codenames, but it seems that MI 2/2S ("aries" ) has been mistakenly labelled as Galaxy S (the board of which happens to have the same "aries" codename). Somebody notify CM of this if you can?

Sent from Google Nexus 4 @ CM12.1

[WARNING: XDA Premium 4.0.13+ lacks Signature function - do not update]
[Xiaomi Mi 2] XaoDefy:
More info here:

https://code.google.com/p/android/issues/detail?id=165558
[Xiaomi Mi 2] acastrocab:
Its m1cha but he doesnt release nighly like when de have cm11 right now he's doing an amazing job with efidroid and with cm12 he released a new cm12 ROM recoded with ivan improvements i think that he is looking to resolve some issues like the battery drain and the ussd un chinese

Its summer and apart of the mi2 work he also has social life and Other things
[Xiaomi Mi 2] Javajohn:
actually acastrocab absolutely right

from the starting [MENTION=3530648]m11kkaa[/MENTION] is working great for mi2 device and me personally a huge fan of his work and using his rom since from first CM he built . i still remember he used nexus files and make cm better then ivan rom before when no seriouse sorces avalable for mi2
[Xiaomi Mi 2] Javajohn:
some time camera not working " cant connect camera"
[Xiaomi Mi 2] No-New-Phone:
Yesterday I finished the whole change-partition-table-and-install-CM12.1-procedure. Happy user of your ROM. Now I can do my work :D

I attatch some logcats for the following bugs:

- camera app (inbuild) doesn't start (kamera-start.txt and kamera-start2.txt. File no 1: I made a logcat -c before I started the app, File no 2 is from live usage and therefor you have to look at the end)

I've connected my bt audio speaker, here are logs (althoug everything seems to be fine in this usercase)

- first pairing (bt-erstes-pairing.txt)

- turning off bt speaker during media output and turning it on again (bt-media-output-unterbrochen.txt)

I have to do the last procedure in my car again, but maybe I can already mention the following:

I've already connected the bt car system yesterday, and I had no problems listening to my favourite podcasts. Coming home and playing around with my new LP-Rom, I've tried to change the order of the quick settings-tiles, but I got a black screen and returning to the home. Same did happen when this morning I first tried to pair my bt-speaker: the android-settings-menu just did't open up (and said: app cannot be started, wait or exit?). Restarting CM12 fixed it for now. So that's my last logcat: kachelanordnung.txt when I tried to open in Benachrichtigungsanzeige -> Kacheln auswählen ("tile order" ?)

I hope this helps and will provide more logs whenever possible.
[Xiaomi Mi 2] No-New-Phone:
[MENTION=3530648]m11kkaa[/MENTION]

This morning, when I was in the train reading my digital newspaper, I had a soft-reboot (without mi-logo, and app-history still present after reboot). After the reboot I've opened Terminal Emulator and typed in "logcat -d > /sdcard/log.txt". The resulting text-file is very small, just about 10 rows. So I'm wondering what went wrong. Do I need other arguments? Or run it as root?

Regarding BT audio: so far, so good. Pairing with the build-in BT in the (10 years old) car audio doesn't work, because it doesn't even see the device. (It did work on KK Omni, but not on KK Mokee). But I can pair and use the external Hands-Free Car Kit (via aux-in), and it works for calls and for audio playback.

Last point that I've noticed: when I connect the pone via usb to my laptop, usb debugging works flawlessly, but linux doesn't mount the device as MTP. It does so when I switch from MTP to PTP.
[Xiaomi Mi 2] rober788:
i was watching the spreadsheet that micha share it and i saw that "bring back kernel features and updates from N4 based CM12" is in progress for a few month now. any updates on that ?
[Xiaomi Mi 2] Giò-chan:
I want to ask about the brightness of the LEDs on CM12.1 20150730

when I try to install the ROM on merged partitions storage, was resize system partition ... notification LED does not light, and I tried to follow the instructions of a member of the party xiaomi.eu. Download and overwrite it lights.msm8960.so in the system directory, he said that he took it in ROM file Sudamod, but it's quite dim and did not know how to make it brighter :rolleyes:

and when I try to go back to the the old partition storage with MIUI 4.xx but still use the miflash core to merge the system partition, and up CM12.1 20150730 and using patches "cm-12.1-20150730-m1cha-notmerged" to merge the old partition storage ... and very bright lights notice

why I try on the old partition?... because I noticed the old partition to the patch have much more storage space than the new partition merged :laugh: nhiều hơn 1,5 GB :confused:

and I have tested over the past few days, did not see any bugs on call ... but not tried listening bluetooth connectivity ...

but I can not play the Xcom Enemy Within, always get the message "unfortunately... bla has stopped" or with game Shadowrun Dragonfall... i love these two great games :crying::crying: I just wanted to use CM12 :crying::crying:

sorry I'm not good at english

from vietnam
[Xiaomi Mi 2] Giò-chan:
oh in patch "cm-12.1-20150730-m1cha-notmerged" has files fixes
[Xiaomi Mi 2] rober788:
I tryed miui 7and now i cant install cwm or twrp anymore, im stuck with miui recovery (2.0.1)

Any ideeas how can i change it?
[Xiaomi Mi 2] DaRoni:
replace recovery.img in archive, run flash.bat

http://4pda.ru/forum/dl/post/6630963/Recovery_TWRP_2.8.7Rus_All_partition.rar

---------- Post added at 09:50 PM ---------- Previous post was at 09:48 PM ----------

run flash.bat on fastboot mode
[Xiaomi Mi 2] rober788:
Link doesn`t work.
[Xiaomi Mi 2] DaRoni:
https://www.dropbox.com/s/77yv3zd0c9ut4uc/Recovery_TWRP_2.8.7Rus_All_partition.rar?dl=0
[Xiaomi Mi 2] rober788:
Thanks a lot!!!!

Anyone installed Xposed framework? I saw that somebody fixed the problem with radio (power drain).
[Xiaomi Mi 2] zipalign:
xposed works flawlessy on m1cha's build.

I have installed mobileradioactivefix module today, but it's still too early to say if it's good or not.
[Xiaomi Mi 2] rober788:
Where i can find the installer?

Got the files ... but i have this error: "cp: Write error: No space left on device"
[Xiaomi Mi 2] zipalign:
you need to flash the framework via recovery.

then install the xposed apk, restart your device and search+download the modules you want.
[Xiaomi Mi 2] rober788:
Got the files ... but i have this error: "cp: Write error: No space left on device"
[Xiaomi Mi 2] Giò-chan:
I have installed and used and have not seen any bugs that affect phone

and I also install "L Speed Tweak" and not see a huge energy drain phenomenon

---------- Post added at 08:04 AM ---------- Previous post was at 08:00 AM ----------

the reason is because you have not merged system partition

-resize your system partition(recommended) this miflash package resizes your system partition without taking space from your data partition by removing the system2 partitions:

http://xdaforums.com/mi-2/orig-development/flashtools-miflash4linux-recovery-qdl-t3036730
[Xiaomi Mi 2] rober788:
I watched that threat .... but i can`t understand what i have to do.

With the Xposed downloaded from XDA i got that error, with the files from [MENTION=4831414]zipalign[/MENTION] i get bootloop.
[Xiaomi Mi 2] m11kkaa:
it's because not all recovery packages check for errors(unfortunately).

Chance are high that not even your gapps are working properly which can cause tons of random problems.

You really should update your partition table to unified_single.
[Xiaomi Mi 2] rober788:
[MENTION=3530648]m11kkaa[/MENTION] i can`t get it how to use that zip.

EDIT: i managed to do it :)

Update: I used unified_single but i got the same error with not enought space.
[Xiaomi Mi 2] zipalign:
I have unmerged partition, and no such errors on xposed flashing/installing.

I have flashed m1cha's build and suddelntly after the umnerged partition .zip + GAPPS + update-SuperSU + xposed framework.

ALL these zips in one flash.

then phone booted and god everything fine.
[Xiaomi Mi 2] _JaSoN_:
hey [MENTION=3530648]m11kkaa[/MENTION] any news when this is gone be finished and get official ?
[Xiaomi Mi 2] rober788:
or another improved build ...
[Xiaomi Mi 2] acastrocab:
i found this http://4pda.ru/forum/index.php?showtopic=474954&st=8620#entry40534466 Is it a way to change the ussd language?
[Xiaomi Mi 2] DaRoni:
yes.

https://github.com/M1cha/android_device_xiaomi_aries/issues/82
[Xiaomi Mi 2] No-New-Phone:
http://www.cyanogenmod.org/blog/releases-releases-releases-august-2015
[Xiaomi Mi 2] rober788:
Is mobileradioactivefix module working? Seen any difference in battery life?
[Xiaomi Mi 2] spaxon:
L Speed Tweak - where did you download it, do you have a link?
[Xiaomi Mi 2] acastrocab:
im not with this rom but battery life is (for me better than 4.4) now you dont have battery drain at nights and i've got more than 4 hours of screen with data/wifi on
[Xiaomi Mi 2] zipalign:
module is enabled and working, but no big surprises on battery consumption.. almost the same.
[Xiaomi Mi 2] kh.artur:
But it doesn't work because `ln` doesn't work on fuse partitions. Is there any other way how to get rid of that internal storage and use only external?
[Xiaomi Mi 2] ThaRooP:
Is it maybe possible for someone to make a new build? Now that the details of the stagefright exploit are public and Google released a security update for Nexus devices, I feel I need to update as well :)

Thanks !
[Xiaomi Mi 2] rober788:
Won`t be bad :)
[Xiaomi Mi 2] bialabs:
Yes I hope so. Cm11 is unusable due to mediaserver battery drain

Inviato dal mio MI 2S utilizzando Tapatalk
[Xiaomi Mi 2] _Roysten:
Hey [MENTION=3530648]m11kkaa[/MENTION],

I'm trying to build your ROM with updated CyanogenMod sources. Is this: https://github.com/mitwo-dev/android_local_manifest/blob/staging/android-5.1.1/local_manifest.xml the most recent manifest file?

Building fails at:

make: *** No rule to make target `out/target/common/obj/JAVA_LIBRARIES/tcmiface_intermediates/classes.jar', needed by `out/target/common/obj/JAVA_LIBRARIES/ext_intermediates/classes-full-debug.jar'. Stop.

I haven't found a way to solve that problem yet.

Edit: It seems I'm missing the tcmiface framework, an issue which M1cha also faced: https://github.com/mitwo-dev/android_device_xiaomi_msm8960-common/issues/1.

Edit2: Fixed that problem, on to the next :)

Edit3: :crying: Another error... Looks like there is an error in CyanogenMod, fixed with http://review.cyanogenmod.org/#/c/108819/1/fastboot/Android.mk...

Edit4: Running into:

make: *** No rule to make target `out/host/linux-x86/obj32/STATIC_LIBRARIES/liblz4-static_intermediates/export_includes', needed by `out/host/linux-x86/obj32/EXECUTABLES/make_ext4fs_intermediates/import_includes'. Stop.

I can't get past the error above :( Any help?
[Xiaomi Mi 2] _Roysten:
Hey [MENTION=3530648]m11kkaa[/MENTION], could you guide me through the build process?

Here's what I did:

Sync up CyanogenMod sources;

Clone the local_manifest from the mitwo Github organization (and modified it so it syncs, see below);

Read through your latest commits, and noticed I should be able to build CyanogenMod with the CM_BUILD environment variable set? Does this happen automatically when building CM?;

Ran the command `lunch aries-userdebug; mka'.

First it failed at a missing tcmiface and org.codeaurora.performance, but I managed to fix those problems by adding the missing files. Now I run into different problems (each time I compile the errors are different).

My local_manifest: https://gist.github.com/Roysten/7e9e488dab0fe99b8e31.

Does this process and manifest look good to you? Do you have any advice? Thanks in advance! :good:
[Xiaomi Mi 2] No-New-Phone:
[MENTION=5451053]linuxxxx[/MENTION]

Maybe you can help baking a fresh pizza? ?
[Xiaomi Mi 2] cogano:
It seems to be a trend, e. g. Ubuntu Snappy does a similar thing: updates are read only images (with the possibility to rollback).
[Xiaomi Mi 2] astra64:
Hello,

I just want to say, you version 16.02 is awesome! 1 reboot on 1 day only. In call audio OK, Bluetooth in call and music OK, no problem.

Thank you very much for you hard work !

I go to test the new version asasp
[Xiaomi Mi 2] m11kkaa:
I'd really like to know why mi2s users have reboots.

I never had a single reboot within the last two years.
[Xiaomi Mi 2] raviolis32:
LOL never had a single reboot in 9 months. Installed miui,smiui,cm11,cm12,mokee...

Im using build 16/2. Some battery drain but works great. Just want to thanks m1cha for the great work on mi2s.
[Xiaomi Mi 2] astra64:
For me no battery drains but this morning i have to re enter the pin code . i don t what do that m11ka ... For now i can t download the new ROM in my phone.... He download 8ko and stop. Same after reboot....
[Xiaomi Mi 2] Alecsandru90:
use firefox

the last build is fast :D also battery last longer (AT LEAST FOR ME)
[Xiaomi Mi 2] vivekb:
with 18/02 built, are you able to address issue in 17/02 built ... in call and out call bug ... some time it goes silent :(
[Xiaomi Mi 2] NightHeron:
Do we have 'MIUI like' camera? I cannot leave without the HDR of the original camera app . Do you have sth which works with ART?
[Xiaomi Mi 2] rober788:
Here is miui camera: http://d-h.st/users/M1cha/?fld_id=30574#files

Audio bug is not solved in the last version.
[Xiaomi Mi 2] acastrocab:
Since i intalled your cm12 unofficial rom i dont have reboots but with khaon cm12 sometimes it reboots when i was on youtube
[Xiaomi Mi 2] mikegiord:
I installed last version but there is no play store in the gapps package and is not possible to install an apk file. How can I solve?
[Xiaomi Mi 2] DJBrie:
Thanks for the great work but is there a way to disable the vibration on the softkeys? I know you probably spent ages getting them to work again but I really don't like it and can't work out how to turn it off in lollipop
[Xiaomi Mi 2] quidje:
Install GPServices

I have the same problem, wipe all that was mentioned in OP, even wiped a second time but that didn't help. Used the browser to look for a apk, found one but that kept crashing after installation (hense the 2nd wipe). Starting GMail gives a message to 'get GPS' but doesn't do anyting. From browser click on 'install' (i think from play store) doesn't work either.

Could someone provide a link to an apk or other instruction to get GPS working? Would be much appreciated :D
[Xiaomi Mi 2] m11kkaa:
Most confusing post I've ever seen :D do you have problems with gapps or GPS? :D
[Xiaomi Mi 2] astra64:
For gapps:

http://xdaforums.com/paranoid-android/general/gapps-official-to-date-pa-google-apps-t2943900
[Xiaomi Mi 2] quidje:
Hey m11kkaa, thx for replying, i was afraid of it not being clear :confused:. The problem is gapps (google play services <gps>). I've installed the gapps package from your link in OP. However this only installs Gmail/Hangouts/Maps. There is no play store or Google Play Services installed. This makes it impossible to create a Google Account in CM. See my other post for things i've allready tried.

Hope this makes it clearer (i've not use tla's to keep it simple :p)
[Xiaomi Mi 2] m11kkaa:
There are two (annoying) problems with gapps:

1) L is huge and doesn't leave much space for gapps on mi2

2) recovery ignores errors in update.zip's which means even though it tells you the installation was successful it failed.

this means you have two options:

1) resize your system partition

2) install very small gapps packages and check /tmp/recovery.log and the remaining space after the installation to make sure it was successful.
[Xiaomi Mi 2] T3sla:
What is the minimum size approximately for rom + minimum gapps?
[Xiaomi Mi 2] m11kkaa:
gapps must be <120MB on L (system part=537MB, CM12=416M)
[Xiaomi Mi 2] astra64:
Check this tread:

http://xdaforums.com/para...-apps-t2943900

choise the pico or nano package
[Xiaomi Mi 2] linuxxxx:
If I'll have some time yes. I still have this awesome device. I need to get some stuffs done (for cm) before this (some mi3/4 commits and gello)

Inviato dal mio A0001 utilizzando Tapatalk
[Xiaomi Mi 2] _Roysten:
OK guys, I finally did it.... it compiled successfully!:D At first audio didn't work with the sources from mitwo/platform_hardware_audio, so I used the CyanogenMod sources for that.

The stagefright bug has been fixed, see attachment.

The ROM is available on my Dropbox (I will keep it there, don't worry): https://www.dropbox.com/sh/2fazi965du6cp4s/AADMTeur01xeWaSioZ6QttnQa?dl=0

There is no need the wipe if you are already using the latest CM12.1 from M1cha. If you want to compile it yourself you can use my local_manifest, which can be found on Github.

Of course all the credits go to M1cha, Ivan, and CyanogenMod-team because I used their sources. Have fun!

!!! JUST NOTICED MICROPHONE DOESN'T WORK !!! Will look for a fix
[Xiaomi Mi 2] rober788:
so is not for daily use if microphone doesn`t work.
[Xiaomi Mi 2] _Roysten:
No you are right. Found out that M1cha and Ivan already did a lot of work on this, I will try to include this in the next build.
[Xiaomi Mi 2] _Roysten:
Fixed microphone by merging the current cm-12.1-caf-8690 with Ivan and M1cha's work :victory:

Download: https://www.dropbox.com/sh/2fazi965du6cp4s/AADMTeur01xeWaSioZ6QttnQa?dl=0.
[Xiaomi Mi 2] bialabs:
Wow thank you! It's for daily use? (battery, stability..) or we have to wait Micha's improvements?

Inviato dal mio MI 2S utilizzando Tapatalk
[Xiaomi Mi 2] _Roysten:
I don't know, I compiled it today so haven't had time to test it yet :) Stability and battery life should probably be the same as M1cha's (since it is mostly his code) but I can't make any guarantees...
[Xiaomi Mi 2] netweaver2009:
I upgraded, looks and feels the same indeed. Camera still not working, that fix is maybe not in Micha's public sources yet. Hopefully he can update his sources when he takes a bit of time off from the efidroid work and his real world uni work
[Xiaomi Mi 2] m11kkaa:
all my sources are online and if the camera's not working there's a different(second) cause because I've fixed it already.
[Xiaomi Mi 2] No-New-Phone:
Thank you for bringing this back to life.

True, camera still doesn't connect. But it didn't connect with latest build. Camera was maybe fixed in the sources, but it wasn't fixed in latest build 20150730. Maybe I missed a hotfix?