6
echo must run from top-level directory;
10
if [ ! -d platform-hardware-libhardware ]; then
11
git clone --depth 1 https://android.googlesource.com/platform/frameworks/native platform-frameworks-native
12
git clone --depth 1 https://android.googlesource.com/platform/hardware/libhardware platform-hardware-libhardware
13
git clone --depth 1 https://android.googlesource.com/platform/system/core platform-system-core
14
git clone --depth 1 https://android.googlesource.com/platform/system/logging platform-system-logging
15
git clone --depth 1 https://android.googlesource.com/platform/system/unwinding platform-system-unwinding
18
dest=include/android_stub
20
# Persist the frozen Android N system/window.h for backward compatibility
22
cp -av ${dest}/system/window.h platform-system-core/libsystem/include/system
28
# These directories contains mostly only the files we need, so copy wholesale
31
platform-frameworks-native/libs/nativewindow/include/vndk \
32
platform-frameworks-native/libs/nativebase/include/nativebase \
33
platform-system-core/libsync/include/ndk \
34
platform-system-core/libsync/include/sync \
35
platform-system-core/libsystem/include/system \
36
platform-system-logging/liblog/include/log \
37
platform-system-unwinding/libbacktrace/include/backtrace \
41
# We only need a few files from these big directories so just copy those
43
mkdir ${dest}/hardware
44
cp -av platform-hardware-libhardware/include/hardware/{hardware,gralloc,gralloc1,fb}.h ${dest}/hardware
45
cp -av platform-frameworks-native/vulkan/include/hardware/hwvulkan.h ${dest}/hardware
48
cp -av platform-system-core/libcutils/include/cutils/{compiler,log,native_handle,properties,trace}.h ${dest}/cutils
51
# include/android has files from a few different projects
55
platform-frameworks-native/libs/nativewindow/include/android/* \
56
platform-frameworks-native/libs/arect/include/android/* \
57
platform-system-core/libsync/include/android/* \
58
platform-system-logging/liblog/include/android/* \