Sometime blob directories are contained in dirs not named system
(ex. extracting blobs from another vendor dir) so check if the file
exists without system/ before appending "system/" to filenames.
Change-Id: I4ba946e178260b4f4804b1ac4422645e3085c665
Sometimes the need arises to update one specific subset of blobs
while holding others steady. Introduce a way to specify the "section"
of blobs to update (obviously requires the proprietary-files to be
properly split up first)
Requires additional changes in device tree extract_files.sh to support
passing the additional arguments
Change-Id: I98feab56f8bfade2818b1b5264e019440d4c57c5
When a line from the XML file contains a character which grep classifies
as a binary one, it will omit this line at all. Moreover it will append
'Binary file matches' to the stdout. This behavior breaks some XML files.
To fix this issue, let's tell grep to process a binary file as if it were
text.
Change-Id: I6ec5689f73a0926870e502f3f8ee77346b47d05f
* Specify the ota zip name as the only parameter to extract-files.sh
* Will extract to $CM_ROOT/system_dump
* Bail out on A/B OTA zips. We cannot support these.
* Handles block based OTA zips by using sdat2img.py
* Store the zip's MD5 and check if its already extracted. If so, don't
bother extracting again
Change-Id: I03038e38dac51e6cb60d493c7e6362754d1daf02
* On some machines, LC_ALL=C is set, causing the sort
order of makefiles to be different than those without
this locale change that is set
* Set LC_ALL=C on all machines for consistent ordering
* From 'man sort':
The locale specified by the environment affects sort order.
Set LC_ALL=C to get the traditional sort order that uses native byte values.
* Thanks to haggertk and rashed for verifying this for me
Change-Id: I5bbb94b0dfe599a67036de4312e8af913e9b8d30
Signed-off-by: Paul Keith <javelinanddart@aidenswann.com>
Currently, the priority of the src and dest is inverted between
pulling from adb and pulling from a system dump.
Assume that we have a camera wrapper and write the proprietary-files.txt
lib/hw/camera.msm8996.so:lib/hw/camera.vendor.msm8996.so
If we pull from a phone running Lineage that has both files, we get
camera.vendor.msm8996.so
as the pulled blob. If we take the exact same build and pull it
from the system dump (aka, your own $OUT directory that built the
installed software) you get
camera.msm8996.so
pull instead!
Make both paths follow the same logic so that you get the same
file independent of the source.
Change-Id: I479e0ae765339cc38fa05fcaad7943c528129463
* Avoids:
Cleaning output directory (./../../../vendor/.../.../proprietary)..
mv: cannot stat './../../../vendor/.../.../proprietary/*':
No such file or directory
Change-Id: I3258e64f3997f139d8db4fb4e07d14964a469c78
Let a device specify INITIAL_COPYRIGHT_YEAR=XXXX in setup-makefiles.sh
so that the correct copyright(s) is/are included in vendor makefiles.
The CyanogenMod copyright is retained when INITIAL_COPYRIGHT_YEAR<2017
and the LineageOS copyright is now included for >=2017.
Change-Id: I6895b5b69bc7ba399042ac3c29e17f3209d15f1b
-e no longer exists starting from v2.2b3, so update the
command. While at it, add the logic to deal with Android N
separated boot oat files.
Change-Id: Iab8e3946d6421824fea74e26dc43d2db38573022
Do not prepend app or priv-app to the src when a path is explicitly
given as an argument. This fixes the SRC path in such conditions.
Change-Id: I43370f17fe224df323fcfa9b0d5eae4ee2996524
In some cases we may not want to check against TARGET_DEVICE so allow
setting a custom variable to check against
Change-Id: Ia2fb338f453137a95a59c6940b0cc16b261505bf
In some circumstances we might want to set a custom vendor.mk
filename. If not set, then just default to the current device name
Change-Id: Icb59ebee67ce17b41ac613020685773efb01103d
* We might want to disable pinning entirely for an extract run.
* Set DISABLE_PINNING=1 to turn it off and override everything.
Change-Id: I1be90dda68f0de1c5f5a70c946052d70bfaab7ed
* No need to look for /sbin/recovery as adbd will report
the device as being in recovery mode already. Also, this
check appears to hang on N.
Change-Id: I3bcb427835ae3cd37c7ea56cbc57bba0d18fcc04
* In many cases, we would like to keep certain files which do not
exactly match what might be extracted from a factory ROM. This
becomes extremely annoying over time to manually reconstruct,
and it's easy to miss these special cases when updating to a
new vendor release. It's also useful to flag additions which
aren't found in the upstream release at all.
* To solve this, we can now "pin" files to a specific sha1 hash.
Simply append the sha1sum of the file to the appropriate line
in your bloblist, prepended by a | delimiter.
* This works by backing up the current files first, running the
extraction, then checking if any pinned files need to be
restored.
* Also add an exit trap to clean up all of our tempfiles
Change-Id: I2010b5175b5701e19a3efb112e8907062ca37d66
* Not gonna work without preparsing all the lists combined together.
This reverts commit b7b7f88443.
Change-Id: I63ceead414d7f8416e2c2c8e4b12098077b545e2
* A final "rootfs" tag in the last column will place
the chosen file into the ramdisk
* Currently only supports files in /sbin
* Cleaned up usage of class-specific flags
* Simplified code
Change-Id: Id823d70aab51f8767522f697eaf65f52fc64b94b
* Instead of having to enumerate packages and do a bunch of tedious
shit, we now have a way to do it automatically based only on
the blob lists.
* Devices still need to implement a short script, but this library
handles all the core functions.
* Yes, we should probably be doing this in Python- Bash is
absolutely horrible at dealing with arrays and lists.
Change-Id: I73b30ff4531c4d1b33ac53db33abf62555f500b4