Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
84 lines (65 sloc) 3.16 KB
/system/ directory build instructions
=====================================
The /system directory we use for AsteroidOS is a tricky mix of an original
Android Wear /system and some recompiled parts. This is due to the half-closed
nature of Android Wear. This file explains you how to build the /system dir for
AsteroidOS.
We first need to adb pull a /system directory from a living Android Wear
installation:
adb pull /system/ system
Some files might not be readable for the adb process. Depending on your device,
you might also need files that are not readable with adb. Hence, you might have
to boot a prebuilt AsteroidOS or custom Linux image with root privileges to
transfer all files.
WARNING: If you do so, ensure that you mount the /system partition read-only as
this partition is cryptographically signed in newer Androids and simply mounting
the partition (without modifying any files!) will prevent booting Android Wear
after a reboot.
If you have a /system copy with the required files, execute:
cd system/
rm -rf app/ fonts/ framework/ media/ priv-app/ xbin/
sed -i "/persist.hwc.mdpcomp.enable=true/d" build.prop
cd vendor/lib/egl/
ln -s libGLESv2_adreno.so libGLESv2S3D_adreno.so
cd ../../../lib/hw/
ln -s hwcomposer.msm8226.so hwcomposer.dory.so
ln -s gralloc.msm8226.so gralloc.dory.so
ln -s memtrack.msm8226.so memtrack.dory.so
cd ../../../
This installation wouldn't be enough because libhybris needs a patched bionic
and the GPU drivers also need to be recompiled on the QCOM platform with the
QCOM_BSP flag. Thankfully, those specific parts are open-source so we can
download and then build them (this may take a while):
curl https://storage.googleapis.com/git-repo-downloads/repo > repo
chmod a+x repo
mkdir -p android-swift/
cd android-swift
# For now the repo manifest is pretty much swift-specific, maybe we should
# split/merge branches later?
../repo init -u https://github.com/AsteroidOS/android_manifest \
-b marshmallow-dr1.5-release -g all,-notdefault,-darwin,-mips --depth=1
../repo sync -qc
### Build (can only be done in bash)
. build/envsetup.sh
export TARGET_USES_QCOM_BSP=true # Fixes GPU problems on QCOM platforms
export TARGET_BOARD_PLATFORM=msm8909 # We Specify the SoC by hand
### for a debug build, also set:
# export TARGET_BUILD_VARIANT=userdebug
# export TARGET_BUILD_TYPE=debug
mmma hardware/qcom/display/msm8909/ # hwcomposer, gralloc, dependencies...
mmma frameworks/native/cmds/servicemanager/
mmma system/core/logd/
mmma system/core/init/
### Installation
cp out/target/product/generic/root/init ../system/bin/
cp -r out/target/product/generic/system/* ../system/
chmod +x ../system/bin/*
libhybris headers
=================
The second part of this tarball contains header files to compile against
libhybris. There is a script in the libhybris distribution that can pull
the header files from the downloaded android distribution (above).
git clone https://github.com/libhybris/libhybris
./libhybris/utils/extract_headers.sh android-swift include 6 0 1
With the system and include directories, you can create the system-dir tarball:
tar zcvf system.tar.gz system include