UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. PhAndersson
    3. Best
    P
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 11
    • Posts 73
    • Groups 0

    Posts

    Recent Best Controversial
    • UT installation on Google Pixel 3a (step-by-step)

      The present post does not contain any question. When I flashed my first phone with UT four years ago, I struggled a bit to gather all relevant information, so I'm offering the below procedure to the community in the hope that it may ease the journey of first-time users.

      Disclaimer: this is a description of what worked for me. Use at your own risk. Flashing is performed from a PC installed with openSUSE Leap 15.6 -- some commands may need to be adapted if you use a different distro.

      Important: if flashing the phone with either Android Flash Tool or the flash-all.sh script hangs / fails to detect the phone, DO try from a different PC if you can (I have a Lenovo laptop and a custom-built PC both installed with openSUSE Leap 15.6: I was never able to flash from the laptop, while the PC worked like a charm). It may also be worth trying different USB cables / USB ports.

      Note: in the steps below, '#' denote commands that are executed as root, '$' denote commands that are executed as a regular user.

      Android initial setup

      • unbox and fully charge phone (do not turn on yet)

      • insert SIM, turn phone on

        • select language (English UK)

        • click Get Started

        • connect to WiFi (provide credentials)
          -> "getting your phone ready..."

        • "Copy apps & data" -> select "Don't copy"

        • Google account sign-in -> login

        • Accept conditions

        • set a PIN

        • Continue setup or get reminder -> get reminder

        • Unselect all optional apps

        • Settings -> System -> Updates
          (Android 12, build SP2A.220505.008)

        • Settings -> About Phone
          tap "Build number" 7 times, enter PIN to confirm
          -> "you are now a developer"

        • Settings -> System -> Developer Options:

          • enable USB debugging
          • allow OEM unlocking, enter PIN to confirm
      • turn phone off

      Dev. env. installation on linux PC

      • unzip 'platform-tools' archive below ~/platform-tools/

      • edit ~/.bashrc to add ${HOME}/platform-tools to your PATH

      • install (update) 'android-udev-rules' package from build service

        # zypper addrepo https://download.opensuse.org/repositories/hardware/15.6/hardware.repo
        # zypper refresh
        # zypper install android-udev-rules-20250314-lp156.51.1.noarch
        

        (this also installs adb and fastboot by way of dependencies)

      • add your own user account to 'adbusers' group:

        # usermod -aG adbusers <userID>
        

        (logout/login)

        # grep adb /etc/group
        adbusers:x:453:<userID>
        

      Unlock bootloader

      • turn phone on (regular mode). Unlock it

      • plug phone into PC

      • ADB connection detected by phone. Check box to always allow connection from PC (allow PC's RSA key fingerprint on device):

        $ adb devices -l
        List of devices attached
        XXXXXXXXXX             device usb:1-6 product:sargo model:Pixel_3a device:sargo transport_id:1
        
      • turn phone off

      • boot into Fastboot Mode
        (volume down + power -- hold for 5")

        Fastboot menu appears

        $ fastboot devices -l
        XXXXXXXXXX             fastboot usb:1-6
        
      • unlock bootloader

        $ fastboot flashing unlock
        OKAY [  0.133s]
        Finished. Total time: 0.133s
        
      • phone screen prompts: do not unlock / unlock
        (use volume keys to select, power button to confirm)
        -> bootloader confirmed unlocked

      • turn phone off (use volume button to select option, power button to confirm)

      Return phone to latest Android 9

      (the steps below refer to the Android Flash Tool -- using the flash-all.sh script also works fine but starts with the phone booted into the bootloader)

      • check that 'adb' is not running
        (otherwise, stop it with 'adb kill-server')

      • turn phone on the usual way

      • redo basic setup, as bootloader unlock returned it to factory default (see above)

      • reconnect to phone using 'adb devices' to get prompt to authorized PC and allow it

      • visit following URL in Chrome (authorise pop-ups in browser):
        https://flash.android.com/

      • select device

      • select target build (PQ3B.190801.002)

      • DO NOT select to relock bootloader

      • click Install Build (confirm, accept license)

        • DO NOT interact with device during flashing
        • it reboots to fastboot
        • reselect device in Chrome
      • flash successful -- power cycle device

      • reboot to Android 9, redo initial setup, enable dev. mode, USB debug, connect and allow PC, turn phone off

      Flash phone with UbuntuTouch

      • install 'snapd' daemon

        # zypper addrepo https://download.opensuse.org/repositories/system:/snappy/openSUSE_Leap_15.6/ Snappy
        # zypper refresh
        
        # zypper in snapd
        
        # systemctl enable snapd.apparmor.service
        # systemctl start snapd.apparmor.service
        # systemctl enable snapd.service
        # systemctl start snapd.service
        
      • reboot

      • install UBports installer

        # snap install ubports-installer
        
        $ which ubports-installer
        /snap/bin/ubports-installer
        
        $ snap info ubports-installer
        name:      ubports-installer
        summary:   The easy way to install Ubuntu Touch on UBports devices.
        publisher: UBports
        store-url: https://snapcraft.io/ubports-installer
        contact:   https://github.com/ubports/ubports-installer/issues/new
        license:   GPL-3.0
        description: |
         A friendly cross-platform Installer for Ubuntu Touch. Just connect a
         supported device to your PC, follow the on-screen instructions and watch
         this awesome tool do all the rest.
        commands:
         - ubports-installer
        snap-id:      mq0sTMV7a8744UTRBwQHimStAqsGzbjj
        tracking:     latest/stable
        refresh-date: 2022-09-11
        channels:
         latest/stable:    0.9.7-beta 2022-09-11 (435)  97MB -
         latest/candidate: ?                                 
         latest/beta:      0.9.8-beta 2022-11-02 (445) 102MB -
         latest/edge:      0.10.0     2023-04-23 (462) 103MB -
        installed:          0.9.7-beta            (435)  97MB -
        
      • switch ubports-installer to "edge" channel

        $ snap refresh ubports-installer --edge
        ubports-installer (edge) 0.10.0 from UBports refreshed
        
        $ snap info ubports-installer
        name:      ubports-installer
        summary:   The easy way to install Ubuntu Touch on UBports devices.
        publisher: UBports
        store-url: https://snapcraft.io/ubports-installer
        contact:   https://github.com/ubports/ubports-installer/issues/new
        license:   GPL-3.0
        description: |
         A friendly cross-platform Installer for Ubuntu Touch. Just connect a
         supported device to your PC, follow the on-screen instructions and watch
         this awesome tool do all the rest.
        commands:
         - ubports-installer
        snap-id:      mq0sTMV7a8744UTRBwQHimStAqsGzbjj
        tracking:     latest/edge
        refresh-date: today at 13:47 CET
        channels:
         latest/stable:    0.9.7-beta 2022-09-11 (435)  97MB -
         latest/candidate: ?                                 
         latest/beta:      0.9.8-beta 2022-11-02 (445) 102MB -
         latest/edge:      0.10.0     2023-04-23 (462) 103MB -
        installed:          0.10.0                (462) 103MB -
        
      • start ubports-installer

        $ ubports-installer 
        Gtk-Message: 19:40:25.179: Failed to load module "window-decorations-gtk-module"
        Gtk-Message: 19:40:25.179: Failed to load module "colorreload-gtk-module"
        info: Welcome to the UBports Installer version 0.10.0!
        
        • connect phone (off) via USB

        • click select device manually
          -> Google Pixel 3a:3a XL

        • click "My device is unlocked"

        • select OS
          -> Ubuntu Touch

        • click Install

        • Installation options:

          • select channel
            -> 20.04/stable
          • check "wipe personal data"
          • check "Flash system partitions using fastboot" (default)
          • click OK
        info: device selected: sargo
        info: Installing Ubuntu Touch on your Google Pixel 3a/3a XL (sargo)
        info: configuring...
        info: settings: {"bootstrap":true,"wipe":true,"channel":"20.04/arm64/android9plus/stable"}
        info: Downloading 3 files
        info: Downloaded file 1 of 3
        info: Downloaded file 2 of 3
        info: Downloaded file 3 of 3
        
        • boot phone to bootloader, click Continue

          (flashing firmware)

        • boot to recovery, click Continue

          (if button fails, try adb reboot recovery)
          => shows 3-circles recovery logo and menu

        info: Downloading 12 files
        info: Downloaded file 1 of 12
        info: Downloaded file 2 of 12
        info: Downloaded file 3 of 12
        info: Downloaded file 4 of 12
        info: Downloaded file 5 of 12
        info: Downloaded file 6 of 12
        info: Downloaded file 7 of 12
        info: Downloaded file 8 of 12
        info: Downloaded file 9 of 12
        info: Downloaded file 10 of 12
        info: Downloaded file 11 of 12
        info: Downloaded file 12 of 12
        info: All done! Your device will now reboot and complete the installation. Enjoy exploring Ubuntu Touch!
        

        (pushing files to phone)

        • phone reboots at the end
          => goes to longish 3-circles recovery logo animation while installing (may last a few minutes -- have patience)

        • phone reboots again
          => this time it boots to UT and asks you to perform the initial setup

      posted in Google Pixel 3a/3a XL
      P
      PhAndersson
    • RE: Dual-SIM + OTA-20 on Mi A2

      Status update:
      As it happens, I took the opportunity of having the phone on the dev channel to re-test an application that typically froze the GUI (the app called "Steps" -- I already opened a bug report on that specific issue). Turns out the behaviour was the same on v763, so I wanted to force a power cycle by rebooting the phone on the recovery image (Power + Vol+).

      But instead of the recovery menu, I was greeted by the spiralling animation: the phone was clearly installing something. When it finished rebooting, I was back on OTA-20, and both SIMs were still active!

      Following @DPITTI suggestion, I also removed v763 from the upgrade history.

      I'll now mark this post as "resolved". Many thanks to all those who contributed.

      posted in Xiaomi Mi A2
      P
      PhAndersson
    • RE: Installer crash when clicking on "Choose file" button

      @alter Thinking back about the whole sequence, I'm a bit concerned that my first failed attempt at flashing UT (before adapting the udev rules) may have left the phone in an "unexpected" state, which in turn caused the 2nd flashing attempt to fail with these ominous error messages.

      It is perhaps best at this point that use TWRP again to put Android9 back on the phone (in both slots), make sure the phone is bootable again, and retry the whole 'ubports-installer' process again.

      posted in UBports Installer
      P
      PhAndersson
    • RE: UBports flashing failed half-way

      @stanwood Thanks a lot for the advice.

      posted in Google Pixel 3a/3a XL
      P
      PhAndersson
    • RE: Dual-SIM + OTA-20 on Mi A2

      Just upgraded to OTA-20: the upgrade process itself went flawlessly, but the SIM card in slot #1 is no longer detected!

      • during startup, I'm prompted for only one PIN code (the prompt no longer identifies the SIM, but the code only matches SIM #2)
      • in "settings | mobile", only one SIM and matching operator is listed (the one for SIM #2)
      • same thing in the top-of-screen quick access bar
      • "setting | about" reports OTA-20

      Is there any information I could collect on the phone to help troubleshoot this?

      posted in Xiaomi Mi A2
      P
      PhAndersson
    • RE: Installer crash when clicking on "Choose file" button

      Problem has been resolved -- phone is now running UT OTA-19 stable.

      Details about the fix in the device-specific post (see URL in previous post). I'll now mark this one as resolved as well.

      Many thanks to all those who helped.

      posted in UBports Installer
      P
      PhAndersson
    • RE: UBports flashing failed half-way

      I just installed the phone with UBP-installer v0.10.0 -- everything went like a charm this time round.

      Many thanks to both of you for your support.

      posted in Google Pixel 3a/3a XL
      P
      PhAndersson
    • RE: Dual-SIM + OTA-20 on Mi A2

      @dpitti The device initially came with Android 8.1, but I flashed it with v9 as recommended before proceeding with the UT installation.

      posted in Xiaomi Mi A2
      P
      PhAndersson
    • Any way to push contacts to car kit?

      Hello again,
      I was able to pair my newly installed Pixel 3a with the car kit of my Skoda Octavia, and I'm glad to report that everything seems to be working:

      • I'm able to use the car sound system to listen to music played by the phone (selecting Bluetooth as source on the car Media Centre)
      • the car displays the phone's battery charge and GSM network strength
      • when an incoming call is received, the ringtone comes through the car sound system
      • I'm able to take the call from the dashboard and the voice goes through the car sound system as expected

      Now for the question: is there a tool that would allow me to push my contacts to the car kit over Bluetooth?

      Thanks in advance.

      Ph. A.

      posted in Google Pixel 3a/3a XL
      P
      PhAndersson
    • Stuck early in the setup process: am I missing a key piece of the puzzle?

      Hello,
      I've received the new phone and I'm trying to follow @magnargj suggested procedure to set it up (as per this post: https://forums.ubports.com/topic/6187/ut-installation-failure/5).

      The phone currently runs Android 8.1.0. I've enabled dev mode, USB debugging and allowed OEM unlock. I then restarted the phone in "Fastboot" mode and was able to successfully unlock the bootloader:

      $ fastboot oem unlock
      

      ('unlock_critical', as was suggested elsewhere, was not recognized)
      This reverted the phone to factory settings, so I reconfigured it and re-enabled dev mode and USB debug, and now each time it boots, the phone dutifully warns me that the bootloader is unlocked (there is also an "unlocked" status at the bottom of the splash screen).

      I'm now trying to boot on the TWRP recovery image, but that doesn't work. The "fastboot devices" command does list the phone:

      $ fastboot devices -l
      dbXXXX                 fastboot usb:1-1
      
      

      But attempting boot yields the following error:

      $ fastboot boot ./twrp-3.5.2_9-0-jasmine_sprout.img
      Downloading 'boot.img'
      FAILED (remote: unknown command)
      Finished. Total time: 0.110s
      

      I've also tried using fastboot to query various phone-side variables (as this should be a pretty basic feature), but all variables I tried (version, version-bootlader, serialno, product, secure, is-userspace) return either "unknown command" or "variable not found"). Just to make sure, I've also tried this with different USB cables.

      So I feel I'm still missing a key piece of the puzzle.

      An older (2014) page about ADB and fastboot utilities claimed that 'fastboot' could do little unless the Android phone was rooted. It also said that on Nexus devices, the bootloader unlock also rooted the phone. So I installed the so-called "Root Checker" app on the Xiaomi to query its status, and it confirmed the phone is currently NOT rooted.

      Is rooting the phone necessary to proceed with the Android upgrade and OTA-19 installation?
      Is there something else I might have overlooked?

      TIA
      Ph. A.

      posted in Xiaomi Mi A2
      P
      PhAndersson
    • RE: Stuck early in the setup process: am I missing a key piece of the puzzle?

      @phandersson
      Further experimental results. I just watched a tutorial video on how to root the phone (just in case), and it starts with early steps that are very similar to the ones I followed, so I tried those as well:

      • enable dev mode + USB debug (already done, obviously)
      • connect phone to PC
      • type "adb devices" => device is listed:
      $ adb devices -l
      List of devices attached
      dbXXXX                 device usb:1-1 product:jasmine model:Mi_A2 device:jasmine_sprout transport_id:2
      
      
      • type "adb reboot bootloader" to reach fastboot: the phone does reboot and reaches the fastboot splash screen
      • use fastboot to boot on TWRP image -- this time, the message was different (although it still doesn't work):
      $ fastboot boot ./twrp-3.5.2_9-0-jasmine_sprout.img
      Downloading 'boot.img'
      FAILED (data write failure (Cannot send after transport endpoint shutdown))
      Finished. Total time: 0.850s
      

      And indeed, the fastboot environment appears to have crashed: the fastboot splash screen is gone, and the phone displays a short text message: "press any key to shutdown" (pressing power then reboots the phone).

      As the message could hint at a data transmission problem, I tried the same procedure with the other USB-C cable, and this time the output for the last step was:

      $ fastboot boot ./twrp-3.5.2_9-0-jasmine_sprout.img
      Downloading 'boot.img'
      FAILED (remote: unknown command)
      Finished. Total time: 0.012s
      

      So, similar to the behaviour described in my initial post above. But I'm a bit concerned by this lack of repeatability...

      posted in Xiaomi Mi A2
      P
      PhAndersson
    • RE: Stuck early in the setup process: am I missing a key piece of the puzzle?

      @magnargj Yes, that's correct. Either 'volume down' + 'power' or "adb reboot bootloader". Same result in both cases.

      Following the suggestion of a nice troubleshooting page about the "unknown command" issue, I also replaced the 'android-tools' RPM I was using (I'm on OpenSUSE Leap 15.2) by the official Google SDK ZIP file.

      After doing this, the "fastboot boot twrp.img" command issued a different message ("sending twrp.img...") and just hung.

      I'm also confused about this Xiaomi-specific unlock process. I found their FAQ (here: https://c.mi.com/thread-2262302-1-0.html) and in there they say: "For Android One users, please check out the unlocking tutorial in your device subforum. You don't have to go through the procedures mentioned here." They also say (further down): "How to check whether the bootloader is locked/unlocked? [...] An "Unlocked" word will be shown when booting." which is already the case on my phone.

      posted in Xiaomi Mi A2
      P
      PhAndersson
    • RE: UBports install fails with permission error on the device

      OK -- many thanks to "Shou" and "Kisekinopureya" who helped on Telegram.

      First suggestion was to run "./fastboot flashing unlock_critical" (after having flashed stock Android 9, but before starting the UPI). That turned out not changing anything.

      The second suggestion was to wipe user data and cache using "./fastboot -w" (once again, before starting the UPI), and this did the trick

      My phone now happily runs UT!

      posted in Xiaomi Mi A2
      P
      PhAndersson
    • Dual-SIM + OTA-20 on Mi A2

      Hello,

      In a recent post dated Nov. 20, @magnargj mentioned that applying OTA-20 on his Mi A2 caused a problem with the 1st SIM slot, which he resolved by moving the card to the 2nd slot.

      I'm currently using both slots (private + professional SIMs), which works fine on OTA-19, and I would like to know what to expect before deciding to apply OTA-20.

      • Can anyone confirm or deny the issue with dual-SIM support on the Mi A2 under OTA-20?
      • If confirmed, is there a workaround (that preserves dual-SIM functionalities)?
      • If confirmed, is this issue tracked somewhere?

      TIA

      posted in Xiaomi Mi A2
      P
      PhAndersson
    • RE: Dual-SIM + OTA-20 on Mi A2

      Many thanks to all those who commented.

      I'll apply OTA-20 in the coming days and report back.

      posted in Xiaomi Mi A2
      P
      PhAndersson