Update .rc for hostapd in vendor apex
The new .rc file uses "property:apex.all.ready=true" instead of post-fs-data event which isn't currently supported in apex
Bug: 396290911
Test: v2/pts-presubmit/device-presubmit-wifi
Change-Id: I434e48bdd21cbaa0f21788d6e4c34a0b70e162b4
diff --git a/apex/Android.bp b/apex/Android.bp
index 5fca381..6aad837 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -6,6 +6,19 @@
installable: false,
}
+genrule {
+ name: "com.android.hardware.hostapd.rc-gen",
+ srcs: ["android.hardware.hostapd.rc"],
+ out: ["com.android.hardware.hostapd.rc"],
+ cmd: "sed -E 's@/vendor/bin@/apex/com.android.hardware.wpa_supplicant/bin@' $(in) > $(out)",
+}
+
+prebuilt_etc {
+ name: "com.android.hardware.hostapd.rc",
+ src: ":com.android.hardware.hostapd.rc-gen",
+ installable: false,
+}
+
apex {
name: "com.android.hardware.wpa_supplicant",
manifest: "apex_manifest.json",
diff --git a/apex/android.hardware.hostapd.rc b/apex/android.hardware.hostapd.rc
new file mode 100644
index 0000000..d89752e
--- /dev/null
+++ b/apex/android.hardware.hostapd.rc
@@ -0,0 +1,21 @@
+#
+# init.rc fragment for hostapd on Android
+# Copyright (c) 2002-2016, Jouni Malinen <j@w1.fi>
+#
+# This software may be distributed under the terms of the BSD license.
+# See README for more details.
+#
+
+on property:apex.all.ready=true
+ mkdir /data/vendor/wifi 0770 wifi wifi
+ mkdir /data/vendor/wifi/hostapd 0770 wifi wifi
+ mkdir /data/vendor/wifi/hostapd/sockets 0770 wifi wifi
+
+service hostapd /vendor/bin/hw/hostapd
+ interface aidl android.hardware.wifi.hostapd.IHostapd/default
+ class main
+ capabilities NET_ADMIN NET_RAW
+ user wifi
+ group wifi net_raw net_admin
+ disabled
+ oneshot
diff --git a/hostapd/Android.bp b/hostapd/Android.bp
index 4753644..533a917 100644
--- a/hostapd/Android.bp
+++ b/hostapd/Android.bp
@@ -743,16 +743,3 @@
}
// End of non-cuttlefish section
-
-genrule {
- name: "com.android.hardware.hostapd.rc-gen",
- srcs: ["hostapd.android.rc"],
- out: ["com.android.hardware.hostapd.rc"],
- cmd: "sed -E 's@/vendor/bin@/apex/com.android.hardware.wpa_supplicant/bin@' $(in) > $(out)",
-}
-
-prebuilt_etc {
- name: "com.android.hardware.hostapd.rc",
- src: ":com.android.hardware.hostapd.rc-gen",
- installable: false,
-}