0

I was wondering if anyone have a suggestion or a solution to following issue. I have installed Ubuntu Touch on Meizu Pro5 which was Android originally as is described here: How to install Ubuntu on Meizu Pro 5 that was originally with Android? The installation was easy, the real bummer here is to find a way how to managed to install it just like it was a native Ubuntu Touch device. I have manually flashed the turbo recovery and tried from there. The adb recognise the device and u-d-f manages to download and push all files to the device and it even reboots to recovery, then for a second is shown the progress bar in recovery (just like normal update on Mx4 ) and immediately after that it shows the image ,,update failed'' contact support.

I have tried to wipe it, bootstrap it, add --recovery-image option, even tried a different channels recovery e.g Devel/Rc-proposed, but nothing works.

Tried to look for a log files but couldn't find any. Anyone has an idea what to do or how to do it?

1 Answers1

1

The problem is that for some reason busybox supplied with said recovery is outdated and unsupported. So updater simply can not unpack modern xz tar archive. You need to help it do this manually:

after you get to the error updating screen - do this:

  1. download busybox-armv7l from https://busybox.net/downloads/binaries/latest/
  2. push busybox as tar: adb push ~/ubuntutouch/busybox-armv7l /sbin/tar
  3. adb shell
  4. in adb shell (everything below is in adb shell) - chmod a+x /sbin/tar
  5. mount /system as described in file /fstab.m86 on device (cp /fstab.m86 /etc/fstab; mount -a)
  6. (delete all files in /system if needed rm -rf /system/*)
  7. cd /cache/recovery
  8. import keys tar -xvf image-signing.tar.xz keyring.gpg -O | gpg --import and tar -xvf image-master.tar.xz keyring.gpg -O | gpg --import
  9. unpack system image:

tar xf ubuntu-* -C / tar xf device-* -C / tar xf custom-* -C / tar xf version-* -C / sync umount /system

reboot with power button, wait 5 minutes to finish install.

I do not know if this will support OTA, but at least it is all done with ubuntu utilities (and hands) only

I guess someone should file a bug about broken busybox in published recovery.

grandrew
  • 111
  • Thanks, but in a meantime I have managed to update via OTA. Yes, u-d-f still dont work and still shows update failed message, I might give it a try later with the instructions you provided. – user572704 Sep 22 '16 at 07:47
  • grandrew have you tried it on your phone and after the ubuntu-device-flash worked normally? – user572704 Sep 24 '16 at 12:38
  • yes, I have managed to install everything on my phone using ubuntu-device-flash and ubuntu recovery. However, I can not say "it works normally" as the said recovery does not work without manual unpacking of the archives as described in my post. I have not tried re-upgrading ubuntu though - I just made sure that my method works in the scenario you initially described. – grandrew Sep 25 '16 at 07:15
  • So if I do the manual unpacking of busybox, then ubuntu-device-flash should finally work, right? Cos OTA works normally. Just u-d-f is gives me a grief and I need that to be working , cos I'm gonna play a little bit with desktop apps and do some modification, so when I break something I can always just flash it manually. – user572704 Sep 25 '16 at 13:37
  • BusyBox v1.22.1 static (2016-06-17 07:41 +0000) multi-call binary. This is the version provided by the recovery. I have tried to update it as you described above, but I am unable to do so. I have tied that with working system, in recovery via adb. Should I only do it when the update failed screen shown? step 5 is confusing don't know what to do with it. – user572704 Sep 25 '16 at 19:17
  • As I understand this will wipe the phone and install whole os again, right? Sorry for bothering you with so many questions. – user572704 Sep 25 '16 at 19:29
  • the problem is not the version but absence of xz feature. This should be configured at build time of busybox and recovery comes with a misconfigured one.; 2. you should only do that in an "update failed screen".; 3. cp /fstab.m86 /etc/fstab; mount -a should work for step 5 however I do not recall the exact name for fstab file at / - you should better do ls / and see how it is called; 4. this will not wipe anything simply because recovery does not work ;-) if it worked it would've wiped though.
  • – grandrew Sep 26 '16 at 10:35
  • ~ # cp /fstab.m86 /etc/fstab; mount -a mount: mounting /dev/block/platform/15570000.ufs/by-name/recovery on /recovery failed: No such file or directory mount: mounting /dev/block/platform/15570000.ufs/by-name/ldfw on /ldfw failed: No such file or directory mount: mounting /dev/block/platform/15570000.ufs/by-name/dtb on /dtb failed: No such file or directory mount: mounting /dev/block/platform/15570000.ufs/by-name/custom on /custom failed: No such file or directory – user572704 Sep 26 '16 at 11:06
  • trying to mount system gives me: ~ # mount system mount: mounting /dev/block/platform/15570000.ufs/by-name/system on /system failed: Device or resource busy – user572704 Sep 26 '16 at 11:09
  • I tried every option possible, even tried do it within working recovery, but no, no luck. I guess I will have to leave it as is then. But thank for the help along the way. – user572704 Sep 26 '16 at 12:17
  • from what you posted here it seems that mounting went okay; you need to unpack the images now. Mounting dtb, custom, etc. is not required, you just have to make sure that /system is mounted. The process is very straightforward and there is very little that can go wrong. – grandrew Sep 27 '16 at 15:02