summaryrefslogtreecommitdiffstats
path: root/tools/releasetools
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'cm-13.0' of https://github.com/LineageOS/android_build into ↵replicant-6.0-0001Wolfgang Wiedmeyer2017-05-022-0/+20
|\ | | | | | | replicant-6.0
| * Update su binary added with addonsu zipGabriele M2017-03-152-0/+20
| | | | | | | | | | | | | | | | | | | | Generate zips that include the su binary out of the system image when WITH_SU is not true. This allows to update the binary that was installed with the addonsu zip. Note: this requires backuptool to work and user builds are excluded. Change-Id: Idc905e3397816b7d3701c43bbb809878f0d22b9b
| * build sign_target_files_apks.py: clean tmp on exitSam Mortimer2017-03-121-0/+2
| | | | | | | | | | | | | | | | Currently, this script creates and leaves nearly 2GB in tmp per run. Clean up on exit. Change-Id: I4247dd2508e9d27de57c611c18e70800d7a47f33 (cherry picked from commit 462425468899f264155a3413aab75a099d1bbd25)
* | build sign_target_files_apks.py: clean tmp on exitSam Mortimer2017-02-141-0/+2
| | | | | | | | | | | | | | Currently, this script creates and leaves nearly 2GB in tmp per run. Clean up on exit. Change-Id: I4247dd2508e9d27de57c611c18e70800d7a47f33
* | rename release key dir to replicantWolfgang Wiedmeyer2017-02-142-2/+2
|/ | | | Signed-off-by: Wolfgang Wiedmeyer <wolfgit@wiedmeyer.de>
* ota_from_target_files: Fix cherry-pick errorZhao Wei Liew2017-01-251-5/+5
| | | | | | | | | | In commit 24d91d8dd36b1b2a681461bea56a44605521861e, info_dict is yet to be initialized when it is checked for "ota_override_device" and "ota_override_prop". Move the checks down to after info_dict is initialized. Change-Id: Ibcbc4f993dcd2dd281ec19624107dddd994fd497
* ota_from_target_files: Remove device dependent argumentsGabriele M2017-01-231-15/+6
| | | | | | | | | | | These device-specific arguments are defined at build time and are necessary to generate the zip correctly. Don't use command line arguments to specify them, but write all the needed information in misc_info.txt when the target-files zip is generated. ota_from_target_files will then read misc_info.txt and set everything automatically. Change-Id: Ibdbca575b76eb07b53fccfcea52a351c7e333f91
* releasetools: support reading release keys out of some sort of commandTom Powell2017-01-231-1/+16
| | | | | | | key passphrases may live in some sort of secure storage, support running an arbitrary command to retrieve them. Change-Id: I49862cf60f1b73a2356e0c492e1038beef28a95f
* releasetools: Add script to sign zipsGabriele M2017-01-231-0/+69
| | | | Change-Id: I9cbeb6edea79a7e9bb0fc692e53497b54058d67f
* build: Rebrand to LineageOSZhao Wei Liew2016-12-272-2/+2
| | | | Change-Id: Ie03583dc2a974a159fa50c6cb19cb68aa256ca77
* releasetools: Rebuild recovery when signing target imagesDiogo Ferreira2016-11-092-7/+9
| | | | | | | | | | | | | | | | | When signing a build, the recovery can be built twice, once when signing and again when adding the image to target files. This is usally not a problem for deterministic signatures but a custom signing method might include a time-based component which affects checksums of the generated images. This means that the recovery patches (i.e. install-recovery) will fail to checksum. This patch makes adding images to target files, when invoked from sign_target_files_apks, always rebuild the recovery patch with the newly generated images so that the checksums are consistent irrespective of potential time components. Change-Id: I575c69dc96a6d4d69b3ea9d037f5f13c97afa87e
* build: Use the password manager for the verity key if possibleRicardo Cerqueira2016-07-112-3/+30
| | | | | | | If we're operating with a password dict, try to use it for verity Change-Id: Ie0e8e33c873fc9f1ae9bd6da559f9cbbced183e9 Ref: CYNGNOS-3156
* build: Let the verity signer and metadata builders ask for a passwordRicardo Cerqueira2016-07-042-4/+8
| | | | | | | | | Don't grab stdin/out for these tools. We want to know when a password is being requested (and be able to actually provide one) if the corresponding key needs it Change-Id: I8dd439322b7d8942adc9ce7ce0912fb20c69654f Ref: CYNGNOS-3156
* ereleasetools: Allow for custom boot image signing toolsBrint E. Kriebel2016-05-171-1/+10
| | | | | | | | Some boot images will need to be signed using specific tools. Allow passing the path to this tool through an environment variable. Change-Id: I958726fdae8d63fe99d639dfa361046b528a087c Ticket: CYNGNOS-2868
* img_from_target_files: Skip oem.img in fastboot image creationBrint E. Kriebel2016-04-181-6/+3
| | | | | | | | We don't need this package to be included in fastboot images, so skip it when we are creating fastboot images. Change-Id: I1e0676f5cbf7468088e6997f83ae845578864668 Ticket: CYNGNOS-936
* releasetools: Fix print in boot image signingBrint E. Kriebel2016-04-181-1/+1
| | | | | | | Python 3 compatibility fail Change-Id: I0acb7059b554ad16833ccdd09643f52f2c44a3f2 Ticket: RM-233
* releasetools: Add bootable image signingBrint E. Kriebel2016-04-181-1/+39
| | | | | | | | Set PRODUCT_PRIVATE_KEY to the path of the boot image signing certificate to sign an image for secure boot. Ticket: RM-233 Change-Id: I2c767c6f9c3740bed3d7094d2d0b50a075e08abc
* build: Create a oem image when BOARD_OEMIMAGE_FILE_SYSTEM_TYPE is definedDiogo Ferreira2016-04-152-0/+39
| | | | | | | | | | This adds the capability of generating a OEM image with the build and adding it to target files when BOARD_OEMIMAGE_FILE_SYSTEM_TYPE is set. Change-Id: I6c596d58d9d5ece1a261d953eeb8c60eac30e642 Ticket: CYNGNOS-936 (cherry picked from commit 1966a9e7c22b95eb4c16be6aee7adf43cb6ce118)
* Merge tag 'android-6.0.1_r22' of ↵Steve Kondik2016-03-112-10/+39
|\ | | | | | | | | | | | | | | https://android.googlesource.com/platform/build into cm-13.0 Android 6.0.1 release 22 Change-Id: Icd3603c1efc5fa85f48c19d13d484f0371ddae37
| * am 46ae586a: am e09359ab: DO NOT MERGE Pass source\'s info_dict to vendor\'s ↵Tao Bao2015-10-172-3/+11
| |\ | | | | | | | | | | | | | | | | | | releasetools.py. * commit '46ae586ab26f5bf63baaac6c68942f1bfba4addc': DO NOT MERGE Pass source's info_dict to vendor's releasetools.py.
| * \ am b03d55aa: Merge "DO NOT MERGE: Only use a fixed timestamp when ↵Tao Bao2015-10-122-0/+20
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | packaging." into mnc-dr-dev * commit 'b03d55aaeb5962690631ed1a25d8e628667d8ad2': DO NOT MERGE: Only use a fixed timestamp when packaging.
| * \ \ am 59f4ff10: Add verity_signer and verity_key flags to add_img_to_target_files.Baligh Uddin2015-09-171-2/+14
| |\ \ \ | | | | | | | | | | | | | | | | | | | | * commit '59f4ff109d7da6d608cb6b1248a4403b13d8b2bc': Add verity_signer and verity_key flags to add_img_to_target_files.
| * \ \ \ am a0abf49d: resolved conflicts for a1fcaf86 to mnc-dr-devIan Pedowitz2015-09-161-1/+9
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a0abf49d2bdc42c81e5f636e54da9038de9dfc21': Add an option to include a full bootloader in incremental OTA.
| * \ \ \ \ am 1e7f6f74: Fix build.leozwang2015-09-151-1582/+1
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '1e7f6f7442ca2addc8e4447d3070c625dbba8d3f': Fix build.
| * \ \ \ \ \ am 888b6f47: am 47f6a4e7: am 1c1a6d15: am 2c9dfb82: am 1d4ad515: Revert "Add ↵Leo Wang2015-09-151-9/+0
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | an option to include a full bootloader in incremental OTA." * commit '888b6f47c73c7ff0f4780e4406f18a83dbd4d8c2': Revert "Add an option to include a full bootloader in incremental OTA."
| * \ \ \ \ \ \ am 160603cf: am 5837f102: am 1753b4e9: resolved conflicts for 00fdede3 to ↵leozwang2015-09-151-1/+1591
| |\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | lmp-mr1-ub-dev * commit '160603cfc20362df30886a05735054842c6f79b8': Add an option to include a full bootloader in incremental OTA.
| * \ \ \ \ \ \ \ am e35d00d0: am 265d9aeb: releasetools: Update the fingerprint when signing.Tao Bao2015-09-121-1/+7
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e35d00d019aaff92b5e20b86d9c3b8222c0c946a': releasetools: Update the fingerprint when signing.
| * \ \ \ \ \ \ \ \ am 28f6f9c3: releasetools: Always write the last block if it\'s padded.Tao Bao2015-09-081-6/+21
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '28f6f9c3deb4d23fd627d15631d682a5cfa989fc': releasetools: Always write the last block if it's padded.
| * \ \ \ \ \ \ \ \ \ am a6e6afbc: am 39c322ce: releasetools: Fix the bug in symlink deletion.Tao Bao2015-09-032-4/+38
| |\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'a6e6afbce69da968299898944bb2165f5e799886': releasetools: Fix the bug in symlink deletion.
| * \ \ \ \ \ \ \ \ \ \ am e337093e: Merge changes from topic \'stash-size\' into mnc-dr-devTao Bao2015-08-313-18/+213
| |\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit 'e337093e6c5d502f0f4094639b41c001b3048d0f': Split large files for BBOTA v3. Revise stash for BBOTAs when needed. Assert the stash size when generating OTAs.
| * | | | | | | | | | | | sparse_img.py: Divide NONZERO blocks into groups.Tao Bao2015-08-191-3/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For squashfs, we currently don't have a system.map. So the whole system image will be treated as a single file. But for some unknown bug, the updater will be killed due to OOM when writing back the patched image to flash (observed on lenok-userdebug MEA49). Prior to getting a real fix, we evenly divide the non-zero blocks into smaller groups (currently 1024 blocks or 4MB per group). Bug: 23227672 Change-Id: Ifeddd8d802f01f8cd2a743a1d1217a284fb6e182
| * | | | | | | | | | | | am 9f5c487e: Merge "releasetools: Fix parameters for vboot_signer" into ↵Furquan Shaikh2015-08-101-1/+3
| |\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mnc-dr-dev * commit '9f5c487ef586d20c273cafba6ce663287ef6a37a': releasetools: Fix parameters for vboot_signer
| * \ \ \ \ \ \ \ \ \ \ \ \ am 15b42c42: am cce673b6: Read fstab from the source build.Tao Bao2015-07-291-6/+8
| |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '15b42c426715c2221f49d0cf2181ba869b84bc94': Read fstab from the source build.
| * \ \ \ \ \ \ \ \ \ \ \ \ \ am 7f8ecb7f: Merge "Zero out blocks that may be touched by dm-verity." into ↵Tao Bao2015-07-104-14/+73
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mnc-dev * commit '7f8ecb7f5c21630a75c69d170ba2b401d7a311a5': Zero out blocks that may be touched by dm-verity.
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ am 74a81e66: fix device specific fs_config on build serverThierry Strudel2015-07-101-3/+9
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * commit '74a81e6633276d92337749a5ee9d921207814dd4': fix device specific fs_config on build server
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ resolved conflicts for merge of 610754e5 to cw-e-devTao Bao2015-07-081-6/+16
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ia0d0d82c7fec86e1585a9e2c90ac877c363ed491
| | * | | | | | | | | | | | | | | | Scan all init.*.rc files for flash_recovery service.Tao Bao2015-07-071-7/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clockwork builds may rename init.rc to init.core.rc. Change the OTA script to scan all init.*.rc files to determine the proper location for install-recovery.sh. Bug: 22128990 Change-Id: If96bd0b81090683ad0bbfddb735d390204849d9f
| | * | | | | | | | | | | | | | | | Merge "DO NOT MERGE Fix the syntax error in the edify script generator" into ↵Chris Elliott2015-07-021-5/+5
| | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cw-d-mr1-dev
| | | * | | | | | | | | | | | | | | | DO NOT MERGE Fix the syntax error in the edify script generatorTao Bao2015-07-021-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | file_getprop() always expects two arguments. Bug: 19881931 Change-Id: Icf5577ad34188991c03f68c1217642d3adc4201c
* | | | | | | | | | | | | | | | | | | releasetool: add OSIP partitions specificsArtefvck 072016-02-202-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Declare OSIP as a new partition type - Standard boot.img update is not possible for OSIP partitions We are simply removing it on AOSP handling, and let the board handle it in its own releasetool.py Change-Id: Ie19fc3f6a0ca42e2eda264904b20fceeddbeaf53
* | | | | | | | | | | | | | | | | | | ota_from_target_files: Don't validate data signatures with data wipeBrint E. Kriebel2016-02-161-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If data is going to be wiped later in the script, there is no reason to validate signatures. This breaks updates that may be designed to wipe data and change signatures. Change-Id: I0b794b43cec2d22996eaa5571688c66582475d55 Ticket: CYNGNOS-1289
* | | | | | | | | | | | | | | | | | | releasetools: Store the proper base64 release key in the target filesBrint E. Kriebel2016-02-161-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This code was dropped when the original change (I7528a8e7c484ea9209cd665b9263328ae834586a) was cherry-picked into 13.0. Add it back in to the sign_target_files_apks.py file. Change-Id: I0177a7d2a39ae03b21d0b2b4ad48a621ca5afd7b Ticket: CYNGNOS-2067
* | | | | | | | | | | | | | | | | | | releasetools: Don't extract BOOTABLE_IMAGES when signing target filesBrint E. Kriebel2016-02-101-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | boot and recovery images need to be re-created during the signing process to ensure that the proper keys are embedded in the images. Don't extract the BOOTABLE_IMAGES path if it exists in the source target files to avoid re-using the prebuilt versions. Change-Id: Icdf61367efc2364f89c7ab1c61a81536431aea2e Ticket: CYNGNOS-1994
* | | | | | | | | | | | | | | | | | | releasetools: Replace key values in permission files during re-signingBrint E. Kriebel2016-02-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Permission files may grant permissions based on signatures in the same way mac_permissions grants selinux permissions. In order to have this work properly with dev-key and production key signed builds, allow these files to be re-written during the signing process to replace the value of the keys in production signed builds. Change-Id: Id0311e49f8bba5a9f71b2fa49b480cb74779c853 Ticket: CYNGNOS-1877, RM-179
* | | | | | | | | | | | | | | | | | | releasetools: add compatibility for full ota functions with incrementalsBrint E. Kriebel2016-01-291-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some device-specific releasetool functions may expect that input_zip and input_version are set. For incremental OTAs, target_zip and target_version are set instead. Set input_zip=target_zip and input_version=target_version to add compatibility with these functions. Change-Id: I6a04f67440618d3652396656cc1fe223d4a6b195 Ticket: RM-82
* | | | | | | | | | | | | | | | | | | releasetools: Use the first entry of a mount point when reading fstabBrint E. Kriebel2016-01-291-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There may be multiple entries in fstab for a mount point. Use the first value found so the entries are prioritized in order. Change-Id: Ibd2631413d3e00507d3a0ec84fb91755f1c7993c Ticket: OPO-326
* | | | | | | | | | | | | | | | | | | releasetools: Store and use the dt image file through target filesBrint E. Kriebel2016-01-271-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Target files packages may be used for signing images separate from the build process. Store the device tree image file in the target files package so it can be used during the signing process. Change-Id: Ie8507121fa9c4ba57ecffeab05bd859ae5f5b788 Ticket: CYNGNOS-1744
* | | | | | | | | | | | | | | | | | | py3: ota_from_target_files.py: fix logic that brokeAnthony King2016-01-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I032097c463598d1246feb92c02567175a65f90fd
* | | | | | | | | | | | | | | | | | | py3: update releasetools with proper print syntaxTom Powell2016-01-042-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I48534a72e6559f60af5f9b1c09040b34b7575b63
* | | | | | | | | | | | | | | | | | | py3: update all the thingsAnthony King2016-01-0412-207/+256
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: I5e11b46b7c2f7f8760d6c0e713ca99c1e88b7cd3