a Debian executable on Android

classic Classic list List threaded Threaded
27 messages Options
12
Reply | Threaded
Open this post in threaded view
|

a Debian executable on Android

Peter Easthope
Hello ARM users,

Suppose you have a software working in Debian which
is working on an ARM cpu.  Is there an Android app
providing an environment where the given software
can work?  Assuming no changes to this software of
course.  /dev/fb0 suffices as display.  X11 is not
required.

Thanks,                ... Peter E.



--
123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Tel +1 360 639 0202
http://easthope.ca/Peter.html Bcc: peter at easthope. ca

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Paul Wise via nm
On Thu, Apr 7, 2016 at 11:53 AM, Peter E. wrote:

> Suppose you have a software working in Debian which
> is working on an ARM cpu.  Is there an Android app
> providing an environment where the given software
> can work?  Assuming no changes to this software of
> course.  /dev/fb0 suffices as display.  X11 is not
> required.

There are several ways to have Debian under Android:

https://wiki.debian.org/ChrootOnAndroid

--
bye,
pabs

https://wiki.debian.org/PaulWise

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Andrew McGlashan


On 7/04/2016 3:07 PM, Paul Wise wrote:
> There are several ways to have Debian under Android:
>
> https://wiki.debian.org/ChrootOnAndroid

Given the security [or lack thereof, in reality] of both iOS and
Android, I would rather have Debian directly on a mobile.

