Very first prototype of APEX Manager.

The current version looks for .apex files in /data/apex, assumes that
they are sparse images, and mounts them under /mnt/apex/name-of-package.
This is a very first version which takes a few shortcuts, including
using libraries originally intended for vold only. We'll factor those
out separately.

Bug: 112455435
Test: `mm && adb sync` on an emulator with selinux disabled and rw system
`adb shell apexd`

output in logcat:
I apexd   : Scanning /mnt/apex looking for packages already mounted.
D vold    : Disk at 7:0 changed
I apexd   : Creating APEX mount point at /mnt/apex
I apexd   : Scanning /data/apex looking for APEX packages.
I apexd   : Found test-package.apex
I apexd   : Installing /data/apex/test-package.apex
I apexd   : Loopback device created: /dev/block/loop0
I apexd   : Creating mount point: /mnt/apex/test-package
I apexd   : Successfully mounted on /mnt/apex/test-package

Change-Id: I13282894ff850c96f4903f86e105d96d2f07955d
3 files changed
tree: f37f0e7f3f8ddb49bb97e129c3cac1b4254949dc
  1. apexd/