Commit Graph

11027 Commits

Author SHA1 Message Date
Konsta
f4ebe4f1a4 Revert "rpi: use usb fstab if sdcard is not present"
This reverts commit 628aee4849.
2022-04-29 08:09:26 +03:00
Konsta
3dfefcf5e8 Merge remote-tracking branch 'TeamWin/android-11' into android-11
Change-Id: Icdfe57679807de4dc8b8e3480946669d1e153b75
2022-03-16 17:50:56 +02:00
bigbiff
4e406a053a A11: 3.6.1 release
Change-Id: Iab1e839452af2507904796d094f8aed2d70bbc01
2022-02-26 18:45:55 -05:00
Darth9
ffb034ec78 fscrypt_destroy_user_storage: continue when EnsurePolicy returns false
Change-Id: I8a7d4343a12a7be346b96d27226f83d890a8597a
2022-02-26 15:14:43 +00:00
Captain Throwback
36deede620 soong: create phony package to fix dirty builds (2/2)
Add twrp_soong as a required module to ensure twres
folder is included in dirty builds where device out folder
is removed

Change-Id: I5b3f57664cd2aa97ff74ff594c72e6f29c6c927f
2022-02-24 23:01:37 +00:00
bigbiff
2c53845cbe sdcard: remove mount check
Change-Id: I278d7f71e79a82a34f95dba197555d08960f2723
2022-02-20 17:42:27 +00:00
Konsta
9f3de1e955 Merge remote-tracking branch 'TeamWin/android-11' into android-11
Change-Id: I421c59cdcc81ccf591fd52966d1f10cf5d876a0f

Conflicts:
	Android.mk
2022-02-19 12:01:46 +02:00
Konsta
843ff8ec96 Revert "Revert "/sdcard: do not bind mount twice""
This reverts commit bfdf3719cc.
2022-02-19 12:01:31 +02:00
Konsta
a500eaef7f Revert "sdcard: only bind mount sdcard after successful preparation of data"
This reverts commit 60bb9f6369.
2022-02-19 12:01:05 +02:00
Captain Throwback
fcb99a2cb5 twres: fix folder copy on dirty builds
Add MkdirAll before trying to copy to twres folder

Change-Id: I66f150828f804fd36bbcfd2bc9ee17c54761d672
2022-02-18 12:55:42 -05:00
bigbiff
bee26852ce datamedia: setup datamedia with key_directory set
Change-Id: I92cc83caf7e4ff3b43a69d214d176acb230abdef
2022-02-09 20:49:54 -05:00
Captain Throwback
e848afcea6 fstab: add quota to handled flags
Change-Id: Iffce38ff43b1337803a5fcf067483f61533ee423
2022-02-08 23:05:46 +00:00
Captain Throwback
32bcdcd32e fstab: add support for metadata_encryption flag
Change-Id: Ic1f12f280e9e99cfe3587e35b88a1f2e9d97a1b2
2022-02-08 12:45:01 -05:00
bigbiff
cda1588bc5 sdcard: only bind mount sdcard after successful preparation of data
Change-Id: I589f48a019f90a60ad48f93c5f5555aae4b8a5c9
2022-02-08 00:52:07 +00:00
sekaiacg
2a8dc0dd8e language: Update Chinese Simplified translation
Change-Id: I86e6a61b29e5d4b70356daa6ae2ce528fef0cb1f
2022-02-05 15:11:36 +00:00
Darth9
7ce944d50f twrpRepacker: avoid code duplication
Change-Id: I75712f32ef8804774418bb425040dc2b8f2d4e00
2022-02-03 18:53:20 -05:00
Captain Throwback
aafc82e8e2 Partition_Property_Get: Get props from additional partitions
Use the TW_OVERRIDE_PROPS_ADDITIONAL_PARTITIONS flag to
specify a space-separated list of additional partitions
that should be parsed when trying to locate props
for overriding.

Example:
TW_OVERRIDE_PROPS_ADDITIONAL_PARTITIONS := vendor odm

Requires TW_OVERRIDE_SYSTEM_PROPS to be defined.

Change-Id: I7baf4c15628789fe525976d9de0251bba6882395
2022-01-30 21:44:35 +00:00
Captain Throwback
7460b59230 theme: clean up TW_THEME_VERSION shell command
Change-Id: I6be1f15d05e6ad53bf239674cf41173879eef37a
2022-01-29 15:59:42 -05:00
Captain Throwback
a1317fc7bb theme: move TW_THEME_VERSION to variables.h
Automatically add the current theme version to the
splash and ui xmls during the build

