Commit Graph

154 Commits

Author SHA1 Message Date
bigbiff
437b93a087 Merge remote-tracking branch 'origin/android-9.0' into android-10.0
Change-Id: Ie850f431f0d2c39c86b9c10701676a24770ab447
2020-05-10 20:06:41 -04:00
Chaosmaster
461e39fe89 Add TWFunc::Property_Override(name, value) to override properties
using libresetprop

Change-Id: Ic49e187698c714f8a629d20ceddc40e823555477
2020-05-10 17:17:56 -04:00
mauronofrio
76ef9f3c04 Create a flag to include resetprop in the TWRP
The flag is:
TW_INCLUDE_RESETPROP := true

Change-Id: I4d4d25a6d5bbd2330efd7f184d0f878a8cf0346e
2020-04-30 16:42:03 +08:00
bigbiff
973167aff3 ramdisk: move uevent link that build creates
Add missing init.rc files for recovery.
Cleanup init symbolic links.
Comment out removing the source file in relink.sh because we need
to retain files in /system in the ramdisk.
Change-Id: Ie959024296738538f3b3161e38027a44525b0696

Change-Id: I5b1a744414b88a9a15c56bd81f37091664d5cdf1
2020-04-09 16:47:23 -04:00
bigbiff
4721a5a1a3 unzip: relink unzip binary from system/bin
Change-Id: I69a8c86c3c817f0a539be53a52f33b8bb6813fdf
2020-04-05 10:32:40 -04:00
bigbiff
36f088ac7c adbd: relink sh properly
Change-Id: Ifb4eba0cded949db66a9d3b77bb185828425d197
2020-04-04 19:58:19 -04:00
bigbiff
63d7add7cf logd: make logd run and relink logcat
Change-Id: I5a2984ea2649bebd923d42e6b984856b36b18fbd
2020-03-31 18:00:59 -04:00
mauronofrio
cb163e0b14 Relink update_engine_sideload
Change-Id: Ifb95d94a5804f0d490bc8c2c19cab7b03c8f1432
2020-03-30 16:46:35 +02:00
bigbiff
416fe3a18a toybox: deprecate busybox and toolbox utils
Starting with android-10.0 we should only use tools from toybox.
Toyxbox in android-10.0 is specified as a recovery target, so
we just move the symlinks in our relink target.

Change-Id: Ic0116a7d583519b39422ac4d82d30e00918eb29d
2020-03-28 14:13:43 -04:00
theimpulson
d95dcd207c bootable: Move to optional tags everywhere
FAILED:
bootable/recovery/etc/Android.mk: error: init.recovery.ldconfig.rc: LOCAL_MODULE_TAGS := eng is obsolete. See https://android.googlesource.com/platform/build/+/master/Changes.md#LOCAL_MODULE_TAGS
build/make/core/base_rules.mk:171: error: done.
18:29:38 ckati failed with: exit status 1

Change-Id: I056f019aa3249c185b808140bcef45a4777d21b3
Signed-off-by: theimpulson <aayushgupta219@gmail.com>
2020-03-23 15:09:31 -04:00
bigbiff
d58ba18272 AOSP10 TWRP Merge: fix conflicts and update libraries needed
This allows flame to boot TWRP. Still will need to work on
super partition for vendor and system access.

The plan will be to cherry-pick any updates to android-9.0
through gerrit.twrp.me to this branch as a WIP.
2020-03-23 11:18:29 -04:00
Captain Throwback
8d70eb617e ldconfig: add /sbin to search.paths
- Move commands from prebuilt to root Android.mk
- Hotfix for linker errors after https://git.io/JerWD merge
  on some Samsung device(s)

Change-Id: If628ab486689878885b696c2f5a107987092aeba
2019-11-14 11:14:06 -05:00
Captain Throwback
170964d5bb Add ld.config.txt for Android 8.x+ trees
- Fixes the ld.config.txt errors in recovery log which may prevent
  decryption and shell commands from working properly

Change-Id: I0e057525cdda39e8ac10115d37e2cb882b9c4844
2019-10-21 19:46:30 -04:00
Andreas Schneider
b0a0dbbab0 prebuilt: Add android.hardware.confirmationui@1.0 for /sbin/keystore
Change-Id: I62e68c137e9790392dd2fc44c2add990c2f408d6
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
2019-07-04 00:39:02 +02:00
big biff
117c64785b Merge "NTFS-3G: use newer libfuse-light in pie." into android-9.0 2019-05-09 01:48:45 +02:00
bigbiff bigbiff
52f868b5d9 NTFS-3G: use newer libfuse-light in pie.
Change-Id: I66dc38a19524f1eaac8cc5afc1110c5d11fc74eb
2019-05-05 16:13:08 -04:00
bigbiff bigbiff
6af36a4f37 bsd dd: include prebuilt bsd dd in twrp for Nougat and greater
- Cleaned up toolbox/Android.mk so that BSD dd builds
  with correct Android versions

Change-Id: Idb15811480ec03b05336d54b866233b5ac99dfaf
2019-05-04 19:55:16 -04:00
big biff
5f177ae4c7 Merge "awk: add awk for trees including one-true-awk" into android-9.0 2019-05-03 02:16:29 +02:00
big biff
a525f3bc79 Merge "mkshrc: remove post-install cmd and use LOCAL_MODULE_STEM" into android-9.0 2019-05-03 02:09:53 +02:00
Captain Throwback
93804dd50e awk: add awk for trees including one-true-awk
Change-Id: I5458a3ecc69b60cc249f598b0250428fc414f34b
2019-04-30 16:38:49 -04:00
Captain Throwback
bb016729b1 mkshrc: remove post-install cmd and use LOCAL_MODULE_STEM
Change-Id: I2e0c7fda8cb39dd2a607f7ab2fdfe744e75fb3cd
2019-04-29 17:46:41 -04:00
Captain Throwback
3c565b568d Use BSD grep for builds with toybox
- Include symlinks for egrep and fgrep

Change-Id: I78e27f95efa143fa63def02c9e72af567833aefe
2019-04-29 17:44:24 -04:00
Ethan Yonker
53796e7333 Use magiskboot to repack the boot partition
Set TW_INCLUDE_REPACKTOOLS := true

Must also have:
AB_OTA_UPDATER := true

Use magiskboot and provide GUI options to allow users to repack
their existing boot image to install TWRP (or kernels) so we can
stop having to provide installation zips for AB devices. There is
also an option to try to fix a recovery bootloop if the kernel
has been patched to always boot the ramdisk for root, etc.

You will need to pull the below repo into external/magisk-prebuilt
https://github.com/TeamWin/external_magisk-prebuilt

Change-Id: I74196cc6f095a7576d61886dc96cbc18deba9b04
2019-04-03 16:44:00 -05:00
Michael Bestas
9bb7c225a4 Don't copy local mke2fs.conf for O-MR1
* It is now copied from system/extras/ext4_utils

Change-Id: Ibddcad4928c17bc174390d75708a5382a9262441
2019-03-23 14:39:53 +02:00
Simon Shi
e682598480 prebuilt: Support ubsan libraries of all architectures
According to the file under './prebuilts/clang/host/linux-x86/clang-4691093/lib64/clang/6.0.2/lib/linux/*.so', these files are supported under different target architectures. This commit would add support to every architecture.

Change-Id: I1f88bc06c3f30e6d2f2083ba9b6350b2376d83f2
2019-03-22 16:33:47 -05:00
dianlujitao
4879b37b5d Fix the long broken format function
* For EXT2/3:
   * Align mke2fs options with Android 9.0 fs_mgr_format.cpp.
 * For EXT4:
   * Note that make_ext4fs is still in use on Android 8.1 to workaround
     a FDE encryption bug even though mke2fs has become the default
     choice. The bug is fixed in Android 9.0+.
 * For F2FS:
   * Drop the broken "-r" option, it's never ported to O, explicitly
     pass number of sectors instead.
   * Keep all options aligned with Pie fs_mgr.
   * Check existence before start wiping, as Wipe_EXT4 does.
 * For all:
   * Calculate block size at runtime, and reserve the space specified
     via negative "length" option from fstab. Note that positive length
     will be ignored.
   * If the partition has crypto footer, and "length" is not specified
     in fstab, automatically reverse CRYPT_FOOTER_OFFSET (16384).
   * Remove the default crypto key location: footer, this is a bad
     assumption since most partitions don't use encryption! We need to
     know the real situation to decide whether to reserve crypto footer
     on format.
   * If the current action is "wipe" or "change filesystem", wipe crypto
     footer or block device after mkfs if the partition is
     unencrypted or undecrypted (e.g., wrong password).
   * If the current action is "format data", unconditionally wipe crypto
     footer or block device.

