[OTA][FASTBOOT][ROM] Official Stock Fastboot image (V10.0.10.0.PDHMIXM, Android P)

Search This thread

burimi007

Senior Member
Nov 30, 2008
184
12
Hi everyone, its been long time since i updated my Mi A1, im on july update 2018, can i flash lastest rom Jan Update with MiFlash without losing data ? I have bootloader unlocked and rooted with Magisk.
 

doshimeet62

New member
Jun 15, 2020
1
0
sec.dat file flash error

i am getting error in sec.dat file

i.e in this command

fastboot flash sec /images/sec.dat

help me resolve the same.
This is the error>>>>
C:\adb>fastboot flash sec images/sec.dat
target reported max download size of 534773760 bytes
sending 'sec' (0 KB)...
OKAY [ 0.031s]
writing 'sec'...
FAILED (remote: flash write failure)
finished. total time: 0.069s

---------- Post added at 11:35 AM ---------- Previous post was at 11:27 AM ----------

Hi, what error message do you get, when trying to run the batch script? Did you try via command line (cmd) or via powershell (Win10)?

The things you tried to flash without succeeding seem to be not necessary. Please find here all fastboot commands used by "flash_all_except_storage":

Code:
fastboot oem unlock
fastboot flash modem_a /images/modem.img
fastboot flash modem_b /images/modem.img
fastboot flash sbl1 /images/sbl1.img
fastboot flash sbl1bak /images/sbl1.img
fastboot flash rpm /images/rpm.img
fastboot flash rpmbak /images/rpm.img
fastboot flash tz /images/tz.img
fastboot flash tzbak /images/tz.img
fastboot flash devcfg /images/devcfg.img
fastboot flash devcfgbak /images/devcfg.img
fastboot flash dsp /images/adspso.bin
fastboot flash sec /images/sec.dat
fastboot flash splash /images/splash.img
fastboot flash aboot /images/emmc_appsboot.mbn
fastboot flash abootbak /images/emmc_appsboot.mbn
fastboot flash boot_a /images/boot.img
fastboot flash boot_b /images/boot.img
fastboot flash system_a /images/system.img
fastboot flash system_b /images/system.img
fastboot flash lksecapp /images/lksecapp.img
fastboot flash lksecappbak /images/lksecapp.img
fastboot flash cmnlib /images/cmnlib.img
fastboot flash cmnlibbak /images/cmnlib.img
fastboot flash cmnlib64 /images/cmnlib64.img
fastboot flash cmnlib64bak /images/cmnlib64.img
fastboot flash keymaster /images/keymaster.img
fastboot flash keymasterbak /images/keymaster.img
fastboot reboot bootloader
fastboot set_active a
fastboot oem lock
fastboot reboot




i am getting error in sec.dat file

i.e in this command

fastboot flash sec /images/sec.dat

help me resolve the same.
This is the error>>>>
C:\adb>fastboot flash sec images/sec.dat
target reported max download size of 534773760 bytes
sending 'sec' (0 KB)...
OKAY [ 0.031s]
writing 'sec'...
FAILED (remote: flash write failure)
finished. total time: 0.069s
 

1poweruser1

Member
Jul 21, 2020
43
11
Fastboot images are for Miflash tool? or wich version work with it
I used the latest version V10.0.24.0.PDHMIXM and I got bootloop. How can I avoid this?
I restored my phone to stock by booting phone in edl mode and restoring it with xiaomiflashtool

you can enter edl mode either by booting into twrp and going to the reboot menu and pressing edl or by running this command with the phone in fastboot mode
Code:
fastboot oem edl

xiaomi flash tool url
MiFlash2020-3-14-0.rar

extract latest firmware tissot_images_V10.0.24.0.PDHMIXM_20200810.0000.00_9.0_49f16fd30d

in images folder edit rawprogram0.xml and add persist.img in the persist line between the two ""

go to xiaomi flash tool configuration check eras all, select xiaomi as program, select rawprogram0.xml and patch0.xml in the last 2 fields
apply changes

select latest firmware tissot_images_V10.0.24.0.PDHMIXM_20200810.0000.00_9.0_49f16fd30d

click refresh and you should see COMx

in bottom right corner select flash all lock crc as flashing program

I modified the script to not lock and reboot (delete last 2 lines)
Code:
fastboot %* getvar product 2>&1 | findstr /r /c:"^product: *tissot" || @echo "error : Missmatching image and device" & exit /B 1
fastboot %* erase boot_a || @echo "error : Erasing boot failed, maybe the device is locked" & exit /B 1
fastboot %* flash crclist %~dp0\images\crclist.txt || @echo "Flash crclist error" && exit /B 1
fastboot %* flash sparsecrclist %~dp0\images\sparsecrclist.txt || @echo "Flash sparsecrclist error" && exit /B 1
fastboot %* flash modem_a %~dp0images\modem.img || @echo "Flash modem_a error" && exit /B 1
fastboot %* flash modem_b %~dp0images\modem.img || @echo "Flash modem_b error" && exit /B 1
fastboot %* flash sbl1 %~dp0images\sbl1.img || @echo "Flash sbl1 error" && exit /B 1
fastboot %* flash sbl1bak %~dp0images\sbl1.img || @echo "Flash sbl1bak error" && exit /B 1
fastboot %* flash rpm %~dp0images\rpm.img || @echo "Flash rpm error" && exit /B 1
fastboot %* flash rpmbak %~dp0images\rpm.img || @echo "Flash rpmbak error" && exit /B 1
fastboot %* flash tz %~dp0images\tz.img || @echo "Flash tz error" && exit /B 1
fastboot %* flash tzbak %~dp0images\tz.img || @echo "Flash tzbak error" && exit /B 1
fastboot %* flash devcfg %~dp0images\devcfg.img || @echo "Flash devcfg error" && exit /B 1
fastboot %* flash devcfgbak %~dp0images\devcfg.img || @echo "Flash devcfgbak error" && exit /B 1
fastboot %* flash dsp %~dp0images\dsp.img || @echo "Flash dsp error" && exit /B 1
fastboot %* flash sec %~dp0images\sec.dat || @echo "Flash sec error" && exit /B 1
fastboot %* flash splash %~dp0images\splash.img || @echo "Flash splash error" && exit /B 1
fastboot %* flash misc %~dp0images\misc.img || @echo "Flash misc error" & exit /B 1
fastboot %* flash aboot %~dp0images\emmc_appsboot.mbn || @echo "Flash aboot error" && exit /B 1
fastboot %* flash abootbak %~dp0images\emmc_appsboot.mbn || @echo "Flash abootbak error" && exit /B 1
fastboot %* flash boot_a %~dp0images\boot.img || @echo "Flash boot_a error" && exit /B 1
fastboot %* flash boot_b %~dp0images\boot.img || @echo "Flash boot_b error" && exit /B 1
fastboot %* flash system_a %~dp0images\system.img || @echo "Flash system_a error" && exit /B 1
fastboot %* flash system_b %~dp0images\system_other.img || @echo "Flash system_a error" && exit /B 1
fastboot %* flash lksecapp %~dp0images\lksecapp.img || @echo "Flash lksecapp error" && exit /B 1
fastboot %* flash lksecappbak %~dp0images\lksecapp.img || @echo "Flash lksecappbak error" && exit /B 1
fastboot %* flash cmnlib %~dp0images\cmnlib.img || @echo "Flash cmnlib error" && exit /B 1
fastboot %* flash cmnlibbak %~dp0images\cmnlib.img || @echo "Flash cmnlibbak error" && exit /B 1
fastboot %* flash cmnlib64 %~dp0images\cmnlib64.img || @echo "Flash cmnlib64 error" && exit /B 1
fastboot %* flash cmnlib64bak %~dp0images\cmnlib64.img || @echo "Flash cmnlib64bak error" && exit /B 1
fastboot %* flash keymaster %~dp0images\keymaster.img || @echo "Flash keymaster error" && exit /B 1
fastboot %* flash keymasterbak %~dp0images\keymaster.img || @echo "Flash keymasterbak error" && exit /B 1
fastboot %* flash userdata %~dp0images\userdata.img || @echo "Flash userdata error" && exit /B 1
fastboot %* set_active a
if you get "slots aren't supported" or "file don't exist", close flash tool and place it in c:/ folder
 
Last edited:

xiaomiA1

Member
Sep 25, 2021
8
1
sec.dat file flash error

i am getting error in sec.dat file

i.e in this command

fastboot flash sec /images/sec.dat

help me resolve the same.
This is the error>>>>
C:\adb>fastboot flash sec images/sec.dat
target reported max download size of 534773760 bytes
sending 'sec' (0 KB)...
OKAY [ 0.031s]
writing 'sec'...
FAILED (remote: flash write failure)
finished. total time: 0.069s

---------- Post added at 11:35 AM ---------- Previous post was at 11:27 AM ----------






i am getting error in sec.dat file

i.e in this command

fastboot flash sec /images/sec.dat

help me resolve the same.
This is the error>>>>
C:\adb>fastboot flash sec images/sec.dat
target reported max download size of 534773760 bytes
sending 'sec' (0 KB)...
OKAY [ 0.031s]
writing 'sec'...
FAILED (remote: flash write failure)
finished. total time: 0.069s
@doshimeet62 have you fixed the issue with error in sec.dat file? I tried to flash the two latest stock images, but I get the same error
 
  • Like
Reactions: YK RAJ

Top Liked Posts

  • There are no posts matching your filters.
  • 47
    Attention: To be able to flash, the bootloader needs to be unlocked (https://en.miui.com/unlock/). Please be warned though: Xiaomi changed something in the method of unlocking the device from May 2018 security update onwards. Now all data will be flushed if you unlock a previously locked device. So please be warned and check the .bat/ .sh scripts for "lock" and "unlock" commands and remove these lines if unsure. If you don't want to unlock your device, you can use everything without the need of editing anything.
    Side note: Before everyone is complaining about that kind of change, it makes sense from security point of view: Say, someone steals your phone and he could just unlock the bootloader, he has any possibility to get to your most private data. Just some technical background, but I am not related to Xiaomi or anything, just applying logic.

    Introduction:
    XIAOMI offers for their official releases also fastboot images including easy to use shell/ batch scripts for flashing.
    Luckily, this is also the case for our Mi A1, delivering us a very neat way to easy flash or even emergency rescue our phone via fastboot.
    The included shell scripts (*.sh) are meant to be used on Mac/ Linux,
    the included batch files (*.bat) are for the Windows users.

    Prerequisite:
    adb & fastboot have to be installed for the scripts and the flashing to work properly. Please ensure, that your versions are up2date, if you should run into any issues.
    Warning: Do not use the flash_factory.bat or .sh file, as it deletes your IMEI.

    Android Pie Fastboot Link (official): http://c.mi.com//miuidownload/detail?device=1700333

    Version: V10.0.10.0.PDHMIXM (Android P)
    Size: 1166M
    md5:
    Code:
    n.a.
    No Fastboot image found (yet) --> Please use V10.0.9.0 available here under "Previous versions" and update via OTA
    V10.0.10.0.PDHMIXM for Mi A1 Changelog
    Code:
    [LIST=2]
    [*] June 2019 Security patch
    [/LIST]

    Previous versions:

    1. Version: V10.0.9.0.PDHMIXM (Android P)
      Size: 1616M
      md5:
      Code:
      3ded3e7b82097f27ddf176e0399fceba
      https://bigota.d.miui.com/V10.0.9.0...0.PDHMIXM_20190514.0000.00_9.0_3ded3e7b82.tgz
      V10.0.9.0.PDHMIXM for Mi A1 Changelog
      Code:
      [LIST=2]
      [*] Max 2019 Security Patch
      [/LIST]
    2. Version: V10.0.4.0.PDHMIXM (Android P)
      Size: 1616M
      md5:
      Code:
      2cee840c96cdb6e0a9b14fc3c3105ff7
      https://bigota.d.miui.com/V10.0.4.0...0.PDHMIXM_20190104.0000.00_9.0_2cee840c96.tgz
      V10.0.4.0.PDHMIXM for Mi A1 Changelog
      Code:
      [LIST=2]
      [*] FM Radio Adaptive battery and brightness
      [*] Simpler ways to navigate your phone
      [*] Recommended apps and actions based on your context
      [/LIST]
    3. Version: V9.6.8.0.ODHMIFE (Android O, 8.1)
      Size: 1616M
      md5:
      Code:
      9ea450fe98fbf4883439a934847f9f5d
      https://bigota.d.miui.com/V9.6.8.0....0.ODHMIFE_20181031.0000.00_8.0_9ea450fe98.tgz
      V9.6.8.0.ODHMIFE for Mi A1 Changelog
      Code:
      [LIST=2]
      [*] Fortify your Android One phone with the November 2018 security update from Google, which improves security and fixes bugs.
      [*] This update improves the stability of your device and optimizes its performance.
      [/LIST]
    4. Version: V9.6.7.0.ODHMIFE (Android O, 8.1)
      Size: 1615M
      md5:
      Code:
      47d6fd23c7ca5aa538258782aceb3bd2
      https://bigota.d.miui.com/V9.6.7.0....0.ODHMIFE_20181015.0000.00_8.0_47d6fd23c7.tgz
      V9.6.7.0.ODHMIFE for Mi A1 Changelog
      Code:
      [LIST=2]
      [*] Fortify your Android One phone with the October 2018 security update from Google, which improves security and fixes bugs.
      [*] This update improves the stability of your device and optimizes its performance.
      [/LIST]
      [*] [B]Version: V9.6.4.0.ODHMIFE (Android O, 8.1)[/B]
      Size: 1559M
      md5: [CODE]735823083fba68350ba27f418114f388
      https://bigota.d.miui.com/V9.6.4.0....0.ODHMIFE_20180712.0000.00_8.0_735823083f.tgz
      V9.6.4.0.ODHMIFE for Mi A1 Changelog
      Code:
      [LIST=2]
      [*] Fortify your Android One phone with the July 2018 security update from Google, which improves security and fixes bugs.
      [*] This update improves the stability of your device and optimizes its performance.
      [/LIST]
    5. Version: V9.5.11.0.ODHMIFA (Android O, 8.0)
      Size: 1462M
      md5:
      Code:
      1a04581058dc7f27ca18cf8fd74f9413
      https://bigota.d.miui.com/V9.5.11.0...0.ODHMIFA_20180504.0000.00_8.0_1a04581058.tgz
      V9.5.11.0.ODHMIFA for Mi A1 Changelog
      Code:
      [LIST=2]
      [*] Update June Security Patch
      [/LIST]
    6. Version: 9.5.10.0.ODHMIFA (Android O)
      Size: 1462M
      md5:
      Code:
      b9e697ed56b49f3657fa13229241519a
      https://bigota.d.miui.com/V.9.5.10....0.ODHMIFA_20180405.0000.00_8.0_b9e697ed56.tgz
      V9.5.10.0.ODHMIFA for Mi A1 Changelog
      Code:
      [LIST=2]
      [*] Update April Security Patch
      [/LIST]
    7. Version: 9.5.9.0.ODHMIFA (Android O)
      Size: 1422M
      md5:
      Code:
      5773957dcda9a89495e1d0bfa84ab220
      https://bigota.d.miui.com/V9.5.9.0....0.ODHMIFA_20180316.0000.00_8.0_f8cd1b4e8e.tgz
      OPR1.170623.026.V9.5.9.0.ODHMIFA for Mi A1 Changelog
      Code:
      [LIST=2]
      [*] Update Mar Security Patch
      [*] Fix “couldn’t flash ROM in 9008 mode”
      [*] Fix “[IN_User Feedback][Reboot][Mi A1]Random reboot while using the device on V9.5.4.0.ODHMIFA”
      [/LIST]
    8. Version: V9.5.4.0.ODHMIFA (Android O)
      Size: 1422M
      md5:
      Code:
      5773957dcda9a89495e1d0bfa84ab220
      https://bigota.d.miui.com/V9.5.4.0....0.ODHMIFA_20180226.0000.00_8.0_5773957dcd.tgz
      OPR1.170623.026.V9.5.4.0.ODHMIFA for Mi A1 Changelog
      Code:
      [LIST=2]
      [*] Update Feb Security Patch
      [*] Fix “received call recognized as missed call”
      [*] Fix rebooting issue
      [*] Update E-label for India
      [/LIST]
    9. Version: Android 8.0.0 [OPR1.170623.026.8.1.10]
      Size: 1407M
      md5:
      Code:
      8ea503201bb0b594e02e5ed2bf6dea09
      https://bigota.d.miui.com/8.1.10/tissot_images_8.1.10_20180110.0000.00_8.0_8ea503201b.tgz
      OPR1.170623.026.8.1.10 ROM for Mi A1 Changelog
      Code:
      [LIST=2]
      [*] Optimize audio parameters.
      [*] Remove the “quick charge” on the lockscreen when charging.
      [*] Integrate the performance optimization of MIUI.
      [*] Fix “bluetooth power consumption issue”.
      [*] Add Korean input method.
      [*] Fix “the dialer icon is missing after the upgrade”.
      [*] Fix “camera cannot connect sometimes”.
      [*] Fix“couldn’t connect to network sometimes”.
      [*] Update the Feedback APP.
      [*] Fix “fingerprint unlocking speed is slow ”.
      [/LIST]
    10. Version: N2G47H.7.12.29 (Android O)
      Size: 1084M
      md5:
      Code:
      c9a6ea979b58b9a2fa4dc9e81d70796e
      https://bigota.d.miui.com/7.12.29/tissot_images_7.12.29_20171228.0000.00_8.0_c9a6ea979b.tgz
      no changelog found
    11. Version: N2G47H.7.12.19
      Size: 1396M
      md5:
      Code:
      d39fa89aafcaaaa2203324313c964706
      https://bigota.d.miui.com/7.12.19/tissot_images_7.12.19_20171219.0000.00_7.1_d39fa89aaf.tgz
      N2G47H.7.12.19 ROM for Mi A1 Changelog:
      Code:
      [LIST=2]
      [*] D2Acontinuous annoying sharp Sound problem in A1
      [*] D2A is transferred to 112 when the local emergency number is called in the Czech Republic
      [*] Transition version for Android Oreo
      [/LIST]


    Short Flashing Guide:
    Choices for flashing/ Which script to run?
    • flash_all = Full flash, like factory reset, bootloader stays unlocked
    • flash_all_except_storage = Keep your data, bootloader gets re-locked
    • flash_all_lock = Full flash, like factory reset, bootloader gets re-locked
    (*.bat for Windows/ *.sh for Linux & Mac)

    1. Download and extract the *.tgz archive
    2. Shutdown your Mi A1 and start it in fastboot mode (Vol- + Power)
    3. Connect it to your computer/ mac via usb cable
    4. Open a terminal, shell or command line prompt depending on your OS; make sure you are in the same folder as all the just extracted files, if in doubt use the "cd" command
    5. Run the script of your choice to start the flashing process (e.g.: "flash_all.bat" or "./flash_all.sh")
    6. Wait for the script to complete and enjoy your official version of AndroidOne for Mi A1

    Hints:
    • You need to have an up-to-date version of adb and fastboot to be installed properly on your system. For that please just follow the guide here
    • To get the device in fastboot mode, turn it off, hold VOL(-) & the power button
    • To check for successful connection type in shell/ terminal "fastboot devices" after device is connected via USB in fastboot mode
    • If you want/ need to have an unlocked bootloader, you can still use any of the above described scripts and just when finished flashing, reboot again into fastboot mode and run the terminal/ shell/ cmd command "fastboot oem unlock" (locking and unlocking does not mess with your user data)
    • Just to be clear, inspite of the URL containing "miui" in its name, it is official Android One for Mi A1 (tissot)
    • Please do not attempt to do downgrades, without factory reset
    • If you are feeling unfamiliar and/ or unsafe, please use the Mi Flash Tool for Windows instead to install (Guide for Mi Flash Tool; if you had a previous version of Mi Flash tool installed it needs to be uninstalled first)
    • If you want to force, that you get OTA updates when they become available and you check in system settings manually for them, please ensure that you are using the Google Play Beta Services
    • Everything seems so complicated, isn't there a tool to assist me? --> I did some research and there seems to be one: https://toolaio.tk/
      Tool-1-1-0-4.png
      All credits for this tool go to its creator mauronofrio
      1.0.8.1_advanced.png
    8
    Update time:

    Version: 9.5.10.0.ODHMIFA (Android O)
    Size: 1462M
    md5:
    Code:
    b9e697ed56b49f3657fa13229241519a
    http://bigota.d.miui.com/V.9.5.10.0...0.ODHMIFA_20180405.0000.00_8.0_b9e697ed56.tgz
    V9.5.10.0.ODHMIFA for Mi A1 Changelog
    Code:
    [LIST=2]
    [*] Update April Security Patch
    [/LIST]
    4
    So using the script that doesn't wipe userdata, I can remove the "fastboot OEM lock" parts, and I can update my phone that has Magisk without losing any data?

    So first of all, I am not using Magisk on the phone myself so I can't say for sure. Nevertheless as explained in the OP, it is the unlocking of the bootloader which is now triggering the data wipe as security messure. So, if you have an unlocked bootloader and you ensure by removing the "OEM" commands from the script and prevent any locking and unlocking during the process, the data wipe should not get triggered. Don't know if Magisk could influence this, I'd propose to follow these instructions by the author of Magisk: https://github.com/topjohnwu/Magisk/blob/master/docs/tips.md
    4
    Official post updated:
    Update to Version: V9.5.11.0.ODHMIFA (Android 8.0) added
    4
    Thanks @majamee for your contribution.
    Very clean and organized list, just what I needed :)
    Also, thanks for taking a time to help us, replying our questions ;)

    Happy, that I could help. I am also happy if that damn thanks meter fills up, I hate empty progress bars :D