- VesperProfileBinderService + main_android.cpp: real Android AIDL Binder service backing IVesperProfileService, wired into Android.bp's srcs (previously declared but never implemented). - SignatureVerifier: real CMS verification on Android too, via a vendored static OpenSSL (see third_party/openssl-android/README.md) since BoringSSL has no CMS/PKCS#7 support. - ProfileStore: Android-appropriate data paths. - Every payload handler split into src/platform/<Name>.h (shared contract) + src/platform/linux/<Name>.cpp + src/platform/android/<Name>.cpp, so the build system picks the platform instead of #ifdef. Android side is an honest "not implemented yet" stub per handler, logged rather than silent. - content-cache payload + handler: PawletOS-fork-specific, talks to PawletCache/pawletcache-server. Not part of vesperprofiled's own upstream default.
113 lines
4.4 KiB
Plaintext
113 lines
4.4 KiB
Plaintext
// vendor/oxmc/vesperprofiled/Android.bp
|
|
// ─────────────────────────────────────────────────────────────────────────
|
|
// Drop this entire directory at vendor/oxmc/vesperprofiled/ and add
|
|
// "vesperprofiled" to PRODUCT_PACKAGES in your device makefile.
|
|
//
|
|
// m vesperprofiled — build the daemon
|
|
// m me.oxmc.vesperos.profile-V1-java — build Java stubs for system apps
|
|
// ─────────────────────────────────────────────────────────────────────────
|
|
|
|
// ── AIDL interface ────────────────────────────────────────────────────────
|
|
|
|
aidl_interface {
|
|
name: "me.oxmc.vesperos.profile",
|
|
srcs: ["aidl/me/oxmc/vesperos/profile/IVesperProfileService.aidl"],
|
|
stability: "vintf",
|
|
vendor_available: false,
|
|
backend: {
|
|
ndk: {
|
|
enabled: true,
|
|
},
|
|
java: {
|
|
enabled: true,
|
|
sdk_version: "system_current",
|
|
},
|
|
cpp: {
|
|
enabled: false,
|
|
},
|
|
},
|
|
versions: ["1"],
|
|
}
|
|
|
|
// ── Vendored OpenSSL (Android-only, static, this binary only) ─────────────
|
|
// See third_party/openssl-android/README.md — BoringSSL (the system
|
|
// libcrypto/libssl) has no CMS/PKCS#7 support, so SignatureVerifier.cpp
|
|
// links a private static copy instead of touching the platform's crypto
|
|
// libs. third_party/openssl-android/Android.bp is picked up automatically
|
|
// by Soong's normal recursive discovery — nothing to reference here beyond
|
|
// the module names ("libssl_vesper_static" / "libcrypto_vesper_static")
|
|
// used in static_libs below.
|
|
|
|
// ── Native daemon ─────────────────────────────────────────────────────────
|
|
//
|
|
// This file is the Android/Soong build only — the Linux/D-Bus build lives
|
|
// in CMakeLists.txt and is entirely separate. Accordingly the source list
|
|
// below is the Android-specific set: main_android.cpp (Binder entry point)
|
|
// and VesperProfileBinderService.cpp instead of main.cpp/VesperProfileService.cpp
|
|
// (D-Bus), and no ZTE client (it watches NetworkManager over D-Bus, which
|
|
// doesn't exist on Android — separate follow-up work, see main_android.cpp's
|
|
// header comment).
|
|
|
|
cc_binary {
|
|
name: "vesperprofiled",
|
|
|
|
srcs: [
|
|
"src/main_android.cpp",
|
|
"src/VesperProfileBinderService.cpp",
|
|
"src/ProfileParser.cpp",
|
|
"src/ProfileStore.cpp",
|
|
"src/SignatureVerifier.cpp",
|
|
"src/payloads/PayloadHandlers.cpp", // shared dispatch — see its header comment
|
|
"src/platform/android/Wifi.cpp",
|
|
"src/platform/android/Ethernet.cpp",
|
|
"src/platform/android/Vpn.cpp",
|
|
"src/platform/android/Cert.cpp",
|
|
"src/platform/android/Pkcs12.cpp",
|
|
"src/platform/android/Passcode.cpp",
|
|
"src/platform/android/Mdm.cpp",
|
|
"src/platform/android/SoftwareUpdate.cpp",
|
|
"src/platform/android/TimeServer.cpp",
|
|
"src/platform/android/Proxy.cpp",
|
|
"src/platform/android/DnsProxy.cpp",
|
|
"src/platform/android/Firewall.cpp",
|
|
"src/platform/android/Ldap.cpp",
|
|
"src/platform/android/Wallpaper.cpp",
|
|
"src/platform/android/Screensaver.cpp",
|
|
"src/platform/android/FirstBoot.cpp",
|
|
"src/platform/android/ContentCache.cpp",
|
|
],
|
|
|
|
shared_libs: [
|
|
"libbinder_ndk",
|
|
"libbase",
|
|
"liblog",
|
|
"me.oxmc.vesperos.profile-V1-ndk",
|
|
],
|
|
|
|
static_libs: [
|
|
"libyaml",
|
|
"libssl_vesper_static",
|
|
"libcrypto_vesper_static",
|
|
],
|
|
|
|
cflags: [
|
|
"-Wall",
|
|
"-Wextra",
|
|
"-Werror",
|
|
"-std=c++17",
|
|
],
|
|
|
|
init_rc: ["vesperprofiled.rc"],
|
|
vintf_fragments: ["vesperprofiled.xml"],
|
|
|
|
required: ["vesperprofiled_sepolicy"],
|
|
}
|
|
|
|
// ── SELinux policy shim ───────────────────────────────────────────────────
|
|
|
|
prebuilt_etc {
|
|
name: "vesperprofiled_sepolicy",
|
|
src: "sepolicy/vesperprofiled.te",
|
|
sub_dir: "selinux",
|
|
}
|