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/08 16:56] – [The OTA Update] niccolodoc:appunti:hardware:xiaomi_mi_a1 [2019/11/09 12:44] – [Install the TWRP Recovery] niccolo
Line 68: Line 68:
 <code> <code>
 adb shell adb shell
-tissot_sprout:/ find /dev -name 'by-name' 2> /dev/null +tissot_sprout:/ $ ls -/dev/block/bootdevice/
-/dev/block/platform/soc/7824900.sdhci/by-name +
-cd /dev/block/platform/soc/7824900.sdhci/by-name +
-ls -l+
 ... ...
 lrwxrwxrwx 1 root root 21 1970-07-10 05:23 boot_a -> /dev/block/mmcblk0p22 lrwxrwxrwx 1 root root 21 1970-07-10 05:23 boot_a -> /dev/block/mmcblk0p22
Line 78: Line 75:
 </code> </code>
  
-The meaning is: search into **/dev/** for a directory named "**by-name**", look for the names **boot_a** and **boot_b** and take note of the actual partition names. You can see also that the **recovery** name does not exists.+The meaning is: search into **/dev/block/bootdevice/** for symbolic links **boot_a** and **boot_b** and take note of the actual partition names. You can see also that the **recovery** name does not exists.
  
 Now we need to **boot** into an environment where we have **root privileges**, otherwise we cannot read the entire partitions. This means booting into the **Fastboot Mode** bootloader and load and run the TWRP Recovery program. Now we need to **boot** into an environment where we have **root privileges**, otherwise we cannot read the entire partitions. This means booting into the **Fastboot Mode** bootloader and load and run the TWRP Recovery program.
Line 127: 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 164: Line 161:
 ===== Fastboot Mode ===== ===== Fastboot Mode =====
  
-Once in Recovery Menu, you can boot into the **Fastboot Mode** using the menu entry //Reboot to bootloader//Otherwise you can execute the **adb** command on PC when the phone is booted normally and connected via the USB cable (it is required to enable //USB debugging// on the phone and to authorize the PC on the phone pop-up, once connected):+In Android**fastboot** is a special diagnostic protocol that you can boot your Android device into. While in fastboot, you can modify the file system images from a computer over a USB connection.
  
-<code> +You can start fastboot mode in severl ways: 
-adb reboot bootloader + 
-</code>+  * Power off the phone, then press **VolumeDown + Power** buttons together, untill vibration. 
 +  * Executing the **adb reboot bootloader** command on a PC when the phone is booted normally and connected via the USB cable. It is required to enable //USB debugging// on the phone and to authorize the PC on the phone pop-up, once connected. 
 +  * From the **stock Recovery** menu, choosing the entry **Reboot to bootloader**. 
 +  * From the **TWRP Recovery**, choosing **Reboot** menu, then **Bootloader**. 
 + 
 +The Xiaomi Mi A1 will show the following image when in fastboot mode:
  
 {{.:android:mi-a1-fastboot-log.jpg?direct&200|Mi-A1 Fastboot Logo}} {{.:android:mi-a1-fastboot-log.jpg?direct&200|Mi-A1 Fastboot Logo}}
 +
 +To control the fastboot mode of the phone, you have to install the **fastboot** command on your PC. On a Debian GNU/Linux install the **fastboot 8.1.0** package. **NOTICE**: Version 7.0.0 is not reccomended, e.g. the command ''fastboot set_active b'' does not work on the Mi A1.
 +
 +Here are some commands that can be used in fastboot mode:
  
 <code> <code>
-adb devices +fastboot help 
-List of devices attached +fastboot devices 
-574524d99913    device+fastboot boot recovery-3.2.1-2-oreo.img 
 +fastboot flash boot_b boot_b.img 
 +fastboot oem unlock 
 +fastboot set_active b 
 +fastboot reboot
 </code> </code>
  
doc/appunti/hardware/xiaomi_mi_a1.txt · Last modified: 2020/09/23 17:06 by niccolo