Mtk AEE_AED分析
AEE 系统 是 MTK 平台自研的异常重启的侦测和手机系统,当 AEE 侦测到异常后会生成db 文件,路径: /data/aee_exp 或 mtklog/aee_exp
AEE(Android Exception Engine,集成在Mediatek手机软件里)的模块检查到异常并收集异常信息生成的db文件,里面包含调试所需的log等关键信息。db有点像飞机的黑匣子。
对于KE来说,db里包含了如下文件(db可以通过GAT工具解开,请参考附录里的FAQ):
__exp_main.txt:异常类型,调用栈等关键信息。
_exp_detail.txt:详细异常信息
SYS_ANDROID_LOG:android main log
SYS_KERNEL_LOG:kernel log
SYS_LAST_KMSG:上次重启前的kernel log
SYS_MINI_RDUMP:类似coredump,可以用gdb/trace32调试
SYS_REBOOT_REASON:重启时的硬件记录的信息。
SYS_VERSION_INFO:kernel版本,用于和vmlinux对比,只有匹配的vmlinux才能用于分析这个异常。
SYS_WDT_LOG:看门狗复位信息
以上这些文件一般足以调试KE了,除非一些特别的问题需要其他信息,比如串口log等等。
1 mtklog
打开mtklog,复现问题重启后导出。log文件中会有boot__normal文件夹。
2 mtk gat工具
导出/data/vendor/aee_exp和/data/aee_exp下面的log文件。----- dbg文件
使用gat工具解析dbg文件。
AEE_AED的格式如下: 如下是 NE异常造成系统重启
11-08 17:25:43.088528 386 386 D AEE_AED : $===AEE===AEE===AEE===$ 11-08 17:25:43.088621 386 386 D AEE_AED : p 2 poll events 1 revents 1 11-08 17:25:43.089118 386 386 D AEE_AED : PPM cpu cores:4, online:4 11-08 17:25:43.089751 386 386 D AEE_AED : aed_main_fork_worker: generator 0xb2e62078, worker 0xbe860b30, recv_fd 11 11-08 17:25:43.091077 26179 26179 I AEE_AED : handle_request(11) 11-08 17:25:43.081000 26179 26179 I aee_aed : type=1400 audit(0.0:8767): avc: denied { dac_read_search } for capability=2 scontext=u:r:crash_dump:s0 tcontext=u:r:crash_dump:s0 tclass=capability permissive=1 11-08 17:25:43.092476 26179 26179 I AEE_AED : pid: 15334, tid: 15342, >>> /vendor/bin/hw/android.hardware.graphics.composer@2.1-service <<< 11-08 17:25:43.092535 26179 26179 I AEE_AED : read_request: receive requirement from aee_core_forwar 11-08 17:25:43.092670 26179 26179 D AEE_AED : u:r:hal_graphics_composer_default:s0 11-08 17:25:43.092696 26179 26179 V AEE_AED : dashboard_record_update() : rec->module = /vendor/bin/hw/android.hardware.graphics.composer@2.1-service 11-08 17:25:43.092710 26179 26179 D AEE_AED : Duplicated exception, cnt = 2 11-08 17:25:43.092720 26179 26179 D AEE_AED : Last exception time: 1667899355 11-08 17:25:43.092730 26179 26179 D AEE_AED : cur time: 1667899543 11-08 17:25:43.092751 26179 26179 W AEE_AED : DAL feature is off, just return 11-08 17:25:43.092776 26179 26179 I AEE_AED : Dumping EXP/Native (NE) 11-08 17:25:43.092819 26179 26179 I AEE_AED : aed_wait_decrypt done! file base encryption 11-08 17:25:43.092854 26179 26179 I AEE_AED : db base:/data/aee_exp 11-08 17:25:43.093221 26179 26179 D AEE_AED : aed_report_dump_open: Using /data/aee_exp/temp/db.gFKl1y 11-08 17:25:43.093370 26179 26179 I AEE_AED : predump starts 11-08 17:25:43.165996 26179 26179 I AEE_AED : predump ends 11-08 17:25:43.166224 26179 26179 D AEE_AED : aed_ne_core_session: notify core_forwarder to continue 11-08 17:25:43.166237 26179 26179 I AEE_AED : ne_direct_unwind start 11-08 17:25:43.169071 26179 26179 E AEE_AED : dump_registers32:write stack ok 11-08 17:25:43.169118 26179 26179 I AEE_AED : dump_regs:dump regs ok 11-08 17:25:43.169241 26179 26179 I AEE_AED : stack start(a8cce100),end(a8cd00a3),length(1fa3) 11-08 17:25:43.170151 26178 26178 I aee_core_forwarder: process_coredump: Got core filename from coredump receiver /data/aee_exp/temp/db.gFKl1y/COREDUMP 11-08 17:25:43.173278 26179 26179 I AEE_AED : dump_stack32:dump stack ok 11-08 17:25:43.201224 26179 26179 I AEE_AED : #00 pc 00096cb4 /apex/com.android.runtime/lib/bionic/libc.so (__sfvwrite+14) (BuildId: c86be681caceaa2aa026332878d5d040) 11-08 17:25:43.201381 26179 26179 I AEE_AED : #01 pc 00090607 /apex/com.android.runtime/lib/bionic/libc.so (__vfprintf+6238) (BuildId: c86be681caceaa2aa026332878d5d040) 11-08 17:25:43.201455 26179 26179 I AEE_AED : #02 pc 000a4519 /apex/com.android.runtime/lib/bionic/libc.so (vsnprintf+156) (BuildId: c86be681caceaa2aa026332878d5d040) 11-08 17:25:43.201840 26179 26179 I AEE_AED : #03 pc 000537ef /vendor/lib/hw/hwcomposer.mt6761.so (snprintf(char*, unsigned int pass_object_size1, char const*, ...)+30) (BuildId: c80b781bc13135d8a870903d28718e5e) 11-08 17:25:43.202250 26179 26179 I AEE_AED : #04 pc 00058d3d /vendor/lib/hw/hwcomposer.mt6761.so (void AbortMessager::printf<unsigned long long, char const*, char const*>(char const*, unsigned long long, char const*, char const*)+76) (BuildId: c80b781bc13135d8a870903d28718e5e) 11-08 17:25:43.202583 26179 26179 I AEE_AED : #05 pc 00058941 /vendor/lib/hw/hwcomposer.mt6761.so (HWCMediator::displayPresent(hwc2_device*, unsigned long long, int*)+260) (BuildId: c80b781bc13135d8a870903d28718e5e) 11-08 17:25:43.203027 26179 26179 I AEE_AED : #06 pc 00005e81 /vendor/bin/hw/android.hardware.graphics.composer@2.1-service (android::hardware::graphics::composer::V2_1::passthrough::detail::HwcHalImpl<android::hardware::graphics::composer::V2_1::hal::ComposerHal>::presentDisplay(unsigned long long, int*, std::__1::vector<unsigned long long, std::__1::allocator<unsigned long long> >*, std::__1::vector<int, std::__1::allocator<int> >*)+40) (BuildId: 112907202eaa8c7d65de7f97399c0c8b) 11-08 17:25:43.203433 26179 26179 I AEE_AED : #07 pc 0000aad5 /vendor/bin/hw/android.hardware.graphics.composer@2.1-service (android::hardware::graphics::composer::V2_1::hal::ComposerCommandEngine::executePresentDisplay(unsigned short)+72) (BuildId: 112907202eaa8c7d65de7f97399c0c8b) 11-08 17:25:43.203844 26179 26179 I AEE_AED : #08 pc 00008d83 /vendor/bin/hw/android.hardware.graphics.composer@2.1-service (android::hardware::graphics::composer::V2_1::hal::ComposerCommandEngine::execute(unsigned int, android::hardware::hidl_vec<android::hardware::hidl_handle> const&, bool*, unsigned int*, android::hardware::hidl_vec<android::hardware::hidl_handle>*)+86) (BuildId: 112907202eaa8c7d65de7f97399c0c8b) 11-08 17:25:43.204315 26179 26179 I AEE_AED : #09 pc 00007c51 /vendor/bin/hw/android.hardware.graphics.composer@2.1-service (android::hardware::graphics::composer::V2_1::hal::detail::ComposerClientImpl<android::hardware::graphics::composer::V2_1::IComposerClient, android::hardware::graphics::composer::V2_1::hal::ComposerHal>::executeCommands(unsigned int, android::hardware::hidl_vec<android::hardware::hidl_handle> const&, std::__1::function<void (android::hardware::graphics::composer::V2_1::Error, bool, unsigned int, android::hardware::hidl_vec<android::hardware::hidl_handle> const&)>)+84) (BuildId: 112907202eaa8c7d65de7f97399c0c8b) 11-08 17:25:43.204739 26179 26179 I AEE_AED : #10 pc 00027f37 /vendor/lib/android.hardware.graphics.composer@2.1.so (android::hardware::graphics::composer::V2_1::BnHwComposerClient::_hidl_executeCommands(android::hidl::base::V1_0::BnHwBase*, android::hardware::Parcel const&, android::hardware::Parcel*, std::__1::function<void (android::hardware::Parcel&)>)+294) (BuildId: 2869eb9c940a536b1c6586f5e4a17c98) 11-08 17:25:43.205132 26179 26179 I AEE_AED : #11 pc 000286f1 /vendor/lib/android.hardware.graphics.composer@2.1.so (android::hardware::graphics::composer::V2_1::BnHwComposerClient::onTransact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+1492) (BuildId: 2869eb9c940a536b1c6586f5e4a17c98) 11-08 17:25:43.205246 26179 26179 I AEE_AED : #12 pc 00054617 /apex/com.android.vndk.v31/lib/libhidlbase.so (android::hardware::BHwBinder::transact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+90) (BuildId: 7fb8664192a54dab1ad271995a90f396) 11-08 17:25:43.205306 26179 26179 I AEE_AED : #13 pc 0005360d /apex/com.android.vndk.v31/lib/libhidlbase.so (android::hardware::IPCThreadState::getAndExecuteCommand()+968) (BuildId: 7fb8664192a54dab1ad271995a90f396) 11-08 17:25:43.205346 26179 26179 I AEE_AED : #14 pc 000531a5 /apex/com.android.vndk.v31/lib/libhidlbase.so (android::hardware::IPCThreadState::joinThreadPool(bool)+56) (BuildId: 7fb8664192a54dab1ad271995a90f396) 11-08 17:25:43.205421 26179 26179 I AEE_AED : #15 pc 00053165 /apex/com.android.vndk.v31/lib/libhidlbase.so (android::hardware::PoolThread::threadLoop()+12) (BuildId: 7fb8664192a54dab1ad271995a90f396) 11-08 17:25:43.205470 26179 26179 I AEE_AED : #16 pc 0000d327 /apex/com.android.vndk.v31/lib/libutils.so (android::Thread::_threadLoop(void*)+166) (BuildId: 01cc528c610468531ef44927a06cdeb9) 11-08 17:25:43.205510 26179 26179 I AEE_AED : #17 pc 0000ce67 /apex/com.android.vndk.v31/lib/libutils.so (thread_data_t::trampoline(thread_data_t const*)+254) (BuildId: 01cc528c610468531ef44927a06cdeb9) 11-08 17:25:43.205548 26179 26179 I AEE_AED : #18 pc 000a8b97 /apex/com.android.runtime/lib/bionic/libc.so (__pthread_start(void*)+40) (BuildId: c86be681caceaa2aa026332878d5d040) 11-08 17:25:43.205582 26179 26179 I AEE_AED : #19 pc 00061e45 /apex/com.android.runtime/lib/bionic/libc.so (__start_thread+30) (BuildId: c86be681caceaa2aa026332878d5d040) 11-08 17:25:43.205715 26179 26179 I AEE_AED : ne_direct_unwind end 11-08 17:25:43.209426 26179 26179 E AEE_AED : aee_engrave_tombstone: after register 11-08 17:25:43.214816 26179 26179 E AEE_AED : aee_engrave_tombstone: will dump backtrace 11-08 17:25:43.347232 24068 24118 I PowerHalWrapper: amsBoostNotify pid:25533,activity:com.hnlens.factorytest.main_runin, package:com.hnlens.factorytest, mProcessCreatePackcom.debug.loggerui 11-08 17:25:43.347301 24068 24118 I PowerHalWrapper: state: 0 11-08 17:25:43.347496 24068 24118 I PowerHalWrapper: amsBoostNotify AMS_BOOST_PROCESS_CREATE_BOOST:false 11-08 17:25:43.347739 465 504 I libPowerHal: [perfNotifyAppState] pack:com.androidos.factorytest, act:com.androidos.factorytest.main_runin, state:0, pid:25533, uid:1000, fps:90 11-08 17:25:43.372643 26179 26179 I AEE_AED : Tombstone for direct_coredump written to: /data/tombstones/tombstone_00 11-08 17:25:43.377483 26179 26179 I AEE_AED : $** *** *** *** *** *** *** *** Fatal *** *** *** *** *** *** *** **$ 11-08 17:25:43.379016 26184 26184 E AEE_DUMPSTATE: execute /system_ext/bin/aee_dumpstate 11-08 17:25:43.396993 26184 26184 I AEE_DUMPSTATE: begin 11-08 17:25:43.398299 26184 26184 D AEE_DUMPSTATE: cpu cores:4, online:4 11-08 17:25:43.411000 26179 26179 I aee_aed : type=1400 audit(0.0:8768): avc: denied { open } for path="/dev/__properties__/u:object_r:vendor_default_prop:s0" dev="tmpfs" ino=14526 scontext=u:r:crash_dump:s0 tcontext=u:object_r:vendor_default_prop:s0 tclass=file permissive=1 11-08 17:25:43.424247 26179 26179 I AEE_AED : Build Info: 'alps-mp-s0.mp1:alps-mp-s0.mp1.rc-V9_xthink.s0mp1rc.k61v1.64.bsp_P7:mt6761:S01,ALT/alt_thor_s/thor:12/SP1A.210812.016/109:userdebug/release-keys' 11-08 17:25:43.424358 26179 26179 I AEE_AED : MSSI Info: 'ALT/alt_thor_s/thor:12/SP1A.210812.016/109:userdebug/release-keys' 11-08 17:25:43.426441 26179 26179 I AEE_AED : MGVI Info: '' 11-08 17:25:43.428366 26179 26179 I AEE_AED : MGK Info: '' 11-08 17:25:43.428464 26179 26179 I AEE_AED : Exception Log Time:[Tue Nov 8 17:25:43 CST 2022] [3786.198627] 11-08 17:25:43.428464 26179 26179 I AEE_AED : 11-08 17:25:43.428491 26179 26179 I AEE_AED : Exception Class: Native (NE) 11-08 17:25:43.428538 26179 26179 I AEE_AED : Exception Type: SIGSEGV 11-08 17:25:43.428538 26179 26179 I AEE_AED : 11-08 17:25:43.428555 26179 26179 I AEE_AED : Current Executing Process: 11-08 17:25:43.428555 26179 26179 I AEE_AED : pid: 15334, tid: 15342 11-08 17:25:43.428555 26179 26179 I AEE_AED : /vendor/bin/hw/android.hardware.graphics.composer@2.1-service 11-08 17:25:43.428555 26179 26179 I AEE_AED : 11-08 17:25:43.430248 26179 26179 I AEE_AED : $** *** *** *** *** *** *** *** Fatal *** *** *** *** *** *** *** **$ 11-08 17:25:43.430481 26179 26179 D AEE_AED : /system_ext/bin/aee_dumpstate: filepath /data/aee_exp/temp/db.gFKl1y, pid 15334, tid 15342, exp_class 3, db_opt 0 11-08 17:25:43.431816 26185 26185 E AEE_DUMPSTATE: execute /system_ext/bin/aee_dumpstate
版权声明:如无特殊标注,文章均为本站原创,转载时请以链接形式注明文章出处。
评论