Commit Graph

10895 Commits

Author SHA1 Message Date
Ethan Yonker
5f3b8f0103 Fix permissions on last_log.gz
Change-Id: I4c56bd01551d3f7301f471e4d342a0620c7b4971
2021-08-22 22:47:39 +00:00
Ethan Yonker
deeefbdec4 Stop using boot HAL when decrypting fscrypt
Change-Id: Ia7aaf6b86c5ca456fd6651e776f4d6423b09f02e
2021-08-22 22:47:02 +00:00
Mohd Faraz
7fc7050b6d partitionmanager: Symlink dynamic partitions to /dev/block/boot/device/by-name/
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
Change-Id: Iebebe9234723bcda863098cdff6ed41e7b410e78
(cherry picked from commit a7c22b56ba9b6e2f3fb90edbde7ec206b7eca8d5)
2021-08-15 23:01:09 +00:00
nebrassy
ac29e691d8 Add an option to one click flash current booted TWRP ramdisk
Change-Id: I12303696698a5feaa43401bcac9e30d5b3b99a0c
2021-08-09 23:05:14 +00:00
bigbiff
cfa875c4d4 vab support: merges and unmapping super devices
- check for merges before formatting data
- add advanced option for unmapping super devices

Change-Id: I38d4d3bbdfa071969016c3e000c86a4d03c71e45
2021-08-09 23:04:33 +00:00
bigbiff
d1e556a9a2 repack: fix bad rebase
Change-Id: Ic266b48e0a94c18dfc942e1214b38e6a0f2e8100
2021-08-07 14:34:06 -04:00
nebrassy
7378254120 repack: correctly recompress ramdisk to the format of boot image
Change-Id: I90df3d2f63eb82a185d9af0d68e61c955cee9403
2021-08-07 17:56:57 +00:00
bigbiff
74a46278c3 repacker: override slot for flashing images instead of using bootctrl
Bootctrl is being unreliable during repacking. This overrides the slot
while repacking recovery in boot.

Change-Id: I0a04357af4e5f24591792bcfb27ccbd10b0a813b
2021-08-07 17:56:19 +00:00
nebrassy
76224bde3d Support AIDL Vibrator
co-authored by: SebaUbuntu <barezzisebastiano@gmail.com>

Change-Id: Ifaa0af4cb0fe0dee7d2a9ad4c58a5ede5ce46d59
2021-07-31 18:52:01 +02:00
bigbiff
a15d02f885 vab: exclude gsi
Change-Id: I00d4b4f19aafcaf87ad951ba4f1cb7e3fe84ced8
2021-07-26 19:20:57 -04:00
nebrassy
45f66b2c58 Repacker: refresh sizes before backing up boot
Change-Id: I001295739cb71fdbfc3c3bfe5cc150dc5215867c
2021-07-26 23:13:51 +00:00
Ctapchuk
5c10257865 Update Russian language, sync with en.xml
Change-Id: I8af2239735a800a7c883931ac3531440cc7f7758
2021-07-17 14:51:32 +00:00
bigbiff
2d54867daa fbe formatting: add warning for fbe devices and remove unused string
Change-Id: Id7af18a4c39932d8685e3265bfa158494ffd10f0
2021-07-17 00:14:21 +00:00
bigbiff
70cf814036 gui makefile: this file is redundant and handled by Android.bp
Change-Id: Ia51a0300709b88636125b7131b769000254a40db
2021-07-07 20:20:14 +00:00
HemanthJabalpuri
c6512446af gui: Fix TW_SCREEN_BLANK_ON_BOOT var in 6e0ca7dbed
Change-Id: I51ba03e13cd805f8aba6978e05fb3404b5ac0d7d
2021-07-05 11:32:29 +00:00
bigbiff
c5012c5c88 bc: include basic calculator in ramdisk
Change-Id: Ia16fc28a234396e996e84de8496294b26053869b
2021-07-04 13:57:47 -04:00
bigbiff
f3d93e18ce zip signature: update code to aosp11
Change-Id: I13b46d8092a75517fc83baf6c2dc83b8a68fdd5c
2021-07-04 11:46:05 -04:00
bigbiff
ab036619a4 apex: unmount flattened apex directory before installing zips
Change-Id: Idd1cadedcab94e81e30a487bd09f9173e5fe577e
2021-06-26 19:00:30 +00:00
Captain Throwback
d8a0ef78b7 update twrp version to match current release
Change-Id: I444efb9f9b488c2cd5046bbe239d90abd3ef2ba5
2021-06-25 22:46:34 +00:00
bigbiff
5c083cc3f0 super partition: include lpdump utility
Change-Id: Ifaac3b660ae3d46d9f1589470dcf6fd7c21b8ef8
2021-06-25 22:45:22 +00:00
bigbiff
bbbfe171f1 fscrypt: updates for wrapped key
- During OTA upgrades if security state or ROT changes then Keymaster
keys requires upgrade. So for such usescases, if the FBE ephemeral
key export fails, check whether KM key requires upgrade and try for
exporting ephemeral key again.

