OESF Portal | OESF Forum | OESF Wiki | LinuxPDA | #planetgemini chat on matrix.org | #gemini-pda chat on Freenode | #zaurus and #alarmz chat on Freenode | ELSI (coming soon) | Ibiblio

IPB

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> How to run Linux userland under Android, And should I repartition in preparation?
candlerb
post Feb 23 2018, 06:38 AM
Post #1





Group: Members
Posts: 6
Joined: 23-February 18
Member No.: 818,203



Hello,

I am expecting my Gemini to arrive shortly - out of the blue I got a tracking number from MyHermes :-) So before it does, I'd like to raise a few questions.

My planned use of Gemini is with a Linux userland - e.g. I want to be able to do "apt-get install XXX" and use Linux CLI tools - but I'd like that userland to be running on top of Android, so the Gemini continues to work as a phone and run Android apps like WhatsApp and Google Maps. (Doing this means I don't need to carry a separate phone around). I saw Gemini working this way a few months ago.

I note that Planetcom have announced https://www.indiegogo.com/projects/gemini-p...one#/updates/49 that there will be a reflashing/repartitioning tool; however their announced Linux support page http://support.planetcom.co.uk/index.php/Linux_Support is currently empty. There's some more info at GKA https://github.com/gemian/gemini-keyboard-apps/wiki but this seems to be about dual-booting.

So my questions are about how I go about running a Linux userland and/or X desktop while the phone is running Android.

1. Does it require reflashing? If so, should I reflash my device as soon as it arrives in preparation?

(I am concerned that if I spend a lot of time setting it all up under Android, I am going to lose all that work when I add Linux)

2. Does running Linux under Android use the same Linux partition as if I dual-booted into Linux?

(Maybe it work *better* to boot directly into Linux? But I am guessing I would lose at least voice calling, if not SMS and data as well)

3. Does it require rooting, and if so how do I go about that?

4. I believe I would also need an Android X server app to get a GUI desktop - what app would I require?

Any clues gratefully received! Thanks... Brian.
Go to the top of the page
 
+Quote Post
Murple2
post Feb 23 2018, 09:37 AM
Post #2





Group: Members
Posts: 138
Joined: 5-January 18
Member No.: 815,856



QUOTE(candlerb @ Feb 23 2018, 02:38 PM) *
Hello,

I am expecting my Gemini to arrive shortly - out of the blue I got a tracking number from MyHermes :-) So before it does, I'd like to raise a few questions.

My planned use of Gemini is with a Linux userland - e.g. I want to be able to do "apt-get install XXX" and use Linux CLI tools - but I'd like that userland to be running on top of Android, so the Gemini continues to work as a phone and run Android apps like WhatsApp and Google Maps. (Doing this means I don't need to carry a separate phone around). I saw Gemini working this way a few months ago.

I note that Planetcom have announced https://www.indiegogo.com/projects/gemini-p...one#/updates/49 that there will be a reflashing/repartitioning tool; however their announced Linux support page http://support.planetcom.co.uk/index.php/Linux_Support is currently empty. There's some more info at GKA https://github.com/gemian/gemini-keyboard-apps/wiki but this seems to be about dual-booting.

So my questions are about how I go about running a Linux userland and/or X desktop while the phone is running Android.

1. Does it require reflashing? If so, should I reflash my device as soon as it arrives in preparation?

(I am concerned that if I spend a lot of time setting it all up under Android, I am going to lose all that work when I add Linux)

2. Does running Linux under Android use the same Linux partition as if I dual-booted into Linux?

(Maybe it work *better* to boot directly into Linux? But I am guessing I would lose at least voice calling, if not SMS and data as well)

3. Does it require rooting, and if so how do I go about that?

4. I believe I would also need an Android X server app to get a GUI desktop - what app would I require?

Any clues gratefully received! Thanks... Brian.


I use Linux Deploy (in play store) on android for running linux. It can install and run linux from a file container, or from a dedicated partition. It does need root however, which would require you to reflash your device, but...

