Merge changes from topic "thermal-sepolicy" into main

* changes:
  thermal-hal: Add thermal HAL configs
  sepolicy: thermal: reorganize the source to folder
diff --git a/audio/aidl/device_framework_matrix_product.xml b/audio/aidl/device_framework_matrix_product.xml
index 660864a..10b6e4b 100644
--- a/audio/aidl/device_framework_matrix_product.xml
+++ b/audio/aidl/device_framework_matrix_product.xml
@@ -7,4 +7,12 @@
            <instance>default</instance>
        </interface>
     </hal>
+    <hal format="aidl">
+        <name>vendor.google.whitechapel.audio.extension</name>
+        <version>1</version>
+        <interface>
+            <name>IAudioExtension</name>
+            <instance>default</instance>
+        </interface>
+    </hal>
 </compatibility-matrix>
diff --git a/audio/sepolicy/aidl/service.te b/audio/sepolicy/aidl/service.te
index bf73ead..cbdc404 100644
--- a/audio/sepolicy/aidl/service.te
+++ b/audio/sepolicy/aidl/service.te
@@ -1,3 +1,3 @@
 # Audio
-type hal_audio_ext_service, service_manager_type;
+type hal_audio_ext_service, hal_service_type, service_manager_type;
 type hal_audio_parameter_parser_service, service_manager_type;
diff --git a/gps/brcm/prebuilt/SensorHub_A0.patch b/gps/brcm/prebuilt/SensorHub_A0.patch
index f9e6598..6dff717 100644
--- a/gps/brcm/prebuilt/SensorHub_A0.patch
+++ b/gps/brcm/prebuilt/SensorHub_A0.patch
@@ -1,9 +1,9 @@
 <FormatVersion=0x00010003>
 
-<Crc=87>
+<Crc=12>
 <BlobLength=161320>
 <AsicVersion=0x004776A0>
-<ChangeList=572940>
+<ChangeList=576052>
 <PatchLevel=0>
 <PostPatchLevel=1>
 <CustomerVersion=None>
@@ -79,7 +79,7 @@
 009102A101F438F703B000BD4170700080BD8900708989
 00805D8A006905800025643A2564095374617274206368
 70704170705461736B0A00000000633A5C77735C626F64
-5F3437373631333638375F3537323934305C637573746F
+5F3437373631333932385F3537363035325C637573746F
 6D6572735C676F6F676C655C503231466C61677461696C
 6D63755C64656C69766572795C53656E736F724875625F
 5032315C7372635C6875625F636F6E74726F6C6C65722E
@@ -380,7 +380,7 @@
 46FEF768FF07E002464FF4D1630FF2BC618F2011F4D3F2
 FEF7DDFC04F5A6620A23C2E9000105F0F00006F00F0101
 433A462046BDE8F041FFF7E3BB0000633A5C77735C626F
-645F3437373631333638375F3537323934305C63757374
+645F3437373631333932385F3537363035325C63757374
 6F6D6572735C676F6F676C655C503231466C6167746169
 6C6D63755C64656C69766572795C53656E736F72487562
 5F5032315C7372635C636870705C7472616E73706F7274
@@ -517,7 +517,7 @@
 F610B010BD000025643A25640948232568687520756E6B
 6E6F776E20726571756573742E20636D643D2523782C20
 49443D256868750A00633A5C77735C626F645F34373736
-31333638375F3537323934305C637573746F6D6572735C
+31333932385F3537363035325C637573746F6D6572735C
 676F6F676C655C503231466C61677461696C6D63755C64
 656C69766572795C53656E736F724875625F5032315C73
 72635C636870705C6170702E630000000025643A256409
@@ -575,8 +575,8 @@
 4B00F1380100910FF2E801FFF71AD903B000BDF07E8A00
 0C53890028878A0039318000C531800025643A25640943
 4850502042617564726174652069732073657420746F20
-256C640A0A00633A5C77735C626F645F34373736313336
-38375F3537323934305C637573746F6D6572735C676F6F
+256C640A0A00633A5C77735C626F645F34373736313339
+32385F3537363035325C637573746F6D6572735C676F6F
 676C655C503231466C61677461696C6D63755C64656C69
 766572795C53656E736F724875625F5032315C7372635C
 73656E736F725F6875622E63000025643A256409496E76
@@ -670,12 +670,12 @@
 19D500F65C552846FDF762DE060012D000200090694628
 46FDF77EDE761E012804DB024600992046FEF7B2F82846
 FDF7DBDD002EECD173BD70470000633A5C77735C626F64
-5F3437373631333638375F3537323934305C637573746F
+5F3437373631333932385F3537363035325C637573746F
 6D6572735C676F6F676C655C503231466C61677461696C
 6D63755C64656C69766572795C53656E736F724875625F
 5032315C7372635C636870705C696E636C7564655C6368
 70702F7472616E73706F72742E6800633A5C77735C626F
-645F3437373631333638375F3537323934305C63757374
+645F3437373631333932385F3537363035325C63757374
 6F6D6572735C676F6F676C655C503231466C6167746169
 6C6D63755C64656C69766572795C53656E736F72487562
 5F5032315C7372635C636870705C706C6174666F726D5C
@@ -686,7 +686,7 @@
 C306327C012AF1D1D6E90223D0E918679F42E7D8E8D396
 42E4D2E5E7D0E91823CDE900230FF27C010FF2100240F2
 1E238F200FF41DF503B0F0BD0000633A5C77735C626F64
-5F3437373631333638375F3537323934305C637573746F
+5F3437373631333932385F3537363035325C637573746F
 6D6572735C676F6F676C655C503231466C61677461696C
 6D63755C64656C69766572795C53656E736F724875625F
 5032315C7372F19403903C8000635C636870705C636C69
@@ -696,8 +696,8 @@
 90009225238B200FF4C3F420680221FEF75FF80AE03246
 294625F48CF401207870324620683946FEF722F8012003
 B0F0BD25643A2564094F4F4D2061742025733A25640A00
-633A5C77735C626F645F3437373631333638375F353732
-3934305C637573746F6D6572735C676F6F676C655C5032
+633A5C77735C626F645F3437373631333932385F353736
+3035325C637573746F6D6572735C676F6F676C655C5032
 31466C61677461696C6D63755C64656C69766572795C53
 656E736F724875625F5032315C7372635C636870705C73
 657276696365735C6C6F6F706261636B2E63000010B514
@@ -709,7 +709,7 @@
 BDE870400E22FDF79DBF10B58B880124012B02D1FFF7C5
 FF00E00024204610BD000025643A2564094F4F4D206174
 2025733A25640A00633A5C77735C626F645F3437373631
-333638375F3537323934305C637573746F6D6572735C67
+333932385F3537363035325C637573746F6D6572735C67
 6F6F676C655C503231466C61677461696C6D63755C6465
 6C69766572795C53656E736F724875625F5032315C7372
 635C636870705C73657276696365735C74696D6573796E
@@ -723,8 +723,8 @@
 63F309F101092437207A8145F3D320682A46314603B0BD
 E8F043FDF7F2BE10B58A880124012A02D1FFF7BAFF00E0
 0024204610BD25643A2564094F4F4D2061742025733A25
-640A00633A5C77735C626F645F3437373631333638375F
-3537323934305C637573746F6D6572735C676F6F676C65
+640A00633A5C77735C626F645F3437373631333932385F
+3537363035325C637573746F6D6572735C676F6F676C65
 5C503231466C61677461696C6D63755C64656C69766572
 795C53656E736F724875625F5032315C7372635C636870
 705C73657276696365735C646973636F766572792E6300
@@ -751,7 +751,7 @@
 EB0905CDE90445AD230FF2AC118F200FF44AF206B0BDE8
 708370B50446084615461E46FFF7BEFF32462946206800
 68BDE87040FDF7A7BD00000000633A5C77735C626F645F
-3437373631333638375F3537323934305C637573746F6D
+3437373631333932385F3537363035325C637573746F6D
 6572735C676F6F676C655C503231466C61677461696C6D
 63755C64656C69766572795C53656E736F724875625F50
 32315C7372635C636870705C73657276696365732E6300
@@ -778,8 +778,8 @@
 903E230FF240020FF22C018E2007E001A8009042230FF2
 2C020FF218018F200FF40FF10DF5027D10BC5DF80CFB0F
 F284014160704725643A25640950414C3A2025730A0000
-633A5C77735C626F645F3437373631333638375F353732
-3934305C637573746F6D6572735C676F6F676C655C5032
+633A5C77735C626F645F3437373631333932385F353736
+3035325C637573746F6D6572735C676F6F676C655C5032
 31466C61677461696C6D63755C64656C69766572795C53
 656E736F724875625F5032315C7372635C636870705C70
 6C6174666F726D5C70616C5F6170692E63000000000000
@@ -838,7 +838,7 @@
 070032BD13460A4601460248007810F4DBB00000145389
 007146800081468000687B890060D09100514680004747
 8000436870704C696E6B5461736B00000000633A5C7773
-5C626F645F3437373631333638375F3537323934305C63
+5C626F645F3437373631333932385F3537363035325C63
 7573746F6D6572735C676F6F676C655C503231466C6167
 7461696C6D63755C64656C69766572795C53656E736F72
 4875625F5032315C7372635C636870705C706C6174666F
@@ -902,7 +902,7 @@
 29460FF268222046FFF770F8287131BD0000D088890025
 643A256409474E5353207365727669636520616C726561
 6479206F70656E0A00000000633A5C77735C626F645F34
-37373631333638375F3537323934305C637573746F6D65
+37373631333932385F3537363035325C637573746F6D65
 72735C676F6F676C655C503231466C61677461696C6D63
 755C64656C69766572795C53656E736F724875625F5032
 315C7372635C636870705C73657276696365735C676E73
@@ -952,8 +952,8 @@
 2003B0F0BD70B50D000446164606D10023002295210FF2
 3000FBF77DF936B90023002296210FF22000FBF775F936
 20FEF7B0F9286030B1811D2046FFF799FF362030600120
-70BD633A5C77735C626F645F3437373631333638375F35
-37323934305C637573746F6D6572735C676F6F676C655C
+70BD633A5C77735C626F645F3437373631333932385F35
+37363035325C637573746F6D6572735C676F6F676C655C
 503231466C61677461696C6D63755C64656C6976657279
 5C53656E736F724875625F5032315C7372635C63687070
 5C636F6D6D6F6E5C676E73735F636F6E766572742E6300
@@ -1007,8 +1007,8 @@
 65617344617461000025643A2564095B25735D204D6561
 737572656D656E742064617461206576656E74203A206D
 6561737572656D656E745F636F756E74203D2028256429
-0A000000633A5C77735C626F645F343737363133363837
-5F3537323934305C637573746F6D6572735C676F6FF194
+0A000000633A5C77735C626F645F343737363133393238
+5F3537363035325C637573746F6D6572735C676F6FF194
 0310598000676C655C503231466C61677461696C6D6375
 5C64656C69766572795C53656E736F724875625F503231
 5C7372635C636870705C706C6174666F726D5C62636D5C
@@ -1217,7 +1217,7 @@
 F008E0B08838B1A88070BD00291CBFF088002800D0A080
 70BD0B4801707047000009480078704700000848017070
 47000006480078704700000148416170470000787B8900
-0CBE080099CB91009ACB91002F2F6465706F742F636C69
+34CA080099CB91009ACB91002F2F6465706F742F636C69
 656E742F636F72652F72656C2F476F6F676C652F503232
 2F3535343830332F2E2E2E0000007E24247E5056542044
 756D70203A20474C4C207665722E20256C7520666C6167
diff --git a/gps/brcm/prebuilt/SensorHub_DebugBuild_A0.patch b/gps/brcm/prebuilt/SensorHub_DebugBuild_A0.patch
index 92b15bc..23b9999 100644
--- a/gps/brcm/prebuilt/SensorHub_DebugBuild_A0.patch
+++ b/gps/brcm/prebuilt/SensorHub_DebugBuild_A0.patch
@@ -1,9 +1,9 @@
 <FormatVersion=0x00010003>
 
-<Crc=222>
+<Crc=32>
 <BlobLength=161839>
 <AsicVersion=0x004776A0>
-<ChangeList=572940>
+<ChangeList=576052>
 <PatchLevel=0>
 <PostPatchLevel=1>
 <CustomerVersion=None>
@@ -79,7 +79,7 @@
 009102A101F438F703B000BD4170700080BD8900708989
 00805D8A006905800025643A2564095374617274206368
 70704170705461736B0A00000000633A5C77735C626F64
-5F3437373631333638375F3537323934305C637573746F
+5F3437373631333932385F3537363035325C637573746F
 6D6572735C676F6F676C655C503231466C61677461696C
 6D63755C64656C69766572795C53656E736F724875625F
 5032315C7372635C6875625F636F6E74726F6C6C65722E
@@ -390,7 +390,7 @@
 F22046FEF700FF07E002464FF4D1630FF2F4518F2011F4
 5FF2FEF769FC04F5A6620A23C2E9000105F0F00006F00F
 0101433A462046BDE8F041FFF7BDBB0000633A5C77735C
-626F645F3437373631333638375F3537323934305C6375
+626F645F3437373631333932385F3537363035325C6375
 73746F6D6572735C676F6F676C655C503231466C616774
 61696C6D63755C64656C69766572795C53656E736F7248
 75625F5032315C7372635C636870705C7472616E73706F
@@ -526,7 +526,7 @@
 25210378204626F4F1F510B010BD000025643A25640948
 232568687520756E6B6E6F776E20726571756573742E20
 636D643D2523782C2049443D256868750A00633A5C7773
-5C626F645F3437373631333638375F3537323934305C63
+5C626F645F3437373631333932385F3537363035325C63
 7573746F6D6572735C676F6F676C655C503231466C6167
 7461696C6D63755C64656C69766572795C53656E736F72
 4875625F5032315C7372F19403502E8000635C63687070
@@ -585,7 +585,7 @@
 D803B000BDF07E8A000C53890028878A00113280009D32
 800025643A256409434850502042617564726174652069
 732073657420746F20256C640A0A00633A5C77735C626F
-645F3437373631333638375F3537323934305C63757374
+645F3437373631333932385F3537363035325C63757374
 6F6D6572735C676F6F676C655C503231466C6167746169
 6C6D63755C64656C69766572795C53656E736F72487562
 5F5032315C7372635C73656E736F725F6875622E630000
@@ -679,13 +679,13 @@
 B5C90382B0A0F5A86419D500F65C552846FDF7F6DD0600
 12D00020009069462846FDF712DE761E012804DB024600
 992046FEF79EF82846FDF76FDD002EECD173BD70470000
-633A5C77735C626F645F3437373631333638375F353732
-3934305C637573746F6D6572735C676F6F676C655C5032
+633A5C77735C626F645F3437373631333932385F353736
+3035325C637573746F6D6572735C676F6F676C655C5032
 31466C61677461696C6D63755C64656C69766572795C53
 656E736F724875625F5032315C7372635C636870705C69
 6E636C7564655C636870702F7472616E73706F72742E68
-00633A5C77735C626F645F3437373631333638375F3537
-323934305C637573746F6D6572735C676F6F676C655C50
+00633A5C77735C626F645F3437373631333932385F3537
+363035325C637573746F6D6572735C676F6F676C655C50
 3231466C61677461696C6D63755C64656C69766572795C
 53656E736F724875625F5032315C7372635C636870705C
 706C6174666F726D5C62636D5C42434D343737785C6C69
@@ -696,7 +696,7 @@
 D1D6E90223D0E918679F42E7D8E8D39642E4D2E5E7D0E9
 1823CDE900230FF27C010FF2100240F21E238F200FF4B1
 F403B0F0BD0000633A5C77735C626F645F343737363133
