OESF Portables Forum

Model Specific Forums => Cosmo Communicator => Cosmo Communicator - General Discussion => Topic started by: wkbd006 on December 21, 2020, 05:17:37 am

Title: Installing a Linux distribution inside Android
Post by: wkbd006 on December 21, 2020, 05:17:37 am
This is another method of installing a Linux distribution on Android. I have found it a little bit easier and the final result more functional than the Devuan installation posted on February. The steps are based on this article https://www.makeuseof.com/tag/how-to-linux-on-android (https://www.makeuseof.com/tag/how-to-linux-on-android). It is assumed that Android allows root user access.

Here are the steps (the option names may be different depending on the language):
Overall this gives access to a desktop-style Linux environment with its services, user interface and package manager while your Android apps continue running in the background. Compared to Gemian, at the moment of writing the battery seems to get drained less, although the GUI is a little less reactive.
Title: Re: Installing a Linux distribution inside Android
Post by: Zarhan on December 21, 2020, 11:38:25 am
Can you drop your privileges to "normal user" account? This is one of those things that is missing in the Devuan-based approach.
Title: Re: Installing a Linux distribution inside Android
Post by: wkbd006 on December 22, 2020, 11:20:35 am
The bootstrap script creates one unprivileged user who can run sudo. The user name and the password need to be set in the configuration before starting the installation.
Title: Re: Installing a Linux distribution inside Android
Post by: LinuxGuy on April 18, 2021, 09:08:32 am
Dear wkbd006,

Thanks a lot for posting this tutorial!


At this step, i get the following error (in LinuxDeploy):

[14:58:29] E: Failed getting release file http://ftp.debian.org/debian/dists/buster/Release
[14:58:29] <<< deploy

Strange:
I can access http://ftp.debian.org/debian/dists/buster/Release in my browser without any issues and LinuxDeploy has full network access.


Any hint? Is there maybe another debian repository? Thanks a lot!
Title: Re: Installing a Linux distribution inside Android
Post by: LinuxGuy on April 22, 2021, 11:21:18 am
Dear wkbd006


well it was a firewall issues, stopping AF-firewall app let everythingwork smoothly, also things take a while - xsdl even started automatically ...


The big pitfall:

- formatting the SD card and knowing its block device name
I finally managed this with an app called AParted.

- the step with configuring xsdl / vnc
Title: Re: Installing a Linux distribution inside Android
Post by: LinuxGuy on April 23, 2021, 11:43:34 am
I finally managed to get ubuntu with LXDE running! Great!

The only two problems left:

- firefox/chromium dont have internet access allthough they can be downloaded via the console

- cant access my android files - maybe I messed up with only ticking the box in the linuxdeploy preinstall configuration - didnt know how to name a mount point

Any hints? What a wonderfull tool ...
Title: Re: Installing a Linux distribution inside Android
Post by: LinuxGuy on May 08, 2021, 01:30:13 pm
Hi  there,


Just in case this could help anyone, as I really prefer linuxdeploy to userland, allthough setup was more difficult.

My configuration, which works for me with Android 9:

Bootstrap
- distribution: Ubuntu
- architecture: arm64
- distribution package: bionic
- type of installation: file
- image size: 15 000MB
- installation path: (the location given by LD=internal memory
- filesystem: ext4
- username: root
- password: set a suitable value
- privileged users: root:aid_inet root:aid_sdcard_rw root:aid_graphics
- locale: set a suitable value

Mounts
- custom mount points: yes (without any special mountpoint, this allready mounts the ubuntu file system to /data/local/mnt in Android!)
- mount point list: /storage/345mysdcard /root/desktop/SD-card
SSH
- SSH: yes (dont use it)
PulseAudio
- enable: yes
GUI
- GUI: yes
- graphical subsystem: X11
- graphical environment: LXDE

This gives me a real ubuntu in my pocket with audio, internet, data transfert to android and without the need to reboot.

The only thing, which I still could not fix:
if I build the container with a ""normal"" user (=not root), which I would prefere, internet access is limited to the console. Browser/Mailclient dont get access ... weird. ..
Title: Re: Installing a Linux distribution inside Android
Post by: LinuxGuy on May 08, 2021, 01:42:33 pm
... and of course: didnt find the right settings for af-firewall app - giving Linuxdeploy and Xserverxsdl internet access is unfortunately not sufficient. So if I am using (rarely) internet via my ubuntu installation, I have to deactivate the firewall ... <sigh>
Title: Re: Installing a Linux distribution inside Android
Post by: wkbd006 on May 31, 2021, 06:11:06 am
I did not use my Cosmo much afterwards unfortunately, so there was no further development. I think the issue which was blocking for me was that my desktop environment (MATE) did not play well Cosmo's screen size. Either font sizes had to be very small or Firefox left only half of the screen height for a page content.