mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-23 18:15:30 +00:00
Remove old unused code
This commit is contained in:
parent
c91c070343
commit
bb303d2da1
@ -48,8 +48,8 @@ void magisk_cpio::patch() {
|
||||
auto cur = it++;
|
||||
bool fstab = (!keepverity || !keepforceencrypt) &&
|
||||
S_ISREG(cur->second->mode) &&
|
||||
!str_starts(cur->first, ".backup") &&
|
||||
!str_contains(cur->first, "twrp") &&
|
||||
!str_starts(cur->first, ".backup") &&
|
||||
!str_contains(cur->first, "twrp") &&
|
||||
!str_contains(cur->first, "recovery") &&
|
||||
str_contains(cur->first, "fstab");
|
||||
if (!keepverity) {
|
||||
@ -73,7 +73,6 @@ void magisk_cpio::patch() {
|
||||
#define MAGISK_PATCHED (1 << 0)
|
||||
#define UNSUPPORTED_CPIO (1 << 1)
|
||||
#define COMPRESSED_CPIO (1 << 2)
|
||||
#define TWO_STAGE_INIT (1 << 3)
|
||||
|
||||
int magisk_cpio::test() {
|
||||
for (auto file : UNSUPPORT_LIST)
|
||||
@ -87,9 +86,6 @@ int magisk_cpio::test() {
|
||||
decompress();
|
||||
}
|
||||
|
||||
if (exists("apex") || exists("first_stage_ramdisk"))
|
||||
flags |= TWO_STAGE_INIT;
|
||||
|
||||
for (auto file : MAGISK_LIST) {
|
||||
if (exists(file)) {
|
||||
flags |= MAGISK_PATCHED;
|
||||
|
@ -142,18 +142,13 @@ echo "RECOVERYMODE=$RECOVERYMODE" >> config
|
||||
"mkdir 000 .backup" \
|
||||
"add 000 .backup/.magisk config"
|
||||
|
||||
if [ $((STATUS & 4)) -ne 0 ]; then
|
||||
ui_print "- Compressing ramdisk"
|
||||
./magiskboot cpio ramdisk.cpio compress
|
||||
fi
|
||||
|
||||
rm -f ramdisk.cpio.orig config
|
||||
|
||||
#################
|
||||
# Binary Patches
|
||||
#################
|
||||
|
||||
for dt in dtb kernel_dtb extra recovery_dtbo; do
|
||||
for dt in dtb kernel_dtb extra; do
|
||||
[ -f $dt ] && ./magiskboot dtb $dt patch && ui_print "- Patch fstab in $dt"
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user