OESF Portables Forum

Model Specific Forums => Cosmo Communicator => Cosmo Communicator - Linux => Topic started by: idc on April 30, 2021, 06:07:19 am

Title: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: idc on April 30, 2021, 06:07:19 am
Hi,
I would like to install Ubuntu Ports on my Cosmo and need therefore to free up boot 4, but would like to retain Gemian in boot 3. If I don't need wireless for rooted Android, is there any reason I shouldn't install rooted Android into boot 2 instead of TWRP? Would I be losing anything useful? So far as I can tell TWRP is of no particular use on this machine. The instructions here (https://support.planetcom.co.uk/index.php/Rooted_Android_For_Cosmo) are ambiguous as to whether or not this is possible, referring to boot 2 only working with 'recovery mode', and suggesting only boot 3 and 4 can take rooted Android. (Let me know if I've missed something here.)

On my Cosmo I have Android in boot 1, Gemian in boot 3 and rooted Android in boot 4. (Though since reinstalling Gemian I can now see six options on booting: 1 NORMAL; 2 RECOVERY; 3 TWRP; 4 Debian/KDE; 5 ROOTED_ANDROID; 6 FASTBOOT.) I only ever use rooted Android once in a while in order to run Titanium backup, backing up to an SD card — because I use Android without logging in to Google and therefore, I believe, nothing is backed up by default. Presumably I could do this just as well with rooted Android in boot 2. Has anyone else done this?

Will the process of installing rooted Android in boot 2 mean I have to reinstall Titanium Backup or change any other settings, or am I right in thinking that rooted Android keeps everything (or nearly everything?) in the same partitions as unrooted Android, so reinstalling rooted Android to boot 2 as per the instructions would leave me with Titanium Backup and its settings unchanged?

Sorry for so many questions and thanks in advance for any help/advice you can offer. Despite using Android for a number of years, I still feel it is an OS I don't really understand.
Ian
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: MonkeyControl on May 18, 2021, 05:46:24 am
I couldn't find much to help you other than this post warning about no modem access:  https://www.oesf.org/forum/index.php?topic=36413.msg296945#msg296945, and you suggested you didn't need wireless, but other than that I don't know.  Maybe do a backup and give it a go, or contact PC and see what they have to say about it.  I have Android, Recovery, Debian, UBPorts, FastBoot options on my Cosmo.  UBPorts is my default and I have no use for Android, but I may have a go this weekend out of curiosity, if I'm feeling brave. 
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: idc on May 18, 2021, 10:28:27 am
Thanks for that. When I've some time, I shall give it a go. If you do get there before me, I'd be interested to hear your experience. Are you using Ubuntu as a phone or just as a mobile computer? How do you find the battery life?
Thanks again for your input.
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: MonkeyControl on May 24, 2021, 01:42:26 am
Thanks for that. When I've some time, I shall give it a go. If you do get there before me, I'd be interested to hear your experience.
I didn't have time last weekend, definitely this weekend though, full backup then a deep breath. 
Are you using Ubuntu as a phone or just as a mobile computer?
Full time phone, part time computer, I suppose.  Maybe you don't quite get the full desktop package experience that you do with Debian, but for me UT fits my use case, and it's very stable and has a really nice interface. 
How do you find the battery life?
From an overnight charge I get a day's work out of it, maybe a little topup in the evening if I'm caning the browser.  UT seems a lot lighter on battery than Debian, and also better signal coverage, not sure if the two things are related. 
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: idc on May 27, 2021, 01:41:02 pm
Cool. It does sound like it might meet my use case. Let me know how you get on if you manage this weekend.
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: MonkeyControl on May 31, 2021, 07:39:28 pm
Cool. It does sound like it might meet my use case. Let me know how you get on if you manage this weekend.
My weekend didn't go to plan, but I did get a little trial run. 
I managed to get to a stage where all the options: 
    [1] NORMAL
    [2] RECOVERY
    [3] ROOTED_ANDROID
    [4] DEBIAN_KDE
    [5] UBPORTS
    [6] FASTBOOT
appear on bootup, but rooted android doesn't boot.  Also note the recovery option is still there after I tried to put rooted android into 'EMPTY_RECOVERY_BOOT_2'. 
I'll have another go this weekend, maybe changing the sequence I load stuff up, or putting stuff in different slots. 
The order I tried (following the instructions from the Planet website (https://support.planetcom.co.uk/index.php/Linux_for_Cosmo) using firmware V3) was: 
1.  Debian into EMPTY_NORMAL_BOOT_3, (worked okay)
2.  Tried Rooted Android into EMPTY_RECOVERY_BOOT_2, (appeared below recovery on boot options, but didn't boot)
3.  Rooted Android into EMPTY_NORMAL_BOOT_4, (seems okay, but android is still ugly) :)
4.  Ran out of time and needed Ubuntu Touch back, so installed as per instructions here (https://www.oesf.org/forum/index.php?topic=36413.0). 
I wrote the procedure down as I went along, it's a bit long winded for a post, but I'll pm it to you if you are interested. 
I'll have another crack this weekend if I get time. 
Sorry, can't be more help than that at the moment, I'm short of time and really don't know what I'm doing :)
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: idc on July 05, 2021, 03:57:03 am
Thank you for the above. Sorry about the slow reply, I've been busy so haven't looked in for a while, but I am interested to see your procedure if it isn't too much trouble to PM (or even to write up here in case anyone else is interested). But perhaps you've managed to make it work in the intervening time?
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: MonkeyControl on July 11, 2021, 02:51:43 pm
Thank you for the above. Sorry about the slow reply, I've been busy so haven't looked in for a while, but I am interested to see your procedure if it isn't too much trouble to PM (or even to write up here in case anyone else is interested). But perhaps you've managed to make it work in the intervening time?
I had another couple of goes at getting rooted android running in multiboot alongside Ubuntu Touch, but I couldn't make it work. 
I've lost the original procedure due to a bout of overenthusiastic housekeeping, but I'll have another look in my backups to see if I can find it. 
I did write a new procedure in the meantime for installing Ubuntu Touch, I posted it here:  https://forums.ubports.com/topic/3453/cosmo-communicator/36?_=1625602673257, on the UBPorts forum.  I originally wrote this for my own purposes, but it may help you.  I can't take any credit for this procedure, I just collected and compiled the work of other generous capable community folk, but it works for me. 
You may be able to cycle through the install stages from the Planet website instructions once you have set up your partitions to try different configurations in an attempt to get your rooted android and Ubuntu Touch combination, but I couldn't get it to work.  A work of warning though, I'm just copying and pasting, following the steps laid out by others, I don't really know what I'm doing.  I'm not a developer, I'm just an Electrical Engineer with a groovy mobile, and a little knowledge is a dangerous thing.  While I didn't manage to brick my Cosmo tinkering with the install steps, maybe I could have.  It may be worth a quick email to Planet to see if the setup you are after is advisable or even possible.  Apologies if that sounds like me covering my backside, I am, but I'd also hate to help you dig a big hole and get stuck in it. 
I appreciate what you are trying to do, but personally, for my use case, Ubuntu Touch on my Cosmo is all I want or need.  It's a beautiful OS on a super device. 
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: idc on July 13, 2021, 04:12:54 pm
Hey, thanks for the instructions. Great to see those. I'm away from home for a few days, but I'll give it a go when I get back and have my desktop available.
Is Ubuntu Touch now your daily driver? How is the battery life?
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: jakfish on July 13, 2021, 08:52:50 pm
UBPorts: this is very intriguing.

https://open-store.io/?type=app

I've been poking around in the store. Am I correct in assuming there's not a word processor available? Can't find LibreOffice, etc.

Thanks,
Jake
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: MonkeyControl on July 14, 2021, 03:47:20 am
Is Ubuntu Touch now your daily driver?
Yes it is

How is the battery life?
It gets me through a work day for an overnight charge.  Maybe it's a bit heavy on power, but the battery is a good size.  It lasts as long as any other phone I've had in the past decade. 

Am I correct in assuming there's not a word processor available?
Unfortunately you are correct, there are the usual note taking apps, and document viewer, but no true word processor or spreadsheet app as such.  This may be a showstopper for some. 
There is a tool called 'Libertine', which I think allows the install of LibreOffice: 
https://forums.ubports.com/topic/5122/good-office-program-for-lg-nexus-5
https://wiki.ubuntu.com/Touch/Libertine
but I haven't tried it. 
I may give it a go. 
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: jakfish on July 14, 2021, 06:32:43 pm
Thank you for that fast follow-up. While intrigued mightily with UBPorts, I don't think my Cosmo can make the switch: my wifi/bt are dead and while cam1965 held my hand and helped me compile the Gemian kernel to let me use usb wifi adapters, I don't think such an arrangement will transfer to UBPorts. That, an absence of accessible word processing seem to make me cheer on rather than actually use UBPorts.

I will lurk with respect :)

Jake
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: cam1965 on July 15, 2021, 07:29:01 am
Hey, thanks for the instructions. Great to see those. I'm away from home for a few days, but I'll give it a go when I get back and have my desktop available.
Is Ubuntu Touch now your daily driver? How is the battery life?

Hi .
I am intrigued.
artifacts.zip has only 24MB in size.
This is too small for an Operating system, unless it will download files when installing. Or it will use the files from Debian install.
When I unzip the file and extracted the contents as showed  in the photo attached , there is no rootfs.img
I think I will have to create an image of the contents of system and rename it to ubuntu.img.
Can you please confirm the contents of rootfs.img (ubuntu.img ) ?
Thank you so  much.
 


Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: sven1999 on July 15, 2021, 02:12:46 pm
Yes, 24 MB is too small. If you follow the instructions at https://github.com/gemian/gemian/wiki/UBPorts , please look at the word FLASHABLE. Only the artifacts with this mark can be used for the described installation. If there are none at the moment, I can share some older ones.
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: MonkeyControl on July 15, 2021, 02:51:45 pm
artifacts.zip has only 24MB in size.
I'm having the same problem following my own instructions.   ???
Either I'm missing something or something has changed. 
I've previously used this link to download the flashable zip: 
https://gitlab.com/ubports/community-ports/android9/planet-cosmocom/planet-cosmocom/-/pipelines
I lifted it from the original instruction: 
https://www.oesf.org/forum/index.php?topic=36413.0
It should extract a folder called 'out', containing 'boot.img' and 'rootfs.img'
I've got a copy of pipeline #284408889 sitting on my desktop, extracted it's about 3GB. 
I don't know what's going on here, I'll see if I can figure out where we're going wrong. 
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: cam1965 on July 15, 2021, 03:05:58 pm
artifacts.zip has only 24MB in size.
I'm having the same problem following my own instructions.   ???
Either I'm missing something or something has changed. 
I've previously used this link to download the flashable zip: 
https://gitlab.com/ubports/community-ports/android9/planet-cosmocom/planet-cosmocom/-/pipelines
I lifted it from the original instruction: 
https://www.oesf.org/forum/index.php?topic=36413.0
It should extract a folder called 'out', containing 'boot.img' and 'rootfs.img'
I've got a copy of pipeline #284408889 sitting on my desktop, extracted it's about 3GB. 
I don't know what's going on here, I'll see if I can figure out where we're going wrong.

OK.
Thank you so much again.
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: sven1999 on July 15, 2021, 03:26:03 pm
There seems to be a limit of 2 downloadable files on this page. (From GitLab or from the maintainers?) This was a problem before. See https://gitlab.com/ubports/community-ports/android9/planet-cosmocom/planet-cosmocom/-/issues/2 for a report and a link to some backup copies.
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: cam1965 on July 15, 2021, 03:58:24 pm
There seems to be a limit of 2 downloadable files on this page. (From GitLab or from the maintainers?) This was a problem before. See https://gitlab.com/ubports/community-ports/android9/planet-cosmocom/planet-cosmocom/-/issues/2 for a report and a link to some backup copies.
Thank you so much !
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: cam1965 on July 16, 2021, 12:34:42 pm
artifacts.zip has only 24MB in size.
I'm having the same problem following my own instructions.   ???
Either I'm missing something or something has changed. 
I've previously used this link to download the flashable zip: 
https://gitlab.com/ubports/community-ports/android9/planet-cosmocom/planet-cosmocom/-/pipelines
I lifted it from the original instruction: 
https://www.oesf.org/forum/index.php?topic=36413.0
It should extract a folder called 'out', containing 'boot.img' and 'rootfs.img'
I've got a copy of pipeline #284408889 sitting on my desktop, extracted it's about 3GB. 
I don't know what's going on here, I'll see if I can figure out where we're going wrong.
I have installed ubuntu touch. Downloaded it from https://sempria.de:8203/cosmo/  ( see the post above from sven1999 : Thanks  sven1999)
 Calls , sms, camera are working.
I could not dial and  answer calls using  codi. Only with dialer-app.
Libertine does not work to install libreoffice.
And the sound output to speaker only works after I plug and remove an earphone.
I have changed a file cosmo ( keyboard layout ) to have accents and make sound and brightness work with fn keys.
Also I created an script to enable keyboard backlight on and off.
Ubuntu touch is fine, but Debian to me is a better choice for now.
Thank you to all people in this forum.
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: MonkeyControl on July 18, 2021, 03:49:26 am
I could not dial and  answer calls using  codi. Only with dialer-app.
You should be able to answer calls with the CoDi, it doesn't show the caller name, just the number, (not ideal, and I think it also did this for some callers under rooted android), but it should still allow you to dial or answer. 

Libertine does not work to install libreoffice.
Thanks for the heads up, I'll stop trying to install it on mine :)

Ubuntu touch is fine, but Debian to me is a better choice for now.
Have fun with Debian, I was using it for a while till sms got sorted on UT, (thanks to 'NotKit' I think).  It's a nice OS and it sounds like it meets your use case better than UT.  I just find the user interface on UT a bit easier on the eyes, or maybe I just need new reading glasses.    8)
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: cam1965 on July 18, 2021, 06:44:11 am
I could not dial and  answer calls using  codi. Only with dialer-app.
You should be able to answer calls with the CoDi, it doesn't show the caller name, just the number, (not ideal, and I think it also did this for some callers under rooted android), but it should still allow you to dial or answer. 

Libertine does not work to install libreoffice.
Thanks for the heads up, I'll stop trying to install it on mine :)

Ubuntu touch is fine, but Debian to me is a better choice for now.
Have fun with Debian, I was using it for a while till sms got sorted on UT, (thanks to 'NotKit' I think).  It's a nice OS and it sounds like it meets your use case better than UT.  I just find the user interface on UT a bit easier on the eyes, or maybe I just need new reading glasses.    8)

You are correct.
After reinstalling the new version ( artifacts-2021.06.09.zip ) and removing previous configurations from the older version  that I have installed ( user-data and system-data ) I can dial and answer calls from codi.
Also in terminal ( that works with CTRL + ALT + DEL ) I  have created an script to change the output of the sound to speakers .
( the command is : pacmd set-sink-port 0 output-speaker ).
You can see the active pot using the command :
pacmd list |grep "active port"
The results are :
active port: <output-speaker>
active port: <input-builtin_mic>


Thank you  again.
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: idc on September 13, 2021, 04:51:08 pm
I thought I would report, as I finally got around to attempting to install rooted Android on the 2nd TWRP boot partition. It seems to work fine, with the expected drawback that the modem doesn't work so one can't call. Wifi works fine though, and I can still run Titanium backup, which was my main purpose for having a rooted Android on the phone. So now I have successfully installed Ubuntu Ports over the old rooted Android in partition 4, and have a set up as follows: 1. Android; 2. rooted Android (no cellular); 3. Kde Gemian; 4. Ubuntu Touch. I'm really enjoying exploring Ubuntu touch.

PS I am amused to think that I backed Ubuntu's Kickstarter or Indiegogo convergence phone almost a decade ago, only to have it refunded when they didn't make the millions they'd asked for. But almost a decade on, I've finally got my Ubuntu phone and with an attached Psion-keyboard as well. Happy days!
Title: Re: Installing rooted android on TWRP boot 2 in order to put UBPorts in 4. Any cons?
Post by: MonkeyControl on September 16, 2021, 06:52:36 pm
I have installed ubuntu touch. Downloaded it from https://sempria.de:8203/cosmo/  ( see the post above from sven1999 : Thanks  sven1999)
 Calls , sms, camera are working.
I could not dial and  answer calls using  codi. Only with dialer-app.
Libertine does not work to install libreoffice.
And the sound output to speaker only works after I plug and remove an earphone.
I have changed a file cosmo ( keyboard layout ) to have accents and make sound and brightness work with fn keys.
Also I created an script to enable keyboard backlight on and off.
Ubuntu touch is fine, but Debian to me is a better choice for now.
Thank you to all people in this forum.
@cam1965
Any chance you can do me a big favour and share that script to turn the keyboard backlight on and off and how to implement it. 
I've been trying to get something to work with 'echo 45 > /proc/aw9524_led_proc', looking at other tweaks and scripts here and on the UBPorts forum and trying to understand how to turn the backlight on from either at the keyboard or by opening the Cosmo, but I can't figure it out. 
Thanks
MC