Switch branches/tags
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
71 lines (58 sloc) 2.82 KB
/system/ directory build instructions
The /system/ directory available on the dory platform and provided in prebuilt
form by 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 rebuild manually your own /system dir.
We first need to adb pull a /system directory from a living Android Wear 5.1.1
installation and then modify it with some symlinks:
adb pull /system/ system
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
cd ../../../lib/hw/
ln -s
ln -s
ln -s
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)
### Download
curl > repo
chmod a+x repo
mkdir -p android-dory/
cd android-dory
# For now the repo manifest is pretty much dory-specific, maybe we should
# split/merge branches later?
../repo init -u
../repo sync
### Build (can only be done in bash)
. build/
export TARGET_USES_C2D_COMPOSITION=true # Needed by copybit
export TARGET_USES_QCOM_BSP=true # Fixes GPU problems on QCOM platforms
export TARGET_BOARD_PLATFORM=msm8226 # We Specify the SoC by hand
mmma hardware/qcom/display/msm8226/ # hwcomposer, gralloc, dependencies...
mmma frameworks/native/cmds/servicemanager/
mmma system/core/logd/
mmma system/core/init/
If you get an error like "linux/msm_kgsl.h: No such file or directory", edit
hardware/qcom/display/msm8226/ and add this line:
common_includes += $(LOCAL_PATH)/../../../msm8x26/kernel-headers/
### 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
./libhybris/utils/ android-dory include
With the system and include directories, you can create the system-dir tarball:
tar zcvf system.tar.gz system include