yashsingh1/xdaforums huggingface dataset:
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
You will need to (totally) delate the system partition with a good PC partition tool which supports Linux partitions (fully) & then create brand new same sized & type one (with a same name obviously). It's not a biggie right now & I am certain it will work as described (as I did it couple of time's). How ever if you wait until it gets worse & phone turns into the brick without any life sound's it won't be neither easy nor pleasant. Then you will need specific EDL (for the NAND chips used) programmatic module (which is actual hardware) in order to be able to flush the NAND & work with it. If you don't know how to deal with parturitions with partition tool pay someone who knows but do it soon.

---------- Post added at 09:05 AM ---------- Previous post was at 09:01 AM ----------

Formating won't help, dislocation will, basically creating new identical one on not exactly the same spot... PM me private when you have time I need to ask you something.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] careless_angel:
Oh, thx for your answer, community just need to delete the system partition and create it again? With current size? Ok, post down i read...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Yes you need to delete it with good partition manager on desktop (PC) so that's unallocated space after that. Then you create exactly the same size/type new one with the same name. After that go to TWRP and flash the ROM.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
TitaniumBackup can restore device ID for play store.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] coffee-turtle:
What would you consider to be a good partition manager on PC, Zola III?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Good enough...

https://gparted.org
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] coffee-turtle:
I've used, but not often, Partition Wizard's free https://minitool.com/partition-manager/partition-wizard-home.html

Their suite of tools are impressive, but I'm sure, understandably, you have to pay to really get all of the benefits.

Sometimes you need something quick and powerful so I will add gparted to my arsenal.

Thank you.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Well mine is Open source, with GUI and cross platform. Hardly something written in net framework & as pore shareware can be equivalent. Learn to embrace open source.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] judytankgirl:
Well said..
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] coffee-turtle:
Yes, that is why I thanked you for the suggestion. I was looking for something to use rather than minitool. I was just letting you know what I was familiar with for context.

Thanks again. Long Live Open Source (LLOC)! :D
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dmitriypavlov:
You only need to:

fastboot flash partition gpt_both0.bin

This will recreate the partition table on internal flash. Look here: http://en.miui.com/a-234.html

You need to download a firmware for you device and modify flash_all.sh script (or a windows one) adding a line:

./fastboot $* flash partition `dirname $0`/images/gpt_both0.bin

Executing the script in fastboot mode will recreate partition table and flash the latest stock MIUI.

Than you flash TWRP and install any custom rom.

View attachment 4467160
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] careless_angel:
thank you, where were you with your advice before?I have already remade everything with the removal of the partition using parted, the truth after the re-creation of sections why they did not want to put any firmware ...after which, in the mode edl, reflash the latest firmware from developers mui, and after this all work fine. earlier I had an error if I tried to overwrite the file on the system partition with another, I had to delete the file first, and then copy a new one, now I do it without problems.

Thanks to all the guys, you are the best)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dmitriypavlov:
Glad you've made it. I suppose the gparted advices were the April's fools ones ;)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Formating a already allocated partition & delate it physically so that you can create a new one which won't be on the same physical location are very different two things. I hope you are able to understand that formating partition (in your case erasing) won't resolve anything on dead NAND. I also hope you learned by now to NEVER EVER touch EDL partition! & if you don't do as I told you on time you end up needing flash nand programmer for specific NAND chip used.

Fastboot can't change the allocation, its a basic Google tool.

Stop making a bad jokes & false information's.

---------- Post added at 01:15 PM ---------- Previous post was at 12:58 PM ----------

Meh afterwards you could just format them from TWRP & then flash...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dmitriypavlov:
I never stated that it will fix something with dead NAND. I wrote that it will recreate PARTITION TABLE didn't I? Just like initializing new drive and creating default partitions (which is not simple to recreate in parted to average user).

By the way why would one RISIZE partition to make it not occupy dead NAND blocks? Parted could obviously help with remapping dead block (as it does with regular SSDs, but I'm not sure how phone NAND works and if remapping possible at all). Isn't recreating a partition table and full formatting faulty partitions not enough? Usually full format implies block check and dead block remap (if needed) which is done by NAND controller.

And where did you saw me mentioning messing with EDL? Spring fever...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Well as you can see it's dead NAND cells problem not a partition table one.

Resize - move... But that makes it more complicated. The creating new one is a certain & less complicated way.

I don't know what ./fastboot $* flash partition `dirname $0`/ Includes. By the way you don't use that but simply flash all command in that case.

Now get out of here & happy upcoming Easter.

Mir božiji Hristos vaskrse.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dmitriypavlov:
I didn't know that user has a faulty NAND at all (no proofs of that by the way, he didn't scan it for bad blocks) and was answering how to fix a borked partition table.

