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 revision Previous revision
Next revision
Previous revision
doc:appunti:hardware:xiaomi_mi_a1 [2018/11/20 11:17]
niccolo [Control and Privacy Settings]
doc:appunti:hardware:xiaomi_mi_a1 [2019/05/19 19:46] (current)
niccolo [Install Magisk, the SuperUser Tool]
Line 1: Line 1:
 ====== Xiaomi Mi A1 Android Phone ====== ====== Xiaomi Mi A1 Android Phone ======
  
 +{{:​img:​star_full.png?​nolink&​28|}}
 +{{:​img:​star_full.png?​nolink&​28|}}
 +{{:​img:​star_full.png?​nolink&​28|}}
 +{{:​img:​star_full.png?​nolink&​28|}}
 +{{:​img:​star_full.png?​nolink&​28|}}
 +
 +^ RAM              | 3.8 Gb  |
 +^ Internal Memory ​ | 32 Gb   |
 +^ CPU              | Qualcomm Snapdragon 625 2.0GHz 8-core ​ |
 +^ Screen ​          | 5.5 Inches, 1920 x 1080  |
 +^ Connector ​       | USB Type C  |
 +^ Audio jack       | 3.5 mm  |
 +^ A/B (Seamless) System Updates ​ | Yes  |
 ===== How to Gain root Privileges ===== ===== How to Gain root Privileges =====
  
Line 8: Line 21:
  
   - Install on your PC the **adb** and **fastboot** command line tools.   - Install on your PC the **adb** and **fastboot** command line tools.
