Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pdsouza/android-generate-vendor
Scripts to extract device vendor files and generate AOSP makefiles.
https://github.com/pdsouza/android-generate-vendor
android aosp hammerhead
Last synced: about 16 hours ago
JSON representation
Scripts to extract device vendor files and generate AOSP makefiles.
- Host: GitHub
- URL: https://github.com/pdsouza/android-generate-vendor
- Owner: pdsouza
- License: other
- Created: 2017-02-11T00:26:01.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2021-07-18T11:36:41.000Z (over 3 years ago)
- Last Synced: 2023-03-13T12:04:07.862Z (over 1 year ago)
- Topics: android, aosp, hammerhead
- Language: Shell
- Size: 1.93 MB
- Stars: 19
- Watchers: 2
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# android-generate-vendor
Scripts to extract vendor files from a factory image and generate vendor
makefiles for AOSP.## Why?
Building custom Android ROMs for a device is harder than it appears. Although Android
is open-source under the Android Open Source Project (AOSP), devices ship dozens of
closed-source binaries ("blobs") that are needed to fully enable all device hardware.
Obtaining these blobs can be...painful.Even with friendly devices like the Nexus line that distribute these binaries, there
are cases of missing blobs, requiring ROM builders to manually extract these from factory
images. The Nexus 5 (hammerhead), for example, is missing at least two APKs and three shared
libraries in the distributed vendor binaries.These scripts aim to make the process of extracting vendor files and including them in AOSP
builds simple and scalable.## Caveats
Right now, we only handle devices that ship all blobs in `/system`. Devices that
use a separate vendor partition are unsupported right now; please see the excellent
[android-prepare-vendor](https://github.com/anestisb/android-prepare-vendor) to deal
with vendor partitions for the latest Nexus devices.## Supported Devices
* [Nexus 5 (hammerhead)](lge/hammerhead/proprietary-blobs.txt)
* [Nexus 7 2013 Wi-Fi (flo)](asus/flo/proprietary-blobs.txt)## Dependencies
* [android-simg2img](https://github.com/anestisb/android-simg2img)
* [smali](https://github.com/JesusFreke/smali)These are included under [deps](deps) for your convenience.
## Examples
Generating a vendor tree for hammerhead build M4B30Z:
```
$ ./generate-vendor.sh -d hammerhead -i hammerhead-m4b30z-factory-625c027b.zip
I: setting up output dir './vendor/lge/hammerhead'...
I: preparing factory image...
W: requesting sudo for loop mount...
I: generating vendor makefiles...
I: extracting vendor files from image...
I: de-optimizing system/app/qcrilmsgtunnel/qcrilmsgtunnel.apk...
I: de-optimizing system/app/shutdownlistener/shutdownlistener.apk...
I: de-optimizing system/app/TimeService/TimeService.apk...
I: de-optimizing system/framework/qcrilhook.jar...
I: calculating checksums...
I: all tasks completed successfully
I: cleaning up...
```...you will end up with a clean vendor tree for your device:
```
$ tree -L 2 vendor/lge/hammerhead
vendor/lge/hammerhead
|-- Android.mk
|-- device-partial.mk
|-- device-vendor.mk
|-- sha1sums.txt
`-- system
|-- app
|-- bin
|-- etc
|-- framework
|-- lib
`-- vendor7 directories, 4 files
```Just copy the vendor directory to your AOSP workspace and you're good to go!
## License
[Apache 2.0](LICENSE)