User Tools

Site Tools


doc:appunti:hardware:xiaomi_mi_a1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
doc:appunti:hardware:xiaomi_mi_a1 [2019/11/09 06:54] – [Fastboot Mode] niccolodoc:appunti:hardware:xiaomi_mi_a1 [2019/11/09 14:48] – [Upgrading the Operating System] niccolo
Line 124: Line 124:
   * **Do not swap Slot A and Slot B**. Some recipes found on the internet say to do that in TWRP (it is from the Reboot menu). I tried it and it was a nightmare! The Reboot menu was stating that the Slot B were active, so I switched to Slot A and installed TWRP. At the next reboot I got a non-working environment: plenty of pop-up with **Android Phone force close**, pop-up for **Factory reset**, boot loop, etc. May be the Slot A contained the boot code for Android 8.0.0, whereas my phone already had received 8.1.0. Fortunately enough I was able to ''adb reboot bootloader'' and switch again to Slot B.   * **Do not swap Slot A and Slot B**. Some recipes found on the internet say to do that in TWRP (it is from the Reboot menu). I tried it and it was a nightmare! The Reboot menu was stating that the Slot B were active, so I switched to Slot A and installed TWRP. At the next reboot I got a non-working environment: plenty of pop-up with **Android Phone force close**, pop-up for **Factory reset**, boot loop, etc. May be the Slot A contained the boot code for Android 8.0.0, whereas my phone already had received 8.1.0. Fortunately enough I was able to ''adb reboot bootloader'' and switch again to Slot B.
   * **Do not veryfy the ZIP archive**. The archive does not have the required info to check.   * **Do not veryfy the ZIP archive**. The archive does not have the required info to check.
-  * **Do not wipe the Dalvik cache after the install**. Don't know if it was the culprit, but after installing TWRP, I clicked the button to wipe Dalvik cache, at the next reboot I had a damaged system. The **home button did not work**, the Developer options were no longer availables (//**Developer options are not available for this user**//), the top **status bar did not swipe** down, etc. I had to **Factory reset** the phone!+  * **Do not wipe the Dalvik cache after the install**. Don't know if it was the culprit, but after installing TWRP, I clicked the button to wipe Dalvik cache, at the next reboot I had a damaged system. The **home button did not work**, the Developer options were no longer availables (//**Developer options are not available for this user**//), the top **status bar did not swipe** down, etc. I had to **Factory reset** the phone (see a possible fix for this problem here: [[xiaomi_mi_a1_home_key_problem]]).
  
 ==== Install Magisk, the SuperUser Tool ==== ==== Install Magisk, the SuperUser Tool ====
Line 273: Line 273:
 The phone automatically warns about the availability of an **OTA (On The Air) Upgrade**. You can also check for upgrades availability by tapping //Settings// => //System// => //**System Updates**//. The phone automatically warns about the availability of an **OTA (On The Air) Upgrade**. You can also check for upgrades availability by tapping //Settings// => //System// => //**System Updates**//.
  
-If you allow downloading and installing the upgrade, a check will be performed about the **integrity** of the **boot image** and the **system image**, before the actual install. The check will fail and the upgrade will be aborted if one of this condition is true:+If you allow downloading and installing the upgrade, a check will be performed about the **integrity** of the **boot image** and the **system image**, before the actual install. The check will fail and the upgrade will be aborted if one or both of these two conditions is true:
  
   - You have installed **Magisk SU** or **TWRP Recovery**. These software are installed into the boot partition, either **boot_a** or **boot_b** partition. The installation of Magisk patches only the active boot partition, whereas TWRP will patches (install itself) both boot partitions.   - You have installed **Magisk SU** or **TWRP Recovery**. These software are installed into the boot partition, either **boot_a** or **boot_b** partition. The installation of Magisk patches only the active boot partition, whereas TWRP will patches (install itself) both boot partitions.
Line 280: Line 280:
 The upgrade process will fail with a warning message **Couldn’t update - Installation problem** (in Italian: //Impossibile aggiornare - Problema di installazione//). The upgrade process will fail with a warning message **Couldn’t update - Installation problem** (in Italian: //Impossibile aggiornare - Problema di installazione//).
  
-To rescue from the first condition, it is sufficient to restore the boot partition from the original backup. You will loose root and TWRP Recovery, but you can reinstall them after the upgrade. If you have just installed Magisk, uninstalling it should be rather simple. Start the Magisk Manager app, disable and uninstall all the modules (if any) and reboot. Then run Magisk Manager again and choose to uninstall it completely. But if you have installed also TWRP you have to recover from a backup image. This is the recipe to run from a PC command line (supposing that active partition is B and that you have the original **boot_b.img** dump):+To escape from the first condition, it is sufficient to **restore the boot partition** from the original backup. You will loose root and TWRP Recovery, but you can reinstall them after the upgrade. If you have just installed Magisk, uninstalling it should be sufficient and rather simple. Start the Magisk Manager app, disable and uninstall all the modules (if any) and reboot. Then run Magisk Manager again and choose to uninstall it completely. But if you have installed also TWRP you have to recover from a backup image. This is the recipe to run from a PC command line (supposing that **active partition is B** and that you have the original **boot_b.img** dump):
  
 <code> <code>
Line 288: Line 288:
 </code> </code>
  
-Allow upgrading after tampering the /system partition is more painful; yuo have to restore the full system by flashing the original ROM (so loosing all your dataapps and settings), then you will allow the update to install, and restore all your customization+Allowing automatic OTA upgrade after **tampering the /system partition** is more painful: you have to **restore system partition** by flashing it in fastboot mode. Obviously you need the original **system.img** fileeither from your own backup or from factory ROM archive. Fortunately enough Xiaomi provides full stock ROM archives of the various versions. Look at this **[[https://forum.xda-developers.com/mi-a1/how-to/ota-official-fastboot-image-n2g47h-7-12-t3728929|forum post]]** and search for your version.
  
 +Once you extracted the system.img file from the archive, boot in fastboot mode and execute the following from an attached PC (once again your **active partition is B**):
 +
 +<code>
 +fastboot flash system_b system.img
 +fastboot reboot
 +</code>
 ==== The OTA Update ==== ==== The OTA Update ====
  
doc/appunti/hardware/xiaomi_mi_a1.txt · Last modified: 2020/09/23 17:06 by niccolo