M版本 ENG load 默认开启
M版本Userdebug load:
adb shell aee -d coreon
adb shell aee -d directon
adb reboot
使用user 版本,烧录userdebug 版本boot img root ,这个时候如果出现unknow coreon 或 unknow directon ,需要将/system/build.prop 下ro.build.type=user 改为userdebug 在reboot 手机,再运行adb shell aee -d coreon adb shell aee -d directon
等手机重启后再执行以下命令
adb shell setprop persist.libc.debug.malloc 15
adb shell setprop persist.libc.debug15.prog/system/bin/surfaceflinger
adb shell setprop persist.debug15.config 0x4a003024
adb reboot
5.手机再次重启后,开始复现问题。
M版本 USER load:
1)open alps/bionic/linker/debugger.cpp, and modify code in debuggerd_init
__LIBC_HIDDEN__ void debuggerd_init() {
struct sigaction action;
memset(&action, 0, sizeof(action));
sigemptyset(&action.sa_mask);
action.sa_sigaction = debuggerd_signal_handler;
action.sa_flags = SA_RESTART | SA_SIGINFO;
#if 0
// Use the alternate signal stack if available so we can catch stack overflows.
action.sa_flags |= SA_ONSTACK;
sigaction(SIGABRT, &action, nullptr);
sigaction(SIGBUS, &action, nullptr);
sigaction(SIGFPE, &action, nullptr);
sigaction(SIGILL, &action, nullptr);
sigaction(SIGPIPE, &action, nullptr);
sigaction(SIGSEGV, &action, nullptr);
#if defined(SIGSTKFLT)
sigaction(SIGSTKFLT, &action, nullptr);
#endif
sigaction(SIGTRAP, &action, nullptr);
#endif
}
2)rebuild load
3)need enable root permission first
adb shell setprop persist.aee.core.dump enable
adb shell setprop persist.aee.core.direct enable
adb reboot