[Thread] add ot-daemon to com.android.tethering
ot-daemon is a dependency of the new Thread feature. This commit
add the ot-daemon binary and init rc file to the Tethering module.
Note that the ot-daemon service is default disabled and versioned
init rc file is used to ensure that this service won't be started
before Android U.
This is expected to increase the size of "com.android.tethering.capex"
by around 400 KB.
Manual verification:
1. on Android T (33) CF device, the ot-daemon service is not started
after device boots; It reports service not found error when trying
to start the ot-daemon service with adb shell command "start
ot-daemon"
2. on Android U (34) CF device, the ot-daemon service is not started
after device boots; It can be started with shell comamnd "start
ot-daemon" but then failed because of missing sepolicy rules as
expected
Test: see above manual verification note
Bug: 296211911
Change-Id: I222e2bbcc2ad0be2beec9f5f3406e7144d314370
diff --git a/Tethering/apex/Android.bp b/Tethering/apex/Android.bp
index bb3dc24..13653d8 100644
--- a/Tethering/apex/Android.bp
+++ b/Tethering/apex/Android.bp
@@ -96,6 +96,7 @@
},
binaries: [
"clatd",
+ "ot-daemon",
],
canned_fs_config: "canned_fs_config",
bpfs: [
@@ -111,7 +112,10 @@
apps: [
"ServiceConnectivityResources",
],
- prebuilts: ["current_sdkinfo"],
+ prebuilts: [
+ "ot-daemon.init.34rc",
+ "current_sdkinfo",
+ ],
manifest: "manifest.json",
key: "com.android.tethering.key",
// Indicates that pre-installed version of this apex can be compressed.