summaryrefslogtreecommitdiff
path: root/extract_utils.sh
AgeCommit message (Collapse)Author
2017-03-27extract_utils: support extracting directly from an ota zipDan Pasanen
* 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
2017-03-08extract_utils: Fix locale issue with sortPaul Keith
* 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>
2017-03-04extract-utils: Fix handling of pulling src:dest pairs from dumpsChristopher R. Palmer
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
2017-01-18extract_utils: Detect output existence before moving it for backupAdrian DC
* Avoids: Cleaning output directory (./../../../vendor/.../.../proprietary).. mv: cannot stat './../../../vendor/.../.../proprietary/*': No such file or directory Change-Id: I3258e64f3997f139d8db4fb4e07d14964a469c78
2017-01-09extract_utils: Introduce variable INITIAL_COPYRIGHT_YEARMatt Mower
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
2017-01-06extract_utils: Update backsmali commandGabriele M
-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
2016-11-23extract_utils: Use shasum on macOSRashed Abdel-Tawab
macOS doesn't have sha1sum but instead shasum, so use that if 'uname -s' returns Darwin Change-Id: I1ab8721327a561e8df78562bbc0b12e884cc4a93
2016-11-04extract_utils: Add option to define the certificate for jarsElektroschmock
Change-Id: I3fb4ff29b2ce898989f5599b47f47ee7fcfc5e92
2016-10-13Update to smali/baksmali v2.2b3Sam Mortimer
The cli changed slightly: https://github.com/JesusFreke/smali/wiki/SmaliBaksmali2.2 And, for deodexing angler at least, baksmali needs access to boot*.oat rather than just boot.oat so point at source rather than copy Resurrected from http://review.cyanogenmod.org/#/c/164958/ With fixed adb $SRC deodexing Change-Id: Id6ae0e9d7a5554687124e99fb03a808f3115bb95
2016-10-06extract_utils: Do not change app SRC if there are argumentsHashBang
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
2016-10-04extract_utils: Add ability to set custom device guardRashed Abdel-Tawab
In some cases we may not want to check against TARGET_DEVICE so allow setting a custom variable to check against Change-Id: Ia2fb338f453137a95a59c6940b0cc16b261505bf
2016-10-04extract_utils: Add ability to set custom vendor.mk nameRashed Abdel-Tawab
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
2016-09-04extract_utils: Add flag to disable pinningSteve Kondik
* 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
2016-09-02extract_utils: Fix device online checkSteve Kondik
* 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
2016-08-28extract_utils.sh: Disable dex preopt on prebuilt apksHashbang173
Change-Id: I230f1a8bb95cbc1df36bc652b03e58829ec278f5
2016-08-14extract-utils: Add pinning supportSteve Kondik
* 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
2016-08-05cm: extract_utils: Add a firmware extraction methodLouis Popi
Change-Id: If14f6932cbdccf45ca0cc91c403e951363e91260
2016-08-05cm: extract_utils: Fixup xml filesLuca Stefani
Change-Id: Icb8efcca0e6e37a3ea7432716fcbfbd631d96c19
2016-08-05cm: extract_utils: Implement oat2dexLuca Stefani
* Shipping baksmali and smali (version 2.1.3) in vendor/cm (Official sources: https://github.com/JesusFreke/smali) Change-Id: Iaca6337fa2d4b5f2d6654ef5142ec0313af63f5a
2016-07-29Revert "extract_utils: Don't write multilib tags on 32-bit only devices"Steve Kondik
* Not gonna work without preparsing all the lists combined together. This reverts commit e66e06d378096664cfa97ee5dd007c79d60c6c6a. Change-Id: I63ceead414d7f8416e2c2c8e4b12098077b545e2
2016-07-28cm: extract_utils: Rewrite file existence checksBruno Martins
Change-Id: I7c1584ec7162e0e18fae471e6aceef6123a5d10b
2016-07-28extract_utils: Don't write multilib tags on 32-bit only devicesSteve Kondik
Change-Id: I41b6f71c45a566ba1b4dd5cb72c4ebf44388b363
2016-07-28extract_utils: Add support for files in rootfsSteve Kondik
* 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
2016-07-21cm: Remove stray echo from extract_utilsSteve Kondik
Change-Id: I2d893a3f8472a86835feef24540e82c47b69fd67
2016-07-20cm: Underp dumping of 64-bit only librariesSteve Kondik
Change-Id: I9c2140b40747fc7f847f1a532c42fb7ae5bfc3fd
2016-07-18cm: Add generic tools for extract-files / setup-makefiles scriptsSteve Kondik
* 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