yashsingh1/xdaforums huggingface dataset:
[T-Mobile Galaxy Note 4 General] egren58:
As off now yess. Might beed to wait for the s6 and the story might change i myself might go back to the S serious if all the hype and rumors are true.
[T-Mobile Galaxy Note 4 General] AngryDinosaur:
Nice
[XDA Assist] brege:
I have samsung galxy s3, i back up data using samsung kies before installing android 4.4.4 cyanogenmod. after successful installing this rom, i tried to restore backed up data using kies but it fails as it is rooted. so can u help me restore my data in any other way.

The back up data are on my laptop in samsung kies backup folder.

u can also send me a solution through marvellous151@gmail.com
[XDA Assist] Heisenberg:
Hi :)

Thanks for writing to us at XDA Assist. I can see you've also created the same topic here:

[HELP THREAD] Ask ANY Question. Noob Friendly

Please refer to the XDA Forum Rules for information regarding the creation of duplicate posts/threads. I'm going to let the good people in the q&a thread linked to above help you out on this one as they're the most qualified.

Good luck!

Thread closed.
[Nexus 9 Q&A, Help & Troubleshooting] Beta1440:
I'm looking for up-to-date 64bit Gapps but I'm not sure where to find them.
[Nexus 9 Q&A, Help & Troubleshooting] jd1639:
https://www.androidfilehost.com/?fid=95832962473399918
[Nexus 9 Q&A, Help & Troubleshooting] Max128:
This one yes but is not really up to date..
[Nexus 9 Q&A, Help & Troubleshooting] y2whisper:
don't think anyone has put one together. for now its just install and then let the apps update.
[Nexus 9 Q&A, Help & Troubleshooting] smac0628:
Updated GApps

Check the Themes and Apps section. I make a GApps pack for Dirty Unicorns. I have posted it in Themes and Apps.
[LG G Watch R] rkboid:
Is there an app that utilizes the built in barometer to display pressure trend over time? The barometer was a big reason I picked this watch.

Thanks
[LG G Watch R] neo11110:
barometer

install watchmaker and you 'll could add barometer on your watchfaces as you want
[LG G Watch R] Palyancodr:
Check out ToolX on google play
[Android Q&A, Help & Troubleshooting] intxeon:
Hi

I'm trying to extract some files and folders into the internal sdcard from recovery.

To start I inserted in the updater-script something like that:

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");

mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data");

package_extract_file("data/tool.zip", "/data/media/0/tool.zip");

set_perm(0, 0, 0777, "/data/media/0/tool.zip");

but what I get it's a tool.zip file in internal sdcard of 0 byte that I cannot open or even delete.

How can I solve?

I'm on galaxy s5
[Android Q&A, Help & Troubleshooting] _alexndr:
Try this instead of set_perm:

set_metadata("/data/media/0/tool.zip", "uid", 1023, "gid", 1023, "mode", 0777, "capabilities", 0x0, "selabel", "u:object_r:media_rw_data_file:s0");
[Android Q&A, Help & Troubleshooting] intxeon:
Yeah works well

I can use this string also to set permission on a folder?

Thank you
[Android Q&A, Help & Troubleshooting] _alexndr:
Of course :)

But it's better idea to use set_metadata_recursive:

set_metadata_recursive("/data/media/0/folder_name", "uid", 1023, "gid", 1023, "dmode", 0777, "fmode", 0777, "capabilities", 0x0, "selabel", "u:object_r:media_rw_data_file:s0");

You can set permissions for folder and files inside by one command this way :)
[G3 Q&A, Help & Troubleshooting] thornofcarrion:
I am using LG G3 D855 on Lollipop 5.0:

Kernel 3.4.0

Build : LRX21R.A1421650137

S/w : V20h-TWN-XX

My set heats up a lot when I use it on 4G. On wifi, it runs ok...warm not heated. Today, I was on a Skype call, made though 4G and the set heated up to the point it restarted. Please help me out.

Thanks.
[G3 Q&A, Help & Troubleshooting] Robshr:
Are you using a case if so try it without the case on and see if that helps some cases cause a real heat issue with this phone
[G3 Q&A, Help & Troubleshooting] thornofcarrion:
Thanks, I will try that. I can sense the power and volume buttons getting really hot and they are not covered.

Someone told me to use a firmware from different region. Its my first time withLG and I am not sure about it. It was much simpler with my Samsung S5.
[JAMin, XDA Neo, S200 Software Upgrading] skyeking69:
I have an O2 Neo with AKU 2.2 Jesterz b1

I tried to enter the password for my gprs wap settings

3 digits....I wouldn't connect...I check the the settings

and the password went from 3 digits to 16 ??? re-set it

a few times and the same thing happend???

Any ideas on this one ?:confused:
[JAMin, XDA Neo, S200 Software Upgrading] mccune:
Do you mean you see 16 times the * on your screen?

Because some programms mask the password field with more characters than you've actually typed. The reason for this is so other people can't guess the password ;)
[JAMin, XDA Neo, S200 Software Upgrading] dmc3:
is this the same issue as the popular "master lock reset" problem?

that's why i revert my Dopod to aku3.5,waiting for smart1's v3,hope he'll fix this issue...
[JAMin, XDA Neo, S200 Software Upgrading] skyeking69:
Where can I find AKU 3.5 ???
[Xiaomi Mi 2] m11kkaa:
Introduction

This is a collection of Tools and Resources for Flashing Mi2(s)(c).

MiFlash4Linux

https://github.com/M1cha/aries-image-builder

Core Recovery Package for MiFlash

This is a small package to Recovery MI2 from any bricked state. It has the following advantages over the official ones from Xiaomi:

They don't flash any ROM, just the core system(bootloaders, modem and recovery)

They are small which means both Download and Installation are faster

It directly installs custom Bootloader and TWRP. That means you easily get your device back to a modded status.

Please follow the official MiFlash guidelines for installation with the following differences:

the DLOAD config is called rawprogram_core.xml

the fastboot script is called flash_core.bat(or flash_core.sh for linux)

there's a script called flash_partition_table_and_core which is a alternative to flash_core.bat/sh.

It can be used to change the partition table.

USE THIS WITH THE CUSTOM BOOTLOADER INSTALLED BY ONE OF THE CORE PACKAGES ONLY. Xiaomi's bootloader will format your whole MMC device. THIS WOULD ERASE YOUR EFS AND YOU CAN'T MAKE CALLS ANYMORE

Changing the partition table

There are multiple packages available:

separated: Xiaomi's original layout with a virtual internal sdcard

separated_single: same as separated but without Dualsystem and bigger system partitions

unified: Xiaomi's new layout with /data/media support

unified_single: same as unified but without Dualsystem and bigger system partitions

unified_single_xiaomi: Xiaomi's version of unified_single

Installation:

Backup all your data(including internal sdcard, and EFS just to be safe)

if you don't use the custom Bootloader yet, flash this package using flash_core.bat/sh first. See the big red warning above for more information

flash the package using flash_partition_table_and_core.bat/sh

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.

Version Information

Bootloader: https://github.com/M1cha/mi2_lk/commits/LA.AF.1.1-02810-8064.0

TWRP: v2.8.7.0

core partitions: aries_images_5.7.16_20150626.0000.4_5.0_cn_a63cddccfa.tgz

Download links for Mobile users:

aries_core_unified_single_xiaomi.zip

aries_core_unified_single.zip

aries_core_unified.zip

aries_core_separated_single.zip

aries_core_separated.zip

XDA:DevDB Information

Flashtools, Tool/Utility for the Xiaomi Mi 2

Contributors

m11kkaa

Source Code: https://github.com/M1cha/aries-image-builder

Version Information

Status: Stable

Created 2015-02-21

Last Updated 2015-07-27
[Xiaomi Mi 2] linuxxxx:
First :P (as always)

Sent from my A0001
[Xiaomi Mi 2] m11kkaa:
the singleboot packages causes the latest version of CM12 to fail booting because of SELinux enforcing. I'll upload a fixed package asap.
[Xiaomi Mi 2] m11kkaa:
everything has been fixed and is up again.

Pls download everything again(especially MiFlash4Linux if u use that).
[Xiaomi Mi 2] acastrocab:
i think i will wait util the release of GRUB4Android....
[Xiaomi Mi 2] m11kkaa:
the purpose of this thread is not G4A :)

