mirror of https://github.com/tLDP/LDP
Merge pull request #45 from martin-a-brown/master
updated Linux-Android-HOWTO.sgml (from author)
This commit is contained in:
commit
5c46d3423f
|
@ -4,7 +4,7 @@
|
|||
|
||||
<title>Linux and Android HOWTO</title>
|
||||
<author>Guido Gonzato, Ph.D. <tt>guido.gonzato at gmail.com</tt>
|
||||
<date>October 2015, version 0.0
|
||||
<date>March 2016, version 0.0
|
||||
|
||||
<abstract>
|
||||
This HOWTO provides information on how to manage your Android device
|
||||
|
@ -29,9 +29,9 @@ widespread Linux distribution, even though most of its users don't
|
|||
even know they're using Linux!
|
||||
|
||||
<p>
|
||||
(A pocket-size Unix system for less than 100 bucks. Amazing! If they'd
|
||||
told me about it in the early '90s, I would have dismissed it as cheap
|
||||
science fiction.)
|
||||
(A pocket-size Unix system that one can get for less than 100 bucks.
|
||||
Amazing! If they'd told me about it in the early '90s, I would have
|
||||
dismissed it as cheap science fiction.)
|
||||
|
||||
<p>
|
||||
I purchased an Android phone and a mid-spec Android tablet, and I
|
||||
|
@ -65,7 +65,7 @@ root permissions, as you would do in Linux with <tt>sudo</tt>.
|
|||
|
||||
Since Android is very fragmented (hey, it's Linux after all!) and
|
||||
several versions are available, I'll just provide information that is
|
||||
applicable to what I own: Android 4.0.4 and 4.1.1, on ARM
|
||||
applicable to what I own: Android 4.0.4, 4.1.1, and 5.0.1 on ARM
|
||||
architecture. All examples and code in this HOWTO were actually tested
|
||||
on my devices; hopefully, they should work on your device too. If you
|
||||
want me to cover more Android versions, I'll be glad to receive new
|
||||
|
@ -167,7 +167,8 @@ least with the following options:
|
|||
Before using the <tt>adb</tt> commands, you must make your Andbox
|
||||
visible to the Linux box. Enable USB debugging on your device and
|
||||
connect it via USB cable to your Linux host; the Andbox will probably
|
||||
make a sound and/or flash the screen. Issue this command:
|
||||
make a sound and/or flash the screen and/or ask for your permission.
|
||||
Issue this command:
|
||||
|
||||
<tscreen>
|
||||
<verb>
|
||||
|
@ -181,9 +182,9 @@ List of devices attached
|
|||
|
||||
<p>
|
||||
If you don't see any output after ``List of devices attached'', or if
|
||||
a row of ? is displayed, some steps and some patience are required to
|
||||
make your device visible. First of all, find out your device's Vendor
|
||||
ID and Product ID:
|
||||
a row of `<tt>?</tt>' is displayed, some steps and some patience are
|
||||
required to make your device visible. First of all, find out your
|
||||
device's Vendor ID and Product ID:
|
||||
|
||||
<tscreen>
|
||||
<verb>
|
||||
|
@ -420,7 +421,8 @@ VFAT; directory names are therefore case-insensitive.
|
|||
programs' user data. Each directory is named after the application,
|
||||
using a naming convention that will be explained in Section <ref
|
||||
id="programs" name="Installing/Uninstalling Programs from Linux">.
|
||||
For example, Firefox settings are in <tt>org.mozilla.firefox/</tt>.
|
||||
For example, Firefox settings are stored in
|
||||
<tt>org.mozilla.firefox/</tt>.
|
||||
|
||||
<item><tt>Download/</tt> may contain files downloaded by browsers,
|
||||
unless they're configured otherwise.
|
||||
|
@ -639,15 +641,15 @@ If your device refuses to send a <tt>.apk</tt> file via Bluetooth,
|
|||
just rename or zip it before sending it, then unpack it or rename it
|
||||
back on the new device.
|
||||
|
||||
<!-- ----- -->
|
||||
<!-- - - - -->
|
||||
|
||||
<sect>Copying files
|
||||
<label id="copying">
|
||||
|
||||
<p>
|
||||
Exchanging files between Linux and Android should be trivial, right?
|
||||
Well, it's not: read on. There are several ways to copy files from/to
|
||||
your Andbox, using a cable or Wi-Fi.
|
||||
Well, it's not. There are several ways to copy files from/to your
|
||||
Andbox, using a cable or Wi-Fi.
|
||||
|
||||
|
||||
<!-- ----- -->
|
||||
|
@ -1113,9 +1115,12 @@ KBOX: it's a very good compromise.
|
|||
<sect1>Installing KBOX
|
||||
|
||||
<p>
|
||||
Even though the latest version is KBOX3, I installed KBOX2, as my
|
||||
Andboxes have an old-ish Android version. Installing KBOX3 is very
|
||||
similar.
|
||||
Whether to install KBOX2 or KBOX3 depends on your Andbox' Android
|
||||
version. I installed KBOX2 on two of my Andboxes, which run Android
|
||||
4.*, and KBOX3 on my new phone. In the following, I'll show how to
|
||||
install KBOX2; installing KBOX3 is very similar. Try KBOX3 first; if
|
||||
you get a segmentation fault running the KBOX3 installer, then try
|
||||
with KBOX2.
|
||||
|
||||
<p>
|
||||
Download the base installer, called <tt>kbox2-base-installer</tt> or
|
||||
|
@ -1145,10 +1150,9 @@ KBOX shell is /data/data/jackpal.androidterm/app_HOME/kbox2/bin/kbox_shell
|
|||
</tscreen>
|
||||
|
||||
<p>
|
||||
(If you get a segmentation fault running the KBOX3 installer, then try
|
||||
with KBOX2). If installation succeeds, you can replace the standard
|
||||
Android shell with KBOX's. Open the Terminal Emulator preferences,
|
||||
select ``Command line'', and change:
|
||||
If installation succeeds, you can replace the standard Android shell
|
||||
with KBOX's. Open the Terminal Emulator preferences, select ``Command
|
||||
line'', and change:
|
||||
|
||||
<p>
|
||||
<tt>/system/bin/sh -</tt>
|
||||
|
@ -1182,13 +1186,19 @@ provided by Busybox. If you want to access the Android file system,
|
|||
you'll find it under the <tt>/android_root</tt> directory.
|
||||
|
||||
<p>
|
||||
You may want to install additional software from KBOX home page:
|
||||
You may want to install additional software from KBOX home page.
|
||||
Depending on your KBOX version, either link:
|
||||
|
||||
<p>
|
||||
<htmlurl
|
||||
url="http://kevinboone.net/kbox2_downloads.html"
|
||||
name="http://kevinboone.net/kbox2_downloads.html">
|
||||
|
||||
<p>
|
||||
<htmlurl
|
||||
url="http://kevinboone.net/kbox3_downloads.html"
|
||||
name="http://kevinboone.net/kbox3_downloads.html">
|
||||
|
||||
<p>
|
||||
Additional programs are provided as <tt>.deb</tt> packages. This is
|
||||
the very same format used by Debian and many other Linux
|
||||
|
@ -1298,7 +1308,7 @@ used instead of the command-line ftp client.
|
|||
<p>
|
||||
In addition to local shells, you can open a shell on your device
|
||||
remotely, via <tt>ssh</tt>; you will need a <tt>ssh</tt> server on the
|
||||
Andbox. Such server is SSHelper:
|
||||
Andbox. Such server is SSHelper (free software, GPL'ed):
|
||||
|
||||
<p>
|
||||
<htmlurl
|
||||
|
@ -1410,7 +1420,8 @@ and supports file permissions: <tt>/data/local/tmp</tt>. Unlike the
|
|||
deleted at boot time.
|
||||
|
||||
<p>
|
||||
Here is how to copy and run your application on the Andbox:
|
||||
Here is how to copy (all Android versions) and run (Android older than
|
||||
5.*) your application on the Andbox:
|
||||
|
||||
<tscreen>
|
||||
<verb>
|
||||
|
@ -1426,6 +1437,25 @@ Linux:~$ _
|
|||
</verb>
|
||||
</tscreen>
|
||||
|
||||
<p>
|
||||
Beware: Android 5.* has better security policies and will not allow
|
||||
running programs from <tt>/data/local/tmp</tt>, or even accessing that
|
||||
directory. From the terminal, you'll have to copy the compiled
|
||||
programs elsewhere. For instance, using KBOX:
|
||||
|
||||
<tscreen>
|
||||
<verb>
|
||||
kbox$ ls /android_root/data/local/tmp
|
||||
ls: cannot open directory /android_root/data/local/tmp: permission denied
|
||||
kbox$ cp /android_root/data/local/tmp/hello .
|
||||
kbox$ ls
|
||||
hello
|
||||
kbox$ ./hello
|
||||
hello, workd!
|
||||
kbox$ _
|
||||
</verb>
|
||||
</tscreen>
|
||||
|
||||
<p>
|
||||
A remarkable list of command-line programs can be compiled for
|
||||
Android. Among others, I ported the Bywater BASIC interpreter:
|
||||
|
@ -1451,7 +1481,7 @@ name="http://abcplus.sourceforge.net/">
|
|||
|
||||
<p>
|
||||
In general, any program that doesn't depend on fancy libraries is
|
||||
immediately portable to Android. Explanations on compiling stuff in
|
||||
readily portable to Android. Explanations on compiling stuff in
|
||||
Android are available here:
|
||||
|
||||
<p>
|
||||
|
@ -1894,30 +1924,32 @@ url="http://www.osmand.net" name="http://www.osmand.net">.
|
|||
<p>
|
||||
Congratulations! You have now some basic information on how to turn
|
||||
your Andbox into something useful, and how to interact with it using
|
||||
your trusted Linux machine.
|
||||
your trusted GNU/Linux machine.
|
||||
|
||||
<p>
|
||||
At the end of this document, I can confess you the truth: while I'm a
|
||||
long-term GNU/Linux fan, I'm afraid I don't really like Android. I
|
||||
find it insanely fragmented, sluggish, laggy; I also believe it
|
||||
suffers from a few fundamental design flaws. Besides, I don't like
|
||||
tablets, all of them. I find way too limited, if compared to a real
|
||||
computer; I'm a sysadmin after all.
|
||||
long-term GNU/Linux fan, I'm afraid I've just started to appreciate
|
||||
Android. I find it insanely fragmented; until recently, it was
|
||||
unacceptably sluggish and laggy; I also believe it still suffers from
|
||||
(at least) a couple of serious design flaws. Besides, I don't like
|
||||
tablets, all of them; I find way too limited, if compared to a real
|
||||
computer. That said, I can say that my 8-core, Android 5.0.1-based
|
||||
phone is quite nice.
|
||||
|
||||
<p>
|
||||
That said, I hope this guide provided some useful information. It's
|
||||
only the beginning: please stay tuned for updates.
|
||||
I hope this guide provided some useful information. It's only the
|
||||
beginning: please stay tuned for updates.
|
||||
|
||||
|
||||
<sect1>Copyleft
|
||||
|
||||
<p>
|
||||
This document is released under the GNU Free Documentation License,
|
||||
obtainable here:
|
||||
This document is released under the GNU Free Documentation License
|
||||
1.3, obtainable here:
|
||||
|
||||
<p>
|
||||
<htmlurl url="https://www.gnu.org/copyleft/fdl.html"
|
||||
name="https://www.gnu.org/copyleft/fdl.html">.
|
||||
<htmlurl url="http://www.gnu.org/licenses/fdl-1.3.html"
|
||||
name="http://www.gnu.org/licenses/fdl-1.3.html">.
|
||||
|
||||
<p>
|
||||
This document is provided ``as is''. I put a great amount of effort
|
||||
|
@ -1931,16 +1963,3 @@ Enjoy,
|
|||
<tt> </tt>Guido <tt>=8-)</tt>
|
||||
|
||||
</article>
|
||||
|
||||
|
||||
<!--
|
||||
|
||||
Ideas:
|
||||
|
||||
- running programs from the command line
|
||||
- installing Debian
|
||||
- VNC server, https://github.com/oNaiPs/droidVncServer/tree/master/bin
|
||||
- controlling autostart
|
||||
|
||||
-->
|
||||
|
||||
|
|
Loading…
Reference in New Issue