-  - **Unlock** the Bootloader. 
   - **Backup**.   - **Backup**.
 +  - **Unlock** the Bootloader.
   - Install a **custom Recovery** program (we used [[https://​twrp.me/​|TWRP]]).   - Install a **custom Recovery** program (we used [[https://​twrp.me/​|TWRP]]).
   - Install the **su** binary and an app to manage **superuser privileges** (we used [[https://​www.xda-developers.com/​what-is-magisk/​|Magisk]]).   - Install the **su** binary and an app to manage **superuser privileges** (we used [[https://​www.xda-developers.com/​what-is-magisk/​|Magisk]]).
Line 107: Line 120:
 Once that TWRP is started on the phone, swipe to allow writing to the partitions, then choose **Install** and browse to the **Twrp-recoveryInstaller-3.2.1-2-oreo.zip** archive. Once that TWRP is started on the phone, swipe to allow writing to the partitions, then choose **Install** and browse to the **Twrp-recoveryInstaller-3.2.1-2-oreo.zip** archive.
  
-After the installation,​ the procedure will ask us if we want to **install the TWRP App**. You can answer yes, but it is not strictly required, the TWRP Recovery is a stand-alone program, it runs when requested without an underlying Android system and it does not require any App. The TWRP App may be used to install or upgrade the TWRP Recovery and to backup the existing Recovery, but it seems that the current version (1.19) is not able to handle the **A/B system updates** mechanism, it searches for the **recovery partition**,​ which **does not exist** in Xiaomi Mi A1 Oreo 8.1.0. So it's best not to use it.+After the installation,​ the procedure will ask us if we want to **install the TWRP App**, we answered **no**.You can answer yes, but it is not strictly required, the TWRP Recovery is a stand-alone program, it runs when requested without an underlying Android system and it does not require any App. The TWRP App may be used to install or upgrade the TWRP Recovery and to backup the existing Recovery, but it seems that the current version (1.19) is not able to handle the **A/B system updates** mechanism, it searches for the **recovery partition**,​ which **does not exist** in Xiaomi Mi A1 Oreo 8.1.0. So it's best not to use it.
  
 Beware of this: Beware of this:
Line 121: Line 134:
 When rooting an Android device we generally need the **su** binary program (the actual Unix tool used to switch from normal user to root), plus an **app to manage superuser permissions** granted (or denied) to other applications. Historically the most known app for this purpose was **SuperSU** by Chainfire, but something changed. Chainfire [[https://​plus.google.com/​+Chainfire/​posts/​6Sp6t9LxtQZ|retired from SuperSU development]] in October 2017 and new protecting schemas were introduced by Google into Android, mainly **[[https://​developer.android.com/​training/​safetynet/​|SafetyNet]]** and **[[https://​source.android.com/​security/​verifiedboot/​dm-verity|dm-verity]]**. The new leading-edge app for su management appears to be **Magisk**. When rooting an Android device we generally need the **su** binary program (the actual Unix tool used to switch from normal user to root), plus an **app to manage superuser permissions** granted (or denied) to other applications. Historically the most known app for this purpose was **SuperSU** by Chainfire, but something changed. Chainfire [[https://​plus.google.com/​+Chainfire/​posts/​6Sp6t9LxtQZ|retired from SuperSU development]] in October 2017 and new protecting schemas were introduced by Google into Android, mainly **[[https://​developer.android.com/​training/​safetynet/​|SafetyNet]]** and **[[https://​source.android.com/​security/​verifiedboot/​dm-verity|dm-verity]]**. The new leading-edge app for su management appears to be **Magisk**.
  
-The first step is to install the ZIP archive which provides the **su** binary, we already copied the **Magisk-v17.3.zip** file to the phone storag. Let's reboot into TWRP Recovery executing from the connected PC the following command:+The first step is to install the ZIP archive which provides the **su** binary, we already copied the **Magisk-v17.3.zip** file to the phone storage. Let's reboot into TWRP Recovery executing from the connected PC the following command:
  
 <​code>​ <​code>​
Line 199: Line 212:
     * Gmail     * Gmail
     * Google Play Film, ...     * Google Play Film, ...
-  * Settings => **Mi Services** 
-    * **User Experience Program** (Programma Esperienza Utente) 
-    * **Send diagnostic data automatically** (Invia i dati diagnostici automaticamente) 
-  * Google Play => Settings => **Auto-update apps** 
-  * Google Play => Settings => Notification settings => **Updates** 
-  * Contacts => Settings => **Default account for new contacts** 
  
   * Impostazioni => **Sicurezza e posizione**   * Impostazioni => **Sicurezza e posizione**
Line 216: Line 223:
     * Posizione => **Cronologia delle posizioni Google** ​     * Posizione => **Cronologia delle posizioni Google** ​
     * Smart Lock per password => **Smart Lock per password** (salvare le password nel tuo Account Google)     * Smart Lock per password => **Smart Lock per password** (salvare le password nel tuo Account Google)
 +    * Altro (menu in alto a destra) => **Utilizzo e diagnostica** (off)
  
-  * FIXME Dove sono queste voci? +  * Settings => **Mi Services*
-    ​Aiuta le app a rilevare la posizione +    * **User Experience Program** (Programma Esperienza Utente) 
-    * Migliora la precisione +    * **Send diagnostic data automatically** (Invia dati diagnostici ​automaticamente) 
-    * Invia dati diagnostici ​e sull'​utilizzo + 
-    Installa aggiornamenti e app (non disattivabile?​)+  * Google Play => Settings => **Auto-update apps** 
 +  * Google Play => Settings => Notification settings => **Updates** 
 +  * Contacts => Settings => **Default account for new contacts**
  
 ===== Battery Otimization and Background Sync ===== ===== Battery Otimization and Background Sync =====
Line 229: Line 239:
   * Settings => Apps & notifications => Advanced => Special app access => **Battery optimization**   * Settings => Apps & notifications => Advanced => Special app access => **Battery optimization**
  
 +===== Upgrading Android maintaining root privileges =====
 +
 +In April 2019 my phone still was running the following:
 +
 +  * **Android 8.1.0** - Patch 2018-10-05
 +  * **Magisk v17.3** (the **su** binary, etc.)
 +  * **MagiskManager v6.0.1** (the superuser rights management app)
 +  * **TWRP 3.2.1-2**
 +
 +MagiskManager warns about the availability of **Magisk v18.1**, the operating system too warns about the availability of **Nov 2018 Android System Update**. Also **MagiskManager** can be upgraded to **v7.1.1** (but **don'​t upgrade it before upgrading Magisk**, the app must follow exactly the **su** binary package contained in Magisk).
 +
 +==== Upgrade Magisk and MagiskManager ====
 +
 +  - Copy the **[[https://​github.com/​topjohnwu/​Magisk/​releases/​download/​v19.0/​Magisk-v19.0.zip|Magisk-v19.0.zip]]** archive to the smartphone. TWRP will search by default into the internal storage, so I copied it into **/​data/​media/​0/​Download/​**,​ but you can use the microSD storage.
 +  - Reboot into TWRP recovery. I used the **adb reboot recovery** command from the PC, but you can use the **VolumeUp + Power** trick.
 +  - From the TWRP menu, choose **Install** and search for the Magisk-v19.0.zip archive.
 +  - I choosed not to verify the zip archive and not to reboot the phone, so I had time to read the output of the command. Everything seemed OK, so I finally **rebooted**.
 +  - Once rebooted in normal system, I launched MagiskManager and let to upgrade itself. Actually it downloaded the **[[https://​github.com/​topjohnwu/​Magisk/​releases/​download/​manager-v7.1.1/​MagiskManager-v7.1.1.apk|MagiskManager-v7.1.1.apk]]** archive and installed it, thus requiring the install privileges.
 +
 +FIXME Write how to complete the upgrade!
 +
 +  * Backup **boot_a** and **boot_b**
 +  * Allow the system to **update**. FIXME Does it complete or will fail? May be it detects that the system was rooted and it will refuse.
 +  * Eventually re-install **TWRP** and **Magisk**. FIXME Does the upgrade switch from boot_b to boot_a partition? If such case, we should to reinstall TWRP and eventually Magisk.
 ===== Web References ===== ===== Web References =====
  
doc/appunti/hardware/xiaomi_mi_a1.1542709040.txt.gz · Last modified: 2018/11/20 11:17 by niccolo