G4A doesn't allow u to change the partition table. I may publish a simple tool for it though.(so u don't need a computer).
[Xiaomi Mi 2] MyNameIsKappa:
Hey m11kkaa, I'm sorry for the noob question, but where can I download the files for windows? And how should I use them? I can't understand from the OP. Thanks in advantage for your help
[Xiaomi Mi 2] laolang_cool:
On the top of the page just followed by the title, there is a "Download" tab, you could find the miracle at there ;p
[Xiaomi Mi 2] ancics:
I can't find the links too, but i saw this link in another thread... http://xdaforums.com/devdb/project/?id=8360#downloads
[Xiaomi Mi 2] m11kkaa:
You can see this with a computer only.(Tapatalk doesn't work)

http://puu.sh/gamlY/dd7e4904f9.png
[Xiaomi Mi 2] ancics:
Hey M1cha, thank you! Great job!

I have some issues about the procedure:

1. I am not sure if already had a custom bootloader, so first i'll flash the package flash_core.bat :

- turn on mi2s in fastboot mode

- plug usb, device should appear in miflash(the program should be configured as the photo?)

- and click flash

- reboot phone, enter in fastboot mode again and do the same procedure with flash_partition_table_and_core.bat

Is that right?

It's easy to recreate the ext4 filesystem in TWRP? always used CWM....
[Xiaomi Mi 2] MyNameIsKappa:
Oh that's why, I'll download it from a computer, thanks!
[Xiaomi Mi 2] cogano:
[MENTION=3530648]m11kkaa[/MENTION]: thnx for the linux tools/scripts, it made my migration from CWM to single-system partition + new bootloader + TWRP easier.

BTW, I just wanted to migrate and keep my current CM11 for the time being. I had to fight a bit with restore from backup because I was not aware of the incompatibility between CWM and TWRP, luckily enough it eventually was sufficient to:

reformat system, data and cache in TWRP

flash the old CWM temporarily and restore boot, system and data

flash TWRP again and make new backups.

Proposal:

It would be good if you can change the heading style of "Installation" in the OP to be the same as e.g "Introduction", because now it looks like part of "Singleboot Partition Layout" section only. It is confusing IMHO.

In my case (i.e. flashing both flash_core.sh and then flash_partition_table_and_core.sh), I had to recreate ext4 FS not only on the system partition in TWRP, but also on the data partition (it could not be mounted and TWRP announced 0 MB size) and eventually also on the cache partition. This seems to contradict the info in OP, part "Singleboot Partition Layout", which mentions that data will be preserved.
[Xiaomi Mi 2] m11kkaa:
[MENTION=1626944]cogano[/MENTION] thx for your feedback :)

it's weird that u had to recreate the filesystems because the positions of these partitions still are the same. I resized system1, modem1 and boot1 to 2KB and system, modem and boot to 2*oldsize-2KB. I checked the offsets and they still are the same.
[Xiaomi Mi 2] cogano:
I have another phone and plan to do the same some time in the next week.

I'll try to avoid the trial&error approach and keep notes between the steps.

P. S. I am quite proficient with Linux administration. However I have to admit that upgrading android devices is usually a risky thing: I would have to read lot of guides - often unclear and confusing - or just give it a go and resolve the problems as they appear. The latter one eventually seems to be faster :)
[Xiaomi Mi 2] m11kkaa:
thx :) "parted /dev/block/mmcblk0 p" will help to debug these things.

If you don't have a ROM/Recovery with parted you can reboot to dload from the bootloader which will provide ur whole MMC as a usb drive to your computer.
[Xiaomi Mi 2] superiyezi:
i didn't see the download tab at first, so i downloaded the whole zip from the github and excuted the ./build.sh in Cygwin. Anyway, it works!
[Xiaomi Mi 2] cogano:
What a great feature!
[Xiaomi Mi 2] Fortinho:
There's a Download "card" on top.
[Xiaomi Mi 2] T3sla:
What are the partitions sizes after flashing the singleboot partition layout?
[Xiaomi Mi 2] m11kkaa:
Model: Qualcomm MMC Storage (scsi)
Disk /dev/sdc: 31.3GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 17.4kB 178MB 178MB fat16 modem msftdata
2 178MB 178MB 1024B fat16 msftdata
3 178MB 179MB 524kB sbl1
4 179MB 179MB 524kB sbl2
5 179MB 180MB 1049kB sbl3
6 180MB 181MB 1049kB rpm
7 181MB 182MB 1049kB tz
8 182MB 183MB 524kB DDR
9 183MB 187MB 4194kB aboot
10 187MB 188MB 1049kB misc
11 188MB 191MB 2990kB logo
12 191MB 192MB 799kB m9kefs1
13 192MB 193MB 799kB m9kefs2
14 193MB 193MB 1024B m9kefsc
15 193MB 201MB 8501kB bk1
16 201MB 202MB 799kB m9kefs3
17 202MB 268MB 66.3MB bk2
18 268MB 300MB 31.5MB boot
19 300MB 300MB 1024B
20 300MB 316MB 15.7MB recovery
21 316MB 327MB 11.5MB bk3
22 327MB 336MB 8389kB ext4 persist
23 336MB 1409MB 1074MB ext4 system
24 1409MB 1409MB 1024B
25 1409MB 1812MB 403MB ext4 cache
26 1812MB 5570MB 3758MB ext4 userdata
27 5570MB 31.3GB 25.7GB ext4 storage
[Xiaomi Mi 2] ancics:
Thanks man!

I was afraid to screw up my phone, but it's simple..

CM12 in running smooth... better than Ivan's AOSP!
[Xiaomi Mi 2] T3sla:
[MENTION=3530648]m11kkaa[/MENTION] so we can't really eliminate system1 from the map even if it has zero size?Also i see that cache is quite big for cm12 compared to cm11 in which 10 mbs were enough.
[Xiaomi Mi 2] m11kkaa:
we can remove them but some ROM's (including cm12) use some hardcoded partition numbers.
[Xiaomi Mi 2] cogano:
[MENTION=3530648]m11kkaa[/MENTION]: you were right. The reason why the new partition layout screwed my system0 + userdata was that some time ago I applied the (possibly your) script for increasing system0 and system1, moving cache and decreasing userdata. Other partition offsets remained the same.

23 336MB 1176MB 840MB ext4 system msftdata
24 1176MB 2016MB 840MB ext2 system1 msftdata
25 2016MB 2419MB 403MB ext4 cache msftdata
26 2419MB 5570MB 3151MB ext4 userdata msftdata

Mea culpa, certainly: the OP refers to the standard layout.

BTW, the old CWM included "parted" binary, while the new TWRP does not. Good enough the bootloader goes to Download Mode.
[Xiaomi Mi 2] XaoDefy:
I resized the partitions some time ago, but I'm not sure if the script will work or if I need to bring the original partitions sizes before apply the script :confused:.
[Xiaomi Mi 2] Bucci:
dear all,

I already re-partitioned my Mi2S for Lollipop system, I never will use dual boot etc... but now I have to increase user data volume, I updated repartition.sh script for my purposes, but I would like to know if it will work (I'm not programer) so there could be some mistakes and I would like to ask You if I can use it or not...

my current partition table is:

Number Start End Size File system Name F
1 17.4kB 89.1MB 89.1MB fat16 modem
2 89.1MB 178MB 89.1MB fat16 modem1
3 178MB 179MB 524kB sbl1
4 179MB 179MB 524kB sbl2
5 179MB 180MB 1049kB sbl3
6 180MB 181MB 1049kB rpm
7 181MB 182MB 1049kB tz
8 182MB 183MB 524kB DDR
9 183MB 187MB 4194kB aboot
10 187MB 188MB 1049kB misc
11 188MB 191MB 2990kB logo
12 191MB 192MB 799kB m9kefs1
13 192MB 193MB 799kB m9kefs2
14 193MB 193MB 1024B m9kefsc
15 193MB 201MB 8501kB bk1
16 201MB 202MB 799kB m9kefs3
17 202MB 268MB 66.3MB bk2
18 268MB 284MB 15.7MB boot
19 284MB 300MB 15.7MB boot1
20 300MB 316MB 15.7MB recovery
21 316MB 327MB 11.5MB bk3
22 327MB 336MB 8389kB ext4 persist
23 336MB 1360MB 1024MB ext4 system
24 1360MB 1897MB 537MB ext4 system1
25 1897MB 2300MB 403MB ext4 cache
26 2300MB 5570MB 3270MB ext4 userdata
27 5570MB 31.3GB 25.7GB ext4 storage
[Xiaomi Mi 2] sammirati:
My MI-2S doesn't switch to 9006 after download hex and mbn. If remain in 9008 never end the miflash procedure. It's a long time I'm trying to rescue from this hard brick. :(
[Xiaomi Mi 2] Bucci:
so my repartition script works well, if someone wants to use it:

just be noticed - this script don't contain 23 - system partition - this I already changed in the past to 1 GB...

23 336MB 1360MB 1024MB ext4 system
24 1360MB 1361MB 1024KB ext4 system1
25 1361MB 1764MB 403MB ext4 cache
26 1764MB 7544MB 5570MB ext4 userdata
27 7544MB 31.3GB 21.7GB ext4 storage
[Xiaomi Mi 2] No1Alien:
system pattern returned

Hello, I flash your Singleboot Partition Layout, after that, I wipe the system partition, it shows 1006MB, but when I flash a ROM, it would become 503MB. What happen and what should I do? (Ignore my broken English:))
[Xiaomi Mi 2] Bucci:
that could be a problem of partition recognition by the rom, I had similar behavior for early Ivan's build, but for CM12 from M1cha it works well
[Xiaomi Mi 2] bzz11g:
[MENTION=3530648]m11kkaa[/MENTION] can you make step by step manual how to resize phone partitions and make it single system?
[Xiaomi Mi 2] Aternus:
Short Guide for Flashing the new MIUI V6

