forked from AsteroidOS/meta-smartwatch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathREADME-system-dir
48 lines (38 loc) · 1.71 KB
/
README-system-dir
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/system/ directory build instructions
=====================================
The /system/ directory available on the mooneye platform and provided in
prebuilt form by android_mooneye-lp.bb is a tricky mix of an original WearOS
/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 WearOS 8.0.0
installation and then modify it with some symlinks:
adb pull /system/ system
cd system/
rm -rf app/ fake-libs fonts/ framework/ media/ priv-app/
This installation wouldn't be enough because libhybris needs a patched bionic.
Thankfully, this part is open-source so we can download and recompile it. (This
may take a while)
### Download
curl https://storage.googleapis.com/git-repo-downloads/repo > repo
chmod a+x repo
mkdir -p android-o/
cd android-o
../repo init -u https://github.com/AsteroidOS/android_manifest -b android-wear-8.0.0_r1
../repo sync
### Build (can only be done in bash)
. build/envsetup.sh
mmma bionic
### 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-dory include
With the system and include directories, you can create the system-dir tarball:
tar zcvf system.tar.gz system include