Ubports installation process on frieza device with stock android
Iolaum last edited by
Hello Ubports community,
I recently found an Aquaris BQ M10 FHD with android on sale and bought with the plan to install Ubuntu touch on it.
Yesterday I had enough free time to work on the installation. According to the documentation for legacy android devices you are supposed to use the SP flashing tool to flash an older Ubuntu image first to unlock the bootloader. I tried to do it. The documentation on the flashing tool is a bit scarce but this xda-developers guide was very helpful. Especially the trick were you add yourself to the dialout group and don't have to run it as root. Unfortunately even with those instructions I was getting a
Failed to open COM port error.
Since documentation or guides were hard to find for the SP flashing tool and my impression of it as an application was not good I decided to go another way. I knew from the documentation that the main reason for this step was to unlock the bootloader. Given my previous experience with android devices I decided to try and use the android tools available on linux (my laptop runs Ubuntu Mate 18.04). I booted the tablet in fastboot mode and did the following:
$ fastboot devices # shows that device has been found $ fastboot --help usage: fastboot [ <option> ] <command> commands: update <filename> Reflash device from update.zip. flashall Flash boot, system, vendor, and -- if found -- recovery. flash <partition> [ <filename> ] Write a file to a flash partition. flashing lock Locks the device. Prevents flashing. flashing unlock Unlocks the device. Allows flashing any partition except bootloader-related partitions. flashing lock_critical Prevents flashing bootloader-related partitions. flashing unlock_critical Enables flashing bootloader-related partitions. flashing get_unlock_ability Queries bootloader to see if the device is unlocked. flashing get_unlock_bootloader_nonce Queries the bootloader to get the unlock nonce. flashing unlock_bootloader <request> Issue unlock bootloader using request. flashing lock_bootloader Locks the bootloader to prevent bootloader version rollback. erase <partition> Erase a flash partition. format[:[<fs type>][:[<size>]] <partition> Format a flash partition. Can override the fs type and/or size the bootloader reports. getvar <variable> Display a bootloader variable. set_active <suffix> Sets the active slot. If slots are not supported, this does nothing. boot <kernel> [ <ramdisk> [ <second> ] ] Download and boot kernel. flash:raw boot <kernel> [ <ramdisk> [ <second> ] ] Create bootimage and flash it. devices [-l] List all connected devices [with device paths]. continue Continue with autoboot. reboot [bootloader] Reboot device [into bootloader]. reboot-bootloader Reboot device into bootloader. help Show this help message. options: -w Erase userdata and cache (and format if supported by partition type). -u Do not erase partition before formatting. -s <specific device> Specify a device. For USB, provide either a serial number or path to device port. For ethernet, provide an address in the form <protocol>:<hostname>[:port] where <protocol> is either tcp or udp. -p <product> Specify product name. -c <cmdline> Override kernel commandline. -i <vendor id> Specify a custom USB vendor id. -b, --base <base_addr> Specify a custom kernel base address (default: 0x10000000). --kernel-offset Specify a custom kernel offset. (default: 0x00008000) --ramdisk-offset Specify a custom ramdisk offset. (default: 0x01000000) --tags-offset Specify a custom tags offset. (default: 0x00000100) -n, --page-size <page size> Specify the nand page size (default: 2048). -S <size>[K|M|G] Automatically sparse files greater than 'size'. 0 to disable. --slot <suffix> Specify slot suffix to be used if the device supports slots. This will be added to all partition names that use slots. 'all' can be given to refer to all slots. 'other' can be given to refer to a non-current slot. If this flag is not used, slotted partitions will default to the current active slot. -a, --set-active[=<suffix>] Sets the active slot. If no suffix is provided, this will default to the value given by --slot. If slots are not supported, this does nothing. This will run after all non-reboot commands. --wipe-and-use-fbe On devices which support it, erase userdata and cache, and enable file-based encryption --unbuffered Do not buffer input or output. --version Display version. -h, --help show this message.
The help command is needed to see what commands are available under fastboot, they can be difference for every device. I noticed that there were commands that looked like they could unlock the device and decided to give them a try.
$ fastboot flashing get_unlock_ability ... (bootloader) unlock_ability = 16777216 OKAY [ 0.009s] finished. total time: 0.009s $ fastboot flashing unlock_critical ... (bootloader) Start unlock flow OKAY [ 38.004s] finished. total time: 38.004s $ fastboot reboot
As you can see I explored what the unlock ability was, but I couldn't understand the result.
When you give the command to unlock bootloader a dialogue message appears at the tablet screen and you have to confirm/deny with volume up/down.
After that the factory firmware wiped the tablet, as it had warned me it would do upon unlocking.
The process described above is not the one described in the documentation. I 'm not saying it's wrong. For example I deviated in downloading the latest flashing tool version and not the one linked in the docs. It may also be that the flashing tool is not updated to work with Ubuntu 18.04 yet. I 'm just pointing this out here, and wondering if I should point it out elsewhere, like a bug in the ubports docs repo.
Another thing of note is the ubports installer. After unlocking the bootloaded I followed the documentation in order to install ubports. The installer identified my device as
Aquaris_M10_FHDbut said it wasn't an approved device !? I attributed that to me deviating from the installation process, maybe it considered the android version incompatible?. I manually selected frieza as the device target and told it to proceed. The installation process completed successfully after that and now my tablet is running Ubuntu Touch. If I 'm guessing right that the presence of the Android OS instead of an earlier Ubuntu Touch OS made ubports-installer think my device not compatible there isn't anything to note. But if it should have understood that the bootloader is unlocked then should I make a bug report at ubports-installer about this?
Lakotaubp last edited by Lakotaubp
@iolaum Sorry if I've lost the thread but your device had android on, yes. You needed to install the original Canonical version of Ubuntu Touch first before installing UBports Ubuntu Touch. That is why you need the SP Flash Tool and the Ubuntu Touch ROM for your device and the Android_scatter.txt from the zip file as per the instructions in the docs from your link. Without doing that I think your stuck.
There are the original instructions from the bq site which as mobile only I don't have handy @advocatux may be able to help with that if you need it.
Iolaum last edited by Iolaum
@Lakotaubp I tried to install the original Canonical version but the SP Flash tool didn't work. After that I experimented with fastboot tool and unlocked bootloader with it.
ubports-installer complained that my device wasn't supported, guessing because it was running android despite unlocked bootloader, but when I forced it to install by manually selecting intended device it worked. I made this post to soft document my experience and see if I should make a bug report of give more information about the problems and solutions I encountered.
I am currently exploring the system and learning how to navigate around things, I think it installed successfully though.
Lakotaubp last edited by
@iolaum Ok enjoy UBports. Make sure you check for OTA -5 to get the very latest version https://ubports.com/blog/ubports-blog-1/post/ubuntu-touch-ota-5-174
Marathon2422 last edited by
check your wifi, is remembering your password.
and look to see how much memory Is being used by Ubports, for future reference, if you reinstall/wipe and so forth.