Change-Id: I52f8cb41fabe34a8849ecc54ece3c0fb645dcd74
2022-01-29 14:12:02 -05:00
DarthJabba9
45a8d148b5 Adding TARGET_OTA_ASSERT_DEVICE flag for custom device asserts
Should be handled via device tree's BoardConfig
Sample will be TARGET_OTA_ASSERT_DEVICE := le_zl1,zl1,lepro3,lex720,lex727,LEX720,LEX727 in BoardConfig
Only applicable for AB or VAB devices

Change-Id: I1fbe6155d3f79eee089a31dbe62ee9d04c33d65c
2022-01-23 23:35:25 +00:00
MD Raza
74ea1a7d66 fastbootd: Check for and run startup script if script exists
Signed-off-by: MD Raza <raza231198@gmail.com>
Change-Id: Id2eeb59ca9161a997b239e8b58619d197dcd2093
2022-01-23 12:46:34 -05:00
Captain Throwback
550a199e67 Add TW_QCOM_ATS_OFFSET flag to manually set time/date offset
Needed if no ats_ files are present on qcom device

Offset is the difference between the current time
and the time since_epoch

To calculate the offset in Android, the following expression
(from a root shell) can be used:
echo "$(( ($(date +%s) - $(cat /sys/class/rtc/rtc0/since_epoch)) ))"

Add 3 zeros to the output and use that in the TW_QCOM_ATS_OFFSET
flag in your BoardConfig.mk

For example, if the result of the calculation is 1642433544,
use 1642433544000 as the offset

Change-Id: I5d58125dffc3fdbfb76a5ffde4e27659376185f1
2022-01-20 21:45:42 +00:00
nijel8
80c92d9be2 nandroid: exclude apexdata com.android.art folder from backup
- throws tar 255 error on AOSP Android 12

Change-Id: I2bad9c83c294d7b533c637b678764fdf25bc2cf0
2022-01-15 20:38:34 +00:00
sekaiacg
2679fb8acd kernel_module_loader: Add missing gki directory
Change-Id: I63cafb2deaaaec091ee2dff9dfd01aac23e0aade
2022-01-15 20:37:03 +00:00
Adithya R
3a59df59cc kernel_module_loader: Set a prop after completing
* we can use this as a trigger in init rc, for any task
   that depend on kernel modules being loaded

Change-Id: I7623edc0b6dc799e911a087881f76e9642e005ee
2022-01-15 20:33:59 +00:00
sekaiacg
0df7c9ef27 SkipDecryption: Fix condition
Change-Id: I3330f49214f930d481e0e237b654d44d446092bd
2022-01-13 18:08:05 +00:00
sekaiacg
826ec47f60 custom theme: Fix the install custom theme
Change-Id: I639bfdac46cbe5a0d9760d1b62fd5f9875b63994
2022-01-13 18:00:44 +00:00
bigbiff
60bb9f6369 sdcard: only bind mount sdcard after successful preparation of data
Change-Id: I589f48a019f90a60ad48f93c5f5555aae4b8a5c9
2022-01-13 13:16:07 +02:00
Konsta
bfdf3719cc Revert "/sdcard: do not bind mount twice"
This reverts commit 36cb2ad28e.
2022-01-13 13:11:51 +02:00
Konsta
438a85efcf Merge remote-tracking branch 'TeamWin/android-11' into android-11
Change-Id: Id1d534cce0969c98e2b8b6484278342201dd562d
2022-01-12 16:55:24 +02:00
Konsta
88d598c8c3 Revert "Revert "keymaster restore: warn when pin, password or pattern is enabled""
This reverts commit 59a8bd388e.
2022-01-12 16:55:18 +02:00
Captain Throwback
e331b8a1b7 tw_crypto_pwtype: move default setting to data.cpp
Change-Id: Id3dda3bc2c32ad286b1ec67595f482f84b5077d7
2022-01-10 21:21:16 +00:00
Captain Throwback
2e5abc3ecc gui: fix restore_keymaster page in landscape and watch themes
Change-Id: If182e7fc7c50b063542c9a4a058a599f05c8e685
2022-01-10 21:20:35 +00:00
sekaiacg
cf77cb357c keymaster restore: Do not enter the keymaster_restore page repeatedly
Change-Id: I0c7ca541d52d923067537adb561ca5a61bde7f08
2022-01-10 20:34:02 +00:00
Captain Throwback
086358633e System_Property_Get: Set default path for build.prop
Change-Id: I5f4fa7150c025033eca29bf4fe3fe3f908f18e5e
2022-01-05 18:58:19 -05:00
theincognito-inc
546ebc391d Change TWRP nano TERM env variable from pcansi to bg1.25
pcansi TERM has always had some display and/or scrolling (up, down, left or right) issues in nano on TWRP's embedded Terminal.
Most frequently seen is misaligned/displaced text on long lines and files, either initially or once scrolled through.
bg1.25 seems to be the most compatible TERM for all devices currently.