Change-Id: I7304a8ee703131ea4a08ab7c60334af28cac28b3
2019-03-21 16:15:52 -05:00
Dees Troy
908442dfb5 Merge "Update FDE decrypt to pie from CAF" into android-9.0 2019-03-20 21:40:44 +01:00
Ethan Yonker
98661c1a29 Update FDE decrypt to pie from CAF
cryptfs.cpp based on CAF tag LA.UM.7.3.r1-05900-sdm845.0
Used CAF because AOSP no longer contains code for qcom's hardware
crypto.

Change-Id: I921cbe9bed70989f91449e23b5ac3ec1037b7b97
2019-03-20 15:33:48 -05:00
bigbiff bigbiff
af32bb9c4f MTP FFS updates:
This update splits old MTP code and new MTP code from Google
into two trees, legacy and ffs. Depending on the SDK level,
the build system will select the correct version. The reason
for separating the versions out are due to older android trees
not supporting the updated MTP code from Google.

Most MTP code is from Google, with additions needed from
implementing the Java functions in C++ for TWRP and FFS.

We assume if you are in android-9.0 or above, your kernel
has support for FFS over MTP. Verify that your init.rc
is mounting the MTP FFS driver to the proper location.

Change-Id: I4b107b239bd9bc5699527f9c8c77d9079f264a7e
2019-03-20 14:28:21 -05:00
lambdadroid
eff335d850 prebuilt: Avoid re-linking ARM64 specific library on other architectures
libclang_rt.ubsan_standalone-aarch64-android.so is a library for
arm64 and is therefore not available on other architectures, causing
the build to fail because there is no rule to build it.

Change-Id: Ia4af38f42ba46a233d40e936d43e4c97c449d059
2019-03-18 18:17:16 +01:00
Dees Troy
5f8394ca88 Merge "slot management: add library for slot management." into android-9.0 2019-03-17 16:09:56 +01:00
big biff
7812dd49e1 Merge "vold_decrypt: Add android 9.0 support" into android-9.0 2019-03-08 00:52:21 +01:00
Captain Throwback
5ab596451a mksh: add mkshrc when using TW_USE_TOOLBOX
Fixes broken shell prompt in Terminal and adb shell

Before: https://del.dog/7vphlkc
After: https://del.dog/vhkjgo8

Add as prebuilt with suffix "_twrp" to avoid conflict
with original mkshrc and rename via POST_INSTALL_CMD

Prebuilt version adjusts TMPDIR variable from
"/data/local/tmp" to "/tmp" for TWRP

Change-Id: I42a1b2a8c114f66dbe659c07485f1dfae8a5d314
2019-03-07 18:34:15 +01:00
bigbiff bigbiff
c630cee1ae slot management: add library for slot management.
Change-Id: I7d0a67bc8e237866485680a5c54443435e7d2737
2019-02-20 18:06:55 -05:00
nijel8
2c821a8c0a vold_decrypt: Add android 9.0 support
* build modified vdc_pie binary with 'checkpw' command support
  if building with Android 9.0 platform. That command and others
  we don't care about, are removed from Pie vdc. Our vdc_pie will
  run if system sdk version is > 27, otherwise system vdc is used.
  Code adapted from Android 9.0 system/vold/vdc.

* include prebuilt vdc_pie(arm, arm64) binary if building with lower
  than Android 9.0 platform - vdc_pie cannot be build from source
  with those platforms without additional imports from Android 9.0

* skip vdc "getpwtype" command for Pie - vds communicates with vold
  directly, no need for connection retries first

* add /system/bin/servicemanager to required services

* mount per-devive additional partitions needed for decryption
  listed with device BoardConfig.mk TW_CRYPTO_SYSTEM_VOLD_MOUNT
  flag like(space separated):
  TW_CRYPTO_SYSTEM_VOLD_MOUNT := vendor cust odm

* add function to backup crypto footer before running vdc commands
  and restore it after - on Xiaomi Mi Max 3 both Oreo and Pie stock
  roms vold alters cripto footer when decrypting data in recovery
  which causes system to ask for crypto password at next reboot
  although password stays unchanged. Crypto footer backup/restore
  added as workaround for systems whit ro.build.version.sdk > 25.
  Also to preserve crypto footer integrity decryption attempts are
  skipped if footer backup fails to ensure no data loss.
  Code adapted from
  https://gerrit.omnirom.org/#/c/android_bootable_recovery/+/31206/

