4818c230b31700d32f73cff984dc3e0740497dcd
* Traditionally, the task of hex-editing blobs has been approached in 2 ways:
(1) Do it out-of-band, commit the modified blob, and record its edited
sha1sum in proprietary-files.txt (aka pin it).
(2) Do it in-band, by adding code to the device-level extract-files.sh
(usually this performs patchelf or sed). This code runs after the
extract_utils functions were invoked.
* Problems of approach (1):
- It relies on verbal (basically commit message) documentation of
the hex-editing that was done. Makes it more difficult to reproduce.
- Each time blobs are updated, pinning needs to be temporarily removed,
hex-editing done again manually and new hash put back.
* Problems of approach (2):
- It is incompatible with the concept of pinning, which is useful
for kanging blobs from another device. A pinned blob would either:
- Match the hash, get hex-edited, then it won't match the hash
next time around.
- Not match the hash (because of, say, hex-editing), then the
extraction script would use an unwanted blob version instead of the
pinned one (either that, or say "!! file not found in source").
* In summary, this patch adds system-wide support for approach (2) in order
to address the aforementioned shortcomings.
* At device level, users of extract_utils who wish to perform blob
fixups can override a blob_fixup() Bash function in their
extract-files.sh immediately after running "source ${HELPER}". The
blob_fixup() function will be called by the common extract() function
after extracting every individual blob, giving the user the
opportunity to hook custom code after this operation takes place.
* In proprietary-files.txt, the line corresponding to this blob which
needs fixups can look in one of 2 ways:
(a) vendor/lib64/vendor.qti.gnss@1.0_vendor.so
Do this if you are taking the blob from the stock ROM. The fixup
script will always run after the blob is extracted.
(b) vendor/lib64/vendor.qti.gnss@1.0_vendor.so|249c76153f8de014bf2dd2ab623ee3d87741fbc8|f7e9ee8e3804887a2f3939128e860767e6f27258
Do this if you are kanging the blob from somebody else. The pinning
logic now applies for both the pre- and the post-fixup hashes. The
fixup script will only run if the blob doesn't match the hex-edited blob,
although the fixup script should really be idempotent.
Change-Id: Ifdd73c885d995c645f6210597537693d1a2f903f
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
LineageOS =========== Getting started --------------- To get started with Android/LineageOS, you'll need to get familiar with [Repo](https://source.android.com/source/using-repo.html) and [Version Control with Git](https://source.android.com/source/version-control.html). To initialize your local repository using the LineageOS trees, use a command like this: ``` repo init -u git://github.com/LineageOS/android.git -b lineage-16.0 ``` Then to sync up: ``` repo sync ``` Please see the [LineageOS Wiki](https://wiki.lineageos.org/) for building instructions, by device. Submitting patches ------------------ Patches are always welcome! Please submit your patches via LineageOS Gerrit! Simply follow our guide on [how to submit patches](https://wiki.lineageos.org/submitting-patch-howto.html). To view the status of your and others' patches, visit [LineageOS Gerrit Code Review](https://review.lineageos.org/). Buildbot -------- All supported devices are built weekly and periodically as changes are committed to ensure the source trees remain buildable. You can view the current build statuses at [LineageOS Jenkins](https://jenkins.lineageos.org/). Builds produced weekly by the buildbot can be downloaded from [LineageOS downloads](https://download.lineageos.org/).
Description
Languages
CSS
27.1%
Makefile
21.2%
JavaScript
19.4%
Shell
15.5%
Python
8.5%
Other
8.3%