Change-Id: If00a8352ca3576085f69c12dffb5b21637c7b21c
2022-01-04 20:32:23 +00:00
Captain Throwback
a185252c8e System_Property_Get: Allow specifying multiple prop file paths
Some OEMs include prop files in custom locations. Add these to
a list and parse when setting properties.

Use the flag TW_SYSTEM_BUILD_PROP_ADDITIONAL_PATHS followed
by a semi-colon-separated list of paths (relative to /system)
where the additional prop files can be found.

The standard build.prop file does not need to be specified and
will always be parsed.

Example:
TW_SYSTEM_BUILD_PROP_ADDITIONAL_PATHS := etc/buildinfo/oem_build.prop;etc/prop.default

Change-Id: Ie0e25c7d2575d928310ff1b4fc1aef44a83784ca
2022-01-02 16:02:04 -05:00
bigbiff
922b121f31 libresetprop: use the latest header
Change-Id: I24656393cc84b1a978338fa587c535797d81c2a9
2022-01-01 18:36:43 +00:00
bigbiff
a84acc7fa5 fscrypt v1: support legacy ioctl
Crosshatch uses a legacy ioctl for setting and getting fscrypt
policies. If the device is legacy, we will use the legacy ioctl.

Change-Id: I5c2e068f166b89fe9f7839a6d6a9533e49fc5b07
2021-12-31 15:44:50 +00:00
Captain Throwback
740d852518 vold_decrypt: only include patch_level functions with libresetprop
The functions use the Property_Override function from libresetprop,
so don't include if libresetprop isn't included in build

Change-Id: I5eb210f17fea908ec35cb223e4a55066419f55dc
2021-12-29 16:00:54 +00:00
nebrassy
7007c999f9 correct condition for change TWRP folder
Change-Id: I3549d3be3bf2d4557055b9ca48a84f88db44eca7
2021-12-26 20:53:06 +00:00
Adithya R
a42c10d156 sepolicy: twrp: Mark ueventd as permissive
* required to load fw from non-hlos

Change-Id: I4ee82c7cd405d91d3a4e70c75591631c236bd94d
2021-12-26 17:04:00 +00:00
dianlujitao
b20dfaa26d partitionmanager: Use boot HIDL to switch active slots
Change-Id: I7009380d7736f71e63d5558b6a447961cc1075c7
2021-12-26 17:02:41 +00:00
Captain Throwback
4076a67cd3 postrecoveryboot: rename script to reflect recovery mode
Change-Id: Ifb9d64a2bec118592523682749093bf894ec2cbe
2021-12-21 22:07:29 +00:00
Magendanz
37920d9d6e Replacing format string with one appropriate for 32-bit or 64-bit size.
Change-Id: I280f38ce000a5231795953b251ba2123545903ae
2021-12-12 15:01:25 -08:00
sekaiacg
a202b5aa32 recovery: Fix the crash caused by StartIteration
In the new version of libziparchive, the default values ​​of the optional_prefix and optional_suffix parameters of the StartIteration function are changed to empty strings, and nullptr is no longer detected.

Change-Id: I66ee58a9515586700b10a3d5aa5b780a6207b33c
2021-12-12 17:34:03 +00:00
luoqiangwei1
cd1f4cac6f Fix the fuse error that cannot handle the OTA package larger than 4 GiB
1. That read data will be blocked when adb sideload OTA package
2. An error(Out of bound read) occurs when installing OTA package by fuse

Test: as follows
    - adb sideload OTA package
    - install OTA package by install_with_fuse parameter

