Merge pull request #50 from martin-a-brown/master

updated Linux-Android-HOWTO.sgml (from author) and retiring old LFS from tree
This commit is contained in:
Martin A. Brown 2016-03-21 16:26:38 -07:00
commit da3f57719d
1268 changed files with 79 additions and 43 deletions

View File

@ -88,6 +88,33 @@ 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
equipment; or just tips. Equipment is preferred :-)
<p>
Currently, the majority of Android devices are ARM based; others are
based on x86 or MIPS CPUs, in both 32 and 64 bit flavours. This is not
a significant difference: most applications are written in Java with
no native code, so they are CPU-agnostic. Instructions in this HOWTO
should work for these Android versions, too. I guess that relevant
differences concern security policies.
<p>
Should you have trouble with your Android device, I suggest that you
refer to Android forums. Among the many available, I find the
following especially helpful:
<itemize>
<item> <htmlurl url="http://forum.xda-developers.com/"
name="http://forum.xda-developers.com/">
<item> <htmlurl url="http://forums.androidcentral.com/"
name="http://forums.androidcentral.com/">
</itemize>
<p>
Besides: if you find any error in this guide, please report them to
me.
<p>
Thoughout this HOWTO, all instances of ``Linux'' actually mean
``GNU/Linux''. The GNU part is very important, and I'm very grateful
@ -111,11 +138,11 @@ on. Nothing special, really: in general, you'll have to be able to
find out where options are in your device. I would be glad to provide
information, but unfortunately no identical menus or screens can be
found across different devices of different brands and different
Android reseases. You will have to figure it out yourself.
Android releases. You will have to figure it out yourself.
<p>
Finally: rooting your device might be desirable, but it's not
necessary as long as this HOWTO is concerned. Root permissions are
necessary as far as this HOWTO is concerned. Root permissions are
normally forbidden in Android, unless an enlightened vendor decides
otherwise. I will mention a great program that needs root access
(Webkey), but the rest of recommended software will not need it. By
@ -246,8 +273,8 @@ Some devices may also need this additional step:
<tscreen>
<verb>
Linux:~$ mkdir .android
echo "0X1E68" >> .android/adb_usb.ini
Linux:~$ mkdir $HOME/.android
echo "0X1E68" >> $HOME/.android/adb_usb.ini
</verb>
</tscreen>
@ -307,7 +334,7 @@ Connect your Andbox and run the <tt>adb shell</tt> command, which
launches Android's internal shell. Please be aware that Android's
native shell is much less sophisticated than <tt>bash</tt>; available
commands are not made by GNU either, so you should expect minor
differences. That said, there you are:
differences.
<tscreen>
<verb>
@ -351,7 +378,7 @@ devices.
<p>
Now run the <tt>mount</tt> command, to see what devices correspond to
what directories:
what directories (line-broken for readability):
<tscreen>
<verb>
@ -368,25 +395,25 @@ tmpfs /mnt/asec tmpfs rw,relatime,mode=755,gid=1000 0 0
tmpfs /mnt/obb tmpfs rw,relatime,mode=755,gid=1000 0 0
none /dev/cpuctl cgroup rw,relatime,cpu 0 0
/dev/block/platform/sdhci-tegra.3/by-num/p3 /system ext4 \
ro,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
ro,relatime,user_xattr,acl,barrier=1,data=ordered 0 0
/dev/block/platform/sdhci-tegra.3/by-num/p7 /data ext4 \
rw,nosuid,nodev,noatime,errors=panic,user_xattr,acl,barrier=1,\
journal_async_commit,nodelalloc,data=ordered 0 0
rw,nosuid,nodev,noatime,errors=panic,user_xattr,acl,barrier=1,\
journal_async_commit,nodelalloc,data=ordered 0 0
/dev/block/platform/sdhci-tegra.3/by-num/p4 /cache ext4 \
rw,nosuid,nodev,noatime,errors=panic,user_xattr,acl,barrier=1,\
journal_async_commit,nodelalloc,data=ordered 0 0
rw,nosuid,nodev,noatime,errors=panic,user_xattr,acl,barrier=1,\
journal_async_commit,nodelalloc,data=ordered 0 0
/dev/block/vold/179:8 /mnt/sdcard vfat \
rw,dirsync,nosuid,nodev,noexec,relatime,gid=1015,fmask=0002,\
dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,\
shortname=mixed,utf8,errors=remount-ro 0 0
rw,dirsync,nosuid,nodev,noexec,relatime,gid=1015,fmask=0002,\
dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,\
shortname=mixed,utf8,errors=remount-ro 0 0
/dev/block/vold/179:8 /mnt/secure/asec vfat \
rw,dirsync,nosuid,nodev,noexec,relatime,gid=1015,fmask=0002,\
dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,\
shortname=mixed,utf8,errors=remount-ro 0 0
rw,dirsync,nosuid,nodev,noexec,relatime,gid=1015,fmask=0002,\
dmask=0002,allow_utime=0020,codepage=cp437,iocharset=iso8859-1,\
shortname=mixed,utf8,errors=remount-ro 0 0
tmpfs /mnt/sdcard/.android_secure tmpfs ro,relatime,size=0k,mode=000 0 0
/dev/block/dm-0 /mnt/asec/com.collabora.libreoffice-2 vfat \
ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,\
codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
ro,dirsync,nosuid,nodev,relatime,uid=1000,fmask=0222,dmask=0222,\
codepage=cp437,iocharset=iso8859-1,shortname=mixed,utf8,errors=remount-ro 0 0
shell@android:/ $ _
</verb>
</tscreen>
@ -402,13 +429,13 @@ only access the internal storage, usually mounted on
<tt>/mnt/sdcard</tt>, and the external storage (if available), usually
mounted on <tt>/mnt/external_sd</tt>. The actual names of these
directories may vary; e.g. <tt>/storage/sdcard0</tt> or something
else. Find it out.
else. You'll probably have to figure it out for each device.
<p>
User data, programs included, is stored in <tt>/data</tt>. Using the
User data, programs included, are stored in <tt>/data</tt>. Using the
Android shell you can <tt>cd</tt> to that directory, but you can't
list its contents as you lack root permissions. Programs are usually
stored in <tt>/data/app</tt>, others (typically, paid programs and
list its contents if you lack root permissions. Programs are usually
stored in <tt>/data/app</tt>, but others (typically, paid programs and
programs moved to the external storage) under <tt>/mnt/asec</tt>.
<p>
@ -435,7 +462,7 @@ VFAT; directory names are therefore case-insensitive.
<itemize>
<item><tt>Android/data/</tt> contains directories containing
<item><tt>Android/data/</tt> contains directories with
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">.
@ -646,7 +673,8 @@ Linux:~$ _
<p>
An Andbox can easily share its installed programs with another
device, provided that the Android versions are compatible. All you
need is Ghost Commander.
need is Ghost Commander. In the next paragraph, you can see how to
send a file to Alice using Bob's Andbox.
<p>
From the ``Home'' position, select ``Applications'' to get a list of
@ -676,7 +704,7 @@ Andbox, using a cable or Wi-Fi.
<!-- ----- -->
<sect1>Copying via USB cable
<sect1>Copying via USB cable (from Linux box)
<p>
When you connect your device via USB cable, Linux may see it either as
@ -779,7 +807,7 @@ of the command: it's not the same as the Linux command <tt>cp
<!-- - - - -->
<sect1>Syncing directories
<sect1>Syncing directories (from Linux box)
<p>
If you want to keep a directory synchronised between the Linux box and
@ -828,12 +856,12 @@ Linux:~$ _
<!-- - - - -->
<sect1>Sorting files: <tt>fatsort</tt>
<sect1>Sorting files: <tt>fatsort</tt> (from Linux box)
<p>
Let's suppose you copied a bunch of music files to your device. You
run your music player and open the directory containig the files.
Surprise: they're not sorted, and are displayed in (apparent) random
run your music player and open the directory containing the files.
Surprise: they're not sorted, and are displayed in (apparently) random
order!
<p>
@ -901,7 +929,7 @@ but the above works and is reasonably safe.
<!-- - - - -->
<sect1>Copying files via FTP server
<sect1>Copying files from an Andbox FTP server
<p>
This is the most traditional way to upload and download files to/from
@ -956,7 +984,7 @@ Linux:~$ _
<!-- - - - -->
<sect1>Copying files via web server
<sect1>Copying files from an Andbox web server
<p>
Another way of getting files from your Andbox is making it a Web
@ -993,8 +1021,8 @@ come in handy.
<sect1>Backing up applications
<p>
Applications are stored in <tt>/data/apps/</tt>, which you can't
acccess on unrooted devices. Nevertheless, you can backup your
Installed applications are stored in <tt>/data/apps/</tt>, which is
inaccessible on unrooted devices. You can, however, backup your
<tt>.apk</tt> files using Ghost Commander or the <tt>adb backup</tt>
command. I prefer the former, which is way faster and more convenient
(IMHO).
@ -1404,7 +1432,8 @@ kbox$ _
<p>
Once you have a terminal emulator, you can add a lot of command-line
based software to your Android box. If you're a geek, this is an
invaluable extension; but even if you're a casual user, please read on.
invaluable extension that makes your Andbox closer to a ``real''
computer ; but even if you're a casual user, please read on.
<p>
You can compile C programs both on your Andbox and, obviously,
@ -1424,7 +1453,12 @@ toolchain from the NDK home page:
name="http://developer.android.com/ndk/downloads/index.html">
<p>
Download the binary package for Linux 32-bit or 64-bit. The directory
Another toolchain that targets Android on x86 CPUs is called
<tt>gcc-arm-linux-androideabi</tt>.
<p>
Choose the relevant architecture and download the binary package for
Linux 32-bit or 64-bit. The directory
<tscreen><verb>
toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86/bin/
@ -1432,12 +1466,13 @@ toolchains/arm-linux-androideabi-4.9/prebuilt/linux-x86/bin/
<p>
contains prebuilt binaries: include that directory in the
<tt>$PATH</tt>.
<tt>$PATH</tt>. MIPS and x86 binaries are also available.
<p>
The compiler is called <tt>arm-linux-androideabi-gcc</tt>. You use it
instead of <tt>gcc</tt> to compile Android binaries. In general, all
binutils have a <tt>arm-linux-androideabi-</tt> prefix.
Supposing you're compiling for ARM, the compiler is called
<tt>arm-linux-androideabi-gcc</tt>. You use it instead of <tt>gcc</tt>
to compile Android binaries. In general, all binutils have a
<tt>arm-linux-androideabi-</tt> prefix.
<tscreen>
<verb>
@ -1597,7 +1632,7 @@ gcc: no input files
<p>
That's it! From now on, you can compile programs directly on your
Android box. Don't expect to be able to compile anything, though.
Android box. Don't expect to be able to compile every single, though.
<!-- - - - -->
@ -1853,7 +1888,7 @@ user interface!
<sect>Taking screenshots and screencasts
<p>
Some Anddroid versions let the user take a screenshot natively,
Some Android versions let the user take a screenshot natively,
usually holding the Power and Volume Down buttons together. For all
others, there's DroidAtScreen:
@ -1982,7 +2017,7 @@ 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 Andbox into something even more useful, and how to interact with it using
your trusted GNU/Linux machine.
<p>
@ -2022,3 +2057,4 @@ Enjoy,
<tt>&nbsp;&nbsp;&nbsp;&nbsp;</tt>Guido <tt>=8-)</tt>
</article>

Some files were not shown because too many files have changed in this diff Show More