9e83c3b65710cef6e04015565974750ee67200f1 |
|
26-May-2017 |
Roshan Pius <rpius@google.com> |
WifiBackupRestore: Backup networks from apps holding CONFIG_OVERRIDE We currently backup only networks created by system apps. Change that to instead backup only networks created by apps holding the |CONFIG_OVERRIDE| permission. This will let us backup networks from apps like SetupWizard which holds the |CONFIG_OVERRIDE| permission. Since such apps have the permission to modify any network in the device, it doesn't matter that the |creatorUid| info is lost during the restore process. PS: See the discussion in b/29201888 for why the creatorUid cannot be preserved across restore. Bug: 38041584 Test: Unit tests Test: 'bmgr backup com.android.provider.settings' Test: 'bmgr restore <sha> com.android.provider.settings' Change-Id: I550631d11f34942e408a6e4068bcb45ce22cb8e6
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
d3b9ca7c0e12b83841295b4ebe0023f54de04e0f |
|
12-May-2017 |
Roshan Pius <rpius@google.com> |
WifiBackupRestore: Tighten key checks in string parsing When the wpa_supplicant.conf file received during restore is parsed, we look for specific known keys which we use to identify the network type. Instead of checking for lines starting with "<KEY>", check for lines starting with "<KEY>=" which is the general format for all wpa_supplicant params in the network block. PS: This fixes the associated bug because the backup data contained an unknown field called "eapRetryCount" which would have previously matched out check to see if it's an EAP network. Bug: 38248167 Test: Unit tests. Change-Id: Ib4e158c8ed4cd10db694d389e5296e280363f9c9
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
b8b3fb8228a1f90106bad8c59ce006b81ef7921c |
|
09-Mar-2017 |
Roshan Pius <rpius@google.com> |
Remove all legacy HAL usage from framework WifiNative now just becomes a module to route calls into the appropriate native module: WifiVendorHal, WificondControl, SupplicantStaIfaceHal, SupplicantP2pIfaceHal. Changes in the CL: 1. Cleanup WifiNative to remove the legacy HAL usage. 2. Remove the |HIDL*| flags in WifiNative. 3. Remove static instance of WifiNative/WifiMonitor. 4. Remove WifiMonitor code parsing the string events from wpa_supplicant. 5. Remove all unused jni code used for legacy HAL interactions. 6. Remove dependency of libwifi-hal & libwifi-system from framework. Notes: a) We can now potentially split up WifiNative into separate chunks: WifiStaNative, WifiP2pNative, WifiRttNative, etc instead of having a monolithic WifiNative instance. b) We may have to add back the local log in WifiNative (b/36059665). Bug: 35702893 Bug: 34457880 Bug: 34884202 Bug: 35421721 Test: Compiles, existing unit tests pass. Test: Device boots up and connects to wifi networks. Test: Verified with wifi regression (b/36068282) Change-Id: I3e13522c912242af8023471e029edb1ce47fd3e9
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
38a6c1ba5d461b8c7b11685c5dd2e98d9e106b55 |
|
22-Feb-2017 |
Roshan Pius <rpius@google.com> |
SupplicantStaNetworkHal: Fix network extra parsing/writing The HIDL interface doesn't need the string to have the quotes. So, refactor the helper functions so that it parses/creates an unquoted string. The existing socket interface will continue to use the quoted strings. Also, Don't attempt to read the wpa_supplicant.conf file in legacy store migration if HIDL is enabled. Bug: 35663125 Test: Unit tests Test: Migration from N to O using HIDL interface. Change-Id: I2ee9f61f6e9f393608982952986c5dd980c998f9
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
c7588c6a7307e177085a4368498bf00632acb448 |
|
31-Jan-2017 |
Roshan Pius <rpius@google.com> |
WifiBackupRestore: Don't return null The SettingsBackupAgent doesn't handle null returns, so return an empty array if there is no data to backup. Bug: 34831550 Test: Added unit test Change-Id: Ieed471a9cc01ae58dcb70529f12974a76b2e8dbb
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
a063576ca089dcc6341372c30dd1bf0a7ca82efa |
|
27-Jul-2016 |
Roshan Pius <rpius@google.com> |
WifiBackupRestore: Ignore non system created networks Changes in the CL: 1. For new backup data, ignore networks non system app networks during backup data generation. 2. For older wpa_supplicant.conf backup data, ignore non system app networks during backup data restoration. BUG: 29201888 Change-Id: Ie22a8f6d5eae03b01edf1420e2b8d3db5979449a TEST: Unit tests
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
1a731d9b8078e156b99dd281b814d93ab025e363 |
|
16-Jun-2016 |
Roshan Pius <rpius@google.com> |
WifiConfigStore: Remove class Remove the existing WifiConfigStore class. Move all the existing functionality to two separate classes: 1. WifiSupplicantControl: For any wpa_supplicant operations. 2. WifiKeyStore: For any key management operations. This CL doesn't change any functionality, it's only a refactor. BUG: 29394274 BUG: 29396499 Change-Id: Ic3d3f9eb3c241f34f2fddcfa67374c9a98277e0a TEST: Unit tests TEST: Successfully associated the device with GoogleGuest.
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
c00a9331ab2a51babc3c3acd69f44be3d341c4b9 |
|
13-Jun-2016 |
Roshan Pius <rpius@google.com> |
XmlUtil: Report all parsing errors Detect all XML parsing errors in XmlUtil and raise exceptions for them. Changes in the CL: 1. Add new |gotoNextSection|* methods to raise exception when it does not find a section with the expected tag name. 2. Raise exceptions for all errors in |WifiConfigurationXmlUtil|, etc. 3. |IpConfiguration| can never be null in WifiConfiguratin object, so remove the conditional check in WifiBackupRestore. While there, Shorten the method names in |WifiConfigurationXmlUtil|, etc to parseFromXml/writeToXml. BUG: 29312911 Change-Id: I5bb152e9757f039410dd81afebaad009644e1414 TEST: Unit tests
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
2fafcc56fda54b1adf8b6743beaac59dbb84dfec |
|
08-Jun-2016 |
Roshan Pius <rpius@google.com> |
WifiBackupRestore: Handle network UIDs Don't save creatorUID element for backup/restore. All networks will be restored with the System UID set as the creatorUID. The creator UID is hard to preserve across backup/restore. Also, since the creatorUID is not being backed, there are genuine cases where the configKey mismatch might occur. So, move the |configKey| mismatch check out of |XmlUtil| and let backup/restore & config store handle it differently as needed. PS: Need to also figure out if we should stop backing up all networks not saved by settings agent (creatorUid != SYSTEM_UD). Will wait for discussions in b/29201888 to decide on that. BUG: 29201888 TEST: Unit-tests Change-Id: I668281893de9260a803872c04646b5af28ee45e5
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
2622233bd264f9bfbde164b6c62bd9d785da935b |
|
08-Jun-2016 |
Roshan Pius <rpius@google.com> |
WifiBackupRestore: Handle backups with no ipconfig data Handle restore of old backups with no corresponding ipconfig data. According to ctate@, this is a possibility on certain older devices. Also, add unit-tests to validate the restore behavior. BUG: 28967335 Change-Id: Id9d7be22132b3da560a7ec72aa5509392177bafe TEST: Unit tests.
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
08015f5d7f37f731fe14711bb2667e998a667e28 |
|
08-Jun-2016 |
Roshan Pius <rpius@google.com> |
WifibackupRestore: Mask out wep keys Mask out WEP keys in backup data dump and add unit tests to verify that the WEP keys are never dumped out. Since there are different patterns to match & replace, step through each line in the dump string and perform a search & replace. This isn't ideal, but there isn't any simple regex to mask both the 'psk' & 'wep keys' info. BUG: 29051876 Change-Id: I563bc8c9a0ace349851714f92aca817fb4f83717 TEST: Unit tests
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
052b948a8b8a009486e35cb56dbd7bb9516e8626 |
|
08-Jun-2016 |
Roshan Pius <rpius@google.com> |
Fix checkstyle errors Fixed all checkstyle errors in the new files added for backup/restore. BUG: 29201893 Change-Id: I48674d5a234a40e48f2f59f84555a4c6cce4bba4
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
e33a4bb414892435c016486585c26022cafdab68 |
|
06-Jun-2016 |
Roshan Pius <rpius@google.com> |
XmlUtil: Move Wifi/IP-Configuration serialization Move the serialization/deserialization of WifiConfiguration & IpConfiguration objects to XmlUtil. This helps us to share this logic between WifiBackupRestore & WifiConfigStore. Changes in the CL: 1. Create |WifiConfigurationXmlUtil| for WifiConfiguration serialization. 2. Create |IpConfigurationXmlUtil| for IpConfiguration serialization. 3. Change the XML structure of backup data to remove nesting of objects. Nesting of objects makes it difficult to deserialize especially when we start adding elements in future revisions. So, move |IpConfiguration| object outside the |WifiConfiguration| object. BUG: 29071904 Change-Id: Id08040bf11e4914638ec9f8d9d27d7983e27e42a TEST: Unit-tests TEST: Manual verification of backup/restore using bmgr commands.
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
3031903d4a68659350994571525fc86a47c02dd0 |
|
04-Jun-2016 |
Roshan Pius <rpius@google.com> |
WifiBackupRestore: Some cosmetic cleanups Changes in the CL: 1. Consolidate the logic in supplicant backup migration to skip enterprise networks during restore. 2. Create a helper method to restore networks once they're parsed out from the backup data. BUG: 28967335 Change-Id: I94cd5530afa5dc953cb8914c03ae7d554e0f182b TEST: Unit-tests
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
3204fb9682242a7b5a749489076c66d448c42577 |
|
03-Jun-2016 |
Roshan Pius <rpius@google.com> |
WifiBackupRestore: Logging changes Changes in CL: 1. To reduce log spamming, dump out the raw backup data only in bugreports if verbose logging is enabled. 2. Mask out the passwords from the backup data dump. 3. Move WifiBackupRestore module initialization to |WifiInjector| so that |WifiStateMachine| can set the verbose loging level. 4. Cleanup some unused variables in |SupplicantNework| class. BUG: 29051876 Change-Id: I6b58136057549ba1eb8a2845341be9fa072572b4 TEST: Manual tests
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
f196106f971d9e91dfcd14132a0fc2ce3d2cfc6c |
|
02-Jun-2016 |
Roshan Pius <rpius@google.com> |
WifiBackupRestore: Set hidden flag from old backup Add the missing |hiddenSSID| element parsing from old backups and add unit-tests to validate hidden network backup/restore. While there, Add input parameter validation in all the public methods. BUG: 29075035 Change-Id: I60c8acea17a532e7d5810d1096fbefc647614027 TEST: Unit tests
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
e3831b70d4a8a967fe8df5496d542a432692c434 |
|
02-Jun-2016 |
Roshan Pius <rpius@google.com> |
WifiBackupRestore: Parse older backup data Add a new API to restore the old backups containing the raw data from wpa_supplicant.conf & ipconfig.txt files. Changes in CL: 1. Migrate all the wpa_supplicant.conf parsing logic in |SettingsBackupAgent| into |WifiBackupRestore|. 2. Create WifiConfiguration objects from the wpa_supplicant.conf. 3. Parse the ipconfig data using |IpConfigStore| into IpConfiguration objects. 4. These retrieved networks are added back using addOrUpdateNetwork(). While there, 1. Make the "id_str" parsing/writing methods in WifiNative static so that it can be used for restoring the data from wpa_supplicant.conf. 2. Make all the configurations enabled & shared in the test WifiConfiguration objects. BUG: 29075035 TEST: Compiles & unit-test passes Change-Id: If099af59811aa80f63eb5fd20ddf234e8089fd27
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
14f8e2bdd97ad7d44c00b6ef788b339023d41e7c |
|
01-Jun-2016 |
Roshan Pius <rpius@google.com> |
WifiBackupRestore: Add IpConfiguration to backup data Add the IpConfiguration object associated with each WifiConfiguration object to the backup data. Currently, this ip configuration information is being backed up separately via IpConfigStore class in the ipconfig.txt file. While there, 1. Rename write/parse-WepKeys methods. 2. Prefix the existing write/parse-Configuration methods with |Wifi| to differentiate from the new IpConfiguration methods. 3. Prefix the existing depth variables with |tag|. BUG: 28967335 BUG: 29063894 Change-Id: Ie8ebb119e2b22e78e825aee2aa2f1bb992f0c149 TEST: Compiles & unit-test passes
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|
ff9686aec5b6ee21e01556899fb13ab55915f3c0 |
|
31-May-2016 |
Roshan Pius <rpius@google.com> |
WifiBackupRestore: Add new module for backup/restore The new module provides symmetric API's to format the provided configurations into a XML byte stream. WifiService retrieves the current list of saved configurations and provides the list to the |WifiBackupRestore| module to generate the backup data. Similarly, WifiService provides the backup data to|WifiBackupRestore| to generate the list of saved networks. It then adds/enables these networks using the public API's. The XML data is versioned to ease migration across future revisions. BUG: 28967335 TEST: Compiles & unit-test passes TEST: Integrated these changes with SettingsBAckupAgent to verify that saved networks are being backed up/restored correctly. Change-Id: I0a8a7d722e627fc606019a4148fb2be998ce25c9
/frameworks/opt/net/wifi/service/java/com/android/server/wifi/WifiBackupRestore.java
|