The script I posted is official Xiaomi script from ROM recovery zip (which can be flashed by Mi Flash Tool or directly in fastboot mode by one of those scripts). So stop being an "XDA superstar" and criticize technically accurate help attempts.

Let us agree that this was a slight misinterpretation of a user's problem.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] careless_angel:
I used EDL so that the markup is set according to the factory layout, since after all my manipulations with deleting and creating partitions system and userdata no firmware did not want to be installed, the system partition in TWRP wrote an error on the record when installing the firmware. Desperate, I put the phone in the mode EDL, and flashed latest miui developers. Since I thought that the firmware will help restore the phone to working condition, and was not disappointed
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
That's it! Yesterday I had a bad Indian insulting me and today it's a Russian (guess I am becoming a magnet for it).

Let me ask you when did you last time heard of a broken EXT4 partition? Then let me ask you what happens when their is a physical NAND problem on your PC SSD? Does it get locked in reed only mode? Last but not least did you take a look at attached kernel logs? So I can't be sure 100% it's NAND damage but it sure; smells, feel & looks like it.

Когда кто-то поздравляет вас с праздником, и это традиционно ужасно, это не культурно подходит для него так же.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dmitriypavlov:
I didn't insulted you, please learn how to read. I'm not russian at all, wrong guess (this insults me too).

It was you who told me to "get out" which is insulting, but I kindly pardon you bad English, as you a "brother slavic" too.

By the way if people do critisize you - it is better to rethink your own rather straightforward answers to them. Let's stop this unconstructive dialogue, "Easter lover".
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
That whose more of a friendly slang like "get out of hire, you are not serious". Sorry if you miss interpreted that & it's entirely my bad for calling you a Russian I apologise. I hope no hard feelings about that. I do find insulting that you called my attempt to help him as first April joke. You see my approach actually whare correct one. I appreciate you only tried to be helpful but please pay more attention next time. At the end we all make mistakes & I am still irritated from yesterday. After all there are better things in life so I will carry on with my holiday preparations. Best of luck to you and again happy upcoming Easter.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dmitriypavlov:
Peace, man :) Friendship and such :)

Willing to help me with my bootloop problem?

https://xdaforums.com/showpost.php?p=76123281&postcount=901
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
It seams you also have a physical NAND issues. In your case it's on the part of NAND that doesn't get filled right away when you flash fresh ROM for instance but afterwards when it tries to write on bad area. That would explain all variations you had with not working this & that, boot loop and cetera. I advise same cure but in your case delate both data & system partitions, compact not allocated space & then create new exactly identical (size, EXT4, type, name) partitions (system first!) & still you can just hope that bad NAND cells will be on the less important part of the data partition afterwards. I had this problem personally only once long time ago on Huawei phone and guess what? It whose Samsungs NAND just like on the Mi Max. Trough I did it a lot of times in the meantime mostly for friends but not in a last year or so. So people when you have a choice chose Toshiba & MLC (disregarding is it planar or 3D).
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dmitriypavlov:
Okay, it may be but I doubt it. My logic is as follows:

/System and other partitions are r/o

/Data and /cache are r/w

why does bootloop persists then when I wipe all the r/w partitions? And vanishes everytime when I reinstall /system from zip?

Besides it never happened on nijel8's ROM and happens regularly on RR.

Is it possible to get IO errors from kernel via logcat? Or force a fsck? This will clear all my doubts. What do you think?

And how do I get access to NAND with parted?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
System and handful of other partitions are mounted as read only as they aren't in the user space.

Because it obviously isn't on users space partition.

If it's still ain't happening on the nijel8 ROM you could just forget RR & RR is bigger because it's basically LineageOS with lot's of addon's slapped around the top like cream with an cherry on top.

Getting logcats never hurt anybody.

Try in ADB mode.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dmitriypavlov:
Man, I mean does Linux parted see phone in adb as simple guid drive and can deal with partitions?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
It should see all in ADB mode after all that is it's primary goal, debugging bridge.

Self stand partition managers don't use standard OS mount rules so Parted should probably work what ever way you plug the phone in but anyway try with ADB if it doesn't detect it when regularly plugged in. Unfortunately my PC is down and I don't have time to repair it so that I can check it. Mechanical drive died. ???

Edit: just checked up Romfactory used the same o kernel on 8.1 RR that this one uses so FS is the same.

