A collection of tips on how to install and use Droidian on the Xiaomi Mi A2 (jasmine_sprout)
- A computer with fastboot and adb access to the phone
- A USB 2.0 port/hub with actual USB 2.0 controller is recommended (fastboot on USB 3 can be problematic with Mi A2)
- Unlocked bootloader
- Backup all your data, as your phone will be WIPED
- It is also recommended to take a note of your
Acces Point Name
in AndroidSettings
before starting the procedure (you will need it for setting up mobile data)
- Droidian
rootfs
anddevtools
forarm64
(nightly releases include devtools) - Adaptation
- Android 9 Pie Firmware
- Latest TWRP image
- Boot to fastboot mode by pressing the
Vol-
andPower
buttons until the phone vibrates - Check that the phone is recognized by running
fastboot devices
- Boot to TWRP by running
fastboot boot twrp-*-jasmine.img
TWRP:
- Go to
Wipe
andFormat data
(type yes) - IMPORTANT: Do the 'Boot into TWRP' step again
PC:
- Connect the phone via USB
- The internal storage is now available over MTP from the PC
- Copy the downloaded files to the internal storage of the phone
TWRP:
- Go to the
Reboot
menu and see which slot is active - If it says
Slot A
, then selectSlot B
to be the active slot, and boot TWRP again
With Slot B
as active:
- Install zip file:
jasmine_sprout_stock_android9.zip
- Now switch back to
Slot A
and boot TWRP again (must boot again, switching is not enough)
With Slot A
as active:
- Install zip file:
droidian-rootfs-api28gsi_arm64_YYYYMMDD.zip
- Install zip file:
droidian-devtools_arm64_YYYYMMDD.zip
- Install zip file:
jasmine-adaptation-YYYYMMDD.zip
- Go back to the main menu and reboot to
System
- The first boot may take longer, and at least one spontaneous reboot is expected during the process
- If all goes well, your phone will boot to the Droidian lock screen, the unlock code is
1234
- Installation is complete
- Flashing the
devtools
zip enabledSSH
over USB. To use it, connect your phone to your computer and type:
ssh droidian@10.15.19.82
The password is 1234
You can check out the status of the port here
You can find a list of mobile-friendly Linux applications at LinuxPhoneApps
You can upgrade to the latest bookworm
version of Droidian after doing all available updates from the Software
application. Run this on the device itself:
sudo apt install droidian-upgrade-bookworm
sudo apt update
sudo apt upgrade
sudo apt update
sudo apt dist-upgrade
sudo apt clean
systemctl reboot
Mobile data should work, but it needs some manual tweaking. The good part is that the configuration is persistent, so you need to do this only once.
- Open the
Settings
app and tapMobile
, then tapAccess Point Names
- Tap the
+
in the top right corner of the pop-up - Fill out the textboxes based on your settings in Android. The
Name
can be anything, e. g., the name of your carrier. TheAPN
is likely some sort of an URL, likeinternet.carrier.net
or something similar. If you didn't see aUsername
andPassword
in Android, you can skip these.
In most cases, rebooting your phone or turning mobile data on and off a few times is enough. Otherwise we'll have to give the same settings to oFono as well.
-
Open the
King's Cross
terminal app or useSSH
and typesudo apt install ofono-scripts && cd /usr/share/ofono/scripts
-
To check your current setup, type
./list-contexts
, look for the first context, called[ /ril_1/context1 ]
-
Notice that context has
Name
,Type
,AccessPointName
,Username
, andPassword
attributes among others, we'll need to change these to match the valid settings taken from Android. -
Now deactivate this context to be able to make changes to it:
./deactivate-context 1
-
And now make your changes like this:
./set-context-property 1 $ATTRIBUTE $VALUE
, where the1
is for[ /ril_1/context1 ]
, the$ATTRIBUTE
is one of the attributes listed above, and the$VALUE
will be the value you need to enter. make sure that theName
andAccessPointName
match theName
andAPN
you entered in the settings menu. If an attribute needs to be empty, set it to""
. -
When you make your changes, you can use
./list-contexts
to see them. -
When everything looks good, activate the updated context:
./activate-context 1
-
If all went well, by running
./list-contexts
again you should see that theActive
attribute is now1
, and under theSettings
attribute you can see the network parameters (Address, Netmask, Gateway, etc.) assigned by your carrier. If you get an error, try rebooting the phone and turning mobile data on and off a few times, and try running the/usr/share/ofono/scripts/activate-context 1
script again. -
In the end, mobile data should be working now.
-
Pro tip: once you configured everything, you can type
history
to see your previous commands. Save them to a script that does all of this for you next time.
For further assistance, visit Shouko's Lab and the Droidian Telegram groups.