├── .github └── ISSUE_TEMPLATE │ └── testing.md ├── .gitignore ├── Android.bp ├── Android.mk ├── README.md ├── barbet └── config.json ├── blueline └── config.json ├── bonito └── config.json ├── bramble └── config.json ├── coral └── config.json ├── crosshatch └── config.json ├── execute-all.sh ├── flame └── config.json ├── hostTools ├── Darwin │ └── bin │ │ ├── dexrepair │ │ ├── jq │ │ └── simg2img ├── Java │ ├── baksmali.jar │ ├── oat2dex.jar │ └── smali.jar └── Linux │ └── bin │ ├── dexrepair │ ├── jq │ └── simg2img ├── redfin └── config.json ├── rro_overlays └── CarrierConfigOverlay │ ├── Android.bp │ └── AndroidManifest.xml ├── sargo └── config.json ├── scripts ├── carriersettings-extractor │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── carriersettings.proto │ ├── carriersettings_extractor.py │ ├── carriersettings_pb2.py │ ├── download_carrier_list.sh │ └── vendor │ │ ├── carrierId.proto │ │ └── carrierId_pb2.py ├── common.sh ├── constants.sh ├── download-nexus-image.sh ├── extract-factory-images.sh ├── extract-ota.sh ├── extract_android_ota_payload │ ├── .gitignore │ ├── Makefile │ ├── README.md │ ├── extract_android_ota_payload.py │ ├── requirements.txt │ ├── update_metadata.proto │ └── update_metadata_pb2.py ├── gen-prop-blobs-list.sh ├── generate-vendor.sh ├── realpath.sh └── system-img-repair.sh ├── sunfish └── config.json ├── taimen └── config.json └── walleye └── config.json /.github/ISSUE_TEMPLATE/testing.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Testing 3 | about: Checklist for testing vendor ports 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | - [ ] Verified Boot 11 | - [ ] Wi-Fi 12 | - [ ] Bluetooth 13 | - [ ] Camera 14 | - [ ] Sound 15 | - [ ] Biometrics - fingerprint / face unlock 16 | - [ ] Flashlight / torch 17 | - [ ] GPS 18 | - [ ] Hotspot 19 | - [ ] NFC 20 | - [ ] Calls 21 | - [ ] Text Messages / SMS 22 | - [ ] Mobile data 23 | - [ ] VoLTE 24 | - [ ] Wi-Fi Calling 25 | - [ ] Quickly go through logs to make sure there's no obvious crashes / missing libs / etc 26 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | 3 | angler/* 4 | !angler/config.json 5 | !angler/overlays-* 6 | 7 | bullhead/* 8 | !bullhead/config.json 9 | !bullhead/overlays-* 10 | 11 | flounder/* 12 | !flounder/config.json 13 | !flounder/overlays-* 14 | 15 | sailfish/* 16 | !sailfish/config.json 17 | !sailfish/overlays-* 18 | 19 | marlin/* 20 | !marlin/config.json 21 | !marlin/overlays-* 22 | 23 | walleye/* 24 | !walleye/config.json 25 | !walleye/overlays-* 26 | 27 | taimen/* 28 | !taimen/config.json 29 | !taimen/overlays-* 30 | 31 | blueline/* 32 | !blueline/config.json 33 | !blueline/overlays-* 34 | 35 | crosshatch/* 36 | !crosshatch/config.json 37 | !crosshatch/overlays-* 38 | 39 | sargo/* 40 | !sargo/config.json 41 | !sargo/overlays-* 42 | 43 | bonito/* 44 | !bonito/config.json 45 | !bonito/overlays-* 46 | 47 | flame/* 48 | !flame/config.json 49 | !flame/overlays-* 50 | 51 | coral/* 52 | !coral/config.json 53 | !coral/overlays-* 54 | 55 | sunfish/* 56 | !sunfish/config.json 57 | !sunfish/overlays-* 58 | 59 | redfin/* 60 | !redfin/config.json 61 | !redfin/overlays-* 62 | 63 | bramble/* 64 | !bramble/config.json 65 | !bramble/overlays-* 66 | 67 | barbet/* 68 | !barbet/config.json 69 | !barbet/overlays-* 70 | 71 | # oatdump host tools are downloaded on first run and are not part of the repo 72 | hostTools/Linux/api* 73 | hostTools/Darwin/api* 74 | -------------------------------------------------------------------------------- /Android.bp: -------------------------------------------------------------------------------- 1 | soong_namespace { 2 | } 3 | -------------------------------------------------------------------------------- /Android.mk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AOSPAlliance/android-prepare-vendor/7f332a53cebb3898b6e062b3f5fc6975d10f67d8/Android.mk -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # No longer maintained 2 | 3 | * This project didn't get updated for Android 12 nor 13 4 | * https://github.com/kdrag0n/adevtool is an incredibly fast replacement, and does a lot more! 5 | 6 | ============================================================================================= 7 | 8 | ## Introduction 9 | For the latest Android devices (Nexus and Pixel), Google is no longer providing 10 | vendor binary archives to be included into AOSP build tree. Officially it is 11 | claimed that all vendor proprietary blobs have been moved to `/vendor` 12 | partition, which allegedly doesn't need building from users. Unfortunately, that 13 | is not the case since quite a few proprietary executables, DSOs and APKs/JARs 14 | located under `/system` are required in order to have a fully functional set of 15 | images, although are missing from AOSP public tree. Additionally, if 16 | `vendor.img` is not generated when `system.img` is prepared for build, a few 17 | bits are broken that also require manual fixing (various symbolic links between 18 | two partitions, bytecode product packages, vendor shared library dependencies, 19 | etc.). 20 | 21 | Everyone's hope is that Google **will revise** this policy for its devices. 22 | However until then, missing blobs need to be manually extracted from factory 23 | images, processed and included into AOSP tree. These processing steps are 24 | evolving into a total nightmare considering that all recent factory images have 25 | their bytecode (APKs, JARs) pre-optimized to reduce boot time and their original 26 | `classes.dex` stripped to reduce disk size. As such, these missing prebuilt 27 | components need to be repaired/de-optimized prior to be included, since AOSP 28 | build is not capable to import pre-optimized bytecode modules as part of the 29 | makefile tree. 30 | 31 | Scripts & tools included in this repository aim to automate the extraction, 32 | processing and generation of vendor specific data using factory images as 33 | input. Data from vendor partition is mirrored to blob includes via a compatible 34 | makefile structure, so that `vendor.img` can be generated from AOSP builds while 35 | specially annotating the vendor APKs to maintain pre-signed certificates and not 36 | pre-optimize. If you have modified the build process (such as CyanogenMod) you 37 | might need to apply additional changes in device configurations / makefiles. 38 | 39 | The main concept of this tool-set is to apply all required changes in vendor 40 | makefiles leaving the AOSP source code tree & build chain untouched. Hacks in 41 | AOSP tree, such as those applied by CyanogenMod, are painful to maintain and 42 | very fragile. 43 | 44 | Repository data is LICENSE free, use it as you want at your own risk. Feedback 45 | & patches are more than welcome though. 46 | 47 | 48 | ### Status update (12 Feb 2017) 49 | As of 7.1 release Google has started publishing again a set of vendor blobs for 50 | supported Nexus & Pixel devices. Unfortunately the distributed blobs still miss 51 | some functionality when compiled under AOSP: 52 | 53 | * Vendor partition is distributed in a form that does not allow to enable 54 | verified boot (dm-verity) against it 55 | * Distributed blobs do not include APK bytecode vendor packages, only some jar 56 | files. It is still unclear to what extent device functionalities are broken. 57 | * Due to missing proprietary modules, required modules present in AOSP are not 58 | included as active dependencies resulting into skipped functionality (e.g. IMS, 59 | RCS). 60 | 61 | ### Status update (15 Sep 2017) 62 | As of Oreo release (8.0) Google has improved the state of the proprietary vendor 63 | blobs for Pixel devices. State of supported Nexus devices has not changed much. 64 | For Pixel devices most vendor specific resources have been moved to vendor 65 | partition and thus simplify & reduce the amount of work that needs to be done 66 | to include /system dependencies. Furthermore, the original bytecode is no longer 67 | stripped from the factory APKs, enabling an easier inclusion of these resources 68 | to the generated vendor makefiles. 69 | 70 | 71 | ## Required steps summary 72 | The process to extract and import vendor proprietary blobs requires to: 73 | 74 | 1. Obtain device matching factory images archive from Google developer website 75 | (`scripts/download-nexus-image.sh`) 76 | * Users need to accept Google ToS for Nexus factory images 77 | 2. Extract images from archive, convert from sparse to raw, mount with ext4fuse 78 | & extract data (`scripts/extract-factory-images.sh`) 79 | * All vendor partition data are mirrored in order to generate a production 80 | identical `vendor.img` 81 | 3. Repair bytecode (APKs/JARs) from factory system image ( 82 | `scripts/system-img-repair.sh`) using one of supported bytecode de-optimization 83 | methods (see next paragraph for details) 84 | 4. Generate vendor proprietary includes & makefiles compatible with AOSP build 85 | tree (`scripts/generate-vendor.sh`) 86 | * Extra care in Makefile rules to not break compatibility among supported 87 | AOSP branches 88 | 89 | `execute-all.sh` runs all previous steps with required order. As an alternative 90 | to download images from Google's website, script can also read factory images 91 | from file-system location using the `-i|--img` flag. 92 | 93 | `-k|--keep` flag can be used if you want to keep extracted intermediate files 94 | for further investigation. Keep in mind that if used the mount-points from 95 | ext4fuse are not unmounted. So be sure that you manually remove them (or run 96 | the script again without the flag) when done. 97 | 98 | All scripts can be executed from macOS, Linux & other Unix-based systems as long 99 | as bash 4.x and other utilized command line tools are installed. Scripts will 100 | abort if any of the required tools is missing from the host. 101 | 102 | Scripts include individual usage info and additional flags that be used for 103 | targeted advanced actions, bugs investigation & development of new features. 104 | 105 | ## Supported bytecode de-optimization methods 106 | ### oatdump (Default for API >= 24 or `--oatdump` flag) 107 | Use oatdump host tool (`platform/art` project from AOSP) to extract DEX 108 | bytecode from OAT's ELF `.rodata` section. Extracted DEX is not identical to 109 | original since DEX-to-DEX compiler transformations have already been applied 110 | when code was pre-optimized (more info 111 | [here](https://github.com/anestisb/oatdump_plus#dex-to-dex-optimisations)). 112 | [dexrepair](https://github.com/anestisb/dexRepair) is also used to repair the 113 | extracted DEX file CRC checksum prior to appending bytecode back to matching 114 | APK package from which it has been originally stripped. More info about this 115 | method [here](https://github.com/anestisb/android-prepare-vendor/issues/22). 116 | 117 | ### baksmali / smali (`--smali` flag) 118 | Use baksmali disassembler against target OAT file to generate a smali syntaxed 119 | output. Disassembling process relies on boot framework files (which are 120 | automatically include) to resolve class dependencies. Baksmali output is then 121 | forwarded to smali assembler to generate a functionally equivalent DEX bytecode 122 | file. 123 | 124 | ### SmaliEx *[DEPRECATED]* (Default for API-23 or `--smaliex` flag) 125 | SmaliEx is an automation tool that is using baksmali/smali at the background and 126 | is smoothly handling all the required disassembler/assembler iterations and 127 | error handling. Unfortunately due to not quickly catching-up with upstream smali 128 | & dexlib it has been deprecated for now. 129 | 130 | ## Configuration files explained 131 | ### Naked vs Full 132 | Naked configuration group (enabled by default when using the master script) 133 | includes data & module targets required to have a functional device from AOSP 134 | without installing non-essential OEM packages. With this setup using Google Play 135 | Services / Google Apps will probably not work. 136 | 137 | On the other hand the full configuration group (enabled with `-f|--full` flag 138 | from master script) has additional blobs & module targets which are normally 139 | marked as non-essential, although might be required for some carriers or in case 140 | of GApps being installed (either manually post-boot or included as additional 141 | vendor blobs). 142 | 143 | 144 | ## Supported devices 145 | | Device | API 23 | API 24 | API 25 | API 26 | API 27 | API 28 | API 29 | 146 | | ------------------------------- | --------------------------- | -----------------| -----------------| --------| --------| --------| --------| 147 | | Pixel 2 walleye | N/A | N/A | N/A | oatdump | oatdump | oatdump | oatdump | 148 | | Pixel 2 XL taimen | N/A | N/A | N/A | oatdump | oatdump | oatdump | oatdump | 149 | | Pixel 3 blueline | N/A | N/A | N/A | N/A | N/A | oatdump | oatdump | 150 | | Pixel 3 XL crosshatch | N/A | N/A | N/A | N/A | N/A | oatdump | oatdump | 151 | | Pixel 3a sargo | N/A | N/A | N/A | N/A | N/A | oatdump | oatdump | 152 | | Pixel 3a XL bonito | N/A | N/A | N/A | N/A | N/A | oatdump | oatdump | 153 | | Pixel 4 flame | N/A | N/A | N/A | N/A | N/A | N/A | oatdump | 154 | | Pixel 4 XL coral | N/A | N/A | N/A | N/A | N/A | N/A | oatdump | 155 | 156 | 157 | Please check existing 158 | [issues](https://github.com/anestisb/android-prepare-vendor/issues) before 159 | reporting new ones 160 | 161 | ## Troubleshooting 162 | If you encounter Python errors in the `*_pb2.py` scripts, try installing 163 | the protobuf-compiler (`protoc`) package and then regenerating the 164 | parser code: 165 | 166 | make -C scripts/carriersettings-extractor clean all 167 | make -C scripts/extract_android_ota_payload clean all 168 | 169 | ## Contributing 170 | If you want to contribute to device configuration files, please test against the 171 | target device before any pull request. 172 | 173 | ## Change Log 174 | * 0.6.0 - TBC 175 | * Android 10 (API-29) support for Pixel 4 (flame) & Pixel 4 XL (coral) 176 | * Android 9 (API-28) support for Pixel 3a (sargo) & Pixel 3a XL (bonito) 177 | * Android 9 (API-28) support for Pixel 3 (blueline) & Pixel 3 XL (crosshatch) 178 | * Improve support for deterministic builds (`--timestamp` option) 179 | * Compatibility fixes in image downloader logic 180 | * Create output directory if does not exist 181 | * Remove prebuilts that are available in AOSP 182 | * 0.5.0 - 4 September 2018 183 | * Android 9 (API-28) support for Pixel (sailfish), Pixel XL (marlin), Pixel 2 (walleye) & Pixel 2 184 | XL (taimen) 185 | * Developed an oatdump patch (see 186 | [here](https://gist.github.com/anestisb/26ecf8ae13746dc476eddd8d04a5dd23)) to handle CompactDex 187 | introduced in Android 9 188 | * Use env's TMPDIR if set instead of defaulting to /tmp 189 | * Restore option to mount with fuse-ext2 (`--fuse-ext2`) 190 | * Add option to mount via loopback when running script as root 191 | * oatdump repair method performance improvements 192 | * Improve error handling and output formating 193 | * 0.4.1 - 11 August 2018 194 | * Pixel 2 (walleye) support for API 26 & 27 195 | * Pixel 2 XL (taimen) support for API 26 & 27 (credits to @deeproot2k) 196 | * Improve debugfs error checking due to improper symlink parsing from some versions 197 | * Deprecate fuse-ext2 and replace with ext4fuse 198 | * Update simg2img binaries for Darwin & Linux 199 | * 0.4.0 - 9 December 2017 200 | * Refactored configuration files 201 | * API-27 support: Pixel, Pixel XL, Nexus 6p, Nexus 5x 202 | * Various code cleanups 203 | * 0.3.0 - 9 October 2017 204 | * Initial support for Android Oreo (API-26): Pixel, Pixel XL, Nexus 6p, Nexus 205 | 5x 206 | * Add support for vendor overlays in order to override default AOSP resources 207 | that are tweaked for specific devices 208 | * 0.2.1 - 1 July 2017 209 | * Upgrade to smali/baksmali 2.2.1 210 | * Add support to maintain presigned APKs 211 | * Add missing AB partitions for Pixel OTA images 212 | * Fixed Pixel TimeService bug by adding `system/app/TimeService.apk` to 213 | extract list 214 | * 0.2.0 - 13 May 2017 215 | * Renamed GPlay configuration to Full configuration 216 | * Support for Pixel devices 217 | * Output can be directly set to AOSP SRC ROOT 218 | * Experimental debugfs support as an alternative to fuse-ext2 219 | * Bug fixes when processing symbolic links from vendor partition 220 | * Preserve symbolic links when processing vendor partition 221 | * Android 7.1 support for Nexus devices (API-25) 222 | * Follow HTTP redirects when downloading factory images 223 | * 0.1.7 - 8 Oct 2016 224 | * Nexus 9 LTE (volantisg) support 225 | * Offer option to de-optimize all packages under /system despite configuration 226 | settings 227 | * Deprecate SmaliEx and use baksmali/smali as an alternative method to deodex 228 | bytecode 229 | * Improve supported bytecode deodex methods modularity - users can now 230 | override default methods 231 | * Global flag to disable /system `LOCAL_DEX_PREOPT` overrides from vendor 232 | generate script 233 | * Respect `LOCAL_MULTILIB` `32` or `both` when 32bit bytecode prebuilts 234 | detected at 64bit devices 235 | * 0.1.6 - 4 Oct 2016 236 | * Download automation compatibility with refactored Google Nexus images 237 | website 238 | * Bug fixes when generating from OS X 239 | * 0.1.5 - 25 Sep 2016 240 | * Fixes issue with symlinks resolve when output path with spaces 241 | * Fixes bug when repairing multi-dex APKs with oatdump method 242 | * Introduced sorted data processing so that output is diff friendly 243 | * Include baseband & bootloader firmware at vendor blobs 244 | * Various performance optimizations 245 | * 0.1.4 - 17 Sep 2016 246 | * Split configuration into 2 groups: Naked & GPlay 247 | * Fix extra modules being ignored bug 248 | * 0.1.3 - 14 Sep 2016 249 | * Fix missing output path normalization which was corrupting symbolic links 250 | * 0.1.2 - 12 Sep 2016 251 | * Fix JAR META-INF repaired archives deletion bug 252 | * Improved fuse mount error handling 253 | * FAQ for common fuse mount issues 254 | * Extra defensive checks for /vendor/priv-app chosen signing certificate 255 | * 0.1.1 - 12 Sep 2016 256 | * Unbound variable bug fix when early error abort 257 | * 0.1.0 - 11 Sep 2016 258 | * Nougat API-24 support 259 | * Utilize fuse-ext2 to drop required root permissions 260 | * Implement new bytecode repair method 261 | * Read directly data from mount points - deprecate local rsync copies for 262 | speed 263 | * Add OS X support (requires OSXFuse) 264 | * Improved device configuration layers / files 265 | * AOSP compatibility bug fixes & performance optimizations 266 | 267 | ## Warnings 268 | * No binary vendor data against supported devices will be maintained in this 269 | repository. Scripts provide all necessary automation to generate them yourself. 270 | * No promises on how the device configuration files will be maintained. Feel 271 | free to contribute if you detect that something is broken, missing or not 272 | required. 273 | * Host tool binaries are provided for convenience, although with no promises 274 | that will be kept up-to-date. Prefer to adjust your env. with upstream versions 275 | and keep them updated. 276 | * If you experience `already defined` type of errors when AOSP makefiles are 277 | included, you have other vendor makefiles that define the same packages (e.g. 278 | hammerhead vs bullhead for LGE vendor). This issue is due to other vendor 279 | makefiles not wrapping them with `ifeq ($(TARGET_DEVICE),)`. 280 | Wrap conflicting makefiles with device matching clauses to resolve the issue. 281 | * If Smali or SmaliEx de-optimization method is chosen, Java 8 is required for 282 | the bytecode repair process to work. 283 | * Bytecode repaired with oatdump method might not be able to be pre-optimized 284 | when building AOSP. As such generated targets have `LOCAL_DEXPREOPT := false`. 285 | This is because host dex2oat is invoked with more strict flags and results into 286 | aborting when front-end reaches already optimized instructions. You can use 287 | `--force-opt` flag if you have modified the default host dex2oat bytecode 288 | pre-compilation flags. 289 | * If you're planning to deliver OTA updates for Nexus 5x, you need to manually 290 | extract `update-binary` from a factory OTA archive since it's missing from 291 | the AOSP tree due to some proprietary LG code. 292 | * Nexus 9 WiFi (volantis) & Nexus 9 LTE (volantisg) vendor blobs cannot co-exist 293 | under same AOSP root directory. Since AOSP defines a single flounder target for 294 | both boards, lots of definitions will conflict and create problems when building. 295 | As such ensure that only one of them is present when building for desired 296 | target. Generated makefiles include an additional defensive check that will 297 | raise a compiler error when both are detected under same AOSP root. 298 | * If tool output is not set to AOSP root directory, prefer `rsync` instead of 299 | `cp` or `mv` commands to copy the generated directory structure to different 300 | location. Some device configurations (e.g. Pixel/Pixel XL) share some root 301 | directories and might break if `cp` or `mv` are invoked with the wrong base 302 | paths. 303 | 304 | 305 | ## Examples 306 | ### API-24 (Nougat) N9 WiFi (alias volantis) flounder vendor generation after downloading factory image from website 307 | ``` 308 | $ ./execute-all.sh -d flounder -a volantis -b NRD91D -o /fast-datavault/nexus-vendor-blobs 309 | [*] Setting output base to '/fast-datavault/nexus-vendor-blobs/flounder/nrd91d' 310 | 311 | --{ Google Terms and Conditions 312 | Downloading of the system image and use of the device software is subject to the 313 | Google Terms of Service [1]. By continuing, you agree to the Google Terms of 314 | Service [1] and Privacy Policy [2]. Your downloading of the system image and use 315 | of the device software may also be subject to certain third-party terms of 316 | service, which can be found in Settings > About phone > Legal information, or as 317 | otherwise provided. 318 | 319 | [1] https://www.google.com/intl/en/policies/terms/ 320 | [2] https://www.google.com/intl/en/policies/privacy/ 321 | 322 | [?] I have read and agree with the above terms and conditions - ACKNOWLEDGE [y|n]: y 323 | [*] Downloading image from 'https://dl.google.com/dl/android/aosp/volantis-nrd91d-factory-a27db9bc.zip' 324 | --2016-10-05 21:53:17-- https://dl.google.com/dl/android/aosp/volantis-nrd91d-factory-a27db9bc.zip 325 | Resolving dl.google.com (dl.google.com)... 173.194.76.93, 173.194.76.190, 173.194.76.136, ... 326 | Connecting to dl.google.com (dl.google.com)|173.194.76.93|:443... connected. 327 | HTTP request sent, awaiting response... 200 OK 328 | Length: 793140236 (756M) [application/zip] 329 | Saving to: ‘/fast-datavault/nexus-vendor-blobs/flounder/nrd91d/volantis-nrd91d-factory-a27db9bc.zip’ 330 | 331 | s/flounder/nrd91d/volantis-nrd91d-factory-a27db9bc.zip 96%[======================================================================================================================> ] 733.49M 1.22MB/s eta 19s ^/fast-datavault/nexus-vendor-blobs/flounder/nrd91d/vol 100%[==========================================================================================================================>] 756.40M 1.19MB/s in 10m 21s 332 | 333 | 2016-10-05 22:03:39 (1.22 MB/s) - ‘/fast-datavault/nexus-vendor-blobs/flounder/nrd91d/volantis-nrd91d-factory-a27db9bc.zip’ saved [793140236/793140236] 334 | 335 | [*] Processing with 'API-24 config-naked' configuration 336 | [*] Extracting '/fast-datavault/nexus-vendor-blobs/flounder/nrd91d/volantis-nrd91d-factory-a27db9bc.zip' 337 | [*] Unzipping 'image-volantis-nrd91d.zip' 338 | [!] No baseband firmware present - skipping 339 | [!] System partition doesn't contain any pre-optimized files - link to original partition 340 | [*] Generating blobs for vendor/htc/flounder 341 | [*] Copying radio files '/fast-datavault/nexus-vendor-blobs/flounder/nrd91d/vendor/htc/flounder' 342 | [*] Copying product files & generating 'flounder-vendor-blobs.mk' makefile 343 | [*] Generating 'device-vendor.mk' 344 | [*] Generating 'AndroidBoardVendor.mk' 345 | [*] Bootloader:3.48.0.0139 346 | [*] Generating 'BoardConfigVendor.mk' 347 | [*] Generating 'vendor-board-info.txt' 348 | [*] Generating 'Android.mk' 349 | [*] Gathering data from 'vendor/app' APK/JAR pre-builts 350 | [*] Generating signatures file 351 | [*] All actions completed successfully 352 | [*] Import '/fast-datavault/nexus-vendor-blobs/flounder/nrd91d/vendor' to AOSP root 353 | ``` 354 | 355 | ### API-23 (Marshmallow) N5x vendor generation using factory image from file-system 356 | ``` 357 | $ ./execute-all.sh -d bullhead -i /fast-datavault/nexus-vendor-blobs/bullhead/mtc20k/bullhead-mtc20k-factory-4a950470.zip -b mtc20k -o /fast-datavault/nexus-vendor-blobs 358 | [*] Setting output base to '/fast-datavault/nexus-vendor-blobs/bullhead/mtc20k' 359 | [*] Processing with 'API-23 config-naked' configuration 360 | [*] Extracting '/fast-datavault/nexus-vendor-blobs/bullhead/mtc20k/bullhead-mtc20k-factory-4a950470.zip' 361 | [*] Unzipping 'image-bullhead-mtc20k.zip' 362 | [*] '20' bytecode archive files will be repaired 363 | [*] Repairing bytecode under /system partition using oat2dex method 364 | [*] Preparing environment for 'arm' ABI 365 | [*] Preparing environment for 'arm64' ABI 366 | [*] Start processing system partition & de-optimize pre-compiled bytecode 367 | [!] '/framework/cneapiclient.jar' not pre-optimized with sanity checks passed - copying without changes 368 | [!] '/framework/framework-res.apk' not pre-optimized & without 'classes.dex' - copying without changes 369 | [*] '/framework/framework.jar' is multi-dex - adjusting recursive archive adds 370 | [!] '/framework/rcsimssettings.jar' not pre-optimized with sanity checks passed - copying without changes 371 | [!] '/framework/rcsservice.jar' not pre-optimized with sanity checks passed - copying without changes 372 | [*] System partition successfully extracted & repaired at '/fast-datavault/nexus-vendor-blobs/bullhead/mtc20k/factory_imgs_repaired_data' 373 | [*] Generating blobs for vendor/lge/bullhead 374 | [*] Copying radio files '/fast-datavault/nexus-vendor-blobs/bullhead/mtc20k/vendor/lge/bullhead' 375 | [*] Copying product files & generating 'bullhead-vendor-blobs.mk' makefile 376 | [*] Generating 'device-vendor.mk' 377 | [*] Generating 'AndroidBoardVendor.mk' 378 | [*] Bootloader:BHZ10r 379 | [*] Baseband:M8994F-2.6.32.1.13 380 | [*] Generating 'BoardConfigVendor.mk' 381 | [*] Generating 'vendor-board-info.txt' 382 | [*] Generating 'Android.mk' 383 | [*] Gathering data from 'vendor/app' APK/JAR pre-builts 384 | [*] Gathering data from 'proprietary/app' APK/JAR pre-builts 385 | [*] Gathering data from 'proprietary/framework' APK/JAR pre-builts 386 | [*] Gathering data from 'proprietary/priv-app' APK/JAR pre-builts 387 | [*] Generating signatures file 388 | [*] All actions completed successfully 389 | [*] Import '/fast-datavault/nexus-vendor-blobs/bullhead/mtc20k/vendor' to AOSP root 390 | ``` 391 | -------------------------------------------------------------------------------- /flame/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "device-name": "pixel4", 3 | "device-model": "flame", 4 | "device-aliases": [], 5 | "vendor": "google", 6 | "aosp-vendor-dir": "google_devices", 7 | "device-family": "coral", 8 | "supported-apis": ["api-30"], 9 | "extra-partitions": [], 10 | "ota-partitions": [ 11 | "abl", 12 | "aop", 13 | "devcfg", 14 | "hyp", 15 | "keymaster", 16 | "modem", 17 | "qupfw", 18 | "tz", 19 | "uefisecapp", 20 | "xbl", 21 | "xbl_config" 22 | ], 23 | "AndroidMk": "flame/Android.mk", 24 | "BoardConfigVendorMk": "flame/BoardConfigVendorPartial.mk", 25 | "DeviceVendorMk": "coral/proprietary/device-vendor.mk", 26 | "api-30": { 27 | "naked": { 28 | "overlays-dir": "", 29 | "rro-overlays": ["CarrierConfigOverlay"], 30 | "product-bytecode": [], 31 | "product-other": [ 32 | "product/etc/apns-conf.xml", 33 | "product/lib/libdmengine.so", 34 | "product/lib/libdmjavaplugin.so", 35 | "product/lib/libqmi_cci_system.so", 36 | "product/lib/libqmi_encdec_system.so", 37 | "product/lib/libsdm-disp-apis.qti.so", 38 | "product/lib/vendor.display.color@1.0.so", 39 | "product/lib/vendor.qti.imsrtpservice@3.0.so", 40 | "product/lib64/libgdx.so", 41 | "product/lib64/libqmi_cci_system.so", 42 | "product/lib64/libqmi_encdec_system.so", 43 | "product/lib64/libsdm-disp-apis.qti.so", 44 | "product/lib64/libsketchology_native.so", 45 | "product/lib64/vendor.display.color@1.0.so", 46 | "product/lib64/vendor.qti.imsrtpservice@3.0.so" 47 | ], 48 | "system-bytecode": [], 49 | "system-other": [], 50 | "system_ext-bytecode": [ 51 | "system_ext/app/QtiTelephonyService/QtiTelephonyService.apk", 52 | "system_ext/app/datastatusnotification/datastatusnotification.apk", 53 | "system_ext/app/uceShimService/uceShimService.apk", 54 | "system_ext/framework/com.qualcomm.qti.uceservice-V2.1-java.jar", 55 | "system_ext/framework/qcrilhook.jar", 56 | "system_ext/framework/qti-telephony-hidl-wrapper.jar", 57 | "system_ext/framework/qti-telephony-utils.jar", 58 | "system_ext/framework/vendor.qti.hardware.alarm-V1.0-java.jar", 59 | "system_ext/framework/vendor.qti.hardware.data.latency-V1.0-java.jar", 60 | "system_ext/framework/vendor.qti.ims.callinfo-V1.0-java.jar", 61 | "system_ext/framework/vendor.qti.voiceprint-V1.0-java.jar", 62 | "system_ext/priv-app/ims/ims.apk", 63 | "system_ext/priv-app/qcrilmsgtunnel/qcrilmsgtunnel.apk" 64 | ], 65 | "system_ext-other": [ 66 | "system_ext/etc/permissions/com.qualcomm.qcrilmsgtunnel.xml", 67 | "system_ext/etc/permissions/com.qualcomm.qti.imscmservice-V2.0-java.xml", 68 | "system_ext/etc/permissions/com.qualcomm.qti.imscmservice-V2.1-java.xml", 69 | "system_ext/etc/permissions/com.qualcomm.qti.imscmservice-V2.2-java.xml", 70 | "system_ext/etc/permissions/org_codeaurora_ims.xml", 71 | "system_ext/etc/permissions/qcrilhook.xml", 72 | "system_ext/etc/permissions/qti_telephony_hidl_wrapper.xml", 73 | "system_ext/etc/permissions/qti_telephony_utils.xml", 74 | "system_ext/etc/permissions/telephonyservice.xml", 75 | "system_ext/lib/com.quicinc.cne.api@1.0.so", 76 | "system_ext/lib/com.quicinc.cne.api@1.1.so", 77 | "system_ext/lib/com.quicinc.cne.constants@1.0.so", 78 | "system_ext/lib/com.quicinc.cne.constants@2.0.so", 79 | "system_ext/lib/com.quicinc.cne.constants@2.1.so", 80 | "system_ext/lib/lib-imsvideocodec.so", 81 | "system_ext/lib/lib-imsvt.so", 82 | "system_ext/lib/lib-imsvtextutils.so", 83 | "system_ext/lib/lib-imsvtutils.so", 84 | "system_ext/lib/libimscamera_jni.so", 85 | "system_ext/lib/libimsmedia_jni.so", 86 | "system_ext/lib/libsecureui_svcsock_system.so", 87 | "system_ext/lib/libsecureuisvc_jni.so", 88 | "system_ext/lib/vendor.display.config@1.0.so", 89 | "system_ext/lib/vendor.display.config@1.1.so", 90 | "system_ext/lib/vendor.display.config@1.2.so", 91 | "system_ext/lib/vendor.display.config@1.3.so", 92 | "system_ext/lib/vendor.display.config@1.4.so", 93 | "system_ext/lib/vendor.display.config@1.5.so", 94 | "system_ext/lib/vendor.display.config@1.6.so", 95 | "system_ext/lib/vendor.display.config@1.7.so", 96 | "system_ext/lib/vendor.display.config@1.8.so", 97 | "system_ext/lib/vendor.display.postproc@1.0.so", 98 | "system_ext/lib/vendor.qti.hardware.alarm@1.0.so", 99 | "system_ext/lib/vendor.qti.hardware.data.iwlan@1.0.so", 100 | "system_ext/lib/vendor.qti.hardware.seccam@1.0.so", 101 | "system_ext/lib64/com.quicinc.cne.api@1.0.so", 102 | "system_ext/lib64/com.quicinc.cne.api@1.1.so", 103 | "system_ext/lib64/com.quicinc.cne.constants@1.0.so", 104 | "system_ext/lib64/com.quicinc.cne.constants@2.0.so", 105 | "system_ext/lib64/com.quicinc.cne.constants@2.1.so", 106 | "system_ext/lib64/lib-imsvideocodec.so", 107 | "system_ext/lib64/lib-imsvt.so", 108 | "system_ext/lib64/lib-imsvtextutils.so", 109 | "system_ext/lib64/lib-imsvtutils.so", 110 | "system_ext/lib64/libaptXHD_encoder.so", 111 | "system_ext/lib64/libaptX_encoder.so", 112 | "system_ext/lib64/libimscamera_jni.so", 113 | "system_ext/lib64/libimsmedia_jni.so", 114 | "system_ext/lib64/libsecureui_svcsock_system.so", 115 | "system_ext/lib64/libsecureuisvc_jni.so", 116 | "system_ext/lib64/vendor.display.config@1.0.so", 117 | "system_ext/lib64/vendor.display.config@1.1.so", 118 | "system_ext/lib64/vendor.display.config@1.2.so", 119 | "system_ext/lib64/vendor.display.config@1.3.so", 120 | "system_ext/lib64/vendor.display.config@1.4.so", 121 | "system_ext/lib64/vendor.display.config@1.5.so", 122 | "system_ext/lib64/vendor.display.config@1.6.so", 123 | "system_ext/lib64/vendor.display.config@1.7.so", 124 | "system_ext/lib64/vendor.display.config@1.8.so", 125 | "system_ext/lib64/vendor.display.postproc@1.0.so", 126 | "system_ext/lib64/vendor.qti.hardware.alarm@1.0.so", 127 | "system_ext/lib64/vendor.qti.hardware.data.iwlan@1.0.so", 128 | "system_ext/lib64/vendor.qti.hardware.seccam@1.0.so" 129 | ], 130 | "BoardConfigVendor": [], 131 | "dep-dso": [ 132 | "vendor/lib64/libsdsprpc.so", 133 | "vendor/lib/libsdsprpc.so", 134 | "vendor/lib64/libadsprpc.so", 135 | "vendor/lib/libadsprpc.so" 136 | ], 137 | "device-vendor": [], 138 | "forced-modules": [ 139 | "android.hardware.identity-support-lib.vendor", 140 | "chre", 141 | "ese_spi_st", 142 | "hardware.google.light@1.0.vendor", 143 | "libavservices_minijail_vendor", 144 | "libcamera2ndk_vendor", 145 | "libcld80211", 146 | "libcodec2_hidl@1.0.vendor", 147 | "libcodec2_vndk.vendor", 148 | "libcppbor.vendor", 149 | "libdrm.vendor", 150 | "libhidltransport.vendor", 151 | "libhwbinder.vendor", 152 | "libjson", 153 | "libkeymaster_messages.vendor", 154 | "libkeymaster_portable.vendor", 155 | "libmedia_ecoservice.vendor", 156 | "libnetfilter_conntrack", 157 | "libnfnetlink", 158 | "libnos", 159 | "libnos_client_citadel", 160 | "libnos_datagram", 161 | "libnos_datagram_citadel", 162 | "libnos_transport", 163 | "libnosprotos", 164 | "libpuresoftkeymasterdevice.vendor", 165 | "libqdMetaData", 166 | "libqdutils", 167 | "libqservice", 168 | "libsensorndkbridge", 169 | "libsoft_attestation_cert.vendor", 170 | "libstagefright_bufferpool@2.0.1.vendor", 171 | "libteeui_hal_support.vendor", 172 | "libtextclassifier_hash.vendor", 173 | "libtinycompress", 174 | "libtinyxml", 175 | "libwifi-hal-ctrl", 176 | "libwifi-hal-qcom", 177 | "nos_app_avb", 178 | "nos_app_identity", 179 | "nos_app_keymaster", 180 | "nos_app_weaver", 181 | "sound_trigger.primary.msmnile" 182 | ], 183 | "new-modules": [], 184 | "vendor-skip-files": [ 185 | "bin/applypatch", 186 | "bin/awk", 187 | "bin/boringssl_self_test32", 188 | "bin/boringssl_self_test64", 189 | "bin/checkpoint_gc", 190 | "bin/chre", 191 | "bin/dumpsys", 192 | "bin/hostapd_cli", 193 | "bin/hw/android.hardware.atrace@1.0-service.pixel", 194 | "bin/hw/android.hardware.audio.service", 195 | "bin/hw/android.hardware.boot@1.0-service", 196 | "bin/hw/android.hardware.boot@1.1-service", 197 | "bin/hw/android.hardware.camera.provider@2.6-service-google", 198 | "bin/hw/android.hardware.cas@1.2-service", 199 | "bin/hw/android.hardware.configstore@1.1-service", 200 | "bin/hw/android.hardware.contexthub@1.1-service.generic", 201 | "bin/hw/android.hardware.drm@1.0-service", 202 | "bin/hw/android.hardware.drm@1.3-service.clearkey", 203 | "bin/hw/android.hardware.dumpstate@1.1-service.coral", 204 | "bin/hw/android.hardware.graphics.composer@2.4-service-sm8150", 205 | "bin/hw/android.hardware.health.storage@1.0-service", 206 | "bin/hw/android.hardware.health@2.1-service", 207 | "bin/hw/android.hardware.media.omx@1.0-service", 208 | "bin/hw/android.hardware.memtrack@1.0-service", 209 | "bin/hw/android.hardware.nfc@1.2-service.st", 210 | "bin/hw/android.hardware.power-service.pixel-libperfmgr", 211 | "bin/hw/android.hardware.power.stats@1.0-service.pixel", 212 | "bin/hw/android.hardware.secure_element@1.0-service.st", 213 | "bin/hw/android.hardware.sensors@2.0-service.multihal", 214 | "bin/hw/android.hardware.thermal@2.0-service.pixel", 215 | "bin/hw/android.hardware.usb@1.2-service.coral", 216 | "bin/hw/android.hardware.vibrator-service.cs40l25", 217 | "bin/hw/hardware.google.light@1.1-service", 218 | "bin/hw/hostapd", 219 | "bin/hw/wait_for_strongbox", 220 | "bin/hw/wpa_supplicant", 221 | "bin/ipacm", 222 | "bin/logwrapper", 223 | "bin/misc_writer", 224 | "bin/pixelstats-vendor", 225 | "bin/sh", 226 | "bin/vndservice", 227 | "bin/vndservicemanager", 228 | "etc/IPACM_cfg.xml", 229 | "etc/fs_config_dirs", 230 | "etc/fs_config_files", 231 | "etc/group", 232 | "etc/init/android.hardware.atrace@1.0-service.pixel.rc", 233 | "etc/init/android.hardware.audio.service.rc", 234 | "etc/init/android.hardware.boot@1.0-service.rc", 235 | "etc/init/android.hardware.boot@1.1-service.rc", 236 | "etc/init/android.hardware.camera.provider@2.6-service-google.rc", 237 | "etc/init/android.hardware.cas@1.2-service.rc", 238 | "etc/init/android.hardware.configstore@1.1-service.rc", 239 | "etc/init/android.hardware.contexthub@1.1-service-generic.rc", 240 | "etc/init/android.hardware.drm@1.0-service.rc", 241 | "etc/init/android.hardware.drm@1.3-service.clearkey.rc", 242 | "etc/init/android.hardware.dumpstate@1.1-service.coral.rc", 243 | "etc/init/android.hardware.graphics.composer@2.4-service-sm8150.rc", 244 | "etc/init/android.hardware.health.storage@1.0-service.rc", 245 | "etc/init/android.hardware.health@2.1-service.rc", 246 | "etc/init/android.hardware.media.omx@1.0-service.rc", 247 | "etc/init/android.hardware.memtrack@1.0-service.rc", 248 | "etc/init/android.hardware.nfc@1.2-service.st.rc", 249 | "etc/init/android.hardware.power-service.pixel-libperfmgr.rc", 250 | "etc/init/android.hardware.power.stats@1.0-service.pixel.rc", 251 | "etc/init/android.hardware.secure_element@1.0-service.st.rc", 252 | "etc/init/android.hardware.sensors@2.0-service-multihal.rc", 253 | "etc/init/android.hardware.thermal@2.0-service.pixel.rc", 254 | "etc/init/android.hardware.usb@1.2-service.coral.rc", 255 | "etc/init/android.hardware.vibrator-service.cs40l25.rc", 256 | "etc/init/android.hardware.wifi.supplicant-service.rc", 257 | "etc/init/boringssl_self_test.rc", 258 | "etc/init/chre_daemon.rc", 259 | "etc/init/hardware.google.light@1.1-service.rc", 260 | "etc/init/hostapd.android.rc", 261 | "etc/init/init.pixel.rc", 262 | "etc/init/ipacm.rc", 263 | "etc/init/pixelstats-vendor.coral.rc", 264 | "etc/init/vendor_flash_recovery.rc", 265 | "etc/init/vndservicemanager.rc", 266 | "etc/mkshrc", 267 | "etc/passwd", 268 | "etc/seccomp_policy/configstore@1.1.policy", 269 | "etc/selinux/plat_pub_versioned.cil", 270 | "etc/selinux/precompiled_sepolicy.plat_sepolicy_and_mapping.sha256", 271 | "etc/selinux/precompiled_sepolicy.product_sepolicy_and_mapping.sha256", 272 | "etc/selinux/precompiled_sepolicy.system_ext_sepolicy_and_mapping.sha256", 273 | "etc/selinux/selinux_denial_metadata", 274 | "etc/selinux/vendor_file_contexts", 275 | "etc/selinux/vendor_hwservice_contexts", 276 | "etc/selinux/vendor_mac_permissions.xml", 277 | "etc/selinux/vendor_property_contexts", 278 | "etc/selinux/vendor_seapp_contexts", 279 | "etc/selinux/vendor_sepolicy.cil", 280 | "etc/selinux/vendor_service_contexts", 281 | "etc/vintf/compatibility_matrix.xml", 282 | "etc/vintf/manifest.xml", 283 | "etc/vintf/manifest/android.hardware.atrace@1.0-service.pixel.xml", 284 | "etc/vintf/manifest/android.hardware.boot@1.1.xml", 285 | "etc/vintf/manifest/android.hardware.camera.provider@2.6-service-google.xml", 286 | "etc/vintf/manifest/android.hardware.cas@1.2-service.xml", 287 | "etc/vintf/manifest/android.hardware.contexthub@1.1-generic.xml", 288 | "etc/vintf/manifest/android.hardware.health@2.1.xml", 289 | "etc/vintf/manifest/android.hardware.power-service.pixel.xml", 290 | "etc/vintf/manifest/android.hardware.sensors@2.0-multihal.xml", 291 | "etc/vintf/manifest/android.hardware.thermal@2.0-service.pixel.xml", 292 | "etc/vintf/manifest/android.hardware.usb.gadget@1.1-service.coral.xml", 293 | "etc/vintf/manifest/android.hardware.usb@1.2-service.coral.xml", 294 | "etc/vintf/manifest/android.hardware.vibrator-service.cs40l25.xml", 295 | "etc/vintf/manifest/android.hardware.wifi.hostapd.xml", 296 | "etc/vintf/manifest/manifest.xml", 297 | "etc/vintf/manifest/manifest_android.hardware.drm@1.3-service.clearkey.xml", 298 | "etc/vintf/manifest/manifest_android.hardware.health.storage@1.0.xml", 299 | "etc/vintf/manifest/manifest_wifi_ext.xml", 300 | "lib/android.hardware.audio.common-util.so", 301 | "lib/android.hardware.audio.common@5.0-util.so", 302 | "lib/android.hardware.audio.common@6.0-util.so", 303 | "lib/android.hardware.sensors@2.0-ScopedWakelock.so", 304 | "lib/ese_spi_st.so", 305 | "lib/hardware.google.light@1.0.so", 306 | "lib/hw/adnc_strm.primary.default.so", 307 | "lib/hw/android.hardware.audio.effect@6.0-impl.so", 308 | "lib/hw/android.hardware.audio@6.0-impl.so", 309 | "lib/hw/android.hardware.bluetooth.audio@2.0-impl.so", 310 | "lib/hw/android.hardware.boot@1.0-impl-1.1-pixel-legacy.so", 311 | "lib/hw/android.hardware.boot@1.0-impl.so", 312 | "lib/hw/android.hardware.drm@1.0-impl.so", 313 | "lib/hw/android.hardware.health@2.0-impl-2.1-coral.so", 314 | "lib/hw/android.hardware.memtrack@1.0-impl.so", 315 | "lib/hw/android.hardware.renderscript@1.0-impl.so", 316 | "lib/hw/android.hardware.soundtrigger@2.2-impl.so", 317 | "lib/hw/android.hardware.soundtrigger@2.3-impl.so", 318 | "lib/hw/audio.bluetooth.default.so", 319 | "lib/hw/audio.primary.default.so", 320 | "lib/hw/audio.r_submix.default.so", 321 | "lib/hw/audio.usb.default.so", 322 | "lib/hw/bootctrl.msmnile.so", 323 | "lib/hw/gralloc.default.so", 324 | "lib/hw/local_time.default.so", 325 | "lib/hw/power.default.so", 326 | "lib/hw/sensors.flame.so", 327 | "lib/hw/sound_trigger.primary.msmnile.so", 328 | "lib/hw/vibrator.default.so", 329 | "lib/libalsautils.so", 330 | "lib/libavservices_minijail.so", 331 | "lib/libavservices_minijail_vendor.so", 332 | "lib/libbatching.so", 333 | "lib/libbluetooth_audio_session.so", 334 | "lib/libcamera2ndk_vendor.so", 335 | "lib/libcld80211.so", 336 | "lib/libcodec2_hidl@1.0.so", 337 | "lib/libcodec2_vndk.so", 338 | "lib/libdrm.so", 339 | "lib/libeffects.so", 340 | "lib/libeffectsconfig.so", 341 | "lib/libgeofencing.so", 342 | "lib/libgnss.so", 343 | "lib/libgooglecamerahal.so", 344 | "lib/libgooglecamerahalutils.so", 345 | "lib/libgps.utils.so", 346 | "lib/libhidltransport.so", 347 | "lib/libhwbinder.so", 348 | "lib/libjson.so", 349 | "lib/libloc_core.so", 350 | "lib/liblocation_api.so", 351 | "lib/libmedia_ecoservice.so", 352 | "lib/libnbaio_mono.so", 353 | "lib/libodsp.so", 354 | "lib/libopus.so", 355 | "lib/libpixelhealth.so", 356 | "lib/libprotobuf-cpp-full-3.9.1.so", 357 | "lib/libprotobuf-cpp-full.so", 358 | "lib/libprotobuf-cpp-lite-3.9.1.so", 359 | "lib/libreference-ril.so", 360 | "lib/libril.so", 361 | "lib/librilutils.so", 362 | "lib/libsensorndkbridge.so", 363 | "lib/libstagefright_amrnb_common.so", 364 | "lib/libstagefright_bufferpool@2.0.1.so", 365 | "lib/libstagefright_enc_common.so", 366 | "lib/libstagefright_flacdec.so", 367 | "lib/libstagefright_soft_aacdec.so", 368 | "lib/libstagefright_soft_aacenc.so", 369 | "lib/libstagefright_soft_amrdec.so", 370 | "lib/libstagefright_soft_amrnbenc.so", 371 | "lib/libstagefright_soft_amrwbenc.so", 372 | "lib/libstagefright_soft_avcdec.so", 373 | "lib/libstagefright_soft_avcenc.so", 374 | "lib/libstagefright_soft_flacdec.so", 375 | "lib/libstagefright_soft_flacenc.so", 376 | "lib/libstagefright_soft_g711dec.so", 377 | "lib/libstagefright_soft_gsmdec.so", 378 | "lib/libstagefright_soft_hevcdec.so", 379 | "lib/libstagefright_soft_mp3dec.so", 380 | "lib/libstagefright_soft_mpeg2dec.so", 381 | "lib/libstagefright_soft_mpeg4dec.so", 382 | "lib/libstagefright_soft_mpeg4enc.so", 383 | "lib/libstagefright_soft_opusdec.so", 384 | "lib/libstagefright_soft_rawdec.so", 385 | "lib/libstagefright_soft_vorbisdec.so", 386 | "lib/libstagefright_soft_vpxdec.so", 387 | "lib/libstagefright_soft_vpxenc.so", 388 | "lib/libstagefright_softomx.so", 389 | "lib/libstagefright_softomx_plugin.so", 390 | "lib/libtinycompress.so", 391 | "lib/libtinyxml.so", 392 | "lib/libtunnel.so", 393 | "lib/libvorbisidec.so", 394 | "lib/libvpx.so", 395 | "lib/libwebrtc_audio_preprocessing.so", 396 | "lib/libwifi-hal-ctrl.so", 397 | "lib/libwifi-hal-qcom.so", 398 | "lib/libwpa_client.so", 399 | "lib/mediacas/libclearkeycasplugin.so", 400 | "lib/mediadrm/libdrmclearkeyplugin.so", 401 | "lib/modules/adsp_loader_dlkm.ko", 402 | "lib/modules/apr_dlkm.ko", 403 | "lib/modules/cs35l36_dlkm.ko", 404 | "lib/modules/ftm5.ko", 405 | "lib/modules/heatmap.ko", 406 | "lib/modules/incrementalfs.ko", 407 | "lib/modules/lkdtm.ko", 408 | "lib/modules/machine_dlkm.ko", 409 | "lib/modules/mbhc_dlkm.ko", 410 | "lib/modules/modules.alias", 411 | "lib/modules/modules.dep", 412 | "lib/modules/modules.load", 413 | "lib/modules/modules.softdep", 414 | "lib/modules/msm_11ad_proxy.ko", 415 | "lib/modules/native_dlkm.ko", 416 | "lib/modules/pinctrl_wcd_dlkm.ko", 417 | "lib/modules/platform_dlkm.ko", 418 | "lib/modules/q6_dlkm.ko", 419 | "lib/modules/q6_notifier_dlkm.ko", 420 | "lib/modules/q6_pdr_dlkm.ko", 421 | "lib/modules/softdog.ko", 422 | "lib/modules/stub_dlkm.ko", 423 | "lib/modules/swr_ctrl_dlkm.ko", 424 | "lib/modules/swr_dlkm.ko", 425 | "lib/modules/usf_dlkm.ko", 426 | "lib/modules/videobuf2-memops.ko", 427 | "lib/modules/videobuf2-vmalloc.ko", 428 | "lib/modules/wcd934x_dlkm.ko", 429 | "lib/modules/wcd9360_dlkm.ko", 430 | "lib/modules/wcd9xxx_dlkm.ko", 431 | "lib/modules/wcd_core_dlkm.ko", 432 | "lib/modules/wcd_cpe_dlkm.ko", 433 | "lib/modules/wcd_spi_dlkm.ko", 434 | "lib/modules/wglink_dlkm.ko", 435 | "lib/modules/wlan.ko", 436 | "lib/modules/wsa881x_dlkm.ko", 437 | "lib/soundfx/libaudiopreprocessing.so", 438 | "lib/soundfx/libbundlewrapper.so", 439 | "lib/soundfx/libdownmix.so", 440 | "lib/soundfx/libdynproc.so", 441 | "lib/soundfx/libeffectproxy.so", 442 | "lib/soundfx/libldnhncr.so", 443 | "lib/soundfx/libqcomvoiceprocessingdescriptors.so", 444 | "lib/soundfx/libreverbwrapper.so", 445 | "lib/soundfx/libvisualizer.so", 446 | "lib64/android.hardware.graphics.composer@2.1-resources.so", 447 | "lib64/android.hardware.identity-support-lib.so", 448 | "lib64/android.hardware.sensors@2.0-ScopedWakelock.so", 449 | "lib64/ese_spi_st.so", 450 | "lib64/hardware.google.light@1.0.so", 451 | "lib64/hardware.google.light@1.1.so", 452 | "lib64/hw/adnc_strm.primary.default.so", 453 | "lib64/hw/android.hardware.bluetooth.audio@2.0-impl.so", 454 | "lib64/hw/android.hardware.boot@1.0-impl-1.1-pixel-legacy.so", 455 | "lib64/hw/android.hardware.boot@1.0-impl.so", 456 | "lib64/hw/android.hardware.camera.provider@2.6-impl-google.so", 457 | "lib64/hw/android.hardware.drm@1.0-impl.so", 458 | "lib64/hw/android.hardware.health@2.0-impl-2.1-coral.so", 459 | "lib64/hw/android.hardware.memtrack@1.0-impl.so", 460 | "lib64/hw/android.hardware.renderscript@1.0-impl.so", 461 | "lib64/hw/android.hardware.soundtrigger@2.2-impl.so", 462 | "lib64/hw/android.hardware.soundtrigger@2.3-impl.so", 463 | "lib64/hw/audio.bluetooth.default.so", 464 | "lib64/hw/audio.primary.default.so", 465 | "lib64/hw/audio.r_submix.default.so", 466 | "lib64/hw/audio.usb.default.so", 467 | "lib64/hw/bootctrl.msmnile.so", 468 | "lib64/hw/gralloc.default.so", 469 | "lib64/hw/local_time.default.so", 470 | "lib64/hw/power.default.so", 471 | "lib64/hw/sensors.flame.so", 472 | "lib64/hw/sound_trigger.primary.msmnile.so", 473 | "lib64/hw/vibrator.default.so", 474 | "lib64/lib_profiler.so", 475 | "lib64/libalsautils.so", 476 | "lib64/libbatching.so", 477 | "lib64/libbluetooth_audio_session.so", 478 | "lib64/libcamera2ndk_vendor.so", 479 | "lib64/libcld80211.so", 480 | "lib64/libcodec2_vndk.so", 481 | "lib64/libcppbor.so", 482 | "lib64/libdisppower-pixel.so", 483 | "lib64/libdrm.so", 484 | "lib64/libeffects.so", 485 | "lib64/libeffectsconfig.so", 486 | "lib64/libgeofencing.so", 487 | "lib64/libgnss.so", 488 | "lib64/libgooglecamerahal.so", 489 | "lib64/libgooglecamerahalutils.so", 490 | "lib64/libgps.utils.so", 491 | "lib64/libhidltransport.so", 492 | "lib64/libhwbinder.so", 493 | "lib64/libhwc2on1adapter.so", 494 | "lib64/libhwc2onfbadapter.so", 495 | "lib64/libhwminijail.so", 496 | "lib64/libipanat.so", 497 | "lib64/libjson.so", 498 | "lib64/libkeymaster4_1support.so", 499 | "lib64/libkeymaster4support.so", 500 | "lib64/libkeymaster_messages.so", 501 | "lib64/libkeymaster_portable.so", 502 | "lib64/libkeystore-engine-wifi-hidl.so", 503 | "lib64/libkeystore-wifi-hidl.so", 504 | "lib64/libloc_core.so", 505 | "lib64/liblocation_api.so", 506 | "lib64/libmedia_ecoservice.so", 507 | "lib64/libnbaio_mono.so", 508 | "lib64/libnetfilter_conntrack.so", 509 | "lib64/libnfnetlink.so", 510 | "lib64/libnos.so", 511 | "lib64/libnos_client_citadel.so", 512 | "lib64/libnos_datagram.so", 513 | "lib64/libnos_datagram_citadel.so", 514 | "lib64/libnos_transport.so", 515 | "lib64/libnosprotos.so", 516 | "lib64/libodsp.so", 517 | "lib64/liboffloadhal.so", 518 | "lib64/libperfmgr.so", 519 | "lib64/libpixelhealth.so", 520 | "lib64/libpixelstats.so", 521 | "lib64/libprotobuf-cpp-full-3.9.1.so", 522 | "lib64/libprotobuf-cpp-full.so", 523 | "lib64/libprotobuf-cpp-lite-3.9.1.so", 524 | "lib64/libpuresoftkeymasterdevice.so", 525 | "lib64/libreference-ril.so", 526 | "lib64/libril.so", 527 | "lib64/librilutils.so", 528 | "lib64/libsensorndkbridge.so", 529 | "lib64/libsoft_attestation_cert.so", 530 | "lib64/libstagefright_bufferpool@2.0.1.so", 531 | "lib64/libteeui_hal_support.so", 532 | "lib64/libtextclassifier_hash.so", 533 | "lib64/libtinycompress.so", 534 | "lib64/libtinyxml.so", 535 | "lib64/libtunnel.so", 536 | "lib64/libwebrtc_audio_preprocessing.so", 537 | "lib64/libwifi-hal-ctrl.so", 538 | "lib64/libwifi-hal-qcom.so", 539 | "lib64/libwifi-hal.so", 540 | "lib64/libwpa_client.so", 541 | "lib64/mediacas/libclearkeycasplugin.so", 542 | "lib64/mediadrm/libdrmclearkeyplugin.so", 543 | "lib64/nfc_nci.st21nfc.default.so", 544 | "lib64/nos_app_avb.so", 545 | "lib64/nos_app_identity.so", 546 | "lib64/nos_app_keymaster.so", 547 | "lib64/nos_app_weaver.so", 548 | "lib64/pixel-power-ext-V1-ndk_platform.so", 549 | "lib64/pixelatoms-cpp.so", 550 | "lib64/pixelpowerstats_provider_aidl_interface-V1-cpp.so", 551 | "lib64/soundfx/libaudiopreprocessing.so", 552 | "lib64/soundfx/libbundlewrapper.so", 553 | "lib64/soundfx/libdownmix.so", 554 | "lib64/soundfx/libdynproc.so", 555 | "lib64/soundfx/libeffectproxy.so", 556 | "lib64/soundfx/libldnhncr.so", 557 | "lib64/soundfx/libqcomvoiceprocessingdescriptors.so", 558 | "lib64/soundfx/libreverbwrapper.so", 559 | "lib64/soundfx/libvisualizer.so", 560 | "odm/etc/NOTICE.xml.gz", 561 | "odm/etc/build.prop", 562 | "odm/etc/group", 563 | "odm/etc/passwd" 564 | ] 565 | } 566 | } 567 | } 568 | -------------------------------------------------------------------------------- /hostTools/Darwin/bin/dexrepair: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AOSPAlliance/android-prepare-vendor/7f332a53cebb3898b6e062b3f5fc6975d10f67d8/hostTools/Darwin/bin/dexrepair -------------------------------------------------------------------------------- /hostTools/Darwin/bin/jq: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AOSPAlliance/android-prepare-vendor/7f332a53cebb3898b6e062b3f5fc6975d10f67d8/hostTools/Darwin/bin/jq -------------------------------------------------------------------------------- /hostTools/Darwin/bin/simg2img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AOSPAlliance/android-prepare-vendor/7f332a53cebb3898b6e062b3f5fc6975d10f67d8/hostTools/Darwin/bin/simg2img -------------------------------------------------------------------------------- /hostTools/Java/baksmali.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AOSPAlliance/android-prepare-vendor/7f332a53cebb3898b6e062b3f5fc6975d10f67d8/hostTools/Java/baksmali.jar -------------------------------------------------------------------------------- /hostTools/Java/oat2dex.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AOSPAlliance/android-prepare-vendor/7f332a53cebb3898b6e062b3f5fc6975d10f67d8/hostTools/Java/oat2dex.jar -------------------------------------------------------------------------------- /hostTools/Java/smali.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AOSPAlliance/android-prepare-vendor/7f332a53cebb3898b6e062b3f5fc6975d10f67d8/hostTools/Java/smali.jar -------------------------------------------------------------------------------- /hostTools/Linux/bin/dexrepair: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AOSPAlliance/android-prepare-vendor/7f332a53cebb3898b6e062b3f5fc6975d10f67d8/hostTools/Linux/bin/dexrepair -------------------------------------------------------------------------------- /hostTools/Linux/bin/jq: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AOSPAlliance/android-prepare-vendor/7f332a53cebb3898b6e062b3f5fc6975d10f67d8/hostTools/Linux/bin/jq -------------------------------------------------------------------------------- /hostTools/Linux/bin/simg2img: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/AOSPAlliance/android-prepare-vendor/7f332a53cebb3898b6e062b3f5fc6975d10f67d8/hostTools/Linux/bin/simg2img -------------------------------------------------------------------------------- /rro_overlays/CarrierConfigOverlay/Android.bp: -------------------------------------------------------------------------------- 1 | runtime_resource_overlay { 2 | name: "CarrierConfigOverlay", 3 | theme: "CarrierConfigOverlay", 4 | sdk_version: "current", 5 | product_specific: true, 6 | aaptflags: ["--keep-raw-values"], 7 | } 8 | -------------------------------------------------------------------------------- /rro_overlays/CarrierConfigOverlay/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 16 | 17 | 21 | 22 | 26 | 27 | -------------------------------------------------------------------------------- /scripts/carriersettings-extractor/.gitignore: -------------------------------------------------------------------------------- 1 | apns-full-conf.xml 2 | carrier_list.pb 3 | CarrierSettings/*.pb 4 | tmp*/ 5 | vendor.xml 6 | 7 | __pycache__/ 8 | *.py[cod] 9 | *$py.class 10 | -------------------------------------------------------------------------------- /scripts/carriersettings-extractor/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS := carriersettings_pb2.py vendor/carrierId_pb2.py vendor/carrierId.proto 2 | 3 | .PHONY: all clean 4 | all: $(TARGETS) 5 | clean: 6 | rm -f $(TARGETS) 7 | 8 | %_pb2.py: %.proto 9 | protoc --python_out=. $< 10 | 11 | vendor/carrierId.proto: 12 | wget -qO- \ 13 | https://android.googlesource.com/platform/frameworks/opt/telephony/+/refs/heads/master/proto/src/carrierId.proto?format=TEXT | \ 14 | base64 --decode > $@ 15 | -------------------------------------------------------------------------------- /scripts/carriersettings-extractor/README.md: -------------------------------------------------------------------------------- 1 | # carriersettings-extractor 2 | 3 | Android Open Source Project (AOSP) [includes](https://source.android.com/devices/tech/config/update) APN settings ([`apns-full-conf.xml`](https://android.googlesource.com/device/sample/+/master/etc/apns-full-conf.xml)) and [carrier settings](https://source.android.com/devices/tech/config/carrier) ([`carrier_config_*.xml`](https://android.googlesource.com/platform/packages/apps/CarrierConfig/+/master/assets) + [`vendor.xml`](https://android.googlesource.com/platform/packages/apps/CarrierConfig/+/refs/heads/master/res/xml/vendor.xml)) in human-readable XML format. However, Google Pixel device images instead include APN and carrier settings as binary protobuf files for use by the CarrierSettings system app. 4 | 5 | This script converts the CarrierSettings protobuf files (e.g., `carrier_list.pb`, `others.pb`) to XML format compatible with AOSP. This may be helpful for Android-based systems that do not bundle CarrierSettings, but wish to support carriers that are not included in AOSP. 6 | 7 | For a description of each APN and carrier setting, refer to the doc comments in [`Telephony.java`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/core/java/android/provider/Telephony.java) and [`CarrierConfigManager.java`](https://android.googlesource.com/platform/frameworks/base/+/refs/heads/master/telephony/java/android/telephony/CarrierConfigManager.java), respectively. 8 | 9 | ## Dependencies 10 | 11 | * curl - required, for android-prepare-vendor 12 | * e2fsprogs (debugfs) - required, for android-prepare-vendor 13 | * git - required, for android-prepare-vendor 14 | * protobuf-compiler (protoc) - optional, see below 15 | * python3-protobuf - required 16 | 17 | ## Usage 18 | 19 | Download the [carrier ID database](https://source.android.com/devices/tech/config/carrierid) from AOSP. 20 | 21 | ./download_carrier_list.sh 22 | 23 | Download a [Pixel factory image](https://developers.google.com/android/images) and extract the CarrierSettings protobuf files. This script will download android-prepare-vendor and copy the directory `CarrierSettings` containing the protobuf files. 24 | 25 | DEVICE=crosshatch BUILD=QQ3A.200605.001 ./download_factory_img.sh 26 | 27 | Convert `CarrierSettings/*.pb` to `apns-full-conf.xml` and `vendor.xml`. 28 | 29 | ./carriersettings_extractor.py CarrierSettings 30 | 31 | ## Protobuf definitions 32 | 33 | The definitions in [`carriersettings.proto`](carriersettings.proto) are useful for inspecting the CarrierSettings protobuf files. 34 | 35 | protoc --decode=CarrierList carriersettings.proto < CarrierSettings/carrier_list.pb 36 | protoc --decode=CarrierSettings carriersettings.proto < CarrierSettings/verizon_us.pb 37 | protoc --decode=MultiCarrierSettings carriersettings.proto < CarrierSettings/others.pb 38 | 39 | To check schema or otherwise inspect the protobuf files without applying definitions, use the `--decode_raw` argument. 40 | 41 | protoc --decode_raw < CarrierSettings/carrier_list.pb 42 | protoc --decode_raw < CarrierSettings/verizon_us.pb 43 | protoc --decode_raw < CarrierSettings/others.pb 44 | -------------------------------------------------------------------------------- /scripts/carriersettings-extractor/carriersettings.proto: -------------------------------------------------------------------------------- 1 | // For the HasField method, use proto2. proto3 does not distinguish between 2 | // fields that are not set and fields that are set to default values, e.g., 3 | // authtype: 0. 4 | syntax = "proto2"; 5 | 6 | message CarrierList { 7 | message CarrierMap { 8 | // canonicalName is not unique in CarrierList, e.g., the same settings 9 | // may apply to multiple MCCMNCs or MVNOs. Use this field as the lookup 10 | // key in CarrierSettings. 11 | required string canonicalName = 1; 12 | message CarrierId { 13 | required string mccMnc = 1; 14 | oneof mvno { 15 | string spn = 2; 16 | string imsi = 3; 17 | string gid1 = 4; 18 | string gid2 = 5; // deprecated 19 | } 20 | } 21 | required CarrierId carrierId = 2; 22 | } 23 | repeated CarrierMap entry = 1; 24 | required int64 version = 2; 25 | } 26 | 27 | message CarrierSettings { 28 | required string canonicalName = 1; // unique key 29 | optional int64 version = 2; 30 | 31 | message CarrierApns { 32 | message ApnItem { 33 | optional string name = 1; 34 | required string value = 2; 35 | enum ApnType { 36 | ALL = 0; 37 | DEFAULT = 1; 38 | MMS = 2; 39 | SUPL = 3; 40 | DUN = 4; 41 | HIPRI = 5; 42 | FOTA = 6; 43 | IMS = 7; 44 | CBS = 8; 45 | IA = 9; 46 | EMERGENCY = 10; 47 | XCAP = 11; 48 | UT = 12; 49 | } 50 | repeated ApnType type = 3; 51 | optional string bearerBitmask = 4; 52 | optional string server = 5; 53 | optional string proxy = 6; 54 | optional string port = 7; 55 | optional string user = 8; 56 | optional string password = 9; 57 | optional int32 authtype = 10; 58 | optional string mmsc = 11; 59 | optional string mmscProxy = 12; 60 | optional string mmscProxyPort = 13; 61 | enum Protocol { 62 | IP = 0; 63 | IPV6 = 1; 64 | IPV4V6 = 2; 65 | PPP = 3; 66 | } 67 | optional Protocol protocol = 14; 68 | optional Protocol roamingProtocol = 15; 69 | optional int32 mtu = 16; 70 | optional int32 profileId = 17; 71 | optional int32 maxConns = 18; 72 | optional int32 waitTime = 19; // unused 73 | optional int32 maxConnsTime = 20; 74 | optional bool carrierEnabled = 21; 75 | optional bool modemCognitive = 22; 76 | optional bool userVisible = 23; 77 | optional bool userEditable = 24; 78 | optional int32 apnSetId = 25; // unused 79 | enum Xlat { 80 | SKIP_464XLAT_DEFAULT = 0; 81 | SKIP_464XLAT_DISABLE = 1; 82 | SKIP_464XLAT_ENABLE = 2; 83 | } 84 | optional Xlat skip464Xlat = 26; // unused 85 | } 86 | repeated ApnItem apn = 2; 87 | } 88 | optional CarrierApns apns = 3; 89 | 90 | message CarrierConfig { 91 | message Config { 92 | required string key = 1; 93 | message TextArray { 94 | repeated string item = 1; 95 | } 96 | message IntArray { 97 | repeated int32 item = 1; 98 | } 99 | oneof value { 100 | string textValue = 2; 101 | int32 intValue = 3; 102 | int64 longValue = 4; 103 | bool boolValue = 5; 104 | TextArray textArray = 6; 105 | IntArray intArray = 7; 106 | } 107 | } 108 | repeated Config config = 2; 109 | } 110 | optional CarrierConfig configs = 4; 111 | 112 | message VendorConfigs { 113 | message VendorConfigClient { 114 | required string name = 1; 115 | required bytes value = 2; 116 | } 117 | repeated VendorConfigClient client = 2; 118 | } 119 | optional VendorConfigs vendorConfigs = 5; 120 | } 121 | 122 | message MultiCarrierSettings { 123 | required int64 version = 1; 124 | repeated CarrierSettings setting = 2; 125 | } 126 | -------------------------------------------------------------------------------- /scripts/carriersettings-extractor/carriersettings_extractor.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import argparse 4 | from collections import OrderedDict 5 | from glob import glob 6 | from itertools import product 7 | import os.path 8 | import sys 9 | from xml.etree import ElementTree as ET 10 | from xml.sax.saxutils import escape, quoteattr 11 | 12 | from carriersettings_pb2 import CarrierList, CarrierSettings, \ 13 | MultiCarrierSettings 14 | from vendor.carrierId_pb2 import CarrierList as CarrierIdList 15 | 16 | 17 | def indent(elem, level=0): 18 | """Based on https://effbot.org/zone/element-lib.htm#prettyprint""" 19 | i = "\n" + level * " " 20 | if len(elem): 21 | if not elem.text or not elem.text.strip(): 22 | elem.text = i + " " 23 | if not elem.tail or not elem.tail.strip(): 24 | elem.tail = i 25 | for elem in elem: 26 | indent(elem, level + 1) 27 | if not elem.tail or not elem.tail.strip(): 28 | elem.tail = i 29 | else: 30 | if level and (not elem.tail or not elem.tail.strip()): 31 | elem.tail = i 32 | 33 | 34 | def parse_args(): 35 | parser = argparse.ArgumentParser( 36 | description="Convert the CarrierSettings protobuf files to XML format compatible with AOSP") 37 | parser.add_argument('-c', '--carrierlist', help='AOSP carrier_list.pb folder', 38 | required=True) 39 | parser.add_argument('-i', '--input', help='CarrierSettings folder', 40 | required=True) 41 | parser.add_argument('-a', '--apns', help='apns-conf.xml Output folder', 42 | required=True) 43 | parser.add_argument('-v', '--vendor', help='vendor.xml Output folder', 44 | required=True) 45 | return parser.parse_args() 46 | 47 | 48 | def main(): 49 | args = parse_args() 50 | 51 | carrier_list_folder = args.carrierlist 52 | input_folder = args.input 53 | apns_folder = args.apns 54 | vendor_folder = args.vendor 55 | 56 | # Anything where the value is a package name 57 | unwanted_configs = ["carrier_app_wake_signal_config", 58 | "carrier_settings_activity_component_name_string", 59 | "carrier_setup_app_string", 60 | "config_ims_package_override_string", 61 | "enable_apps_string_array", 62 | "gps.nfw_proxy_apps", 63 | "smart_forwarding_config_component_name_string", 64 | "wfc_emergency_address_carrier_app_string"] 65 | 66 | carrier_id_list = CarrierIdList() 67 | carrier_attribute_map = {} 68 | with open(os.path.join(carrier_list_folder, 'carrier_list.pb'), 'rb') as pb: 69 | carrier_id_list.ParseFromString(pb.read()) 70 | for carrier_id_obj in carrier_id_list.carrier_id: 71 | for carrier_attribute in carrier_id_obj.carrier_attribute: 72 | for carrier_attributes in product(*( 73 | (s.lower() for s in getattr(carrier_attribute, i) or ['']) 74 | for i in [ 75 | 'mccmnc_tuple', 'imsi_prefix_xpattern', 'spn', 'plmn', 76 | 'gid1', 'gid2', 'preferred_apn', 'iccid_prefix', 77 | 'privilege_access_rule', 78 | ] 79 | )): 80 | carrier_attribute_map[carrier_attributes] = \ 81 | carrier_id_obj.canonical_id 82 | 83 | carrier_list = CarrierList() 84 | all_settings = {} 85 | for filename in glob(os.path.join(input_folder, '*.pb')): 86 | with open(filename, 'rb') as pb: 87 | if os.path.basename(filename) == 'carrier_list.pb': 88 | carrier_list.ParseFromString(pb.read()) 89 | elif os.path.basename(filename) == 'others.pb': 90 | settings = MultiCarrierSettings() 91 | settings.ParseFromString(pb.read()) 92 | for setting in settings.setting: 93 | assert setting.canonicalName not in all_settings 94 | all_settings[setting.canonicalName] = setting 95 | else: 96 | setting = CarrierSettings() 97 | setting.ParseFromString(pb.read()) 98 | assert setting.canonicalName not in all_settings 99 | all_settings[setting.canonicalName] = setting 100 | 101 | carrier_config_root = ET.Element('carrier_config_list') 102 | 103 | # Unfortunately, python processors like xml and lxml, as well as command-line 104 | # utilities like tidy, do not support the exact style used by AOSP for 105 | # apns-conf.xml: 106 | # 107 | # * indent: 2 spaces 108 | # * attribute indent: 4 spaces 109 | # * blank lines between elements 110 | # * attributes after first indented on separate lines 111 | # * closing tags of multi-line elements on separate, unindented lines 112 | # 113 | # Therefore, we build the file without using an XML processor. 114 | 115 | class ApnElement: 116 | def __init__(self, apn, carrier_id): 117 | self.apn = apn 118 | self.carrier_id = carrier_id 119 | self.attributes = OrderedDict() 120 | self.add_attributes() 121 | 122 | def add_attribute(self, key, field=None, value=None): 123 | if value is not None: 124 | self.attributes[key] = value 125 | else: 126 | if field is None: 127 | field = key 128 | if self.apn.HasField(field): 129 | enum_type = self.apn.DESCRIPTOR.fields_by_name[field].enum_type 130 | value = getattr(self.apn, field) 131 | if enum_type is None: 132 | if isinstance(value, bool): 133 | self.attributes[key] = str(value).lower() 134 | else: 135 | self.attributes[key] = str(value) 136 | else: 137 | self.attributes[key] = \ 138 | enum_type.values_by_number[value].name 139 | 140 | def add_attributes(self): 141 | try: 142 | self.add_attribute( 143 | 'carrier_id', 144 | value=str(carrier_attribute_map[( 145 | self.carrier_id.mccMnc, 146 | self.carrier_id.imsi, 147 | self.carrier_id.spn.lower(), 148 | '', 149 | self.carrier_id.gid1.lower(), 150 | self.carrier_id.gid2.lower(), 151 | '', 152 | '', 153 | '', 154 | )]) 155 | ) 156 | except KeyError: 157 | pass 158 | self.add_attribute('mcc', value=self.carrier_id.mccMnc[:3]) 159 | self.add_attribute('mnc', value=self.carrier_id.mccMnc[3:]) 160 | self.add_attribute('apn', 'value') 161 | self.add_attribute('proxy') 162 | self.add_attribute('port') 163 | self.add_attribute('mmsc') 164 | self.add_attribute('mmsproxy', 'mmscProxy') 165 | self.add_attribute('mmsport', 'mmscProxyPort') 166 | self.add_attribute('user') 167 | self.add_attribute('password') 168 | self.add_attribute('server') 169 | self.add_attribute('authtype') 170 | self.add_attribute( 171 | 'type', 172 | value=','.join( 173 | apn.DESCRIPTOR.fields_by_name[ 174 | 'type' 175 | ].enum_type.values_by_number[i].name 176 | for i in self.apn.type 177 | ).lower(), 178 | ) 179 | self.add_attribute('protocol') 180 | self.add_attribute('roaming_protocol', 'roamingProtocol') 181 | self.add_attribute('carrier_enabled', 'carrierEnabled') 182 | self.add_attribute('bearer_bitmask', 'bearerBitmask') 183 | self.add_attribute('profile_id', 'profileId') 184 | self.add_attribute('modem_cognitive', 'modemCognitive') 185 | self.add_attribute('max_conns', 'maxConns') 186 | self.add_attribute('wait_time', 'waitTime') 187 | self.add_attribute('max_conns_time', 'maxConnsTime') 188 | self.add_attribute('mtu') 189 | mvno = self.carrier_id.WhichOneof('mvno') 190 | if mvno: 191 | self.add_attribute( 192 | 'mvno_type', 193 | value='gid' if mvno.startswith('gid') else mvno, 194 | ) 195 | self.add_attribute( 196 | 'mvno_match_data', 197 | value=getattr(self.carrier_id, mvno), 198 | ) 199 | self.add_attribute('apn_set_id', 'apnSetId') 200 | # No source for integer carrier_id? 201 | self.add_attribute('skip_464xlat', 'skip464Xlat') 202 | self.add_attribute('user_visible', 'userVisible') 203 | self.add_attribute('user_editable', 'userEditable') 204 | 205 | with open(os.path.join(apns_folder, 'apns-conf.xml'), 'w', encoding='utf-8') as f: 206 | f.write('\n\n') 207 | f.write('\n\n') 208 | 209 | version_suffix = all_settings['default'].version % 1000000000 210 | for entry in carrier_list.entry: 211 | setting = all_settings[entry.canonicalName] 212 | for apn in setting.apns.apn: 213 | f.write(' \n\n') 218 | 219 | carrier_config_element = ET.SubElement( 220 | carrier_config_root, 221 | 'carrier_config', 222 | ) 223 | carrier_config_element.set('mcc', entry.carrierId.mccMnc[:3]) 224 | carrier_config_element.set('mnc', entry.carrierId.mccMnc[3:]) 225 | for field in ['spn', 'imsi', 'gid1', 'gid2']: 226 | if entry.carrierId.HasField(field): 227 | carrier_config_element.set( 228 | field, 229 | getattr(entry.carrierId, field), 230 | ) 231 | 232 | # Add version key composed of canonical name and versions 233 | carrier_config_subelement = ET.SubElement( 234 | carrier_config_element, 235 | 'string' 236 | ) 237 | carrier_config_subelement.set('name', 'carrier_config_version_string') 238 | carrier_config_subelement.text = '{}-{}.{}'.format( 239 | setting.canonicalName, 240 | setting.version, 241 | version_suffix 242 | ) 243 | 244 | for config in setting.configs.config: 245 | if config.key in unwanted_configs: 246 | continue 247 | value_type = config.WhichOneof('value') 248 | if value_type == 'textValue': 249 | carrier_config_subelement = ET.SubElement( 250 | carrier_config_element, 251 | 'string', 252 | ) 253 | carrier_config_subelement.set('name', config.key) 254 | carrier_config_subelement.text = getattr(config, value_type) 255 | elif value_type == 'intValue': 256 | carrier_config_subelement = ET.SubElement( 257 | carrier_config_element, 258 | 'int', 259 | ) 260 | carrier_config_subelement.set('name', config.key) 261 | carrier_config_subelement.set( 262 | 'value', 263 | str(getattr(config, value_type)), 264 | ) 265 | elif value_type == 'longValue': 266 | carrier_config_subelement = ET.SubElement( 267 | carrier_config_element, 268 | 'long', 269 | ) 270 | carrier_config_subelement.set('name', config.key) 271 | carrier_config_subelement.set( 272 | 'value', 273 | str(getattr(config, value_type)), 274 | ) 275 | elif value_type == 'boolValue': 276 | carrier_config_subelement = ET.SubElement( 277 | carrier_config_element, 278 | 'boolean', 279 | ) 280 | carrier_config_subelement.set('name', config.key) 281 | carrier_config_subelement.set( 282 | 'value', 283 | str(getattr(config, value_type)).lower(), 284 | ) 285 | elif value_type == 'textArray': 286 | carrier_config_subelement = ET.SubElement( 287 | carrier_config_element, 288 | 'string-array', 289 | ) 290 | carrier_config_subelement.set('name', config.key) 291 | carrier_config_subelement.set( 292 | 'num', 293 | str(len(getattr(config, value_type).item)), 294 | ) 295 | for value in getattr(config, value_type).item: 296 | carrier_config_item = ET.SubElement( 297 | carrier_config_subelement, 298 | 'item', 299 | ) 300 | carrier_config_item.set('value', value) 301 | elif value_type == 'intArray': 302 | carrier_config_subelement = ET.SubElement( 303 | carrier_config_element, 304 | 'int-array', 305 | ) 306 | carrier_config_subelement.set('name', config.key) 307 | carrier_config_subelement.set( 308 | 'num', 309 | str(len(getattr(config, value_type).item)), 310 | ) 311 | for value in getattr(config, value_type).item: 312 | carrier_config_item = ET.SubElement( 313 | carrier_config_subelement, 314 | 'item', 315 | ) 316 | carrier_config_item.set('value', str(value)) 317 | else: 318 | raise TypeError("Unknown value type: {}".format(value_type)) 319 | 320 | f.write('\n') 321 | 322 | # Test XML parsing. 323 | ET.parse(os.path.join(apns_folder, 'apns-conf.xml')) 324 | 325 | indent(carrier_config_root) 326 | carrier_config_tree = ET.ElementTree(carrier_config_root) 327 | carrier_config_tree.write(os.path.join(vendor_folder, 'vendor.xml'), 328 | encoding='utf-8', xml_declaration=True) 329 | 330 | # Test XML parsing. 331 | ET.parse(os.path.join(vendor_folder, 'vendor.xml')) 332 | 333 | if __name__ == '__main__': 334 | main() 335 | -------------------------------------------------------------------------------- /scripts/carriersettings-extractor/download_carrier_list.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -euo pipefail 4 | 5 | usage() { 6 | cat <<_EOF 7 | Usage: $(basename "$0") [options] 8 | OPTIONS: 9 | -o|--output : Path to save carrier list 10 | _EOF 11 | exit 1 12 | } 13 | 14 | OUTPUT_DIR="" 15 | 16 | while [[ $# -gt 0 ]] 17 | do 18 | arg="$1" 19 | case $arg in 20 | -o|--output) 21 | OUTPUT_DIR=$(echo "$2" | sed 's:/*$::') 22 | shift 23 | ;; 24 | *) 25 | echo "[-] Invalid argument '$1'" 26 | usage 27 | ;; 28 | esac 29 | shift 30 | done 31 | 32 | if [[ "$OUTPUT_DIR" == "" || ! -d "$OUTPUT_DIR" ]]; then 33 | echo "[-] Output directory not found" 34 | usage 35 | fi 36 | 37 | url='https://android.googlesource.com/platform/packages/providers/TelephonyProvider/+/master/assets/latest_carrier_id/carrier_list.pb?format=TEXT' 38 | echo "[*] Downloading carrier list from '$url'" 39 | curl -fS "$url" | base64 --decode > "$OUTPUT_DIR"/carrier_list.pb 40 | -------------------------------------------------------------------------------- /scripts/carriersettings-extractor/vendor/carrierId.proto: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2017 The Android Open Source Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | syntax = "proto2"; 18 | 19 | package carrierIdentification; 20 | 21 | option java_package = "com.android.internal.telephony"; 22 | option java_outer_classname = "CarrierIdProto"; 23 | 24 | // A complete list of carriers 25 | message CarrierList { 26 | // A collection of carriers. one entry for one carrier. 27 | repeated CarrierId carrier_id = 1; 28 | // Version number of current carrier list 29 | optional int32 version = 2; 30 | }; 31 | 32 | // CarrierId is the unique representation of a carrier in CID table. 33 | message CarrierId { 34 | // [Optional] A unique canonical number designated to a carrier. 35 | optional int32 canonical_id = 1; 36 | 37 | // [Optional] A user-friendly carrier name (not localized). 38 | optional string carrier_name = 2; 39 | 40 | // [Optional] Carrier attributes to match a carrier. At least one value is required. 41 | repeated CarrierAttribute carrier_attribute = 3; 42 | 43 | // [Optional] A unique canonical number to represent its parent carrier. The parent-child 44 | // relationship can be used to differentiate a single carrier by different networks, 45 | // by prepaid v.s. postpaid or even by 4G v.s. 3G plan. 46 | optional int32 parent_canonical_id = 4; 47 | }; 48 | 49 | // Attributes used to match a carrier. 50 | // For each field within this message: 51 | // - if not set, the attribute is ignored; 52 | // - if set, the device must have one of the specified values to match. 53 | // Match is based on AND between any field that is set and OR for values within a repeated field. 54 | message CarrierAttribute { 55 | // [Optional] The MCC and MNC that map to this carrier. At least one value is required. 56 | repeated string mccmnc_tuple = 1; 57 | 58 | // [Optional] Prefix of IMSI (International Mobile Subscriber Identity) in 59 | // decimal format. Some digits can be replaced with "x" symbols matching any digit. 60 | // Sample values: 20404794, 21670xx2xxx. 61 | repeated string imsi_prefix_xpattern = 2; 62 | 63 | // [Optional] The Service Provider Name. Read from subscription EF_SPN. 64 | // Sample values: C Spire, LeclercMobile 65 | repeated string spn = 3; 66 | 67 | // [Optional] PLMN network name. Read from subscription EF_PNN. 68 | // Sample values: 69 | repeated string plmn = 4; 70 | 71 | // [Optional] Group Identifier Level1 for a GSM phone. Read from subscription EF_GID1. 72 | // Sample values: 6D, BAE0000000000000 73 | repeated string gid1 = 5; 74 | 75 | // [Optional] Group Identifier Level2 for a GSM phone. Read from subscription EF_GID2. 76 | // Sample values: 6D, BAE0000000000000 77 | repeated string gid2 = 6; 78 | 79 | // [Optional] The Access Point Name, corresponding to "apn" field returned by 80 | // "content://telephony/carriers/preferapn" on device. 81 | // Sample values: fast.t-mobile.com, internet 82 | repeated string preferred_apn = 7; 83 | 84 | // [Optional] Prefix of Integrated Circuit Card Identifier. Read from subscription EF_ICCID. 85 | // Sample values: 894430, 894410 86 | repeated string iccid_prefix = 8; 87 | 88 | // [Optional] Carrier Privilege Access Rule in hex string. 89 | // Sample values: 61ed377e85d386a8dfee6b864bd85b0bfaa5af88 90 | repeated string privilege_access_rule = 9; 91 | }; 92 | 93 | -------------------------------------------------------------------------------- /scripts/carriersettings-extractor/vendor/carrierId_pb2.py: -------------------------------------------------------------------------------- 1 | # Generated by the protocol buffer compiler. DO NOT EDIT! 2 | # source: vendor/carrierId.proto 3 | 4 | import sys 5 | _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) 6 | from google.protobuf import descriptor as _descriptor 7 | from google.protobuf import message as _message 8 | from google.protobuf import reflection as _reflection 9 | from google.protobuf import symbol_database as _symbol_database 10 | # @@protoc_insertion_point(imports) 11 | 12 | _sym_db = _symbol_database.Default() 13 | 14 | 15 | 16 | 17 | DESCRIPTOR = _descriptor.FileDescriptor( 18 | name='vendor/carrierId.proto', 19 | package='carrierIdentification', 20 | syntax='proto2', 21 | serialized_options=_b('\n\036com.android.internal.telephonyB\016CarrierIdProto'), 22 | serialized_pb=_b('\n\x16vendor/carrierId.proto\x12\x15\x63\x61rrierIdentification\"T\n\x0b\x43\x61rrierList\x12\x34\n\ncarrier_id\x18\x01 \x03(\x0b\x32 .carrierIdentification.CarrierId\x12\x0f\n\x07version\x18\x02 \x01(\x05\"\x98\x01\n\tCarrierId\x12\x14\n\x0c\x63\x61nonical_id\x18\x01 \x01(\x05\x12\x14\n\x0c\x63\x61rrier_name\x18\x02 \x01(\t\x12\x42\n\x11\x63\x61rrier_attribute\x18\x03 \x03(\x0b\x32\'.carrierIdentification.CarrierAttribute\x12\x1b\n\x13parent_canonical_id\x18\x04 \x01(\x05\"\xc9\x01\n\x10\x43\x61rrierAttribute\x12\x14\n\x0cmccmnc_tuple\x18\x01 \x03(\t\x12\x1c\n\x14imsi_prefix_xpattern\x18\x02 \x03(\t\x12\x0b\n\x03spn\x18\x03 \x03(\t\x12\x0c\n\x04plmn\x18\x04 \x03(\t\x12\x0c\n\x04gid1\x18\x05 \x03(\t\x12\x0c\n\x04gid2\x18\x06 \x03(\t\x12\x15\n\rpreferred_apn\x18\x07 \x03(\t\x12\x14\n\x0ciccid_prefix\x18\x08 \x03(\t\x12\x1d\n\x15privilege_access_rule\x18\t \x03(\tB0\n\x1e\x63om.android.internal.telephonyB\x0e\x43\x61rrierIdProto') 23 | ) 24 | 25 | 26 | 27 | 28 | _CARRIERLIST = _descriptor.Descriptor( 29 | name='CarrierList', 30 | full_name='carrierIdentification.CarrierList', 31 | filename=None, 32 | file=DESCRIPTOR, 33 | containing_type=None, 34 | fields=[ 35 | _descriptor.FieldDescriptor( 36 | name='carrier_id', full_name='carrierIdentification.CarrierList.carrier_id', index=0, 37 | number=1, type=11, cpp_type=10, label=3, 38 | has_default_value=False, default_value=[], 39 | message_type=None, enum_type=None, containing_type=None, 40 | is_extension=False, extension_scope=None, 41 | serialized_options=None, file=DESCRIPTOR), 42 | _descriptor.FieldDescriptor( 43 | name='version', full_name='carrierIdentification.CarrierList.version', index=1, 44 | number=2, type=5, cpp_type=1, label=1, 45 | has_default_value=False, default_value=0, 46 | message_type=None, enum_type=None, containing_type=None, 47 | is_extension=False, extension_scope=None, 48 | serialized_options=None, file=DESCRIPTOR), 49 | ], 50 | extensions=[ 51 | ], 52 | nested_types=[], 53 | enum_types=[ 54 | ], 55 | serialized_options=None, 56 | is_extendable=False, 57 | syntax='proto2', 58 | extension_ranges=[], 59 | oneofs=[ 60 | ], 61 | serialized_start=49, 62 | serialized_end=133, 63 | ) 64 | 65 | 66 | _CARRIERID = _descriptor.Descriptor( 67 | name='CarrierId', 68 | full_name='carrierIdentification.CarrierId', 69 | filename=None, 70 | file=DESCRIPTOR, 71 | containing_type=None, 72 | fields=[ 73 | _descriptor.FieldDescriptor( 74 | name='canonical_id', full_name='carrierIdentification.CarrierId.canonical_id', index=0, 75 | number=1, type=5, cpp_type=1, label=1, 76 | has_default_value=False, default_value=0, 77 | message_type=None, enum_type=None, containing_type=None, 78 | is_extension=False, extension_scope=None, 79 | serialized_options=None, file=DESCRIPTOR), 80 | _descriptor.FieldDescriptor( 81 | name='carrier_name', full_name='carrierIdentification.CarrierId.carrier_name', index=1, 82 | number=2, type=9, cpp_type=9, label=1, 83 | has_default_value=False, default_value=_b("").decode('utf-8'), 84 | message_type=None, enum_type=None, containing_type=None, 85 | is_extension=False, extension_scope=None, 86 | serialized_options=None, file=DESCRIPTOR), 87 | _descriptor.FieldDescriptor( 88 | name='carrier_attribute', full_name='carrierIdentification.CarrierId.carrier_attribute', index=2, 89 | number=3, type=11, cpp_type=10, label=3, 90 | has_default_value=False, default_value=[], 91 | message_type=None, enum_type=None, containing_type=None, 92 | is_extension=False, extension_scope=None, 93 | serialized_options=None, file=DESCRIPTOR), 94 | _descriptor.FieldDescriptor( 95 | name='parent_canonical_id', full_name='carrierIdentification.CarrierId.parent_canonical_id', index=3, 96 | number=4, type=5, cpp_type=1, label=1, 97 | has_default_value=False, default_value=0, 98 | message_type=None, enum_type=None, containing_type=None, 99 | is_extension=False, extension_scope=None, 100 | serialized_options=None, file=DESCRIPTOR), 101 | ], 102 | extensions=[ 103 | ], 104 | nested_types=[], 105 | enum_types=[ 106 | ], 107 | serialized_options=None, 108 | is_extendable=False, 109 | syntax='proto2', 110 | extension_ranges=[], 111 | oneofs=[ 112 | ], 113 | serialized_start=136, 114 | serialized_end=288, 115 | ) 116 | 117 | 118 | _CARRIERATTRIBUTE = _descriptor.Descriptor( 119 | name='CarrierAttribute', 120 | full_name='carrierIdentification.CarrierAttribute', 121 | filename=None, 122 | file=DESCRIPTOR, 123 | containing_type=None, 124 | fields=[ 125 | _descriptor.FieldDescriptor( 126 | name='mccmnc_tuple', full_name='carrierIdentification.CarrierAttribute.mccmnc_tuple', index=0, 127 | number=1, type=9, cpp_type=9, label=3, 128 | has_default_value=False, default_value=[], 129 | message_type=None, enum_type=None, containing_type=None, 130 | is_extension=False, extension_scope=None, 131 | serialized_options=None, file=DESCRIPTOR), 132 | _descriptor.FieldDescriptor( 133 | name='imsi_prefix_xpattern', full_name='carrierIdentification.CarrierAttribute.imsi_prefix_xpattern', index=1, 134 | number=2, type=9, cpp_type=9, label=3, 135 | has_default_value=False, default_value=[], 136 | message_type=None, enum_type=None, containing_type=None, 137 | is_extension=False, extension_scope=None, 138 | serialized_options=None, file=DESCRIPTOR), 139 | _descriptor.FieldDescriptor( 140 | name='spn', full_name='carrierIdentification.CarrierAttribute.spn', index=2, 141 | number=3, type=9, cpp_type=9, label=3, 142 | has_default_value=False, default_value=[], 143 | message_type=None, enum_type=None, containing_type=None, 144 | is_extension=False, extension_scope=None, 145 | serialized_options=None, file=DESCRIPTOR), 146 | _descriptor.FieldDescriptor( 147 | name='plmn', full_name='carrierIdentification.CarrierAttribute.plmn', index=3, 148 | number=4, type=9, cpp_type=9, label=3, 149 | has_default_value=False, default_value=[], 150 | message_type=None, enum_type=None, containing_type=None, 151 | is_extension=False, extension_scope=None, 152 | serialized_options=None, file=DESCRIPTOR), 153 | _descriptor.FieldDescriptor( 154 | name='gid1', full_name='carrierIdentification.CarrierAttribute.gid1', index=4, 155 | number=5, type=9, cpp_type=9, label=3, 156 | has_default_value=False, default_value=[], 157 | message_type=None, enum_type=None, containing_type=None, 158 | is_extension=False, extension_scope=None, 159 | serialized_options=None, file=DESCRIPTOR), 160 | _descriptor.FieldDescriptor( 161 | name='gid2', full_name='carrierIdentification.CarrierAttribute.gid2', index=5, 162 | number=6, type=9, cpp_type=9, label=3, 163 | has_default_value=False, default_value=[], 164 | message_type=None, enum_type=None, containing_type=None, 165 | is_extension=False, extension_scope=None, 166 | serialized_options=None, file=DESCRIPTOR), 167 | _descriptor.FieldDescriptor( 168 | name='preferred_apn', full_name='carrierIdentification.CarrierAttribute.preferred_apn', index=6, 169 | number=7, type=9, cpp_type=9, label=3, 170 | has_default_value=False, default_value=[], 171 | message_type=None, enum_type=None, containing_type=None, 172 | is_extension=False, extension_scope=None, 173 | serialized_options=None, file=DESCRIPTOR), 174 | _descriptor.FieldDescriptor( 175 | name='iccid_prefix', full_name='carrierIdentification.CarrierAttribute.iccid_prefix', index=7, 176 | number=8, type=9, cpp_type=9, label=3, 177 | has_default_value=False, default_value=[], 178 | message_type=None, enum_type=None, containing_type=None, 179 | is_extension=False, extension_scope=None, 180 | serialized_options=None, file=DESCRIPTOR), 181 | _descriptor.FieldDescriptor( 182 | name='privilege_access_rule', full_name='carrierIdentification.CarrierAttribute.privilege_access_rule', index=8, 183 | number=9, type=9, cpp_type=9, label=3, 184 | has_default_value=False, default_value=[], 185 | message_type=None, enum_type=None, containing_type=None, 186 | is_extension=False, extension_scope=None, 187 | serialized_options=None, file=DESCRIPTOR), 188 | ], 189 | extensions=[ 190 | ], 191 | nested_types=[], 192 | enum_types=[ 193 | ], 194 | serialized_options=None, 195 | is_extendable=False, 196 | syntax='proto2', 197 | extension_ranges=[], 198 | oneofs=[ 199 | ], 200 | serialized_start=291, 201 | serialized_end=492, 202 | ) 203 | 204 | _CARRIERLIST.fields_by_name['carrier_id'].message_type = _CARRIERID 205 | _CARRIERID.fields_by_name['carrier_attribute'].message_type = _CARRIERATTRIBUTE 206 | DESCRIPTOR.message_types_by_name['CarrierList'] = _CARRIERLIST 207 | DESCRIPTOR.message_types_by_name['CarrierId'] = _CARRIERID 208 | DESCRIPTOR.message_types_by_name['CarrierAttribute'] = _CARRIERATTRIBUTE 209 | _sym_db.RegisterFileDescriptor(DESCRIPTOR) 210 | 211 | CarrierList = _reflection.GeneratedProtocolMessageType('CarrierList', (_message.Message,), dict( 212 | DESCRIPTOR = _CARRIERLIST, 213 | __module__ = 'vendor.carrierId_pb2' 214 | # @@protoc_insertion_point(class_scope:carrierIdentification.CarrierList) 215 | )) 216 | _sym_db.RegisterMessage(CarrierList) 217 | 218 | CarrierId = _reflection.GeneratedProtocolMessageType('CarrierId', (_message.Message,), dict( 219 | DESCRIPTOR = _CARRIERID, 220 | __module__ = 'vendor.carrierId_pb2' 221 | # @@protoc_insertion_point(class_scope:carrierIdentification.CarrierId) 222 | )) 223 | _sym_db.RegisterMessage(CarrierId) 224 | 225 | CarrierAttribute = _reflection.GeneratedProtocolMessageType('CarrierAttribute', (_message.Message,), dict( 226 | DESCRIPTOR = _CARRIERATTRIBUTE, 227 | __module__ = 'vendor.carrierId_pb2' 228 | # @@protoc_insertion_point(class_scope:carrierIdentification.CarrierAttribute) 229 | )) 230 | _sym_db.RegisterMessage(CarrierAttribute) 231 | 232 | 233 | DESCRIPTOR._options = None 234 | # @@protoc_insertion_point(module_scope) 235 | -------------------------------------------------------------------------------- /scripts/common.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | [[ "${BASH_SOURCE[0]}" == "${0}" ]] && exit 1 4 | 5 | command_exists() { 6 | type "$1" &> /dev/null 7 | } 8 | 9 | check_dir() { 10 | local dirPath="$1" 11 | local dirDesc="$2" 12 | 13 | if [[ "$dirPath" == "" || ! -d "$dirPath" ]]; then 14 | echo "[-] $dirDesc directory not found" 15 | usage 16 | fi 17 | } 18 | 19 | check_file() { 20 | local filePath="$1" 21 | local fileDesc="$2" 22 | 23 | if [[ "$filePath" == "" || ! -f "$filePath" ]]; then 24 | echo "[-] $fileDesc file not found" 25 | usage 26 | fi 27 | } 28 | 29 | check_opt_file() { 30 | local filePath="$1" 31 | local fileDesc="$2" 32 | 33 | if [[ "$filePath" != "" && ! -f "$filePath" ]]; then 34 | echo "[-] '$fileDesc' file not found" 35 | usage 36 | fi 37 | } 38 | 39 | array_contains() { 40 | local element 41 | for element in "${@:2}"; do [[ "$element" == "$1" ]] && return 0; done 42 | return 1 43 | } 44 | 45 | array_contains_rel() { 46 | local element 47 | for element in "${@:2}"; do [[ "$element" =~ $1 ]] && return 0; done 48 | return 1 49 | } 50 | 51 | isValidApiLevel() { 52 | local apiLevel="$1" 53 | if [[ ! "$apiLevel" = *[[:digit:]]* ]]; then 54 | echo "[-] Invalid API level '$apiLevel'" 55 | abort 1 56 | fi 57 | } 58 | 59 | isValidConfigType() { 60 | local confType="$1" 61 | if [[ "$confType" != "naked" && "$confType" != "full" ]]; then 62 | echo "[-] Invalid config type '$confType'" 63 | abort 1 64 | fi 65 | } 66 | 67 | jqRawStrTop() { 68 | local query="$1" 69 | local conf_file="$2" 70 | 71 | jq -r ".\"$query\"" "$conf_file" || { 72 | echo "[-] json raw top string parse failed" >&2 73 | abort 1 74 | } 75 | } 76 | 77 | jqIncRawArrayTop() { 78 | local query="$1" 79 | local conf_file="$2" 80 | 81 | jq -r ".\"$query\"[]" "$conf_file" || { 82 | echo "[-] json top raw string string parse failed" >&2 83 | abort 1 84 | } 85 | } 86 | 87 | jqRawStr() { 88 | local api="api-$1" 89 | local conf="$2" 90 | local query="$3" 91 | local conf_file="$4" 92 | 93 | jq -r ".\"$api\".\"$conf\".\"$query\"" "$conf_file" || { 94 | echo "[-] json raw string parse failed" >&2 95 | abort 1 96 | } 97 | } 98 | 99 | jqIncRawArray() { 100 | local api="api-$1" 101 | local conf="$2" 102 | local query="$3" 103 | local conf_file="$4" 104 | 105 | jq -r ".\"$api\".naked.\"$query\"[]" "$conf_file" || { 106 | echo "[-] json raw string array parse failed" >&2 107 | abort 1 108 | } 109 | 110 | if [[ "$conf" == "naked" ]]; then 111 | return 112 | fi 113 | 114 | jq -r ".\"$api\".full.\"$query\"[]" "$conf_file" || { 115 | echo "[-] json raw string array parse failed" >&2 116 | abort 1 117 | } 118 | 119 | } 120 | -------------------------------------------------------------------------------- /scripts/constants.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | [[ "${BASH_SOURCE[0]}" == "${0}" ]] && exit 1 4 | 5 | # List of supported devices 6 | declare -ra SUPPORTED_DEVICES=( 7 | "walleye" # Pixel 2 8 | "taimen" # Pixel 2 XL 9 | "blueline" # Pixel 3 10 | "crosshatch" # Pixel 3 XL 11 | "flame" # Pixel 4 12 | "coral" # Pixel 4 XL 13 | "sargo" # Pixel 3a 14 | "bonito" # Pixel 3a XL 15 | "sunfish" # Pixel 4a 16 | "redfin" # Pixel 5 17 | "bramble" # Pixel 4a (5G) 18 | "barbet" # Pixel 5a 19 | ) 20 | 21 | # URLs to download factory images from 22 | readonly NID_URL="https://google.com" 23 | readonly GURL="https://developers.google.com/android/images" 24 | readonly GURL2="https://developers.google.com/android/ota" 25 | 26 | # oatdump dependencies URLs as compiled from AOSP matching API levels 27 | readonly L_OATDUMP_URL_API30='https://onedrive.live.com/download?cid=D1FAC8CC6BE2C2B0&resid=D1FAC8CC6BE2C2B0%21574&authkey=ADSQA_DtfAmmk2c' 28 | readonly D_OATDUMP_URL_API30='https://onedrive.live.com/download?cid=D1FAC8CC6BE2C2B0&resid=D1FAC8CC6BE2C2B0%21582&authkey=ABMMORAJ-GGjs2k' 29 | 30 | readonly L_OATDUMP_API30_SIG='394a47491de4def3b825b22713f5ecfd8f16e00497f35213ffd83c2cc709384e' 31 | readonly D_OATDUMP_API30_SIG='95ce6c296c5115861db3c876eb5bfd11cdc34deebace18462275368492c6ea87' 32 | 33 | # sub-directories that contain bytecode archives 34 | declare -ra SUBDIRS_WITH_BC=("app" "framework" "priv-app" "overlay" "product/app" "product/framework" "product/priv-app" "system_ext/app" "system_ext/framework" "system_ext/priv-app") 35 | 36 | # ART runtime files 37 | declare -ra ART_FILE_EXTS=("odex" "oat" "art" "vdex") 38 | 39 | # Files to skip from vendor partition when parsing factory images (for all configs) 40 | declare -ra VENDOR_SKIP_FILES=( 41 | "build.prop" 42 | "compatibility_matrix.xml" 43 | "default.prop" 44 | "etc/NOTICE.xml.gz" 45 | "etc/wifi/wpa_supplicant.conf" 46 | "manifest.xml" 47 | "bin/toybox_vendor" 48 | "bin/toolbox" 49 | "bin/grep" 50 | "overlay/DisplayCutoutEmulationCorner/DisplayCutoutEmulationCornerOverlay.apk" 51 | "overlay/DisplayCutoutEmulationDouble/DisplayCutoutEmulationDoubleOverlay.apk" 52 | "overlay/DisplayCutoutEmulationTall/DisplayCutoutEmulationTallOverlay.apk" 53 | "overlay/DisplayCutoutNoCutout/NoCutoutOverlay.apk" 54 | "overlay/framework-res__auto_generated_rro.apk" 55 | "overlay/SysuiDarkTheme/SysuiDarkThemeOverlay.apk" 56 | "overlay/framework-res__auto_generated_rro_vendor.apk" 57 | "overlay/NfcNci__auto_generated_rro_vendor.apk" 58 | "overlay/SettingsProvider__auto_generated_rro_vendor.apk" 59 | "overlay/Bluetooth__auto_generated_rro_vendor.apk" 60 | "overlay/TeleService__auto_generated_rro_vendor.apk" 61 | "overlay/SystemUIGoogle__auto_generated_rro_vendor.apk" 62 | "overlay/SettingsProviderTest__auto_generated_rro_vendor.apk" 63 | "overlay/SettingsGoogle__auto_generated_rro_vendor.apk" 64 | "overlay/HbmSVManager__auto_generated_rro_vendor.apk" 65 | ) 66 | 67 | # Files to skip from vendor partition when parsing factory images (for naked config only) 68 | declare -ra VENDOR_SKIP_FILES_NAKED=( 69 | "etc/selinux/nonplat_file_contexts" 70 | "etc/selinux/nonplat_hwservice_contexts" 71 | "etc/selinux/nonplat_mac_permissions.xml" 72 | "etc/selinux/nonplat_property_contexts" 73 | "etc/selinux/nonplat_seapp_contexts" 74 | "etc/selinux/nonplat_sepolicy.cil" 75 | "etc/selinux/nonplat_service_contexts" 76 | "etc/selinux/plat_sepolicy_vers.txt" 77 | "etc/selinux/precompiled_sepolicy" 78 | "etc/selinux/precompiled_sepolicy.plat_and_mapping.sha256" 79 | "etc/selinux/vndservice_contexts" 80 | ) 81 | -------------------------------------------------------------------------------- /scripts/download-nexus-image.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Download factory image for the provided device & build id 4 | # 5 | 6 | set -e # fail on unhandled error 7 | set -u # fail on undefined variable 8 | #set -x # debug 9 | 10 | readonly SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 11 | readonly CONSTS_SCRIPT="$SCRIPTS_DIR/constants.sh" 12 | readonly COMMON_SCRIPT="$SCRIPTS_DIR/common.sh" 13 | readonly TMP_WORK_DIR=$(mktemp -d "${TMPDIR:-/tmp}"/android_img_download.XXXXXX) || exit 1 14 | declare -a SYS_TOOLS=("curl") 15 | 16 | abort() { 17 | exit "$1" 18 | } 19 | 20 | usage() { 21 | cat <<_EOF 22 | Usage: $(basename "$0") [options] 23 | OPTIONS: 24 | -d|--device : Device AOSP codename (angler, bullhead, etc.) 25 | -a|--alias : Device alias at Google Dev website (e.g. volantis vs flounder) 26 | -b|--buildID : BuildID string (e.g. MMB29P) 27 | -o|--output : Path to save images archived 28 | -y|--yes : Default accept Google ToS 29 | --ota : Download OTA instead of factory image 30 | _EOF 31 | abort 1 32 | } 33 | 34 | accept_tos() { 35 | local userRes userResFmt 36 | 37 | # Message based on 'October 3, 2016' update 38 | cat << EOF 39 | 40 | --{ Google Terms and Conditions [1] 41 | Downloading of the system image and use of the device software is subject to the 42 | Google Terms of Service [2]. By continuing, you agree to the Google Terms of 43 | Service [2] and Privacy Policy [3]. Your downloading of the system image and use 44 | of the device software may also be subject to certain third-party terms of 45 | service, which can be found in Settings > About phone > Legal information, or as 46 | otherwise provided. 47 | 48 | [1] https://developers.google.com/android/images#legal 49 | [2] https://www.google.com/intl/en/policies/terms/ 50 | [3] https://www.google.com/intl/en/policies/privacy/ 51 | 52 | EOF 53 | 54 | echo -n "[?] I have read and agree with the above terms and conditions - ACKNOWLEDGE [y|n]: " 55 | if [ "$AUTO_TOS_ACCEPT" = true ]; then 56 | echo "yes" 57 | userRes="yes" 58 | else 59 | read userRes 60 | fi 61 | 62 | userResFmt=$(echo "$userRes" | tr '[:upper:]' '[:lower:]') 63 | if [[ "$userResFmt" != "yes" && "$userResFmt" != "y" ]]; then 64 | echo "[!] Cannot continue downloading without agreeing" 65 | abort 1 66 | fi 67 | } 68 | 69 | trap "abort 1" SIGINT SIGTERM 70 | . "$CONSTS_SCRIPT" 71 | . "$COMMON_SCRIPT" 72 | 73 | # Check that system tools exist 74 | for i in "${SYS_TOOLS[@]}" 75 | do 76 | if ! command_exists "$i"; then 77 | echo "[-] '$i' command not found" 78 | abort 1 79 | fi 80 | done 81 | 82 | DEVICE="" 83 | DEV_ALIAS="" 84 | BUILDID="" 85 | OUTPUT_DIR="" 86 | AUTO_TOS_ACCEPT=false 87 | OTA=false 88 | 89 | while [[ $# -gt 0 ]] 90 | do 91 | arg="$1" 92 | case $arg in 93 | -o|--output) 94 | OUTPUT_DIR=$(echo "$2" | sed 's:/*$::') 95 | shift 96 | ;; 97 | -d|--device) 98 | DEVICE=$(echo "$2" | tr '[:upper:]' '[:lower:]') 99 | shift 100 | ;; 101 | -a|--alias) 102 | DEV_ALIAS=$(echo "$2" | tr '[:upper:]' '[:lower:]') 103 | shift 104 | ;; 105 | -b|--buildID) 106 | BUILDID=$(echo "$2" | tr '[:upper:]' '[:lower:]') 107 | shift 108 | ;; 109 | -y|--yes) 110 | AUTO_TOS_ACCEPT=true 111 | ;; 112 | --ota) 113 | OTA=true 114 | ;; 115 | *) 116 | echo "[-] Invalid argument '$1'" 117 | usage 118 | ;; 119 | esac 120 | shift 121 | done 122 | 123 | if [[ "$DEVICE" == "" ]]; then 124 | echo "[-] device codename cannot be empty" 125 | usage 126 | fi 127 | if [[ "$BUILDID" == "" ]]; then 128 | echo "[-] buildID cannot be empty" 129 | usage 130 | fi 131 | if [[ "$OUTPUT_DIR" == "" || ! -d "$OUTPUT_DIR" ]]; then 132 | echo "[-] Output directory not found" 133 | usage 134 | fi 135 | 136 | # If alias not provided assume same as device codename for simplicity. 137 | # If wrong choice, later scripts will fail to find blobs list file. 138 | if [[ "$DEV_ALIAS" == "" ]]; then 139 | DEV_ALIAS="$DEVICE" 140 | fi 141 | 142 | # Since ToS is bind with NID cookie, first get one 143 | COOKIE_FILE="$TMP_WORK_DIR/g_cookies.txt" 144 | curl --silent -c "$COOKIE_FILE" -L "$NID_URL" &>/dev/null 145 | 146 | # Change cookie scope back to google.com since we might have 147 | # a location based redirect to different domain (e.g. google.gr) 148 | grep -io "google.[[:alpha:]]\+[[:blank:]]" "$COOKIE_FILE" | \ 149 | sed -e "s/[[:space:]]\+//g" | sort -u | \ 150 | while read -r domain 151 | do 152 | sed -i.bak "s/$domain/google.com/g" "$COOKIE_FILE" 153 | done 154 | 155 | # Accept news ToS page 156 | accept_tos 157 | 158 | # Then retrieve the index page 159 | if [ "$OTA" = true ]; then 160 | url=$(curl -L -b "$COOKIE_FILE" --cookie "devsite_wall_acks=nexus-ota-tos" --silent "$GURL2" | \ 161 | grep -i "/dev/null | tr '\t' ' ' | cut -d' ' -f1)" 69 | if [[ "$size" == "" ]]; then 70 | echo "[!] Failed to extract vendor partition size from '$partition_img_raw'" 71 | abort 1 72 | fi 73 | 74 | # Write to file so that 'generate-vendor.sh' can pick the value 75 | # for BoardConfigVendor makefile generation 76 | echo "$size" > "$out_file" 77 | } 78 | 79 | extract_vendor_partition_size() { 80 | extract_partition_size vendor "$1" "$2" 81 | } 82 | 83 | extract_product_partition_size() { 84 | extract_partition_size product "$1" "$2" 85 | } 86 | 87 | extract_system_ext_partition_size() { 88 | extract_partition_size system_ext "$1" "$2" 89 | } 90 | 91 | mount_darwin() { 92 | local imgFile="$1" 93 | local mountPoint="$2" 94 | local mount_log="$TMP_WORK_DIR/mount.log" 95 | local -a osxfuse_ver 96 | local os_major_ver 97 | 98 | os_major_ver="$(sw_vers -productVersion | cut -d '.' -f2)" 99 | if [ "$os_major_ver" -ge 12 ]; then 100 | # If Sierra and above, check that latest supported (3.5.4) osxfuse version is installed 101 | local osxfuse_plist="/Library/Filesystems/osxfuse.fs/Contents/version.plist" 102 | IFS='.' read -r -a osxfuse_ver <<< "$(grep 'CFBundleVersion' -A1 "$osxfuse_plist" | \ 103 | grep -o '.*' | cut -d '>' -f2 | cut -d '<' -f1)" 104 | 105 | if [[ ("${osxfuse_ver[0]}" -lt 3 ) || \ 106 | ("${osxfuse_ver[0]}" -eq 3 && "${osxfuse_ver[1]}" -lt 5) || \ 107 | ("${osxfuse_ver[0]}" -eq 3 && "${osxfuse_ver[1]}" -eq 5 && "${osxfuse_ver[2]}" -lt 4) ]]; then 108 | echo "[!] Detected osxfuse version is '$(echo "${osxfuse_ver[@]}" | tr ' ' '.')'" 109 | echo "[-] Update to latest or disable the check if you know that you're doing" 110 | abort 1 111 | fi 112 | fi 113 | 114 | ext4fuse -o logfile=/dev/stdout,uid=$EUID,ro "$imgFile" "$mountPoint" &>"$mount_log" || { 115 | echo "[-] '$imgFile' mount failed" 116 | cat "$mount_log" 117 | abort 1 118 | } 119 | } 120 | 121 | mount_linux() { 122 | local imgFile="$1" 123 | local mountPoint="$2" 124 | local mount_log="$TMP_WORK_DIR/mount.log" 125 | local mount_cmd 126 | 127 | if [ "$RUNS_WITH_ROOT" = true ]; then 128 | mount_cmd="mount -t ext4 -o loop,ro" 129 | elif [ "$USE_FUSEEXT2" = true ]; then 130 | mount_cmd="fuse-ext2 -o uid=$EUID,ro" 131 | else 132 | mount_cmd="ext4fuse -o logfile=/dev/stdout,uid=$EUID,ro" 133 | fi 134 | 135 | $mount_cmd "$imgFile" "$mountPoint" &>"$mount_log" || { 136 | echo "[-] '$imgFile' mount failed" 137 | cat "$mount_log" 138 | abort 1 139 | } 140 | } 141 | 142 | extract_img_data() { 143 | local image_file="$1" 144 | local out_dir="$2" 145 | local logFile="$TMP_WORK_DIR/debugfs.log" 146 | 147 | if [ ! -d "$out_dir" ]; then 148 | mkdir -p "$out_dir" 149 | fi 150 | 151 | if [[ "$HOST_OS" == "Darwin" ]]; then 152 | debugfs -R "rdump / \"$out_dir\"" "$image_file" &> "$logFile" || { 153 | echo "[-] Failed to extract data from '$image_file'" 154 | abort 1 155 | } 156 | else 157 | debugfs -R 'ls -p' "$image_file" 2>/dev/null | cut -d '/' -f6 | while read -r entry 158 | do 159 | debugfs -R "rdump \"$entry\" \"$out_dir\"" "$image_file" >> "$logFile" 2>&1 || { 160 | echo "[-] Failed to extract data from '$image_file'" 161 | abort 1 162 | } 163 | done 164 | fi 165 | 166 | local symlink_err="rdump: Attempt to read block from filesystem resulted in short read while reading symlink" 167 | if grep -Fq "$symlink_err" "$logFile"; then 168 | echo "[-] Symlinks have not been properly processed from $image_file" 169 | echo "[!] If you don't have a compatible debugfs version, modify 'execute-all.sh' to disable 'USE_DEBUGFS' flag" 170 | abort 1 171 | fi 172 | } 173 | 174 | mount_img() { 175 | local image_file="$1" 176 | local mount_dir="$2" 177 | 178 | if [ ! -d "$mount_dir" ]; then 179 | mkdir -p "$mount_dir" 180 | fi 181 | 182 | if [[ "$HOST_OS" == "Darwin" ]]; then 183 | mount_darwin "$image_file" "$mount_dir" 184 | else 185 | mount_linux "$image_file" "$mount_dir" 186 | fi 187 | 188 | if ! mount | grep -qs "$mount_dir"; then 189 | echo "[-] '$image_file' mount point missing indicates fuse mount error" 190 | abort 1 191 | fi 192 | } 193 | 194 | trap "abort 1" SIGINT SIGTERM 195 | . "$CONSTS_SCRIPT" 196 | . "$COMMON_SCRIPT" 197 | 198 | INPUT_ARCHIVE="" 199 | OUTPUT_DIR="" 200 | CONFIG_FILE="" 201 | USE_DEBUGFS=false 202 | USE_FUSEEXT2=false 203 | RUNS_WITH_ROOT=false 204 | 205 | # Compatibility 206 | HOST_OS=$(uname) 207 | if [[ "$HOST_OS" != "Linux" && "$HOST_OS" != "Darwin" ]]; then 208 | echo "[-] '$HOST_OS' OS is not supported" 209 | abort 1 210 | fi 211 | 212 | while [[ $# -gt 0 ]] 213 | do 214 | arg="$1" 215 | case $arg in 216 | -o|--output) 217 | OUTPUT_DIR=$(echo "$2" | sed 's:/*$::') 218 | shift 219 | ;; 220 | -i|--input) 221 | INPUT_ARCHIVE=$2 222 | shift 223 | ;; 224 | --conf-file) 225 | CONFIG_FILE="$2" 226 | shift 227 | ;; 228 | --debugfs) 229 | USE_DEBUGFS=true 230 | ;; 231 | --fuse-ext2) 232 | USE_FUSEEXT2=true 233 | ;; 234 | *) 235 | echo "[-] Invalid argument '$1'" 236 | usage 237 | ;; 238 | esac 239 | shift 240 | done 241 | 242 | # Check if script is running as root to directly use loopback instead of fuses 243 | if [ "$EUID" -eq 0 ]; then 244 | RUNS_WITH_ROOT=true 245 | echo "[*] Running as root - using loopback for image mounts" 246 | else 247 | if [ "$USE_FUSEEXT2" = true ]; then 248 | echo "[*] Using fuse-ext2 for image mounts" 249 | elif [ "$USE_DEBUGFS" = true ]; then 250 | echo "[*] Using debugfs for image mounts" 251 | else 252 | echo "[*] Using ext4fuse for image mounts" 253 | fi 254 | fi 255 | 256 | # Additional tools based on chosen image files data extraction method 257 | if [ "$RUNS_WITH_ROOT" = true ]; then 258 | SYS_TOOLS+=("mount") 259 | elif [ "$USE_DEBUGFS" = true ]; then 260 | SYS_TOOLS+=("debugfs") 261 | elif [ "$USE_FUSEEXT2" = true ]; then 262 | SYS_TOOLS+=("fuse-ext2") 263 | else 264 | SYS_TOOLS+=("ext4fuse") 265 | # Platform specific commands 266 | if [[ "$HOST_OS" == "Darwin" ]]; then 267 | SYS_TOOLS+=("sw_vers") 268 | fi 269 | fi 270 | 271 | # Check that system tools exist 272 | for i in "${SYS_TOOLS[@]}" 273 | do 274 | if ! command_exists "$i"; then 275 | echo "[-] '$i' command not found" 276 | abort 1 277 | fi 278 | done 279 | 280 | # Input args check 281 | check_dir "$OUTPUT_DIR" "Output" 282 | check_file "$INPUT_ARCHIVE" "Input archive" 283 | check_file "$CONFIG_FILE" "Device Config File" 284 | 285 | # Fetch required values from config 286 | readonly VENDOR="$(jqRawStrTop "vendor" "$CONFIG_FILE")" 287 | readonly EXTRA_IMGS_LIST="$(jqIncRawArrayTop "extra-partitions" "$CONFIG_FILE")" 288 | if [[ "$EXTRA_IMGS_LIST" != "" ]]; then 289 | readarray -t EXTRA_IMGS < <(echo "$EXTRA_IMGS_LIST") 290 | fi 291 | 292 | # Prepare output folders 293 | SYSTEM_DATA_OUT="$OUTPUT_DIR/system" 294 | if [ -d "$SYSTEM_DATA_OUT" ]; then 295 | rm -rf "${SYSTEM_DATA_OUT:?}"/* 296 | fi 297 | 298 | VENDOR_DATA_OUT="$OUTPUT_DIR/vendor" 299 | if [ -d "$VENDOR_DATA_OUT" ]; then 300 | rm -rf "${VENDOR_DATA_OUT:?}"/* 301 | fi 302 | 303 | PRODUCT_DATA_OUT="$OUTPUT_DIR/product" 304 | if [ -d "$PRODUCT_DATA_OUT" ]; then 305 | rm -rf "${PRODUCT_DATA_OUT:?}"/* 306 | fi 307 | 308 | SYSTEM_EXT_DATA_OUT="$OUTPUT_DIR/system_ext" 309 | if [ -d "$SYSTEM_EXT_DATA_OUT" ]; then 310 | rm -rf "${SYSTEM_EXT_DATA_OUT:?}"/* 311 | fi 312 | 313 | RADIO_DATA_OUT="$OUTPUT_DIR/radio" 314 | if [ -d "$RADIO_DATA_OUT" ]; then 315 | rm -rf "${RADIO_DATA_OUT:?}"/* 316 | fi 317 | mkdir -p "$RADIO_DATA_OUT" 318 | 319 | archiveName="$(basename "$INPUT_ARCHIVE")" 320 | fileExt="${archiveName##*.}" 321 | archName="$(basename "$archiveName" ".$fileExt")" 322 | extractDir="$TMP_WORK_DIR/$archName" 323 | mkdir -p "$extractDir" 324 | 325 | # Extract archive 326 | extract_archive "$INPUT_ARCHIVE" "$extractDir" 327 | 328 | hasProductImg=false 329 | hasSystemExtImg=false 330 | if [[ -f "$extractDir/system.img" && -f "$extractDir/vendor.img" ]]; then 331 | sysImg="$extractDir/system.img" 332 | vImg="$extractDir/vendor.img" 333 | if [[ -f "$extractDir/product.img" ]]; then 334 | pImg="$extractDir/product.img" 335 | hasProductImg=true 336 | fi 337 | if [[ -f "$extractDir/system_ext.img" ]]; then 338 | sysExtImg="$extractDir/system_ext.img" 339 | hasSystemExtImg=true 340 | fi 341 | else 342 | updateArch=$(find "$extractDir" -iname "image-*.zip" | head -n 1) 343 | echo "[*] Unzipping '$(basename "$updateArch")'" 344 | unzip -qq "$updateArch" -d "$extractDir/images" || { 345 | echo "[-] unzip failed" 346 | abort 1 347 | } 348 | sysImg="$extractDir/images/system.img" 349 | vImg="$extractDir/images/vendor.img" 350 | if [[ -f "$extractDir/images/product.img" ]]; then 351 | pImg="$extractDir/images/product.img" 352 | hasProductImg=true 353 | fi 354 | if [[ -f "$extractDir/images/system_ext.img" ]]; then 355 | sysExtImg="$extractDir/images/system_ext.img" 356 | hasSystemExtImg=true 357 | fi 358 | fi 359 | 360 | # Baseband image 361 | hasRadioImg=true 362 | radioImg=$(find "$extractDir" -iname "radio-*.img" | head -n 1) 363 | if [[ "$radioImg" == "" ]]; then 364 | echo "[!] No baseband firmware present - skipping" 365 | hasRadioImg=false 366 | fi 367 | 368 | # Bootloader image 369 | bootloaderImg=$(find "$extractDir" -iname "bootloader-*.img" | head -n 1) 370 | if [[ "$bootloaderImg" == "" ]]; then 371 | echo "[-] Failed to locate bootloader image" 372 | abort 1 373 | fi 374 | 375 | # Convert from sparse to raw 376 | rawSysImg="$extractDir/images/system.img.raw" 377 | rawVImg="$extractDir/images/vendor.img.raw" 378 | rawPImg="$extractDir/images/product.img.raw" 379 | rawSysExtImg="$extractDir/images/system_ext.img.raw" 380 | 381 | simg2img "$sysImg" "$rawSysImg" || { 382 | echo "[-] simg2img failed to convert system.img from sparse" 383 | abort 1 384 | } 385 | simg2img "$vImg" "$rawVImg" || { 386 | echo "[-] simg2img failed to convert vendor.img from sparse" 387 | abort 1 388 | } 389 | if [ $hasProductImg = true ]; then 390 | simg2img "$pImg" "$rawPImg" || { 391 | echo "[-] simg2img failed to convert product.img from sparse" 392 | abort 1 393 | } 394 | fi 395 | if [ $hasSystemExtImg = true ]; then 396 | simg2img "$sysExtImg" "$rawSysExtImg" || { 397 | echo "[-] simg2img failed to convert system_ext.img from sparse" 398 | abort 1 399 | } 400 | fi 401 | 402 | # Save raw vendor img partition size 403 | extract_vendor_partition_size "$rawVImg" "$OUTPUT_DIR" 404 | if [ $hasProductImg = true ]; then 405 | extract_product_partition_size "$rawPImg" "$OUTPUT_DIR" 406 | fi 407 | if [ $hasSystemExtImg = true ]; then 408 | extract_system_ext_partition_size "$rawSysExtImg" "$OUTPUT_DIR" 409 | fi 410 | 411 | if [ "$USE_DEBUGFS" = true ]; then 412 | # Extract raw system, vendor, product, and system_ext images. Data will be processed later 413 | extract_img_data "$rawSysImg" "$SYSTEM_DATA_OUT" 414 | extract_img_data "$rawVImg" "$VENDOR_DATA_OUT" 415 | if [ $hasProductImg = true ]; then 416 | extract_img_data "$rawPImg" "$PRODUCT_DATA_OUT" 417 | fi 418 | if [ $hasSystemExtImg = true ]; then 419 | extract_img_data "$rawSysExtImg" "$SYSTEM_EXT_DATA_OUT" 420 | fi 421 | else 422 | # Mount raw system, vendor, product and system_ext images. Data will be processed later 423 | mount_img "$rawSysImg" "$SYSTEM_DATA_OUT" 424 | mount_img "$rawVImg" "$VENDOR_DATA_OUT" 425 | if [ $hasProductImg = true ]; then 426 | mount_img "$rawPImg" "$PRODUCT_DATA_OUT" 427 | fi 428 | if [ $hasSystemExtImg = true ]; then 429 | mount_img "$rawSysExtImg" "$SYSTEM_EXT_DATA_OUT" 430 | fi 431 | fi 432 | 433 | # Copy bootloader & radio images 434 | if [ $hasRadioImg = true ]; then 435 | mv "$radioImg" "$RADIO_DATA_OUT/" || { 436 | echo "[-] Failed to copy radio image" 437 | abort 1 438 | } 439 | fi 440 | mv "$bootloaderImg" "$RADIO_DATA_OUT/" || { 441 | echo "[-] Failed to copy bootloader image" 442 | abort 1 443 | } 444 | 445 | # For Pixel devices with AB partitions layout, copy additional images required for OTA 446 | if [[ "$VENDOR" == "google" && "$EXTRA_IMGS_LIST" != "" ]]; then 447 | for img in "${EXTRA_IMGS[@]}" 448 | do 449 | if [ ! -f "$extractDir/images/$img.img" ]; then 450 | echo "[-] Failed to locate '$img.img' in factory image" 451 | abort 1 452 | fi 453 | mv "$extractDir/images/$img.img" "$RADIO_DATA_OUT/" 454 | done 455 | fi 456 | 457 | abort 0 458 | -------------------------------------------------------------------------------- /scripts/extract-ota.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Extract images from ota zip 4 | # 5 | 6 | set -e # fail on unhandled error 7 | set -u # fail on undefined variable 8 | #set -x # debug 9 | 10 | readonly SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 11 | readonly CONSTS_SCRIPT="$SCRIPTS_DIR/constants.sh" 12 | readonly COMMON_SCRIPT="$SCRIPTS_DIR/common.sh" 13 | readonly EXTRACT_PAYLOAD_SCRIPT="$SCRIPTS_DIR/extract_android_ota_payload/extract_android_ota_payload.py" 14 | readonly TMP_WORK_DIR=$(mktemp -d "${TMPDIR:-/tmp}"/android_img_extract.XXXXXX) || exit 1 15 | declare -a SYS_TOOLS=("tar" "find" "unzip" "uname" "du" "stat" "tr" "cut") 16 | 17 | abort() { 18 | # If debug keep work dir for bugs investigation 19 | if [[ "$-" == *x* ]]; then 20 | echo "[*] Workspace available at '$TMP_WORK_DIR' - delete manually when done" 21 | else 22 | rm -rf "$TMP_WORK_DIR" 23 | fi 24 | exit "$1" 25 | } 26 | 27 | usage() { 28 | cat <<_EOF 29 | Usage: $(basename "$0") [options] 30 | OPTIONS: 31 | -i|--input : Archive with ota as downloaded from 32 | Google Nexus ota website 33 | -o|--output : Path to save contents extracted from ota 34 | --conf-file : Device configuration file 35 | _EOF 36 | abort 1 37 | } 38 | 39 | extract_archive() { 40 | local in_archive="$1" 41 | local out_dir="$2" 42 | local archiveFile 43 | 44 | echo "[*] Extracting '$in_archive'" 45 | 46 | archiveFile="$(basename "$in_archive")" 47 | local f_ext="${archiveFile##*.}" 48 | if [[ "$f_ext" == "tar" || "$f_ext" == "tar.gz" || "$f_ext" == "tgz" ]]; then 49 | tar -xf "$in_archive" -C "$out_dir" || { echo "[-] tar extract failed"; abort 1; } 50 | elif [[ "$f_ext" == "zip" ]]; then 51 | unzip -qq "$in_archive" -d "$out_dir" || { echo "[-] zip extract failed"; abort 1; } 52 | else 53 | echo "[-] Unknown archive format '$f_ext'" 54 | abort 1 55 | fi 56 | } 57 | 58 | extract_payload() { 59 | local otaFile="$1" 60 | local out_dir="$2" 61 | $EXTRACT_PAYLOAD_SCRIPT $out_dir/payload.bin $out_dir $otaFile 62 | } 63 | 64 | trap "abort 1" SIGINT SIGTERM 65 | . "$CONSTS_SCRIPT" 66 | . "$COMMON_SCRIPT" 67 | 68 | INPUT_ARCHIVE="" 69 | OUTPUT_DIR="" 70 | CONFIG_FILE="" 71 | 72 | # Compatibility 73 | HOST_OS=$(uname) 74 | if [[ "$HOST_OS" != "Linux" && "$HOST_OS" != "Darwin" ]]; then 75 | echo "[-] '$HOST_OS' OS is not supported" 76 | abort 1 77 | fi 78 | 79 | while [[ $# -gt 0 ]] 80 | do 81 | arg="$1" 82 | case $arg in 83 | -o|--output) 84 | OUTPUT_DIR=$(echo "$2" | sed 's:/*$::') 85 | shift 86 | ;; 87 | -i|--input) 88 | INPUT_ARCHIVE=$2 89 | shift 90 | ;; 91 | --conf-file) 92 | CONFIG_FILE="$2" 93 | shift 94 | ;; 95 | *) 96 | echo "[-] Invalid argument '$1'" 97 | usage 98 | ;; 99 | esac 100 | shift 101 | done 102 | 103 | # Check that system tools exist 104 | for i in "${SYS_TOOLS[@]}" 105 | do 106 | if ! command_exists "$i"; then 107 | echo "[-] '$i' command not found" 108 | abort 1 109 | fi 110 | done 111 | 112 | # Input args check 113 | check_dir "$OUTPUT_DIR" "Output" 114 | check_file "$INPUT_ARCHIVE" "Input archive" 115 | check_file "$CONFIG_FILE" "Device Config File" 116 | 117 | # Fetch required values from config 118 | readonly VENDOR="$(jqRawStrTop "vendor" "$CONFIG_FILE")" 119 | readonly OTA_IMGS_LIST="$(jqIncRawArrayTop "ota-partitions" "$CONFIG_FILE")" 120 | if [[ "$OTA_IMGS_LIST" != "" ]]; then 121 | readarray -t OTA_IMGS < <(echo "$OTA_IMGS_LIST") 122 | fi 123 | 124 | RADIO_DATA_OUT="$OUTPUT_DIR/radio" 125 | if [ -d "$RADIO_DATA_OUT" ]; then 126 | rm -rf "${RADIO_DATA_OUT:?}"/* 127 | fi 128 | mkdir -p "$RADIO_DATA_OUT" 129 | 130 | archiveName="$(basename "$INPUT_ARCHIVE")" 131 | fileExt="${archiveName##*.}" 132 | archName="$(basename "$archiveName" ".$fileExt")" 133 | extractDir="$TMP_WORK_DIR/$archName" 134 | mkdir -p "$extractDir" 135 | 136 | # Extract archive 137 | extract_archive "$INPUT_ARCHIVE" "$extractDir" 138 | 139 | # For Pixel devices with AB partitions layout, copy additional images required for OTA 140 | if [[ "$VENDOR" == "google" && "$OTA_IMGS_LIST" != "" ]]; then 141 | for img in "${OTA_IMGS[@]}" 142 | do 143 | extract_payload "$img.img" "$extractDir" 144 | if [ ! -f "$extractDir/$img.img" ]; then 145 | echo "[-] Failed to locate '$img.img' in ota zip" 146 | abort 1 147 | fi 148 | mv "$extractDir/$img.img" "$RADIO_DATA_OUT/" 149 | done 150 | fi 151 | 152 | abort 0 153 | -------------------------------------------------------------------------------- /scripts/extract_android_ota_payload/.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc 2 | -------------------------------------------------------------------------------- /scripts/extract_android_ota_payload/Makefile: -------------------------------------------------------------------------------- 1 | TARGETS := update_metadata_pb2.py 2 | 3 | .PHONY: all clean 4 | all: $(TARGETS) 5 | clean: 6 | rm -f $(TARGETS) 7 | 8 | %_pb2.py: %.proto 9 | protoc --python_out=. $< 10 | 11 | update_metadata.proto: 12 | wget -qO- \ 13 | https://android.googlesource.com/platform/system/update_engine/+/refs/heads/master/update_metadata.proto?format=TEXT | \ 14 | base64 --decode > $@ 15 | -------------------------------------------------------------------------------- /scripts/extract_android_ota_payload/README.md: -------------------------------------------------------------------------------- 1 | # extract_android_ota_payload.py 2 | 3 | Extract Android firmware images from an OTA payload.bin file. 4 | 5 | With the introduction of the A/B system update, the OTA file format changed. 6 | This tool allows to extract and decompress the firmware images packed using the 'brillo' toolset. 7 | 8 | Incremental firmware images are not supported (source_copy, source_bsdiff operations). 9 | 10 | ## Usage 11 | 12 | ``` 13 | $ extract_android_ota_payload.py [target_dir] [partition.img] 14 | : file extracted from the OTA zip file or the OTA zip file 15 | : output directory for the extracted file 16 | : name of partition to be extracted 17 | ``` 18 | 19 | ## Example 20 | 21 | ``` 22 | $ python extract_android_ota_payload.py marlin-ota-opm4.171019.021.d1-fd6998a5.zip /tmp/ 23 | Extracting 'boot.img' 24 | Extracting 'system.img' 25 | Extracting 'vendor.img' 26 | ... 27 | Extracting 'modem.img' 28 | ``` 29 | 30 | ## Dependencies 31 | 32 | ``` 33 | python-protobuf 34 | ``` 35 | -------------------------------------------------------------------------------- /scripts/extract_android_ota_payload/extract_android_ota_payload.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import hashlib 4 | import os 5 | import os.path 6 | import shutil 7 | import struct 8 | import subprocess 9 | import sys 10 | import zipfile 11 | 12 | # from https://android.googlesource.com/platform/system/update_engine/+/refs/heads/master/scripts/update_payload/ 13 | import update_metadata_pb2 14 | 15 | PROGRAMS = [ 'bzcat', 'xzcat' ] 16 | 17 | BRILLO_MAJOR_PAYLOAD_VERSION = 2 18 | 19 | class PayloadError(Exception): 20 | pass 21 | 22 | class Payload(object): 23 | class _PayloadHeader(object): 24 | _MAGIC = b'CrAU' 25 | 26 | def __init__(self): 27 | self.version = None 28 | self.manifest_len = None 29 | self.metadata_signature_len = None 30 | self.size = None 31 | 32 | def ReadFromPayload(self, payload_file): 33 | magic = payload_file.read(4) 34 | if magic != self._MAGIC: 35 | raise PayloadError('Invalid payload magic: %s' % magic) 36 | self.version = struct.unpack('>Q', payload_file.read(8))[0] 37 | self.manifest_len = struct.unpack('>Q', payload_file.read(8))[0] 38 | self.size = 20 39 | self.metadata_signature_len = 0 40 | if self.version != BRILLO_MAJOR_PAYLOAD_VERSION: 41 | raise PayloadError('Unsupported payload version (%d)' % self.version) 42 | self.size += 4 43 | self.metadata_signature_len = struct.unpack('>I', payload_file.read(4))[0] 44 | 45 | def __init__(self, payload_file): 46 | self.payload_file = payload_file 47 | self.header = None 48 | self.manifest = None 49 | self.data_offset = None 50 | self.metadata_signature = None 51 | self.metadata_size = None 52 | 53 | def _ReadManifest(self): 54 | return self.payload_file.read(self.header.manifest_len) 55 | 56 | def _ReadMetadataSignature(self): 57 | self.payload_file.seek(self.header.size + self.header.manifest_len) 58 | return self.payload_file.read(self.header.metadata_signature_len); 59 | 60 | def ReadDataBlob(self, offset, length): 61 | self.payload_file.seek(self.data_offset + offset) 62 | return self.payload_file.read(length) 63 | 64 | def Init(self): 65 | self.header = self._PayloadHeader() 66 | self.header.ReadFromPayload(self.payload_file) 67 | manifest_raw = self._ReadManifest() 68 | self.manifest = update_metadata_pb2.DeltaArchiveManifest() 69 | self.manifest.ParseFromString(manifest_raw) 70 | metadata_signature_raw = self._ReadMetadataSignature() 71 | if metadata_signature_raw: 72 | self.metadata_signature = update_metadata_pb2.Signatures() 73 | self.metadata_signature.ParseFromString(metadata_signature_raw) 74 | self.metadata_size = self.header.size + self.header.manifest_len 75 | self.data_offset = self.metadata_size + self.header.metadata_signature_len 76 | 77 | def decompress_payload(command, data, size, hash): 78 | p = subprocess.Popen([command, '-'], stdout=subprocess.PIPE, stdin=subprocess.PIPE) 79 | r = p.communicate(data)[0] 80 | if len(r) != size: 81 | print("Unexpected size %d %d" % (len(r), size)) 82 | elif hashlib.sha256(data).digest() != hash: 83 | print("Hash mismatch") 84 | return r 85 | 86 | def parse_payload(payload_f, partition, out_f): 87 | BLOCK_SIZE = 4096 88 | for operation in partition.operations: 89 | e = operation.dst_extents[0] 90 | data = payload_f.ReadDataBlob(operation.data_offset, operation.data_length) 91 | out_f.seek(e.start_block * BLOCK_SIZE) 92 | if operation.type == update_metadata_pb2.InstallOperation.REPLACE: 93 | out_f.write(data) 94 | elif operation.type == update_metadata_pb2.InstallOperation.REPLACE_XZ: 95 | r = decompress_payload('xzcat', data, e.num_blocks * BLOCK_SIZE, operation.data_sha256_hash) 96 | out_f.write(r) 97 | elif operation.type == update_metadata_pb2.InstallOperation.REPLACE_BZ: 98 | r = decompress_payload('bzcat', data, e.num_blocks * BLOCK_SIZE, operation.data_sha256_hash) 99 | out_f.write(r) 100 | else: 101 | raise PayloadError('Unhandled operation type ({} - {})'.format(operation.type, 102 | update_metadata_pb2.InstallOperation.Type.Name(operation.type))) 103 | 104 | def main(filename, output_dir, partition): 105 | if filename.endswith('.zip'): 106 | print("Extracting 'payload.bin' from OTA file...") 107 | ota_zf = zipfile.ZipFile(filename) 108 | payload_file = open(ota_zf.extract('payload.bin', output_dir), 'rb') 109 | else: 110 | payload_file = open(filename, 'rb') 111 | 112 | payload = Payload(payload_file) 113 | payload.Init() 114 | 115 | for p in payload.manifest.partitions: 116 | name = p.partition_name + '.img' 117 | if (partition is not None and name != partition): 118 | continue 119 | print("Extracting '%s'" % name) 120 | fname = os.path.join(output_dir, name) 121 | out_f = open(fname, 'wb') 122 | try: 123 | parse_payload(payload, p, out_f) 124 | except PayloadError as e: 125 | print('Failed: %s' % e) 126 | out_f.close() 127 | os.unlink(fname) 128 | 129 | if __name__ == '__main__': 130 | try: 131 | filename = sys.argv[1] 132 | except: 133 | print('Usage: %s payload.bin [output_dir] [partition.img]' % sys.argv[0]) 134 | sys.exit() 135 | 136 | try: 137 | output_dir = sys.argv[2] 138 | except IndexError: 139 | output_dir = os.getcwd() 140 | 141 | try: 142 | partition = sys.argv[3] 143 | except IndexError: 144 | try: 145 | partition = sys.argv[2] 146 | except IndexError: 147 | partition = None 148 | 149 | if partition is not None and not partition.endswith('.img'): 150 | partition = None 151 | 152 | if output_dir.endswith('.img'): 153 | output_dir = os.getcwd() 154 | 155 | if not os.path.exists(output_dir): 156 | os.makedirs(output_dir) 157 | 158 | main(filename, output_dir, partition) 159 | -------------------------------------------------------------------------------- /scripts/extract_android_ota_payload/requirements.txt: -------------------------------------------------------------------------------- 1 | protobuf>=3.6.0 2 | -------------------------------------------------------------------------------- /scripts/extract_android_ota_payload/update_metadata.proto: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2010 The Android Open Source Project 3 | // 4 | // Licensed under the Apache License, Version 2.0 (the "License"); 5 | // you may not use this file except in compliance with the License. 6 | // You may obtain a copy of the License at 7 | // 8 | // http://www.apache.org/licenses/LICENSE-2.0 9 | // 10 | // Unless required by applicable law or agreed to in writing, software 11 | // distributed under the License is distributed on an "AS IS" BASIS, 12 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | // See the License for the specific language governing permissions and 14 | // limitations under the License. 15 | // 16 | 17 | // Update file format: A delta update file contains all the deltas needed 18 | // to update a system from one specific version to another specific 19 | // version. The update format is represented by this struct pseudocode: 20 | // struct delta_update_file { 21 | // char magic[4] = "CrAU"; 22 | // uint64 file_format_version; 23 | // uint64 manifest_size; // Size of protobuf DeltaArchiveManifest 24 | // 25 | // // Only present if format_version > 1: 26 | // uint32 metadata_signature_size; 27 | // 28 | // // The Bzip2 compressed DeltaArchiveManifest 29 | // char manifest[]; 30 | // 31 | // // The signature of the metadata (from the beginning of the payload up to 32 | // // this location, not including the signature itself). This is a serialized 33 | // // Signatures message. 34 | // char medatada_signature_message[metadata_signature_size]; 35 | // 36 | // // Data blobs for files, no specific format. The specific offset 37 | // // and length of each data blob is recorded in the DeltaArchiveManifest. 38 | // struct { 39 | // char data[]; 40 | // } blobs[]; 41 | // 42 | // // These two are not signed: 43 | // uint64 payload_signatures_message_size; 44 | // char payload_signatures_message[]; 45 | // 46 | // }; 47 | 48 | // The DeltaArchiveManifest protobuf is an ordered list of InstallOperation 49 | // objects. These objects are stored in a linear array in the 50 | // DeltaArchiveManifest. Each operation is applied in order by the client. 51 | 52 | // The DeltaArchiveManifest also contains the initial and final 53 | // checksums for the device. 54 | 55 | // The client will perform each InstallOperation in order, beginning even 56 | // before the entire delta file is downloaded (but after at least the 57 | // protobuf is downloaded). The types of operations are explained: 58 | // - REPLACE: Replace the dst_extents on the drive with the attached data, 59 | // zero padding out to block size. 60 | // - REPLACE_BZ: bzip2-uncompress the attached data and write it into 61 | // dst_extents on the drive, zero padding to block size. 62 | // - MOVE: Copy the data in src_extents to dst_extents. Extents may overlap, 63 | // so it may be desirable to read all src_extents data into memory before 64 | // writing it out. 65 | // - SOURCE_COPY: Copy the data in src_extents in the old partition to 66 | // dst_extents in the new partition. There's no overlapping of data because 67 | // the extents are in different partitions. 68 | // - BSDIFF: Read src_length bytes from src_extents into memory, perform 69 | // bspatch with attached data, write new data to dst_extents, zero padding 70 | // to block size. 71 | // - SOURCE_BSDIFF: Read the data in src_extents in the old partition, perform 72 | // bspatch with the attached data and write the new data to dst_extents in the 73 | // new partition. 74 | // - ZERO: Write zeros to the destination dst_extents. 75 | // - DISCARD: Discard the destination dst_extents blocks on the physical medium. 76 | // the data read from those block is undefined. 77 | // - REPLACE_XZ: Replace the dst_extents with the contents of the attached 78 | // xz file after decompression. The xz file should only use crc32 or no crc at 79 | // all to be compatible with xz-embedded. 80 | // - PUFFDIFF: Read the data in src_extents in the old partition, perform 81 | // puffpatch with the attached data and write the new data to dst_extents in 82 | // the new partition. 83 | // 84 | // The operations allowed in the payload (supported by the client) depend on the 85 | // major and minor version. See InstallOperation.Type below for details. 86 | 87 | syntax = "proto2"; 88 | 89 | package chromeos_update_engine; 90 | option optimize_for = LITE_RUNTIME; 91 | 92 | // Data is packed into blocks on disk, always starting from the beginning 93 | // of the block. If a file's data is too large for one block, it overflows 94 | // into another block, which may or may not be the following block on the 95 | // physical partition. An ordered list of extents is another 96 | // representation of an ordered list of blocks. For example, a file stored 97 | // in blocks 9, 10, 11, 2, 18, 12 (in that order) would be stored in 98 | // extents { {9, 3}, {2, 1}, {18, 1}, {12, 1} } (in that order). 99 | // In general, files are stored sequentially on disk, so it's more efficient 100 | // to use extents to encode the block lists (this is effectively 101 | // run-length encoding). 102 | // A sentinel value (kuint64max) as the start block denotes a sparse-hole 103 | // in a file whose block-length is specified by num_blocks. 104 | 105 | // Signatures: Updates may be signed by the OS vendor. The client verifies 106 | // an update's signature by hashing the entire download. The section of the 107 | // download that contains the signature is at the end of the file, so when 108 | // signing a file, only the part up to the signature part is signed. 109 | // Then, the client looks inside the download's Signatures message for a 110 | // Signature message that it knows how to handle. Generally, a client will 111 | // only know how to handle one type of signature, but an update may contain 112 | // many signatures to support many different types of client. Then client 113 | // selects a Signature message and uses that, along with a known public key, 114 | // to verify the download. The public key is expected to be part of the 115 | // client. 116 | 117 | message Extent { 118 | optional uint64 start_block = 1; 119 | optional uint64 num_blocks = 2; 120 | } 121 | 122 | message Signatures { 123 | message Signature { 124 | optional uint32 version = 1; 125 | optional bytes data = 2; 126 | } 127 | repeated Signature signatures = 1; 128 | } 129 | 130 | message PartitionInfo { 131 | optional uint64 size = 1; 132 | optional bytes hash = 2; 133 | } 134 | 135 | // Describe an image we are based on in a human friendly way. 136 | // Examples: 137 | // dev-channel, x86-alex, 1.2.3, mp-v3 138 | // nplusone-channel, x86-alex, 1.2.4, mp-v3, dev-channel, 1.2.3 139 | // 140 | // All fields will be set, if this message is present. 141 | message ImageInfo { 142 | optional string board = 1; 143 | optional string key = 2; 144 | optional string channel = 3; 145 | optional string version = 4; 146 | 147 | // If these values aren't present, they should be assumed to match 148 | // the equivalent value above. They are normally only different for 149 | // special image types such as nplusone images. 150 | optional string build_channel = 5; 151 | optional string build_version = 6; 152 | } 153 | 154 | message InstallOperation { 155 | enum Type { 156 | REPLACE = 0; // Replace destination extents w/ attached data. 157 | REPLACE_BZ = 1; // Replace destination extents w/ attached bzipped data. 158 | MOVE = 2 [deprecated = true]; // Move source extents to target extents. 159 | BSDIFF = 3 [deprecated = true]; // The data is a bsdiff binary diff. 160 | 161 | // On minor version 2 or newer, these operations are supported: 162 | SOURCE_COPY = 4; // Copy from source to target partition 163 | SOURCE_BSDIFF = 5; // Like BSDIFF, but read from source partition 164 | 165 | // On minor version 3 or newer and on major version 2 or newer, these 166 | // operations are supported: 167 | REPLACE_XZ = 8; // Replace destination extents w/ attached xz data. 168 | 169 | // On minor version 4 or newer, these operations are supported: 170 | ZERO = 6; // Write zeros in the destination. 171 | DISCARD = 7; // Discard the destination blocks, reading as undefined. 172 | BROTLI_BSDIFF = 10; // Like SOURCE_BSDIFF, but compressed with brotli. 173 | 174 | // On minor version 5 or newer, these operations are supported: 175 | PUFFDIFF = 9; // The data is in puffdiff format. 176 | } 177 | required Type type = 1; 178 | 179 | // Only minor version 6 or newer support 64 bits |data_offset| and 180 | // |data_length|, older client will read them as uint32. 181 | // The offset into the delta file (after the protobuf) 182 | // where the data (if any) is stored 183 | optional uint64 data_offset = 2; 184 | // The length of the data in the delta file 185 | optional uint64 data_length = 3; 186 | 187 | // Ordered list of extents that are read from (if any) and written to. 188 | repeated Extent src_extents = 4; 189 | // Byte length of src, equal to the number of blocks in src_extents * 190 | // block_size. It is used for BSDIFF and SOURCE_BSDIFF, because we need to 191 | // pass that external program the number of bytes to read from the blocks we 192 | // pass it. This is not used in any other operation. 193 | optional uint64 src_length = 5; 194 | 195 | repeated Extent dst_extents = 6; 196 | // Byte length of dst, equal to the number of blocks in dst_extents * 197 | // block_size. Used for BSDIFF and SOURCE_BSDIFF, but not in any other 198 | // operation. 199 | optional uint64 dst_length = 7; 200 | 201 | // Optional SHA 256 hash of the blob associated with this operation. 202 | // This is used as a primary validation for http-based downloads and 203 | // as a defense-in-depth validation for https-based downloads. If 204 | // the operation doesn't refer to any blob, this field will have 205 | // zero bytes. 206 | optional bytes data_sha256_hash = 8; 207 | 208 | // Indicates the SHA 256 hash of the source data referenced in src_extents at 209 | // the time of applying the operation. If present, the update_engine daemon 210 | // MUST read and verify the source data before applying the operation. 211 | optional bytes src_sha256_hash = 9; 212 | } 213 | 214 | // Describes the update to apply to a single partition. 215 | message PartitionUpdate { 216 | // A platform-specific name to identify the partition set being updated. For 217 | // example, in Chrome OS this could be "ROOT" or "KERNEL". 218 | required string partition_name = 1; 219 | 220 | // Whether this partition carries a filesystem with post-install program that 221 | // must be run to finalize the update process. See also |postinstall_path| and 222 | // |filesystem_type|. 223 | optional bool run_postinstall = 2; 224 | 225 | // The path of the executable program to run during the post-install step, 226 | // relative to the root of this filesystem. If not set, the default "postinst" 227 | // will be used. This setting is only used when |run_postinstall| is set and 228 | // true. 229 | optional string postinstall_path = 3; 230 | 231 | // The filesystem type as passed to the mount(2) syscall when mounting the new 232 | // filesystem to run the post-install program. If not set, a fixed list of 233 | // filesystems will be attempted. This setting is only used if 234 | // |run_postinstall| is set and true. 235 | optional string filesystem_type = 4; 236 | 237 | // If present, a list of signatures of the new_partition_info.hash signed with 238 | // different keys. If the update_engine daemon requires vendor-signed images 239 | // and has its public key installed, one of the signatures should be valid 240 | // for /postinstall to run. 241 | repeated Signatures.Signature new_partition_signature = 5; 242 | 243 | optional PartitionInfo old_partition_info = 6; 244 | optional PartitionInfo new_partition_info = 7; 245 | 246 | // The list of operations to be performed to apply this PartitionUpdate. The 247 | // associated operation blobs (in operations[i].data_offset, data_length) 248 | // should be stored contiguously and in the same order. 249 | repeated InstallOperation operations = 8; 250 | 251 | // Whether a failure in the postinstall step for this partition should be 252 | // ignored. 253 | optional bool postinstall_optional = 9; 254 | 255 | // On minor version 6 or newer, these fields are supported: 256 | 257 | // The extent for data covered by verity hash tree. 258 | optional Extent hash_tree_data_extent = 10; 259 | 260 | // The extent to store verity hash tree. 261 | optional Extent hash_tree_extent = 11; 262 | 263 | // The hash algorithm used in verity hash tree. 264 | optional string hash_tree_algorithm = 12; 265 | 266 | // The salt used for verity hash tree. 267 | optional bytes hash_tree_salt = 13; 268 | 269 | // The extent for data covered by FEC. 270 | optional Extent fec_data_extent = 14; 271 | 272 | // The extent to store FEC. 273 | optional Extent fec_extent = 15; 274 | 275 | // The number of FEC roots. 276 | optional uint32 fec_roots = 16 [default = 2]; 277 | } 278 | 279 | message DynamicPartitionGroup { 280 | // Name of the group. 281 | required string name = 1; 282 | 283 | // Maximum size of the group. The sum of sizes of all partitions in the group 284 | // must not exceed the maximum size of the group. 285 | optional uint64 size = 2; 286 | 287 | // A list of partitions that belong to the group. 288 | repeated string partition_names = 3; 289 | } 290 | 291 | // Metadata related to all dynamic partitions. 292 | message DynamicPartitionMetadata { 293 | // All updateable groups present in |partitions| of this DeltaArchiveManifest. 294 | // - If an updatable group is on the device but not in the manifest, it is 295 | // not updated. Hence, the group will not be resized, and partitions cannot 296 | // be added to or removed from the group. 297 | // - If an updatable group is in the manifest but not on the device, the group 298 | // is added to the device. 299 | repeated DynamicPartitionGroup groups = 1; 300 | } 301 | 302 | message DeltaArchiveManifest { 303 | // Only present in major version = 1. List of install operations for the 304 | // kernel and rootfs partitions. For major version = 2 see the |partitions| 305 | // field. 306 | repeated InstallOperation install_operations = 1; 307 | repeated InstallOperation kernel_install_operations = 2; 308 | 309 | // (At time of writing) usually 4096 310 | optional uint32 block_size = 3 [default = 4096]; 311 | 312 | // If signatures are present, the offset into the blobs, generally 313 | // tacked onto the end of the file, and the length. We use an offset 314 | // rather than a bool to allow for more flexibility in future file formats. 315 | // If either is absent, it means signatures aren't supported in this 316 | // file. 317 | optional uint64 signatures_offset = 4; 318 | optional uint64 signatures_size = 5; 319 | 320 | // Only present in major version = 1. Partition metadata used to validate the 321 | // update. For major version = 2 see the |partitions| field. 322 | optional PartitionInfo old_kernel_info = 6; 323 | optional PartitionInfo new_kernel_info = 7; 324 | optional PartitionInfo old_rootfs_info = 8; 325 | optional PartitionInfo new_rootfs_info = 9; 326 | 327 | // old_image_info will only be present for delta images. 328 | optional ImageInfo old_image_info = 10; 329 | 330 | optional ImageInfo new_image_info = 11; 331 | 332 | // The minor version, also referred as "delta version", of the payload. 333 | optional uint32 minor_version = 12 [default = 0]; 334 | 335 | // Only present in major version >= 2. List of partitions that will be 336 | // updated, in the order they will be updated. This field replaces the 337 | // |install_operations|, |kernel_install_operations| and the 338 | // |{old,new}_{kernel,rootfs}_info| fields used in major version = 1. This 339 | // array can have more than two partitions if needed, and they are identified 340 | // by the partition name. 341 | repeated PartitionUpdate partitions = 13; 342 | 343 | // The maximum timestamp of the OS allowed to apply this payload. 344 | // Can be used to prevent downgrading the OS. 345 | optional int64 max_timestamp = 14; 346 | 347 | // Metadata related to all dynamic partitions. 348 | optional DynamicPartitionMetadata dynamic_partition_metadata = 15; 349 | } 350 | -------------------------------------------------------------------------------- /scripts/gen-prop-blobs-list.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # Iterate vendor partition and extract the list of files to be copied from vendor blobs generator 4 | # script. The script combines vendor partition files and items included in the selected 5 | # configuration, into a unified file so that following scripts can pick-up the complete list. 6 | # 7 | 8 | set -e # fail on unhandled error 9 | set -u # fail on undefined variable 10 | #set -x # debug 11 | 12 | readonly SCRIPTS_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" 13 | readonly CONSTS_SCRIPT="$SCRIPTS_DIR/constants.sh" 14 | readonly COMMON_SCRIPT="$SCRIPTS_DIR/common.sh" 15 | declare -a SYS_TOOLS=("find" "sed" "sort" "jq") 16 | 17 | abort() { 18 | exit "$1" 19 | } 20 | 21 | usage() { 22 | cat <<_EOF 23 | Usage: $(basename "$0") [options] 24 | OPTIONS: 25 | -i|--input : Root path of /vendor partition 26 | -o|--output : Path to save generated "proprietary-blobs.txt" file 27 | --conf-file : Device configuration file 28 | --conf-type : 'naked' or 'full' configuration profile 29 | --api : API level 30 | _EOF 31 | abort 1 32 | } 33 | 34 | verify_input() { 35 | if [[ ! -f "$1/build.prop" ]]; then 36 | echo "[-] Invalid input directory structure" 37 | usage 38 | fi 39 | 40 | # Also check that we don't have any pre-optimized apps in vendor image 41 | if [[ "$(find "$1" -name "*.odex" | wc -l | tr -d " ")" -ne 0 ]]; then 42 | echo "[!] Vendor partition contains pre-optimized bytecode - not supported yet" 43 | echo "Not aborting, TODO: FIX properly" 44 | #abort 1 45 | fi 46 | } 47 | 48 | trap "abort 1" SIGINT SIGTERM 49 | . "$CONSTS_SCRIPT" 50 | . "$COMMON_SCRIPT" 51 | 52 | # Check that system tools exist 53 | for i in "${SYS_TOOLS[@]}" 54 | do 55 | if ! command_exists "$i"; then 56 | echo "[-] '$i' command not found" 57 | abort 1 58 | fi 59 | done 60 | 61 | INPUT_DIR="" 62 | OUTPUT_DIR="" 63 | CONFIG_FILE="" 64 | CONFIG_TYPE="naked" 65 | API_LEVEL="" 66 | 67 | while [[ $# -gt 1 ]] 68 | do 69 | arg="$1" 70 | case $arg in 71 | -o|--output) 72 | OUTPUT_DIR="$(echo "$2" | sed 's:/*$::')" 73 | shift 74 | ;; 75 | -i|--input) 76 | INPUT_DIR="$(echo "$2" | sed 's:/*$::')" 77 | shift 78 | ;; 79 | --conf-file) 80 | CONFIG_FILE="$2" 81 | shift 82 | ;; 83 | --conf-type) 84 | CONFIG_TYPE="$2" 85 | shift 86 | ;; 87 | --api) 88 | API_LEVEL="$2" 89 | shift 90 | ;; 91 | *) 92 | echo "[-] Invalid argument '$1'" 93 | usage 94 | ;; 95 | esac 96 | shift 97 | done 98 | 99 | # Input args check 100 | check_dir "$INPUT_DIR" "Input" 101 | check_dir "$OUTPUT_DIR" "Output" 102 | check_file "$CONFIG_FILE" "Device Config File" 103 | 104 | # Check if valid config type & API level 105 | isValidConfigType "$CONFIG_TYPE" 106 | isValidApiLevel "$API_LEVEL" 107 | 108 | # Verify input directory structure 109 | verify_input "$INPUT_DIR" 110 | 111 | readonly OUT_BLOBS_FILE_TMP="$OUTPUT_DIR/_proprietary-blobs.txt" 112 | readonly OUT_BLOBS_FILE="$OUTPUT_DIR/proprietary-blobs.txt" 113 | 114 | # Clean copy from previous runs 115 | > "$OUT_BLOBS_FILE" 116 | > "$OUT_BLOBS_FILE_TMP" 117 | 118 | # First add all regular files or symbolic links from /vendor partition 119 | find "$INPUT_DIR" -not -type d | sed "s#^$INPUT_DIR/##" | while read -r FILE 120 | do 121 | # Skip VENDOR_SKIP_FILES since it will be re-generated at build time 122 | if array_contains "$FILE" "${VENDOR_SKIP_FILES[@]}"; then 123 | continue 124 | fi 125 | 126 | # Additional skips only for naked configs 127 | if [[ "$CONFIG_TYPE" == "naked" ]]; then 128 | if array_contains "$FILE" "${VENDOR_SKIP_FILES_NAKED[@]}"; then 129 | continue 130 | fi 131 | fi 132 | 133 | # Skip vendor files for specific APIs if they are defined 134 | readarray -t vendorSkipFiles < <(jqIncRawArray "$API_LEVEL" "$CONFIG_TYPE" "vendor-skip-files" "$CONFIG_FILE") 135 | if array_contains "$FILE" "${vendorSkipFiles[@]}"; then 136 | continue 137 | fi 138 | 139 | echo "vendor/$FILE" >> "$OUT_BLOBS_FILE_TMP" 140 | done 141 | 142 | { 143 | # Then append system-proprietary-blobs 144 | jqIncRawArray "$API_LEVEL" "$CONFIG_TYPE" "system-other" "$CONFIG_FILE" | grep -Ev '(^#|^$)' || true 145 | 146 | # Then append dep-dso-proprietary-blobs 147 | jqIncRawArray "$API_LEVEL" "$CONFIG_TYPE" "dep-dso" "$CONFIG_FILE" | grep -Ev '(^#|^$)' || true 148 | 149 | # Then append bytecode-proprietary 150 | jqIncRawArray "$API_LEVEL" "$CONFIG_TYPE" "system-bytecode" "$CONFIG_FILE" | grep -Ev '(^#|^$)' || true 151 | 152 | # Then append product 153 | jqIncRawArray "$API_LEVEL" "$CONFIG_TYPE" "product-other" "$CONFIG_FILE" | grep -Ev '(^#|^$)' || true 154 | jqIncRawArray "$API_LEVEL" "$CONFIG_TYPE" "product-bytecode" "$CONFIG_FILE" | grep -Ev '(^#|^$)' || true 155 | 156 | # Then append system_ext 157 | jqIncRawArray "$API_LEVEL" "$CONFIG_TYPE" "system_ext-other" "$CONFIG_FILE" | grep -Ev '(^#|^$)' || true 158 | jqIncRawArray "$API_LEVEL" "$CONFIG_TYPE" "system_ext-bytecode" "$CONFIG_FILE" | grep -Ev '(^#|^$)' || true 159 | } >> "$OUT_BLOBS_FILE_TMP" 160 | 161 | # Sort merged file with all lists 162 | sort -u "$OUT_BLOBS_FILE_TMP" > "$OUT_BLOBS_FILE" 163 | 164 | # Clean-up 165 | rm -f "$OUT_BLOBS_FILE_TMP" 166 | 167 | abort 0 168 | -------------------------------------------------------------------------------- /scripts/realpath.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # 3 | # sh-realpath implementation from mkropat 4 | # https://github.com/mkropat/sh-realpath 5 | # 6 | 7 | set -e # fail on unhandled error 8 | 9 | _realpath() { 10 | _canonicalize_path "$(_resolve_symlinks "$1")" 11 | } 12 | 13 | _resolve_symlinks() { 14 | __resolve_symlinks "$1" 15 | } 16 | 17 | __resolve_symlinks() { 18 | __assert_no_path_cycles "$@" || return 19 | 20 | local dir_context path 21 | path=$(readlink -- "$1") 22 | if [ $? -eq 0 ]; then 23 | dir_context=$(dirname -- "$1") 24 | __resolve_symlinks "$(__prepend_dir_context_if_necessary "$dir_context" "$path")" "$@" 25 | else 26 | printf '%s\n' "$1" 27 | fi 28 | } 29 | 30 | __prepend_dir_context_if_necessary() { 31 | if [ "$1" = . ]; then 32 | printf '%s\n' "$2" 33 | else 34 | __prepend_path_if_relative "$1" "$2" 35 | fi 36 | } 37 | 38 | __prepend_path_if_relative() { 39 | case "$2" in 40 | /* ) printf '%s\n' "$2" ;; 41 | * ) printf '%s\n' "$1/$2" ;; 42 | esac 43 | } 44 | 45 | __assert_no_path_cycles() { 46 | local target path 47 | 48 | target=$1 49 | shift 50 | 51 | for path in "$@"; do 52 | if [ "$path" = "$target" ]; then 53 | return 1 54 | fi 55 | done 56 | } 57 | 58 | _canonicalize_path() { 59 | if [ -d "$1" ]; then 60 | __canonicalize_dir_path "$1" 61 | else 62 | __canonicalize_file_path "$1" 63 | fi 64 | } 65 | 66 | __canonicalize_dir_path() { 67 | (cd "$1" 2>/dev/null && pwd -P) 68 | } 69 | 70 | __canonicalize_file_path() { 71 | local dir file 72 | dir=$(dirname -- "$1") 73 | file=$(basename -- "$1") 74 | (cd "$dir" 2>/dev/null && printf '%s/%s\n' "$(pwd -P)" "$file") 75 | } 76 | -------------------------------------------------------------------------------- /sunfish/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "device-name": "pixel4a", 3 | "device-model": "sunfish", 4 | "device-aliases": [], 5 | "vendor": "google", 6 | "aosp-vendor-dir": "google_devices", 7 | "device-family": "sunfish", 8 | "supported-apis": ["api-30"], 9 | "extra-partitions": [], 10 | "ota-partitions": [ 11 | "abl", 12 | "aop", 13 | "devcfg", 14 | "hyp", 15 | "keymaster", 16 | "modem", 17 | "qupfw", 18 | "tz", 19 | "uefisecapp", 20 | "xbl", 21 | "xbl_config" 22 | ], 23 | "AndroidMk": "sunfish/Android.mk", 24 | "BoardConfigVendorMk": "sunfish/BoardConfigVendorPartial.mk", 25 | "DeviceVendorMk": "sunfish/proprietary/device-vendor.mk", 26 | "api-30": { 27 | "naked": { 28 | "overlays-dir": "", 29 | "rro-overlays": ["CarrierConfigOverlay"], 30 | "product-bytecode": [], 31 | "product-other": [ 32 | "product/etc/apns-conf.xml", 33 | "product/lib/libdmengine.so", 34 | "product/lib/libdmjavaplugin.so", 35 | "product/lib/libqmi_cci_system.so", 36 | "product/lib/libqmi_encdec_system.so", 37 | "product/lib/libsdm-disp-apis.qti.so", 38 | "product/lib/vendor.qti.imsrtpservice@3.0.so", 39 | "product/lib64/libgdx.so", 40 | "product/lib64/libqmi_cci_system.so", 41 | "product/lib64/libqmi_encdec_system.so", 42 | "product/lib64/libsdm-disp-apis.qti.so", 43 | "product/lib64/libsketchology_native.so", 44 | "product/lib64/vendor.qti.imsrtpservice@3.0.so" 45 | ], 46 | "system-bytecode": [], 47 | "system-other": [], 48 | "system_ext-bytecode": [ 49 | "system_ext/app/QtiTelephonyService/QtiTelephonyService.apk", 50 | "system_ext/app/datastatusnotification/datastatusnotification.apk", 51 | "system_ext/app/uceShimService/uceShimService.apk", 52 | "system_ext/framework/com.qualcomm.qti.uceservice-V2.1-java.jar", 53 | "system_ext/framework/qcrilhook.jar", 54 | "system_ext/framework/qti-telephony-hidl-wrapper.jar", 55 | "system_ext/framework/qti-telephony-utils.jar", 56 | "system_ext/framework/vendor.qti.hardware.alarm-V1.0-java.jar", 57 | "system_ext/framework/vendor.qti.hardware.data.latency-V1.0-java.jar", 58 | "system_ext/framework/vendor.qti.ims.callinfo-V1.0-java.jar", 59 | "system_ext/framework/vendor.qti.voiceprint-V1.0-java.jar", 60 | "system_ext/priv-app/ims/ims.apk", 61 | "system_ext/priv-app/qcrilmsgtunnel/qcrilmsgtunnel.apk" 62 | ], 63 | "system_ext-other": [ 64 | "system_ext/etc/permissions/com.qualcomm.qcrilmsgtunnel.xml", 65 | "system_ext/etc/permissions/com.qualcomm.qti.imscmservice-V2.0-java.xml", 66 | "system_ext/etc/permissions/com.qualcomm.qti.imscmservice-V2.1-java.xml", 67 | "system_ext/etc/permissions/com.qualcomm.qti.imscmservice-V2.2-java.xml", 68 | "system_ext/etc/permissions/org_codeaurora_ims.xml", 69 | "system_ext/etc/permissions/qcrilhook.xml", 70 | "system_ext/etc/permissions/qti_telephony_hidl_wrapper.xml", 71 | "system_ext/etc/permissions/qti_telephony_utils.xml", 72 | "system_ext/etc/permissions/telephonyservice.xml", 73 | "system_ext/lib/com.quicinc.cne.api@1.0.so", 74 | "system_ext/lib/com.quicinc.cne.constants@1.0.so", 75 | "system_ext/lib/com.quicinc.cne.constants@2.0.so", 76 | "system_ext/lib/com.quicinc.cne.constants@2.1.so", 77 | "system_ext/lib/lib-imsvideocodec.so", 78 | "system_ext/lib/lib-imsvt.so", 79 | "system_ext/lib/lib-imsvtextutils.so", 80 | "system_ext/lib/lib-imsvtutils.so", 81 | "system_ext/lib/libimscamera_jni.so", 82 | "system_ext/lib/libimsmedia_jni.so", 83 | "system_ext/lib/libsecureui_svcsock_system.so", 84 | "system_ext/lib/vendor.display.config@1.0.so", 85 | "system_ext/lib/vendor.display.config@1.1.so", 86 | "system_ext/lib/vendor.display.config@1.2.so", 87 | "system_ext/lib/vendor.display.config@1.3.so", 88 | "system_ext/lib/vendor.display.config@1.4.so", 89 | "system_ext/lib/vendor.display.config@1.5.so", 90 | "system_ext/lib/vendor.display.config@1.6.so", 91 | "system_ext/lib/vendor.display.config@1.7.so", 92 | "system_ext/lib/vendor.display.config@1.8.so", 93 | "system_ext/lib/vendor.display.postproc@1.0.so", 94 | "system_ext/lib/vendor.qti.hardware.alarm@1.0.so", 95 | "system_ext/lib/vendor.qti.hardware.data.iwlan@1.0.so", 96 | "system_ext/lib/vendor.qti.hardware.seccam@1.0.so", 97 | "system_ext/lib64/com.quicinc.cne.api@1.0.so", 98 | "system_ext/lib64/com.quicinc.cne.api@1.1.so", 99 | "system_ext/lib64/com.quicinc.cne.constants@1.0.so", 100 | "system_ext/lib64/com.quicinc.cne.constants@2.0.so", 101 | "system_ext/lib64/com.quicinc.cne.constants@2.1.so", 102 | "system_ext/lib64/lib-imsvideocodec.so", 103 | "system_ext/lib64/lib-imsvt.so", 104 | "system_ext/lib64/lib-imsvtextutils.so", 105 | "system_ext/lib64/lib-imsvtutils.so", 106 | "system_ext/lib64/libaptXHD_encoder.so", 107 | "system_ext/lib64/libaptX_encoder.so", 108 | "system_ext/lib64/libimscamera_jni.so", 109 | "system_ext/lib64/libimsmedia_jni.so", 110 | "system_ext/lib64/libsecureui_svcsock_system.so", 111 | "system_ext/lib64/libsecureuisvc_jni.so", 112 | "system_ext/lib64/vendor.display.config@1.0.so", 113 | "system_ext/lib64/vendor.display.config@1.1.so", 114 | "system_ext/lib64/vendor.display.config@1.3.so", 115 | "system_ext/lib64/vendor.display.config@1.4.so", 116 | "system_ext/lib64/vendor.display.config@1.5.so", 117 | "system_ext/lib64/vendor.display.config@1.6.so", 118 | "system_ext/lib64/vendor.display.config@1.7.so", 119 | "system_ext/lib64/vendor.display.config@1.8.so", 120 | "system_ext/lib64/vendor.display.postproc@1.0.so", 121 | "system_ext/lib64/vendor.qti.hardware.alarm@1.0.so", 122 | "system_ext/lib64/vendor.qti.hardware.data.iwlan@1.0.so", 123 | "system_ext/lib64/vendor.qti.hardware.seccam@1.0.so" 124 | ], 125 | "BoardConfigVendor": [], 126 | "dep-dso": [ 127 | "vendor/lib64/libsdsprpc.so", 128 | "vendor/lib/libsdsprpc.so", 129 | "vendor/lib64/libadsprpc.so", 130 | "vendor/lib/libadsprpc.so" 131 | ], 132 | "device-vendor": [], 133 | "forced-modules": [ 134 | "android.hardware.identity-support-lib.vendor", 135 | "android.hardware.sensors@2.0-ScopedWakelock.vendor", 136 | "chre", 137 | "ese_spi_st", 138 | "hardware.google.light@1.0.vendor", 139 | "libavservices_minijail_vendor", 140 | "libcld80211", 141 | "libcodec2_hidl@1.0.vendor", 142 | "libcodec2_vndk.vendor", 143 | "libcppbor.vendor", 144 | "libdrm.vendor", 145 | "libhidltransport.vendor", 146 | "libhwbinder.vendor", 147 | "libjson", 148 | "libkeymaster_messages.vendor", 149 | "libkeymaster_portable.vendor", 150 | "libmedia_ecoservice.vendor", 151 | "libnetfilter_conntrack", 152 | "libnfnetlink", 153 | "libnos", 154 | "libnos_client_citadel", 155 | "libnos_datagram", 156 | "libnos_datagram_citadel", 157 | "libnos_transport", 158 | "libnosprotos", 159 | "libpuresoftkeymasterdevice.vendor", 160 | "libsensorndkbridge", 161 | "libsoft_attestation_cert.vendor", 162 | "libstagefright_bufferpool@2.0.1.vendor", 163 | "libteeui_hal_support.vendor", 164 | "libtinycompress", 165 | "libtinyxml", 166 | "libwifi-hal-ctrl", 167 | "libwifi-hal-qcom", 168 | "nos_app_avb", 169 | "nos_app_identity", 170 | "nos_app_keymaster", 171 | "nos_app_weaver", 172 | "sound_trigger.primary.sm6150" 173 | ], 174 | "new-modules": [], 175 | "vendor-skip-files": [ 176 | "bin/applypatch", 177 | "bin/awk", 178 | "bin/boringssl_self_test32", 179 | "bin/boringssl_self_test64", 180 | "bin/checkpoint_gc", 181 | "bin/chre", 182 | "bin/dumpsys", 183 | "bin/hostapd_cli", 184 | "bin/hw/android.hardware.atrace@1.0-service.pixel", 185 | "bin/hw/android.hardware.audio.service", 186 | "bin/hw/android.hardware.boot@1.1-service", 187 | "bin/hw/android.hardware.camera.provider@2.6-service-google", 188 | "bin/hw/android.hardware.cas@1.2-service", 189 | "bin/hw/android.hardware.configstore@1.1-service", 190 | "bin/hw/android.hardware.contexthub@1.1-service.generic", 191 | "bin/hw/android.hardware.drm@1.0-service", 192 | "bin/hw/android.hardware.drm@1.3-service.clearkey", 193 | "bin/hw/android.hardware.dumpstate@1.1-service.sunfish", 194 | "bin/hw/android.hardware.graphics.composer@2.4-service-sm8150", 195 | "bin/hw/android.hardware.health.storage@1.0-service", 196 | "bin/hw/android.hardware.health@2.1-service", 197 | "bin/hw/android.hardware.media.omx@1.0-service", 198 | "bin/hw/android.hardware.memtrack@1.0-service", 199 | "bin/hw/android.hardware.nfc@1.2-service.st", 200 | "bin/hw/android.hardware.power-service.pixel-libperfmgr", 201 | "bin/hw/android.hardware.power.stats@1.0-service.pixel", 202 | "bin/hw/android.hardware.secure_element@1.0-service.st", 203 | "bin/hw/android.hardware.sensors@2.0-service.multihal", 204 | "bin/hw/android.hardware.thermal@2.0-service.pixel", 205 | "bin/hw/android.hardware.usb@1.2-service.sunfish", 206 | "bin/hw/android.hardware.vibrator@1.3-service.sunfish", 207 | "bin/hw/hardware.google.light@1.1-service", 208 | "bin/hw/hostapd", 209 | "bin/hw/wait_for_strongbox", 210 | "bin/hw/wpa_supplicant", 211 | "bin/ipacm", 212 | "bin/logwrapper", 213 | "bin/misc_writer", 214 | "bin/pixelstats-vendor", 215 | "bin/sh", 216 | "bin/vndservice", 217 | "bin/vndservicemanager", 218 | "etc/IPACM_cfg.xml", 219 | "etc/fs_config_dirs", 220 | "etc/fs_config_files", 221 | "etc/group", 222 | "etc/init/android.hardware.atrace@1.0-service.pixel.rc", 223 | "etc/init/android.hardware.audio.service.rc", 224 | "etc/init/android.hardware.boot@1.1-service.rc", 225 | "etc/init/android.hardware.camera.provider@2.6-service-google.rc", 226 | "etc/init/android.hardware.cas@1.2-service.rc", 227 | "etc/init/android.hardware.configstore@1.1-service.rc", 228 | "etc/init/android.hardware.contexthub@1.1-service-generic.rc", 229 | "etc/init/android.hardware.drm@1.0-service.rc", 230 | "etc/init/android.hardware.drm@1.3-service.clearkey.rc", 231 | "etc/init/android.hardware.dumpstate@1.1-service.sunfish.rc", 232 | "etc/init/android.hardware.graphics.composer@2.4-service-sm8150.rc", 233 | "etc/init/android.hardware.health.storage@1.0-service.rc", 234 | "etc/init/android.hardware.health@2.1-service.rc", 235 | "etc/init/android.hardware.media.omx@1.0-service.rc", 236 | "etc/init/android.hardware.memtrack@1.0-service.rc", 237 | "etc/init/android.hardware.nfc@1.2-service.st.rc", 238 | "etc/init/android.hardware.power-service.pixel-libperfmgr.rc", 239 | "etc/init/android.hardware.power.stats@1.0-service.pixel.rc", 240 | "etc/init/android.hardware.secure_element@1.0-service.st.rc", 241 | "etc/init/android.hardware.sensors@2.0-service-multihal.rc", 242 | "etc/init/android.hardware.thermal@2.0-service.pixel.rc", 243 | "etc/init/android.hardware.usb@1.2-service.sunfish.rc", 244 | "etc/init/android.hardware.vibrator@1.3-service.sunfish.rc", 245 | "etc/init/android.hardware.wifi.supplicant-service.rc", 246 | "etc/init/boringssl_self_test.rc", 247 | "etc/init/chre_daemon.rc", 248 | "etc/init/hardware.google.light@1.1-service.rc", 249 | "etc/init/hostapd.android.rc", 250 | "etc/init/init.pixel.rc", 251 | "etc/init/ipacm.rc", 252 | "etc/init/pixelstats-vendor.sunfish.rc", 253 | "etc/init/vendor_flash_recovery.rc", 254 | "etc/init/vndservicemanager.rc", 255 | "etc/mkshrc", 256 | "etc/passwd", 257 | "etc/seccomp_policy/configstore@1.1.policy", 258 | "etc/selinux/plat_pub_versioned.cil", 259 | "etc/selinux/precompiled_sepolicy.plat_sepolicy_and_mapping.sha256", 260 | "etc/selinux/precompiled_sepolicy.product_sepolicy_and_mapping.sha256", 261 | "etc/selinux/precompiled_sepolicy.system_ext_sepolicy_and_mapping.sha256", 262 | "etc/selinux/selinux_denial_metadata", 263 | "etc/selinux/vendor_file_contexts", 264 | "etc/selinux/vendor_hwservice_contexts", 265 | "etc/selinux/vendor_mac_permissions.xml", 266 | "etc/selinux/vendor_property_contexts", 267 | "etc/selinux/vendor_seapp_contexts", 268 | "etc/selinux/vendor_sepolicy.cil", 269 | "etc/selinux/vendor_service_contexts", 270 | "etc/vintf/compatibility_matrix.xml", 271 | "etc/vintf/manifest.xml", 272 | "etc/vintf/manifest/android.hardware.atrace@1.0-service.pixel.xml", 273 | "etc/vintf/manifest/android.hardware.boot@1.1.xml", 274 | "etc/vintf/manifest/android.hardware.camera.provider@2.6-service-google.xml", 275 | "etc/vintf/manifest/android.hardware.cas@1.2-service.xml", 276 | "etc/vintf/manifest/android.hardware.contexthub@1.1-generic.xml", 277 | "etc/vintf/manifest/android.hardware.health@2.1.xml", 278 | "etc/vintf/manifest/android.hardware.power-service.pixel.xml", 279 | "etc/vintf/manifest/android.hardware.sensors@2.0-multihal.xml", 280 | "etc/vintf/manifest/android.hardware.thermal@2.0-service.pixel.xml", 281 | "etc/vintf/manifest/android.hardware.usb.gadget@1.1-service.sunfish.xml", 282 | "etc/vintf/manifest/android.hardware.usb@1.2-service.sunfish.xml", 283 | "etc/vintf/manifest/android.hardware.vibrator@1.3-service.sunfish.xml", 284 | "etc/vintf/manifest/android.hardware.wifi.hostapd.xml", 285 | "etc/vintf/manifest/manifest.xml", 286 | "etc/vintf/manifest/manifest_android.hardware.drm@1.3-service.clearkey.xml", 287 | "etc/vintf/manifest/manifest_android.hardware.health.storage@1.0.xml", 288 | "etc/vintf/manifest/manifest_wifi_ext.xml", 289 | "lib/android.hardware.audio.common-util.so", 290 | "lib/android.hardware.audio.common@5.0-util.so", 291 | "lib/android.hardware.audio.common@6.0-util.so", 292 | "lib/android.hardware.sensors@2.0-ScopedWakelock.so", 293 | "lib/ese_spi_st.so", 294 | "lib/hardware.google.light@1.0.so", 295 | "lib/hw/android.hardware.audio.effect@6.0-impl.so", 296 | "lib/hw/android.hardware.audio@6.0-impl.so", 297 | "lib/hw/android.hardware.bluetooth.audio@2.0-impl.so", 298 | "lib/hw/android.hardware.boot@1.0-impl-1.1-pixel-legacy.so", 299 | "lib/hw/android.hardware.drm@1.0-impl.so", 300 | "lib/hw/android.hardware.health@2.0-impl-2.1-sunfish.so", 301 | "lib/hw/android.hardware.memtrack@1.0-impl.so", 302 | "lib/hw/android.hardware.renderscript@1.0-impl.so", 303 | "lib/hw/android.hardware.soundtrigger@2.3-impl.so", 304 | "lib/hw/audio.bluetooth.default.so", 305 | "lib/hw/audio.primary.default.so", 306 | "lib/hw/audio.r_submix.default.so", 307 | "lib/hw/audio.usb.default.so", 308 | "lib/hw/bootctrl.sm6150.so", 309 | "lib/hw/gralloc.default.so", 310 | "lib/hw/local_time.default.so", 311 | "lib/hw/power.default.so", 312 | "lib/hw/sensors.sunfish.so", 313 | "lib/hw/vibrator.default.so", 314 | "lib/libalsautils.so", 315 | "lib/libavservices_minijail.so", 316 | "lib/libavservices_minijail_vendor.so", 317 | "lib/libbatching.so", 318 | "lib/libbluetooth_audio_session.so", 319 | "lib/libcld80211.so", 320 | "lib/libcodec2_hidl@1.0.so", 321 | "lib/libcodec2_vndk.so", 322 | "lib/libdrm.so", 323 | "lib/libeffects.so", 324 | "lib/libeffectsconfig.so", 325 | "lib/libgeofencing.so", 326 | "lib/libgnss.so", 327 | "lib/libgps.utils.so", 328 | "lib/libhidltransport.so", 329 | "lib/libhwbinder.so", 330 | "lib/libjson.so", 331 | "lib/libloc_core.so", 332 | "lib/liblocation_api.so", 333 | "lib/libmedia_ecoservice.so", 334 | "lib/libnbaio_mono.so", 335 | "lib/libopus.so", 336 | "lib/libpixelhealth.so", 337 | "lib/libprotobuf-cpp-full-3.9.1.so", 338 | "lib/libprotobuf-cpp-full.so", 339 | "lib/libprotobuf-cpp-lite-3.9.1.so", 340 | "lib/libreference-ril.so", 341 | "lib/libril.so", 342 | "lib/librilutils.so", 343 | "lib/libstagefright_amrnb_common.so", 344 | "lib/libstagefright_bufferpool@2.0.1.so", 345 | "lib/libstagefright_enc_common.so", 346 | "lib/libstagefright_flacdec.so", 347 | "lib/libstagefright_soft_aacdec.so", 348 | "lib/libstagefright_soft_aacenc.so", 349 | "lib/libstagefright_soft_amrdec.so", 350 | "lib/libstagefright_soft_amrnbenc.so", 351 | "lib/libstagefright_soft_amrwbenc.so", 352 | "lib/libstagefright_soft_avcdec.so", 353 | "lib/libstagefright_soft_avcenc.so", 354 | "lib/libstagefright_soft_flacdec.so", 355 | "lib/libstagefright_soft_flacenc.so", 356 | "lib/libstagefright_soft_g711dec.so", 357 | "lib/libstagefright_soft_gsmdec.so", 358 | "lib/libstagefright_soft_hevcdec.so", 359 | "lib/libstagefright_soft_mp3dec.so", 360 | "lib/libstagefright_soft_mpeg2dec.so", 361 | "lib/libstagefright_soft_mpeg4dec.so", 362 | "lib/libstagefright_soft_mpeg4enc.so", 363 | "lib/libstagefright_soft_opusdec.so", 364 | "lib/libstagefright_soft_rawdec.so", 365 | "lib/libstagefright_soft_vorbisdec.so", 366 | "lib/libstagefright_soft_vpxdec.so", 367 | "lib/libstagefright_soft_vpxenc.so", 368 | "lib/libstagefright_softomx.so", 369 | "lib/libstagefright_softomx_plugin.so", 370 | "lib/libtinycompress.so", 371 | "lib/libtinyxml.so", 372 | "lib/libvorbisidec.so", 373 | "lib/libvpx.so", 374 | "lib/libwebrtc_audio_preprocessing.so", 375 | "lib/libwifi-hal-ctrl.so", 376 | "lib/libwifi-hal-qcom.so", 377 | "lib/libwpa_client.so", 378 | "lib/mediacas/libclearkeycasplugin.so", 379 | "lib/mediadrm/libdrmclearkeyplugin.so", 380 | "lib/modules/adsp_loader_dlkm.ko", 381 | "lib/modules/apr_dlkm.ko", 382 | "lib/modules/asn1_decoder.ko", 383 | "lib/modules/atomic64_test.ko", 384 | "lib/modules/bolero_cdc_dlkm.ko", 385 | "lib/modules/br_netfilter.ko", 386 | "lib/modules/drv2624.ko", 387 | "lib/modules/ftm5.ko", 388 | "lib/modules/gspca_main.ko", 389 | "lib/modules/hdmi_dlkm.ko", 390 | "lib/modules/heatmap.ko", 391 | "lib/modules/incrementalfs.ko", 392 | "lib/modules/lcd.ko", 393 | "lib/modules/lkdtm.ko", 394 | "lib/modules/llcc_perfmon.ko", 395 | "lib/modules/locktorture.ko", 396 | "lib/modules/machine_dlkm.ko", 397 | "lib/modules/mbhc_dlkm.ko", 398 | "lib/modules/mmc_test.ko", 399 | "lib/modules/modules.alias", 400 | "lib/modules/modules.dep", 401 | "lib/modules/modules.load", 402 | "lib/modules/modules.softdep", 403 | "lib/modules/mpi.ko", 404 | "lib/modules/mpq-adapter.ko", 405 | "lib/modules/mpq-dmx-hw-plugin.ko", 406 | "lib/modules/msm-geni-ir.ko", 407 | "lib/modules/msm_11ad_proxy.ko", 408 | "lib/modules/native_dlkm.ko", 409 | "lib/modules/oid_registry.ko", 410 | "lib/modules/pinctrl_lpi_dlkm.ko", 411 | "lib/modules/pinctrl_wcd_dlkm.ko", 412 | "lib/modules/pkcs7_message.ko", 413 | "lib/modules/platform_dlkm.ko", 414 | "lib/modules/public_key.ko", 415 | "lib/modules/q6_dlkm.ko", 416 | "lib/modules/q6_notifier_dlkm.ko", 417 | "lib/modules/q6_pdr_dlkm.ko", 418 | "lib/modules/rcutorture.ko", 419 | "lib/modules/rdbg.ko", 420 | "lib/modules/rsa_generic.ko", 421 | "lib/modules/rx_macro_dlkm.ko", 422 | "lib/modules/snd_event_dlkm.ko", 423 | "lib/modules/stub_dlkm.ko", 424 | "lib/modules/swr_ctrl_dlkm.ko", 425 | "lib/modules/swr_dlkm.ko", 426 | "lib/modules/test_user_copy.ko", 427 | "lib/modules/torture.ko", 428 | "lib/modules/tx_macro_dlkm.ko", 429 | "lib/modules/usf_dlkm.ko", 430 | "lib/modules/va_macro_dlkm.ko", 431 | "lib/modules/wcd934x_dlkm.ko", 432 | "lib/modules/wcd937x_dlkm.ko", 433 | "lib/modules/wcd937x_slave_dlkm.ko", 434 | "lib/modules/wcd9xxx_dlkm.ko", 435 | "lib/modules/wcd_core_dlkm.ko", 436 | "lib/modules/wcd_spi_dlkm.ko", 437 | "lib/modules/wglink_dlkm.ko", 438 | "lib/modules/wil6210.ko", 439 | "lib/modules/wlan.ko", 440 | "lib/modules/wsa881x_dlkm.ko", 441 | "lib/modules/wsa_macro_dlkm.ko", 442 | "lib/modules/x509_key_parser.ko", 443 | "lib/soundfx/libaudiopreprocessing.so", 444 | "lib/soundfx/libbundlewrapper.so", 445 | "lib/soundfx/libdownmix.so", 446 | "lib/soundfx/libdynproc.so", 447 | "lib/soundfx/libeffectproxy.so", 448 | "lib/soundfx/libldnhncr.so", 449 | "lib/soundfx/libqcomvoiceprocessingdescriptors.so", 450 | "lib/soundfx/libreverbwrapper.so", 451 | "lib/soundfx/libvisualizer.so", 452 | "lib64/android.hardware.graphics.composer@2.1-resources.so", 453 | "lib64/android.hardware.identity-support-lib.so", 454 | "lib64/android.hardware.sensors@2.0-ScopedWakelock.so", 455 | "lib64/ese_spi_st.so", 456 | "lib64/hardware.google.light@1.0.so", 457 | "lib64/hardware.google.light@1.1.so", 458 | "lib64/hw/android.hardware.bluetooth.audio@2.0-impl.so", 459 | "lib64/hw/android.hardware.boot@1.0-impl-1.1-pixel-legacy.so", 460 | "lib64/hw/android.hardware.camera.provider@2.6-impl-google.so", 461 | "lib64/hw/android.hardware.drm@1.0-impl.so", 462 | "lib64/hw/android.hardware.health@2.0-impl-2.1-sunfish.so", 463 | "lib64/hw/android.hardware.memtrack@1.0-impl.so", 464 | "lib64/hw/android.hardware.renderscript@1.0-impl.so", 465 | "lib64/hw/android.hardware.soundtrigger@2.3-impl.so", 466 | "lib64/hw/audio.bluetooth.default.so", 467 | "lib64/hw/audio.primary.default.so", 468 | "lib64/hw/audio.r_submix.default.so", 469 | "lib64/hw/audio.usb.default.so", 470 | "lib64/hw/bootctrl.sm6150.so", 471 | "lib64/hw/gralloc.default.so", 472 | "lib64/hw/local_time.default.so", 473 | "lib64/hw/power.default.so", 474 | "lib64/hw/sensors.sunfish.so", 475 | "lib64/hw/vibrator.default.so", 476 | "lib64/lib_profiler.so", 477 | "lib64/libalsautils.so", 478 | "lib64/libbatching.so", 479 | "lib64/libbluetooth_audio_session.so", 480 | "lib64/libcld80211.so", 481 | "lib64/libcodec2_vndk.so", 482 | "lib64/libcppbor.so", 483 | "lib64/libdisppower-pixel.so", 484 | "lib64/libdrm.so", 485 | "lib64/libeffects.so", 486 | "lib64/libeffectsconfig.so", 487 | "lib64/libgeofencing.so", 488 | "lib64/libgnss.so", 489 | "lib64/libgooglecamerahal.so", 490 | "lib64/libgooglecamerahalutils.so", 491 | "lib64/libgps.utils.so", 492 | "lib64/libhidltransport.so", 493 | "lib64/libhwbinder.so", 494 | "lib64/libhwc2on1adapter.so", 495 | "lib64/libhwc2onfbadapter.so", 496 | "lib64/libhwminijail.so", 497 | "lib64/libipanat.so", 498 | "lib64/libjson.so", 499 | "lib64/libkeymaster4_1support.so", 500 | "lib64/libkeymaster4support.so", 501 | "lib64/libkeymaster_messages.so", 502 | "lib64/libkeymaster_portable.so", 503 | "lib64/libkeystore-engine-wifi-hidl.so", 504 | "lib64/libkeystore-wifi-hidl.so", 505 | "lib64/libloc_core.so", 506 | "lib64/liblocation_api.so", 507 | "lib64/libmedia_ecoservice.so", 508 | "lib64/libnbaio_mono.so", 509 | "lib64/libnetfilter_conntrack.so", 510 | "lib64/libnfnetlink.so", 511 | "lib64/libnos.so", 512 | "lib64/libnos_client_citadel.so", 513 | "lib64/libnos_datagram.so", 514 | "lib64/libnos_datagram_citadel.so", 515 | "lib64/libnos_transport.so", 516 | "lib64/libnosprotos.so", 517 | "lib64/liboffloadhal.so", 518 | "lib64/libperfmgr.so", 519 | "lib64/libpixelhealth.so", 520 | "lib64/libpixelstats.so", 521 | "lib64/libprotobuf-cpp-full-3.9.1.so", 522 | "lib64/libprotobuf-cpp-full.so", 523 | "lib64/libprotobuf-cpp-lite-3.9.1.so", 524 | "lib64/libpuresoftkeymasterdevice.so", 525 | "lib64/libreference-ril.so", 526 | "lib64/libril.so", 527 | "lib64/librilutils.so", 528 | "lib64/libsensorndkbridge.so", 529 | "lib64/libsoft_attestation_cert.so", 530 | "lib64/libstagefright_bufferpool@2.0.1.so", 531 | "lib64/libteeui_hal_support.so", 532 | "lib64/libtinycompress.so", 533 | "lib64/libtinyxml.so", 534 | "lib64/libwebrtc_audio_preprocessing.so", 535 | "lib64/libwifi-hal-ctrl.so", 536 | "lib64/libwifi-hal-qcom.so", 537 | "lib64/libwifi-hal.so", 538 | "lib64/libwpa_client.so", 539 | "lib64/mediacas/libclearkeycasplugin.so", 540 | "lib64/mediadrm/libdrmclearkeyplugin.so", 541 | "lib64/nfc_nci.st21nfc.default.so", 542 | "lib64/nos_app_avb.so", 543 | "lib64/nos_app_identity.so", 544 | "lib64/nos_app_keymaster.so", 545 | "lib64/nos_app_weaver.so", 546 | "lib64/pixel-power-ext-V1-ndk_platform.so", 547 | "lib64/pixelatoms-cpp.so", 548 | "lib64/pixelpowerstats_provider_aidl_interface-V1-cpp.so", 549 | "lib64/soundfx/libaudiopreprocessing.so", 550 | "lib64/soundfx/libbundlewrapper.so", 551 | "lib64/soundfx/libdownmix.so", 552 | "lib64/soundfx/libdynproc.so", 553 | "lib64/soundfx/libeffectproxy.so", 554 | "lib64/soundfx/libldnhncr.so", 555 | "lib64/soundfx/libqcomvoiceprocessingdescriptors.so", 556 | "lib64/soundfx/libreverbwrapper.so", 557 | "lib64/soundfx/libvisualizer.so", 558 | "odm/etc/NOTICE.xml.gz", 559 | "odm/etc/build.prop", 560 | "odm/etc/group", 561 | "odm/etc/passwd" 562 | ] 563 | } 564 | } 565 | } 566 | -------------------------------------------------------------------------------- /taimen/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "device-name": "pixel2-xl", 3 | "device-model": "taimen", 4 | "device-aliases": [], 5 | "vendor": "google", 6 | "aosp-vendor-dir": "google_devices", 7 | "device-family": "taimen", 8 | "supported-apis": ["api-30"], 9 | "extra-partitions": [], 10 | "ota-partitions": [ 11 | "abl", 12 | "aes", 13 | "cmnlib", 14 | "cmnlib64", 15 | "devcfg", 16 | "hyp", 17 | "keymaster", 18 | "laf", 19 | "modem", 20 | "pmic", 21 | "rpm", 22 | "tz", 23 | "xbl" 24 | ], 25 | "AndroidMk": "taimen/Android.mk", 26 | "BoardConfigVendorMk": "taimen/proprietary/BoardConfigVendor.mk", 27 | "DeviceVendorMk": "taimen/proprietary/device-vendor.mk", 28 | "api-30": { 29 | "naked": { 30 | "overlays-dir": "", 31 | "rro-overlays": ["CarrierConfigOverlay"], 32 | "system-bytecode": [ 33 | "system/app/ims/ims.apk", 34 | "system/app/uceShimService/uceShimService.apk", 35 | "system/framework/cneapiclient.jar", 36 | "system/framework/com.quicinc.cne.api-V1.0-java.jar", 37 | "system/framework/com.quicinc.cne.jar", 38 | "system/product/framework/libhwinfo.jar", 39 | "system/framework/qcrilhook.jar", 40 | "system/framework/rcsimssettings.jar", 41 | "system/framework/vendor.qti.qcril.am-V1.0-java.jar", 42 | "system/priv-app/CNEService/CNEService.apk", 43 | "system/priv-app/qcrilmsgtunnel/qcrilmsgtunnel.apk" 44 | ], 45 | "system-other": [ 46 | "system/bin/move_widevine_data.sh", 47 | "system/etc/cne/Nexus/ROW/ROW_profiles.xml", 48 | "system/etc/cne/Nexus/VZW/VZW_profiles.xml", 49 | "system/etc/cne/Nexus/ATT/ATT_profiles.xml", 50 | "system/etc/firmware/music_detector.sound_model", 51 | "system/etc/firmware/music_detector.descriptor", 52 | "system/etc/firmware/dnd.sound_model", 53 | "system/etc/firmware/dnd.descriptor", 54 | "system/product/etc/permissions/android.hardware.telephony.euicc.xml", 55 | "system/product/etc/permissions/com.google.android.hardwareinfo.xml", 56 | "system/lib/com.qualcomm.qti.ims.radio@1.0.so", 57 | "system/lib/com.qualcomm.qti.imsrtpservice@1.0.so", 58 | "system/lib/com.qualcomm.qti.qcril.qcrilhook@1.0.so", 59 | "system/lib/libdiag_system.so", 60 | "system/lib/libeaselcomm.so", 61 | "system/lib/libimscamera_jni.so", 62 | "system/lib/libimsmedia_jni.so", 63 | "system/lib/lib-imsvideocodec.so", 64 | "system/lib/lib-imsvtextutils.so", 65 | "system/lib/lib-imsvt.so", 66 | "system/lib/lib-imsvtutils.so", 67 | "system/lib/librcc.so", 68 | "system/lib/vendor.qti.qcril.am@1.0.so", 69 | "system/lib64/com.qualcomm.qti.ims.radio@1.0.so", 70 | "system/lib64/com.qualcomm.qti.imsrtpservice@1.0.so", 71 | "system/lib64/com.qualcomm.qti.qcril.qcrilhook@1.0.so", 72 | "system/product/lib64/libaptX_encoder.so", 73 | "system/product/lib64/libaptXHD_encoder.so", 74 | "system/lib64/libdiag_system.so", 75 | "system/lib64/libeaselcomm.so", 76 | "system/lib64/libimscamera_jni.so", 77 | "system/lib64/libimsmedia_jni.so", 78 | "system/lib64/lib-imsvideocodec.so", 79 | "system/lib64/lib-imsvtextutils.so", 80 | "system/lib64/lib-imsvt.so", 81 | "system/lib64/lib-imsvtutils.so", 82 | "system/lib64/librcc.so", 83 | "system/lib64/vendor.qti.qcril.am@1.0.so", 84 | "system/product/etc/apns-conf.xml" 85 | ], 86 | "system_ext-bytecode": [], 87 | "system_ext-other": [], 88 | "product-bytecode": [], 89 | "forced-modules": [ 90 | "chre", 91 | "com.android.ims.rcsmanager", 92 | "ese-ls-provision", 93 | "ese-replay", 94 | "libhidltransport.vendor", 95 | "libhwbinder.vendor", 96 | "libjson", 97 | "libp61-jcop-kit.vendor", 98 | "libsensorndkbridge", 99 | "libtinyxml", 100 | "netutils-wrapper-1.0", 101 | "RcsService" 102 | ], 103 | "new-modules": [], 104 | "dep-dso": [ 105 | "vendor/lib64/libsdsprpc.so", 106 | "vendor/lib/libsdsprpc.so" 107 | ], 108 | "BoardConfigVendor": [], 109 | "device-vendor": [ 110 | "PRODUCT_PROPERTY_OVERRIDES += \\", 111 | " ro.hardware.fingerprint=fpc \\", 112 | " ro.hardware.vulkan=adreno \\", 113 | " ro.hardware.egl=adreno \\", 114 | " ro.gfx.driver.0=com.google.pixel.wahoo.gfxdrv \\", 115 | " ro.oem_unlock.pst=/dev/block/platform/soc/1da4000.ufshc/by-name/misc \\", 116 | " ro.oem_unlock.pst_offset=6144" 117 | ], 118 | "vendor-skip-files": [ 119 | "bin/applypatch", 120 | "bin/awk", 121 | "bin/boringssl_self_test32", 122 | "bin/boringssl_self_test64", 123 | "bin/chre", 124 | "bin/dumpsys", 125 | "bin/esed", 126 | "bin/ese-ls-provision", 127 | "bin/ese-replay", 128 | "bin/hostapd_cli", 129 | "bin/hw/android.hardware.atrace@1.0-service", 130 | "bin/hw/android.hardware.audio.service", 131 | "bin/hw/android.hardware.boot@1.0-service", 132 | "bin/hw/android.hardware.camera.provider@2.4-service", 133 | "bin/hw/android.hardware.cas@1.2-service", 134 | "bin/hw/android.hardware.configstore@1.1-service", 135 | "bin/hw/android.hardware.contexthub@1.0-service", 136 | "bin/hw/android.hardware.drm@1.0-service", 137 | "bin/hw/android.hardware.drm@1.3-service.clearkey", 138 | "bin/hw/android.hardware.dumpstate@1.0-service.wahoo", 139 | "bin/hw/android.hardware.gnss@1.0-service-qti", 140 | "bin/hw/android.hardware.graphics.allocator@2.0-service", 141 | "bin/hw/android.hardware.graphics.composer@2.1-service", 142 | "bin/hw/android.hardware.health@2.0-service.wahoo", 143 | "bin/hw/android.hardware.light@2.0-service", 144 | "bin/hw/android.hardware.media.omx@1.0-service", 145 | "bin/hw/android.hardware.memtrack@1.0-service", 146 | "bin/hw/android.hardware.nfc@1.1-service", 147 | "bin/hw/android.hardware.power@1.3-service.pixel-libperfmgr", 148 | "bin/hw/android.hardware.power.stats@1.0-service.pixel", 149 | "bin/hw/android.hardware.sensors@1.0-service", 150 | "bin/hw/android.hardware.thermal@2.0-service.pixel", 151 | "bin/hw/android.hardware.usb@1.1-service.wahoo", 152 | "bin/hw/android.hardware.vibrator-service.drv2624", 153 | "bin/hw/android.hardware.wifi@1.0-service", 154 | "bin/hw/hostapd", 155 | "bin/hw/rild", 156 | "bin/hw/wpa_supplicant", 157 | "bin/ipacm", 158 | "bin/logwrapper", 159 | "bin/misc_writer", 160 | "bin/sh", 161 | "bin/vndservice", 162 | "bin/vndservicemanager", 163 | "etc/fs_config_dirs", 164 | "etc/fs_config_files", 165 | "etc/gps.conf", 166 | "etc/group", 167 | "etc/init/android.hardware.atrace@1.0-service.rc", 168 | "etc/init/android.hardware.audio.service.rc", 169 | "etc/init/android.hardware.boot@1.0-service.rc", 170 | "etc/init/android.hardware.camera.provider@2.4-service.rc", 171 | "etc/init/android.hardware.cas@1.2-service.rc", 172 | "etc/init/android.hardware.configstore@1.1-service.rc", 173 | "etc/init/android.hardware.contexthub@1.0-service.rc", 174 | "etc/init/android.hardware.drm@1.0-service.rc", 175 | "etc/init/android.hardware.drm@1.3-service.clearkey.rc", 176 | "etc/init/android.hardware.dumpstate@1.0-service.wahoo.rc", 177 | "etc/init/android.hardware.gnss@1.0-service-qti.rc", 178 | "etc/init/android.hardware.graphics.allocator@2.0-service.rc", 179 | "etc/init/android.hardware.graphics.composer@2.1-service.rc", 180 | "etc/init/android.hardware.health@2.0-service.wahoo.rc", 181 | "etc/init/android.hardware.light@2.0-service.rc", 182 | "etc/init/android.hardware.media.omx@1.0-service.rc", 183 | "etc/init/android.hardware.memtrack@1.0-service.rc", 184 | "etc/init/android.hardware.nfc@1.1-service.rc", 185 | "etc/init/android.hardware.power@1.3-service.pixel-libperfmgr.rc", 186 | "etc/init/android.hardware.power.stats@1.0-service.pixel.rc", 187 | "etc/init/android.hardware.sensors@1.0-service.rc", 188 | "etc/init/android.hardware.thermal@2.0-service.pixel.rc", 189 | "etc/init/android.hardware.usb@1.1-service.wahoo.rc", 190 | "etc/init/android.hardware.vibrator-service.drv2624.rc", 191 | "etc/init/android.hardware.wifi@1.0-service.rc", 192 | "etc/init/android.hardware.wifi.supplicant-service.rc", 193 | "etc/init/boringssl_self_test.rc", 194 | "etc/init/chre_daemon.rc", 195 | "etc/init/esed.rc", 196 | "etc/init/hostapd.android.rc", 197 | "etc/init/rild.rc", 198 | "etc/init/vendor_flash_recovery.rc", 199 | "etc/init/vndservicemanager.rc", 200 | "etc/IPACM_cfg.xml", 201 | "etc/mkshrc", 202 | "etc/passwd", 203 | "etc/seccomp_policy/configstore@1.1.policy", 204 | "etc/selinux/plat_pub_versioned.cil", 205 | "etc/selinux/precompiled_sepolicy.plat_sepolicy_and_mapping.sha256", 206 | "etc/selinux/precompiled_sepolicy.product_sepolicy_and_mapping.sha256", 207 | "etc/selinux/precompiled_sepolicy.system_ext_sepolicy_and_mapping.sha256", 208 | "etc/selinux/selinux_denial_metadata", 209 | "etc/selinux/vendor_file_contexts", 210 | "etc/selinux/vendor_hwservice_contexts", 211 | "etc/selinux/vendor_mac_permissions.xml", 212 | "etc/selinux/vendor_property_contexts", 213 | "etc/selinux/vendor_seapp_contexts", 214 | "etc/selinux/vendor_sepolicy.cil", 215 | "etc/selinux/vendor_service_contexts", 216 | "etc/vintf/compatibility_matrix.xml", 217 | "etc/vintf/manifest/android.hardware.atrace@1.0-service.xml", 218 | "etc/vintf/manifest/android.hardware.cas@1.2-service.xml", 219 | "etc/vintf/manifest/android.hardware.power@1.3-service.pixel.xml", 220 | "etc/vintf/manifest/android.hardware.thermal@2.0-service.pixel.xml", 221 | "etc/vintf/manifest/android.hardware.usb@1.1-service.wahoo.xml", 222 | "etc/vintf/manifest/android.hardware.usb.gadget@1.1-service.wahoo.xml", 223 | "etc/vintf/manifest/android.hardware.vibrator-service.drv2624.xml", 224 | "etc/vintf/manifest/android.hardware.wifi@1.0-service.xml", 225 | "etc/vintf/manifest/android.hardware.wifi.hostapd.xml", 226 | "etc/vintf/manifest/manifest_android.hardware.drm@1.3-service.clearkey.xml", 227 | "etc/vintf/manifest/manifest.xml", 228 | "etc/vintf/manifest.xml", 229 | "lib64/android.hardware.graphics.composer@2.1-resources.so", 230 | "lib64/camera.device@3.2-impl.so", 231 | "lib64/ese_spi_nxp.so", 232 | "lib64/hw/android.hardware.bluetooth.audio@2.0-impl.so", 233 | "lib64/hw/android.hardware.boot@1.0-impl.so", 234 | "lib64/hw/android.hardware.contexthub@1.0-impl.generic.so", 235 | "lib64/hw/android.hardware.gnss@1.0-impl-qti.so", 236 | "lib64/hw/android.hardware.graphics.allocator@2.0-impl.so", 237 | "lib64/hw/android.hardware.graphics.composer@2.1-impl.so", 238 | "lib64/hw/android.hardware.graphics.mapper@2.0-impl-2.1.so", 239 | "lib64/hw/android.hardware.light@2.0-impl.so", 240 | "lib64/hw/android.hardware.memtrack@1.0-impl.so", 241 | "lib64/hw/android.hardware.renderscript@1.0-impl.so", 242 | "lib64/hw/android.hardware.sensors@1.0-impl.so", 243 | "lib64/hw/audio.bluetooth.default.so", 244 | "lib64/hw/audio.primary.default.so", 245 | "lib64/hw/audio.primary.msm8998.so", 246 | "lib64/hw/audio.r_submix.default.so", 247 | "lib64/hw/audio.usb.default.so", 248 | "lib64/hw/bootctrl.msm8998.so", 249 | "lib64/hw/gralloc.default.so", 250 | "lib64/hw/gralloc.msm8998.so", 251 | "lib64/hw/hwcomposer.msm8998.so", 252 | "lib64/hw/lights.wahoo.so", 253 | "lib64/hw/local_time.default.so", 254 | "lib64/hw/memtrack.msm8998.so", 255 | "lib64/hw/power.default.so", 256 | "lib64/hw/vibrator.default.so", 257 | "lib64/libalsautils.so", 258 | "lib64/libbluetooth_audio_session.so", 259 | "lib64/libbt-vendor.so", 260 | "lib64/libc2dcolorconvert.so", 261 | "lib64/libcld80211.so", 262 | "lib64/libdisppower-pixel.so", 263 | "lib64/libdrm.so", 264 | "lib64/libdrmutils.so", 265 | "lib64/libeffectsconfig.so", 266 | "lib64/libeffects.so", 267 | "lib64/libese-app-boot.so", 268 | "lib64/libese-app-weaver.so", 269 | "lib64/libese_cpp_nxp_pn80t_nq_nci.so", 270 | "lib64/libese-hw-nxp-pn80t-nq-nci.so", 271 | "lib64/libese.so", 272 | "lib64/libese-sysdeps.so", 273 | "lib64/libese-teq1.so", 274 | "lib64/libgnss.so", 275 | "lib64/libgps.utils.so", 276 | "lib64/libgpu_tonemapper.so", 277 | "lib64/libhidltransport.so", 278 | "lib64/libhwbinder.so", 279 | "lib64/libhwc2on1adapter.so", 280 | "lib64/libhwc2onfbadapter.so", 281 | "lib64/libhwminijail.so", 282 | "lib64/libipanat.so", 283 | "lib64/libjson.so", 284 | "lib64/libkeystore-engine-wifi-hidl.so", 285 | "lib64/libkeystore-wifi-hidl.so", 286 | "lib64/liblocation_api.so", 287 | "lib64/libloc_core.so", 288 | "lib64/libloc_pla.so", 289 | "lib64/libloc_stub.so", 290 | "lib64/libmm-omxcore.so", 291 | "lib64/libnbaio_mono.so", 292 | "lib64/libnetfilter_conntrack.so", 293 | "lib64/libnfnetlink.so", 294 | "lib64/liboffloadhal.so", 295 | "lib64/libOmxCore.so", 296 | "lib64/libOmxVdec.so", 297 | "lib64/libOmxVenc.so", 298 | "lib64/libp61-jcop-kit.so", 299 | "lib64/libperfmgr.so", 300 | "lib64/libprotobuf-cpp-full-3.9.1.so", 301 | "lib64/libprotobuf-cpp-lite-3.9.1.so", 302 | "lib64/libqdMetaData.so", 303 | "lib64/libqdutils.so", 304 | "lib64/libqservice.so", 305 | "lib64/libreference-ril.so", 306 | "lib64/libril.so", 307 | "lib64/librilutils.so", 308 | "lib64/libsdmcore.so", 309 | "lib64/libsdmutils.so", 310 | "lib64/libstagefrighthw.so", 311 | "lib64/libtinycompress.so", 312 | "lib64/libtinyxml.so", 313 | "lib64/libwebrtc_audio_preprocessing.so", 314 | "lib64/libwifi-hal.so", 315 | "lib64/libwpa_client.so", 316 | "lib64/mediacas/libclearkeycasplugin.so", 317 | "lib64/mediadrm/libdrmclearkeyplugin.so", 318 | "lib64/nfc_nci_nxp.so", 319 | "lib64/pixelpowerstats_provider_aidl_interface-V1-cpp.so", 320 | "lib64/soundfx/libaudiopreprocessing.so", 321 | "lib64/soundfx/libbundlewrapper.so", 322 | "lib64/soundfx/libdownmix.so", 323 | "lib64/soundfx/libdynproc.so", 324 | "lib64/soundfx/libeffectproxy.so", 325 | "lib64/soundfx/libldnhncr.so", 326 | "lib64/soundfx/libqcompostprocbundle.so", 327 | "lib64/soundfx/libqcomvisualizer.so", 328 | "lib64/soundfx/libqcomvoiceprocessingdescriptors.so", 329 | "lib64/soundfx/libqcomvoiceprocessing.so", 330 | "lib64/soundfx/libreverbwrapper.so", 331 | "lib64/soundfx/libvisualizer.so", 332 | "lib64/soundfx/libvolumelistener.so", 333 | "lib64/vendor.nxp.nxpese@1.0.so", 334 | "lib64/vendor.nxp.nxpnfc@1.0.so", 335 | "lib/android.hardware.audio.common@6.0-util.so", 336 | "lib/android.hardware.audio.common-util.so", 337 | "lib/android.hardware.camera.provider@2.4-external.so", 338 | "lib/android.hardware.camera.provider@2.4-legacy.so", 339 | "lib/camera.device@1.0-impl.so", 340 | "lib/camera.device@3.2-impl.so", 341 | "lib/camera.device@3.3-impl.so", 342 | "lib/camera.device@3.4-external-impl.so", 343 | "lib/camera.device@3.4-impl.so", 344 | "lib/camera.device@3.5-external-impl.so", 345 | "lib/camera.device@3.5-impl.so", 346 | "lib/camera.device@3.6-external-impl.so", 347 | "lib/hw/android.hardware.audio@6.0-impl.so", 348 | "lib/hw/android.hardware.audio.effect@6.0-impl.so", 349 | "lib/hw/android.hardware.bluetooth.audio@2.0-impl.so", 350 | "lib/hw/android.hardware.camera.provider@2.4-impl.so", 351 | "lib/hw/android.hardware.drm@1.0-impl.so", 352 | "lib/hw/android.hardware.gnss@1.0-impl-qti.so", 353 | "lib/hw/android.hardware.graphics.mapper@2.0-impl-2.1.so", 354 | "lib/hw/android.hardware.memtrack@1.0-impl.so", 355 | "lib/hw/android.hardware.renderscript@1.0-impl.so", 356 | "lib/hw/android.hardware.soundtrigger@2.2-impl.so", 357 | "lib/hw/audio.bluetooth.default.so", 358 | "lib/hw/audio.primary.default.so", 359 | "lib/hw/audio.primary.msm8998.so", 360 | "lib/hw/audio.r_submix.default.so", 361 | "lib/hw/audio.usb.default.so", 362 | "lib/hw/bootctrl.msm8998.so", 363 | "lib/hw/camera.msm8998.so", 364 | "lib/hw/gralloc.default.so", 365 | "lib/hw/gralloc.msm8998.so", 366 | "lib/hw/hwcomposer.msm8998.so", 367 | "lib/hw/lights.wahoo.so", 368 | "lib/hw/local_time.default.so", 369 | "lib/hw/memtrack.msm8998.so", 370 | "lib/hw/power.default.so", 371 | "lib/hw/vibrator.default.so", 372 | "lib/libalsautils.so", 373 | "lib/libavservices_minijail.so", 374 | "lib/libbluetooth_audio_session.so", 375 | "lib/libbt-vendor.so", 376 | "lib/libc2dcolorconvert.so", 377 | "lib/libdrm.so", 378 | "lib/libdrmutils.so", 379 | "lib/libeffectsconfig.so", 380 | "lib/libeffects.so", 381 | "lib/libgnss.so", 382 | "lib/libgps.utils.so", 383 | "lib/libgpu_tonemapper.so", 384 | "lib/libhidltransport.so", 385 | "lib/libhwbinder.so", 386 | "lib/libjson.so", 387 | "lib/liblocation_api.so", 388 | "lib/libloc_core.so", 389 | "lib/libloc_pla.so", 390 | "lib/libloc_stub.so", 391 | "lib/libmmcamera_interface.so", 392 | "lib/libmmjpeg_interface.so", 393 | "lib/libmm-omxcore.so", 394 | "lib/libnbaio_mono.so", 395 | "lib/libOmxCore.so", 396 | "lib/libOmxVdec.so", 397 | "lib/libOmxVenc.so", 398 | "lib/libopus.so", 399 | "lib/libprotobuf-cpp-full-3.9.1.so", 400 | "lib/libprotobuf-cpp-lite-3.9.1.so", 401 | "lib/libqdMetaData.so", 402 | "lib/libqdutils.so", 403 | "lib/libqomx_core.so", 404 | "lib/libqservice.so", 405 | "lib/libreference-ril.so", 406 | "lib/libril.so", 407 | "lib/librilutils.so", 408 | "lib/libsdmcore.so", 409 | "lib/libsdmutils.so", 410 | "lib/libsensorndkbridge.so", 411 | "lib/libstagefright_amrnb_common.so", 412 | "lib/libstagefright_enc_common.so", 413 | "lib/libstagefright_flacdec.so", 414 | "lib/libstagefrighthw.so", 415 | "lib/libstagefright_soft_aacdec.so", 416 | "lib/libstagefright_soft_aacenc.so", 417 | "lib/libstagefright_soft_amrdec.so", 418 | "lib/libstagefright_soft_amrnbenc.so", 419 | "lib/libstagefright_soft_amrwbenc.so", 420 | "lib/libstagefright_soft_avcdec.so", 421 | "lib/libstagefright_soft_avcenc.so", 422 | "lib/libstagefright_soft_flacdec.so", 423 | "lib/libstagefright_soft_flacenc.so", 424 | "lib/libstagefright_soft_g711dec.so", 425 | "lib/libstagefright_soft_gsmdec.so", 426 | "lib/libstagefright_soft_hevcdec.so", 427 | "lib/libstagefright_soft_mp3dec.so", 428 | "lib/libstagefright_soft_mpeg2dec.so", 429 | "lib/libstagefright_soft_mpeg4dec.so", 430 | "lib/libstagefright_soft_mpeg4enc.so", 431 | "lib/libstagefright_softomx_plugin.so", 432 | "lib/libstagefright_softomx.so", 433 | "lib/libstagefright_soft_opusdec.so", 434 | "lib/libstagefright_soft_rawdec.so", 435 | "lib/libstagefright_soft_vorbisdec.so", 436 | "lib/libstagefright_soft_vpxdec.so", 437 | "lib/libstagefright_soft_vpxenc.so", 438 | "lib/libtinycompress.so", 439 | "lib/libtinyxml.so", 440 | "lib/libvorbisidec.so", 441 | "lib/libvpx.so", 442 | "lib/libwebrtc_audio_preprocessing.so", 443 | "lib/libwpa_client.so", 444 | "lib/mediacas/libclearkeycasplugin.so", 445 | "lib/mediadrm/libdrmclearkeyplugin.so", 446 | "lib/modules/ftm4.ko", 447 | "lib/modules/lge_battery.ko", 448 | "lib/modules/modules.alias", 449 | "lib/modules/modules.dep", 450 | "lib/modules/modules.load", 451 | "lib/modules/modules.softdep", 452 | "lib/modules/sw49408.ko", 453 | "lib/modules/touch_core_base.ko", 454 | "lib/modules/wlan.ko", 455 | "lib/soundfx/libaudiopreprocessing.so", 456 | "lib/soundfx/libbundlewrapper.so", 457 | "lib/soundfx/libdownmix.so", 458 | "lib/soundfx/libdynproc.so", 459 | "lib/soundfx/libeffectproxy.so", 460 | "lib/soundfx/libldnhncr.so", 461 | "lib/soundfx/libqcompostprocbundle.so", 462 | "lib/soundfx/libqcomvisualizer.so", 463 | "lib/soundfx/libqcomvoiceprocessingdescriptors.so", 464 | "lib/soundfx/libqcomvoiceprocessing.so", 465 | "lib/soundfx/libreverbwrapper.so", 466 | "lib/soundfx/libvisualizer.so", 467 | "lib/soundfx/libvolumelistener.so", 468 | "odm/etc/build.prop", 469 | "odm/etc/group", 470 | "odm/etc/NOTICE.xml.gz", 471 | "odm/etc/passwd" 472 | ] 473 | } 474 | } 475 | } 476 | -------------------------------------------------------------------------------- /walleye/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "device-name": "pixel2", 3 | "device-model": "walleye", 4 | "device-aliases": [], 5 | "vendor": "google", 6 | "aosp-vendor-dir": "google_devices", 7 | "device-family": "muskie", 8 | "supported-apis": ["api-30"], 9 | "extra-partitions": [], 10 | "ota-partitions": [ 11 | "abl", 12 | "apdp", 13 | "cmnlib", 14 | "cmnlib64", 15 | "devcfg", 16 | "hyp", 17 | "keymaster", 18 | "modem", 19 | "msadp", 20 | "pmic", 21 | "rpm", 22 | "tz", 23 | "xbl" 24 | ], 25 | "AndroidMk": "walleye/Android.mk", 26 | "BoardConfigVendorMk": "muskie/proprietary/BoardConfigVendor.mk", 27 | "DeviceVendorMk": "muskie/proprietary/device-vendor-walleye.mk", 28 | "api-30": { 29 | "naked": { 30 | "overlays-dir": "", 31 | "rro-overlays": ["CarrierConfigOverlay"], 32 | "system-bytecode": [ 33 | "system/app/ims/ims.apk", 34 | "system/app/uceShimService/uceShimService.apk", 35 | "system/framework/cneapiclient.jar", 36 | "system/framework/com.quicinc.cne.api-V1.0-java.jar", 37 | "system/framework/com.quicinc.cne.jar", 38 | "system/product/framework/libhwinfo.jar", 39 | "system/framework/qcrilhook.jar", 40 | "system/framework/rcsimssettings.jar", 41 | "system/framework/vendor.qti.qcril.am-V1.0-java.jar", 42 | "system/priv-app/CNEService/CNEService.apk", 43 | "system/priv-app/qcrilmsgtunnel/qcrilmsgtunnel.apk" 44 | ], 45 | "system-other": [ 46 | "system/bin/move_widevine_data.sh", 47 | "system/etc/cne/Nexus/ROW/ROW_profiles.xml", 48 | "system/etc/cne/Nexus/VZW/VZW_profiles.xml", 49 | "system/etc/cne/Nexus/ATT/ATT_profiles.xml", 50 | "system/etc/firmware/music_detector.sound_model", 51 | "system/etc/firmware/music_detector.descriptor", 52 | "system/etc/firmware/dnd.sound_model", 53 | "system/etc/firmware/dnd.descriptor", 54 | "system/product/etc/permissions/android.hardware.telephony.euicc.xml", 55 | "system/product/etc/permissions/com.google.android.hardwareinfo.xml", 56 | "system/lib/com.qualcomm.qti.ims.radio@1.0.so", 57 | "system/lib/com.qualcomm.qti.imsrtpservice@1.0.so", 58 | "system/lib/com.qualcomm.qti.qcril.qcrilhook@1.0.so", 59 | "system/lib/libdiag_system.so", 60 | "system/lib/libeaselcomm.so", 61 | "system/lib/libimscamera_jni.so", 62 | "system/lib/libimsmedia_jni.so", 63 | "system/lib/lib-imsvideocodec.so", 64 | "system/lib/lib-imsvtextutils.so", 65 | "system/lib/lib-imsvt.so", 66 | "system/lib/lib-imsvtutils.so", 67 | "system/lib/librcc.so", 68 | "system/lib/vendor.qti.qcril.am@1.0.so", 69 | "system/lib64/com.qualcomm.qti.ims.radio@1.0.so", 70 | "system/lib64/com.qualcomm.qti.imsrtpservice@1.0.so", 71 | "system/lib64/com.qualcomm.qti.qcril.qcrilhook@1.0.so", 72 | "system/product/lib64/libaptX_encoder.so", 73 | "system/product/lib64/libaptXHD_encoder.so", 74 | "system/lib64/libdiag_system.so", 75 | "system/lib64/libeaselcomm.so", 76 | "system/lib64/libimscamera_jni.so", 77 | "system/lib64/libimsmedia_jni.so", 78 | "system/lib64/lib-imsvideocodec.so", 79 | "system/lib64/lib-imsvtextutils.so", 80 | "system/lib64/lib-imsvt.so", 81 | "system/lib64/lib-imsvtutils.so", 82 | "system/lib64/librcc.so", 83 | "system/lib64/vendor.qti.qcril.am@1.0.so", 84 | "system/product/etc/apns-conf.xml" 85 | ], 86 | "system_ext-bytecode": [], 87 | "system_ext-other": [], 88 | "product-bytecode": [], 89 | "forced-modules": [ 90 | "chre", 91 | "com.android.ims.rcsmanager", 92 | "ese-ls-provision", 93 | "ese-replay", 94 | "libhidltransport.vendor", 95 | "libhwbinder.vendor", 96 | "libjson", 97 | "libp61-jcop-kit.vendor", 98 | "libsensorndkbridge", 99 | "libtinyxml", 100 | "netutils-wrapper-1.0", 101 | "RcsService" 102 | ], 103 | "new-modules": [], 104 | "dep-dso": [ 105 | "vendor/lib64/libsdsprpc.so", 106 | "vendor/lib/libsdsprpc.so" 107 | ], 108 | "BoardConfigVendor": [], 109 | "device-vendor": [ 110 | "PRODUCT_PROPERTY_OVERRIDES += \\", 111 | " ro.hardware.fingerprint=fpc \\", 112 | " ro.hardware.vulkan=adreno \\", 113 | " ro.hardware.egl=adreno \\", 114 | " ro.gfx.driver.0=com.google.pixel.wahoo.gfxdrv \\", 115 | " ro.oem_unlock.pst=/dev/block/platform/soc/1da4000.ufshc/by-name/misc \\", 116 | " ro.oem_unlock.pst_offset=6144" 117 | ], 118 | "vendor-skip-files": [ 119 | "bin/applypatch", 120 | "bin/awk", 121 | "bin/boringssl_self_test32", 122 | "bin/boringssl_self_test64", 123 | "bin/chre", 124 | "bin/dumpsys", 125 | "bin/esed", 126 | "bin/ese-ls-provision", 127 | "bin/ese-replay", 128 | "bin/hostapd_cli", 129 | "bin/hw/android.hardware.atrace@1.0-service", 130 | "bin/hw/android.hardware.audio.service", 131 | "bin/hw/android.hardware.boot@1.0-service", 132 | "bin/hw/android.hardware.camera.provider@2.4-service", 133 | "bin/hw/android.hardware.cas@1.2-service", 134 | "bin/hw/android.hardware.configstore@1.1-service", 135 | "bin/hw/android.hardware.contexthub@1.0-service", 136 | "bin/hw/android.hardware.drm@1.0-service", 137 | "bin/hw/android.hardware.drm@1.3-service.clearkey", 138 | "bin/hw/android.hardware.dumpstate@1.0-service.wahoo", 139 | "bin/hw/android.hardware.gnss@1.0-service-qti", 140 | "bin/hw/android.hardware.graphics.allocator@2.0-service", 141 | "bin/hw/android.hardware.graphics.composer@2.1-service", 142 | "bin/hw/android.hardware.health@2.0-service.wahoo", 143 | "bin/hw/android.hardware.light@2.0-service", 144 | "bin/hw/android.hardware.media.omx@1.0-service", 145 | "bin/hw/android.hardware.memtrack@1.0-service", 146 | "bin/hw/android.hardware.nfc@1.1-service", 147 | "bin/hw/android.hardware.power@1.3-service.pixel-libperfmgr", 148 | "bin/hw/android.hardware.power.stats@1.0-service.pixel", 149 | "bin/hw/android.hardware.sensors@1.0-service", 150 | "bin/hw/android.hardware.thermal@2.0-service.pixel", 151 | "bin/hw/android.hardware.usb@1.1-service.wahoo", 152 | "bin/hw/android.hardware.vibrator-service.drv2624", 153 | "bin/hw/android.hardware.wifi@1.0-service", 154 | "bin/hw/hostapd", 155 | "bin/hw/rild", 156 | "bin/hw/wpa_supplicant", 157 | "bin/ipacm", 158 | "bin/logwrapper", 159 | "bin/misc_writer", 160 | "bin/sh", 161 | "bin/vndservice", 162 | "bin/vndservicemanager", 163 | "etc/fs_config_dirs", 164 | "etc/fs_config_files", 165 | "etc/gps.conf", 166 | "etc/group", 167 | "etc/init/android.hardware.atrace@1.0-service.rc", 168 | "etc/init/android.hardware.audio.service.rc", 169 | "etc/init/android.hardware.boot@1.0-service.rc", 170 | "etc/init/android.hardware.camera.provider@2.4-service.rc", 171 | "etc/init/android.hardware.cas@1.2-service.rc", 172 | "etc/init/android.hardware.configstore@1.1-service.rc", 173 | "etc/init/android.hardware.contexthub@1.0-service.rc", 174 | "etc/init/android.hardware.drm@1.0-service.rc", 175 | "etc/init/android.hardware.drm@1.3-service.clearkey.rc", 176 | "etc/init/android.hardware.dumpstate@1.0-service.wahoo.rc", 177 | "etc/init/android.hardware.gnss@1.0-service-qti.rc", 178 | "etc/init/android.hardware.graphics.allocator@2.0-service.rc", 179 | "etc/init/android.hardware.graphics.composer@2.1-service.rc", 180 | "etc/init/android.hardware.health@2.0-service.wahoo.rc", 181 | "etc/init/android.hardware.light@2.0-service.rc", 182 | "etc/init/android.hardware.media.omx@1.0-service.rc", 183 | "etc/init/android.hardware.memtrack@1.0-service.rc", 184 | "etc/init/android.hardware.nfc@1.1-service.rc", 185 | "etc/init/android.hardware.power@1.3-service.pixel-libperfmgr.rc", 186 | "etc/init/android.hardware.power.stats@1.0-service.pixel.rc", 187 | "etc/init/android.hardware.sensors@1.0-service.rc", 188 | "etc/init/android.hardware.thermal@2.0-service.pixel.rc", 189 | "etc/init/android.hardware.usb@1.1-service.wahoo.rc", 190 | "etc/init/android.hardware.vibrator-service.drv2624.rc", 191 | "etc/init/android.hardware.wifi@1.0-service.rc", 192 | "etc/init/android.hardware.wifi.supplicant-service.rc", 193 | "etc/init/boringssl_self_test.rc", 194 | "etc/init/chre_daemon.rc", 195 | "etc/init/esed.rc", 196 | "etc/init/hostapd.android.rc", 197 | "etc/init/rild.rc", 198 | "etc/init/vendor_flash_recovery.rc", 199 | "etc/init/vndservicemanager.rc", 200 | "etc/IPACM_cfg.xml", 201 | "etc/mkshrc", 202 | "etc/passwd", 203 | "etc/seccomp_policy/configstore@1.1.policy", 204 | "etc/selinux/plat_pub_versioned.cil", 205 | "etc/selinux/precompiled_sepolicy.plat_sepolicy_and_mapping.sha256", 206 | "etc/selinux/precompiled_sepolicy.product_sepolicy_and_mapping.sha256", 207 | "etc/selinux/precompiled_sepolicy.system_ext_sepolicy_and_mapping.sha256", 208 | "etc/selinux/selinux_denial_metadata", 209 | "etc/selinux/vendor_file_contexts", 210 | "etc/selinux/vendor_hwservice_contexts", 211 | "etc/selinux/vendor_mac_permissions.xml", 212 | "etc/selinux/vendor_property_contexts", 213 | "etc/selinux/vendor_seapp_contexts", 214 | "etc/selinux/vendor_sepolicy.cil", 215 | "etc/selinux/vendor_service_contexts", 216 | "etc/vintf/compatibility_matrix.xml", 217 | "etc/vintf/manifest/android.hardware.atrace@1.0-service.xml", 218 | "etc/vintf/manifest/android.hardware.cas@1.2-service.xml", 219 | "etc/vintf/manifest/android.hardware.power@1.3-service.pixel.xml", 220 | "etc/vintf/manifest/android.hardware.thermal@2.0-service.pixel.xml", 221 | "etc/vintf/manifest/android.hardware.usb@1.1-service.wahoo.xml", 222 | "etc/vintf/manifest/android.hardware.usb.gadget@1.1-service.wahoo.xml", 223 | "etc/vintf/manifest/android.hardware.vibrator-service.drv2624.xml", 224 | "etc/vintf/manifest/android.hardware.wifi@1.0-service.xml", 225 | "etc/vintf/manifest/android.hardware.wifi.hostapd.xml", 226 | "etc/vintf/manifest/manifest_android.hardware.drm@1.3-service.clearkey.xml", 227 | "etc/vintf/manifest/manifest.xml", 228 | "etc/vintf/manifest.xml", 229 | "lib64/android.hardware.graphics.composer@2.1-resources.so", 230 | "lib64/camera.device@3.2-impl.so", 231 | "lib64/ese_spi_nxp.so", 232 | "lib64/hw/android.hardware.bluetooth.audio@2.0-impl.so", 233 | "lib64/hw/android.hardware.boot@1.0-impl.so", 234 | "lib64/hw/android.hardware.contexthub@1.0-impl.generic.so", 235 | "lib64/hw/android.hardware.gnss@1.0-impl-qti.so", 236 | "lib64/hw/android.hardware.graphics.allocator@2.0-impl.so", 237 | "lib64/hw/android.hardware.graphics.composer@2.1-impl.so", 238 | "lib64/hw/android.hardware.graphics.mapper@2.0-impl-2.1.so", 239 | "lib64/hw/android.hardware.light@2.0-impl.so", 240 | "lib64/hw/android.hardware.memtrack@1.0-impl.so", 241 | "lib64/hw/android.hardware.renderscript@1.0-impl.so", 242 | "lib64/hw/android.hardware.sensors@1.0-impl.so", 243 | "lib64/hw/audio.bluetooth.default.so", 244 | "lib64/hw/audio.primary.default.so", 245 | "lib64/hw/audio.primary.msm8998.so", 246 | "lib64/hw/audio.r_submix.default.so", 247 | "lib64/hw/audio.usb.default.so", 248 | "lib64/hw/bootctrl.msm8998.so", 249 | "lib64/hw/gralloc.default.so", 250 | "lib64/hw/gralloc.msm8998.so", 251 | "lib64/hw/hwcomposer.msm8998.so", 252 | "lib64/hw/lights.wahoo.so", 253 | "lib64/hw/local_time.default.so", 254 | "lib64/hw/memtrack.msm8998.so", 255 | "lib64/hw/power.default.so", 256 | "lib64/hw/vibrator.default.so", 257 | "lib64/libalsautils.so", 258 | "lib64/libbluetooth_audio_session.so", 259 | "lib64/libbt-vendor.so", 260 | "lib64/libc2dcolorconvert.so", 261 | "lib64/libcld80211.so", 262 | "lib64/libdisppower-pixel.so", 263 | "lib64/libdrm.so", 264 | "lib64/libdrmutils.so", 265 | "lib64/libeffectsconfig.so", 266 | "lib64/libeffects.so", 267 | "lib64/libese-app-boot.so", 268 | "lib64/libese-app-weaver.so", 269 | "lib64/libese_cpp_nxp_pn80t_nq_nci.so", 270 | "lib64/libese-hw-nxp-pn80t-nq-nci.so", 271 | "lib64/libese.so", 272 | "lib64/libese-sysdeps.so", 273 | "lib64/libese-teq1.so", 274 | "lib64/libgnss.so", 275 | "lib64/libgps.utils.so", 276 | "lib64/libgpu_tonemapper.so", 277 | "lib64/libhidltransport.so", 278 | "lib64/libhwbinder.so", 279 | "lib64/libhwc2on1adapter.so", 280 | "lib64/libhwc2onfbadapter.so", 281 | "lib64/libhwminijail.so", 282 | "lib64/libipanat.so", 283 | "lib64/libjson.so", 284 | "lib64/libkeystore-engine-wifi-hidl.so", 285 | "lib64/libkeystore-wifi-hidl.so", 286 | "lib64/liblocation_api.so", 287 | "lib64/libloc_core.so", 288 | "lib64/libloc_pla.so", 289 | "lib64/libloc_stub.so", 290 | "lib64/libmm-omxcore.so", 291 | "lib64/libnbaio_mono.so", 292 | "lib64/libnetfilter_conntrack.so", 293 | "lib64/libnfnetlink.so", 294 | "lib64/liboffloadhal.so", 295 | "lib64/libOmxCore.so", 296 | "lib64/libOmxVdec.so", 297 | "lib64/libOmxVenc.so", 298 | "lib64/libp61-jcop-kit.so", 299 | "lib64/libperfmgr.so", 300 | "lib64/libprotobuf-cpp-full-3.9.1.so", 301 | "lib64/libprotobuf-cpp-lite-3.9.1.so", 302 | "lib64/libqdMetaData.so", 303 | "lib64/libqdutils.so", 304 | "lib64/libqservice.so", 305 | "lib64/libreference-ril.so", 306 | "lib64/libril.so", 307 | "lib64/librilutils.so", 308 | "lib64/libsdmcore.so", 309 | "lib64/libsdmutils.so", 310 | "lib64/libstagefrighthw.so", 311 | "lib64/libtinycompress.so", 312 | "lib64/libtinyxml.so", 313 | "lib64/libwebrtc_audio_preprocessing.so", 314 | "lib64/libwifi-hal.so", 315 | "lib64/libwpa_client.so", 316 | "lib64/mediacas/libclearkeycasplugin.so", 317 | "lib64/mediadrm/libdrmclearkeyplugin.so", 318 | "lib64/nfc_nci_nxp.so", 319 | "lib64/pixelpowerstats_provider_aidl_interface-V1-cpp.so", 320 | "lib64/soundfx/libaudiopreprocessing.so", 321 | "lib64/soundfx/libbundlewrapper.so", 322 | "lib64/soundfx/libdownmix.so", 323 | "lib64/soundfx/libdynproc.so", 324 | "lib64/soundfx/libeffectproxy.so", 325 | "lib64/soundfx/libldnhncr.so", 326 | "lib64/soundfx/libqcompostprocbundle.so", 327 | "lib64/soundfx/libqcomvisualizer.so", 328 | "lib64/soundfx/libqcomvoiceprocessingdescriptors.so", 329 | "lib64/soundfx/libqcomvoiceprocessing.so", 330 | "lib64/soundfx/libreverbwrapper.so", 331 | "lib64/soundfx/libvisualizer.so", 332 | "lib64/soundfx/libvolumelistener.so", 333 | "lib64/vendor.nxp.nxpese@1.0.so", 334 | "lib64/vendor.nxp.nxpnfc@1.0.so", 335 | "lib/android.hardware.audio.common@6.0-util.so", 336 | "lib/android.hardware.audio.common-util.so", 337 | "lib/android.hardware.camera.provider@2.4-external.so", 338 | "lib/android.hardware.camera.provider@2.4-legacy.so", 339 | "lib/camera.device@1.0-impl.so", 340 | "lib/camera.device@3.2-impl.so", 341 | "lib/camera.device@3.3-impl.so", 342 | "lib/camera.device@3.4-external-impl.so", 343 | "lib/camera.device@3.4-impl.so", 344 | "lib/camera.device@3.5-external-impl.so", 345 | "lib/camera.device@3.5-impl.so", 346 | "lib/camera.device@3.6-external-impl.so", 347 | "lib/hw/android.hardware.audio@6.0-impl.so", 348 | "lib/hw/android.hardware.audio.effect@6.0-impl.so", 349 | "lib/hw/android.hardware.bluetooth.audio@2.0-impl.so", 350 | "lib/hw/android.hardware.camera.provider@2.4-impl.so", 351 | "lib/hw/android.hardware.drm@1.0-impl.so", 352 | "lib/hw/android.hardware.gnss@1.0-impl-qti.so", 353 | "lib/hw/android.hardware.graphics.mapper@2.0-impl-2.1.so", 354 | "lib/hw/android.hardware.memtrack@1.0-impl.so", 355 | "lib/hw/android.hardware.renderscript@1.0-impl.so", 356 | "lib/hw/android.hardware.soundtrigger@2.2-impl.so", 357 | "lib/hw/audio.bluetooth.default.so", 358 | "lib/hw/audio.primary.default.so", 359 | "lib/hw/audio.primary.msm8998.so", 360 | "lib/hw/audio.r_submix.default.so", 361 | "lib/hw/audio.usb.default.so", 362 | "lib/hw/bootctrl.msm8998.so", 363 | "lib/hw/camera.msm8998.so", 364 | "lib/hw/gralloc.default.so", 365 | "lib/hw/gralloc.msm8998.so", 366 | "lib/hw/hwcomposer.msm8998.so", 367 | "lib/hw/lights.wahoo.so", 368 | "lib/hw/local_time.default.so", 369 | "lib/hw/memtrack.msm8998.so", 370 | "lib/hw/power.default.so", 371 | "lib/hw/vibrator.default.so", 372 | "lib/libalsautils.so", 373 | "lib/libavservices_minijail.so", 374 | "lib/libbluetooth_audio_session.so", 375 | "lib/libbt-vendor.so", 376 | "lib/libc2dcolorconvert.so", 377 | "lib/libdrm.so", 378 | "lib/libdrmutils.so", 379 | "lib/libeffectsconfig.so", 380 | "lib/libeffects.so", 381 | "lib/libgnss.so", 382 | "lib/libgps.utils.so", 383 | "lib/libgpu_tonemapper.so", 384 | "lib/libhidltransport.so", 385 | "lib/libhwbinder.so", 386 | "lib/libjson.so", 387 | "lib/liblocation_api.so", 388 | "lib/libloc_core.so", 389 | "lib/libloc_pla.so", 390 | "lib/libloc_stub.so", 391 | "lib/libmmcamera_interface.so", 392 | "lib/libmmjpeg_interface.so", 393 | "lib/libmm-omxcore.so", 394 | "lib/libnbaio_mono.so", 395 | "lib/libOmxCore.so", 396 | "lib/libOmxVdec.so", 397 | "lib/libOmxVenc.so", 398 | "lib/libopus.so", 399 | "lib/libprotobuf-cpp-full-3.9.1.so", 400 | "lib/libprotobuf-cpp-lite-3.9.1.so", 401 | "lib/libqdMetaData.so", 402 | "lib/libqdutils.so", 403 | "lib/libqomx_core.so", 404 | "lib/libqservice.so", 405 | "lib/libreference-ril.so", 406 | "lib/libril.so", 407 | "lib/librilutils.so", 408 | "lib/libsdmcore.so", 409 | "lib/libsdmutils.so", 410 | "lib/libsensorndkbridge.so", 411 | "lib/libstagefright_amrnb_common.so", 412 | "lib/libstagefright_enc_common.so", 413 | "lib/libstagefright_flacdec.so", 414 | "lib/libstagefrighthw.so", 415 | "lib/libstagefright_soft_aacdec.so", 416 | "lib/libstagefright_soft_aacenc.so", 417 | "lib/libstagefright_soft_amrdec.so", 418 | "lib/libstagefright_soft_amrnbenc.so", 419 | "lib/libstagefright_soft_amrwbenc.so", 420 | "lib/libstagefright_soft_avcdec.so", 421 | "lib/libstagefright_soft_avcenc.so", 422 | "lib/libstagefright_soft_flacdec.so", 423 | "lib/libstagefright_soft_flacenc.so", 424 | "lib/libstagefright_soft_g711dec.so", 425 | "lib/libstagefright_soft_gsmdec.so", 426 | "lib/libstagefright_soft_hevcdec.so", 427 | "lib/libstagefright_soft_mp3dec.so", 428 | "lib/libstagefright_soft_mpeg2dec.so", 429 | "lib/libstagefright_soft_mpeg4dec.so", 430 | "lib/libstagefright_soft_mpeg4enc.so", 431 | "lib/libstagefright_softomx_plugin.so", 432 | "lib/libstagefright_softomx.so", 433 | "lib/libstagefright_soft_opusdec.so", 434 | "lib/libstagefright_soft_rawdec.so", 435 | "lib/libstagefright_soft_vorbisdec.so", 436 | "lib/libstagefright_soft_vpxdec.so", 437 | "lib/libstagefright_soft_vpxenc.so", 438 | "lib/libtinycompress.so", 439 | "lib/libtinyxml.so", 440 | "lib/libvorbisidec.so", 441 | "lib/libvpx.so", 442 | "lib/libwebrtc_audio_preprocessing.so", 443 | "lib/libwpa_client.so", 444 | "lib/mediacas/libclearkeycasplugin.so", 445 | "lib/mediadrm/libdrmclearkeyplugin.so", 446 | "lib/modules/htc_battery.ko", 447 | "lib/modules/modules.alias", 448 | "lib/modules/modules.dep", 449 | "lib/modules/modules.load", 450 | "lib/modules/modules.softdep", 451 | "lib/modules/synaptics_dsx_core_htc.ko", 452 | "lib/modules/synaptics_dsx_fw_update_htc.ko", 453 | "lib/modules/synaptics_dsx_rmi_dev_htc.ko", 454 | "lib/modules/wlan.ko", 455 | "lib/soundfx/libaudiopreprocessing.so", 456 | "lib/soundfx/libbundlewrapper.so", 457 | "lib/soundfx/libdownmix.so", 458 | "lib/soundfx/libdynproc.so", 459 | "lib/soundfx/libeffectproxy.so", 460 | "lib/soundfx/libldnhncr.so", 461 | "lib/soundfx/libqcompostprocbundle.so", 462 | "lib/soundfx/libqcomvisualizer.so", 463 | "lib/soundfx/libqcomvoiceprocessingdescriptors.so", 464 | "lib/soundfx/libqcomvoiceprocessing.so", 465 | "lib/soundfx/libreverbwrapper.so", 466 | "lib/soundfx/libvisualizer.so", 467 | "lib/soundfx/libvolumelistener.so", 468 | "odm/etc/build.prop", 469 | "odm/etc/group", 470 | "odm/etc/NOTICE.xml.gz", 471 | "odm/etc/passwd" 472 | ] 473 | } 474 | } 475 | } 476 | --------------------------------------------------------------------------------