[Guide] Turn off Secure Boot to Install Magisk

Hi everyone,

If you have tried installing magisk on your JingPad, you may find that your JingPad won’t boot because of the verification.

However, you can turn it off in source code:

  • In file source/bsp/device/roc1/androidq/ud710_3h10u/ud710_3h10u_base/common.cfg, line 9:


Replace "SPRD" with "NONE";

  • In file source/device/sprd/roc1/ud710_3h10u/ud710_3h10u_native.mk, line 66:


Replace true with false.

Then recompile the source code, flash your new pac file, and now you can install magisk without any problem.

Here are some screenshots:

1 Like

Sorry, I skipped some steps.

If you build the pac file all over again, you may find that you can’t packaging the pac file, because some vbmeta-related files are required. But since we have turned off the secure boot, these files won’t be generated.

My solution is to create some empty files:

  • In directory source/out/target/product/ud710_3h10u/ , type:

dd if=/dev/zero of=vbmeta.img bs=1M count=1
dd if=/dev/zero of=vbmeta-sign.img bs=1M count=1
dd if=/dev/zero of=vbmeta-gsi.img bs=1M count=1
dd if=/dev/zero of=vbmeta_system.img bs=1M count=1
dd if=/dev/zero of=vbmeta_vendor.img bs=1M count=1

(I don’t know which one is necessary, so just create them all)
Now you are able to packaging the pac file.

Another issue:
The bootloader will be corrupted, so you need to flash magisk in recovery.
(use dd or simply rename magisk.apk to magisk.zip and flash it using adb sideload)
The reason I didn’t mention this issue before is that I also resized the super partition to 15GB last time.
I thought it was because I changed the partition table or I accidentally locked it…

Maybe there is another switch to turn off the secure boot, I will try to find it.

Another way to install magisk is to flash the signed & patched boot.img. A member uploaded it in QQ group and it is said to work very well.

If you want to unlock the bootloader while turning off the secure boot:

  • In file source/bsp/bootloader/u-boot15/common/loader/loader_nvm.c, line 117:

unsigned int g_DeviceStatus = VBOOT_STATUS_UNLOCK;

  • In file source/bsp/bootloader/u-boot15/common/loader/sprd_fdt_support.c, line 42:

enVerifiedState g_verifiedbootstate = v_state_orange;