:(

A.


signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Paul Wise via nm
On Thu, Apr 7, 2016 at 5:04 PM, Andrew McGlashan wrote:

> Given the security [or lack thereof, in reality] of both iOS and
> Android, I would rather have Debian directly on a mobile.

If you ignore proprietaryness, I expect iOS devices are more secure
than Debian, given their secure enclave stuff. Debian doesn't yet have
support for Secure Boot.

If you mean "only Debian" then you can get that on the N900 since it
has Linux mainline support. I don't know if anyone has tested Debian's
Linux kernel images on N900 though.

If you mean "vendor stuff plus Debian userland" then you can get that
on any Android-based mobile device where you can get root, here is an
example of doing that by modifying the initramfs (so I could switch
between Android and Debian by flashing the initramfs):

http://bonedaddy.net/pabs3/log/2012/12/03/debian-mobile/

Some more links:

https://cascardo.eti.br/blog/GNU_on_Smartphones_part_II/
https://wiki.debian.org/Mobile

--
bye,
pabs

https://wiki.debian.org/PaulWise

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

David White-2
In reply to this post by Peter Easthope
On Wednesday 06 Apr 2016 8:53:33 PM [hidden email] wrote:

> Hello ARM users,
>
> Suppose you have a software working in Debian which
> is working on an ARM cpu.  Is there an Android app
> providing an environment where the given software
> can work?  Assuming no changes to this software of
> course.  /dev/fb0 suffices as display.  X11 is not
> required.
>
> Thanks,                ... Peter E.
Unsubscribe me from this group please
--
This email is sent from a computer running Mageia-Linux.  Mageia is totally
free to download, but much more secure than a system with a registry as
each system has a unique root password not dependant on black hats
not looking for a way in.
David White of Falmouth, Cornwall

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Andrew McGlashan
In reply to this post by Paul Wise via nm


On 7/04/2016 7:13 PM, Paul Wise wrote:
> On Thu, Apr 7, 2016 at 5:04 PM, Andrew McGlashan wrote:
>
>> Given the security [or lack thereof, in reality] of both iOS and
>> Android, I would rather have Debian directly on a mobile.
>
> If you ignore proprietaryness, I expect iOS devices are more secure
> than Debian, given their secure enclave stuff. Debian doesn't yet have
> support for Secure Boot.

No iOS was number one in the list of CVEs in 2015 with Mac OS X being
number two.  Adobe Flash Player number 3, other Adobe products 4 and 5.

So, no, even with secure enclave, iOS is not as secure as it should be
and often times Apple denies vulnerabilities until they have fixed them.

> If you mean "only Debian" then you can get that on the N900 since it
> has Linux mainline support. I don't know if anyone has tested Debian's
> Linux kernel images on N900 though.

The N900 hardware is too old; it sure was good for it's time though.

> If you mean "vendor stuff plus Debian userland" then you can get that
> on any Android-based mobile device where you can get root, here is an
> example of doing that by modifying the initramfs (so I could switch
> between Android and Debian by flashing the initramfs):

No, Android has a bucket of holes too; mainly because the likes of
Samsung can't be bothered updated less than very recent phones and
Samsung has the lion's share of Android.

So, no point in that, it is still under Android.  I want "bare" metal
Debian thanks or some other trusted Linux, perhaps a BSD, but outdated
Android is what I have to settle for unless I spring for a Google sold
device and prices / availability in AU aren't as good as they are in the US.

> http://bonedaddy.net/pabs3/log/2012/12/03/debian-mobile/
>
> Some more links:
>
> https://cascardo.eti.br/blog/GNU_on_Smartphones_part_II/
> https://wiki.debian.org/Mobile

Nice links, thank you, but it still isn't bare metal.  I wish Jolla had
survived as a tablet option -- that may have encouraged me enough to try
their phone.  But, unfortunately, the Jolla tablet is no more :(

Kind Regards
AndrewM


signature.asc (201 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Paul Wise via nm
On Thu, Apr 7, 2016 at 11:02 PM, Andrew McGlashan wrote:

> So, no point in that, it is still under Android.  I want "bare" metal
> Debian thanks or some other trusted Linux, perhaps a BSD, but outdated
> Android is what I have to settle for unless I spring for a Google sold
> device and prices / availability in AU aren't as good as they are in the US.

Debian with an Android version of the Linux kernel is exactly as "bare
metal" (not sure what you mean by that though) as Debian on your
laptop or server, probably more so since laptops have SMM running on
the CPU at the same time as the OS.

--
bye,
pabs

https://wiki.debian.org/PaulWise

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Stefan Monnier
In reply to this post by Paul Wise via nm
> If you ignore proprietaryness, I expect iOS devices are more secure
> than Debian, given their secure enclave stuff. Debian doesn't yet have
> support for Secure Boot.

SecureBoot has very little to do with security.

More specifically, it's mostly useful to provide "security against the
end user".  So, yes, iOS devices are indeed among the most "secure" in
this sense: the Apple company is pretty secure against attempts by its
clients to use their devices in ways which Apple does not condone.

I personally resent this kind of security.


        Stefan

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Tim Small-2
In reply to this post by Andrew McGlashan

On 07/04/16 16:02, Andrew McGlashan wrote:
> outdated
> Android is what I have to settle for unless I spring for a Google sold
> device and prices / availability in AU aren't as good as they are in the US.

You have a reasonable choice of devices with Cyanogenmod and/or AOSP
etc. - updates are the usual Android style >100M download (or at least
they were last time I looked), but you usually get them next-day at
least (instead of in a few months via the vendors)...

I've run a Debian chroot on Cyanogenmod in the past.

You can probably find something cheap with a reasonable spec in this lot:

http://wiki.cyanogenmod.org/w/Devices#cmversions="13","13.0";

There is also a project to build an Android phone from hardware with
open drivers too, but the name of it escapes me.

Of course I would prefer to run straight Debian on the devices too, but
if the N900 isn't for you, and neither is the amount of hacking required
to get the upstream kernel running on your device, then perhaps these
are a reasonable compromise.

Tim.

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Alan Corey
Did you try alibaba.com re prices?

Android does have a "Native" mode, mostly meaning not Java.

Ubuntu Touch (I think) aims at replacing Android.  I have Debian Kit
running on a rooted phone.  Not chrooted.  But I think drivers for
things like the GPU, display, GPS are still lacking.  I run Tight VNC
server under Linux communicating with an Android VNC client.  There is
now an X client under Android but Real VNC's zooming and panning seems
more evolved.

I get really tired of band-aid approaches to security that lead to
bloat, whether it's from Google or Microsoft.  I've been an OpenBSD
user for 15 years and there's none of that crap despite it having one
of the best security records in the industry.  Correct code is secure
code, you don't allow things like buffer overflows to happen.  It's
built in at a compiler level, things like strncpy instead of strcpy.
The compiler warns you when you do something that's a bad idea.

On 4/7/16, Tim Small <[hidden email]> wrote:

>
> On 07/04/16 16:02, Andrew McGlashan wrote:
>> outdated
>> Android is what I have to settle for unless I spring for a Google sold
>> device and prices / availability in AU aren't as good as they are in the
>> US.
>
> You have a reasonable choice of devices with Cyanogenmod and/or AOSP
> etc. - updates are the usual Android style >100M download (or at least
> they were last time I looked), but you usually get them next-day at
> least (instead of in a few months via the vendors)...
>
> I've run a Debian chroot on Cyanogenmod in the past.
>
> You can probably find something cheap with a reasonable spec in this lot:
>
> http://wiki.cyanogenmod.org/w/Devices#cmversions="13","13.0";
>
> There is also a project to build an Android phone from hardware with
> open drivers too, but the name of it escapes me.
>
> Of course I would prefer to run straight Debian on the devices too, but
> if the N900 isn't for you, and neither is the amount of hacking required
> to get the upstream kernel running on your device, then perhaps these
> are a reasonable compromise.
>
> Tim.
>
>


--
Credit is the root of all evil.  - AB1JX

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Gert Wollny-2
In reply to this post by Andrew McGlashan
Am Donnerstag, den 07.04.2016, 19:04 +1000 schrieb Andrew McGlashan:
>

> Given the security [or lack thereof, in reality] of both iOS and
> Android, I would rather have Debian directly on a mobile.
>

Well, there's the Ubuntu Phone, not pure Debian, but probably the
closest you can get on current hardware without rooting a device:

https://store.bq.com/en/ubuntu-edition-e5/

and a Tablet is also coming: 

http://www.bq.com/es/aquaris-m10-ubuntu-edition

I don't know how much this is locked down though, and whether it would
be possible to replace Ubuntu easily -  i.e. what "added value" is
provided by Canonical. 

Best,
Gert 

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Alan Corey
There's a list of devices here that Ubuntu Touch runs on, including
some Android emulators.  Most of them old, they seem to want you to
compile your own image and donate it back.  Apparently you can submit
a request on their mailing list.
https://wiki.ubuntu.com/Touch/Devices  I'm not a big fan of Ubuntu but
if it's the only alternative to Android I might try it someday.

On 4/7/16, Gert Wollny <[hidden email]> wrote:

> Am Donnerstag, den 07.04.2016, 19:04 +1000 schrieb Andrew McGlashan:
>>
>>
>> Given the security [or lack thereof, in reality] of both iOS and
>> Android, I would rather have Debian directly on a mobile.
>>
>
> Well, there's the Ubuntu Phone, not pure Debian, but probably the
> closest you can get on current hardware without rooting a device:
>
> https://store.bq.com/en/ubuntu-edition-e5/
>
> and a Tablet is also coming:
>
> http://www.bq.com/es/aquaris-m10-ubuntu-edition
>
> I don't know how much this is locked down though, and whether it would
> be possible to replace Ubuntu easily -  i.e. what "added value" is
> provided by Canonical.
>
> Best,
> Gert
>
>


--
Credit is the root of all evil.  - AB1JX

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Paul Wise via nm
On Fri, Apr 8, 2016 at 6:23 AM, Alan Corey wrote:

> https://wiki.ubuntu.com/Touch/Devices

Seems like all of these run a custom version of Linux that looks like
it might be the Android version of Linux.

--
bye,
pabs

https://wiki.debian.org/PaulWise

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Alan Corey
I haven't looked into it far enough, but why can't Linux use Android's
device drivers that already exist?  Do the hardware manufacturers own
them?  It doesn't seem like it should be that different from a video
card or a network card driver.  Google claims most of Android is open
source.  The pace may be a bit much, phones come on the market and
become obsolete much quicker than other hardware.  As I type into my
14 year old desktop...

On 4/7/16, Paul Wise <[hidden email]> wrote:

> On Fri, Apr 8, 2016 at 6:23 AM, Alan Corey wrote:
>
>> https://wiki.ubuntu.com/Touch/Devices
>
> Seems like all of these run a custom version of Linux that looks like
> it might be the Android version of Linux.
>
> --
> bye,
> pabs
>
> https://wiki.debian.org/PaulWise
>
>


--
Credit is the root of all evil.  - AB1JX

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Paul Wise via nm
On Fri, Apr 8, 2016 at 1:18 PM, Alan Corey wrote:

> I haven't looked into it far enough, but why can't Linux use Android's
> device drivers that already exist?  Do the hardware manufacturers own
> them?  It doesn't seem like it should be that different from a video
> card or a network card driver.  Google claims most of Android is open
> source.  The pace may be a bit much, phones come on the market and
> become obsolete much quicker than other hardware.  As I type into my
> 14 year old desktop...

It is complicated...

A big part of it is the differences between ARM and PC architectures.
Also, for years there was the Android fork of the Linux kernel, which
had a bunch of new APIs but is mostly or all merged into mainline
Linux these days I think(?). The vendors of CPUs, SoCs and mobile
devices then forked from the Android fork of Linux, usually one fork
per CPU, then one fork per SoC and one fork per mobile device, but
sometimes some of those were shared within a vendor and some vendors
did forward changes upstream. The Android-fork-specific APIs prevented
sending drivers upstream to Linux mainline. In addition, the ARM
architecture has no standard way of enumerating available devices and
in Linux each device was supported by a compiled .c file and each
Linux kernel binary could only run on one device. Linus got annoyed
with this mess of .c files which leading to Linux on ARM adopting
device-tree as a standard way to describe hardware. Right now, most
devices don't ship device-tree files in the boot firmware but the
Linux source tree has a repository of device-tree. This is changing as
device-tree for ARM solidifies and becomes an ABI. In addition, each
device vendor had their own boot mechanisms. More recently UEFI/ACPI
have emerged as the standard boot mechanism for ARM servers so we may
see that on mobile too at some point. At the same time, mobile devices
have a life span of a couple of years due to the way people get them
on phone network contracts. There often isn't enough time within two
years to upstream all the changes into Linux mainline and once a
device is out, there is no motivation to do that. The Linux kernel
community meanwhile is using mobile devices but they work fine and
they don't want to brick their phone, so they have no interest in
mainlining that stuff. There is probably more to it than that, but
this is the problem in a nutshell.

Some links around this:

https://lwn.net/SubscriberLink/682459/7e095da9f8e8fb2a/
https://lwn.net/Articles/616859/
https://lwn.net/Articles/573409/
https://lwn.net/Articles/572692/
http://elinux.org/CE_Workgroup_Device_Mainlining_Project
https://lwn.net/Articles/662147/
https://lwn.net/Articles/481661/
https://lwn.net/Articles/472984/
https://lwn.net/Articles/514901/
https://lwn.net/Articles/647524/
http://elinux.org/LWN_Obstacles_article_details
http://elinux.org/Kernel_Mainlining
http://elinux.org/Mainlining_improvement_ideas

--
bye,
pabs

https://wiki.debian.org/PaulWise

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Alan Corey
Does build.prop do any good toward a device list?  Write something to import it?

For that matter I'm not sure where a build.prop comes from, my guess
is an output from the kernel build telling what options were selected.
So is it possible to build a kernel keeping the necessary Android
options but adding ones we want?  I think some guys on XDA do that,
but not with an eye toward mainstream Linux compatibility.  I built
Linux kernel once years ago, used to build them for FreeBSD and
OpenBSD several times a year.

Keep Android stuff in a DMZ?

Re phones on network contracts, Motorola at least sells crippled
phones cheaply that are different from the full-price retail version.
I had a Motorola XT1527 I picked up cheaply on eBay which had been
sold to "Go Phone".  Motorola's web form wouldn't give me the unlock
code for the bootloader, so it couldn't be rooted (from my viewpoint).
I also couldn't tether with it.  Returned it, paid the $159 for the
retail version direct from Motorola and everything works fine.  Same
model number.  So I plan to stay away from contract phones.  I'm on
Straight Talk anyway.  Contract phones deserve to be ignored, they're
disposable appliances.

On 4/8/16, Paul Wise <[hidden email]> wrote:

> On Fri, Apr 8, 2016 at 1:18 PM, Alan Corey wrote:
>
>> I haven't looked into it far enough, but why can't Linux use Android's
>> device drivers that already exist?  Do the hardware manufacturers own
>> them?  It doesn't seem like it should be that different from a video
>> card or a network card driver.  Google claims most of Android is open
>> source.  The pace may be a bit much, phones come on the market and
>> become obsolete much quicker than other hardware.  As I type into my
>> 14 year old desktop...
>
> It is complicated...
>
> A big part of it is the differences between ARM and PC architectures.
> Also, for years there was the Android fork of the Linux kernel, which
> had a bunch of new APIs but is mostly or all merged into mainline
> Linux these days I think(?). The vendors of CPUs, SoCs and mobile
> devices then forked from the Android fork of Linux, usually one fork
> per CPU, then one fork per SoC and one fork per mobile device, but
> sometimes some of those were shared within a vendor and some vendors
> did forward changes upstream. The Android-fork-specific APIs prevented
> sending drivers upstream to Linux mainline. In addition, the ARM
> architecture has no standard way of enumerating available devices and
> in Linux each device was supported by a compiled .c file and each
> Linux kernel binary could only run on one device. Linus got annoyed
> with this mess of .c files which leading to Linux on ARM adopting
> device-tree as a standard way to describe hardware. Right now, most
> devices don't ship device-tree files in the boot firmware but the
> Linux source tree has a repository of device-tree. This is changing as
> device-tree for ARM solidifies and becomes an ABI. In addition, each
> device vendor had their own boot mechanisms. More recently UEFI/ACPI
> have emerged as the standard boot mechanism for ARM servers so we may
> see that on mobile too at some point. At the same time, mobile devices
> have a life span of a couple of years due to the way people get them
> on phone network contracts. There often isn't enough time within two
> years to upstream all the changes into Linux mainline and once a
> device is out, there is no motivation to do that. The Linux kernel
> community meanwhile is using mobile devices but they work fine and
> they don't want to brick their phone, so they have no interest in
> mainlining that stuff. There is probably more to it than that, but
> this is the problem in a nutshell.
>
> Some links around this:
>
> https://lwn.net/SubscriberLink/682459/7e095da9f8e8fb2a/
> https://lwn.net/Articles/616859/
> https://lwn.net/Articles/573409/
> https://lwn.net/Articles/572692/
> http://elinux.org/CE_Workgroup_Device_Mainlining_Project
> https://lwn.net/Articles/662147/
> https://lwn.net/Articles/481661/
> https://lwn.net/Articles/472984/
> https://lwn.net/Articles/514901/
> https://lwn.net/Articles/647524/
> http://elinux.org/LWN_Obstacles_article_details
> http://elinux.org/Kernel_Mainlining
> http://elinux.org/Mainlining_improvement_ideas
>
> --
> bye,
> pabs
>
> https://wiki.debian.org/PaulWise
>
>


--
Credit is the root of all evil.  - AB1JX

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Peter Easthope
In reply to this post by Alan Corey
From: Paul Wise <[hidden email]>
Date: Thu, 7 Apr 2016 13:07:06 +0800
> There are several ways to have Debian under Android:
>
> https://wiki.debian.org/ChrootOnAndroid

OK, thanks.  I've also found https://www.debian.org/ports/arm/ .

A naive approach is to attempt installation of debian armel or armhf
or arm64 or similar, using using one of the apps, "Linux Deploy"
and "Complete Linux Installer".  

Inadvisable? Feasible?

Thanks,                 ... Peter E.









--
123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Tel +1 360 639 0202
http://easthope.ca/Peter.html Bcc: peter at easthope. ca

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Peter Easthope
In reply to this post by Paul Wise via nm
I've truncated the references.  They can always be traced in the index page.

From: Paul Wise <[hidden email]>
Date: Fri, 8 Apr 2016 14:01:47 +0800
> ... each device vendor had their own boot mechanisms. More recently UEFI/ACPI
> have emerged as the standard boot mechanism for ARM servers so we may
> see that on mobile too at some point. At the same time, mobile devices
> have a life span of a couple of years due to the way people get them
> on phone network contracts. ...

In summary, a moving target of proprietary hardware can
not be tracked effectively by a community of volunteers,
enthusiastic and energetic as they are.  A necessary
condition for the communal approach is a relatively stable
open hardware specification.  Some years hence, an ISO
standard handy or tablet might be possible.  Probably cell
support should be ignored until significant progress with
the "carrier contract" problem.

No thoughts about the original topic?  More specifically,
"... installation of debian armel or armhf or arm64 or
similar, using one of the apps, "Linux Deploy" and "Complete
Linux Installer"."

Regards,                 ... Peter E.


--
123456789 123456789 123456789 123456789 123456789 123456789 123456789 12
Tel +1 360 639 0202
http://easthope.ca/Peter.html Bcc: peter at easthope. ca

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Paul Wise via nm
In reply to this post by Alan Corey
On Fri, Apr 8, 2016 at 11:13 PM, Alan Corey wrote:

> Does build.prop do any good toward a device list?

Completely unrelated to the Linux kernel as far as I can tell.

> For that matter I'm not sure where a build.prop comes from, my guess
> is an output from the kernel build telling what options were selected.

Seems to be more like an Android OS build than Linux kernel build.

--
bye,
pabs

https://wiki.debian.org/PaulWise

Reply | Threaded
Open this post in threaded view
|

Re: a Debian executable on Android

Paul Wise via nm
In reply to this post by Peter Easthope
On Sat, Apr 9, 2016 at 10:57 PM, Peter Easthope wrote:

> In summary, a moving target of proprietary hardware can
> not be tracked effectively by a community of volunteers,
> enthusiastic and energetic as they are.  A necessary
> condition for the communal approach is a relatively stable
> open hardware specification.  Some years hence, an ISO
> standard handy or tablet might be possible.  Probably cell
> support should be ignored until significant progress with
> the "carrier contract" problem.

Most of the Linux kernel community are employees not volunteers these
days, but yes, there isn't the right combination of skills, motivation
and time to do this for every piece of ARM mobile hardware. The
modularisation approach taken by Fairphone and Motorola/Google
(Project Ara) may lead to some standardisation of some sort, we will
see.

> No thoughts about the original topic?  More specifically,
> "... installation of debian armel or armhf or arm64 or
> similar, using one of the apps, "Linux Deploy" and "Complete
> Linux Installer"."

Those sound exactly like the apps on the ChrootOnAndroid wiki page
that I linked to in the second post in this thread. Indeed, "Linux
Deploy" is even linked from the wiki page. "Complete Linux Installer"
appears to be proprietary though so no-one added it.

--
bye,
pabs

https://wiki.debian.org/PaulWise

12