Android 9 disables the function of pressing and holding the power button + volume up key to enter the factory test (recovery mode)

In some special devices, it may be necessary to disable the recovery mode function that comes with the Android system

  • Find the relevant source files of the bootloader stage

vendor/mediatek/proprietary/bootable/bootloader/lk/platform/mt6771/boot_mode.c

View the boot_mode_selectfunction, modify factory_forbiddenthe value of the variable

int factory_forbidden = 1;
  • Find the source files related to the lk stage

vendor/mediatek/proprietary/bootable/bootloader/lk/target/tb8788p1_64_bsp/include/target/cust_key.h

Find the macro definition MT65XX_RECOVERY_KEY, comment out the macro definition

#define MT65XX_RECOVERY_KEY (kpd_dts_data.kpd_hw_recovery_key)

Guess you like

Origin blog.csdn.net/weixin_41388144/article/details/109369434