Skip to content

Instantly share code, notes, and snippets.

@NickMcSweeney
Last active October 11, 2024 07:17
Show Gist options
  • Save NickMcSweeney/d97abe569634b3a4ea3a67079fadacc1 to your computer and use it in GitHub Desktop.
Save NickMcSweeney/d97abe569634b3a4ea3a67079fadacc1 to your computer and use it in GitHub Desktop.
Ubuntu Touch Notes For Redme Note 8 Pro (Begonia)

Installing the OS

Unlock the phone

Needs to be done in a Windows system. Only needs to be done once.

  1. Create a Mi account on Xiaomi’s website. Beware that one account is only allowed to unlock one unique device every 30 days.
  2. Add a phone number to your Mi account.
  3. Insert a SIM into your phone.
  4. Enable developer options in Settings > About Phone by repeatedly tapping MIUI Version.
  5. Link the device to your Mi account in Settings > Additional settings > Developer options > Mi Unlock status.
  6. Download the Mi Unlock app (Windows is required to run the app).
  7. Run the Mi Unlock app and follow the instructions provided by the app. It may tell you that you have to wait up to 30 days. If it does so, please wait the quoted amount of time before continuing to the next step!
  8. After device and Mi account are successfully verified, the bootloader should be unlocked.
  9. Since the device resets completely, you will need to re-enable USB debugging to continue.

Downgrade to android 10 / miui 12

  • Needs to be done in a Windows system.
  • Not sure I trust it 100% but this site seemed to be the best I could find for a FlashTool + Fastboot ROM
  • Make sure to figure out which version of beginia you need. even though nobody knows the difference.
  • Make sure to use a ROM that is android 10, since UT is on Hallium 10.

Install ubtouch

there is an issue with Halium 10 that makes adb not work great, to get around this it appears that the port does an install with the hallium 9 version, and then you can upgrade from within the OS.

Basic setup

  • run through the setup walkthrough
  • connect to a wifi network

update to desired channel/ota

Make sure that you are logged into WIFI

There appears to be an issue with getting updates over wifi.

  • installs to OS build number 2021-09-11
  • About > check for updates > Update settings > Channels spins infinitely when fetching channels

Fix update bug: downlad hangs

To fix updates on Ubuntu Touch execute this command in Terminal app:

sudo rm -r /android/cache/recovery; sudo mkdir /android/cache/recovery && sudo reboot

As a result, this command performs the following actions:

  1. Deletes the cache directory /android/cache/recovery with all contents, if any.
  2. Creates this directory.
  3. Restarts the OS.

Initially, this command was intended to simply create a cache directory for updates to get this working, but I noticed that sometimes there are problems with finding updates and selecting update channels after the update, and I added a command to delete the directory.

Attempt a graphical update

  • Settings > Updates
  • Ubuntu touch should start to download as soon as you open it

If this doesn't enable updates try:

sudo system-image-cli -v

This should give an indication of the errors being experienced. My experience was that the key file was missing from the recovery. this should be able to be manually downloaded and copied to the needed directory (the restart the system) then it should work.

for me the cli gave a missing key error, but the settings updater did work.

Setting Up

After upgrading (esp to 20.04) if it is a fresh install it is easiest to do a factory reset (Erase all) and resetup the device. Then go to Updates > Update settings > Reinstall all apps. Nothing happens, BUT reboot and go to Updates and you have updates.

Install Waydroid

based on this post.

  1. Go in the OpenStore and install "WayDroid Helper" app: https://open-store.io/app/waydroidhelper.aaronhafer
  2. From this app, find "WayDroid install" and run the automatic installation.
  3. You can choose either a classic installation, or with Google Apps.
    • Then restart device.
  4. WayDroid is now installed on your device.

If you didn't choose the Google Apps installation variant, follow carefully the following instructions:

  1. Click on the "WayDroid" icon and open the web browser. a. Now, from the WayDroid browser, navigate to F-Droid website: https://f-droid.org/ b. Install F-Droid app.
  2. In F-Droid settings
  3. (still from F-Droid store) Search and install:
    • microG Service Core
    • FakeStore
    • Microg Services Framework Proxy
    • MozillaNlpBackend
  4. Open Micro-G app, go in Micro-G settings
    • check that the device is well registered
    • self check-on
      • enable and check everything you can.
      • all boxes should be activated.
    • Allow Google cloud services and notifications.
    • In the location module services, activate MozillaNlpBackend
  5. (Still in F-droid store) search and install "Aurora Store".
  6. Now you will have 3 stores:
    • OpenStore: Ubuntu Touch default store
    • F-Droid: Android store giving access to thousands opensource apps (only opensource apps are available)
    • Aurora Store: All Android Apps (similar to Google play store, but without Google frame services that are now replaced with Micro-G)
  7. Then, open "WayDroid helper" app (https://open-store.io/app/waydroidhelper.aaronhafer) and hide all duplicate apps you don't need (calculator, contacts, calendar, camera, files, settings, gallery, etc...).
    • Swipe right the app you want to hide and click on the "trash".
    • To show it again, do the same but swipe left and click on "+".
  8. Now you should be able to use both Ubuntu Touch and Android apps on your device.

To uninstall an application, use the store that has installed the app, but note that an issue avoid the icon to be erase from the app launcher. So you might use the following workaround:

Open terminal

cd /home/phablet/.local/share/applications
rm 'APPLICATION NAME'

To check if WayDroid is running well, run:

waydroid status

To upgrade WayDroid to a newer version run:

sudo waydroid upgrade

Other WayDroid commands are available in WayDroid helper app.

It appears that while reverting to MiUi can be done, Ubuntu Touch may cause the baseband and IMEI to show as unknow resulting in an inability to detect a SimCard and therefore no cellular connection.

Switching back to UT restores the cellular functionality (in UT).

Links to valuable resources

  • may be a good alternative -- but with the issue in going back to MIUI may not be possible once UT is installed.
  • has clear instructions for unlocking the bootloader
  • since there are issues with adb, this is the way to do remote debugging developing with UT.
@dzisiejszewyzwania
Copy link

dzisiejszewyzwania commented Oct 11, 2024

Got a solution for IMEI removal (you're gonna need your chip_id, easiest possibility is to use termux (no root needed):

https://www.youtube.com/watch?v=A2lvJbdmohg&t=645s

steps I took to make it work:

flash eng rom
remove nvmeta and nvram using custom recovery
connect phone to maui meta
upload MDDB file
set imei

then it will probably still show that it is not working as nvram is corrupted. so,

flash newest miui using the same tool
then:
go to fastboot
flash custom recovery e.g. BRP using
"fastboot flash recovery BRP3.5.2v3.0.img"
"fastboot reboot recovery"

then set the imei again using this wonderful tool:
https://github.com/timjosten/mtk_imei/tree/main

run script, go to "out" folder, sideload imei_repair.zip

zajebiście

if it doesn't work try to delete partitions and reboot to recovery before launching system to make some factory resets, flash again etc.
this stuff took me months to fix, I can't assure you it will work for you but when I saw the signal on my sim card I got a fucking heart palpitation.
Also, MAUI meta didn't work for me for the first time, I had to flash eng rom and delete the partitions again.

I was unable to run any updates newer than fastboot global MIUI with that solution, however, I flashed crdroid instead and it works flawlessly.

Hope it will work for you.

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