# Android Lollipop Flashing - Short Guide for Flashing the new MIUI V6

- By using "MiPhone", flash the latest fastboot image of MIUI (cn).

- By using "/recovery/aries_core_recovery_single/flash_core.bat", prepare the phone with a custom bootloader and TWRP

- By using "/recovery/aries_core_recovery_single/flash_partition_table_and_core.bat", prepare the phone for a large system partition.

- Boot to Recovery

- By using "Wipe", wipe "system, data, cache, internal storage". This will format and update the partitions for the new ROM.

- Reboot to Recovery

- Transfer the ROM file to Internal Storage

- Flash the ROM file

- Reboot

- Wait about 10min for the ROM to boot (!)
[Xiaomi Mi 2] cogano:
Follow the steps laid out by aternus and flash ROM of your choice, not just MIUI v6.
[Xiaomi Mi 2] Bucci:
this could be a problem of the rom, what kind of it did you flash?

I got some problems with 1st builds from ivan of his Lollipop, and also M1cha's CM12 unofficial started with it... let it as it is or flash another rom

you can easily check current status via adb

adb shell
su
parted /dev/block/mmcblk0 print
[Xiaomi Mi 2] toncekofficial:
Hi [MENTION=3530648]m11kkaa[/MENTION] im using g4a and twrp from this zip... I have problem-if i make backup (from twrp) and i want to restore it twrp cant see my backup. In file explorer (folder - sdcard/twrp/backups/) i see this backup... What is wrong?

Thx for your work and answer...
[Xiaomi Mi 2] nickbananaboy:
about download

I can't see any file in download

is it because I haven't post over 10 post?

or someone can give me the file mirror?

thanks
[Xiaomi Mi 2] nickbananaboy:
It's simply the browser problem

change to chrome solve it all.
[Xiaomi Mi 2] Bris3r_BlaDe:
thx for the work!

i´m all set up, but what nvboot script do i choose???

thx for the help
[Xiaomi Mi 2] 381692113:
The TWRP Recovery can be changed by others？:confused:
[Xiaomi Mi 2] T3sla:
It's the best recovery at the moment so why change it?Yes you can.
[Xiaomi Mi 2] 2ConHeo:
Help

I accidentally deleted partition 2 now I do? Now I can just boot into bootloader
[Xiaomi Mi 2] bobanbg:
i've found a method from xiaomi to unify storage and userdata... i can't post the link but if you search " [Tools, Tips & Tutorials] Guide to Repartitioning of Mi 2/2S Through Fastboot Flashing" on the official english forum you'll find it.

It is good for us, isn't it?
[Xiaomi Mi 2] Zosenko:
Complet package

When do you publish complet package MiFlash4Linux + GRUB? Or how i can use MiFlash4Linux for install new custom ROM without rewriting fastboot? Or do you have some guide for using your tool? How i can use Download Mode? Do you publish all complet package for Xiaomi MI2(S) only or other devices?
[Xiaomi Mi 2] B3!CrAZy:
Sorry guys but is there a way to resize partitions without that whole tool. I mean - i already have twrp so how should i proceed with install?

...Mi2SC
[Xiaomi Mi 2] m11kkaa:
GRUB won't be released as a flashable package. There will be a installer.

