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 12:44] – [Install the TWRP Recovery] niccolodoc:appunti:hardware:xiaomi_mi_a1 [2019/11/09 15:38] – [Recovery Mode] niccolo
Line 150: Line 150:
 When an app requires root privileges, the Magisk management app will show a pop-up on the phone, allowing to grant or deny the permission, so be sure that the phone is not in screen-locked mode. When an app requires root privileges, the Magisk management app will show a pop-up on the phone, allowing to grant or deny the permission, so be sure that the phone is not in screen-locked mode.
 ===== Recovery Mode ===== ===== Recovery Mode =====
 +
 +Android devices have a feature called **Android Recovery Mode**, which allows users to fix some problems. Technically, Recovery Mode refers to a special bootable partition, which contains a recovery application installed in it. The Xiaomi Mi A1 **does not actually have a recovery partition**, the recovery program is installed into the **boot A** and **boot B** partitions instead. You can use the Recovery from official **stock ROM**, or you can install a **custom recovery**, as the famous (and very rich in features) TWRP Recovery. 
 +
 +To enter the Recover mode you can follow one of this ways:
  
   * **Power Off** the phone.   * **Power Off** the phone.
   * Press **VolumeUp + Power**, wait about 3 seconds for the Mi logo screen.   * Press **VolumeUp + Power**, wait about 3 seconds for the Mi logo screen.
-  * Wait for the Broken Droid logo with the **No command** message+ 
 +If you have installed the TWRP Recovery, its main screen will appear. If you have the stock ROM Recovery you have to: 
 + 
 +  * Wait for the Broken Droid logo with the **No command** message.
   * Press **Power + VolumeUp** shortly, the Recovery menu will appear.   * Press **Power + VolumeUp** shortly, the Recovery menu will appear.
  
 {{.:android:mi-a1-stock-recovery.jpg?direct&240|Mi-A1 Stock ROM Recovery Menu}} {{.:android:mi-a1-stock-recovery.jpg?direct&240|Mi-A1 Stock ROM Recovery Menu}}
 {{.:android:mi-a1-stock-recovery-api.jpg?direct&120|Recovery Supported API}} {{.:android:mi-a1-stock-recovery-api.jpg?direct&120|Recovery Supported API}}
 +
 +When the phone is booted in normal system, you can reboot in Recovery mode by issuing the following command from an attached PC:
 +
 +<code>
 +adb reboot recovery
 +</code>
 +
  
 ===== Fastboot Mode ===== ===== Fastboot Mode =====
Line 273: Line 287:
 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 294:
 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 302:
 </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