Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/grapheneos-archive/carriersettings-extractor
Converts the CarrierSettings binary protobuf files in Google Pixel device images to XML format compatible with AOSP
https://github.com/grapheneos-archive/carriersettings-extractor
android aosp carrier-settings pixel-devices protobuf-files vendor-blobs xml
Last synced: about 4 hours ago
JSON representation
Converts the CarrierSettings binary protobuf files in Google Pixel device images to XML format compatible with AOSP
- Host: GitHub
- URL: https://github.com/grapheneos-archive/carriersettings-extractor
- Owner: GrapheneOS-Archive
- License: bsd-3-clause
- Archived: true
- Created: 2020-06-25T20:14:44.000Z (over 4 years ago)
- Default Branch: 13
- Last Pushed: 2023-07-11T19:19:26.000Z (over 1 year ago)
- Last Synced: 2024-11-15T18:14:35.395Z (about 4 hours ago)
- Topics: android, aosp, carrier-settings, pixel-devices, protobuf-files, vendor-blobs, xml
- Language: Python
- Homepage:
- Size: 229 KB
- Stars: 48
- Watchers: 6
- Forks: 12
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# carriersettings-extractor
## Introduction
This project is designed to automate the processing of protobufs shipped on Google Pixel
devices which are used by the proprietary CarrierSettings app and are generated by the
open source https://android.googlesource.com/platform/tools/carrier_settings/ project.2 XMLs are generated, an APN XML and a CarrierConfig XML, which can be used within the AOSP
project.This is the continuation of the project from the original author [daradib](https://github.com/daradib/).
## Build
```
m carriersettings_extractor
```## Standalone usage
```
out/host/linux-x86/bin/carriersettings_extractor vendor/google_devices//proprietary/product/etc/CarrierSettings/ /root/dir/of/aosp/tree/ /output/path/of/apns-conf.xml /output/path/of/carrierconfig-vendor.xml
```For example, on the Pixel 6 (oriole) whilst in the root of the AOSP tree, you would run the below to produce apns-conf.xml and carrierconfig-vendor.xml in the root of your AOSP tree.
```
out/host/linux-x86/bin/carriersettings_extractor vendor/google_devices/oriole/proprietary/product/etc/CarrierSettings/ . apns-conf.xml carrierconfig-vendor.xml oriole
```## Inline usage
Add the below to the device.mk of a new Pixel device
```
PRODUCT_PACKAGES += \
extracted-carrierconfig \
extracted-apns
```Add the below to the BoardConfig.mk of a new Pixel device
```
PRODUCT_SOONG_NAMESPACES += \
vendor/carriersettings-extractor
```Legacy devices which use APV use a custom soong variable
```
SOONG_CONFIG_NAMESPACES += carriers-apv
SOONG_CONFIG_carriers-apv += apv
SOONG_CONFIG_carriers-apv_apv:= true
```## Development
Set up your virtual environment for the project:
```
$ python3 -m venv venv
$ source venv/bin/activate
$ python3 -m pip install pip-tools
$ pip-sync
```To format the Python code:
```
$ black carriersettings_extractor.py
```To lint the Python code:
```
$ ruff check carriersettings_extractor.py
```