yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
How do you flash MIUI?

Last few days I have flashed full fastboot MIUIs 100s of times testing TWRP userdata decryption and had no problems at all.

Let me give you a safe controlled MIUI flashing procedure:

1. Unpack MIUI fastboot archive;

2. Open flash_all_except_storage.bat/.sh file and delete these first 4 lines:

fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *MSM8952$" || echo Missmatching image and device
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *MSM8952$" || exit /B 1
fastboot %* getvar soc_id 2>&1 | findstr /r /c:"^soc_id: *278" || echo Missmatching image and device
fastboot %* getvar soc_id 2>&1 | findstr /r /c:"^soc_id: *278" || exit /B 1

3. Delete these lines flashing splash, recovery, cache, logo(we don't need those):

fastboot %* flash cache %~dp0images\cache.img
fastboot %* flash recovery %~dp0images\recovery.img
fastboot %* flash logo %~dp0images\logo.img
fastboot %* flash splash %~dp0images\splash.img

4. Delete "%* " from all lines after "fastboot", final script should look like:

fastboot flash sbl1 %~dp0images\sbl1.mbn
fastboot flash tz %~dp0images\tz.mbn
fastboot flash tzbak %~dp0images\tz.mbn
fastboot flash rpm %~dp0images\rpm.mbn
fastboot flash rpmbak %~dp0images\rpm.mbn
fastboot flash aboot %~dp0images\emmc_appsboot.mbn
fastboot flash abootbak %~dp0images\emmc_appsboot.mbn
fastboot flash devcfg %~dp0images\devcfg.mbn
fastboot flash devcfgbak %~dp0images\devcfg.mbn
fastboot flash cmnlib %~dp0images\cmnlib.mbn
fastboot flash cmnlibbak %~dp0images\cmnlib.mbn
fastboot flash cmnlib64 %~dp0images\cmnlib64.mbn
fastboot flash cmnlib64bak %~dp0images\cmnlib64.mbn
fastboot flash modem %~dp0images\NON-HLOS.bin
fastboot flash dsp %~dp0images\adspso.bin
fastboot flash mdtp %~dp0images\mdtp.img
fastboot flash keymaster %~dp0images\keymaster.mbn
fastboot flash keymasterbak %~dp0images\keymaster.mbn
fastboot erase boot
fastboot erase sec
fastboot flash misc %~dp0images\misc.img
fastboot flash system %~dp0images\system.img
fastboot flash cust %~dp0images\cust.img
fastboot flash boot %~dp0images\boot.img
fastboot reboot

5. Save, reboot phone to fastboot and run the modified script, done.

Flashing MIUI this way puts you in control and no surprises from all these crappy Xiaomi flashing tools.

Hope this helps.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] hhadi:
Hi. Can the official be installed on Helium as well?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] mat9v:
There was no error in flashing procedure :) I have done it thousands times on different phones :)

Beside I flashed twrp version. Made a backup on pendrive, cleaned /system /data /internal /cache and flashed miui from pendrive (even converted to ext4 and restarted to let it mount partitions correctly).

Rebooted and once in miui I had constantly disconnecting lte. Probably the problem with firmware files that did not get upgraded from 7.2.9 that I had working correctly on laos.

(If I had used MiFlash there would be no problem as they would have been overwritten with correct versions. )

So I cleaned all partitions again and restored my backup /system /data /boot and after booting I had "sim cards not detected" surprise.

I tried flashing all versions of firmware files, with no luck so I started pulling hairs and that helped because I tried restoring efs from old backup. Magically sim cards started working.

Now I installed your latest rom and 7.2.16 firmware and latest gapps - all working :)

Full backup including /mode /efs and others on pendrive to be safeguarded in 2 places in case of another "surprise".

I know it is not a problem with your laos version but with stupid miui and my error in installing it in twrp over your rom without taking care of correct firmware version.

Let this be a lesson for other users to NEVER INSTALL MIUI IN TWRP OVER LAOS - it is better to use MiFlash :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] seti007:
Anyone have a solution for this?

Thanks
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] panospc:
I have problem with lag in the last two builds, how can I revert those changes?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Not in Lineage anymore...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dungphp:
Downloading , test and feedback to you ! Thanks
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] weishen93:
Hi,any1 can teach the correct way to update to latest ROM version?

Im now using 20170212,is that just download latest ROM and go into TWRP and just install it?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Jerry08:
Helium or Hydrogen?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] folderman:
Hi hhadi,

Sorry that I have hydrogen only.

Kenneth
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] eseregin:
Dear Nijel,

Thanks for ROM, looks like I was able to switch to AOSP from MIUI 7 beta, first time the latest version able to make a call again. ?

For pretty long time I could not get rid of MIUI beta on Android 7 because I lost all possibilities to call from phone. Now looks like it works again ?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dungphp:
GREAT ! Now MI MAX supported IPTV Multicast same as all others Android phone ! live tv udp streaming

Thank you nijel8
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Arti42000:
Phone is rebooting when I try to use gallery. I did a clean install, using hydrogen 3/32

Now trying to get some logs
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Jerry08:
U flashed also nebula kernel right? It's causing reboot while opening gallery.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] panospc:
Hydrogen
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Jerry08:
Well I have helium, but made this for hydrogen. Flash this in recovery and tell me if it helps.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] oatcooky:
I was getting constant crashes/BSODs with the latest firmware, the 20170218 ROM and Kernel Adiutor. I uninstalled Kernel Adiutor and everything works fine now. Anyone else have the same experience?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Well its not the app but some settings you did with it.

Describe what happens & when it happens (aka right after boot or so) regarding Kernel Auditor.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] oatcooky:
I only changed the I/O scheduler settings in KA.

I get a hard crash if I reboot the phone, unlock it right after the Lineage logo disappears and then try using the phone. I rarely get crashes if I let the phone sit for a few minutes after a reboot before touching it. Weird.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] mat9v:
I would say you have changed buffer size along with i/o governor and somehow it causes instability. Try setting to 256kb and deadline.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] FutureGamerz:
Am still on the 12.02 build and it's my first flash after unlocking.

In the process to flash this ROM, I lost all my internal storage data. I first fastboot flashed (flash all except storage) the latest fastboot MIUI ROM, then installed TWRP and flashed this ROM. Unsure which process deleted all the internal storage.

For the latest update, if I flash via TWRP (dirty flash + wipe dalvik/cache) will my internal storage be affected?

Other observations from the past few days:-

1) Although I enabled Enhanced LTE (VoLTE), not able to get VoLTE here in Singapore although the infra is there. Being using it on LG V10 stock ROM. Any idea what gives?

2) It seems the charging speed at 1~20% is slower than it should be but speed up after that. Normal?

3) Anyway for us to add toggle to the quick toggle page? Current choices quite limiting.

4) Noticed that camera apps other than Snap camera (built-in) will have "zoomed-in" preview. Any idea how to resolve? Other camera including Whatsapp one showing zoomed-in view
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dungphp:
How to choose others music file for Ringtone ?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
It's actually typical & usual thing to happen.

Adjust in app to apply settings with a 45~60 seconds delay after boot & don't touch the phone in that time, let it do & engage all preliminary aspects with default settings including entering deep sleep mode. Some driver's actually initialize in random asynchronous mode as it's faster & charging crucial things like IO governor in the middle of those operations lead to queue being bricked & their for init (3rd boot stage) fails leading to the kernel panic (security mechanism) that restarts the phone... This is actually basic stuff. Other than that definitely try deadline IO governor.

---------- Post added at 04:52 PM ---------- Previous post was at 04:47 PM ----------

Don't really think their is any need to go either under nor over 512KB which is default for a long time now (since Lollipop Day's). It's really a golden middle between row block & random true output.

---------- Post added at 05:20 PM ---------- Previous post was at 04:52 PM ----------

Will just answer on 2. & partially 4 as I don't have VoLTE carrier & not on it right now to tell you about toggle settings.

2. It's slower both on 0 to 20% & 80 to 100% as it should be. This is actually taken as it is from source Xiaomi released & done very good as you see battery actually degrades/heats/resists most when it's totally depleted or when it crosses 80% (over 93~96 real capacity it becomes critical so it's actually cut off to those levels depending on OEM choice which you see & it's interpreted as max 100%). This generally prolongs battery charging cycles longevity for one third.

4. They (LineageOS team) again did a bunch of revorks regarding Snap & camera behaviour in generally including zooming & re zooming cuple day's ago so they are actually expected to come in the new weakly official build. Hopefully they resolved all...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] ikaros80:
hello, i have a bug with calls, i choose in calls to ask every time before a call , but every time i make a restart the choice revert on the first sim

---------- Post added at 07:06 PM ---------- Previous post was at 06:51 PM ----------

and another one, no notification with viber
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] mat9v:
Mine take on those is a bit different :)

1. Did it work on MIUI? There are some phones that has VoLTE working on my network but Mi Max never had it working here. It may be network dependent and also phone model dependent.

2. Mi Max has a strange problem that it sometimes starts charging slowly, often you have to disconnect charger for like 10 seconds, connect it again and it starts charging faster :)

3. Not that I have found anywhere.

4. You are not talking about 16:9 versus 4:3 (native sensor resolution), right? It may be that they are using full sensor resolution and to fit it to full screen they are cropping parts of view.

About flashing, none of the processes should have deleted internal storage, but maybe if you did not have latest twrp and your internal storage was encrypted, you may have somehow agreed to delete it? I'm not certain on that so yeah, bash me on my head if I'm wrong :)

No, you should have no problems with updating your rom with procedure listed. Internal will not be affected.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] IndDoc:
I'm glad I'm not the only one! I have been noticing this ever since I've had the device and I thought I was imagining things!
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] carnby24:
Just use ampere to see if its charging at more than 2amps
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] FutureGamerz:
I couldn't boot up nigel's mod version of TWRP that's why I flashed back to the previous version as per official TWRP.

Yes it might be encrypted. I did see something about that in TWRP but don't remember giving the consent to wipe it. How do I check whether I'm encrypted? I just find it weird I can't access the user data partition while in TWRP.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] luminouche:
Battery percentage is not accurate/updated.

Last night 61% remaining. Woke up this morning, still at 61%, but after actions (wifi on, gmail...) percentage dropped to 53% directly.

61% directly to 53%, not 60, 59, 58...

So, why my device didn't displayed directly 53% this morning ?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
This will decrypt anything and you keep your data: https://xdaforums.com/mi-max/development/recovery-twrp-3-0-2-2-hydrogen-helium-t3512981
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] aaryan45:
PLEASE!!!!!!

Please Help With This!!! [MENTION=4399618]nijel8[/MENTION]
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Jerry08:
This will be hard imo. I guess it's kernel related(or maybe device? Helium?) cause I had this issue on every nougat rom I installed.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Let me get my crystal ball...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Jerry08:
Tell me which log you need for it and I'll get you one as fast as it happens again. For me it's like once a week mostly at night when I'm sleeping.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] luminouche:
My battery percentage issue is on Hydrogen 3GB/32GB

---------- Post added at 06:33 PM ---------- Previous post was at 06:31 PM ----------

My Mi Max is not entering deep sleep, is entering coma overnight lol.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Both logcat and dmesg right after battery % drops from after-wake-up false value to real/expected value.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Jerry08:
In settings it doesn't want change photo for owner(in Users), I have to set selinux to permissive to let it change.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Yeah, I noticed that bug a while ago but forgot about it... will see what I can do.

