Skip to content

Instantly share code, notes, and snippets.

@sivinnguyen
Last active April 2, 2024 12:57
Show Gist options
  • Save sivinnguyen/a6f65c5af9198d40d396e11048512347 to your computer and use it in GitHub Desktop.
Save sivinnguyen/a6f65c5af9198d40d396e11048512347 to your computer and use it in GitHub Desktop.
How to install Ubuntu Touch on Xiaomi Redmi 9A/9C (Draft)

Ubuntu Touch on Redmi 9A Installation (Linux)

  1. Unlock bootloader
    https://www.getdroidtips.com/unlock-bootloader-redmi-9-redmi-9a/

  2. Downgrade to android 10 (stock rom) by SP Flash Tool or Mi Flash Tool
    https://spflashtool.com/
    https://xiaomiflashtool.com/
    https://xiaomistockrom.com/

  3. Download UB rom
    Dandelion in name for 9A. Another is 9C (Angelica)
    https://gitlab.com/ubports/porting/community-ports/android10/xiaomi-redmi-9c/xiaomi-angelica

  4. Download Google platform-tools

  5. Extract ub file and flash
    Turn off phone, hold "volume down" + "power" to get into fastboot mode or

adb reboot fastboot

Disable VerifiedBoot
https://www.mediafire.com/file/kvz7dsowp09sfb1/vbmeta_disabled.img/file

fasboot flash vbmeta [path to vbmeta_disabled.img]

fasboot flash vbmeta_system [path to vbmeta_disabled.img]

fasboot flash vbmeta_vendor [path to vbmeta_disabled.img]

Flash dtbo and boot

fastboot flash boot [path to boot.img]
fastboot flash dtbo [path to dtbo.img]

Flash system

# boot to fastbootd mode
fastboot reboot fastboot

# delete product partition to get space for system
fastboot delete-logical-partition product

fastboot flash system [path to system.img]

# Reboot to enjoy Ubuntu Touch
fastboo reboot

Troubleshoots

  1. Linux doesn't recognize phone when boot to fastbootd mode ->> try to add udev rules https://wiki.archlinux.org/title/Android_Debug_Bridge#Adding_udev_rules

  2. Loop boot at redmi logo --> need to flash vbmata. --> use mtkclient if you cannot boot to flashboot https://github.com/bkerler/mtkclient (python mtk w --loader [path to loader]/MTK_AllInOne_DA.bin --preloader [path to preloader]/preloader_k62v1_64_bsp.bin vbmeta [path to vbmeta]/vbmeta.img)

@InfiniteCoder01
Copy link

How do I get UB (boot.img, dtbo.img and system.img) for Xiaomi Redmi 9C? Gitlab doesn't seem to have releases, nor I can find anything here

@sivinnguyen
Copy link
Author

How do I get UB (boot.img, too.img and system.img) for Xiaomi Redmi 9C? GitLab doesn't seem to have released, nor I can find anything here

You must log in to GitLab and select "Build > Jobs or Artifacts" from the left-hand menu. Download a devel-flashable file (>700MiB) if you have 9C, use it at your own risk.

@InfiniteCoder01
Copy link

InfiniteCoder01 commented Mar 14, 2024

Works just fine! Thanks!

@fdciabdul
Copy link

i stuck in here

image

it can't detected fastboot in fastbootd

in device manager its just show warning
image

@sivinnguyen
Copy link
Author

i stuck in here

image

it can't detected fastboot in fastbootd

in device manager its just show warning image

You need to install usb driver for Redmi 9A/C. Please gg it, I don't use windows.

@fdciabdul
Copy link

i stuck in here
image
it can't detected fastboot in fastbootd
in device manager its just show warning image

You need to install usb driver for Redmi 9A/C. Please gg it, I don't use windows.

i don't know where to install it, already installed mtk driver for flashing this device, but fastbootd doesn't recognize this phone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment