[guide][Payload.bin] Install OTA zip without Twrp

Search This thread

Whyle

Senior Member
Mar 10, 2017
131
112
Italy
Payload.bin is a file which contains many imgs(system.img,boot.img...).

you can find some extracted files in: https://github.com/TadiT7/xiaomi_jasmine_dump

Requests:

Step:
  1. Extract rom zip and get payload.bin
  2. Extract payload_drumper-win64 from zip
  3. Put payload.bin in playload_input folder
  4. Run payload_dumper.exe
  5. Flash imgs using fastboot


For Mi A2:
Code:
fastboot  flash bluetooth_a  bluetooth.img 
fastboot  flash bluetooth_b  bluetooth.img 
fastboot  flash devcfg_a  devcfg.img 
fastboot  flash devcfg_b  devcfg.img 
fastboot  flash dsp_a  dsp.img 
fastboot  flash dsp_b  dsp.img 
fastboot  flash modem_a  modem.img 
fastboot  flash modem_b  modem.img 
fastboot  flash xbl_a  xbl.img 
fastboot  flash xbl_b  xbl.img 
fastboot  flash pmic_a  pmic.img 
fastboot  flash pmic_b  pmic.img 
fastboot  flash rpm_a  rpm.img 
fastboot  flash rpm_b  rpm.img 
fastboot  flash tz_a  tz.img 
fastboot  flash tz_b  tz.img 
fastboot  flash hyp_a  hyp.img 
fastboot  flash hyp_b  hyp.img 
fastboot  flash keymaster_a  keymaster.img 
fastboot  flash keymaster_b  keymaster.img 
fastboot  flash cmnlib64_a  cmnlib64.img 
fastboot  flash cmnlib64_b  cmnlib64.img 
fastboot  flash cmnlib_a  cmnlib.img 
fastboot  flash cmnlib_b  cmnlib.img 
fastboot  flash abl_a  abl.img 
fastboot  flash abl_b  abl.img 
fastboot  flash boot_a  boot.img 
fastboot  flash boot_b  boot.img 
fastboot  flash system_a  system.img 
fastboot  flash system_b  system.img 
fastboot  flash vendor_a  vendor.img 
fastboot  flash vendor_b  vendor.img 
fastboot  flash mdtp_a  mdtp.img 
fastboot  flash mdtp_b  mdtp.img 
fastboot  flash mdtpsecapp_a   mdtpsecapp.img 
fastboot  flash mdtpsecapp_b   mdtpsecapp.img 

fastboot  erase ddr 
fastboot  reboot

if you see "invalid sparse file format at header magi" when flashing system and vendor, ignore it and wait.


if you needed root you can flash patched_boot.img
Code:
fastboot boot patch_boot.img
then Download Magisk installer and flash direct again Magisk.
or
Code:
fastboot flash boot_a patch_boot.img

This process take some time.

if you update O to P, frist boot will take long long time, you can force reboot(press 10s power button) to resolve it.

It may take a little time in frist screen.
 
Last edited:

ivanbeldad

Member
Nov 10, 2017
23
10
How much time it will take to boot?
My phone is stuck at bootanimation since half an hour.

Mine took more than normal, but under 5 minutes I'd say. Maybe it depends on how many things you've installed, idk.

Switch apps lags as hell by the way. Anyone with this problem? It's bothering me a lot.
 
Last edited:
  • Like
Reactions: Saurabhcr7

Olivatti

Member
Aug 2, 2013
14
6
Presidente Prudente
help!!

I got a message "invalid sparse file format at header magi" in system and vendor images
I download again, use payload and use uploaded images, same error :crying:

in sideload using ota file I got "error in /sideload/packege.zip (status 1)

bootloader is unlocked
 

Whyle

Senior Member
Mar 10, 2017
131
112
Italy
I got a message "invalid sparse file format at header magi" in system and vendor images
I download again, use payload and use uploaded images, same error :crying:

in sideload using ota file I got "error in /sideload/packege.zip (status 1)

bootloader is unlocked


invalid sparse file format at header mag" it is normal, can be continue
 

mrwangdu

Member
Apr 16, 2017
17
0
Dhaka
is it mandatory to flash both slot?

---------- Post added at 04:51 PM ---------- Previous post was at 04:20 PM ----------

i am getting boot loop
 
Last edited:

Adairo

Senior Member
Sep 13, 2018
51
14
I always ended flashing stock rom trough Mi flash because this method has never worked for me. When I try to flash all images trough fastboot I got the "invalid sparse file format at header magi", ok, if you wait the flash starts, but just after that fastboot is not longer working for me, it doesn't respond to any other comand, not even fastboot reboot so I have to power off my phone and boot again to fastboot, However after flashing all the images my phone just get stuck on "Mi" screen, the bootanimation doesn't even start, this has happened to me every single time I attempt to flash an ota dump, on every single build... any idea of what could be wrong? I've got the same problem on windows 10 and ubuntu 18.04, amdFX6300 8gb ram.
thanks in advance.
 

tytydraco

