To understand Droid Overlay internal structure you should have good knowledge of following principles:
Following concepts are useful, but not crucial:
Following two terms will be used from now on:
Android system which Droid Overlay is installed on.
GNU/Linux computer, running cross toolchain.
Software under FSF-approved free licenses (sorry, BSD).
Android lacks many thing, including spirit of freedom, free drivers and even descent C library. Despite this facts it is still the most popular handheld OS, mainly due to rich and well documented API, several clever design choices and effective marketing. This makes it the most suitable for it's main target auditory - application developers. Droid Overlay project is based on acceptance of this truth. It aims at fulfilling wishes of the rest of Android userbase: casual users, wishing for cheap and high-quality software and hackers, who want to use their devices for more advanced activities.
Historically-proven way to fulfill aforementioned goals is creation of GNU distribution. Unlike already existing ports of various distribution to ARM platform Droid Overlay acknowledges lack of free hardware drivers and impossibility of sharing proprietary driver code between different versions of Linux kernel. It attempts to work around this limitation by delegation of such task to existing system (Android) and creation of independent file hierarchy, containing userspace-only GNU distribution. Note, that due to tolerable difference between Android and mainline kernel, it could be theoretically possible to create and use dynamically-loadable kernel modules, but such use-case is still to be explored.
Visible simplicity of described solution resulted in several independent attempts to adopt described approach. All of them has at least one of following disadvantages:
Humorously Android itself is subject to 3rd, 4th and occasionally 2nd issues. There are several more-or-less obvious reasons for such situation:
This issue is logically derived from enforced usage of managed code and can only be resolved by porting of all GNU software starting from C library level.
This issue is caused by freedom to build any possible layout, granted to device manufacturers by Google. They are not obligated to follow File Hierarchy Standard or any other common layout and use this freedom quite often. Application developers should get all fixed paths, including location of Android OS tree (usually it is in /system) from managed APIs in android.os.Environment.
This issue can not be resolved. It is completely ignored by Droid Overlay. In particular, DRM-ed devices, which does not allow owner to gain root access would not be officially supported.
In order to coexist with arbitrary file hierarchy Droid Overlay, in somewhat similar manner to Gentoo Prefix, attempts to install it's files into fixed FHS-compatible subtree. This is achieved by using sysroot and installation prefix. Majority of GNU software have such support or it can be added easily. Created system can share some file with parent system by using symbolic links. Attempt to reuse existing libraries (at least OpenGL ES and several other, documented as part of public API) meets several obstacles:
All these problems may be potentially solved by using multilib and other workarounds, but those won't be implemented on initial stages of project.
In order to use more up-to-date software and simplify transition between versions Droid Overlay derives it's packages from Arch Linux ARM package base. In turn most ALARM packages are based on ones from Arch Linux. Unfortunately Droid Overlay have to modify some Arch Linux packages, but there is ongoing work to reduce this number.
Droid Overlay does not modify Arch Linux package creation/management tools, but instead uses wrappers to make cross-compilation and side-by-side installation of created packages possible. These wrappers use separate configuration files, set number of shell variables, including $PATH and $CC, and use other means to avoid genuine PKGBUILD modification.