Change-Id: Ie53510d157f6ea4c92606b289fcb745d441918c8
Signed-off-by: luoqiangwei1 <luoqiangwei1@xiaomi.com>
Signed-off-by: GarfieldHan <2652609017@qq.com>
2021-12-10 23:27:53 +00:00
GarfieldHan
b3f6a26422 twrpinstall: Switch to ZipEntry64
The libziparchive TWRP using was outdated, not supported a zip
size more than 4 GiB. With the development of technologies,
Obviously it was not enough for ROM packages, like Xiaomi's
MIUI for Vitrual A/B devices (for example Redmi K40 [alioth])
is more than 4 GiB and TWRP couldn't handle it properly.
Since we have updated libziparchive to latest version, we could
switch ZipEntry to ZipEntry64 so that TWRP can support a ROM
package if its size more than 4 GiB.

Co-authored-by: sekaiacg <sekaiacg@gmail.com>
Signed-off-by: GarfieldHan <2652609017@qq.com>
Change-Id: Iee811554bb08e02bf2bd8e9057511f36caefdc9d
2021-12-10 23:19:17 +00:00
bigbiff
36cb2ad28e /sdcard: do not bind mount twice
Change-Id: I1757eb8732a01a728392c3499ac3300c81522806
2021-12-09 19:26:06 -05:00
Gao Xiang
70b83292d6 libblkid: add erofs filesystem support
Enhanced Read-Only File System (EROFS) has been included in Linux
kernel, many Linux distributions, buildroot and Android AOSP for
a while. Plus, nowadays, it's known that EROFS has been commercially
used by several Android vendors for their system partitions.

This patch adds support for detecting EROFS filesystem to libblkid.

Since util-linux/util-linux@cd129b7 introduced blkid_probe_set_block_size
function to report filesystem block size, TWRP is using blkid 2.25.0, which
means blkid_probe_set_block_size wasn't supported and required, so remove
the blkszbits judgement and blkid_probe_set_block_size for fixing building.

Test: Add erofs mount point to twrp.flags, build and boot
OP4A7A:/ # logcat | grep erofs
I (6)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58.
I (6)[571:recovery]erofs: (device dm-9): mounted with opts: , root inode @ nid 43.
I (6)[571:recovery]erofs: (device dm-1): mounted with opts: , root inode @ nid 52.
I (6)[571:recovery]erofs: (device dm-10): mounted with opts: , root inode @ nid 45.
I (6)[571:recovery]erofs: (device dm-8): mounted with opts: , root inode @ nid 42.
I (0)[571:recovery]erofs: (device dm-12): mounted with opts: , root inode @ nid 38.
I (3)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58.
I (3)[571:recovery]erofs: (device dm-1): mounted with opts: , root inode @ nid 52.
I (3)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58.
I (3)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58.
I (3)[571:recovery]erofs: (device dm-9): mounted with opts: , root inode @ nid 43.
I (2)[571:recovery]erofs: (device dm-1): mounted with opts: , root inode @ nid 52.
I (2)[571:recovery]erofs: (device dm-10): mounted with opts: , root inode @ nid 45.
I (2)[571:recovery]erofs: (device dm-8): mounted with opts: , root inode @ nid 42.
I (2)[571:recovery]erofs: (device dm-12): mounted with opts: , root inode @ nid 38.
I (6)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58.
I (6)[571:recovery]erofs: (device dm-0): mounted with opts: , root inode @ nid 58.

OP4A7A:/ # cat /tmp/recovery.log | grep erofs
   Current_File_System: erofs
   Fstab_File_System: erofs
   Current_File_System: erofs
   Fstab_File_System: erofs
   Fstab_File_System: erofs
   Current_File_System: erofs
   Fstab_File_System: erofs
   Current_File_System: erofs
   Fstab_File_System: erofs
   Current_File_System: erofs
   Fstab_File_System: erofs
   Current_File_System: erofs
   Fstab_File_System: erofs

Now TWRP can recognize the EROFS filesystem perfectly after setting fs in twrp.flags

Signed-off-by: Gao Xiang <hsiangkao@redhat.com>
[@pomelohan: Adapt for TWRP's libblkid version and add erofs.c to build]
Co-authored-by: GarfieldHan <2652609017@qq.com>
Signed-off-by: GarfieldHan <2652609017@qq.com>
Change-Id: I00263757b5b6ed881165e65795ef849d86763165
2021-12-09 00:18:38 +00:00