Xiaomi Mi A2 (xiaomi-jasmine)
Users owning this device
This device is quite similar to the Xiaomi Redmi Note 7 (xiaomi-lavender) and Xiaomi Redmi Note 8T (xiaomi-willow), and many of the issues were solved with steps from that devices pages, so if you're hacking on the Mi A2 it's a good idea to read the xiaomi-lavender and the xiaomi-willow page closely.
LED / Torch / Screen brightness / Vibrator
Write brightness or boolean value to specific sysfs files:
- Front panel LED light [0-255]:
- Torch light [0-255]:
/sys/class/leds/flashlight/brightness(torch_0 is cold light, torch_1 is warm light)
- Screen brightness [0-255]:
- Vibrator [Miliseconds]:
echo 255 > /sys/class/leds/lcd-backlight/brightness
That maximizes the brightness of the screen
How to enter flash mode
Because this device is an Android One device, it can be unlocked using
fastboot oem unlock from fastboot mode.
- Turn the device off (or restart also works)
- Hold and button
- Once you feel vibration and phone turns on, release button
- Keep holding until you get to recovery.
Flashing (Download, Fastboot) mode
- Same as recovery, but this time hold the and keys.
- Install pmbootstrap.
- Download the device/linux package from my Github (because it is not merged) and paste it into your pmaports/device folder.
pmbootstrap -y zap; pmbootstrap init, choose
xiaomi-jasmine_sproutas your device
- Weston, XFCE4, and GNOME have been successfully tested. Phosh and Plasma Mobile do not work
- Enter fastboot, plug USB into computer
pmbootstrap flasher flash_kernel
pmbootstrap flasher flash_rootfs
pmbootstrap flasher flash_vbmeta
- Reboot, sometimes
fastboot rebootworks, otherwise hold down until it reboots to system.
- Hopefully weston comes up with
Info from the Xiaomi Redmi Note 7, and Redmi Note 8 port that also applies to the Mi A2: