Commit Graph

10844 Commits

Author SHA1 Message Date
Ian Macdonald
e772c3d9ac Strip strings containing '--' before conversion to XML comments.
Otherwise, the script bombs out when it tries to write the illegal XML.

Change-Id: Iaf0e9f6c82a57886ff56cdd4d1fc1c402776b29b
2021-03-03 20:05:23 -05:00
DarthJabba9
fba0cee8ed bash: add to TWRP
Change-Id: Ie1826df01ad5fe2480e96d56b2c4fd1c91449cc2
2021-03-03 20:05:14 -05:00
epicX
11e90832d3 Fixes for Add support to change TWRP Folder
Change-Id: I66a66cc6b952c1aae45c50a8f40c00febce69462
2021-03-03 20:05:05 -05:00
epicX
a721f955f7 Add support to change TWRP Folder
Change-Id: Id3b3b46d492bf83d1d9d3f535c880ea9d15b4107
2021-03-03 20:04:57 -05:00
Captain Throwback
89b56a1c97 Remove duplicate Update_System_Details() function calls
Only run Update_System_Details on boot after decryption is
complete, if device is unencrypted, or if decryption prompt
is cancelled.

This significantly decreases the delay in reaching the
decryption prompt on devices with large used storage
capacity

Use refreshsizes action to update system details when
Cancel button is pressed at decryption prompt

Change-Id: I9e436b1c57664a5269f42dc1cda4f6097f7e3062
2021-03-03 20:04:48 -05:00
nebrassy
05b5405fed fixup including magiskboot and resetprop
Change-Id: I90ceb5d678bafb0679329f27f711d1732a1ae69d
2021-03-03 20:04:38 -05:00
Captain Throwback
16dd81b500 nano: Add File Manager option to edit selected file
Change-Id: Ie7d940545569e6de976d2a51666b692f3fc23798
2021-03-03 20:00:51 -05:00
nebrassy
5078965777 Include nano in TWRP by default
Use 'TW_EXCLUDE_NANO := true' to exclude from build

Will be excluded by default if 'TW_OEM_BUILD := true' is set

Change-Id: I812399ef9f3f5d3c7d4baf981924d49255c16e5a
2021-03-03 19:39:45 -05:00
Mohd Faraz
77bbeb0080 Added Support for terminal from filemanager
* Now We can open terminal from current directory in filemanager

Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
Change-Id: I6df9ee1222c1fa24105da1002abe3c180be2ded1
Signed-off-by: AndroiableDroid <mohd.faraz.abc@gmail.com>
2021-03-03 19:39:35 -05:00
bigbiff
0e97f7e73a apex: fix selinux denials
We also look to use the loop-control device to identify loop devices.
We only create devices if they don't exist. Modern kernels can have
an option CONFIG_BLK_DEV_LOOP_MIN_COUNT=16 to pre-create the devices.

Change-Id: Ib10cd29f17be4684dd75e0927a2862bf541cd661
2021-02-27 15:14:36 +00:00
bigbiff
908ef5d77f set_metadata: cleanup extra version and add file to error output
Change-Id: Id15b243c7b25af12983afd59d09456671f6030fa
2021-02-25 16:58:03 +00:00
bigbiff
eaac762814 unzip: android 11 moved unzip to a symlink to ziptool
Change-Id: Ibe23f0c62835a1e34c192feb56843cc038d9b670
2021-02-21 19:23:00 +00:00
bigbiff
c40dc1f9d8 apex: add errno reporting for mount
Change-Id: Ic6db027b5b898332bf2c86c714adabb73acc7b1e
2021-02-21 18:37:14 +00:00
bigbiff
4a60bee82e android root: restore context for android system root
In this patchset we will store and reset the android system
root context after a wipe and restore to prevent issues
with no context labels in the file_contexts being applied.
This will prevent no boot issues in android with selinux
denials on the system root partition.