Edit no2#: On Linux or as a mini boot Linux self stand live distribution Parted will see it definitely how ever you plug it in.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dmitriypavlov:
Good, man, thanks.

Will try to delete all partitions and zero-fill the whole NAND to force controller remap bad sectors. Then will recreate the partition table and see... Oh, waiting for Max 3 release to dump my helium :) Beast of a phone. Anyways thanks, will report back.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Don't do that. It will take you whole day to do that by hand. Instead delete the large one (data) & problematic one (system) compact unallocated space & then recreate System then data partitions. I will probably skip MAX 3 and wait for newer SoC & phone that will fit my needs. All tho the phone's are getting worse and worse designed so some things like 16:9 display, 3.5mm headphones jack are becoming endangered species. Luckily there are quadrupled cameras & notches to rise prices & make it less useful & more ridiculous.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dactylos:
Hi, there is low Bluetooth volume issue on this ROM.

I think this is a Xiaomi ROM issue, which has been inherited by our ROM.

Does anyone have any ideas on how to solve this?

Bluetooth volume is quite low through media and headset. I've tested this with multiple headsets on this device. Issue does not exist in other devices.

I think this issue started manifesting a couple of updates ago...but can't be sure when.

Nigel, is there any way your ROM can fix this XIAOMI issue? Wireless is here and would be a plus if you can get around this Xiaomi bug :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] careless_angel:
I certainly apologize for interfering in your friendly conversation, but I would like to add my five cents. Zolla right, because the image of the firmware is the same for all similar devices, and about the bootlug you have, after restoring the firmware from TWRP, Sew on top of the dirty current firmware and gapps, and all should earn, to me helped.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dmitriypavlov:
Didn't understand your wording, sorry. Was this google translated :) ? Are you suggesting to flash system.zip over bootlooped partition? Yes It helps, but only if I also do a factory reset. So what's the point? I already knew that and trying to fix the problem completely, not just recover a single bootloop (as I had 3 already).

I will try to use ADB shell in TWRP and do fsck -c over the NAND device to check for bad blocks. Just need to know the device path :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Met74:
Substratum not working - themes not applied... What to do?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] zobanen:
1) Reinstall Substratum.

2) Delete theme, download it again and try.

3) Try another theme.

4) Choose right variant before applying theme (you must choose "Android 7 - OMS")

I have hydrogen + nijel8 last LOS + nanoGAPPS + Magisk 16.

Main theme is SwiftBlack. Second theme is modernui, I am using only "Ubuntu" font from this theme.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Met74:
I did 1)-4). Doesnt work. Substratum app doesnt even make a request for root... I have SuperSU installed.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
[MENTION=5228099]dmitriypavlov[/MENTION]

"Any suggestions in recreating the whole partition table?"

Yes don't do it.

Delate only affected partitions and one big one that is less important & in user space (as less used & less significant & with a headroom the better) then compact unallocated space & recreate firstly the system one's & then the big one in user space you chose. The point is that you push the bad NAND blocks from the important system one's to the less important users space one which by the way is big enough so that bad blocks aren't hit often & can be simply walked around. You do understand you need to do this by hand because automatic tool will recreate them in exactly the same order meaning physically placement would remain the same. You already know suitable tool for the job & if you lack experience their is heap pile of documentation & tutorials for it available directly from official site.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dmitriypavlov:
I need to adb push parted and use it for the procedure, right?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
No download & install parted for the OS you use on a PC or if you favor more parted live image (Linux kernel with a shell & parted with a GUI on top) run it & see does it detect device with all partitions when you regularly plug it in & if not then try with phone connected in adb mode but I think it should. You don't push anything to the phone in adb or otherwise.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dmitriypavlov:
I'm using macOS. Tried latest Ubuntu live CD, but gparted doesn't see the device botted in TWRP (adb connects ok).
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Zola III:
Try with GParted Live image.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dactylos:
Ok, after a bit more digging...it looks like

system/etc/mixer_paths_wcd9326.xml has volume levels correctly set (ctl name "RX4 Digital Volume" value "88")

Which means that low bluetooth call and headphone volume is some kind bug rather than a configuration value (at least, apparently).

I've now read numerous and widespread reports of this low bluetooth volume bug. Not specific to this ROM, but with this ROM being one of the affected ones. Some other ROMs seem to be ok.

The conclusion i'm reaching is that the bluetooth volume can be artificially boosted by installing viper4android, which will allow bluetooth volume to be boosted to work around this, what appears to be, incredibly common issue with a number of ROMs.

