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
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
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.
- 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
- Fixes the ld.config.txt errors in recovery log which may prevent
decryption and shell commands from working properly
Change-Id: I0e057525cdda39e8ac10115d37e2cb882b9c4844
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
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
* 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
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
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
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
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
* 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
* 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>
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
* 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
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