Change-Id: I87fd3a6060fbaa3e7bdfd7a4b1d09feeb4fa3f27
(cherry picked from commit 35d2bfda3c89ebd212a9bd2328bffd7464f95d47)
2021-02-15 12:29:48 -05:00
Ian Macdonald
e7c34e5715 Include common names for Magisk app in list of flashable zip files.
We introduce a new XML element prfxfilter for file name prefix
filtering, e.g. Magisk- .

The file is first matched against the list of extensions and, if there's
no match, then matched against the list of prefixes. An extension or
prefix may be equal to the whole filename.

Change-Id: I46a985c7298799793911948bc74296bebb306d9e
2021-02-15 12:29:38 -05:00
Peter Cai
d68e6413e5 partition: add support dm_use_original_path
* On some mediatek devices we must use symlinked path instead of the
      real block device.  Needed for decryption on some MTK HW FDE devices.

Change-Id: Ib48d745fd442c590aea2baf6d2dbe20aaaef9eec
2021-02-15 12:29:27 -05:00
Peter Cai
439d60cb9d partitionmanager: support delayed adopted storage mount
* On some devices, the external mmc driver will only load the card after
  a certain delay. The original code will break and fail to mount any
  adopted storage in this case.

* Add a special fstab flag to allow the partitionmanager to retry after
  a delay.

Change-Id: I219978850ff3ba7ad9dc7ca96fc30634c9574164
2021-02-15 12:29:19 -05:00
Peter Cai
8d7d4aed04 cryptfs: add support for keymaster 2
Change-Id: I1c4f06551897c8964ac2d40c9e785d527cc83847
2021-02-15 12:29:07 -05:00
Captain Throwback
6443cefc69 tzdata: add to TWRP build automatically
Fixes "__bionic_open_tzdata" errors in recovery log

Use "TW_EXCLUDE_TZDATA := true" flag to exclude from build
if needed for space reasons. Will automatically be excluded
is "TW_OEM_BUILD := true" flag is present

Change-Id: I2f4a0f3a354a32c2f4f9733b3e88beedc4773020
2021-02-15 12:29:00 -05:00
Adrian DC
b206c132c6 ors: Refresh the system details after sideload and wipe system
* Thus resolve the 'No OS installed' warnings upon system reboot
   if only adb shell twrp actions were used on the device

Change-Id: Id4fd915ce25cef8a2fdef6fda1750ca1b3ed13b7
(cherry picked from commit 0c6a6266fba8960f1b96a08c837ac61f2b7f9310)
2021-02-15 12:28:52 -05:00
Captain Throwback
7f398f755b twrpapp: actually include in build
Change-Id: Ie0434cc66af416c1ff4dd43d07ddf606095dc34b
2021-02-15 12:28:24 -05:00
AndroiableDroid
136acfe8d2 print sideload flashing info in console
Signed-off-by: AndroiableDroid <androiabledroid@gmail.com>
Change-Id: Ife60c1d3582eb296495451907e259c1ad1c9cb2a
2021-02-15 12:27:18 -05:00
epicX
271bb3a17c reduced the checkforapp function call to reduce unwanted log info
Change-Id: I79ef116989f68333292d3518dcb3ea08be98b8ef
2021-02-15 12:27:11 -05:00
Captain Throwback
acc7f0f873 wrappedkey: only run check on FBE devices
Change-Id: I3713fc4619279d8ee2de924df2bc4fbde944d834
2021-02-15 12:27:03 -05:00
Captain Throwback
b5af4f80d0 fbe: move key directory logging within key directory check
Change-Id: I9d1a50ab0fb8b9bbb2e0686c6ffe28b4b22634b4
2021-02-15 12:26:54 -05:00
Captain Throwback
dbc37b7a4c wrappedkey: set prop for metadata partition if flag is present
Change-Id: I0da59e81993a119d198dbfc350b7fca0e1cb3c5c
2021-02-15 12:26:46 -05:00
bigbiff
15a6938f8b twrp release: 3.5.0 Android 10 release
Change-Id: Icb6a026533c4181a97c0de955a4393bd1377e549
2021-02-15 12:26:33 -05:00
Captain Throwback
6321bc35a2 gui: fix listbox on reboot page in landscape theme
Change-Id: I65b7b3476235d49ec0cfa289b23be9bc65f7dfb5
2021-02-15 12:26:25 -05:00
f2065
7b127b876b Updated Russian localization
Change-Id: I803c6b90f5e011ab2c3ebf906736b9914f488a55
(cherry picked from commit e931e74a9dd6e24c5c243d545d2fcf3731c6d6f5)
2021-02-15 12:26:17 -05:00
Captain Throwback
31c14929e0 twrpapp: restore system mount to previous state
The current function to check for the existence of the TWRP app
in system unconditionally unmounts system once the check is
complete. Since the TWRP app check now occurs more frequently since
change 70e0a397e00c605cf7b01a5f5ce027dea84f1a14, system is now
getting unmounted every time the Advanced menu is entered, which
is undesirable if it was mounted in order to perform tasks from that
menu.

