diff --git a/wifi/java/android/net/wifi/WifiMigration.java b/wifi/java/android/net/wifi/WifiMigration.java
index 666d72d32ac7c..87afdc59c2b9a 100755
--- a/wifi/java/android/net/wifi/WifiMigration.java
+++ b/wifi/java/android/net/wifi/WifiMigration.java
@@ -138,7 +138,10 @@ public final class WifiMigration {
/**
* Load data from legacy shared wifi config store file.
- * TODO(b/149418926): Add XSD for the AOSP file format for each file from R.
+ *
+ * Expected AOSP format is available in the sample files under {@code /frameworks/base/wifi/
+ * java/android/net/wifi/migration_samples}.
+ *
*
* Note:
*
OEMs need to change the implementation of
@@ -214,7 +217,10 @@ public final class WifiMigration {
/**
* Load data from legacy user wifi config store file.
- * TODO(b/149418926): Add XSD for the AOSP file format for each file from R.
+ *
+ * Expected AOSP format is available in the sample files under {@code /frameworks/base/wifi/
+ * java/android/net/wifi/migration_samples}.
+ *
*
* Note:
*
OEMs need to change the implementation of
diff --git a/wifi/java/android/net/wifi/migration_samples/README.txt b/wifi/java/android/net/wifi/migration_samples/README.txt
new file mode 100644
index 0000000000000..264debaa51f91
--- /dev/null
+++ b/wifi/java/android/net/wifi/migration_samples/README.txt
@@ -0,0 +1,35 @@
+This folder contains sample files for each of the 4 XML Wi-Fi config store files in Android 11 AOSP.
+OEMs can use these files as reference for converting their previous customized
+formats into the AOSP format. The conversion logic needs to be written in
+WifiMigration.java class, i.e each OEM needs to modify
+WifiMigration.convertAndRetrieveSharedConfigStoreFile() and the
+WifiMigration.convertAndRetrieveUserConfigStoreFile() methods.
+
+The 4 files are:
+
+Shared files
+============
+1) WifiConfigStore.xml - General storage for shared configurations. Includes
+user's saved Wi-Fi networks.
+AOSP Path in Android 10: /data/misc/wifi/WifiConfigStore.xml
+AOSP Path in Android 11: /data/misc/apexdata/com.android/wifi/WifiConfigStore.xml
+Sample File (in this folder): Shared_WifiConfigStore.xml
+
+2) WifiConfigStoreSoftAp.xml - Storage for user's softap/tethering configuration.
+AOSP Path in Android 10: /data/misc/wifi/softap.conf.
+Note: Was key/value format in Android 10. Conversion to XML done in SoftApConfToXmlMigrationUtil.java.
+AOSP Path in Android 11: /data/misc/apexdata/com.android/wifi/WifiConfigStore.xml
+Sample File (in this folder): Shared_WifiConfigStoreSoftAp.xml
+
+User specific files
+==================
+3) WifiConfigStore.xml - General storage for user specific configurations. Includes
+user's saved passpoint networks, Wi-Fi network request approvals, etc.
+AOSP Path in Android 10: /data/misc_ce//wifi/WifiConfigStore.xml
+AOSP Path in Android 11: /data/misc_ce//apexdata/com.android/wifi/WifiConfigStore.xml
+Sample File (in this folder): User_WifiConfigStore.xml
+
+4) WifiConfigStoreNetworkSuggestions.xml - Storage for app installed network suggestions.
+AOSP Path in Android 10: /data/misc_ce//wifi/WifiConfigStoreNetworkSuggestions.xml
+AOSP Path in Android 11: /data/misc_ce//apexdata/com.android/wifi/WifiConfigStoreNetworkSuggestions.xml
+Sample File (in this folder): User_WifiConfigStoreNetworkSuggestions.xml
diff --git a/wifi/java/android/net/wifi/migration_samples/Shared_WifiConfigStore.xml b/wifi/java/android/net/wifi/migration_samples/Shared_WifiConfigStore.xml
new file mode 100644
index 0000000000000..3063276fae6ac
--- /dev/null
+++ b/wifi/java/android/net/wifi/migration_samples/Shared_WifiConfigStore.xml
@@ -0,0 +1,200 @@
+
+
+
+
+
+
+"OPEN_SSID"NONE
+"OPEN_SSID"
+
+
+
+
+
+01
+03
+
+2f
+0e
+04
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+android.uid.system:1000
+
+android.uid.system:1000
+
+
+
+ce:b1:36:bb:71:ac
+
+
+
+
+NETWORK_SELECTION_ENABLED
+NETWORK_SELECTION_ENABLE
+"ENTERPRISE_SSID"WPA_EAP
+
+
+
+DHCP
+NONE
+
+
+
+
+"ENTERPRISE_SSID"WPA_EAP
+"ENTERPRISE_SSID"
+
+
+
+
+
+0c
+03
+
+2f
+0e
+04
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+android.uid.system:1000
+
+android.uid.system:1000
+
+
+
+f6:b3:94:44:40:87
+
+
+
+
+NETWORK_SELECTION_TEMPORARY_DISABLED
+NETWORK_SELECTION_DISABLED_AUTHENTICATION_FAILURE
+
+
+
+
+DHCP
+NONE
+
+
+adadadasdaddsa
+asdadaddadasd
+adasdadadad
+
+
+
+0
+
+
+
+adsad
+/system/etc/security/cacerts
+
+
+
+
+
+
+
+
+
+
+"WPA3_SSID"SAE
+"WPA3_SSID"
+"sfsdfsfdsfsdf"
+
+
+
+
+0001
+02
+
+28
+0c
+04
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+android.uid.system:1000
+
+android.uid.system:1000
+
+
+
+a6:3d:b0:13:ed:41
+
+
+
+
+NETWORK_SELECTION_PERMANENTLY_DISABLED
+NETWORK_SELECTION_DISABLED_BY_WRONG_PASSWORD
+
+
+
+
+DHCP
+NONE
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wifi/java/android/net/wifi/migration_samples/Shared_WifiConfigStoreSoftAp.xml b/wifi/java/android/net/wifi/migration_samples/Shared_WifiConfigStoreSoftAp.xml
new file mode 100644
index 0000000000000..fd99dd3df8b26
--- /dev/null
+++ b/wifi/java/android/net/wifi/migration_samples/Shared_WifiConfigStoreSoftAp.xml
@@ -0,0 +1,22 @@
+
+
+
+
+HOTSPOT_SSID
+
+
+
+
+blahblahblah
+
+
+
+
+
+00:11:22:33:44:55
+
+
+aa:bb:cc:dd:ee:ff
+
+
+
diff --git a/wifi/java/android/net/wifi/migration_samples/User_WifiConfigStore.xml b/wifi/java/android/net/wifi/migration_samples/User_WifiConfigStore.xml
new file mode 100644
index 0000000000000..67d5aab215f2f
--- /dev/null
+++ b/wifi/java/android/net/wifi/migration_samples/User_WifiConfigStore.xml
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+
+
+com.android.certinstaller
+
+HS2_0_0
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Passpoint.net
+Passpoint Friendly Name
+
+
+
+
+
+
+
+
+
+
+passpoint.com
+
+
+blahblahblah
+doubleblahlah
+
+
+
+
+PAP
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+com.android.cts.verifier
+
+OPEN_SSID
+00:11:22:33:44:55
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/wifi/java/android/net/wifi/migration_samples/User_WifiConfigStoreNetworkSuggestions.xml b/wifi/java/android/net/wifi/migration_samples/User_WifiConfigStoreNetworkSuggestions.xml
new file mode 100644
index 0000000000000..4ecdd29709b4a
--- /dev/null
+++ b/wifi/java/android/net/wifi/migration_samples/User_WifiConfigStoreNetworkSuggestions.xml
@@ -0,0 +1,155 @@
+
+
+
+
+
+com.android.cts.verifier
+
+
+
+
+
+
+
+"OPEN_SSID"NONE
+"OPEN_SSID"
+
+
+
+
+
+01
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+com.android.cts.verifier
+
+
+
+
+
+02:00:00:00:00:00
+
+
+
+
+
+
+
+
+
+
+
+passpoint.net
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+passpoint.net
+
+
+
+
+
+
+
+
+
+
+com.android.cts.verifier
+
+
+
+
+
+02:00:00:00:00:00
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+passpoint.net
+Passpoint Friendly Name
+
+
+
+
+
+
+
+
+
+
+passpoint.com
+
+
+blahblahblah
+doubleblahblah
+
+
+
+
+PAP
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+