UBports Robot Logo UBports Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login
    1. Home
    2. usenix
    U
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 11
    • Groups 0

    usenix

    @usenix

    4
    Reputation
    6
    Profile views
    11
    Posts
    0
    Followers
    0
    Following
    Joined
    Last Online

    usenix Unfollow Follow

    Best posts made by usenix

    • RE: Installer fails

      This is the output from /proc/mounts (though adb shell):

      jasmine_sprout:/ $ cat /proc/mounts                                                                                         
      /dev/root / ext4 ro,seclabel,nodev,relatime 0 0
      tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=1896744k,nr_inodes=474186,mode=755 0 0
      devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
      proc /proc proc rw,relatime,gid=3009,hidepid=2 0 0
      sysfs /sys sysfs rw,seclabel,relatime 0 0
      selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
      tmpfs /mnt tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,size=1896744k,nr_inodes=474186,mode=755,gid=1000 0 0
      tmpfs /apex tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,size=1896744k,nr_inodes=474186,mode=755 0 0
      /dev/block/dm-1 /vendor ext4 ro,seclabel,relatime,discard 0 0
      none /dev/cg2_bpf cgroup2 rw,nosuid,nodev,noexec,relatime 0 0
      none /dev/cpuctl cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
      none /acct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
      none /dev/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset,noprefix,release_agent=/sbin/cpuset_release_agent 0 0
      none /dev/stune cgroup rw,nosuid,nodev,noexec,relatime,schedtune 0 0
      /dev/root /apex/com.android.tzdata@290000000 ext4 ro,seclabel,relatime 0 0
      /dev/root /apex/com.android.tzdata ext4 ro,seclabel,relatime 0 0
      /dev/root /apex/com.android.runtime@1 ext4 ro,seclabel,relatime 0 0
      /dev/root /apex/com.android.runtime ext4 ro,seclabel,relatime 0 0
      debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0
      none /config configfs rw,nosuid,nodev,noexec,relatime 0 0
      pstore /sys/fs/pstore pstore rw,seclabel,nosuid,nodev,noexec,relatime 0 0
      tracefs /sys/kernel/debug/tracing tracefs rw,seclabel,relatime 0 0
      /dev/block/bootdevice/by-name/userdata /data ext4 rw,lazytime,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,resgid=1065,data=ordered 0 0
      /dev/block/bootdevice/by-name/modem_a /vendor/firmware_mnt vfat ro,context=u:object_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
      /dev/block/bootdevice/by-name/bluetooth_a /vendor/bt_firmware vfat ro,context=u:object_r:bt_firmware_file:s0,relatime,uid=1002,gid=3002,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
      /dev/block/bootdevice/by-name/dsp_a /vendor/dsp ext4 ro,seclabel,nosuid,nodev,relatime,data=ordered 0 0
      /dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0
      tmpfs /storage tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,size=1896744k,nr_inodes=474186,mode=755,gid=1000 0 0
      /dev/root /apex/com.android.conscrypt@290000000 ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.conscrypt ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.media@290000000 ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.media ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.media.swcodec@290000000 ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.media.swcodec ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.resolv@290000000 ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.resolv ext4 ro,seclabel,nodev,relatime 0 0
      adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
      /data/media /mnt/runtime/default/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal,unshared_obb 0 0
      /data/media /storage/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal,unshared_obb 0 0
      /data/media /mnt/runtime/read/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid,default_normal,unshared_obb 0 0
      /data/media /mnt/runtime/write/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal,unshared_obb 0 0
      /data/media /mnt/runtime/full/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal,unshared_obb 0 0
      
      jasmine_sprout:/ $ df
      Filesystem            1K-blocks    Used Available Use% Mounted on
      /dev/root               3047900 2544264    487252  84% /
      tmpfs                   1896744    1016   1895728   1% /dev
      tmpfs                   1896744       0   1896744   0% /mnt
      tmpfs                   1896744       0   1896744   0% /apex
      /dev/block/dm-1         2031964  667752   1347828  34% /vendor
      /dev/block/mmcblk0p69  48110436  161536  47801444   1% /data
      /data/media            48110436  161536  47801444   1% /storage/emulated
      
      jasmine_sprout:/ $ ls -la /dev/block/by-name/                                                                                                                                                    
      total 0
      drwxr-xr-x 2 root root 1460 1972-03-30 04:01 .
      drwxr-xr-x 6 root root 2120 1972-03-30 04:01 ..
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 abl_a -> /dev/block/mmcblk0p25
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 abl_b -> /dev/block/mmcblk0p26
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 apdp -> /dev/block/mmcblk0p11
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 bk1 -> /dev/block/mmcblk0p51
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 bluetooth_a -> /dev/block/mmcblk0p38
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 bluetooth_b -> /dev/block/mmcblk0p50
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 boot_a -> /dev/block/mmcblk0p62
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 boot_b -> /dev/block/mmcblk0p63
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 cache -> /dev/block/mmcblk0p64
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 cmnlib64_a -> /dev/block/mmcblk0p22
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 cmnlib64_b -> /dev/block/mmcblk0p24
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 cmnlib_a -> /dev/block/mmcblk0p21
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 cmnlib_b -> /dev/block/mmcblk0p23
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 ddr -> /dev/block/mmcblk0p28
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 devcfg_a -> /dev/block/mmcblk0p30
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 devcfg_b -> /dev/block/mmcblk0p31
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 devinfo -> /dev/block/mmcblk0p43
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 dip -> /dev/block/mmcblk0p27
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 dpo -> /dev/block/mmcblk0p2
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 dsp_a -> /dev/block/mmcblk0p48
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 dsp_b -> /dev/block/mmcblk0p49
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 frp -> /dev/block/mmcblk0p14
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 fsc -> /dev/block/mmcblk0p3
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 fsg -> /dev/block/mmcblk0p45
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 hyp_a -> /dev/block/mmcblk0p17
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 hyp_b -> /dev/block/mmcblk0p18
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 keymaster_a -> /dev/block/mmcblk0p36
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 keymaster_b -> /dev/block/mmcblk0p37
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 keystore -> /dev/block/mmcblk0p13
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 limits -> /dev/block/mmcblk0p4
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 logdump -> /dev/block/mmcblk0p57
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 logfs -> /dev/block/mmcblk0p44
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 mdtp_a -> /dev/block/mmcblk0p52
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 mdtp_b -> /dev/block/mmcblk0p53
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 mdtpsecapp_a -> /dev/block/mmcblk0p34
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 mdtpsecapp_b -> /dev/block/mmcblk0p35
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 minidump -> /dev/block/mmcblk0p61
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 misc -> /dev/block/mmcblk0p42
      lrwxrwxrwx 1 root root   18 1972-03-30 04:01 mmcblk0 -> /dev/block/mmcblk0
      lrwxrwxrwx 1 root root   22 1972-03-30 04:01 mmcblk0rpmb -> /dev/block/mmcblk0rpmb
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 modem_a -> /dev/block/mmcblk0p58
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 modem_b -> /dev/block/mmcblk0p59
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 modemst1 -> /dev/block/mmcblk0p46
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 modemst2 -> /dev/block/mmcblk0p47
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 msadp -> /dev/block/mmcblk0p12
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 oops -> /dev/block/mmcblk0p10
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 persist -> /dev/block/mmcblk0p55
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 persistbak -> /dev/block/mmcblk0p56
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 pmic_a -> /dev/block/mmcblk0p19
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 pmic_b -> /dev/block/mmcblk0p20
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 rawdump -> /dev/block/mmcblk0p60
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 rpm_a -> /dev/block/mmcblk0p15
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 rpm_b -> /dev/block/mmcblk0p16
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 sec -> /dev/block/mmcblk0p6
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 splash -> /dev/block/mmcblk0p54
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 ssd -> /dev/block/mmcblk0p5
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 sti -> /dev/block/mmcblk0p39
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 storsec -> /dev/block/mmcblk0p9
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 switch -> /dev/block/mmcblk0p1
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 system_a -> /dev/block/mmcblk0p65
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 system_b -> /dev/block/mmcblk0p66
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 toolsfv -> /dev/block/mmcblk0p29
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 tz_a -> /dev/block/mmcblk0p32
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 tz_b -> /dev/block/mmcblk0p33
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 userdata -> /dev/block/mmcblk0p69
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 vbmeta_a -> /dev/block/mmcblk0p7
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 vbmeta_b -> /dev/block/mmcblk0p8
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 vendor_a -> /dev/block/mmcblk0p67
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 vendor_b -> /dev/block/mmcblk0p68
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 xbl_a -> /dev/block/mmcblk0p40
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 xbl_b -> /dev/block/mmcblk0p41
      
      

      I don't know if this is informative. The phone is not rooted so I don't have permission to /proc/partitions.

      posted in Xiaomi Mi A2
      U
      usenix
    • RE: Installer fails

      From this, here is my process:

      (base) peter@pt450:~/Downloads$ fastboot boot twrp.img
      downloading 'boot.img'...
      OKAY [  0.780s]
      booting...
      OKAY [  0.155s]
      finished. total time: 0.935s
      
      jasmine_sprout_stock_android9.zip: 1 file pushed. 28.6 MB/s (1131322942 bytes in 37.715s)
      

      In TWRP, select this zip for installation.

      Updating partition detail…
      ...done
      Full SELinux support is present.
      MTP Enabled
      Installing zip file ‘/jasmine_sprout_stock_android9.zip’
      Checkeing for Digest file…
      Unmounting System…
      Flashing A/B zip to inactive slot: B
      Step 1/2
      Step 2/2
      To flash additional zips, please reboot recovery to switch to the updated slot.
      Updating partition details…
      ...done
      

      “Reboot System” in TWRP. This boots into Android 10 (which resides in Slot A).

      peter@pt450:~/Downloads$ adb reboot fastboot
      peter@pt450:~/Downloads$ fastboot set_active b
      Setting current slot to 'b'...
      OKAY [  0.026s]
      finished. total time: 0.026s
      peter@pt450:~/Downloads$ fastboot reboot
      rebooting...
      
      finished. total time: 0.050s
      

      The system doesn’t boot up. I get this on my phone:

      Android Recovery
      xiaomi/jasmine/jasmine_sprout
      9/PKQ1.180904.001/V10.0.2.0.PDIMIFJ
      user/release-keys
      Use volume up/down and power.
      Can’t load Android system. Your data may be corrupt. If you continue to get this message, you may need to perform a factory data reset and erase all user data stored on this device
      [Try again][Factory data reset]
      

      xiaomi’s V10 is in fact Android 9; so this is the correct version. At this point, Try again doesn’t work (i.e. boots to the same message), and I go for the factory data reset. After that, a fresh Android 9 greets me. I go through the initial settings, then I enable USB degugging. I restart Android one more time just to be sure.

      peter@pt450:~/Downloads$ adb devices
      List of devices attached
      8542b8c	unauthorized
      peter@pt450:~/Downloads$ adb reboot fastboot
      error: device unauthorized.
      This adb server's $ADB_VENDOR_KEYS is not set
      Try 'adb kill-server' if that seems wrong.
      Otherwise check for a confirmation dialog on your device.
      

      The odd thing is, on the phone no authorization dialogue popped up when I enabled USB debugging. I revoke the USB debugging authorizations on the phone, disable and re-enable USB debugging, and now the authorization dialogue does pop up.

      peter@pt450:~/Downloads$ adb reboot fastboot
      

      This does not boot into fastboot mode, but into the android image. I reboot into fastboot mode with the Power+Vol_down key combination.

      peter@pt450:~/Downloads$ fastboot set_active b
      error: Device does not support slots.
      peter@pt450:~/Downloads$ fastboot boot twrp.img
      downloading 'boot.img'… #this stalls, nothing happens
      peter@pt450:~/Downloads$ fastboot reboot #this stalls, nothing happens
      

      So, I’m in a state with a non-working fastboot again. I can’t even fastboot reboot (I thought this was still possible the last time, but I might be wrong). I reboot by holding the Power button for some seconds, and I can boot into android 9 again.

      I guess I will have to work my way through the internal updates again, to get back to android 10 with working fastboot. I have the appropriate zip for android 10, but I don't see the way to get in on the device...

      posted in Xiaomi Mi A2
      U
      usenix
    • RE: Installer fails

      I guess I will have to work my way through the internal updates again, to get back to android 10 with working fastboot. I have the appropriate zip for android 10, but I don't see the way to get in on the device...

      Off-topic: I couldn't edit my message to append these two sentences, since akismet flagged it as spam????

      posted in Xiaomi Mi A2
      U
      usenix
    • RE: Installer fails

      @AppLee As a user I will not troubleshoot the source code (which is also written in a language I don't speak). Where are the log files you speak of? They are not in the directory that ubports-installer is run from, they are not in $HOME. If they exist, that's great, but the existence and the location should be documented. The easiest solution is often to print everything to the terminal...
      The Mi A2 is not a "new device" that should "require some work". I actually bought this device specifically since it is listed as supported by the installer and it is listed as a device where "everything" works.
      Don't get me wrong, I'm aware that this is a community project. And I'm further aware that the Mi A2 is a community device. It's not a problem if things don't work. However, UBports presents itself (on ubports.com) as a project that is hiding a lot of technical details from its target audience, thereby making the impression that it's not necessary to care about technical details. "Just run the installer and go." Not.
      @belohoub Thanks, that is valuable information. With the latest installer (0.8.7), I tried again to install the stable channel. But it hangs at "Cleaning Up - Formatting system partition" with no further information on the shell, just a lot of CPU load. Or does one have to wait (hours?) long? Afterwards the device is again in a state where fastboot is broken. Seems like I have to go the lengthy upgrade path to android 10 again to get a working device. I might try to re-flash the android 9-image once more and try again. At some point it will be time to settle for Lineage OS 😞

      posted in Xiaomi Mi A2
      U
      usenix

    Latest posts made by usenix

    • RE: Installer fails

      @AppLee As a user I will not troubleshoot the source code (which is also written in a language I don't speak). Where are the log files you speak of? They are not in the directory that ubports-installer is run from, they are not in $HOME. If they exist, that's great, but the existence and the location should be documented. The easiest solution is often to print everything to the terminal...
      The Mi A2 is not a "new device" that should "require some work". I actually bought this device specifically since it is listed as supported by the installer and it is listed as a device where "everything" works.
      Don't get me wrong, I'm aware that this is a community project. And I'm further aware that the Mi A2 is a community device. It's not a problem if things don't work. However, UBports presents itself (on ubports.com) as a project that is hiding a lot of technical details from its target audience, thereby making the impression that it's not necessary to care about technical details. "Just run the installer and go." Not.
      @belohoub Thanks, that is valuable information. With the latest installer (0.8.7), I tried again to install the stable channel. But it hangs at "Cleaning Up - Formatting system partition" with no further information on the shell, just a lot of CPU load. Or does one have to wait (hours?) long? Afterwards the device is again in a state where fastboot is broken. Seems like I have to go the lengthy upgrade path to android 10 again to get a working device. I might try to re-flash the android 9-image once more and try again. At some point it will be time to settle for Lineage OS 😞

      posted in Xiaomi Mi A2
      U
      usenix
    • RE: Installer fails

      @belohoub That's very interesting. I followed the instructions from the video as well. That left me at least with an Android 9 installation where fastboot and adb work as expected.
      When trying to use the installer thereafter, it is detecting the device, showing no error message, but then hangs when trying to install "stable", the installer hangs indefinitely. All I get on the console is

      peter@pt450:~/Downloads$ ubports-installer 
      info: Welcome to the UBports Installer version 0.8.4-beta!
      info: device detected: jasmine_sprout
      info: Installing Ubuntu Touch on your Xiaomi Mi A2 (jasmine_sprout)
      info: configuring...
      info: settings: {"channel":"16.04/arm64/android9/stable","wipe":false,"bootstrap":true}
       info: Good bye!
      

      After your report, I might try again with the dev channel. However, since I want to use the phone as a daily driver, I have little interest in running anything that is not as stable as possible.
      I'm kind of snowed in with work right now, but I will post my progress hopefully within a week.

      I think it would be rather beneficial to not have a "black box" installer that can't be diagnosed, and instructions for a "manual install" would be more than welcome.

      Best

      posted in Xiaomi Mi A2
      U
      usenix
    • RE: Installer fails

      @antidroid Good point about the slots- I thought the more careful approach is to flash just the one- however, since after flashing the phone is in a state where I can't select the other slot anyway, I can probably flash both 🙂
      BTW upon detecting the phone the ubports installer instructs to use a specific stock android version and provides the dowload link. So yes, this must be phone-specific.
      @BristledKing did you flash the stock android 9 (downloaded from ubports link, I suppose)? To both slots? And how (just to make sure I could reproduce your approach)? And from a phone that was running android 9 or android 10?

      posted in Xiaomi Mi A2
      U
      usenix
    • RE: Installer fails

      I guess I will have to work my way through the internal updates again, to get back to android 10 with working fastboot. I have the appropriate zip for android 10, but I don't see the way to get in on the device...

      Off-topic: I couldn't edit my message to append these two sentences, since akismet flagged it as spam????

      posted in Xiaomi Mi A2
      U
      usenix
    • RE: Installer fails

      From this, here is my process:

      (base) peter@pt450:~/Downloads$ fastboot boot twrp.img
      downloading 'boot.img'...
      OKAY [  0.780s]
      booting...
      OKAY [  0.155s]
      finished. total time: 0.935s
      
      jasmine_sprout_stock_android9.zip: 1 file pushed. 28.6 MB/s (1131322942 bytes in 37.715s)
      

      In TWRP, select this zip for installation.

      Updating partition detail…
      ...done
      Full SELinux support is present.
      MTP Enabled
      Installing zip file ‘/jasmine_sprout_stock_android9.zip’
      Checkeing for Digest file…
      Unmounting System…
      Flashing A/B zip to inactive slot: B
      Step 1/2
      Step 2/2
      To flash additional zips, please reboot recovery to switch to the updated slot.
      Updating partition details…
      ...done
      

      “Reboot System” in TWRP. This boots into Android 10 (which resides in Slot A).

      peter@pt450:~/Downloads$ adb reboot fastboot
      peter@pt450:~/Downloads$ fastboot set_active b
      Setting current slot to 'b'...
      OKAY [  0.026s]
      finished. total time: 0.026s
      peter@pt450:~/Downloads$ fastboot reboot
      rebooting...
      
      finished. total time: 0.050s
      

      The system doesn’t boot up. I get this on my phone:

      Android Recovery
      xiaomi/jasmine/jasmine_sprout
      9/PKQ1.180904.001/V10.0.2.0.PDIMIFJ
      user/release-keys
      Use volume up/down and power.
      Can’t load Android system. Your data may be corrupt. If you continue to get this message, you may need to perform a factory data reset and erase all user data stored on this device
      [Try again][Factory data reset]
      

      xiaomi’s V10 is in fact Android 9; so this is the correct version. At this point, Try again doesn’t work (i.e. boots to the same message), and I go for the factory data reset. After that, a fresh Android 9 greets me. I go through the initial settings, then I enable USB degugging. I restart Android one more time just to be sure.

      peter@pt450:~/Downloads$ adb devices
      List of devices attached
      8542b8c	unauthorized
      peter@pt450:~/Downloads$ adb reboot fastboot
      error: device unauthorized.
      This adb server's $ADB_VENDOR_KEYS is not set
      Try 'adb kill-server' if that seems wrong.
      Otherwise check for a confirmation dialog on your device.
      

      The odd thing is, on the phone no authorization dialogue popped up when I enabled USB debugging. I revoke the USB debugging authorizations on the phone, disable and re-enable USB debugging, and now the authorization dialogue does pop up.

      peter@pt450:~/Downloads$ adb reboot fastboot
      

      This does not boot into fastboot mode, but into the android image. I reboot into fastboot mode with the Power+Vol_down key combination.

      peter@pt450:~/Downloads$ fastboot set_active b
      error: Device does not support slots.
      peter@pt450:~/Downloads$ fastboot boot twrp.img
      downloading 'boot.img'… #this stalls, nothing happens
      peter@pt450:~/Downloads$ fastboot reboot #this stalls, nothing happens
      

      So, I’m in a state with a non-working fastboot again. I can’t even fastboot reboot (I thought this was still possible the last time, but I might be wrong). I reboot by holding the Power button for some seconds, and I can boot into android 9 again.

      I guess I will have to work my way through the internal updates again, to get back to android 10 with working fastboot. I have the appropriate zip for android 10, but I don't see the way to get in on the device...

      posted in Xiaomi Mi A2
      U
      usenix
    • RE: Installer fails

      This is the output from /proc/mounts (though adb shell):

      jasmine_sprout:/ $ cat /proc/mounts                                                                                         
      /dev/root / ext4 ro,seclabel,nodev,relatime 0 0
      tmpfs /dev tmpfs rw,seclabel,nosuid,relatime,size=1896744k,nr_inodes=474186,mode=755 0 0
      devpts /dev/pts devpts rw,seclabel,relatime,mode=600 0 0
      proc /proc proc rw,relatime,gid=3009,hidepid=2 0 0
      sysfs /sys sysfs rw,seclabel,relatime 0 0
      selinuxfs /sys/fs/selinux selinuxfs rw,relatime 0 0
      tmpfs /mnt tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,size=1896744k,nr_inodes=474186,mode=755,gid=1000 0 0
      tmpfs /apex tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,size=1896744k,nr_inodes=474186,mode=755 0 0
      /dev/block/dm-1 /vendor ext4 ro,seclabel,relatime,discard 0 0
      none /dev/cg2_bpf cgroup2 rw,nosuid,nodev,noexec,relatime 0 0
      none /dev/cpuctl cgroup rw,nosuid,nodev,noexec,relatime,cpu 0 0
      none /acct cgroup rw,nosuid,nodev,noexec,relatime,cpuacct 0 0
      none /dev/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset,noprefix,release_agent=/sbin/cpuset_release_agent 0 0
      none /dev/stune cgroup rw,nosuid,nodev,noexec,relatime,schedtune 0 0
      /dev/root /apex/com.android.tzdata@290000000 ext4 ro,seclabel,relatime 0 0
      /dev/root /apex/com.android.tzdata ext4 ro,seclabel,relatime 0 0
      /dev/root /apex/com.android.runtime@1 ext4 ro,seclabel,relatime 0 0
      /dev/root /apex/com.android.runtime ext4 ro,seclabel,relatime 0 0
      debugfs /sys/kernel/debug debugfs rw,seclabel,relatime 0 0
      none /config configfs rw,nosuid,nodev,noexec,relatime 0 0
      pstore /sys/fs/pstore pstore rw,seclabel,nosuid,nodev,noexec,relatime 0 0
      tracefs /sys/kernel/debug/tracing tracefs rw,seclabel,relatime 0 0
      /dev/block/bootdevice/by-name/userdata /data ext4 rw,lazytime,seclabel,nosuid,nodev,noatime,discard,noauto_da_alloc,resgid=1065,data=ordered 0 0
      /dev/block/bootdevice/by-name/modem_a /vendor/firmware_mnt vfat ro,context=u:object_r:firmware_file:s0,relatime,uid=1000,gid=1000,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
      /dev/block/bootdevice/by-name/bluetooth_a /vendor/bt_firmware vfat ro,context=u:object_r:bt_firmware_file:s0,relatime,uid=1002,gid=3002,fmask=0337,dmask=0227,codepage=437,iocharset=iso8859-1,shortname=lower,errors=remount-ro 0 0
      /dev/block/bootdevice/by-name/dsp_a /vendor/dsp ext4 ro,seclabel,nosuid,nodev,relatime,data=ordered 0 0
      /dev/block/bootdevice/by-name/persist /mnt/vendor/persist ext4 rw,seclabel,nosuid,nodev,noatime,data=ordered 0 0
      tmpfs /storage tmpfs rw,seclabel,nosuid,nodev,noexec,relatime,size=1896744k,nr_inodes=474186,mode=755,gid=1000 0 0
      /dev/root /apex/com.android.conscrypt@290000000 ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.conscrypt ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.media@290000000 ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.media ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.media.swcodec@290000000 ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.media.swcodec ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.resolv@290000000 ext4 ro,seclabel,nodev,relatime 0 0
      /dev/root /apex/com.android.resolv ext4 ro,seclabel,nodev,relatime 0 0
      adb /dev/usb-ffs/adb functionfs rw,relatime 0 0
      /data/media /mnt/runtime/default/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal,unshared_obb 0 0
      /data/media /storage/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=1015,multiuser,mask=6,derive_gid,default_normal,unshared_obb 0 0
      /data/media /mnt/runtime/read/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=23,derive_gid,default_normal,unshared_obb 0 0
      /data/media /mnt/runtime/write/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal,unshared_obb 0 0
      /data/media /mnt/runtime/full/emulated sdcardfs rw,nosuid,nodev,noexec,noatime,fsuid=1023,fsgid=1023,gid=9997,multiuser,mask=7,derive_gid,default_normal,unshared_obb 0 0
      
      jasmine_sprout:/ $ df
      Filesystem            1K-blocks    Used Available Use% Mounted on
      /dev/root               3047900 2544264    487252  84% /
      tmpfs                   1896744    1016   1895728   1% /dev
      tmpfs                   1896744       0   1896744   0% /mnt
      tmpfs                   1896744       0   1896744   0% /apex
      /dev/block/dm-1         2031964  667752   1347828  34% /vendor
      /dev/block/mmcblk0p69  48110436  161536  47801444   1% /data
      /data/media            48110436  161536  47801444   1% /storage/emulated
      
      jasmine_sprout:/ $ ls -la /dev/block/by-name/                                                                                                                                                    
      total 0
      drwxr-xr-x 2 root root 1460 1972-03-30 04:01 .
      drwxr-xr-x 6 root root 2120 1972-03-30 04:01 ..
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 abl_a -> /dev/block/mmcblk0p25
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 abl_b -> /dev/block/mmcblk0p26
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 apdp -> /dev/block/mmcblk0p11
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 bk1 -> /dev/block/mmcblk0p51
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 bluetooth_a -> /dev/block/mmcblk0p38
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 bluetooth_b -> /dev/block/mmcblk0p50
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 boot_a -> /dev/block/mmcblk0p62
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 boot_b -> /dev/block/mmcblk0p63
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 cache -> /dev/block/mmcblk0p64
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 cmnlib64_a -> /dev/block/mmcblk0p22
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 cmnlib64_b -> /dev/block/mmcblk0p24
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 cmnlib_a -> /dev/block/mmcblk0p21
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 cmnlib_b -> /dev/block/mmcblk0p23
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 ddr -> /dev/block/mmcblk0p28
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 devcfg_a -> /dev/block/mmcblk0p30
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 devcfg_b -> /dev/block/mmcblk0p31
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 devinfo -> /dev/block/mmcblk0p43
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 dip -> /dev/block/mmcblk0p27
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 dpo -> /dev/block/mmcblk0p2
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 dsp_a -> /dev/block/mmcblk0p48
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 dsp_b -> /dev/block/mmcblk0p49
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 frp -> /dev/block/mmcblk0p14
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 fsc -> /dev/block/mmcblk0p3
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 fsg -> /dev/block/mmcblk0p45
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 hyp_a -> /dev/block/mmcblk0p17
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 hyp_b -> /dev/block/mmcblk0p18
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 keymaster_a -> /dev/block/mmcblk0p36
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 keymaster_b -> /dev/block/mmcblk0p37
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 keystore -> /dev/block/mmcblk0p13
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 limits -> /dev/block/mmcblk0p4
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 logdump -> /dev/block/mmcblk0p57
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 logfs -> /dev/block/mmcblk0p44
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 mdtp_a -> /dev/block/mmcblk0p52
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 mdtp_b -> /dev/block/mmcblk0p53
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 mdtpsecapp_a -> /dev/block/mmcblk0p34
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 mdtpsecapp_b -> /dev/block/mmcblk0p35
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 minidump -> /dev/block/mmcblk0p61
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 misc -> /dev/block/mmcblk0p42
      lrwxrwxrwx 1 root root   18 1972-03-30 04:01 mmcblk0 -> /dev/block/mmcblk0
      lrwxrwxrwx 1 root root   22 1972-03-30 04:01 mmcblk0rpmb -> /dev/block/mmcblk0rpmb
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 modem_a -> /dev/block/mmcblk0p58
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 modem_b -> /dev/block/mmcblk0p59
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 modemst1 -> /dev/block/mmcblk0p46
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 modemst2 -> /dev/block/mmcblk0p47
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 msadp -> /dev/block/mmcblk0p12
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 oops -> /dev/block/mmcblk0p10
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 persist -> /dev/block/mmcblk0p55
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 persistbak -> /dev/block/mmcblk0p56
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 pmic_a -> /dev/block/mmcblk0p19
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 pmic_b -> /dev/block/mmcblk0p20
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 rawdump -> /dev/block/mmcblk0p60
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 rpm_a -> /dev/block/mmcblk0p15
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 rpm_b -> /dev/block/mmcblk0p16
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 sec -> /dev/block/mmcblk0p6
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 splash -> /dev/block/mmcblk0p54
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 ssd -> /dev/block/mmcblk0p5
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 sti -> /dev/block/mmcblk0p39
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 storsec -> /dev/block/mmcblk0p9
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 switch -> /dev/block/mmcblk0p1
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 system_a -> /dev/block/mmcblk0p65
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 system_b -> /dev/block/mmcblk0p66
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 toolsfv -> /dev/block/mmcblk0p29
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 tz_a -> /dev/block/mmcblk0p32
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 tz_b -> /dev/block/mmcblk0p33
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 userdata -> /dev/block/mmcblk0p69
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 vbmeta_a -> /dev/block/mmcblk0p7
      lrwxrwxrwx 1 root root   20 1972-03-30 04:01 vbmeta_b -> /dev/block/mmcblk0p8
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 vendor_a -> /dev/block/mmcblk0p67
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 vendor_b -> /dev/block/mmcblk0p68
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 xbl_a -> /dev/block/mmcblk0p40
      lrwxrwxrwx 1 root root   21 1972-03-30 04:01 xbl_b -> /dev/block/mmcblk0p41
      
      

      I don't know if this is informative. The phone is not rooted so I don't have permission to /proc/partitions.

      posted in Xiaomi Mi A2
      U
      usenix
    • RE: Installer fails

      @AntiDroid The phone was not really "bricked", since the android 9 was still booting up. However, fastboot (and thus flashing) was completely dysfunctional. Fastboot was only accessible via hardware key combination (and not from adb, which would just reboot into android). And the only accepted command in fastboot was fastboot reboot.

      The installer stresses that a particular build of android 9 is strictly necessary for this device, and must be flashed before installing ubports. Hence this is what I did, using the image to which the installer provides a link. (May I say that in general, I don't have the impression that ubports provides a lot of documentation...)

      Now that I am back to android 10, fastboot commands works as expected, including slots. I might try once more tonight. Is there a tool to show the contents of the partition table? To make sure there are no undesired entries?

      @BristledKing It's good to see that the installer worked. I hope to get to the same stage, then we will see if I run into the same problem as you did.

      posted in Xiaomi Mi A2
      U
      usenix
    • RE: Installer fails

      Can anyone confirm that they were able to install ubports on this device starting from an android 10 installation?

      posted in Xiaomi Mi A2
      U
      usenix
    • RE: Installer fails

      @antidroid Well my situation was a bit desperate. Fastboot basically didn't function at all. The only way to get it working again was to upgrade the stock rom back to android 10 (that is from the internal updater, since installing images or sideloading was not possible). Now I'm at the latest patchlevel, and fastboot is working as expected. I never had /e/ installed (but I bought the device used...).
      So I'm back to square zero, android 10 with working fastboot. I expect that simply flashing the android 9 image will break fastboot again. I'm not sure I want to go through the same process again.

      posted in Xiaomi Mi A2
      U
      usenix
    • RE: Installer fails
      (base) peter@pt450:~/Downloads$ fastboot --set-active=b
      Setting current slot to 'b'...
      FAILED (remote: unknown command)
      finished. total time: 0.000s
      (base) peter@pt450:~/Downloads$ fastboot --set-active=b
      error: Device does not support slots.
      (base) peter@pt450:~/Downloads$ fastboot --set-active=a
      Setting current slot to 'a'...
      FAILED (remote: Invalid Slot)
      finished. total time: 0.000s
      (base) peter@pt450:~/Downloads$ fastboot --set-active=boot_a
      Slot boot_a does not exist. supported slots are:
      a
      b
      
      
      

      This is odd since I know that the device has slots and they were selectable in the past (i.e. before the ubports installation attempt). Is it possible that the installer changed something? Or could I have gone wrong when flashing the android 9 stock image? (which seems to be working fine)

      posted in Xiaomi Mi A2
      U
      usenix