This patch first checks the state of the system mount point, and
once the check is complete, either unmounts system or leaves it
mounted, based on the initial state.

Change-Id: I7ad1f3e4e6cf3579134f1a9c5468ad90a142feae
2021-02-15 12:26:09 -05:00
Ethan Yonker
8581ab3df8 Remove TWRP app prompt from reboot flow
Add option to install TWRP app as a list menu item on the
advanced page and as a button on the reboot page (except for
watch theme). Now when a user reboots the device, they no longer
will be prompted to install the TWRP app, which interrupts the
flow of rebooting the device.

Change-Id: I00559d0be6e7d0b00d469a5960e4b14e32a3fc5f
2021-02-15 12:25:56 -05:00
nebrassy
57f210d409 also set crypto state for non-metadata FBE
Change-Id: I586878cc6134d798b1d087415cb694d6738f279a
2021-02-15 12:25:47 -05:00
althafvly
003401cb6a relink: copy relink_libraries for every arch
Change-Id: I51a4318fb2a825d8e3c0fd82f4b2d26f3780ab38
2021-02-15 12:25:37 -05:00
Alexander Sulfrian
8dfcf2a186 Update lock pattern types for android 11
The stored id for the different types of the lock pattern was chnaged
with Android 11. You can find the updated list in the LockPatternUtils:

    https://android.googlesource.com/platform/frameworks/base/+/refs/tags/android-11.0.0_r25/core/java/com/android/internal/widget/LockPatternUtils.java#113

It was changed in 5e891bcc04556a3595ab349381acc2a2e36a69d1:

    5e891bcc04

The old CREDENTIAL_TYPE_PASSWORD_OR_PIN was essentialy split in
CREDENTIAL_TYPE_PASSWORD and CREDENTIAL_TYPE_PASSWORD_OR_PIN.

This code updates the matching in twrp, so that the correct unlocking
method for file base decryption can be found. Without these changes twrp
always try to use the default password and obviously fails. With these
changes the usual password dialog is shown and the decryption is
successfully.

Change-Id: Ia8d47223b30a5301d4b9d2230241039612055ebb
Signed-off-by: Alexander Sulfrian <asulfrian@zedat.fu-berlin.de>
Co-authored-by: althafvly <althafvly@gmail.com>
2021-02-15 12:25:16 -05:00
bigbiff
af253cd0ef debug: remove unneeded debug message
Change-Id: I271e7fca0e3786fe90d324d2d1ccba9fa6394b9f
2021-02-15 12:25:08 -05:00
bigbiff
401f8214a6 debug: remove unneeded debug statement
Change-Id: Ic51bdcdfd61401c34c5a7bd18ddd64c33bc9926a
2021-02-15 12:24:58 -05:00
Captain Throwback
a0a75f2f98 variables: add branch to TWRP version number
Since the 9.0 and 10.0 TWRP branches have diverged due to adding
dynamic partition support, this will make it easier to understand
which branch of TWRP is being used for the build.