Change-Id: I0a383f3843578fa55595cfea3b7c9c4431646a1a
2019-02-01 21:36:23 -05:00
Ethan Yonker
933828251d Add metadata decrypt support for FBE
Change-Id: Ie0292f4ffea5993a4ae74fa04fc5c8252ca2cfcf
2019-01-17 14:14:59 -06:00
big biff
635874da21 Merge "Include weaver library in 9.0 trees" into android-9.0 2019-01-06 19:30:20 +01:00
Vladimir Oltean
4780286346 prebuilt: resolve libext2_misc.so dependency for mke2fs
* Following error while running mke2fs in TWRP compiled in 8.1+ tree:
   libc: CANNOT LINK EXECUTABLE "mke2fs": library "libext2_misc.so" not found

Change-Id: I786f325229167dbd0d1d5f2a1ea95e9fe15a227e
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
2018-12-23 05:57:20 +01:00
Ethan Yonker
6b3bdfd6fa Include weaver library in 9.0 trees
Change-Id: I0e05e29b43c748d7746dc70428a4eb7664b7d2d4
2018-12-21 11:54:57 -06:00
Ethan Yonker
e9afc3de0f Decrypt FBE on 9.0 (backwards compatible)
Building in 9.0 may require you to add a flag to your twrp fstab
with the fileencryption details like:
fileencryption=ice:aes-256-heh

Verify this against your device's stock fstab of course.

Change-Id: If9286f5d5787280814daca9fbc8f5191ff26a839
2018-08-31 10:37:08 -05:00
Ethan Yonker
58f2132bc3 Merge AOSP android-9.0.0_r3
Fix conflicts and make it build in 5.1, 6.0, 7.1, 8.1, and 9.0

Change-Id: Ida0a64c29ff27d339b7f42a18d820930964ac6e4
2018-08-24 11:17:39 -05:00
Ethan Yonker
fa67cbf18b Remove SuperSU
Change-Id: I2ca7580bbde5a8903b9ba5c1513ddba887e8d49e
2018-07-20 13:45:16 -05:00
nkk71
35764fdce6 Relink adbd needed in android 8.1
* adbd no longer goes to root/sbin instead it's
  going to system/bin reference:
  93defc17f3

Change-Id: Ib2bc5e0bb3ac868741fa3feacac5ef68aa1daa4b
2017-12-19 12:39:08 +02:00
Ethan Yonker
aac05c2f07 Fix android.hidle.base@1.0 rule for various 8.0 trees
Change-Id: I57a1a807841b20860c9a1c9523be385b12b6b933
2017-12-12 07:04:05 -06:00
nkk71
a2341b0caa Fix stuck on 'black' screen entering recovery
* In omni-8.0 'android.hidl.base@1.0.so', although properly built
  does not get copied to the /sbin/ directory for TWRP, resulting
  in TWRP constantly *trying* to restart with the missing lib:
    CANNOT LINK EXECUTABLE "/sbin/recovery":
    library "android.hidl.base@1.0.so" not found
  Leading to a stuck on "black" screen (or some splash screen, but
  never even reaching TWRP splash screen).

Change-Id: I10a3c3d72c0f141687dbbf552e59fb31c015b278
2017-12-04 01:52:08 +02:00
Ethan Yonker
31344a3b2f Better compatibility across 8.0.0 trees
Change-Id: Ic8200da4e99826736e002a1ab5f9e5f967e84193
2017-11-29 13:23:50 -06:00
Ethan Yonker
fefe5915b0 FBE for Pixel 2
Includes various minor fixes for building in Android 8 trees with r23+ tag

Update FBE extended header in libtar to version 2 and include the entire
ext4_encryption_policy structure now after translating the policy.

See this post for more details:
https://plus.google.com/u/1/+DeesTroy/posts/i33ygUi7tiu

Change-Id: I2af981e51f459b17fcd895fb8c2d3f6c8200e24b
2017-11-28 16:03:41 -06:00
Ethan Yonker
dcd9f3f384 Fix issues building with LineageOS cryptfs_hw
Change-Id: Ie22691433aefa3b8819ec14e0349ee12bd88a1c2
2017-11-28 14:53:49 +01:00
nkk71
04ec095226 Fix mkfs.f2fs build error
* OmniROM 8.0 uses AOSP f2fs-tools which builds a static
  mkfs.f2fs directly to $(TARGET_RECOVERY_ROOT_OUT)/sbin

Change-Id: I364a13e33e71abceab2f9ba1bd3179c2d9672b27
2017-11-17 18:13:00 +01:00
Ethan Yonker
d9918b7c38 Fix a few build errors
Change-Id: I1311e4f9bb2409e856df3d333cc0d6c3f8f097f8
2017-09-15 08:17:42 -05:00