Unable to reinstall Android
-
Hi everyone,
I'm unable to install Android : I rebooted the phone in fastboot mode and when I try to flash it with XiaoMiFlash the flashing process is stuck. I'm using this image "Xiaomi Mi A2 Latest Global Stable Version Fastboot File Download" I have dowloaded from here : https://c.mi.com/in/miuidownload/detail?guide=2
Now, I can't even start the flashing process since the phone exits fastboot and displays "press any key to exit" when I press the flash button on the MiFlash program. Even before launching that program, when I boot in fastboot mode (holding the power key + volume down) then I plug the USB cable, the screen will show "Press any key to shutdown"
Thanks.
Update : I restarted the phone from the system and kept the "volume down" key pressed and I didn't got the "Press any key to shutdown" message on the screen, the MiFlash succeeded in founding my device and succeded in writing many images, now it is writing "system_a", the elapsed time is 580 seconds and I don't know if it is stuck or not Below the log messages :
[16:25:06 2b53f68]:MiFlash 2020.3.14.0 [16:25:06 2b53f68]:vboytest index:1 [16:25:06 2b53f68]:idproduct: 53261 idvendor: 6353 [16:25:06 2b53f68]:Thread id:11 Thread name:2b53f68 [16:25:06 2b53f68]:image path:D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0 [16:25:06 2b53f68]:env android path:"D:\Xiaomi\MiFlash\Source\ThirdParty\Google\Android" [16:25:06 2b53f68]:script :D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\flash_all_lock.bat [16:25:06 2b53f68]:Physical Memory Usage:3346432 Byte [16:25:06 2b53f68]:start process id 20460 name cmd [16:25:06 2b53f68]:info1:$fastboot -s devicename getvar product 2>&1 | findstr /r /c:"^product: *jasmine" || echo Missmatching image and device [16:25:06 2b53f68]:info1:product: jasmine [16:25:06 2b53f68]:info1:$fastboot -s devicename getvar product 2>&1 | findstr /r /c:"^product: *jasmine" || exit /B 1 [16:25:06 2b53f68]:info1:product: jasmine [16:25:06 2b53f68]:info1:$set CURRENT_ANTI_VER=2 [16:25:06 2b53f68]:info1:$for /F "tokens=2 delims=: " %i in ('fastboot -s devicename getvar anti 2>&1 | findstr /r /c:"anti:"') do (set version=%i ) [16:25:06 2b53f68]:info1:$(set version=1 ) [16:25:06 2b53f68]:info1:$if [1] EQU [] set version=0 [16:25:06 2b53f68]:info1:$if 1 GTR 2 ( [16:25:06 2b53f68]:info1:echo current device antirollback version is greater than this package [16:25:06 2b53f68]:info1: exit /B 1 [16:25:06 2b53f68]:info1:) [16:25:06 2b53f68]:info1:$fastboot -s devicename flash bluetooth_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\bluetooth.img || [16:25:06 2b53f68]:info2:Sending 'bluetooth_a' (556 KB) OKAY [ 0.021s] [16:25:06 2b53f68]:info2:Writing 'bluetooth_a' OKAY [ 0.009s] [16:25:06 2b53f68]:info2:Finished. Total time: 0.065s [16:25:06 2b53f68]:info1:$fastboot -s devicename flash bluetooth_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\bluetooth.img || [16:25:06 2b53f68]:info2:Sending 'bluetooth_b' (556 KB) OKAY [ 0.019s] [16:25:06 2b53f68]:info2:Writing 'bluetooth_b' OKAY [ 0.005s] [16:25:06 2b53f68]:info2:Finished. Total time: 0.029s [16:25:06 2b53f68]:info1:$fastboot -s devicename flash devcfg_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\devcfg.img || [16:25:06 2b53f68]:info2:Sending 'devcfg_a' (47 KB) OKAY [ 0.009s] [16:25:06 2b53f68]:info2:Writing 'devcfg_a' OKAY [ 0.004s] [16:25:06 2b53f68]:info2:Finished. Total time: 0.033s [16:25:06 2b53f68]:info1:$fastboot -s devicename flash devcfg_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\devcfg.img || [16:25:06 2b53f68]:info2:Sending 'devcfg_b' (47 KB) OKAY [ 0.004s] [16:25:06 2b53f68]:info2:Writing 'devcfg_b' OKAY [ 0.003s] [16:25:06 2b53f68]:info2:Finished. Total time: 0.011s [16:25:06 2b53f68]:info1:$fastboot -s devicename flash dsp_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\dsp.img || [16:25:07 2b53f68]:info2:Sending 'dsp_a' (16384 KB) OKAY [ 0.510s] [16:25:07 2b53f68]:info2:Writing 'dsp_a' OKAY [ 0.152s] [16:25:07 2b53f68]:info2:Finished. Total time: 0.682s [16:25:07 2b53f68]:info1:$fastboot -s devicename flash dsp_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\dsp.img || [16:25:07 2b53f68]:info2:Sending 'dsp_b' (16384 KB) OKAY [ 0.455s] [16:25:08 2b53f68]:info2:Writing 'dsp_b' OKAY [ 0.113s] [16:25:08 2b53f68]:info2:Finished. Total time: 0.572s [16:25:08 2b53f68]:info1:$fastboot -s devicename flash modem_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\modem.img || [16:25:11 2b53f68]:info2:Sending 'modem_a' (108161 KB) OKAY [ 3.305s] [16:25:12 2b53f68]:info2:Writing 'modem_a' OKAY [ 0.742s] [16:25:12 2b53f68]:info2:Finished. Total time: 4.071s [16:25:12 2b53f68]:info1:$fastboot -s devicename flash modem_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\modem.img || [16:25:15 2b53f68]:info2:Sending 'modem_b' (108161 KB) OKAY [ 3.046s] [16:25:18 2b53f68]:info2:Writing 'modem_b' OKAY [ 2.849s] [16:25:18 2b53f68]:info2:Finished. Total time: 5.898s [16:25:18 2b53f68]:info1:$fastboot -s devicename flash xbl_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\xbl.img || [16:25:18 2b53f68]:info2:Sending 'xbl_a' (2504 KB) OKAY [ 0.092s] [16:25:18 2b53f68]:info2:Writing 'xbl_a' OKAY [ 0.039s] [16:25:18 2b53f68]:info2:Finished. Total time: 0.185s [16:25:18 2b53f68]:info1:$fastboot -s devicename flash xbl_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\xbl.img || [16:25:18 2b53f68]:info2:Sending 'xbl_b' (2504 KB) OKAY [ 0.076s] [16:25:18 2b53f68]:info2:Writing 'xbl_b' OKAY [ 0.023s] [16:25:18 2b53f68]:info2:Finished. Total time: 0.103s [16:25:18 2b53f68]:info1:$fastboot -s devicename flash pmic_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\pmic.img || [16:25:18 2b53f68]:info2:Sending 'pmic_a' (38 KB) OKAY [ 0.008s] [16:25:18 2b53f68]:info2:Writing 'pmic_a' OKAY [ 0.003s] [16:25:18 2b53f68]:info2:Finished. Total time: 0.024s [16:25:18 2b53f68]:info1:$fastboot -s devicename flash pmic_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\pmic.img || [16:25:18 2b53f68]:info2:< waiting for 2b53f68 > [16:25:18 2b53f68]:info2:Sending 'pmic_b' (38 KB) OKAY [ 0.004s] [16:25:18 2b53f68]:info2:Writing 'pmic_b' OKAY [ 0.003s] [16:25:18 2b53f68]:info2:Finished. Total time: 0.011s [16:25:18 2b53f68]:info1:$fastboot -s devicename flash rpm_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\rpm.img || [16:25:18 2b53f68]:info2:Sending 'rpm_a' (219 KB) OKAY [ 0.008s] [16:25:18 2b53f68]:info2:Writing 'rpm_a' OKAY [ 0.005s] [16:25:18 2b53f68]:info2:Finished. Total time: 0.025s [16:25:18 2b53f68]:info1:$fastboot -s devicename flash rpm_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\rpm.img || [16:25:18 2b53f68]:info2:Sending 'rpm_b' (219 KB) OKAY [ 0.016s] [16:25:18 2b53f68]:info2:Writing 'rpm_b' OKAY [ 0.005s] [16:25:18 2b53f68]:info2:Finished. Total time: 0.024s [16:25:18 2b53f68]:info1:$fastboot -s devicename flash tz_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\tz.img || [16:25:18 2b53f68]:info2:Sending 'tz_a' (1924 KB) OKAY [ 0.078s] [16:25:18 2b53f68]:info2:Writing 'tz_a' OKAY [ 0.018s] [16:25:18 2b53f68]:info2:Finished. Total time: 0.127s [16:25:18 2b53f68]:info1:$fastboot -s devicename flash tz_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\tz.img || [16:25:18 2b53f68]:info2:Sending 'tz_b' (1924 KB) OKAY [ 0.059s] [16:25:18 2b53f68]:info2:Writing 'tz_b' OKAY [ 0.017s] [16:25:18 2b53f68]:info2:Finished. Total time: 0.079s [16:25:18 2b53f68]:info1:$fastboot -s devicename flash hyp_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\hyp.img || [16:25:18 2b53f68]:info2:Sending 'hyp_a' (272 KB) OKAY [ 0.015s] [16:25:18 2b53f68]:info2:Writing 'hyp_a' OKAY [ 0.005s] [16:25:18 2b53f68]:info2:Finished. Total time: 0.038s [16:25:18 2b53f68]:info1:$fastboot -s devicename flash hyp_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\hyp.img || [16:25:18 2b53f68]:info2:Sending 'hyp_b' (272 KB) OKAY [ 0.016s] [16:25:18 2b53f68]:info2:Writing 'hyp_b' OKAY [ 0.003s] [16:25:18 2b53f68]:info2:Finished. Total time: 0.023s [16:25:18 2b53f68]:info1:$fastboot -s devicename flash keymaster_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\keymaster.img || [16:25:18 2b53f68]:info2:< waiting for 2b53f68 > [16:25:18 2b53f68]:info2:Sending 'keymaster_a' (308 KB) OKAY [ 0.010s] [16:25:18 2b53f68]:info2:Writing 'keymaster_a' OKAY [ 0.006s] [16:25:18 2b53f68]:info2:Finished. Total time: 0.038s [16:25:18 2b53f68]:info1:$fastboot -s devicename flash keymaster_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\keymaster.img || [16:25:19 2b53f68]:info2:Sending 'keymaster_b' (308 KB) OKAY [ 0.015s] [16:25:19 2b53f68]:info2:Writing 'keymaster_b' OKAY [ 0.006s] [16:25:19 2b53f68]:info2:Finished. Total time: 0.025s [16:25:19 2b53f68]:info1:$fastboot -s devicename flash cmnlib64_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\cmnlib64.img || [16:25:19 2b53f68]:info2:Sending 'cmnlib64_a' (267 KB) OKAY [ 0.009s] [16:25:19 2b53f68]:info2:Writing 'cmnlib64_a' OKAY [ 0.005s] [16:25:19 2b53f68]:info2:Finished. Total time: 0.021s [16:25:19 2b53f68]:info1:$fastboot -s devicename flash cmnlib64_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\cmnlib64.img || [16:25:19 2b53f68]:info2:Sending 'cmnlib64_b' (267 KB) OKAY [ 0.015s] [16:25:19 2b53f68]:info2:Writing 'cmnlib64_b' OKAY [ 0.005s] [16:25:19 2b53f68]:info2:Finished. Total time: 0.024s [16:25:19 2b53f68]:info1:$fastboot -s devicename flash cmnlib_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\cmnlib.img || [16:25:19 2b53f68]:info2:Sending 'cmnlib_a' (216 KB) OKAY [ 0.016s] [16:25:19 2b53f68]:info2:Writing 'cmnlib_a' OKAY [ 0.006s] [16:25:19 2b53f68]:info2:Finished. Total time: 0.045s [16:25:19 2b53f68]:info1:$fastboot -s devicename flash cmnlib_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\cmnlib.img || [16:25:19 2b53f68]:info2:Sending 'cmnlib_b' (216 KB) OKAY [ 0.011s] [16:25:19 2b53f68]:info2:Writing 'cmnlib_b' OKAY [ 0.006s] [16:25:19 2b53f68]:info2:Finished. Total time: 0.021s [16:25:19 2b53f68]:info1:$fastboot -s devicename flash abl_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\abl.elf || [16:25:19 2b53f68]:info2:Sending 'abl_a' (148 KB) OKAY [ 0.006s] [16:25:19 2b53f68]:info2:Writing 'abl_a' OKAY [ 0.003s] [16:25:19 2b53f68]:info2:Finished. Total time: 0.022s [16:25:19 2b53f68]:info1:$fastboot -s devicename flash abl_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\abl.elf || [16:25:19 2b53f68]:info2:Sending 'abl_b' (148 KB) OKAY [ 0.007s] [16:25:19 2b53f68]:info2:Writing 'abl_b' OKAY [ 0.003s] [16:25:19 2b53f68]:info2:Finished. Total time: 0.014s [16:25:19 2b53f68]:info1:$fastboot -s devicename flash boot_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\boot.img || [16:25:20 2b53f68]:info2:Sending 'boot_a' (32465 KB) OKAY [ 1.026s] [16:25:20 2b53f68]:info2:Writing 'boot_a' OKAY [ 0.245s] [16:25:20 2b53f68]:info2:Finished. Total time: 1.298s [16:25:20 2b53f68]:info1:$fastboot -s devicename flash boot_b D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\boot.img || [16:25:21 2b53f68]:info2:Sending 'boot_b' (32465 KB) OKAY [ 0.939s] [16:25:21 2b53f68]:info2:Writing 'boot_b' OKAY [ 0.236s] [16:25:21 2b53f68]:info2:Finished. Total time: 1.181s [16:25:21 2b53f68]:info1:$fastboot -s devicename flash system_a D:\Xiaomi\jasmine_global_images_V11.0.28.0.QDIMIXM_10.0\images\system.img || [16:25:21 2b53f68]:info2:< waiting for 2b53f68 > [16:25:54 2b53f68]:info2:Sending sparse 'system_a' 1/6 (516064 KB) OKAY [ 15.100s] [16:25:54 2b53f68]:info2:Writing 'system_a' OKAY [ 0.000s] [16:26:09 2b53f68]:info2:Sending sparse 'system_a' 2/6 (514680 KB) OKAY [ 15.149s] [16:26:09 2b53f68]:info2:Writing 'system_a' OKAY [ 0.000s] [16:26:26 2b53f68]:info2:Sending sparse 'system_a' 3/6 (515436 KB) OKAY [ 17.269s] [16:26:26 2b53f68]:info2:Writing 'system_a' OKAY [ 0.000s]
-
@embeddedmz Try the ROM from here.
This is the site I generally use for ROMs.
DO NOT relock the bootloader. You have a really good chance of bricking the device.
If you haven't locked the bootloader, install TWRP recovery, format/wipe the partitions and try with the Mi Flash tool again.
EDIT: Just saw the log file, it looks so far, but the ROM you are using may be corrupt, if I remember rightly it should be writing "system b".
-
@mrt10001 The image is not corrupt, I downloaded another one from one of the link you shared with me and it has the same SHA1 sum as the one I downloaded from Xiaomi web site.
Should I change the slot from B to A in TWRP ? I have already used the "Wipe" feature, do I need to do something else to ensure the success of Android image flashing with Mi Flash ?
-
@embeddedmz It is worth trying, I had a corrupt Oneplus one stock ROM that gave me a headache.. The Mi Flash tool looks like it is flashing both slots and has stopped at "system b". Try it again as you haved wipe feature. If that fails try slot b.
-
@mrt10001 The flashing tool always stuck at writing 'system_a'. I will try with an older image.
OR maybe I have to wait this time since it is bigger than the other files
[17:46:41 2b53f68]:info2:< waiting for 2b53f68 >
[17:47:08 2b53f68]:info2:Sending sparse 'system_a' 1/4 (773404 KB) OKAY [ 22.698s]
[17:47:08 2b53f68]:info2:Writing 'system_a' OKAY [ 0.001s]I will give it a few more minutes than I will try with an older image.
-
@embeddedmz In TWRP, using the wipe tool, check that your partitions are OK and not corrupted.
-
@mrt10001 The USB cable I'm using is very long, maybe it's the reason of my issues. Tomorrow, I will try with a shorter USB-C cable.
-
I had many problems with Fastboot not working or displaying "press any key to shutdown".
I find a solution here : https://forum.xda-developers.com/t/help-press-any-key-to-shutdown-in-fastboot.3816021/ In short plug a USB 2.0 Hub into your computer and then plug the phone in one of the hub USB 2.0 ports
I finally succeeded in flashing my Mi A2 with the latest Android image available with MiFlash.