How to install xiaomi.eu on Mi 6X with antirollback


Aug 19, 2018
36
8
20
#1
Now that antirollback is implemented, the general instructions for installing EU ROM no longer work.

This method allows you to install without needing OTG cable/usb stick.

  1. Boot TWRP
    Do not try to flash twrp, just boot to twrp (./fastboot boot TWRP_wayne.img )
    Even though TWRP is in English at boot, you must press select language and choose English (or other language) or it will switch to Chinese at the next step.
    If somehow it goes to chinese anyway, then press the bottom right hand button above the swipe box to select language
    Ignore error about decryption and press cancel when it asks for password
  2. Wipe Internal Storage to remove encryption
    Wipe -> Advanced wipe dalvik + cache + data + Internal Storage
  3. Enable MTP
    Mount -> Enable MTP
  4. Copy ROM to Internal Storage
    With MTP enabled your PC should see your phone as a hard drive.
    Copy the ROM to the phone. E.g. xiaomi.eu_multi_MI6X_V10.0.2.0.ODCCNFH_v10-8.1.zip
  5. Install ROM
    Go to Install and select the file from /data/media


Now, does anyone know where I can find that /media/data folder when i am running MIUI? I would like to get the space back. I can see it is still there if i boot to TWRP.

EDIT: To remove the ROM image and recover the space, you need to boot once more into TWRP and use adb to remove
Code:
dantheperson@danski:~/opt/adb/platform-tools$ ./adb shell
~ # cd /data/media
/data/media # rm xiaomi.eu_multi_MI6X_V10.0.2.0.ODCCNFH_v10-8.1.zip

/data/media # df -h .
Filesystem                Size      Used Available Use% Mounted on
/dev/block/mmcblk0p64
                         50.4G      2.9G     47.4G   6% /data
 
Last edited:
Aug 19, 2018
36
8
20
#3
Hrm. Still don't see it. I try adb shell but /sdcard just looks the same it appears on the PC as MTP device.
Yet when i boot to TWRP the file system looks very different.

Code:
wayne:/sdcard $ ls -l
total 32
drwxrwx--x 3 root sdcard_rw 4096 2018-09-06 21:59 Android
drwxrwx--x 3 root sdcard_rw 4096 2018-09-06 21:59 MIUI
drwxrwx--x 2 root sdcard_rw 4096 2018-09-06 22:56 TWRP
drwxrwx--x 4 root sdcard_rw 4096 2018-09-06 22:09 browser
-rw-rw---- 1 root sdcard_rw    2 2018-09-06 22:59 dctp
-rw-rw---- 1 root sdcard_rw   74 2018-09-06 22:59 did
drwxrwx--x 2 root sdcard_rw 4096 2018-09-06 22:00 mi_drive
drwxrwx--x 3 root sdcard_rw 4096 2018-09-06 22:59 tencent
 
Aug 19, 2018
36
8
20
#6
I think it's the multi user stuff hiding it? Now after i have installed MIUI10, if i reboot to TWRP things look different. MTP in TWRP is exporting /data/media/0 over USB, but before it was exporting /data/media

From adb shell when booted to TWRP
Code:
/data/media/0 # ls -l
drwxrwxr-x    3 media_rw     media_rw          4096 Sep  6 09:59 Android
drwxrwxr-x    5 media_rw     media_rw          4096 Sep  7 07:36 DCIM
drwxrwxr-x    4 media_rw     media_rw          4096 Sep  7 06:55 MIUI
drwxrwxr-x    3 media_rw     media_rw          4096 Sep  8 10:22 Pictures
drwxrwxrwx    2 media_rw     media_rw          4096 Sep  6 10:56 TWRP
drwxrwxr-x    6 media_rw     media_rw          4096 Sep  7 14:00 WhatsApp
drwxrwxr-x    4 media_rw     media_rw          4096 Sep  6 10:09 browser
-rw-rw-r--    1 media_rw     media_rw             0 Sep  8 10:26 dantest.txt
-rw-rw-r--    1 media_rw     media_rw             2 Sep  8 10:10 dctp
-rw-rw-r--    1 media_rw     media_rw            74 Sep  8 10:10 did
drwxrwxr-x    2 media_rw     media_rw          4096 Sep  6 10:00 mi_drive
drwxrwxr-x    3 media_rw     media_rw          4096 Sep  8 10:12 romtoolbox
drwxrwxr-x    3 media_rw     media_rw          4096 Sep  6 10:59 tencent

/data/media/0 # ls -l ..
drwxrwx---   12 media_rw     media_rw          4096 Sep  8 10:26 0
drwxrwxr-x    2 media_rw     media_rw          4096 Mar  6  1970 obb
-rw-rw-r--    1 root         root         1549186394 Mar  6  1970 xiaomi.eu_multi_MI6X_V10.0.2.0.ODCCNFH_v10-8.1.zip
So anyway, the solution is to reboot to TWRP after the install and remove the file using adb shell. That's gets me 1.6Gb back

Code:
dantheperson@danski:~/opt/adb/platform-tools$ ./adb shell
~ # cd /data/media
/data/media # rm xiaomi.eu_multi_MI6X_V10.0.2.0.ODCCNFH_v10-8.1.zip 
/data/media # df -h .
Filesystem                Size      Used Available Use% Mounted on
/dev/block/mmcblk0p64
                         50.4G      2.9G     47.4G   6% /data
 
Feb 10, 2017
20
5
15
#7
Now that antirollback is implemented, the general instructions for installing EU ROM no longer work.

This method allows you to install without needing OTG cable/usb stick.

  1. Boot TWRP
    Do not try to flash twrp, just boot to twrp (./fastboot boot TWRP_wayne.img )
    Even though TWRP is in English at boot, you must press select language and choose English (or other language) or it will switch to Chinese at the next step.
    If somehow it goes to chinese anyway, then press the bottom right hand button above the swipe box to select language
    Ignore error about decryption and press cancel when it asks for password
  2. Wipe Internal Storage to remove encryption
    Wipe -> Advanced wipe dalvik + cache + data + Internal Storage
  3. Enable MTP
    Mount -> Enable MTP
  4. Copy ROM to Internal Storage
    With MTP enabled your PC should see your phone as a hard drive.
    Copy the ROM to the phone. E.g. xiaomi.eu_multi_MI6X_V10.0.2.0.ODCCNFH_v10-8.1.zip
  5. Install ROM
    Go to Install and select the file from /data/media[/CODE]

Your steps worked like a charm kind sir!! My Mi6X no longer runs a ****** fake rom. Much love! :D
 
Likes: dantheperson
Feb 10, 2017
20
5
15
#10
You should be able to wipe the phone just by booting TWRP. No need to flash.

But can't you just boot to the stock xiaomi recovery to perform factory reset?

Ok, let me explain my question further.

I'm going to sell my 6X, and i want to keep the stable xiaomi.eu rom on it.

Some time ago i had a xiaomi device with the eu rom on it, when i decided to sell it to a shop, i did a factory reset, and after i did, the phone ended being with no rom installed haha.

So, since i flashed the eu rom on my 6X without flashing TWRP, am i going to face the same problem ? Or does the eu stable rom already has a recovery with it ?

That old phone i had, i was forced to return home, and flash the stock rom on it, which is something i dont want to do :)

Thank you.
 
Dec 31, 2018
15
1
5
#11
with this you cant brick the mi 6x right?
If so thank you very much
(my Mi 6x hasnt arrived yet)

Edit:
As im a newbie at this kinda stuff, would someone mind to explain with further detail the step on how to remove the rom from the internal storage to me? Would really appreciate!
 
Last edited:
Dec 31, 2018
15
1
5
#16
No I didnt finish step 2, if im not mistaken it shows something that it cloudnt complete or something like that

Edit: The best way to help me would be to make a short video of what you do inside fastboot (as im a flashing newbie)
Would you mind doing something like that? I´ve seen lots of videos but none of them do this with the new antirollback stuff
 
Last edited:
Dec 31, 2018
15
1
5
#17
Ok I´ve just checked my antivar status and its on 4!! what do i do? im stuck at chinese official rom and I would like to change to xiaomi.eu rom... pls help
 

fredc

Members
Feb 4, 2019
3
0
3
#18
Ok I´ve just checked my antivar status and its on 4!! what do i do? im stuck at chinese official rom and I would like to change to xiaomi.eu rom... pls help
I successfully did this yesterday. The critical part is realizing that none of the existing recoveries (that I found) can decrypt the encryption (I was on stock 6X MIUI 10), so your only choice is to "format data" to remove the encryption.

1) to make things easier, I put everything onto a usb stick and connected to my phone, but you can probably do it without.
2) boot into TWRP ('adb reboot bootloader')
3) ignore / cancel out of the decryption prompt
4) go to wipe --> Format data -- this will delete all the user data on your device
5) then your filesystem should be writable. At this point, you can use TWRP "normally" to install the image.
 
Dec 31, 2018
15
1
5
#19
I successfully did this yesterday. The critical part is realizing that none of the existing recoveries (that I found) can decrypt the encryption (I was on stock 6X MIUI 10), so your only choice is to "format data" to remove the encryption.

1) to make things easier, I put everything onto a usb stick and connected to my phone, but you can probably do it without.
2) boot into TWRP ('adb reboot bootloader')
3) ignore / cancel out of the decryption prompt
4) go to wipe --> Format data -- this will delete all the user data on your device
5) then your filesystem should be writable. At this point, you can use TWRP "normally" to install the image.
Let me see If I got things right...
1. In step 1 that you mentioned the USB stick, I don't have an OTG cable but I suppose doing the same thing on the PC it's just the same?

2. In your step 2 do boot into TWRP or do I flash it and then boot to TWRP, following the original post I suppose I just boot in to it right? Also, I used fastboot boor twrp.img instead of adb reboot bootloader, but I guess its the same thing?

3. In your step 4, do I follow your steps or the steps in the original post?(step 2 of the original)

4. In your step 5, when you say normally, do you say the way Ingbrzy mentions* in all of the MIUI releases? If not, could you guide me through those steps?

*
Installation via TWRP:
- Download zip to internal storage
- Updater - Menu (...) - Reboot to Recovery
- Install - Select zip
- Reboot
- Done


Sorry for all my newbie questions, but thanks a lot for the info
Cheers
 
Last edited:
Likes: YusufKaya

fredc

Members
Feb 4, 2019
3
0
3
#20
Let me see If I got things right...
1. In step 1 that you mentioned the USB stick, I don't have an OTG cable but I suppose doing the same thing on the PC it's just the same?

2. In your step 2 do boot into TWRP or do I flash it and then boot to TWRP, following the original post I suppose I just boot in to it right? Also, I used fastboot boor twrp.img instead of adb reboot bootloader, but I guess its the same thing?

3. In your step 4, do I follow your steps or the steps in the original post?(step 2 of the original)

4. In your step 5, when you say normally, do you say the way Ingbrzy mentions* in all of the MIUI releases? If not, could you guide me through those steps?

*
Installation via TWRP:
- Download zip to internal storage
- Updater - Menu (...) - Reboot to Recovery
- Install - Select zip
- Reboot
- Done


Sorry for all my newbie questions, but thanks a lot for the info
Cheers
I'm putting the original instructions below: the main edit is "Format Data" instead of "Wipe Internal Storage".

Additional notes: I couldn't get MTP to work because I'm using a Mac, so I had to use a USB-OTG cable. Also, I flashed the TWRP recovery to make it easier for flashing going forward (but if you're not on a Mac, it's probably fine).
  • Boot TWRP
    Do not try to flash twrp, just boot to twrp (./fastboot boot TWRP_wayne.img )
    Even though TWRP is in English at boot, you must press select language and choose English (or other language) or it will switch to Chinese at the next step.
    If somehow it goes to chinese anyway, then press the bottom right hand button above the swipe box to select language
    Ignore error about decryption and press cancel when it asks for password
  • Format Data to remove encryption
    Wipe Internal Storage to remove encryption
    Wipe -> Advanced wipe dalvik + cache + data + Internal Storage
  • Enable MTP
    Mount -> Enable MTP
  • Copy ROM to Internal Storage
    With MTP enabled your PC should see your phone as a hard drive.
    Copy the ROM to the phone. E.g. xiaomi.eu_multi_MI6X_V10.0.2.0.ODCCNFH_v10-8.1.zip
  • Install ROM
    Go to Install and select the file from /data/media