mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-11-24 02:25:28 +00:00
Remove old unused code
This commit is contained in:
parent
c91c070343
commit
bb303d2da1
@ -73,7 +73,6 @@ void magisk_cpio::patch() {
|
|||||||
#define MAGISK_PATCHED (1 << 0)
|
#define MAGISK_PATCHED (1 << 0)
|
||||||
#define UNSUPPORTED_CPIO (1 << 1)
|
#define UNSUPPORTED_CPIO (1 << 1)
|
||||||
#define COMPRESSED_CPIO (1 << 2)
|
#define COMPRESSED_CPIO (1 << 2)
|
||||||
#define TWO_STAGE_INIT (1 << 3)
|
|
||||||
|
|
||||||
int magisk_cpio::test() {
|
int magisk_cpio::test() {
|
||||||
for (auto file : UNSUPPORT_LIST)
|
for (auto file : UNSUPPORT_LIST)
|
||||||
@ -87,9 +86,6 @@ int magisk_cpio::test() {
|
|||||||
decompress();
|
decompress();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (exists("apex") || exists("first_stage_ramdisk"))
|
|
||||||
flags |= TWO_STAGE_INIT;
|
|
||||||
|
|
||||||
for (auto file : MAGISK_LIST) {
|
for (auto file : MAGISK_LIST) {
|
||||||
if (exists(file)) {
|
if (exists(file)) {
|
||||||
flags |= MAGISK_PATCHED;
|
flags |= MAGISK_PATCHED;
|
||||||
|
@ -142,18 +142,13 @@ echo "RECOVERYMODE=$RECOVERYMODE" >> config
|
|||||||
"mkdir 000 .backup" \
|
"mkdir 000 .backup" \
|
||||||
"add 000 .backup/.magisk config"
|
"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
|
rm -f ramdisk.cpio.orig config
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# Binary Patches
|
# 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"
|
[ -f $dt ] && ./magiskboot dtb $dt patch && ui_print "- Patch fstab in $dt"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user