CRs-Fixed: 2632902
Change-Id: I3ee2fcd97a56b628dc4304867c8f2b8da875f883
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>

- Commit 77df7f2 / http://aosp/1217657 ("Refactor to use
EncryptionPolicy everywhere we used to use raw_ref") unintentionally
made fscrypt_initialize_systemwide_keys() start specifying keepOld=true
(via default parameter value) when retrieving the system DE key, and
likewise for read_or_create_volkey() and volume keys.

As a result, if the associated Keymaster key needs to be upgraded, the
upgraded key blob gets written to "keymaster_key_blob_upgraded", but it
doesn't replace the original "keymaster_key_blob", nor is the original
key deleted from Keymaster.  This happens at every boot, eventually
resulting in the RPMB partition in Keymaster becoming full.

Only the metadata encryption key ever needs keepOld=true, since it's the
only key that isn't stored in /data, and the purpose of keepOld=true is
to allow a key that isn't stored in /data to be committed or rolled back
when a userdata checkpoint is committed or rolled back.

So, fix this bug by removing the default value of keepOld, and
specifying false everywhere except the metadata encryption key.

Note that when an affected device gets this fix, it will finally upgrade
its system DE key correctly.  However, this fix doesn't free up space in
Keymaster that was consumed by this bug.

Test: On bramble:
  - Flashed rvc-d1-dev build, with wiping userdata
  - Flashed a newer build, without wiping userdata
  - Log expectedly shows key upgrades:
        $ adb logcat | grep 'Upgrading key'
        D vold    : Upgrading key:
/metadata/vold/metadata_encryption/key
        D vold    : Upgrading key: /data/unencrypted/key
        D vold    : Upgrading key: /data/misc/vold/user_keys/de/0
        D vold    : Upgrading key:
/data/misc/vold/user_keys/ce/0/current
  - Rebooted
  - Log unexpectedly shows the system DE key being upgraded again:
        $ adb logcat | grep 'Upgrading key'
        D vold    : Upgrading key: /data/unencrypted/key
  - "keymaster_key_blob_upgraded" unexpectedly still exists:
        $ adb shell find /data /metadata -name
