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

MX4 Ubuntu Edition: FAILED (remote: unknown command)

Scheduled Pinned Locked Moved Support
42 Posts 4 Posters 10.8k 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.
    • L Offline
      Lakotaubp @jamieweb
      last edited by 13 Mar 2019, 18:14

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

      J 1 Reply Last reply 13 Mar 2019, 18:26 Reply Quote 0
      • J Offline
        jamieweb
        last edited by 13 Mar 2019, 18:24

        This post is deleted!
        1 Reply Last reply Reply Quote 0
        • J Offline
          jamieweb @Lakotaubp
          last edited by jamieweb 13 Mar 2019, 18:26

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

          L 1 Reply Last reply 13 Mar 2019, 18:30 Reply Quote 0
          • L Offline
            Lakotaubp @jamieweb
            last edited by 13 Mar 2019, 18:30

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

            J 1 Reply Last reply 13 Mar 2019, 18:42 Reply Quote 0
            • J Offline
              jamieweb @Lakotaubp
              last edited by jamieweb 13 Mar 2019, 18:42

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

              L 1 Reply Last reply 13 Mar 2019, 18:55 Reply Quote 0
              • A Offline
                AlainW94 @jamieweb
                last edited by 13 Mar 2019, 18:52

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

                Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                Never forget that they are much more ideas inside two heads than in one...

                A 1 Reply Last reply 13 Mar 2019, 19:06 Reply Quote 0
                • L Offline
                  Lakotaubp @jamieweb
                  last edited by 13 Mar 2019, 18:55

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

                  J 1 Reply Last reply 13 Mar 2019, 19:11 Reply Quote 0
                  • A Offline
                    AlainW94 @AlainW94
                    last edited by AlainW94 13 Mar 2019, 19:06

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

                    Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                    Never forget that they are much more ideas inside two heads than in one...

                    J 1 Reply Last reply 13 Mar 2019, 19:14 Reply Quote 1
                    • J Offline
                      jamieweb @Lakotaubp
                      last edited by 13 Mar 2019, 19:11

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

                      L 1 Reply Last reply 13 Mar 2019, 19:36 Reply Quote 0
                      • J Offline
                        jamieweb @AlainW94
                        last edited by 13 Mar 2019, 19:14

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

                        A 1 Reply Last reply 13 Mar 2019, 19:19 Reply Quote 0
                        • A Offline
                          AlainW94 @jamieweb
                          last edited by AlainW94 13 Mar 2019, 19:19

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

                          Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                          Never forget that they are much more ideas inside two heads than in one...

                          1 Reply Last reply Reply Quote 1
                          • L Offline
                            Lakotaubp @jamieweb
                            last edited by 13 Mar 2019, 19:36

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

                            J 1 Reply Last reply 13 Mar 2019, 19:43 Reply Quote 1
                            • J Offline
                              jamieweb @Lakotaubp
                              last edited by 13 Mar 2019, 19:43

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

                              L 1 Reply Last reply 13 Mar 2019, 19:50 Reply Quote 0
                              • L Offline
                                Lakotaubp @jamieweb
                                last edited by Lakotaubp 13 Mar 2019, 19:50

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

                                J 1 Reply Last reply 13 Mar 2019, 21:14 Reply Quote 0
                                • J Offline
                                  jamieweb @Lakotaubp
                                  last edited by 13 Mar 2019, 21:14

                                  @Lakotaubp That's the idea! 🙂 Will this also resolve the FAILED (remote: unknown command) issue?

                                  I think I'm actually going to try @AlainW94's modified code first, as as far as I can tell it seems like ubports-installer is just trying to reboot the phone into recovery, but Meizu phones don't support that in the way it's trying to do it.

                                  A 1 Reply Last reply 13 Mar 2019, 21:16 Reply Quote 0
                                  • A Offline
                                    AlainW94 @jamieweb
                                    last edited by 13 Mar 2019, 21:16

                                    @jamieweb said in MX4 Ubuntu Edition: FAILED (remote: unknown command):
                                    it seems like ubports-installer is just trying to reboot the phone into recovery, but Meizu phones don't support that in the way it's trying to do it.

                                    Exactly

                                    Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                                    Never forget that they are much more ideas inside two heads than in one...

                                    J 1 Reply Last reply 13 Mar 2019, 21:27 Reply Quote 1
                                    • J Offline
                                      jamieweb @AlainW94
                                      last edited by 13 Mar 2019, 21:27

                                      @AlainW94 Just as a side note before I move forward with this - is there a way to download the source for a snap package, a bit like apt source? Or should I just pull it from GitHub?

                                      A 1 Reply Last reply 13 Mar 2019, 21:32 Reply Quote 0
                                      • A Offline
                                        AlainW94 @jamieweb
                                        last edited by 13 Mar 2019, 21:32

                                        @jamieweb pull it from github, here are my personal notes when I did it :

                                        git clone https://github.com/ubports/ubports-installer.git
                                        cd ubports-installer
                                        npm run-script dist:linux
                                        ./setup-dev.sh
                                        npm start
                                        

                                        Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                                        Never forget that they are much more ideas inside two heads than in one...

                                        J 1 Reply Last reply 13 Mar 2019, 22:49 Reply Quote 3
                                        • J Offline
                                          jamieweb @AlainW94
                                          last edited by 13 Mar 2019, 22:49

                                          @AlainW94 Awesome, this has worked! I'm in Ubuntu Touch setting it up now! Thanks for your help, I thoroughly appreciate it.

                                          A L 2 Replies Last reply 13 Mar 2019, 22:51 Reply Quote 2
                                          • A Offline
                                            AlainW94 @jamieweb
                                            last edited by 13 Mar 2019, 22:51

                                            @jamieweb Awesome ! I'm happy for you.👍 🕺

                                            Meizu Pro 5, Meizu Pro 5, Meizu Pro 5, Meizu Pro 5 (Yes I have 4 of them)
                                            Never forget that they are much more ideas inside two heads than in one...

                                            J 1 Reply Last reply 13 Mar 2019, 23:12 Reply Quote 1
                                            16 out of 42
                                            • First post
                                              16/42
                                              Last post