Commit Graph

10974 Commits

Author SHA1 Message Date
Konsta
894efea684 never keep system and vendor partitions readonly
Change-Id: I72b1740d406b16d066cfb86426529c8f9a4a9912
2021-11-23 14:32:23 +02:00
Konsta
741644b3e2 Merge remote-tracking branch 'TeamWin/android-11' into android-11
Change-Id: I7a3a43554dd1dd099ac5255a956579459759a3a6
2021-11-22 17:44:29 +02:00
GarfieldHan
d0b854b31d Add EROFS to file system check list
This commit will add EROFS Filesystem mount support

Since Huawei announced the new file system EROFS and successfully
merged into mainline. More and more OEMs switch the ext4 filesystem
to EROFS filesystem for system/vendor/odm/product partitions like
Oplus (OPPO / Realme / OnePlus).

Test: Import the latest fstab from system, build and boot. EROFS-based
partions like system and vendor partitions were sucessfully mounted.

Notes: Although I tried to change 'ext4' to 'erofs' for correct partition
in twrp.flags, but it was still recognized as 'ext4'. So you can just copy
the line related erofs partitions from recovery.fstab and TWRP will failed
to recognize the line in twrp.flags, and then skip this line, so the issue
was solved.

Signed-off-by: GarfieldHan <2652609017@qq.com>
Change-Id: I49a04e4465f1d92eb589ad6d86b6db9b58d720eb
2021-11-21 23:54:28 +08:00
nebrassy
0fc1ee2c1a twrpRepacker: override slot back after flashing
and move updating partition details to the function

Change-Id: I6f27ab1191246b6a23e625b0e3459db9024691c7
2021-11-21 03:33:59 +01:00
bigbiff
ac43dd1179 unmapping super devices: do not remove ramdisk mountpoints
Change-Id: Iabd543e914887af78813805141604ae0ca1c812d
2021-11-21 01:43:09 +00:00
Captain Throwback
a866b44f45 lpdump: only build for dynamic partition devices
Change-Id: Ia4a90681a6342cb5e4269ca3475376507b5d5260
2021-11-19 23:46:27 +00:00
Captain Throwback
4f19caa016 lptools: add to build
Use TW_EXCLUDE_LPTOOLS to exclude from build

Will only be included on devices with dynamic partitions

Change-Id: I77092344a1e31e749161cb31e6e020f6e9fc3800
2021-11-19 23:46:05 +00:00
Konsta
d60db18ac1 Merge remote-tracking branch 'TeamWin/android-11' into android-11
Change-Id: Ifd35e85f6e2e18b4cdf77006138b60a6ede82e3e

Conflicts:
	gui/theme/common/landscape.xml
	gui/theme/common/portrait.xml
2021-11-19 15:55:34 +02:00
nkk71
3c1e35f51c Adopted Storage: Add support for mixed mode sdcards
* Adds support for mixed adopted storage + removable
  storage partitioned sdcards.

* Also symlinks Adopted Storage datamedia folder to an
  available /sdcardN (N being 2 through 9) folder.

* Requires a suitable entry in fstab, for example:

    # Removable Storage
    /sd_ext ext4 /dev/block/mmcblk1p2 /dev/block/mmcblk1
        flags=storage;wipeingui;removable;encryptable=footer
    /external_sd vfat /dev/block/mmcblk1p1 /dev/block/mmcblk1
        flags=storage;wipeingui;removable;encryptable=footer

  /sd_ext will be the mountpoint for adopted storage, and /sdcardN
  will become symlinked to /sd_ext/data/media[/0]

* Fix adopted storage nickname being ""

* Output adopted partition info after successful decrypt

* Mimic single lun code for multi lun devices:
  "Mount CurrentStoragePath if it's not /data"

Change-Id: I3874c09f1a1c3a81f04277e17f17cc03ecb4184a
2021-11-18 19:47:13 +00:00
nebrassy
9a68408725 repacker: update partition details after switching slot
Change-Id: I9f6f396530ad40f70c02c917b01e9b8158add773
2021-11-18 18:40:57 +01:00
LinkBoi00
7ebe82a950 gui: theme: Switch to larger buttons in the reboot menu
Since the TWRP app button is gone from the reboot menu,
it would make sense to switch back to the larger buttons
for the slots and move down the active slot information
to fit the screen better

Change-Id: Iabf891da8799b063bb4902d583b67f0594b4fc19
2021-11-16 23:38:32 +00:00
bigbiff
5bcc1408c6 Merge "gui: theme: Remove the TWRP app button from the reboot menu" into android-11 2021-11-16 23:27:43 +00:00
LinkBoi00
f5547386da action: Only unmount /vendor if it actually exists
* Since commit 168bc4caaedfdf655a71ba24a1c5a7f2b905a122 the vendor partition gets unmounted prior to switching the slots. However, devices without a vendor partition (e.g. tissot's stock partition table) will have errors since the partition doesn't actually exist
* Therefore, it should be only mounted if that partition exists in the partition table

Change-Id: Id16ab55e25d05964ca0de1bf218914d66c2b0205
2021-11-16 16:37:42 +00:00
LinkBoi00
79f434efc4 gui: theme: Remove the TWRP app button from the reboot menu
* The TWRP app button results in a big delay to open the reboot page

Change-Id: I7390d5bff2142214dfb3e2aad821859ac03e8c2f
2021-11-16 10:39:11 +02:00
bigbiff
989dee2ac8 twrp release: 3.6.0 for a11
Change-Id: I416e8b29d3230d9a16014b4fa5b4b48bbad7e1b8
2021-11-13 17:33:19 -05:00
Ctapchuk
803f860a60 Update Russian language, sync with en.xml
Change-Id: Iefa42509dfecdb282563c305086c18342520f939
2021-11-13 13:07:45 +07:00
Ctapchuk
452489e66e Add support for installation realme/OPPO OTA
Support for '--special_update_package' command from boot message

For example realmeUI 2.0 using this command for boot message to install OTA packages
--special_update_package=/data/ota_package/OTA/.otaPackage/system_vendor_19720.1.3.202108120000042554318_patch

Change-Id: I7d1a49a3e05a439d4c96717c1700dd063f4e55c4
2021-11-12 21:34:05 +07:00
zhenyolka
9085047555 Handle XML files format properly
In A12 format of XML files changed to Android Binary XML
TWRP uses RapidXML to parse XMLs, but it don't support ABX format
So before parse check format of XML format and if it is in ABX, just ignore it for now

Change-Id: Ie40f5b3534db50143999984be22ade1d1af162e7
2021-11-11 19:51:34 +00:00
zhenyolka
e46d69670f Add support of A12 keymaster_key_blob files structure
In A12 keymaster_key_blob format changed
Compared to A11 it contains another new 8 bytes at beginning "pKMblob\0" (in hex 0x704B4D626C6F6200)
We can just ignore them

Change-Id: I8a1701a248be536fdd000b9011122ef954c8e4d1
2021-11-11 19:49:16 +00:00
bigbiff
8f5fad3741 keymaster restore: warn when pin, password or pattern is enabled
Starting in Android 10, zygote relies on stored inodes in order
to find packages in the user's CE directories. Since TWRP cannot
force inode creation on restore, we warn the user to remove their
pin before restoring their backup. Otherwise zygote may not load
properly in Android. This will force the system to update the
inode cache.

The user can then re-add their security settings to android.

Change-Id: I8f07962d07304dee54c08318efc500dca424b6c0
2021-11-10 23:21:46 +00:00
bigbiff
dd16123707 rotation: fix switch statement for rotation
Change-Id: I29e594791b3a149f08df95fe37309a1ed82784ad
2021-11-10 23:20:24 +00:00
nebrassy
5ca08db4e6 sepolicy: make postinstall permissive
Change-Id: I005669b31598a8917a1e70dc3284bdb857763955
2021-11-10 13:34:18 +00:00
micky387
2ec1df43d3 recovery: Don't exclude the whole data system dir for the factory reset
Factory reset not clean correctly the settings of system.

Change-Id: I3ff616093e4f2f480f11f97ccfb4072756400777
2021-11-09 00:24:06 +00:00
Ctapchuk
aefc2ab3db module load: don't processed /vendor in fastbootd if not required
Change-Id: Ia81af8187c135df93b7aa0ad83de2a79b63a384b
2021-11-09 00:23:40 +00:00
Aseem Athale
dd81b9a8d7 theme: Capitalize EDL
TWRP used 'Edl', but everywhere else, it is 'EDL'.

Change-Id: I4f63185ffb96797da0d695b34857ee242cfa33e8
2021-11-08 13:21:50 +05:30
Captain Throwback
fec0c3bf53 keyboard: add num template for PIN input
Credit for the xml updates:
fordownloads (vnukov.d03@gmail.com)
MrYacha (yacha@orangefox.tech)

Change-Id: Ie776b7de206dbeda122184052d474ebf5fbd7d68
2021-11-05 17:03:16 -04:00
Captain Throwback
f386d472d8 crypto: differentiate type for PIN
Change-Id: Ic3c384fcc5dc3c71b868a1b45040e74d729c63f0
2021-11-05 17:02:48 -04:00
bigbiff
aa8d517d9b Revert "checkpoint: check checkpoint instead of assuming"
This reverts commit c0228607f3.

Reason for revert: It seems necessary to force checkpoint.

Change-Id: I6889027538c0656b3689e008b03c1812317b22e6
2021-11-05 18:58:37 +00:00
Konsta
a39c269a22 rpi: run reboot script on reboot to system and shutdown
Change-Id: I1105fecf1b1d3dae8a96b8983844fbee1de437d5
2021-11-02 15:18:06 +02:00
Konsta
628aee4849 rpi: use usb fstab if sdcard is not present
* 2b7da52c3e

Change-Id: I2f20106817a342f73a247a53bd524c242d84283a
2021-11-02 15:18:05 +02:00
Konsta
14f1cdcfcc add support for serial console
Change-Id: Ic5054206d77f5e3903a6a917a5046374cc93a0aa
2021-11-02 15:18:05 +02:00
Konsta
3e011f0984 fix dalvik button placement
Change-Id: I25fbee89f94227f01927b55a5d0c9ad738ce3cfd
2021-11-02 15:18:05 +02:00
nailyk-fr
e6b2d9fa71 add an option to exclude the TWRP app
* Allow device maintainer to exclude the twrp app and disable
   the installation prompt. Mostly the app is useless for
   every unofficially supported devices.

 * BoardConfig flag: 'TW_EXCLUDE_TWRPAPP := true'

Original commit: https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/27694/

Change-Id: I0aa1fb2ebe03ceb19c766178544039a82497cdd4
2021-11-02 15:18:05 +02:00
bigbiff
c0228607f3 checkpoint: check checkpoint instead of assuming
Change-Id: I51ea28759b85db5192117420685774147550947b
2021-11-01 22:22:21 +00:00
Captain Throwback
3d0a644462 sepolicy: update for exfat-fuse
Change-Id: I5226d22c8b23faffeb70f56483c45d1a4ec72039
2021-10-27 12:40:17 -04:00
bigbiff
b5a20a8d00 apex: cleanup apex directory bind mount names
Change-Id: Ia120ed12f3ae551044907dfd1fd05444be78d18c
2021-10-23 14:27:55 -04:00
bigbiff
b9655640f7 postinstall: allow twrp to run postinstall scripts
Change-Id: I9b2ff1b94611bf08e53a5cc452872eb3942dd160
2021-10-23 13:33:51 -04:00
bigbiff
83298f5375 custom theme: fix libziparchive loading of custom themes
Change-Id: Ia23a9dcd24fcbb61cb5e1df366a4325d20d777b2
2021-10-22 21:19:28 +00:00
bigbiff
850fa28798 kernel loader: don't try to reload modules already loaded by init
Change-Id: I58fb2ee369bdb9f5c5f9e6c8ea3f15781ae60ece
2021-10-20 01:26:14 +00:00
bigbiff
e6d833aeb3 libmodprobe: globally link libmodprobe for loading kernel modules
Change-Id: Id3b99c118667279aa7806a5a5989745386b6a5b6
2021-10-18 12:23:38 +00:00
bigbiff
5bfe1df57e fscrypt: print debug message for FSCRYPT v1 devices
Change-Id: I26b8681272c1083e3c484e32a6b74a17f1c1f821
2021-10-17 19:11:16 +00:00
Captain Throwback
4b9a9298ae gui: allow MTP even if media storage isn't present
Change-Id: I6766f804fa7f116ddc436d566d9647206b0d2e69
2021-10-17 15:08:29 -04:00
Captain Throwback
32a17d528b sepolicy: add vendor_init to clear avc denials
Change-Id: I12bb691c9796a7c2e4b755af8140cad150fa7b90
2021-10-16 20:33:42 +00:00
bigbiff
ab76bd7324 vab: correct default properties when vab is enabled
- do not show vab options in advanced
- do not perform merges when vab is disabled

Change-Id: I20997eca515600cb07fe896305b861ee9418c326
2021-10-16 16:29:46 +00:00
Captain Throwback
692a9e14d8 init.rc: add /dev/fscklogs for fs_mgr support
Change-Id: I6d00c45d94b732f60fd13343c2730f2ea924155e
2021-10-14 13:23:42 -04:00
bigbiff
b640d972a6 readonly: fix condition showing readonly checkbox
Non dynamic partition devices need this if accidentally
turned off.

Change-Id: I0a212a8fc6446dfa6d82cf1103f4e4e80e680f89
2021-10-13 17:35:31 +00:00
Captain Throwback
37c3aef4e8 crypto: only set crypto state and type if not already set
Move setting crypto state and type to functions and call those
functions rather than arbitrarily setting those props in every
case. This cleans up all the log spam from trying to set
read-only props, since they will now only get set if
they aren't already.

Change-Id: I392bee060d71c6ee50d0d92bf1b118d9049be41a
2021-10-06 22:27:49 +00:00
Captain Throwback
8a8e56cd60 crypto: only show FBE error if device is encrypted
Change-Id: I60da4ff71a15e5bc4e13135abf268bff1c88b8d1
2021-10-06 22:02:32 +00:00
bigbiff
616276167d digest: fix checking of digest on restore
Change-Id: I40ec9848248b9cc62919535c5493090d80cd732a
2021-10-06 17:04:06 -04:00
micky387
2596960451 recovery: Allow kernel to read and write unlabeled files
10-04 09:32:55.504   626   626 W kworker/6:3: type=1400 audit(0.0:1498): avc: denied { read } for name="bat_health" dev="sde50" ino=13 scontext=u:r:kernel:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
10-04 10:34:15.124   397   397 W kworker/6:1: type=1400 audit(0.0:1494): avc: denied { open } for path="/batinfo/bat_health" dev="sde50" ino=13 scontext=u:r:kernel:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0
10-04 10:36:49.484   399   399 W kworker/6:2: type=1400 audit(0.0:1366): avc: denied { write } for name="Batpercentage" dev="sde50" ino=15 scontext=u:r:kernel:s0 tcontext=u:object_r:unlabeled:s0 tclass=file permissive=0

Change-Id: Ib22560ca9149b729529797b004bcb2ee4879c317
2021-10-05 23:16:32 +00:00