-3638375F3537323934305C637573746F6D6572735C676F
+3932385F3537363035325C637573746F6D6572735C676F
 6F676C655C503231466C61677461696C6D63755C64656C
 69766572795C53656E736F724875625F5032315C737263
 5C636870705C636C69656E74732E630000000025643A25
@@ -706,7 +706,7 @@
 21FEF75DF80AE03246294625F420F40120787032462068
 3946FEF718F8012003B0F0BD25643A2564094F4F4D2061
 742025733A25640A00633A5C77735C626F645F34373736
-31333638375F3537323934305C637573746F6D6572735C
+31333932385F3537363035325C637573746F6D6572735C
 676F6F676C655C503231466C61677461696C6D63755C64
 656C69766572795C53656E736F724875625F5032315C73
 72635C636870705C73657276696365735C6C6F6F706261
@@ -718,8 +718,8 @@
 0122460E2000908F200FF2B0010FF4C3F32868314604B0
 BDE870400E22FDF78CBF10B58B880124012B02D1FFF7BE
 FF00E00024204610BD25643A2564094F4F4D2061742025
-733A25640A00633A5C77735C626F645F34373736313336
-38375F3537323934305C637573746F6D6572735C676F6F
+733A25640A00633A5C77735C626F645F34373736313339
+32385F3537363035325C637573746F6D6572735C676F6F
 676C655C503231466C61677461696C6D63755C64656C69
 766572795C53656E736F724875625F5032315C7372635C
 636870705C73657276696365735C74696D6573796E632E
@@ -734,7 +734,7 @@
 314603B0BDE8F043FDF7E2BE10B58A880124012A02D1FF
 F7BAFF00E00024204610BD25643A2564094F4F4D206174
 2025733A25640A00633A5C77735C626F645F3437373631
-333638375F3537323934305C637573746F6D6572735C67
+333932385F3537363035325C637573746F6D6572735C67
 6F6F676C655C503231466C61677461696C6D63755C6465
 6C69766572795C53656E736F724875625F5032315C7372
 635C636870705C73657276696365735C646973636F7665
@@ -761,7 +761,7 @@
 05CDE90445AD230FF2AC118F200FF4D8F106B0BDE87083
 70B50446084615461E46FFF7BEFF3246294620680068BD
 E87040FDF797BD00000000633A5C77735C626F645F3437
-373631333638375F3537323934305C637573746F6D6572
+373631333932385F3537363035325C637573746F6D6572
 735C676F6F676C655C503231466C61677461696C6D6375
 5C64656C69766572795C53656E736F724875625F503231
 5C7372635C636870705C73657276696365732E63000000
@@ -788,8 +788,8 @@
 230FF240020FF22C018E2007E001A8009042230FF22C02
 0FF218018F200FF49DF00DF5027D10BC5DF80CFB0FF284
 014160704725643A25640950414C3A2025730A0000633A
-5C77735C626F645F3437373631333638375F3537323934
-305C637573746F6D6572735C676F6F676C655C50323146
+5C77735C626F645F3437373631333932385F3537363035
+325C637573746F6D6572735C676F6F676C655C50323146
 6C61677461696C6D63755C64656C69766572795C53656E
 736F724875625F5032315C7372635C636870705C706C61
 74666F726D5C70616C5F6170692E6300000000000001C9
@@ -848,7 +848,7 @@
 32BD13460A4601460248007810F469B000001453890055
 47800065478000687B890060D09100354780002B488000
 436870704C696E6B5461736B00000000633A5C77735C62
-6F645F3437373631333638375F3537323934305C637573
+6F645F3437373631333932385F3537363035325C637573
 746FF19403D04A80006D6572735C676F6F676C655C5032
 31466C61677461696C6D63755C64656C69766572795C53
 656E736F724875625F5032315C7372635C636870705C70
@@ -914,7 +914,7 @@
 0023002240F293210FF2380001B0BDE83040FBF732BB31
 BD0000D088890025643A256409474E5353207365727669
 636520616C7265616479206F70656E0A00000000633A5C
-77735C626F645F3437373631333638375F353732393430
+77735C626F645F3437373631333932385F353736303532
 5C637573746F6D6572735C676F6F676C655C503231466C
 61677461696C6D63755C64656C69766572795C53656E73
 6F724875625F5032315C7372635C636870705C73657276
@@ -965,7 +965,7 @@
 0023002295210FF23000FBF7EFF836B90023002296210F
 F22000FBF7E7F83620FEF78EF9286030B1811D2046FFF7
 99FF36203060012070BD633A5C77735C626F645F343737
-3631333638375F3537323934305C637573746F6D657273
+3631333932385F3537363035325C637573746F6D657273
 5C676F6F676C655C503231466C61677461696C6D63755C
 64656C69766572795C53656E736F724875625F5032315C
 7372635C636870705C636F6D6D6F6E5C676E73735F63F1
@@ -1020,7 +1020,7 @@
 0025643A2564095B25735D204D6561737572656D656E74
 2064617461206576656E74203A206D6561737572656D65
 6E745F636F756E74203D20282564290A000000633A5C77
-735C626F645F3437373631333638375F3537323934305C
+735C626F645F3437373631333932385F3537363035325C
 637573746F6D6572735C676F6F676C655C503231466C61
 677461696C6D63755C64656C69766572795C53656E736F
 724875625F5032315C7372635C636870705C706C617466