these miflash packages just contain modified partition tables. They can't be used to manually modify the layout.
[Xiaomi Mi 2] XperianPro:
You really should have put this on other forums also,I didn't know until today you made this :D

Great work,btw cant wait for full GRUB.
[Xiaomi Mi 2] Zosenko:
OK, i understand but when and where you publish full GRUB, please? And second question is how i can use your MIFlash4Linux, i flashed on my MI2S without problems and i can make a choice on boot, but i dont know how i can install new custom ROM with MIFlas4Linux, or how i can boot from a .img file? Do you have a guide for using MIFlash4Linux? Maybe i am little bit stupid but i look for reasonable using this tool. Thanks.
[Xiaomi Mi 2] T3sla:
You don't need MiFlash for installing custom rom, use your recovery to do that, TWRP or clockworkmod.
[Xiaomi Mi 2] dreadlocked:
Hi,

Merged partitions with mi pc tools (flashed beta) //en.miui.***/thread-107586-1-1.html

Had an issue but with fastboot /miflash and fastboot rom 4.sometihing i got up to MIUI 5.5.22 android 5.0.2.

Now I tried to fastboot flash my recovery.img (twrp, cwm etc), because update.zip via recovery could not apply update.

Now I cannot acces my recovery, if I go to recovey it hangs on mi logo.

Is there anyway to get a recovery again so I can install something else then MIUI?

Also tried rashr play.google.com/store/apps/details?id=de.mkrtchyan.recoverytools&hl=nl but still same effect cannot get into recovery

Prolly need a recovery that can handle the 1 partition or something?

Any ideas to resolve my problem?

here's how my storage is now:

System storage

Available 19.41 GB

Total 29GB

many thanks
[Xiaomi Mi 2] CBpbxEcmecmBeH:
look at xiaomi.eu

the problem was, i think, with the bootloader (you need an older verison before flashing recovery), but now everything should be available in a zip format. using googe translate you can also find answers on 4pda.ru/forum
[Xiaomi Mi 2] Zosenko:
Hi [MENTION=4438984]T3sla[/MENTION] and [MENTION=3530648]m11kkaa[/MENTION] i know that i dont need MIFlash for flash custom ROM via CWM, but after flash i lose Miflash because custom ROM bootloader, and i'm interesting how i can use MIflash without GRUB for flashing or better say booting from other bootloader or image. And that is it why i ask for GRUB prebuilding for Xiaomi MI2S and when i can download? Because for the moment Miflash is not usable for nothing just for booting into System1 and System2. It really absent GRUB on binary version. Thanks for understanding.
[Xiaomi Mi 2] youxiaojie:
hello,I flash core using flash_core.sh(download source code and run build.sh,the flash_core.sh will show in "out" directory),after that I got grub4android with original partition layout and it boot system1 ok.whereas I got some red errors---see pictures attached and when I boot grub my phone get black no shows.why?BTW,I want ask:I fine a line in the filepartition_single.xml " <primary bootable="false" label="storage" size="0" readonly="false" filename="storage.img" type="0xE47D47D8693D798E477284830FC63DAF" uniqueguid="0x1465B188DA84162C5F48DEA445420DAF" />" does it erase the internal sd card?
[Xiaomi Mi 2] m11kkaa:
sry but I don't really get your question(s).

GRUB will be released when it's ready and atm CM12.1 has high priority.

all the red error messages are "normal". You can't boot GRUB because u didn't install it. Even if you would it won't work because the GRUB loader in the published version of the bootloader is very old.

your sdcard should not get wiped using flash_core.sh
[Xiaomi Mi 2] youxiaojie:
I do not find the red errors in your picture attached,why?

how to install grub?you mean that the grub is too old in this version (released on 22 feb 2015) of g4a?

my sdcard will be wiped using single system layout shell script?

BTW,I use debian linux, under linux,should I run *.sh file directly and shell script will call fastboot command to flash my phone?since then, what is the function of patch0.xml and rawprogram0.xml ?
[Xiaomi Mi 2] m11kkaa:
these xml files are for another flash mode(QDL) in case u can't even boot to fastboot.
[Xiaomi Mi 2] Bucci:
this is caused by rom, for example Ivan's roms are not prepared for bigger partition, but they are bigger, so don't worry :good::cool: