In order to fulfill the basic functions of our service, the user hereby agrees to allow Xiaomi to collect, process and use personal information which shall include but not be limited to written threads, pictures, comments, replies in the Mi Community, and relevant data types listed in Xiaomi's Private Policy. By selecting "Agree", you agree to Xiaomi's Private Policy and Content Policy .

Other Devices

[Tips] [Device Team] [TechWithMuz] Flash Persist Image file using TWRP!

2019-09-22 00:59:00
26156 81

Updated on July 18th 2020
Hello Everyone,

As Android 10 is just round the corner, I tried my hands on AOSP ROM for Mi 6. Being an MIUI Fan, I always prefer MIUI. I flashed AOSP to check new features. While flashing back MIUI using fastboot ROM. I got an error "Find device storage corrupted your device is unsafe now" while setting up the phone. I lost MAC id for wifi and Bluetooth.

To fix the issue, I need to flash persist.img which is present inside fastboot ROM. But using fastboot command it can't be flashed. It will give error "FAILED (Remote: 'Partition flashing is not allowed')"

Here I am sharing the guide to flash persist.img
Note: I have done it successfully on Mi 6.


1. You need Unlocked Bootloader and TWRP. You can boot in TWRP instead of flashing it.
2. Download the fastboot ROM for the device. Extract it and copy persist.img file to the internal memory of the phone. Make sure put the file in internal storage rather than in any folder.
3. Put the phone in fastboot Mode, Power Button and Volume Down key.

4. Boot in TWRP by "fastboot boot twrp.img" command.

5. In the TWRP Main Menu. Go to Advanced ------ Terminal
6. Write the below 2 lines:
simg2img /sdcard/persist.img /sdcard/persist_EXT4.img
dd if=/sdcard/persist_EXT4.img of=/dev/block/bootdevice/by-name/persist

Update: If you are facing this error
"invalid sparse file format at header, failed to read sparse file"
No need to use simg2img command, Just use the dd if= Command.
dd if=/sdcard/persist.img of=/dev/block/bootdevice/by-name/persist


If you have Orange Fox recovery You can directly flash img file.

7. Reboot the Phone and check.

Please share your feedback if it helped you!

Credits: 4pda


Number of participants 7 Experience +82 Pack Reason

View Rating Log

2019-09-22 00:59:00
Favorites69 RateRate

Master Bunny | from Redmi Note 5


Thanks For Your Guides
2019-09-22 01:32:25

Wizard Bunny

BeingBishal | from MI 9 SE


Thanks for sharing with us!
2019-09-22 01:59:06

Super moderator

Crossfiree | from MI 8


Thanks for the guide
2019-09-22 01:59:20

Master Bunny

Mr. Nahid | from Redmi 4X


thanks for amazing tips
2019-09-22 02:02:14
Nice information.
2019-09-22 02:38:48
Selalu Percaya Bahwa Sesuatu Yang Indah Akan Terjadi !!!

Master Bunny

m@soud | from Redmi Note 5


thanks for sharing
2019-09-22 05:12:28
Invalid floor, the posts have been deleted #7

Wizard Bunny

Ian Adoe | from Redmi Note 5A Prime


Helpful explanation, thanks
2019-09-22 08:05:45

Feedback Team

Sampath madurai | from Redmi Note 7


Thanks for your information
2019-09-22 09:24:20

Feedback Team

wai_yan | from Mi Note 3


thanks for the guide, veryuseful!
2019-09-22 10:38:25

Feedback Team
please sign in to reply.
Sign In Sign Up


Super moderator

  • Followers


  • Threads


  • Replies


  • Points


3 Days Check-In
7 Days Check-In
Mi Explorers
Redmi Note 7
Mi Love U & I
Bunny Winner
Happy Mother's Day
Android Q
50K Mi Fans
Mobile Photography Lover
Eid ul-Fitr Mubarak
Brain Teaser
Best Writer
Selfie Day
Happy July
Mi 9T
Global Fans
My Country My Pride
Check in
Profile Medal
MIUI 9th Birthday
Global Community
better together slogan
Global Community
device poll
better together with friends
games discuss
Puzzle Master
Mid-Autumn Festival
200K Mi Fans
300K Mi Fans
close up
Best Photo
Redmi Note 8 Series
Art Challenge
Mother's Day

Read moreGet new

Mi Comm APP

Stay updated on Mi Products and MIUI

Copyright©2010-2020, All Rights Reserved
Content Policy
Quick Reply To Top Return to the list