there are now ways of running linux without root - (I haven't tried it)
https://fossbytes.com/how-to-install-a-linu...ithout-rooting/

For the X server I use XServer XSDL https://play.google.com/store/apps/details?...erver&hl=en

In theory you could chroot into the same linux install that you dual boot into. There may be some caveats to this, and would probably require a little more configuring. I'd be happy to post some howtos once I get my device (not soon unfortunately!)

Go to the top of the page
 
+Quote Post
Murple2
post Feb 23 2018, 09:59 AM
Post #3





Group: Members
Posts: 138
Joined: 5-January 18
Member No.: 815,856



To be honest it may be that Sailfish will meet your needs nicely. I guess it depends on the android app support - you mention whatsapp etc. I'm sure we'll get a better picture when they showcase at MWC this month
Go to the top of the page
 
+Quote Post
candlerb
post Feb 25 2018, 02:08 AM
Post #4





Group: Members
Posts: 6
Joined: 23-February 18
Member No.: 818,203



QUOTE(Murple2 @ Feb 23 2018, 05:37 PM) *
there are now ways of running linux without root - (I haven't tried it)
https://fossbytes.com/how-to-install-a-linu...ithout-rooting/


That looks neat - thanks! I wonder what the limitations of this approach are? Presumably anything running setuid root isn't really running as root - meaning presumably no direct access to /dev devices, unable to mount filesystems etc.
Go to the top of the page
 
+Quote Post
Murple2
post Feb 25 2018, 03:59 AM
Post #5





Group: Members
Posts: 138
Joined: 5-January 18
Member No.: 815,856



QUOTE(candlerb @ Feb 25 2018, 10:08 AM) *
QUOTE(Murple2 @ Feb 23 2018, 05:37 PM) *
there are now ways of running linux without root - (I haven't tried it)
https://fossbytes.com/how-to-install-a-linu...ithout-rooting/


That looks neat - thanks! I wonder what the limitations of this approach are? Presumably anything running setuid root isn't really running as root - meaning presumably no direct access to /dev devices, unable to mount filesystems etc.


Yeah that sounds about right. You'lll be able to use root with the context of the Linux userland, but you won't be able to do anything that needs root permissions in android.

Found this useful link covering the topic at large: https://wiki.debian.org/ChrootOnAndroid
Go to the top of the page
 
+Quote Post
candlerb
post Feb 26 2018, 01:42 PM
Post #6





Group: Members
Posts: 6
Joined: 23-February 18
Member No.: 818,203



QUOTE(Murple2 @ Feb 25 2018, 11:59 AM) *
Found this useful link covering the topic at large: https://wiki.debian.org/ChrootOnAndroid


Thanks.

It looks like GNUroot hasn't been updated since Feb/March 2014: https://github.com/corbinlc/gnuroot https://www.dropbox.com/sh/blwlhsb986xv5hg/7VPnQZZ_fj?lst= - but there is a more recent version called GNUroot Debian https://github.com/corbinlc/GNURootDebian


Termux https://github.com/termux/termux-packages looks better maintained, but as far as I can see it has its own packages, it's not an Debian/Ubuntu.
Go to the top of the page
 
+Quote Post
candlerb
post Mar 4 2018, 12:59 PM
Post #7





Group: Members
Posts: 6
Joined: 23-February 18
Member No.: 818,203



Replying to myself... GNUroot is a very cut down Debian Jessie. It starts to look a bit normal when you do:

CODE
apt-get update
apt-get install apt-utils iputils-ping openssh-client


(Aside: having the minus sign as a Fn-combination really is painful - nut maybe I'll be able to train myself into this)

The fakeness of the root is immediately apparent, as for example

CODE
# ping 8.8.8.8
ping: icmp open socket: Operation not permitted


GNUroot lets you start an Xterm in a VNC X session - but once I'd started it, I could find no way to stop it other than reboot the phone.

So I'm not sure that GNUroot is actually useful other than as a cool toy.
Go to the top of the page
 
+Quote Post
TheKit
post Mar 5 2018, 06:52 AM
Post #8





Group: Members
Posts: 27
Joined: 19-February 18
Member No.: 818,021



I'd suggest to simply root it with Magisk (extract boot.img, modify it through Magisk Manager and flash it back via FlashTool) and use Linux Deploy. As a bonus, if you flash Linux dualboot, you can configure Linux Deploy to mount Linux partition and chroot there.
Go to the top of the page
 
+Quote Post
AndyM
post Mar 7 2018, 03:52 AM
Post #9





Group: Members
Posts: 5
Joined: 17-February 18
Member No.: 817,941



QUOTE(TheKit @ Mar 5 2018, 06:52 AM) *
I'd suggest to simply root it with Magisk (extract boot.img, modify it through Magisk Manager and flash it back via FlashTool) and use Linux Deploy. As a bonus, if you flash Linux dualboot, you can configure Linux Deploy to mount Linux partition and chroot there.


Looks as though the Planet guys have just done this for us. Rooted bootloader now available on Android support page.
Go to the top of the page
 
+Quote Post
graynada
post Jul 27 2018, 11:18 AM
Post #10





Group: Members
Posts: 118
Joined: 27-April 18
Member No.: 821,829



I'm using UserLAnd and it's pretty good. No need for a separate partition so keeps maximum flexibility on storage and all tteh Android stuff running too. Suits my needs nicely
Go to the top of the page
 
+Quote Post
peter
post Aug 4 2018, 09:31 AM
Post #11





Group: Members
Posts: 8
Joined: 18-March 18
Member No.: 819,369



QUOTE(TheKit @ Mar 5 2018, 10:52 AM) *
As a bonus, if you flash Linux dualboot, you can configure Linux Deploy to mount Linux partition and chroot there.


I've installed Linux Deploy, but I have no idea how to mount my dualboot image as you suggest. Any hints?
Go to the top of the page
 
+Quote Post
Murple2
post Aug 4 2018, 10:56 AM
Post #12





Group: Members
Posts: 138
Joined: 5-January 18
Member No.: 815,856



QUOTE(peter @ Aug 4 2018, 06:31 PM) *
QUOTE(TheKit @ Mar 5 2018, 10:52 AM) *
As a bonus, if you flash Linux dualboot, you can configure Linux Deploy to mount Linux partition and chroot there.


I've installed Linux Deploy, but I have no idea how to mount my dualboot image as you suggest. Any hints?

Create a new profile and then in the settings for that profile select 'installation type: partition' and 'installation path: /dev/block/mmcblk0p29'. Select debian for your distro. Don't 'install' as linux is already on the partition. If you look around the forum you'll find some instructions for setting up the networking. otherwise you are pretty much golden.
Go to the top of the page
 
+Quote Post
peter
post Aug 4 2018, 02:53 PM
Post #13





Group: Members
Posts: 8
Joined: 18-March 18
Member No.: 819,369



QUOTE(Murple2 @ Aug 4 2018, 02:56 PM) *
Create a new profile and then in the settings for that profile select 'installation type: partition' and 'installation path: /dev/block/mmcblk0p29'. Select debian for your distro. Don't 'install' as linux is already on the partition. If you look around the forum you'll find some instructions for setting up the networking. otherwise you are pretty much golden.


Thank you!
Go to the top of the page
 
+Quote Post
graynada
post Aug 11 2018, 05:45 PM
Post #14





Group: Members
Posts: 118
Joined: 27-April 18
Member No.: 821,829



The advantages I see from using an in Android partition (only the one Android partion as when received) over having a separate partion are:

1. You should still be able to use OTA updates.
2. Maximum flexibility with storage. When setting up a separate partition you have to take a punt at how much you want for each. With the Android solution you can just use all your 64Gb as it suits you at the time between Linux and Android.
Go to the top of the page
 
+Quote Post
Murple2
post Aug 11 2018, 10:50 PM
Post #15





Group: Members
Posts: 138
Joined: 5-January 18
Member No.: 815,856



QUOTE(graynada @ Aug 12 2018, 02:45 AM) *
The advantages I see from using an in Android partition (only the one Android partion as when received) over having a separate partion are:

1. You should still be able to use OTA updates.
2. Maximum flexibility with storage. When setting up a separate partition you have to take a punt at how much you want for each. With the Android solution you can just use all your 64Gb as it suits you at the time between Linux and Android.


Yeah, unless you want to dualboot (or multiboot) there is little advantage to using a separate partition for linux. Although OTA's should still work so long as you have left enough space for Android!
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
3 User(s) are reading this topic (3 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 22nd November 2019 - 07:13 PM