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 15:38] – [Recovery Mode] niccolodoc:appunti:hardware:xiaomi_mi_a1 [2020/03/25 16:08] – [March 2020 security update] niccolo
Line 324: Line 324:
 The main content is a **payload.bin**, in our case it was an incremental update (November 2018 Security patches), with size of about 66 Mb. It seems that there is a tool able to extract the content of that payload files, see **[[https://forum.xda-developers.com/android/development/extract-files-ota-payload-bin-diff-t3959161|Extract files from OTA payload.bin full and incremental]]**. The main content is a **payload.bin**, in our case it was an incremental update (November 2018 Security patches), with size of about 66 Mb. It seems that there is a tool able to extract the content of that payload files, see **[[https://forum.xda-developers.com/android/development/extract-files-ota-payload-bin-diff-t3959161|Extract files from OTA payload.bin full and incremental]]**.
  
 +===== March 2020 security update =====
 +
 +In March 2020 Xiaomi released a new security update, according to this post **[[https://piunikaweb.com/2020/03/18/mi-a1-android-10-update-dream-keeps-fading-as-the-device-picks-up-march-security-patch/|Mi A1 Android 10 update dream keeps fading]]**, it is another **AndroidOne v.9** relase, build number **V10.0.19.0.PDHMIXM**.
 +
 +I performed the upgrade re-installing **TWRP** and **Magisk** afterward. The starting conditions were:
 +
 +  * A/B System Updates status: **Current Slot: B** (checked via TWRP => Reboot screen).
 +  * Bootloader is **unlocked**.
 +  * Installed O.S.: Android: 9, Build number: **PKQ1.180917.001.V10.0.14.0.PDHMIXM** (check from Impostazioni => Sistema => Informazioni sul telefono).
 +  * From //Impostazioni// => //Sistema// => //Avanzate// => //Aggiornamento di sistema// we get informed about **Aggiornamento sistema disponibile**, **March 2020 security update** (1100.3 Mb). The file is already downloaded and the phone suggests to reboot to install.
 +  * **Magisk** v20.1 and **TWRP** 3.3.0 were installed into **boot partition** (Slot B).
 +  * **System partition** was the stock one: root privileges were never used to tamper the **/system** hierarchy.
 +
 +The system upgrade will **verify** the **boot** and the **system** partitions before attempting the installation, refusing to proceed if they were tampered. So I had to restore the stock boot image (loosing TWRP and Magisk).
 +
 +I restored the stock **boot_b.img** image (saved before TWRP and Magisk), using the ADB commands from a connected PC:
 +
 +<code>
 +adb reboot bootloader
 +fastboot flash boot_b boot_b.img
 +fastboot reboot
 +</code>
 +
 +**I got a problem** during this step: may be the **boot_b.img** was not the current one, but one of two versions before! Luckily the only negative effect was that **the WiFi was not working**. This is a **logcat** excerpt:
 +
 +<code>
 +android.hardware.wifi@1.0-service: finit_module return: -1: Required key not available
 +android.hardware.wifi@1.0-service: Failed to load WiFi driver
 +android.hardware.wifi@1.0-service: Failed to initialize firmware mode controller
 +android.hardware.wifi@1.0-service: Wifi HAL start failed
 +</code>
 +
 +I proceeded with the standard procedure, trusting that the boot partition would be recognized as original and therefore upgradeable (remember: the update were already downloaded by the phone, so I just launched the reboot and install procedure). After some minutes and three reboots, the system was upgraded; **Android v.9** and build number **PKQ1.180917.001.V10.0.19.0.PDHMIXM**. Fortunately enough the WiFi were recovered.
 +
 +To complete the upgrade:
 +
 +  - Backup the stock boot partitions
 +  - Reinstall TWRP
 +  - Reinstall Magisk
 +  - Backup the rooted boot partitions
 +
 +First of all **boot into TWRP** without installing it:
 +
 +<code>
 +adb reboot bootloader
 +fastboot boot twrp-3.3.0-2-tissot.img
 +</code>
 +
 +Into //TWRP// => //Reboot// menu I verified that the **Current Slot: A**. It is normal that the upgrade procedure swaps the boot partition during the upgrade. Then i backed up the stock images from a PC connected via ADB:
 +
 +<code>
 +adb pull /dev/block/mmcblk0p22 boot_a.img
 +adb pull /dev/block/mmcblk0p23 boot_b.img
 +</code>
 +
 +Now I installed the TWRP recovery into the boot partitions: //TWRP// => //Install// => **twrp-installer-3.3.0-2-tissot.zip**. The installation warns about //Running boot image patcher on slot// A and B, and spit some harmless warnings about the **/vendor** mounting point.
 +
 +After a system reboot, and again a boot into Recovery I performed //TWRP// => //Install// => **Magisk-v20.1.zip**. Once again some harmless warnings about the /vendor mounting point.
 +
 +Finally I repeated the procedure to **backup** the patched **boot_a** and **boot_b** partitions.
 +
 +**NOTICE**: the ADB client is active when I boot TWRP using ''fastboot boot twrp-3.3.0-2-tissot.img''. If instead I boot TWRP from the phone, the ADB client is not active.
 ===== Web References ===== ===== Web References =====
  
doc/appunti/hardware/xiaomi_mi_a1.txt · Last modified: 2020/09/23 17:06 by niccolo