MX4 Ubuntu Edition: FAILED (remote: unknown command)



  • Hi,

    I'm installing UT on my Meizu MX4 Ubuntu Edition, and during the flashing process in ubports-installer I'm getting the following:

    debug: fastboot: flash; [{"type":"recovery","url":"http://cdimage.ubports.com/devices/recovery-arale.img","checksum":"27160d1ce2d55bd940b38ebf643018b33e0516795dff179942129943fabdc3d8","path":"/home/j/snap/ubports-installer/183/.cache/ubports/images/arale"}]
    info: Booting into recovery image...
    error: Devices: Error: Fastboot: Unknown error:  downloading 'boot.img'...
    OKAY [  0.702s]
    booting...
    FAILED (remote: unknown command)
    finished. total time: 0.716s
    

    It seems as though this is a known problem, but as of yet I cannot find a solution. There are previous bug references here and here.

    I'm using Xubuntu 18.04 with the ubports-installer snap. The error message says I'm using an out of date version, but I've tried with ---stable and --edge and they both give me 0.1.21-beta.

    Please could somebody advise?

    Thanks



  • I just manually rebooted into recovery (power + vol up), which required unplugging my phone. An Ubuntu splash screen appeared, so I plugged it back in and pressed 'Ignore' on the error, and it's stuck on 'Flashing...' again with info: ERROR IGNORED in the log.



  • @jamieweb Trying to remember when i did mine I always had a bit of an issue with the usb connection so check that is solid and stable at the phone end even tape the cable down to stop it moving, Also try numerous cables. Sometimes version 0.1.12 works when others don't. You did the right thing by ignoring that update message. You can restart the installer at any point if it seems stuck but it took awhile IIRC on the MX4. If it appears stuck try quickly unplugging and plugging the usb back in at pc/laptop end it sometimes forces things along. The main thing is keep trying. Oh and double check Dev mode, oem unlock etc. all the usual stuff yo have probably done already. Good luck.



  • @jamieweb I also had this error on Meizu Pro5, my solution was to modify the ubports-installer in order to ask the user to manually reboot the phone into recovery when this error occured, The installer wait and when your phone is in recovery, it perform the next step (downloading image and pushing it to the phone).

    I can share the modified installer with you if you need.



  • @AlainW94 Ah right, so is ubports-installer actually broken for Meizu phones? Or is this an intermittent issue? I've never seen anybody else use ubports-installer with a Meizu actually, most of the videos I've seen have been Nexus or FairPhone.

    If you can securely share the modified tool then I'll have a look, but I'd prefer source code or a patch file, I'm not running an untrusted binary. 🙂



  • @Lakotaubp Thanks for the info. I'm in Android Dev mode with USB debug enabled, then I power off and boot into fastboot mode, connect the phone and start the installer. It's an original MX4 Ubuntu Edition so the bootloader should be already unlocked (I had previously flashed a Flyme recovery image onto it).

    Then, after starting the installer, it fails as I described above. I unplug, go into recovery and then reconnect, ignore the error, and it says 'Flashing...`.

    How long does the flashing process normally take? I've left it for around 45 minutes with no sign of progress. There's no network activity on my machine so it's not downloading anything.



  • @jamieweb Just incase I misunderstood, what OS was on your device before you tried to flash UBports. Ubuntu Touch or Flyme/Android



  • This post is deleted!


  • @Lakotaubp I purchased the phone in 2015 with UT on it. Then I flashed Flyme onto it (which is on now). At the moment I'm trying to go back to UT from Flyme.



  • @jamieweb In that case you need this https://web.archive.org/web/20180118130643/http://www.mibqyyo.com/en-articles/2015/09/16/ubuntu-android-installation-process-for-bq-aquaris-e4-5-and-e5 and https://docs.ubports.com/en/latest/userguide/install.html this. Read through and take your time. You need to put the original UT on first then flash UBports. first link says Bq but process is the same.



  • @Lakotaubp Oh right, I see... that looks like quite a lot of downloading unverified images/software and running stuff. I'm aiming for security here.

    To be honest I was hoping that my MX4 Ubuntu Edition would be easier, since it is one of the few devices to officially support UT.

    Is there any alternative solution? What about manually flashing the ROM? Or magic device tool?



  • @jamieweb I perfectly understand, I modified it there is a while ... let me look for the modified file then i will post it there.



  • @jamieweb Magic Device tool is no longer supported as far as I know. This is the only method I know of and have used. Maybe someone else knows something else. Main thing you need to get back to Cannonical UT first.



  • @AlainW94 said in MX4 Ubuntu Edition: FAILED (remote: unknown command):

    @jamieweb I perfectly understand, I modified it there is a while ... let me look for the modified file then i will post it there.

    Try to replace this part of code in the file src/devices.js :

    var instructBootstrap = (fastbootboot, images, bootstrapEvent) => {
        //TODO check bootloader name/version/device
        var flash = (p) => {
            fastboot.flash(images, (err, errM) => {
                if(err)
                  handleBootstrapError(err, errM, bootstrapEvent, () => {
                    instructBootstrap(fastbootboot, images, bootstrapEvent);
                  });
                else {
                  if (fastboot) {
                      utils.log.info("Booting into recovery image ALAIN...");
                      // find recovery image
                      var recoveryImg;
                      images.forEach((image) => {
                        if (image.type === "recovery")
                          recoveryImg = image;
                      });
                      // If we can't find it, report error!
                      if (!recoveryImg){
                        bootstrapEvent.emit("error", "Cant find recoveryImg to boot: "+images);
                      }else {
                        fastboot.boot(recoveryImg, p, (err, errM) => {
                          if (err) {
    			utils.log.error("Fastboot: AW boot error; ");
    
    			bootstrapEvent.emit("bootstrap:done", fastbootboot); // Ignore the error, ignore the bootstrap, boot into recovery then the installer will did the flash upload, works well on my Pro5, I only had to flash the recovery fisrt with fastboot flash recovery recovery.img, then run the installer. That's not nice I know but that worked for me.
    
                            //handleBootstrapError(err, errM, bootstrapEvent, () => {
                            //  instructBootstrap(fastbootboot, images, bootstrapEvent);
                            //});
                          }else
                            bootstrapEvent.emit("bootstrap:done", fastbootboot);
                        })
                      }
                  } else
                      bootstrapEvent.emit("bootstrap:done", fastbootboot)
                }
            }, p)
        }
        bootstrapEvent.emit("bootstrap:flashing")
        bootstrapEvent.emit("user:write:status", "Flashing images ALAIN")
        if (!utils.needRoot()) {
            flash(false);
        }else {
            requestPassword(bootstrapEvent, (p) => {
                flash(p);
            });
        }
    }
    

    You will have to compile and install it or run it from the sources.
    Good luck.



  • @Lakotaubp Ok, thanks for the info. Once I've done this, is it permanent? Or do I have to do it again every time I want to reflash UBports?

    I'll have to spin up a sandboxed machine for this, I don't want to run all those tools on any of my systems. Does UBports installer overwrite all of the original Canonical UT stuff from those guides? Or will there be insecure/untrusted code left behind?



  • @AlainW94 Thanks for this. Will it prevent me from having to do the restore to the original Canonical UT like @Lakotaubp has detailed? Or do I still need to do that, and then patch ubports-installer with your code afterwards?



  • @jamieweb Good question, I don't know why we have to step first into the installation of Canonical version. If I was you (easy to say), I tried first to flash the ubuntu recovery, then I start the phone on it, and try to use ubports-installer, if that works, you have gain a lot of time, if not.... You will have to reinstall it. During my issue with my IMEI, I played a lot with the phone by switching between Flyme and UT, all the time, the only thing I did was to flash the ubuntu recovery, start on it and run the modified ubports-installer to get UT back (without having to re-install the original Canonical first).



  • @jamieweb Don't take this as gospel but Flyme has a locked bootloader you can't get in. UBports is not a standard ROM you need UBports Recovery for the installation so you cannot just flash it. You need the original UT first or UBports will not install on the MX4. As far as I know you will not have any insecure/untrusted stuff left. That is what UBports is after all. Safe and secure. The exact technical reason for this method is above my knowledge.
    I did exactly what you have UT to Flyme back to UT then to UBports UT using the tools mentioned.

    Please someone correct anything that is wrong in what I have said.



  • @Lakotaubp Ok thanks, I'll see if I can give this a go tonight. To confirm, once I've done this, I won't have to do it again as long as I stick with UBports?



  • @jamieweb Yes that's right, but once you've got UBports you will not want to change ☺


Log in to reply