Is it possible to flash ubuntu touch without an installer?
-
Hi,
I would like to try ubuntu touch on my opo. Since it is already full of roms and stuff I'd like to check and maybe modify what is going to be installed and where.
I could not find any other way to install it other then installing an installer. That is not what I hoped for.
So my question is is there some script that I can read to see what needs to be downloaded and where it is expected to end up on the phone? Or is there a flashable zip to download?
Willem-Jan
-
https://sturmflut.github.io/ubuntu/touch/2015/05/06/hacking-ubuntu-touch-part-3-how-images-are-flashed/
is the very best description of how the installer works. does that help?PS: check out other posts on that blog for some more details on e.g. the images, especially all the ones that start with "Hacking"
-
Thanks for the link. I'll take a look. It will help understanding what is going on. Still would like to know where to get the flashable parts.
The article is from more then two years ago. Does it still work this way?
-
So if I understand well if I download http://system-image.ubports.com/pool/device-......tar.xz
I get boot.img and system.img which need to end up in the boot and system partitions.Two new questions:
-
With halium/plasma-mobile one also has to flash boot.img into the boot partition but system.img is loaded from /data (no need to flash system partition). Is something like this possible with ubuntu-touch as well?
-
Where do I get the ubuntu-touch fs and where does it have to be stored?
-
-
@wdehoog said in Is it possible to flash ubuntu touch without an installer?:
Thanks for the link. I'll take a look. It will help understanding what is going on. Still would like to know where to get the flashable parts.
check out
ubuntu-device-flash
it can--download-only
and it gets all its infos from jsons on the server http://system-image.ubports.com/channels.jsonThe article is from more then two years ago. Does it still work this way?
I'm pretty sure yes.
@wdehoog said in Is it possible to flash ubuntu touch without an installer?:
So if I understand well if I download http://system-image.ubports.com/pool/device-......tar.xz
I get boot.img and system.img which need to end up in the boot and system partitions.almost. the boot.img is a regular android-world-image (as much as I understand it anyway) that goes into the /boot partition of the android device. think
fastboot flash boot boot.img
. the system.img is a file system image with a minimal set of android stuff that UT needs to get all the hardware support it needs. It is not what goes into the the /system partitionTwo new questions:
- With halium/plasma-mobile one also has to flash boot.img into the boot partition but system.img is loaded from /data (no need to flash system partition). Is something like this possible with ubuntu-touch as well?
EDIT: Yes. This is how it is done in UT on the Nexus 7 .... I juuust don't really understand how .... see below.
- Where do I get the ubuntu-touch fs
if you check the --download-only or afterwards your local
~/.cache/ubuntusomthingchachfolder
or the jsons I pointed out above, then you see ubports-asdfasdfadsf...adsf.tar.xz files . That is the root fs of UT.and where does it have to be stored?
Now I think, typically the root fs gets unzipped into the /system partition. the android system.img file gets copied somewhere into the bowels of that fs and when UT boots it mounts it and runs stuff from it.
I said typically because at least on a Nexus 7 the rootfs doesn't go into the /system partition of the handset, but into a
system.img
file in the .... I think/data
folder. Not sure where/how it is decided whether an image file or a system partition is used.Fun eh?
-
Fun indeed.
I just noticed the jenkins server builds rootfs archives and a device_bacon_devel.tar.xz which contains the boot, recovery and system images and other files. Do you now anything about these?
What I am hoping for is this: I recently received a hybris-boot.img + system.img for halium/plasmamobile. I could not use the halium-installer since I get 'adb unauthorized' while in recovery so I messed around and ended up with a zip that installed all on my phone. It even worked. Now I hope to do the same trick with ubuntu-touch.
Thing is I have no clue what was in the halium files nor what is in the ubuntu ones.
Could this actually work? -
@wdehoog said in Is it possible to flash ubuntu touch without an installer?:
Fun indeed.
I just noticed the jenkins server builds rootfs archives and a device_bacon_devel.tar.xz which contains the boot, recovery and system images and other files. Do you now anything about these?
uhhhhm. could you give some more context? what is jenkins? bacon? can you provide links?
What I am hoping for is this: I recently received a hybris-boot.img + system.img for halium/plasmamobile. I could not use the halium-installer since I get 'adb unauthorized' while in recovery so I messed around and ended up with a zip that installed all on my phone. It even worked. Now I hope to do the same trick with ubuntu-touch.
Thing is I have no clue what was in the halium files nor what is in the ubuntu ones.
Could this actually work?Again, ... I'm a bit lost without context .... "a zip that installed all on my phone" ???
-
I meant this server: http://ci.ubports.com/job/daily-bacon/
bacon is the code name for oneplus oneI have TWRP recovery with multi-rom on my phone. I created a zip file that TWRP can 'install'. It extracts the files and executes a script. The script puts rootfs.img and system.img in /data and flashes hybris-boot.img into the boot partition.
I found an old ubuntu touch install script (rootstock-installer) and unfortunately it seems to be more complex then this. Maybe I better wait until someone explains how ubuntu-touch can be installed on halium (screenshots on haliums twitter show it can).
-
@wdehoog how complicated is rootstock?
-
See https://pastebin.com/2BTrDBpM
It seems to create one file: system.img
I am trying to see if I can create it -
@wdehoog said in Is it possible to flash ubuntu touch without an installer?:
See https://pastebin.com/2BTrDBpM
It seems to create one file: system.img
I am trying to see if I can create itYeah ok. I guess this is basically the rootfs right? so maybe making an fs image and unpacking the ubports-asdf....xz file into it is enough?!
-
@doniks I'm wondering why not just use this rootstock script. But I guess I'm still not really getting it. You can't adb into your recovery, right? No adb shell, no adb push. How do you then get that magical zip file onto the device? What does that zip install script look like? Who runs it? What can it do?
-
When in recovery adb lists the device as 'unauthorized' so no adb shell for me, so no installer script.
The zip I create can be transfered when booted in android or sailfish.
The script in the zip is simple: extract system.img to /data and flash boot.img into the boot partition. It is the updater-script run by the updater-binary.
I have the kernel booting (no errors in /last/kernel_msg) but no UI or anything else.
-
@wdehoog said in Is it possible to flash ubuntu touch without an installer?:
When in recovery adb lists the device as 'unauthorized' so no adb shell for me, so no installer script.
The zip I create can be transfered when booted in android or sailfish.
ah ok. clear. are you using multirom or something similar?
The script in the zip is simple: extract system.img to /data and flash boot.img into the boot partition. It is the updater-script run by the updater-binary.
uuuhhhu, ok, now you come forward with some terms that are actually suitable at least for an internet research ....
are we talking about something like this:
https://www.youtube.com/watch?v=dSCseBYVc3YI have the kernel booting (no errors in /last/kernel_msg) but no UI or anything else.
ok. and now? maybe you want to, i don't know, share some details like the updater-script that you wrote and what exactly you put where exactly into the zip file. you don't make it easy to help you ...
-
@doniks said in Is it possible to flash ubuntu touch without an installer?:
ah ok. clear. are you using multirom or something similar?
yes TWRP+multiromuuuhhhu, ok, now you come forward with some terms that are actually suitable at least for an internet research ....
are we talking about something like this:
https://www.youtube.com/watch?v=dSCseBYVc3Y
I have no idea what you try to explain with this video. The updater-script is explained a bit here https://www.droidgyan.com/updater-script/I have the kernel booting (no errors in /last/kernel_msg) but no UI or anything else.
ok. and now?
Yep that is the question. How can I get logs of what is going wrong in user space.maybe you want to, i don't know, share some details like the updater-script that you
wrote and what exactly you put where exactly into the zip file. you don't make it easy to > help you ...
What script do you mean? The updater-script: https://pastebin.com/mYaHFSz9
or the one making the system.img: https://pastebin.com/hE5qD52qI am a bit surprised that none of the ubports developers joins in. They know exactly how it works and where I should look.
-
@wdehoog You can try to reach them in the Telegram supergroup. They are busy and small Team so is kinda understandable. Also in the group there are a lot of people with huge knowledge who can help you guys
-
@malditobastardo said in Is it possible to flash ubuntu touch without an installer?:
@wdehoog You can try to reach them in the Telegram supergroup. They are busy and small Team so is kinda understandable. Also in the group there are a lot of people with huge knowledge who can help you guys
Thanks.
You see I think that is mistake they make. They created this forum so they at least should use it. The messages on the forum are stored and can be searched through. Very convenient. Telegram/irc or whatever messaging platform usually is not.
-
Well I now have adb access to ubuntu-touch. Some errors in dmesg:
[ 3.285119] initrd: mounting system.img (image developer mode)
[ 3.301791] initrd: mounting device image as ro
[ 3.309947] EXT4-fs (loop1): couldn't mount as ext3 due to feature incompatibilities
[ 3.334772] initrd: device is baconand
[ 3.624120] initrd: mounting /root/var/lib/lxc/android/system.img as /root/android/system
[ 3.910165] init: ureadahead-touch main process (497) terminated with status 5
[ 4.469967] init: /init.environ.rc: 13: export requires 2 arguments -
Ok. It works now. Got ubports on my phone. Extracting the archives was wrong so some dirs ended up in the wrong place. Here is the script I used https://pastebin.com/DgUu2PuJ
-
@wdehoog did you find a way to create flashable zips of ut?