diff options
author | 2019-10-01 17:22:41 -0700 | |
---|---|---|
committer | 2019-10-03 04:37:07 -0700 | |
commit | 5df122e06c1caf58ffbdb53f78ae7663531e52f6 (patch) | |
tree | 55d7269e8daa8d1ae580e338ca60aec4b2b903d5 | |
parent | 2463c2f0b9c76f5345b4b74308cc9d14ad0c5c15 (diff) |
wifi_inprocess.rc: Rewrite configstore file permissions
If we need to revert the change to move the wifi stack to network_stack
process, we will need to be able to revert all the file permissions
changed in wifi.rc.
Also,
a) Removed unused AndroidManifestBase.xml
b) Removed config store hash files which are no longer in use (hash is
stored inside WifiConfigstore.xml)
Bug: 135691051
Test: Moved the wifi stack back from network_stack to in process
version.
Change-Id: I81acad11c73a70ee83374d5304fd6faa377b3f32
-rw-r--r-- | service/AndroidManifestBase.xml | 30 | ||||
-rw-r--r-- | service/wifi.rc | 5 | ||||
-rw-r--r-- | service/wifi_inprocess.rc | 19 |
3 files changed, 19 insertions, 35 deletions
diff --git a/service/AndroidManifestBase.xml b/service/AndroidManifestBase.xml deleted file mode 100644 index 0d05bf44d1..0000000000 --- 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/wifi.rc b/service/wifi.rc index e32ec20ed0..883b215c83 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 b849b74eee..d4de5ed676 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 |