keymaster_key_blob_upgraded
        /data/unencrypted/key/keymaster_key_blob_upgraded
  - Applied this fix and flashed, without wiping userdata
  - Log shows system DE key being upgraded (expected because due to the
    bug, the upgraded key didn't replace the original one before)
        $ adb logcat | grep 'Upgrading key'
        D vold    : Upgrading key: /data/unencrypted/key
  - "keymaster_key_blob_upgraded" expectedly no longer exists
        $ adb shell find /data /metadata -name
keymaster_key_blob_upgraded
  - Rebooted
  - Log expectedly doesn't show any more key upgrades
        $ adb logcat | grep 'Upgrading key'
Bug: 171944521
Bug: 172019387
(cherry picked from commit c493903732d0c17b33091cf722cbcc3262292801)
Merged-In: I42d3f5fbe32cb2ec229f4b614cfb271412a3ed29
Change-Id: I42d3f5fbe32cb2ec229f4b614cfb271412a3ed29

Change-Id: I0449b812e91c13020a8b653f2149c33e46027b97
2021-06-25 18:42:20 -04:00
bigbiff
477006a4a0 fastboot: allow device to start required healthd and boot-hal services
Change-Id: Iac1d20ce26d49e7a99071c968d8c8e654e5ff1c6
2021-06-25 18:36:36 -04:00
Captain Throwback
0265b25b5b bash: fix copying of bash files to recovery ramdisk
Change-Id: I41d4b83802df3d8f9e8397130b807e348d054d1b
2021-06-17 22:53:29 +00:00
epicX
9597b840bc Normalized digest check before installing zip
Change-Id: I5a3e82f103e7a80800be7790f1c8dc33c76413da
(cherry picked from commit 646f4f0c66a918f12e12784b22e7dc9a89837c37)
2021-06-06 13:54:41 +00:00
bigbiff
2e344ab7fb fscrypt: integrate v1 processing into TWRP
Change-Id: I3bf9c14b818f9c3e0570c44c82bf0769fcec907f
2021-05-18 20:35:53 -04:00
bigbiff
799243055f apex: only mount required apex files
Since recent kernels seem to limit the number of loopback
devices to 7, we now just mount the required apex files in TWRP.

To mount additional apex files specify TW_ADDITIONAL_APEX_FILES
in your BoardConfig, for example:
TW_ADDITIONAL_APEX_FILES := "apex1 apex2"

To disable Apex in your builds use:
TW_EXLUCDE_APEX := true
Change-Id: Ib55529a4dc17ce2b737b01b86100dca3dc75e6c9

Change-Id: I3b4dfbb164838ffb126016b0d862f67d3f170bf3
2021-05-18 20:35:52 -04:00
bigbiff
be4f46cbc3 sdcard: bind mount in post decrypt
also uncomment wiping code that should not be commented

Change-Id: I445f688628dcedb67544c22c7b0775ee62e0b267
2021-05-18 20:35:51 -04:00
bigbiff
a957f078be FsCrypt update: support fscrypt policies v1 and v2
This patchset introduces support decryption for Android 11.

In this update we deprecate ext4crypt. To specify the
policy version to use, use TW_USE_FSCRYPT_POLICY := 1 or
TW_USE_FSCRYPT_POLICY := 2. By default policy version will
be set to 2 if this variable is omitted.

Change-Id: I62a29c1bef36c259ec4b11259f71be613d20a112
2021-05-18 20:35:51 -04:00
nebrassy
9c1709b963 Health hal 2.1
Change-Id: I58df03c469c213e58c7152430d6f15de80d00f77
2021-05-04 11:47:45 +02:00
Ctapchuk
fc35b151e3 Fix ozip_decrypt binary copying to ramdisk
Change-Id: Ic0ed7737e12974b9a901f47e6c60c6720005ecf3
(cherry picked from commit 01407c1d7dad675a9bfc007f3dda98a217bf8b1c)
2021-05-01 16:31:33 +00:00
Mohd Faraz
6e5c758634 prebuilt: libhardware lib is also required by boot-service
* On disabling Crypto causing not to boot

Change-Id: I3d2014d7b31d02dac7b706d1f722a58e089284be
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
2021-04-25 00:04:27 +00:00
bigbiff
e2eae2fe74 boot-hal: add 1.1 HAL to TWRP
Change-Id: I51678c96f522e67c3681e404240dd98f6b07994e
2021-04-24 23:18:28 +00:00
bigbiff
6e0ca7dbed themes: convert theme copying to a golang module
Change-Id: I0a1e4b79109cf9db93acb0575200f4ec8f72d3a2
2021-04-24 19:16:53 -04:00
bigbiff
d81833a5e5 libtwrpgui: convert gui to use new ziparchive library
Change-Id: Iea94855257c6d02c2f663c25d390cb1cfb91a727
2021-04-24 18:56:46 -04:00
Xdisk
28653c98b0 languages: add indonesian language
Change-Id: I49732e59711cdc2ff0900cd8d3d7b1a0ea1d2011
(cherry picked from commit 1a7bc78a32c65f99fb8d40eb0fe8695f83c7e7b0)
(cherry picked from commit a5a124141f9af569d32cd5ef1c5b5a3b8c3cddce)
2021-04-24 22:26:58 +00:00
Mohd Faraz
16c32046ec gui: Fix mis merge
* Fix up not loading directly

Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
Change-Id: I5a39c5a93aaa8f32855799f84a748ef5554b2481
2021-04-24 18:18:05 -04:00
Captain Throwback
8e70a11ef9 Use BOARD_SUPER_PARTITION_PARTITION_LIST for dynamic list
Simplifies code for retrieving this list rather than using
every possible specified super partition group

Change-Id: I1a3bd8e4b73ce18a176c74a52eb91d25709080f4
2021-04-24 21:25:58 +00:00
Mohd Faraz
dc2cf79bc2 Android.bp: Build recovery variant of ueventd.rc
* Fixes Boot caused because graphics nodes were not creating
 * Fixes the following error:
   cannot find/open a drm device: No such file or directory
   ...
   cannot open fb0 (retrying): No such file or directory
   cannot open fb0 (retrying): No such file or directory
   cannot open fb0 (retrying): No such file or directory
   cannot open fb0 (retrying): No such file or directory
   cannot open fb0 (retrying): No such file or directory
   cannot open fb0 (retrying): No such file or directory
   cannot open fb0 (giving up): No such file or directory
   ...

Change-Id: I78b7e0f649800eebea4e816a166e77db94c9d929
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
2021-04-23 15:51:22 +00:00
Mohd Faraz
648ab676c0 gui: Reland TW_SCREEN_BLANK_ON_BOOT
* After bad merge c387622389
   libguitwrp module get reloaded into the makefile, to fix this merge this patch added and TW_SCREEN_BLANK_ON_BOOT is
   set in golang module

Change-Id: I68d2b9b93959a9b7a35251ed2118b8d5d2b84c90
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
2021-04-23 15:48:35 +00:00
Captain Throwback
c693910723 Change missing logical partitions from LOGERR to LOGINFO
Between Android versions, there may be different partitions
that make up super. Just because a partition that in fstab
is not in super doesn't necessarily mean there's a problem.

Change this message to information only so the end user
doesn't think there's a problem when there isn't one

Change-Id: I9cb99aabe20e20059e66cf0cf13cff5ed056f529
(cherry picked from commit e432fb0214b49549e99396db512be98d53e1ed8b)
2021-04-06 22:44:05 +00:00
bigbiff
7d7d0855d4 gui: fix bad merge
Change-Id: I67dc921a35e6dbc419bd9cfebcca66296b65d8e6
2021-03-27 17:03:43 -04:00
megafon929
9754a0771c Updated Russian language
Change-Id: I0951175abdef591fe6b2089660ac822c2fbc9cce
(cherry picked from commit 050a22a861e0e35a1bea49a3db713848a7b62b8d)
2021-03-22 19:04:16 -04:00
Sean hoyt
c387622389 bootable: Change how blank screen works
This is required on some devices where previous to 8.1/8.0 the blank
screen flag worked but don't now.

Test: Tested on begonia, screen is now no longer black

Change-Id: Ib4ff607d220bcb1aa5166fea23cc7ecb0e012fdd
(cherry picked from commit 28d8dec40d60a31309fcf6259dad38cd328f0717)
2021-03-22 18:59:18 -04:00
epicX
9d80efa884 Allow all extension while checking for digest verification
Change-Id: Ie17582f144e0a5b5a68e2c6d88c26cb9f5a29ee6
(cherry picked from commit 57366118181ad8f78251dc034f55835e6947cc0a)
2021-03-12 23:47:05 +00:00
bigbiff
d4bf33bd7f twrp release: 3.5.1_10
Change-Id: Ie95a57239b2576e71869fe5711d081600d2e2f0f
2021-03-07 18:34:03 -05:00
Ian Macdonald
a5d4b27e78 Fix ungrammatical sentence.
Change-Id: Id76269c81618adc966f63d80cb6a2da318a8d25c
2021-03-07 18:34:03 -05:00
Ian Macdonald
96106137d3 New, missing and improved strings for Dutch translation.
Change-Id: I216889667c959bb2a0fb1cb59bb6216946974b89
2021-03-07 18:34:03 -05:00
epicX
8f52c0a73d Added support for flash image in both slots
Change-Id: Iafda62a5f77f7c1f564f1a2ec0a59aefaf5e1266
2021-03-07 18:34:03 -05:00
bigbiff
98203ceebe nano: make executables class
Also fix bad separator in Android.mk

Change-Id: I756f8ac42ccb604f191e9439cd7978cfa0ce0995
2021-03-03 20:39:52 -05:00
Adrian DC
f7a54e519b ors: Implement 'twrp format data' to format the data partition
Change-Id: Ic01685602a47d0b468616e3d5c3f26a44313cdc8
(cherry picked from commit 3b3bd12be11bd859a5f65bb1e8c71136044b3ad3)
2021-03-03 20:05:42 -05:00