@@ -1229,7 +1229,7 @@
 8891FBF0F111FB00F008E0B08838B1A88070BD00291CBF
 F088002800D0A08070BD0B480170704700000948007870
 4700000848017070470000064800787047000001484161
-70470000787B89000CBE080099CB91009ACB91002F2F64
+70470000787B890034CA080099CB91009ACB91002F2F64
 65706F742F636C69656E742F636F72652F72656C2F476F
 6F676C652F5032322F3535343830332F2E2E2E0000007E
 24247E5056542044756D70203A20474C4C207665722E20
diff --git a/gps/brcm/prebuilt/android.hardware.gnss@2.1-service-brcm b/gps/brcm/prebuilt/android.hardware.gnss@2.1-service-brcm
index 46c3502..06d6a25 100755
--- a/gps/brcm/prebuilt/android.hardware.gnss@2.1-service-brcm
+++ b/gps/brcm/prebuilt/android.hardware.gnss@2.1-service-brcm
Binary files differ
diff --git a/gps/brcm/prebuilt/flp.default.so b/gps/brcm/prebuilt/flp.default.so
index ae82480..d8ae3e5 100755
--- a/gps/brcm/prebuilt/flp.default.so
+++ b/gps/brcm/prebuilt/flp.default.so
Binary files differ
diff --git a/gps/brcm/prebuilt/gps.default.so b/gps/brcm/prebuilt/gps.default.so
index 616d840..785a603 100755
--- a/gps/brcm/prebuilt/gps.default.so
+++ b/gps/brcm/prebuilt/gps.default.so
Binary files differ
diff --git a/gps/brcm/prebuilt/gpsd b/gps/brcm/prebuilt/gpsd
index 8a7f911..bfe3a6c 100755
--- a/gps/brcm/prebuilt/gpsd
+++ b/gps/brcm/prebuilt/gpsd
Binary files differ
diff --git a/gps/brcm/prebuilt/lhd b/gps/brcm/prebuilt/lhd
index 258bf23..786f914 100755
--- a/gps/brcm/prebuilt/lhd
+++ b/gps/brcm/prebuilt/lhd
Binary files differ
diff --git a/gps/brcm/prebuilt/scd b/gps/brcm/prebuilt/scd
index cccca1f..a96c13b 100755
--- a/gps/brcm/prebuilt/scd
+++ b/gps/brcm/prebuilt/scd
Binary files differ
diff --git a/pixelsystemservice/pixelsystemservice.mk b/pixelsystemservice/pixelsystemservice.mk
index fcabe89..4a27110 100644
--- a/pixelsystemservice/pixelsystemservice.mk
+++ b/pixelsystemservice/pixelsystemservice.mk
@@ -2,4 +2,4 @@
 PRODUCT_PACKAGES += \
        PersistentBackgroundServices
 
-BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/pixelsystemservice/sepolicy
+SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += device/google/gs-common/pixelsystemservice/sepolicy
diff --git a/storage/Android.bp b/storage/Android.bp
index 54e097e..5926545 100644
--- a/storage/Android.bp
+++ b/storage/Android.bp
@@ -2,9 +2,19 @@
     default_applicable_licenses: ["Android-Apache-2.0"],
 }
 
-sh_binary {
-    name: "dump_storage.sh",
-    src: "dump_storage.sh",
+cc_binary {
+    name: "dump_storage",
+    srcs: ["dump_storage.cpp"],
+    cflags: [
+        "-Wall",
+        "-Wextra",
+        "-Werror",
+    ],
+    shared_libs: [
+        "libbase",
+        "libdump",
+	"liblog",
+    ],
     vendor: true,
-    sub_dir: "dump",
+    relative_install_path: "dump",
 }
diff --git a/storage/dump_storage.cpp b/storage/dump_storage.cpp
new file mode 100644
index 0000000..bba1071
--- /dev/null
+++ b/storage/dump_storage.cpp
@@ -0,0 +1,150 @@
+/*
+ * Copyright 2023 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.
+ */
+
+#include <dump/pixel_dump.h>
+#include <android-base/file.h>
+#include <android-base/properties.h>
+#include <string.h>
+#include <stdio.h>
+#include <log/log.h>
+#include <regex>
+#include <fstream>
+
+#define F2FS_FSCK_TIME_PROPERTY "ro.boottime.init.fsck.data"
+#define F2FS_MNT_TIME_PROPERTY "ro.boottime.init.mount.data"
+#define BOOTDEVICE_PROPERTY "ro.boot.bootdevice"
+
+int main() {
+    //F2FS
+    dumpFileContent("F2FS status", "/sys/kernel/debug/f2fs/status");
+    dumpFileContent("F2FS fsck", "/dev/fscklogs/fsck");
+
+    int fsck_time = android::base::GetIntProperty(F2FS_FSCK_TIME_PROPERTY, 0);
+    printf("--- F2FS - fsck time (ms) ---\n%d\n\n", fsck_time);
+    int mnt_time = android::base::GetIntProperty(F2FS_MNT_TIME_PROPERTY, 0);
+    printf("--- F2FS - checkpoint=disable time (ms) ---\n%d\n\n", mnt_time);
+
+    //UFS
+    dumpFileContent("UFS model", "/sys/block/sda/device/model");
+    dumpFileContent("UFS rev", "/sys/block/sda/device/rev");
+    dumpFileContent("UFS size", "/sys/block/sda/size");
+
+    dumpFileContent("UFS Slow IO Read",
+                    "/dev/sys/block/bootdevice/slowio_read_cnt");
+    dumpFileContent("UFS Slow IO Write",
+                    "/dev/sys/block/bootdevice/slowio_write_cnt");
+    dumpFileContent("UFS Slow IO Unmap",
+                    "/dev/sys/block/bootdevice/slowio_unmap_cnt");
+    dumpFileContent("UFS Slow IO Sync",
+                    "/dev/sys/block/bootdevice/slowio_sync_cnt");
+
+    printf("------ UFS err_stats ------\n");
+    const std::string ufs_err_stats_path(
+            "/dev/sys/block/bootdevice/err_stats/");
+    std::unique_ptr<DIR, decltype(&closedir)> statdir(
+            opendir(ufs_err_stats_path.c_str()), closedir);
+    if (statdir) {
+        dirent *stat_entry;
+        while ((stat_entry = readdir(statdir.get())) != nullptr) {
+            std::string ufs_err_stats_path(stat_entry->d_name);
+            if (!strcmp(ufs_err_stats_path.c_str(), ".")
+                    || !strcmp(ufs_err_stats_path.c_str(), ".."))
+                continue;
+            std::string bootdevice = android::base::GetProperty(
+                    BOOTDEVICE_PROPERTY, "");
+            std::string err_stat_path = "/sys/devices/platform/";
+            err_stat_path.append(bootdevice.c_str());
+            err_stat_path.append("/err_stats/");
+            err_stat_path.append(ufs_err_stats_path.c_str());
+            std::ifstream err_stat_file(err_stat_path);
+            if (err_stat_file.is_open()) {
+                std::string err_stat_atom;
+                err_stat_file >> err_stat_atom;
+                printf("%s:%s\n", ufs_err_stats_path.c_str(),
+                       err_stat_atom.c_str());
+                err_stat_file.close();
+            }
+        }
+    }
+
+    printf("\n------ UFS io_stats ------\n");
+    printf("\t\t%-12s %-12s %-12s %-12s %-12s %-12s\n", "ReadCnt", "ReadBytes",
+           "WriteCnt", "WriteBytes", "RWCnt", "RWBytes");
+    const std::string ufs_io_stats = "/dev/sys/block/bootdevice/io_stats/";
+    const std::string iostats_seq[3] = {"_start", "_complete", "_maxdiff"};
+    const std::string iostats[6] = {"rcnt", "rbyte", "wcnt", "wbyte", "rwcnt",
+            "rwbyte"};
+
+    for (int i = 0; i < 3; i++) {
+        const std::string header[3] = {"Started: \t", "Completed: \t",
+                "MaxDiff: \t"};
+        printf("%s", header[i].c_str());
+        for (int j = 0; j < 6; j++) {
+            std::string iostat_path = ufs_io_stats.c_str();
+            iostat_path.append(iostats[j].c_str());
+            iostat_path.append(iostats_seq[i].c_str());
+            std::ifstream io_stats_file(iostat_path.c_str());
+            unsigned long io_stat_atom = 0;
+            if (io_stats_file.is_open()) {
+                io_stats_file >> io_stat_atom;
+                printf("%-12lu ", io_stat_atom);
+                io_stats_file.close();
+            }
+        }
+        printf("\n");
+    }
+
+    printf("\n------ UFS req_stats ------\n");
+    printf("\t%-12s %-12s %-12s %-12s %-12s %-12s\n", "All", "Write", "Read",
+           "Security", "Flush", "Discard");
+    const std::string ufs_req_stats = "/dev/sys/block/bootdevice/req_stats/";
+    const std::string reqstats_seq[4] = {"_min", "_max", "_avg", "_sum"};
+    const std::string reqstats[6] = {"all", "write", "read", "security",
+            "flush", "discard"};
+
+    for (int i = 0; i < 4; i++) {
+        const std::string header[4] = {"Min:\t", "Max: \t", "Avg: \t",
+                "Count: \t"};
+        printf("%s", header[i].c_str());
+        for (int j = 0; j < 6; j++) {
+            std::string reqstat_path = ufs_req_stats.c_str();
+            reqstat_path.append(reqstats[j].c_str());
+            reqstat_path.append(reqstats_seq[i].c_str());
+            std::ifstream req_stats_file(reqstat_path.c_str());
+            unsigned long req_stat_atom = 0;
+            if (req_stats_file.is_open()) {
+                req_stats_file >> req_stat_atom;
+                printf("%-12lu ", req_stat_atom);
+                req_stats_file.close();
+            }
+        }
+        printf("\n");
+    }
+
+    printf("\n------ UFS health ------\n");
+    dumpFileContent(
+            "",
+            "/dev/sys/block/bootdevice/health_descriptor/life_time_estimation_a");
+    dumpFileContent(
+            "",
+            "/dev/sys/block/bootdevice/health_descriptor/life_time_estimation_b");
+    dumpFileContent("", "/dev/sys/block/bootdevice/health_descriptor/eol_info");
+    dumpFileContent(
+            "",
+            "/dev/sys/block/bootdevice/health_descriptor/life_time_estimation_c");
+
+    return 0;
+}
diff --git a/storage/dump_storage.sh b/storage/dump_storage.sh
deleted file mode 100644
index 5f08fc1..0000000
--- a/storage/dump_storage.sh
+++ /dev/null
@@ -1,68 +0,0 @@
-#!/vendor/bin/sh
-# F2FS
-echo "--- F2FS status---"
-cat "/sys/kernel/debug/f2fs/status"
-echo "\n--- F2FS fsck ---"
-cat "/dev/fscklogs/fsck"
-echo "\n--- F2FS - fsck time (ms) ---"
-getprop ro.boottime.init.fsck.data
-echo "\n--- F2FS - checkpoint=disable time (ms) ---"
-getprop ro.boottime.init.mount.data
-
-# UFS
-echo "\n------ UFS model (/sys/block/sda/device/model) ------"
-cat "/sys/block/sda/device/model"
-echo "\n------ UFS rev (/sys/block/sda/device/rev) ------"
-cat "/sys/block/sda/device/rev"
-echo "\n------ UFS size (/sys/block/sda/size) ------"
-cat "/sys/block/sda/size"
-
-echo "\n------ UFS Slow IO Read (/dev/sys/block/bootdevice/slowio_read_cnt) ------"
-cat "/dev/sys/block/bootdevice/slowio_read_cnt"
-echo "\n------ UFS Slow IO Write (/dev/sys/block/bootdevice/slowio_write_cnt) ------"
-cat "/dev/sys/block/bootdevice/slowio_write_cnt"
-echo "\n------ UFS Slow IO Unmap (/dev/sys/block/bootdevice/slowio_unmap_cnt) ------"
-cat "/dev/sys/block/bootdevice/slowio_unmap_cnt"
-echo "\n------ UFS Slow IO Sync (/dev/sys/block/bootdevice/slowio_sync_cnt) ------"
-cat "/dev/sys/block/bootdevice/slowio_sync_cnt"
-
-echo "\n------ UFS err_stats ------"
-path="/dev/sys/block/bootdevice/err_stats";
-for node in `ls $path/* | grep -v reset_err_status`
-do
-  printf "%s:%d\n" $(basename $node) $(cat $node)
-done
-
-
-echo "\n------ UFS io_stats ------"
-path="/dev/sys/block/bootdevice/io_stats"
-printf "\t\t%-12s %-12s %-12s %-12s %-12s %-12s\n" ReadCnt ReadBytes WriteCnt WriteBytes RWCnt RWBytes
-str=$(cat $path/*_start); arr=($str);
-printf "Started: \t%-12s %-12s %-12s %-12s %-12s %-12s\n" ${arr[1]} ${arr[0]} ${arr[5]} ${arr[4]} ${arr[3]} ${arr[2]}
-str=$(cat $path/*_complete); arr=($str);
-printf "Completed: \t%-12s %-12s %-12s %-12s %-12s %-12s\n" ${arr[1]} ${arr[0]} ${arr[5]} ${arr[4]} ${arr[3]} ${arr[2]}
-str=$(cat $path/*_maxdiff); arr=($str);
-printf "MaxDiff: \t%-12s %-12s %-12s %-12s %-12s %-12s\n\n" ${arr[1]} ${arr[0]} ${arr[5]} ${arr[4]} ${arr[3]} ${arr[2]}
-
-echo "\n------ UFS req_stats ------"
-path="/dev/sys/block/bootdevice/req_stats"
-printf "\t%-12s %-12s %-12s %-12s %-12s %-12s\n" All Write Read Security Flush Discard
-str=$(cat $path/*_min); arr=($str);
-printf "Min:\t%-12s %-12s %-12s %-12s %-12s %-12s\n" ${arr[0]} ${arr[5]} ${arr[3]} ${arr[4]} ${arr[2]} ${arr[1]}
-str=$(cat $path/*_max); arr=($str);
-printf "Max:\t%-12s %-12s %-12s %-12s %-12s %-12s\n" ${arr[0]} ${arr[5]} ${arr[3]} ${arr[4]} ${arr[2]} ${arr[1]}
-str=$(cat $path/*_avg); arr=($str);
-printf "Avg.:\t%-12s %-12s %-12s %-12s %-12s %-12s\n" ${arr[0]} ${arr[5]} ${arr[3]} ${arr[4]} ${arr[2]} ${arr[1]}
-str=$(cat $path/*_sum); arr=($str);
-printf "Count:\t%-12s %-12s %-12s %-12s %-12s %-12s\n\n" ${arr[0]} ${arr[5]} ${arr[3]} ${arr[4]} ${arr[2]} ${arr[1]}
-
-echo "\n------ UFS health ------"
-for f in $(find /dev/sys/block/bootdevice/health_descriptor -type f)
-do
-  if [[ -r $f && -f $f ]]; then
-    echo --- $f
-    cat $f
-    echo ''
-  fi
-done
-
diff --git a/storage/sepolicy/dump_storage.te b/storage/sepolicy/dump_storage.te
index 9411f8e..a404ee2 100644
--- a/storage/sepolicy/dump_storage.te
+++ b/storage/sepolicy/dump_storage.te
@@ -1,6 +1,5 @@
 pixel_bugreport(dump_storage)
 
-allow dump_storage vendor_toolbox_exec:file execute_no_trans;
 allow dump_storage sysfs_scsi_devices_0000:dir r_dir_perms;
 allow dump_storage sysfs_scsi_devices_0000:file r_file_perms;
 
diff --git a/storage/sepolicy/file_contexts b/storage/sepolicy/file_contexts
index eda4cf7..e4e41cb 100644
--- a/storage/sepolicy/file_contexts
+++ b/storage/sepolicy/file_contexts
@@ -1 +1 @@
-/vendor/bin/dump/dump_storage\.sh      u:object_r:dump_storage_exec:s0
+/vendor/bin/dump/dump_storage      u:object_r:dump_storage_exec:s0
diff --git a/storage/storage.mk b/storage/storage.mk
index cd0556d..ee7110c 100644
--- a/storage/storage.mk
+++ b/storage/storage.mk
@@ -1,6 +1,6 @@
 BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/storage/sepolicy
 
-PRODUCT_PACKAGES += dump_storage.sh
+PRODUCT_PACKAGES += dump_storage
 
 # Pixel storage tool
 PRODUCT_PACKAGES_DEBUG += \
diff --git a/touch/syna/dump_syna.sh b/touch/syna/dump_syna.sh
index d30ff36..d749eff 100644
--- a/touch/syna/dump_syna.sh
+++ b/touch/syna/dump_syna.sh
@@ -1,5 +1,5 @@
 #!/vendor/bin/sh
-path="/sys/devices/platform/10d10000.spi/spi_master/spi0/spi0.0/synaptics_tcm.0/sysfs"
+path=`getprop ro.vendor.touch.dump.sys`
 
 echo "Enable Force Touch Active"
 echo 21 > $path/force_active
diff --git a/touch/syna/sepolicy/dump_syna.te b/touch/syna/sepolicy/dump_syna.te
index 38655e7..fb9705c 100644
--- a/touch/syna/sepolicy/dump_syna.te
+++ b/touch/syna/sepolicy/dump_syna.te
@@ -3,3 +3,6 @@
 allow dump_syna sysfs_touch:dir r_dir_perms;
 allow dump_syna sysfs_touch:file rw_file_perms;
 allow dump_syna vendor_toolbox_exec:file execute_no_trans;
+
+get_prop(dump_syna, vendor_touch_dump_path_prop)
+
diff --git a/touch/syna/sepolicy/genfs_contexts b/touch/syna/sepolicy/genfs_contexts
index de55bf3..2a8f9e3 100644
--- a/touch/syna/sepolicy/genfs_contexts
+++ b/touch/syna/sepolicy/genfs_contexts
@@ -1,2 +1,3 @@
 genfscon sysfs /devices/platform/10d10000.spi/spi_master/spi0/spi0.0/synaptics_tcm.0/sysfs   u:object_r:sysfs_touch:s0
+genfscon sysfs /devices/platform/111d0000.spi/spi_master/spi20/spi20.0/synaptics_tcm.0/sysfs   u:object_r:sysfs_touch:s0
 
diff --git a/touch/syna/sepolicy/property.te b/touch/syna/sepolicy/property.te
new file mode 100644
index 0000000..5484690
--- /dev/null
+++ b/touch/syna/sepolicy/property.te
@@ -0,0 +1 @@
+vendor_internal_prop(vendor_touch_dump_path_prop)
diff --git a/touch/syna/sepolicy/property_contexts b/touch/syna/sepolicy/property_contexts
new file mode 100644
index 0000000..524cc8b
--- /dev/null
+++ b/touch/syna/sepolicy/property_contexts
@@ -0,0 +1 @@
+ro.vendor.touch.dump. u:object_r:vendor_touch_dump_path_prop:s0
diff --git a/touch/syna/sepolicy/vendor_init.te b/touch/syna/sepolicy/vendor_init.te
new file mode 100644
index 0000000..74a6666
--- /dev/null
+++ b/touch/syna/sepolicy/vendor_init.te
@@ -0,0 +1 @@
+set_prop(vendor_init, vendor_touch_dump_path_prop)
diff --git a/touch/syna/syna.mk b/touch/syna/syna.mk
deleted file mode 100644
index 7f137a0..0000000
--- a/touch/syna/syna.mk
+++ /dev/null
@@ -1,3 +0,0 @@
-BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/syna/sepolicy
-
-PRODUCT_PACKAGES += dump_syna.sh
diff --git a/touch/syna/syna0.mk b/touch/syna/syna0.mk
new file mode 100644
index 0000000..fe2b0c5
--- /dev/null
+++ b/touch/syna/syna0.mk
@@ -0,0 +1,5 @@
+PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.sys=/sys/devices/platform/10d10000.spi/spi_master/spi0/spi0.0/synaptics_tcm.0/sysfs
+
+BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/syna/sepolicy
+
+PRODUCT_PACKAGES += dump_syna.sh
diff --git a/touch/syna/syna20.mk b/touch/syna/syna20.mk
new file mode 100644
index 0000000..600f1ff
--- /dev/null
+++ b/touch/syna/syna20.mk
@@ -0,0 +1,5 @@
+PRODUCT_VENDOR_PROPERTIES += ro.vendor.touch.dump.sys=/sys/devices/platform/111d0000.spi/spi_master/spi20/spi20.0/synaptics_tcm.0/sysfs
+
+BOARD_VENDOR_SEPOLICY_DIRS += device/google/gs-common/touch/syna/sepolicy
+
+PRODUCT_PACKAGES += dump_syna.sh