diff options
author | Roshan Pius <rpius@google.com> | 2019-10-03 12:50:26 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2019-10-03 12:50:26 +0000 |
commit | d3844c1a0602d6a4381c4ac695892f6e8f07f0c0 (patch) | |
tree | 8cf278f972b17fa27bc1fab8fcf42f1d85aec7b5 | |
parent | 202f953f9cca885a6a220c15879be8d2243e8ae1 (diff) | |
parent | 054a06e5cb7649023c28db3d90b8ca14f80a463c (diff) |
Merge changes from topic "wifi_stack_in_network_stack_process"
* changes:
wifi-service: Add CleanSpec.mk for deleting in process .rc & .apk files
wifi_inprocess.rc: Rewrite configstore file permissions
wifi_stack: Move to network_stack process
-rw-r--r-- | service/AndroidManifest.xml | 6 | ||||
-rw-r--r-- | service/AndroidManifestBase.xml | 30 | ||||
-rw-r--r-- | service/AndroidManifest_InProcess.xml | 7 | ||||
-rw-r--r-- | service/CleanSpec.mk | 53 | ||||
-rw-r--r-- | service/wifi.rc | 5 | ||||
-rw-r--r-- | service/wifi_inprocess.rc | 19 |
6 files changed, 76 insertions, 44 deletions
diff --git a/service/AndroidManifest.xml b/service/AndroidManifest.xml index 4c10eea55..f599780d1 100644 --- a/service/AndroidManifest.xml +++ b/service/AndroidManifest.xml @@ -66,14 +66,10 @@ <!-- Signature permission defined for wifi module--> <uses-permission android:name="android.permission.MAINLINE_WIFI_STACK" /> - <!-- TODO(b/135691051): Need to move to network stack process. - "android:process="com.google.android.networkstack" - This is not possible currently because hidden API access is denied when run on network - stack process. - <receiver> also needs to run on the networkstack process. --> <application android:persistent="true" android:directBootAware="true" + android:process="com.android.networkstack.process" android:label="@string/wifiAppLabel"> <service android:name="com.android.server.wifi.WifiStackService" diff --git a/service/AndroidManifestBase.xml b/service/AndroidManifestBase.xml deleted file mode 100644 index 0d05bf44d..000000000 --- a/service/AndroidManifestBase.xml +++ /dev/null @@ -1,30 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- -/* - * Copyright (C) 2019 The Android Open Source Project - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ ---> -<manifest xmlns:android="http://schemas.android.com/apk/res/android" - package="com.android.server.wifistack" - android:versionCode="11" - android:versionName="R-initial"> - - <application - android:label="WifiStack" - android:defaultToDeviceProtectedStorage="true" - android:directBootAware="true" - android:usesCleartextTraffic="true"> - </application> -</manifest> diff --git a/service/AndroidManifest_InProcess.xml b/service/AndroidManifest_InProcess.xml index 6947659f2..a17b707dd 100644 --- a/service/AndroidManifest_InProcess.xml +++ b/service/AndroidManifest_InProcess.xml @@ -28,17 +28,16 @@ <application android:persistent="true" android:directBootAware="true" + android:process="system" android:label="@string/wifiAppLabel"> <service android:name="com.android.server.wifi.WifiStackService" - android:directBootAware="true" - android:process="system"> + android:directBootAware="true"> <intent-filter> <action android:name="android.net.wifi.IWifiStackConnector.InProcess"/> </intent-filter> </service> - <receiver android:name="com.android.server.wifi.BootCompleteReceiver" - android:process="system"> + <receiver android:name="com.android.server.wifi.BootCompleteReceiver"> <intent-filter> <action android:name="android.intent.action.LOCKED_BOOT_COMPLETED" /> </intent-filter> diff --git a/service/CleanSpec.mk b/service/CleanSpec.mk new file mode 100644 index 000000000..4566bd4f9 --- /dev/null +++ b/service/CleanSpec.mk @@ -0,0 +1,53 @@ +# -*- mode: makefile -*- +# Copyright (C) 2019 The Android Open Source Project +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# +# If you don't need to do a full clean build but would like to touch +# a file or delete some intermediate files, add a clean step to the end +# of the list. These steps will only be run once, if they haven't been +# run before. +# +# E.g.: +# $(call add-clean-step, touch -c external/sqlite/sqlite3.h) +# $(call add-clean-step, rm -rf $(OUT_DIR)/obj/STATIC_LIBRARIES/libz_intermediates) +# +# Always use "touch -c" and "rm -f" or "rm -rf" to gracefully deal with +# files that are missing or have been moved. +# +# Use $(PRODUCT_OUT) to get to the "out/target/product/blah/" directory. +# Use $(OUT_DIR) to refer to the "out" directory. +# +# If you need to re-do something that's already mentioned, just copy +# the command and add it to the bottom of the list. E.g., if a change +# that you made last week required touching a file and a change you +# made today requires touching the same file, just copy the old +# touch step and add it to the end of the list. +# +# ************************************************ +# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST +# ************************************************ +# +# For example: +#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/APPS/AndroidTests_intermediates) +#$(call add-clean-step, rm -rf $(OUT_DIR)/target/common/obj/JAVA_LIBRARIES/core_intermediates) +#$(call add-clean-step, find $(OUT_DIR) -type f -name "IGTalkSession*" -print0 | xargs -0 rm -f) +#$(call add-clean-step, rm -rf $(PRODUCT_OUT)/data/*) +#$(call add-clean-step, rm -rf $(OUT_DIR)/obj/SHARED_LIBRARIES/libdvm*) + +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/etc/init/wifi_inprocess.rc) +$(call add-clean-step, rm -rf $(PRODUCT_OUT)/system/priv-app/InProcessWifiStack) +# ************************************************ +# NEWER CLEAN STEPS MUST BE AT THE END OF THE LIST +# ************************************************ diff --git a/service/wifi.rc b/service/wifi.rc index e32ec20ed..883b215c8 100644 --- a/service/wifi.rc +++ b/service/wifi.rc @@ -19,7 +19,6 @@ on post-fs-data chown network_stack network_stack /data/misc/wifi chown network_stack network_stack /data/misc/wifi/WifiConfigStore.xml - chown network_stack network_stack /data/misc/wifi/WifiConfigStore.xml.encrypted-checksum chown network_stack network_stack /data/misc/wifi/softap.conf on property:sys.user.0.ce_available=true @@ -27,16 +26,12 @@ on property:sys.user.0.ce_available=true # For devices upgrading, we need to change permission. chown network_stack network_stack /data/misc_ce/0/wifi chown network_stack network_stack /data/misc_ce/0/wifi/WifiConfigStore.xml - chown network_stack network_stack /data/misc_ce/0/wifi/WifiConfigStore.xml.encrypted-checksum chown network_stack network_stack /data/misc_ce/0/wifi/WifiConfigStoreNetworkSuggestions.xml - chown network_stack network_stack /data/misc_ce/0/wifi/WifiConfigStoreNetworkSuggestions.xml.encrypted-checksum # Load the new sepolicy file context labels (these files were relabeled in R). restorecon /data/misc_ce/0/wifi restorecon /data/misc_ce/0/wifi/WifiConfigStore.xml - restorecon /data/misc_ce/0/wifi/WifiConfigStore.xml.encrypted-checksum restorecon /data/misc_ce/0/wifi/WifiConfigStoreNetworkSuggestions.xml - restorecon /data/misc_ce/0/wifi/WifiConfigStoreNetworkSuggestions.xml.encrypted-checksum # Below are for kernel tracing related stuff. on fs diff --git a/service/wifi_inprocess.rc b/service/wifi_inprocess.rc index b849b74ee..d4de5ed67 100644 --- a/service/wifi_inprocess.rc +++ b/service/wifi_inprocess.rc @@ -14,6 +14,25 @@ # limitations under the License. # +# These are needed for migration of data from "network_stack" user to "system" user +# if wifi is no longer running in "system_server". +on post-fs-data + chown system system /data/misc/wifi + chown system system /data/misc/wifi/WifiConfigStore.xml + chown system system /data/misc/wifi/softap.conf + +on property:sys.user.0.ce_available=true + mkdir /data/misc_ce/0/wifi 0770 system system + # For devices upgrading, we need to change permission. + chown system system /data/misc_ce/0/wifi + chown system system /data/misc_ce/0/wifi/WifiConfigStore.xml + chown system system /data/misc_ce/0/wifi/WifiConfigStoreNetworkSuggestions.xml + + # Load the new sepolicy file context labels (these files were relabeled in R). + restorecon /data/misc_ce/0/wifi + restorecon /data/misc_ce/0/wifi/WifiConfigStore.xml + restorecon /data/misc_ce/0/wifi/WifiConfigStoreNetworkSuggestions.xml + # Below are for kernel tracing related stuff. on fs setprop sys.wifitracing.started 0 |