Edit: Fixed... will be in next build.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Jerry08:
I noticed it long time ago and was always forgetting to report.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] FutureGamerz:
I tried flashing this. The earlier version I think dated 12/2. Can't boot up Twrp screen flashing.

Default Miui data encryption is On?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] troyinjapan:
SU Icon and Privacy Guard bugs?

Obviously this is minor, but I kind of liked it.

The SU Indicator in the Status bar was available in 02-01-17.

It disappeared in 02-12-17.

It hasn't returned in 02-12-18 either.

Yes, I have it enabled in Settings > Status bar > Status bar icons > SU indicator. Yes, have developer options on and root access set to Apps and ADB.

Also, I use an app called Power Menu and I use to to reboot into recovery or turn off my phone instead of the hardware button on the right.

LinageOS' Privacy Guard doesn't save the setting even when I check "Remember my choice." It's never sticky. and if I do nothing, after about 10 seconds, the warning info box disappears and a green screen shows up and says, "Reboot Recovery. Rebooting..." but just spins and stays on the screen. I'm able to back out of it, but it shouldn't show up.

Combined Screenshot below, along with the missing # SU indicator:

http://imgur.com/a/h9Cz5
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] liguangming1981:
I've noticed the battery percentage not changing for a long time bug as well, but only once. Otherwise, it's been pretty normal.

Still not really satisfied with the battery life of this ROM, but that's probably got more to do with the fact that I always need to use a VPN when I'm on mobile to overcome Chinese internet censorship. Not a lot I can do about that. :(
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] IndDoc:
Your battery needs replacing. Try MIUI stable version and see if the same bug happens. If yes, then your battery is busted.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Did you read the changelog? Install latest version.

SU indicator works fine here, btw it appears only if something uses root access at the moment, it's not there all the time.

Privacy Guard saving the granted root access settings is kinda buggy with some apps... Open it and change it to Allowed manually for that app and it will remember it. I have made some changes in that regard for the next build... we'll see if fixes it.

I can't help with third party apps.

Maybe you are right about VPN draining battery... I have my probable cause too so I am reverting some changes for the next build.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] troyinjapan:
OK. I'll try and figure that out now. However, in the 02-01-17 rom, the SU # symbol was didn't disappear. It was always there, regardless if something was using root access (on Helium). Thanks for the information.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dungphp:
I like somethings:

- Change Ringtone to others sound files

- Unlock by fingerprint when locked by others app
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Tysovwik:
Which su more stable for this ROM? Default super user or preferred by me super su 2.79 sr3? Btw, why almost every ROM makers prefer super user?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] luminouche:
Hi

Today's battery report.

Last night, 45 %

Woke up at 45 %

In less than 1 minute, battery displayed refreshed at 42%

I think it's simply a display battery refresh problem, due to a long time of inactivity. Nougat issue ?

No, my battery is not busted lol, never had this issue with stable MIUI, battery percentage dicrease percent by percent, no problem.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dungphp:
When shot the landscape pictures but view just portstraight, not auto
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] paarkhi:
Yes, I also face this problem on Ressurection Remix so it must be a Nougat LineageOS based problem, I was also on MIUI Nougat beta but never faced this kind of problem.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] aaryan45:
Yes! this is issue in every nougat rom available out there! By Devs like [MENTION=7366109]marchetto96[/MENTION] [MENTION=1097804]sawdoctor[/MENTION] [MENTION=4910973]Vatsal[/MENTION] [MENTION=5857684]TheStrix[/MENTION] And my Battery is not busted! I was on MIUI Nougat I didnt had this issue!
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] ikaros80:
same problem with battery, i sleep with 75 wake up with 74 and after connect to internet and take my emails 64
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] yupiter00:
Anybody have an advice how could I get back my settings if I marked as private app?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Jerry08:
There, 3% battery drop.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Jerry08:
That's not report, attach last_kmsg, logcat and dmsg like nijel8 asked to. You're not helpful this way.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Was the drop about 45 seconds after wake up?