Change-Id: I2712c9498c9230e9a6d2eac718bda9e82a6d14f7
2021-02-15 12:24:48 -05:00
DarthJabba9
91cd2ea291 Fix long-standing typo in the logs
Change-Id: I794ecab99d60c3b23f229b620ce811b2d00cce14
2021-02-15 12:24:39 -05:00
nebrassy
cd79c90d27 mount binderfs
Change-Id: Ic32176d1c0150031982ec3d50e9ff0e8ac4fe517
2021-01-19 09:55:04 +01:00
bigbiff
91bd7a7ff1 adb: get adb working and cleanup pixelflinger
- update recovery init.rc
- add libdl bootstrap
- cleanup libpixelflinger import
- logd and adbd permissive for now
2021-01-03 17:36:52 -05:00
bigbiff
673c7ae01e Merge tag 'android-11.0.0_r16' into android-10.0
Android 11.0.0 release 16 - twrp bringup patch
2020-12-16 19:06:18 -05:00
Captain Throwback
a9fc4f9eba Revert "dumpkey: add back to build for zip verification support"
This reverts commit 2fdec0f587.

Change-Id: I879f499034d06eb4bbb16b07d21dd9b5003d127d
2020-12-03 20:12:21 +00:00
bigbiff
7ed5106932 adb backup: fix building and relink
Change-Id: Ic65284ac2b3f4f410b3ad79288e8b39f51bcc5ee
2020-12-02 18:47:28 +00:00
bigbiff
1f9e4847ce twrpinstall: create library for twrpinstall
This library will need to mirror AOSP for any changes to installing
packages. The library has been separated out in order to make importing
updates from AOSP into the TWRP project.

twinstall.cpp has been removed from the recovery binary and added to
this library. It has been refactored for libziparchive.

Sideload has been reworked to use the newer methods from AOSP on
flashing packages through adb sideload.

We are also removing old libraries for adb and verifier.

Lastly before flashing a zip or image, we want to unlock block devices
for writing so that when an OTA is flashed to the inactive slot,
the flash will succeed.

Change-Id: I6d8702fc9031ffaf9f666b4ba375dc7d9362e473
2020-12-02 13:43:42 -05:00
Beta Soft
dff12eb230 extra-languages: update Chinese translation
To other Chinese translators:
Do not replace "…" to "...", it is incorrect in zh-CN, should be use Half-width ellipsis.
Use "槽位" instand of "分区" to translate "slot".

Change-Id: I753d9bfe9d172a64373c8809a78b667b9d75d0e3
2020-12-02 23:03:19 +08:00
whyle
f06b1658cf Enable f2fs in change filesystem
In android 10 to make f2fs, we use make_f2fs insteaf of mkfs.f2fs

Change-Id: If80ce7c122141f7e69431a8f9ca37cba27b915ed
2020-11-22 00:25:18 +01:00
whyle
33978c137b Update Chinese languages
Change-Id: I8a570f6400abcd3448a64c00b2aeaea321d2a405
2020-11-11 23:14:28 +00:00
whyle
0234cab3a1 Add missing Chinese tanslate
Change-Id: Ifca9c7a8b5a62d913002a3b1d1bb77f432d0a303
2020-11-11 19:55:44 +00:00
Ian Macdonald
d485182c87 Clear_Bootloader_Message(): Log non-fatal errors at level INFO.
This fixes a cosmetic issue on Samsung devices, namely that
Clear_Bootloader_Message() returns an error reading the fstab, which
actually doesn't matter, because the fstab has already been read and
parsed by the time Clear_Bootloader_Message() is called.

Change-Id: I35e508f24d81f66bdaa56006cece9082178c0ba9
2020-11-11 19:12:21 +00:00
Ian Macdonald
eb4d8b8818 Remove superfluous messages from the log.
These are already sent to the log when the functions return.

Change-Id: I839b64f6b2e63f62e11f6a40eaf7fedd48c293d8
2020-11-11 19:08:18 +00:00