0

I want magisk & viper to be flashed in my aosp built. I want it to happen in 1 zip. Like after flashing of rom magisk should be flashed on same zip How to do it?

1 Answers1

2

Place Magisk zip inside a folder say Magisk-v16.0

Add this Script at the end of Updater Script of your rom:

ui_print("-- Installing: Magisk-v16.0");
package_extract_dir("META-INF/ADD-ONS/Magisk-v16.0", "/tmp/Magisk-v16.0");
run_program("/sbin/busybox", "unzip", "/tmp/Magisk-v16.0/Magisk-v16.0.zip", "META-INF/com/google/android/*", "-d", "/tmp/Magisk-v16.0");
run_program("/sbin/busybox", "sh", "/tmp/Magisk-v16.0/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/Magisk-v16.0/Magisk-v16.0.zip");
delete_recursive("/tmp/Magisk-v16.0");

Similarly do with Viper and place the zip accordingly and it will work.