Will report back on findings on how I go with installing the variant of v4a that works through magisk. This will hopefully do a somewhat nasty workaround for what appears to be a common issue
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Have you tried playing with Settings > Developer options > Disable absolute volume?

I and apperantly many others (or I should've heard of it) have no such issues...
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dmitriypavlov:
So I was feeling adventurous today and decided to dig into this **** completely. I didn't succeed with gparted on live CD, and decided to use TWRP's ADB. Then from ADB shell I erased the whole block NAND device. I wish I knew that fastboot was on it (thought fastboot was a hardware thing, poor me). The second mistake was rebooting from fastboot after whole NAND erase.

Then obviously I've got a brick. :)

I went trough all kind of ****, like deep-flash cable and qualcomm unbrickers just to realize how Zola III was right advising not to touch the whole NAND. Long story short, I've got qualcomm COM interface and nothing more at all. Tried to unbrick with mi flash tool 2017 but without success. The tool saw the COM port but refused to flash bootloader (waiting for hello packet).

Then I used some previous version of mi flash tool (2016), which didn't work. Accidentally I pressed volume + and - buttons and that did the trick. Phone came to true EDL mode and I flashed MIUI ROM. Than flashed TWRP and restored my backups.

Guess what? Everything's perfect. Boot time is much faster, no bootloops, no super-block errors on NAND. So I guess it wasn't faulty chip, but a messed partition table as I supposed.

Will go get myself a bottle of something strong! 6 hours of rough ****, man.

Anyways, thanks for everything. I hope my experience will help somebody. Erasing the whole NAND is not so scary :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] dactylos:
Hey there. Yes, I did try that, as it's one of the "non-intrusive" solutions that has been reported for this issue. I unfortunately didn't get any mileage out of it. Tried a reboot as well after turning that switch.

The general trend of this issue seems to be that it is encountered and reported, usually along the lines of "my phone is barely audible through a speaker/ headphone compared to another phone" then a bunch of people both agree and disagree that is an issue...and the root issue then continues to be unresolved, with it having to be worked around somehow.

Given how much this issue is reported, there is some root cause, which remains undiscovered. I suspect that the issue does get solved in some ROM updates, but resurfaces in others.

Given all that, and the long, long historical record behind the issue and some android roms, I can't expect the root issue to be resolved (or even discovered), so will try the viper4android Bluetooth volume boost :)

Thanks Nijel, at first I'd assumed this was a simple teak and could be looked at, but given how many others have faced this and left unresolved, it won't be worth the time to root cause resolve, and certainly not specific to this ROM.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] mongoload:
Thanks [MENTION=4399618]nijel8[/MENTION] for this great support for Mi Max. Been using your ROM since the first launch, it was your new years gift to us then. Will still hold on to your 7.1.2 ROM until you release your latest android version ROM. I'm sure, many fans are waiting for your new release, Project treble anyone?

More power to you [MENTION=4399618]nijel8[/MENTION]!
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Dave Hodson:
To Nijel8..

Your ROM has been superb and also your advice and approach excellent over the many months.

What are you working on these days beyond this ROM?

I am currently using a lineage15 ROM were you involved with I wonder, kernel is tours I believe.

I am sure like many many others I will be watching to see if you produce the successor to your famous Nougat ROM.

MANY THANKS.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Not much time lately for anything else but keeping this one updated...

Updated... :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Dave Hodson:
Very nice of you to reply, thanks once again.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] grey77:
[MENTION=4399618]nijel8[/MENTION], thank u for ur support!
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] bdogan1912:
Can't help but gotta say, didn't you updated the security patch to April one? Sorry its bugging me a bit, other than it, it's the best available ROM for now expecting oreo from you sooner or later :)
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] khnoizer:
Isn't that had to be done by Los team?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] nijel8:
Yep, that's right... It was still pending merge when I build last release.
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] justln:
My apps like Discord and Feedly doesn't stay open in the background, any solution to this? I've tried google'ing and checking in settings, locked the apps in task manager but they just reset and boot up again. :(
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] Dave Hodson:
Hi Nijel8, in your opinion how far off is a lineage 15 ROM for Mi Max Helium?
[Xiaomi Mi Max ROMs, Kernels, Recoveries, & Other D] oatcooky:
Did you disable Battery Optimization for. Those apps? It's in Settings, Battery, click on the top right menu.

I've been getting random disconnects on my Pebble with the last two ROMs. I don't know if it's a problem with the Bluetooth stack or the Pebble app being killed in the background.