.....................
02-21 22:08:30.781 1151 1198 I BatteryStatsImpl: Resetting battery stats: [B]level=93[/B] status=2 dischargeLevel=93 lowAmount=56 highAmount=57
....................
02-22 06:04:42.902 1151 2552 I PowerManagerService: Waking up from dozing (uid 1000)...
...................
02-22 06:05:28.897 4443 4443 I BatteryReceiver: now=1487739928897 source=BATTERY [B]level=0.9[/B] health=GOOD
.....................
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Jerry08:
No it was later, like 3mins or so(not sure about exact time tho) while browsing Firefox from 93% to 90%...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Tysovwik:
nijel8, today i clean flash on hydrogen your TWRP and latest rom 21.02.17 + open gaps pico + unsu patch from lineage os+ superSU 2.79 SR3, stock kernel.

For some reason userdata encrypted by default.

What should i do to decrypt it?

Thank you.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] kurodoll:
I just realized that when viewing sd card through USB (MTP Default) that only the folders Android and Lost.dir is available. Can anybody help me to view all the cards contents? BTW I can view the card just fine on MIUI and TWRP recovery. Thank you
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] eseregin:
What file system on SD card?

I can see SD card without problems... Though it is FAT32 formated
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] kurodoll:
im not sure how to check for file system on android but im pretty sure its FAT32. Anyway i have a new finding. new files and folders are viewable but previous folders are not.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] eseregin:
Mmmm... It might be, think, that there is something strange with MTP - for example i have removed some folders, go back to see free space - and same free size as if i did not removed files... Even disconnected phone from USB and connect again - same free space. Anybody has it as well?

PS

Sorry, after some time it updated free space, now all good 8-)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] kurodoll:
did that with me too although I only checked in solid explorer. i did not get to check in android storage settings
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] troyinjapan:
Major, noticeable differences from 02-18-17 to the latest 02-21-17. Everything feels snappier...way snappier, especially just browsing the internet on my phone.

Thanks for the update!
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Are you sure? I enforced encryption for testing in my internal build once but I never released any Lineage with enforced encryption so. Are you coming from MIUI using my TWRP? MIUI encrypts userdata and my TWRP works with it so you probably forgot to format it and now it is encrypted. Lineage doesn't have problems with MIUI encrypted partitions either.

Go back to TWRP(my), make sure "use rm -f..." in settings is not checked, copy internal storage to PC "adb pull /sdcard/", backup userdata, FACTORY RESET, restore userdata backup, BOOT TO LINEAGE (very important!!!) and copy back internal storage from PC "adb push * /sdcard". DO NOT COPY INTERNAL STORAGE FROM PC IN TWRP... THERE ARE ISSUES ACCESSING IT AFTER!!!.

Edit: I read your post on 4PDA and looks like I was right about what you did... Just do what I said above...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Tysovwik:
Probably you are right, i formated everything, but dont touch a button " format data".

Right now everything is fine.

---------- Post added at 04:42 PM ---------- Previous post was at 04:37 PM ----------

Does your rom works fine with harfix r2 kernel?

I wants a functionality to sound boost, which your stock kernel does not have :(
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] kyler084:
I've been using harfix kernel on my Helium and all seems good to me :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Tysovwik:
What best settings for perfomance/bettery life? Currently i use both interactive + 1 big core online.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Jerry08:
I looked again in log cause had no time in work. And I think u were right with timing of battery drop. It happened in Firefox and when it dropped I went to kernel adiutor and copied logs.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] kyler084:
I can't really say I've tweaked anything in the kernel yet, left as standard and I'm getting 9-11 hours of sot
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
I'll take a look at it... I haven't checked it yet but seems to me that BatteryReceiver is not a part of Android and I noticed you have some battery monitor app installed which might have something to do with the problem... We'll see when I get to it...