• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Installer fails

Scheduled Pinned Locked Moved Xiaomi Mi A2
25 Posts 8 Posters 10.3k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • U Offline
      usenix @usenix
      last edited by usenix 22 Feb 2021, 16:27

      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...

      U A 2 Replies Last reply 22 Feb 2021, 16:34 Reply Quote 1
      • U Offline
        usenix @usenix
        last edited by 22 Feb 2021, 16:34

        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????

        L 1 Reply Last reply 22 Feb 2021, 17:13 Reply Quote 1
        • L Offline
          Lakotaubp @usenix
          last edited by 22 Feb 2021, 17:13

          @usenix Try to edit again please. I just upped your reputation that may have fixed it.

          1 Reply Last reply Reply Quote 0
          • A Offline
            AntiDroid @usenix
            last edited by AntiDroid 22 Feb 2021, 20:12

            @usenix I agree the documentation can be poor. That is why I try and help out even with my limited experiance. And probably what leads most people to the forum.

            When i flashed my a/b phone back to factory I had to flash both partitions. I wonder if your issues stem from only one partiton being downgraded.

            Also which instructions are you following? I started the installer and choose your device. The first pop up i get talks about checking you have the correct hardware but nothing about android versions. I can not continue from that point since I do not have the correct phone. So I may be missing some information.

            I also looked int the repos for the kernel and device overlay and didn't find any instructions for flashing there either. The only place i found was the device page that says to use the installer and nothing else. On my Oneplus one i started from the newest android available and simply flashed it using the installer. My development phone though takes special steps like you are taking with preflashes and manual steps.

            The last thing is I never use adb to control reboots and what you experiance may be normal. I use the buttons everytime.

            Maybe someone with your device can help more.

            OnePlus One with UT OTA-15 daily driver. I would be testing the Halium 7.1 port if I could roll back to OTA-15
            OnePlus 6T PostmarketOS Custom Gnome on Mainline Kernel

            U 1 Reply Last reply 22 Feb 2021, 20:31 Reply Quote 0
            • U Offline
              usenix @AntiDroid
              last edited by 22 Feb 2021, 20:31

              @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?

              B 1 Reply Last reply 22 Feb 2021, 20:49 Reply Quote 0
              • B Offline
                BristledKing @usenix
                last edited by BristledKing 22 Feb 2021, 20:49

                @usenix I did try an other android without success. I followed this vidéo but I translated on Linux instead of windows : https://www.youtube.com/watch?v=0t4UE4SiEL8

                And used Ubuntu android 9 link instead of the one he provides in the comments section. I also used his twrp guide, for exemple he claims that only twrp 3.3.1 works for the A2... I wish you will find the solution!

                I am not really understanding what I am doing ! so it s hard for me to help you correctly ...

                C 1 Reply Last reply 23 Feb 2021, 01:18 Reply Quote 0
                • C Offline
                  c4pp4 @BristledKing
                  last edited by c4pp4 23 Feb 2021, 01:18

                  I successfully went through the process from Android 10 -> 9 -> UT. I don't remember exact walkthrough but I think it was something like this:

                  I was using Linux distribution.

                  At first I unlocked the device and flashed TWRP 3.5.0_9-0. I followed the video from here:
                  https://www.youtube.com/watch?v=sqmng9WQFkI.
                  Instead of installing TWRP installer (time 10:02) I used Advanced -> ADB Sideload:

                  adb sideload twrp-installer.zip
                  

                  I also sideloaded Magisk-v21-4.zip to check "jdi" LCD via app:
                  https://play.google.com/store/apps/details?id=ru.andr7e.deviceinfohw.

                  After that I followed the video from here (the same @BristledKing linked):
                  https://www.youtube.com/watch?v=0t4UE4SiEL8.
                  I switched from slot A to B and sideloaded Android 9 from here: https://github.com/ubports-xiaomi-sdm660/artifacts/releases/download/v0.1/jasmine_sprout_stock_android9.zip (UBports installer recommends flash it to both slots to be safe but I didn't do that).

                  UBports installer:
                  I think the device was recognized as "jasmine" not "jasmine_sprout" so I chose the right one from the list.
                  I chose devel channel.
                  After the failure with downloaded vendor.img I think I made a copy into ~/snap/ubports-installer/334/.cache/ubports/jasmine_sprout/firmware/ folder.
                  UBports installer told me UT was successfully installed but after that gave me an error. The device didn't boot. I tried the installation again and the second try was really succesful.

                  B 1 Reply Last reply 26 Feb 2021, 13:33 Reply Quote 0
                  • B Offline
                    belohoub @c4pp4
                    last edited by belohoub 26 Feb 2021, 13:33

                    Hello all!
                    I just won a fight with the A2 installation process 🙂

                    After many iterations with the installer, I successfully installed it from the "devel channel".

                    I tried to replicate all steps mentioned above, but for a long time with only a little success.

                    The part of the process running "in the" fastboot (almost) always finished well: in short I have a working ubports recovery. The only two inconveniences I observed here:

                    • there is the vendor.img checksum mismatch - this is probably only a mistake in the config file (old checksum and updated file ?) - it is possible to ignore, but it's a security issue
                    • the installer "requested" reboot to "bootloader", but "fastboot" was in reality required - I noticed when I was in the bootloader and the installer said something like "fastboot is waiting for device"

                    But what I observed too many times was the following error:

                    • the installer (almost) always hangs when I was already in recovery and the installer was trying to download ubuntu touch with the following error:
                    Error: systemimage:install: Error: Failed to download latest version TypeError: Cannot read property 'forEach' of undefined
                    

                    I was successful only with the devel channel and even with the devel channel only in "some cases".

                    After a "successful" installation, the device stuck about 3-times in the "boot screen", the 4th "completed" iteration (after a few iterations terminated with the error above) was successful.

                    I tried from two locations with different network configurations...

                    I believe, that the root of the problem would be in the config file and/or remote repository accessibility, but I'm unable to perform diagnostics without deeper knowledge of the UBports ecosystem (which I do not have).

                    During the debug process, I was trying to find the instructions for the "manual installation" - could you provide it or point me to its description? I believe, that I'll be able to provide a closer analysis of what happened to report it using the manual process.

                    Is the "stable" and "rc" channel available for this device or it is not - I was unable to locate it (based just on the brief docs study).

                    U 1 Reply Last reply 15 Mar 2021, 23:28 Reply Quote 0
                    • U Offline
                      usenix @belohoub
                      last edited by 15 Mar 2021, 23:28

                      @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

                      AppLeeA 1 Reply Last reply 16 Mar 2021, 12:18 Reply Quote 0
                      • AppLeeA Offline
                        AppLee @usenix
                        last edited by 16 Mar 2021, 12:18

                        @usenix said in Installer fails:

                        a "black box" installer that can't be diagnosed

                        The sources are available and there are log files.
                        Investigation is possible and the procedure being complex the installer is the best option for most people.

                        New devices to the installer require some work, that's for sure. And some are more troublesome than others...

                        Best of luck

                        B 1 Reply Last reply 18 Mar 2021, 19:22 Reply Quote 0
                        • B Offline
                          belohoub @AppLee
                          last edited by 18 Mar 2021, 19:22

                          @applee @usenix The problem actually was, that there was empty stable channel for jasmine_sprout (no release in this channel), but the installer offered it.

                          Currently, there is the first release(OTA-16) in the stable channel (http://system-image.ubports.com/16.04/arm64/android9/stable/jasmine_sprout/index.json)

                          To be honest, currently, the ubports ecosystem is somehow foggy for someone who is not familiar with it... actually, it took me some time to get into and get basic understanding of the dev cycle and resource location. This little piece of information is provided by ubports docs, while the good explanation is e.g. here

                          If I'll find some time, I'll try to document what I learned, because I started to like ubports, but currently, I invested my allowed hobby time into learning and doing this, and unfortunately I'm currently loaded by too many things ... 🙂

                          U 1 Reply Last reply 21 Mar 2021, 22:20 Reply Quote 0
                          • U Offline
                            usenix @belohoub
                            last edited by 21 Mar 2021, 22:20

                            @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 😞

                            KenedaK 1 Reply Last reply 21 Mar 2021, 23:30 Reply Quote 1
                            • KenedaK Offline
                              Keneda @usenix
                              last edited by Keneda 21 Mar 2021, 23:30

                              @usenix
                              I don't know for GNUL but on windows like for almost any program data, log is at C:\Users\User\AppData\Roaming\ubports\ubports-installer.log, some logs are also in C:\Users\Keneda\AppData\Roaming\ubports-installer.
                              I bet there is an identical folder on GNUL...

                              2015-2023 : Meizu MX4 ☠️⚰️✝️
                              2023-2024 : Nexus 5 ☠️⚰️✝️
                              2024-***** : FPOS Fairphone 5 waiting UT for freedom 😉
                              🇲🇫🇬🇧

                              1 Reply Last reply Reply Quote 0
                              • A Offline
                                AntiDroid
                                last edited by 21 Mar 2021, 23:37

                                On linux it is in the hidden home cache folder.

                                home/{user_name}/.cache/ubports/{device_name}/ubports-installer.log
                                

                                OnePlus One with UT OTA-15 daily driver. I would be testing the Halium 7.1 port if I could roll back to OTA-15
                                OnePlus 6T PostmarketOS Custom Gnome on Mainline Kernel

                                B 1 Reply Last reply 25 Mar 2021, 10:23 Reply Quote 1
                                • B Offline
                                  belohoub @AntiDroid
                                  last edited by belohoub 25 Mar 2021, 10:23

                                  @antidroid for SNAP, it is here: ~/snap/ubports-installer/current/.cache/ubports, however, the messages are not very helpful for someone begining with ubports

                                  I reported it - it might be an issue for new users with newly adopted devices

                                  1 Reply Last reply Reply Quote 0
                                  • First post
                                    Last post