-
Ubports Recovery is like a good habit. As soon as we get it working, the sooner we all benefit.
Currently it has some nice features valuable to developers. In particular, viewing log files.But some features that install methods need are missing. "system-image-upgader" is needed by "ubuntu-device-flash".
Another install method "rootstock-ng" also relies on a working recovery.
I propose a ubports wide effort to improve Ubports recovery. -
Why is the 3rd
LOCAL_MODULE_TAGS
not working?This is from the recovery Android.mk file
`# make_ext4fs include $(CLEAR_VARS) LOCAL_MODULE := libmake_ext4fs_static LOCAL_C_INCLUDES += external/lz4/lib **LOCAL_MODULE_TAGS := optional** LOCAL_CFLAGS := -Dmain=make_ext4fs_main LOCAL_SRC_FILES := ../../system/extras/ext4_utils/make_ext4fs_main.c include $(BUILD_STATIC_LIBRARY) include $(CLEAR_VARS) LOCAL_MODULE := system-image-upgrader **LOCAL_MODULE_TAGS := eng** LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin LOCAL_SRC_FILES := $(LOCAL_MODULE) include $(BUILD_PREBUILT) include $(CLEAR_VARS) LOCAL_MODULE := replace-system ***LOCAL_MODULE_TAGS := optional*** LOCAL_MODULE_CLASS := RECOVERY_EXECUTABLES LOCAL_MODULE_PATH := $(TARGET_RECOVERY_ROOT_OUT)/sbin LOCAL_SRC_FILES := $(LOCAL_MODULE) include $(BUILD_PREBUILT)
-
my commit to fix the missing "system-image-upgader" and others.
Jenkins output seems to indict the commit has been propagated to Jenkins : )
Using:
$ubuntu-device-flash -v --server=http://system-image.ubports.com touch --channel=ubuntu-touch/devel_rc-proposed --device=hammerhead --bootstrap
to install. It grabs verion 152 the fails with the usualerror pushing: failed to copy '/home/apple/.cache/ubuntuimages/ubuntu-touch/devel_rc-proposed/hammerhead/version-152.tar.xz' to '/cache/recovery/': Is a directory
Eventually I may breakdown and look inside the source code of ubuntu-device-flash to find an understanding of this error. That would be the equivalent of reading the instructions before one starts to assemble something : )
So what seems to work is
$adb shell # mkdir recovery # mount -a # exit
then /cache/recovery is there.
So reissue$ ubuntu-device-flash -v --server=http://system-image.ubports.com touch --channel=ubuntu-touch/devel_rc-proposed --device=hammerhead
without --bootstrap this time.
2016/11/28 05:36:54 Device is |hammerhead| 2016/11/28 05:36:55 Flashing version 152 from ubuntu-touch/devel_rc-proposed channel and server http://system-image.ubports.com to device hammerhead 2016/11/28 05:36:55 Start pushing /home/apple/.cache/ubuntuimages/pool/keyring-f812366ff5018823acd3918f65837f7ade9679431e6e5ca6627a4e48f8dd643b.tar.xz to device 2016/11/28 05:36:55 Start pushing /home/apple/.cache/ubuntuimages/ubuntu-touch/devel_rc-proposed/hammerhead/version-152.tar.xz to device 2016/11/28 05:36:55 Done pushing /home/apple/.cache/ubuntuimages/pool/keyring-f812366ff5018823acd3918f65837f7ade9679431e6e5ca6627a4e48f8dd643b.tar.xz to device 2016/11/28 05:36:55 Done pushing /home/apple/.cache/ubuntuimages/ubuntu-touch/devel_rc-proposed/hammerhead/version-152.tar.xz to device 2016/11/28 05:36:55 Start pushing /home/apple/.cache/ubuntuimages/gpg/image-signing.tar.xz to device 2016/11/28 05:36:55 Start pushing /home/apple/.cache/ubuntuimages/gpg/image-master.tar.xz to device 2016/11/28 05:36:56 Start pushing /home/apple/.cache/ubuntuimages/pool/device-c4aa19e7f7237e8636330c3a6b36f8363b11e884eb22123eb6f33b97dc2ce57c.tar.xz to device 2016/11/28 05:36:56 Done pushing /home/apple/.cache/ubuntuimages/gpg/image-signing.tar.xz to device 2016/11/28 05:36:56 Done pushing /home/apple/.cache/ubuntuimages/gpg/image-master.tar.xz to device 2016/11/28 05:36:58 Start pushing /home/apple/.cache/ubuntuimages/pool/ubuntu-7ba0c0d2e424dfa87d3905dae197ab4abe626372cbcad74f8d8a3f808beb4cf6.tar.xz to device 2016/11/28 05:37:04 Done pushing /home/apple/.cache/ubuntuimages/pool/device-c4aa19e7f7237e8636330c3a6b36f8363b11e884eb22123eb6f33b97dc2ce57c.tar.xz to device 2016/11/28 05:37:33 Done pushing /home/apple/.cache/ubuntuimages/pool/ubuntu-7ba0c0d2e424dfa87d3905dae197ab4abe626372cbcad74f8d8a3f808beb4cf6.tar.xz to device 2016/11/28 05:37:33 Created ubuntu_command: /home/apple/.cache/ubuntuimages/ubuntu_commands548410990 2016/11/28 05:37:33 Rebooting into recovery to flash
But reboots to old system : (
Investigation continues...
-
Digging into system-image-upgrader I find errors that maybe caused by busybox limitations.
So far this code breaks# Unpacking TMPDIR=$(mktemp -d /tmp/system-image/tmp.XXXXX) cd $TMPDIR
But the following works.
# Unpacking TMPDIR=$(mktemp -dt -p /tmp/system-image/ tmp.XXXXXXXXXX) cd $TMPDIR
Next error is in with a file not found error.
echo "Processing the command file" >> /cache/system-image-upgrader.log while read line do . . . done < $COMMAND_FILE
Edit- My bad. It is that this file not found error is because I ran this without using full paths. system-image-flash did finish with the one edit to mktemp line.
But unfortunately resulting system of hammerhead devel_rc-proposed did not start.
-
I'm adding a few links here so I and others can find them easily.
Ubuntu Recovery partition specs
Touch/Specs/RecoveryPartition last edited 2013-06-14upgrader
ImageBasedUpgrades/Upgrader l st edited 2014-07-04After more digging I've come to the conclusion that Edify stuff is mostly dead code. I'll leave these two links until I'm certain.
https://wiki.cyanogenmod.org/w/Doc:_About_Edify
(http://forum.xda-developers.com/wiki/Edify_script_language)
I have been working under the assumption that
system-image-upgader
Was written by Marius become it seemed to come from nowhere in the ubports git history.In reality launchpad does reveal its arrival three years ago.
author Stéphane Graber stgraber@ubuntu.com
Tue, 9 Jul 2013 15:00:00 -0500 (17:00 -0300)
committer Gerrit Code Review gerrit2@hesperidium.canonical.com
Fri, 7 Feb 2014 09:03:14 -0500 (14:03 +0000)It's interesting to note that six months seems to have passed before it was accepted. It then goes through much development in 2014.