cm: Add generic tools for extract-files / setup-makefiles scripts

 * 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

cm: Underp dumping of 64-bit only libraries

Change-Id: I9c2140b40747fc7f847f1a532c42fb7ae5bfc3fd

cm: Remove stray echo from extract_utils

Change-Id: I2d893a3f8472a86835feef24540e82c47b69fd67

extract_utils: Add support for files in rootfs

 * 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

extract_utils: Don't write multilib tags on 32-bit only devices

Change-Id: I41b6f71c45a566ba1b4dd5cb72c4ebf44388b363

cm: extract_utils: Rewrite file existence checks

Change-Id: I7c1584ec7162e0e18fae471e6aceef6123a5d10b

Revert "extract_utils: Don't write multilib tags on 32-bit only devices"

 * Not gonna work without preparsing all the lists combined together.

This reverts commit b7b7f884437c76d196f94461751093a7efe47d4c.

Change-Id: I63ceead414d7f8416e2c2c8e4b12098077b545e2

cm: extract_utils: Implement oat2dex

 * Shipping baksmali and smali (version 2.1.3) in vendor/cm
   (Official sources: https://github.com/JesusFreke/smali)

Change-Id: Iaca6337fa2d4b5f2d6654ef5142ec0313af63f5a

cm: extract_utils: Fixup xml files

Change-Id: Icb8efcca0e6e37a3ea7432716fcbfbd631d96c19

cm: extract_utils: Add a firmware extraction method

Change-Id: If14f6932cbdccf45ca0cc91c403e951363e91260

extract-utils: Add pinning support

 * 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
4 files changed
tree: 320414270220e838586851a5f801bb593281705b
  1. build/
  2. config/
  3. overlay/
  4. prebuilt/
  5. sepolicy/
  6. utils/
  7. Android.mk