Commit Graph

10964 Commits

Author SHA1 Message Date
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
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
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
Captain Throwback
63573b550f mtp: don't create storage device after format data
Since we don't re-create data/media on FBE devices,
don't create an MTP storage device for it.

This fixes the bug when, after formatting data on
and FBE device, an empty Internal Storage appears
on the PC.

This also prevents an empty storage device from
being created if recovery is rebooted after formatting
data before booting to Android. A warning will appear
in the console that MTP is disabled in that case.

Currently the path is hardcoded to data/media; this
should probably be adjusted for cases where adoptable
storage is being used.

Change-Id: Iaafc5e3cde54c3ef6ffaf33f76d14c626b6e590d
2021-10-05 22:53:07 +00:00
Captain Throwback
210ebe3d46 repacker: add root overwrite warning
Change-Id: Ica03c62a04872cb0ff4705810a0e85efde0b0b54
2021-10-05 22:33:00 +00:00
bigbiff
d21252f1b5 merges: allow user to perform snapshot merges in advanced menu
Change-Id: I894a0ef5a0ec8e208053358f09a6b8a6d4ee408a
2021-10-05 22:32:19 +00:00
bigbiff
543a928359 default fstab: only read the fstab if it hasn't been read yet
Change-Id: I0d8d5cdda4da5486f51a80772f9d581bf549138c
2021-10-03 16:58:45 +00:00
bigbiff
cefb0de23f fscrypt policy: don't bail restore if we cannot lookup policy
When TWRP is unable to lookup a fscrypt policy, we should not bail
the entire restore. Let's note that we had an issue with the lookup
in the log and continue restoring.

Change-Id: Ida80458356c12f81ff47f583beb05dd392486a0d
2021-10-02 13:52:26 +00:00
bigbiff
d04f8e0078 libmodprobe: move include to global includes
Change-Id: I288ce0dcd22d5a5a5badd2a98460cec027010eac
2021-10-02 13:47:29 +00:00
bigbiff
13017c6e35 version: don't show as error if we cannot write the version string
Change-Id: I0f90337b22f1c3392eb5bc7b846d60df82a4af8b
2021-10-01 22:35:58 +00:00
Captain Throwback
8f71b5a7ec en.xml: fix capitalization
Change-Id: Ib67db5eb0ab7cf2b54622d69299edbb2e216a210
2021-10-01 18:23:41 -04:00
bigbiff
e3aa02ea25 module_load: stop once all modules are loaded
This patch set was inadvertently removed when
the original patch was merged

Change-Id: I109882c9138524b9b912ed2a933e2e30c218d371
2021-10-01 13:53:22 -04:00
bigbiff
22851b9476 module load: attempt to load modules from /vendor
Use TW_LOAD_VENDOR_MODULES := "module1.ko module2.ko modulen.ko"
in BoardConfig to have TWRP attempt to load kernel modules during
startup. For fastboot ramdisks, TWRP will attempt to load from
the ramdisk from /vendor/lib/modules. You can have the build
system copy the modules to
$(TARGET_RECOVERY_ROOT_OUT)/vendor/lib/modules/1.1
Otherwise in recovery in boot mode, TWRP will attempt the following:
check /lib/modules (ramdisk vendor_boot)
check /lib/modules/N.N (ramdisk vendor_boot)
check /lib/modules/N.N-gki (ramdisk vendor_boot)
check /vendor/lib/modules (ramdisk)
check /vendor/lib/modules/1.1 (ramdisk prebuilt modules)
check /vendor/lib/modules/N.N (vendor mounted)
check /vendor/lib/modules/N.N-gki (vendor mounted)

Change-Id: I2dccf199e37d47cb7a7e79b0e11026d67b4e3186
2021-09-29 20:46:19 +00:00