Recognized Developer
  • Mar 22, 2017
    746
    1,723
    18
    I always ended flashing stock rom trough Mi flash because this method has never worked for me. When I try to flash all images trough fastboot I got the "invalid sparse file format at header magi", ok, if you wait the flash starts, but just after that fastboot is not longer working for me, it doesn't respond to any other comand, not even fastboot reboot so I have to power off my phone and boot again to fastboot, However after flashing all the images my phone just get stuck on "Mi" screen, the bootanimation doesn't even start, this has happened to me every single time I attempt to flash an ota dump, on every single build... any idea of what could be wrong? I've got the same problem on windows 10 and ubuntu 18.04, amdFX6300 8gb ram.
    thanks in advance.

    Same, I just get bootloops every time.
     

    Abdoubody

    Member
    Apr 23, 2017
    40
    47
    I always ended flashing stock rom trough Mi flash because this method has never worked for me. When I try to flash all images trough fastboot I got the "invalid sparse file format at header magi", ok, if you wait the flash starts, but just after that fastboot is not longer working for me, it doesn't respond to any other comand, not even fastboot reboot so I have to power off my phone and boot again to fastboot, However after flashing all the images my phone just get stuck on "Mi" screen, the bootanimation doesn't even start, this has happened to me every single time I attempt to flash an ota dump, on every single build... any idea of what could be wrong? I've got the same problem on windows 10 and ubuntu 18.04, amdFX6300 8gb ram.
    thanks in advance.

    Same
     

    ckpv5

    Recognized Contributor
    Feb 11, 2008
    14,359
    18,290
    Kuala Lumpur
    Hey, where's the link for patched_boot.img?

    thanks

    I have one here - https://sourceforge.net/projects/xioami/files/Mi A2/

    ---------- Post added at 01:54 AM ---------- Previous post was at 01:50 AM ----------

    I always ended flashing stock rom trough Mi flash because this method has never worked for me. When I try to flash all images trough fastboot I got the "invalid sparse file format at header magi", ok, if you wait the flash starts, but just after that fastboot is not longer working for me, it doesn't respond to any other comand, not even fastboot reboot so I have to power off my phone and boot again to fastboot, However after flashing all the images my phone just get stuck on "Mi" screen, the bootanimation doesn't even start, this has happened to me every single time I attempt to flash an ota dump, on every single build... any idea of what could be wrong? I've got the same problem on windows 10 and ubuntu 18.04, amdFX6300 8gb ram.
    thanks in advance.

    It will take some time (around 5-7 mins) to complete when flashing system & vendor to both a/b .. after it is done, fastboot will be active again then can proceed to next image flashing.

    To make it easier ... make those commands in a single batch file. So after you connect your device to PC in fastboot mode, just run the batch file .. let it do its thing until it finish .. this will take around 30 mins to complete.

    EDIT : Sharing my own batch file here if anyone want to try, so you don't need to write each line of fastboot flash *** one after another images.
    https://forum.xda-developers.com/showpost.php?p=78123332&postcount=457
     
    Last edited:

    Top Liked Posts

    • There are no posts matching your filters.
    • 13
      Payload.bin is a file which contains many imgs(system.img,boot.img...).

      you can find some extracted files in: https://github.com/TadiT7/xiaomi_jasmine_dump

      Requests:

      Step:
      1. Extract rom zip and get payload.bin
      2. Extract payload_drumper-win64 from zip
      3. Put payload.bin in playload_input folder
      4. Run payload_dumper.exe
      5. Flash imgs using fastboot


      For Mi A2:
      Code:
      fastboot  flash bluetooth_a  bluetooth.img 
      fastboot  flash bluetooth_b  bluetooth.img 
      fastboot  flash devcfg_a  devcfg.img 
      fastboot  flash devcfg_b  devcfg.img 
      fastboot  flash dsp_a  dsp.img 
      fastboot  flash dsp_b  dsp.img 
      fastboot  flash modem_a  modem.img 
      fastboot  flash modem_b  modem.img 
      fastboot  flash xbl_a  xbl.img 
      fastboot  flash xbl_b  xbl.img 
      fastboot  flash pmic_a  pmic.img 
      fastboot  flash pmic_b  pmic.img 
      fastboot  flash rpm_a  rpm.img 
      fastboot  flash rpm_b  rpm.img 
      fastboot  flash tz_a  tz.img 
      fastboot  flash tz_b  tz.img 
      fastboot  flash hyp_a  hyp.img 
      fastboot  flash hyp_b  hyp.img 
      fastboot  flash keymaster_a  keymaster.img 
      fastboot  flash keymaster_b  keymaster.img 
      fastboot  flash cmnlib64_a  cmnlib64.img 
      fastboot  flash cmnlib64_b  cmnlib64.img 
      fastboot  flash cmnlib_a  cmnlib.img 
      fastboot  flash cmnlib_b  cmnlib.img 
      fastboot  flash abl_a  abl.img 
      fastboot  flash abl_b  abl.img 
      fastboot  flash boot_a  boot.img 
      fastboot  flash boot_b  boot.img 
      fastboot  flash system_a  system.img 
      fastboot  flash system_b  system.img 
      fastboot  flash vendor_a  vendor.img 
      fastboot  flash vendor_b  vendor.img 
      fastboot  flash mdtp_a  mdtp.img 
      fastboot  flash mdtp_b  mdtp.img 
      fastboot  flash mdtpsecapp_a   mdtpsecapp.img 
      fastboot  flash mdtpsecapp_b   mdtpsecapp.img 
      
      fastboot  erase ddr 
      fastboot  reboot

      if you see "invalid sparse file format at header magi" when flashing system and vendor, ignore it and wait.


      if you needed root you can flash patched_boot.img
      Code:
      fastboot boot patch_boot.img
      then Download Magisk installer and flash direct again Magisk.
      or
      Code:
      fastboot flash boot_a patch_boot.img

      This process take some time.

      if you update O to P, frist boot will take long long time, you can force reboot(press 10s power button) to resolve it.

      It may take a little time in frist screen.
      7
      Hey, where's the link for patched_boot.img?

      thanks

      I have one here - https://sourceforge.net/projects/xioami/files/Mi A2/

      ---------- Post added at 01:54 AM ---------- Previous post was at 01:50 AM ----------

      I always ended flashing stock rom trough Mi flash because this method has never worked for me. When I try to flash all images trough fastboot I got the "invalid sparse file format at header magi", ok, if you wait the flash starts, but just after that fastboot is not longer working for me, it doesn't respond to any other comand, not even fastboot reboot so I have to power off my phone and boot again to fastboot, However after flashing all the images my phone just get stuck on "Mi" screen, the bootanimation doesn't even start, this has happened to me every single time I attempt to flash an ota dump, on every single build... any idea of what could be wrong? I've got the same problem on windows 10 and ubuntu 18.04, amdFX6300 8gb ram.
      thanks in advance.

      It will take some time (around 5-7 mins) to complete when flashing system & vendor to both a/b .. after it is done, fastboot will be active again then can proceed to next image flashing.

      To make it easier ... make those commands in a single batch file. So after you connect your device to PC in fastboot mode, just run the batch file .. let it do its thing until it finish .. this will take around 30 mins to complete.

      EDIT : Sharing my own batch file here if anyone want to try, so you don't need to write each line of fastboot flash *** one after another images.
      https://forum.xda-developers.com/showpost.php?p=78123332&postcount=457
      3
      I've just uploaded the images.

      Here is the link: https://drive.google.com/open?id=1GQc8oG90LjKneYy0vH4y9ZNb6rryELP4

      Didn't test myself yet. If someone try it leave some feedback.
      3

      Same, I just get bootloops every time.

      Don't worry, I got it, the answer was all the time on the first post...
      after running fastboot flash system_a system.img you get something like this:

      fastboot flash system_a system.img
      Invalid sparse file format at header magic
      Sending sparse 'system_a' 1/4 (524286 KB) OKAY [ 17.880s]
      Writing sparse 'system_a' 1/4 OKAY [ 0.004s]
      Sending sparse 'system_a' 2/4 (524285 KB) OKAY [ 18.944s]
      Writing sparse 'system_a' 2/4 OKAY [ 0.003s]
      Sending sparse 'system_a' 3/4 (524286 KB) OKAY [ 18.804s]
      Writing sparse 'system_a' 3/4 OKAY [ 0.002s]
      Sending sparse 'system_a' 4/4 (483657 KB) OKAY [ 18.276s]
      Writing sparse 'system_a' 4/4 OKAY [ 0.005s]
      Finished. Total time: 105.491s

      if you run "fastboot flash system_b system.img" the fastboot windows seems to be freezed, don't worry it is actually doing something xD, "JUST WAIT ENOUGH" and you will get the next .img being flash:

      C:\Users\adair\Documents\MiA2\10.0 ota dump\images>fastboot flash system_b system.img
      Invalid sparse file format at header magic
      Sending sparse 'system_b' 1/4 (524286 KB) OKAY [ 21.132s]
      Writing sparse 'system_b' 1/4 OKAY [ 0.003s]
      Sending sparse 'system_b' 2/4 (524285 KB) OKAY [ 21.476s]
      Writing sparse 'system_b' 2/4 OKAY [ 0.003s]
      Sending sparse 'system_b' 3/4 (524286 KB) OKAY [ 21.456s]
      Writing sparse 'system_b' 3/4 OKAY [ 0.002s]
      Sending sparse 'system_b' 4/4 (483657 KB) OKAY [ 19.926s]
      Writing sparse 'system_b' 4/4 OKAY [ 0.005s]
      Finished. Total time: 319.138s

      I had to wait around 5 min after every big image was flashed, so just be patient, Total time flashing: around 30 mins...
      Now I've got official android pie running flawlessly.
      Feel free to hit the thanks button ;)
      1
      Hi, for me Magisk show safetynet pass but cannot download Netflix also Play store status is "un-certified devices"
      Clear play store data
    Our Apps
    Get our official app!
    The best way to access XDA on your phone
    Nav Gestures
    Add swipe gestures to any Android
    One Handed Mode
    Eases uses one hand with your phone