Phone bricked after a crash - Flash modem_a error

lolo1410

Member
May 17, 2010
29
3
0
Hello,

I have a Mi A1 since one week and I have already a large problem.

The problem began with a basic crash on an app (Facebook). The phone didn't respond and I turned off the phone.

When I turned on, the phone was stuck on the boot image (White screen with Mi Logo and Google colors). I tried to turn off and on several times but it didn't work.
I opened the phone and disconnected the battery but always the same problem.

Then, I booted the phone in fastboot and unlocked it via the command fastboot oem unlock. Then I tried to flash the stock ROM via fastboot. I choosed this version : Android 7.1.2 Nougat (N2G47H.7.12.7) because I had the last update (from : https://xiaomifirmware.com/roms/download-official-roms-xiaomi-mi-a1/).
Immediately i have this error :
Code:
fastboot  flash modem_a C:\Users\Lau\Desktop\tissot_images_7.12.7_7.1\images\modem.img   ||
target reported max download size of 536870912 bytes
sending 'modem_a' (86016 KB)...
OKAY [  2.466s]
writing 'modem_a'...
FAILED (remote: flash write failure)
finished. total time: 2.499s
"Flash modem_a error"
I tried to flash with Miflash tool 2017.7.20 but I have the same message, Flash modem_a error.

I also tried to boot the phone in EDL Mode with fastboot_edl, the phone reboot, I have a message your device software cannot be checked for corruption and then the boot screen (with the messsage "Unlocked") and after 30 seconds, I have the black screen with the droid and "No command" (https://scache.vzw.com/kb/images/google/pixel/android_system_recovery_no_command.jpg )

Someone should have an idea to restore the phone ?!

Thanks a lot !
 

XDVRMX

Member
Jun 21, 2017
18
6
0
That screen with "No command" is usually related to the recovery. If I remember well, once in that screen, you have to press and hold power button for few seconds then press and release volume up button to enter in recovery. By reading your post I can see you didn't even try the most easy thing: A factory Reset! Try to wipe data from recovery if you can enter in it.

The modem error could be related at the fact that you're flashing a firmware that is not global or for your country. Try to change firmware version and make sure it is the right firmware region.

Inviato dal mio G8141 utilizzando Tapatalk
 

lolo1410

Member
May 17, 2010
29
3
0
Thank for the quick answer.

I thinked to the recovery but I didn't know how to acces. With your help, I found and I made a wipe data. It made 5 minutes I have the message Formatting /data.... It seems too long... :/

EDIT : I stopped the wiping, it's seems it was block.

When you spoke of an other firmware, do have you a link ? Here is the information of my phone
Code:
xiaomi/tissot/tissot_sprout
71.2/N2G47H/7.12.19
 
Last edited:

XDVRMX

Member
Jun 21, 2017
18
6
0
This is a link to the October release of the Rom

https://androidfilehost.com/?fid=745849072291684522

This is a guide of how to flash it with Mi Flash Tool

https://forum.xda-developers.com/mi-a1/how-to/rom-factory-images-t3688548

If you are not able to flash with Mi Flash tool, try this guide to Flash manually via fastboot.

Once in fastboot (i suggest you to use the official one included in Android SDK becouse are the most updated ones and don't use some other installer like minimal. Add installer for Windows) follow this guide to Flash firmware images manually. It's for nexuses but the fastboot commands are universal

https://androidforums.com/threads/guide-how-to-flash-a-nexus-factory-image-manually.706533/


Inviato dal mio G8141 utilizzando Tapatalk
 
Last edited:
  • Like
Reactions: eliasrmf

lolo1410

Member
May 17, 2010
29
3
0
Thank you for the link, that was I made.

I tried to flash manually the ROM with fastboot and I found a clue, the filesystem seems not normal...
I have this message :

C:\adb>fastboot flash system system.img
target reported max download size of 536870912 bytes
erasing 'system'...
FAILED (remote: Partition table doesn't exist)
finished. total time: 0.009s

EDIT : And I have the last version of fastboot/adb from there : https://developer.android.com/studio/releases/platform-tools.html
 
Last edited:

_mysiak_

Senior Member
Apr 1, 2009
2,243
1,273
183
Thank you for the link, that was I made.

I tried to flash manually the ROM with fastboot and I found a clue, the filesystem seems not normal...
I have this message :

C:\adb>fastboot flash system system.img
target reported max download size of 536870912 bytes
erasing 'system'...
FAILED (remote: Partition table doesn't exist)
finished. total time: 0.009s

EDIT : And I have the last version of fastboot/adb from there : https://developer.android.com/studio/releases/platform-tools.html
You must flash to system_a or system_b, "system" partition really doesn't exist.
 

lolo1410

Member
May 17, 2010
29
3
0
Indeed, it's work now, it's flashing !

I noticed that for TWRP, there is also a "slot A" and "slot B". Is it new in Android ? Is there 2 kind of system ?

EDIT :
Unfortunately, it didn't work...
I had this message :
C:\adb_new>fastboot flash system_a system.img
target reported max download size of 536870912 bytes
sending sparse 'system_a' 1/6 (522959 KB)...
OKAY [ 15.867s]
writing 'system_a' 1/6...
FAILED (remote: flash write failure)
finished. total time: 15.898s

And here is the log for Miflash :

Code:
[16:52:10  28ba25530704]:MiFlash 2017.7.20.0
[16:52:10  28ba25530704]:image path:C:\Users\Lau\Downloads\tissot_images_7.12.19_20171219.0000.00_7.1_d39fa89aaf\tissot_images_7.12.19_7.1
[16:52:10  28ba25530704]:env android path:"C:\Users\Lau\Desktop\miflash\Source\ThirdParty\Google\Android"
[16:52:10  28ba25530704]:script :C:\Users\Lau\Downloads\tissot_images_7.12.19_20171219.0000.00_7.1_d39fa89aaf\tissot_images_7.12.19_7.1\flash_all_except_storage.bat
[16:52:10  28ba25530704]:Physical Memory Usage:1355776 Byte
[16:52:10  28ba25530704]:$fastboot -s 28ba25530704 getvar product   2>&1  | findstr /r /c:"^product: *tissot"   || 
[16:52:10  28ba25530704]:product: tissot
[16:52:10  28ba25530704]:$fastboot -s 28ba25530704 oem unlock   || 
[16:52:11  28ba25530704]:...
[16:52:11  28ba25530704]:$fastboot -s 28ba25530704 flash modem_a C:\Users\Lau\Downloads\tissot_images_7.12.19_20171219.0000.00_7.1_d39fa89aaf\tissot_images_7.12.19_7.1\images\modem.img   || 
[16:52:11  28ba25530704]:(bootloader) 	Device already : unlocked!
[16:52:11  28ba25530704]:eek:KAY [  0.030s]
[16:52:11  28ba25530704]:finished. total time: 0.030s
[16:52:13  28ba25530704]:target reported max download size of 536870912 bytes
[16:52:13  28ba25530704]:sending 'modem_a' (86016 KB)...
[16:52:13  28ba25530704]:error:"Flash modem_a error" 
[16:52:13  28ba25530704]:"Flash modem_a error" 
[16:52:13  28ba25530704]:error:"Flash modem_a error" 
[16:52:13  28ba25530704]:process exit.
[16:52:13  28ba25530704]:flashSuccess False
[16:52:13  28ba25530704]:isFactory False CheckCPUID False
[16:52:13  28ba25530704]:before:flashSuccess is False set IsUpdate:True set IsDone True
[16:52:13  28ba25530704]:after:flashSuccess is False set IsUpdate:false set IsDone true
 
Last edited:

lolo1410

Member
May 17, 2010
29
3
0
Yes I can boot into but I can't install it. Before I tried to flash manually, I was able to unlock the data partition but not anymore (Error : E: Decrypt took too long, killing process - Failed to decrypt data)

I have an access with adb shell.
 

_mysiak_

Senior Member
Apr 1, 2009
2,243
1,273
183
Some people had luck with flashing persist.img from August update, you might try that as well. There is also a chance that your flash memory is damaged and you will need to visit a service center.
 

lolo1410

Member
May 17, 2010
29
3
0
Some people had luck with flashing persist.img from August update, you might try that as well. There is also a chance that your flash memory is damaged and you will need to visit a service center.
I flashed "persist.img" succesfully but always the same problem, stucked on Boot...

Okay try this.
Download the latest build (android n) from mi firmwares official page.

Unzip the file (http://en.miui.com/forum.php?mod=viewthread&tid=1415168&extra=page=1&mobile=2)
Download miflashtool (http://en.miui.com/thread-807252-1-1.html)- guide & tool.
Past the path in the tool.
Click refresh
Click flash
Boom your good.
Make sure to select clean flash and lock.

ADB and fastboot should be installed.
I already tried several times but I have always errors (See log of previously post). With Miflash, I succeeded to flash the 2 boot et 2 system but phone is always blocked.

I tried to wipe via TWRP but it blocks on "Formatting Data using make_ext4fs...".

I think I'm good to send it at a service center...
 
Apr 26, 2017
35
8
0
inally he managed to flash the ROM action, thank you very much to everyone for your patience and help, especially PALMATRON and fosco_

He used the tutorial of this link: https://xiaomifirmware.com/roms/down...-xiaomi-mi-a1/

1. Tools Download r26 for Windows.
2. Unzipped the instruments on disk C of my computer.
3. Unzipped the files of the last ROM available for the Xiaomi Mi A1 in the folder C: \ Tools so that the Images folder and the flashing scripts that come with the ROM are included in it.
4. Then double click on flash_all.bat to delete everything and just leave the boot loader open.
5. Automatically start flashing and take about 10-15 minutes and voila!

https://uploads.tapatalk-cdn.com/20171123/37d3867bf5d0fb7967a03a05869914ae.jpg
 

kendziorix

Member
Dec 11, 2017
15
0
0
Try do with clean and lock or just clean i was have the same problem and i fix this only with miflash and after when my mi a1 restarts on boot i copy with terminal persist.img
 

eliasrmf

New member
Mar 5, 2020
1
0
0
thanks a lot

Saved my life, thanks. The rom on this link works PERFECTLY - my Mi A1 was stuck on botlooping after a fail tentative to root it.

This is a link to the October release of the Rom

https://androidfilehost.com/?fid=745849072291684522

This is a guide of how to flash it with Mi Flash Tool

https://forum.xda-developers.com/mi-a1/how-to/rom-factory-images-t3688548

If you are not able to flash with Mi Flash tool, try this guide to Flash manually via fastboot.

Once in fastboot (i suggest you to use the official one included in Android SDK becouse are the most updated ones and don't use some other installer like minimal. Add installer for Windows) follow this guide to Flash firmware images manually. It's for nexuses but the fastboot commands are universal

https://androidforums.com/threads/guide-how-to-flash-a-nexus-factory-image-manually.706533/


Inviato dal mio G8141 utilizzando Tapatalk