Unable to open log device ‘/dev/log/main’: No such file or directory

本文提供了解决在使用真机调试Android应用时遇到无法获取调试信息问题的方法,通过操作华为U8860手机开启log功能来解决此问题。包括进入测试菜单界面、设置后台和LOG功能、调整LOG级别并启用所有Dump&Log选项,最后重启手机即可解决。

在我们使用真机进行Android应用调试时,无法获得调试信息,错误提示如下:Unable to open log device ‘/dev/log/main’: No such file or directory

这是因为我们的手机没有开起log记录,下面以华为U8860为例开启手机的log功能:

1、在拨号界面输入:*#*#2846579#*#*  进入测试菜单界面。

 

2、Project Menu–后台设置–LOG设置

 

3、LOG开关–LOG打开   LOG级别设置–VERBOSE

4、Dump&Log– 全部选中

5、重启手机

                                                      文章出处:http://liuzhichao.com/p/570.html

 

10:57:51.766834 35747 main.go:300] Retrieving plugins. W1210 10:57:51.767289 35747 factory.go:47] No valid resources detected, creating a null CDI handler I1210 10:57:51.767375 35747 factory.go:123] Detected non-NVML platform: could not load NVML library: libnvidia-ml.so.1: cannot open shared object file: No such file or directory I1210 10:57:51.767442 35747 factory.go:123] Detected non-Tegra platform: /sys/devices/soc0/family file not found E1210 10:57:51.767463 35747 factory.go:131] Incompatible platform detected E1210 10:57:51.767476 35747 factory.go:132] If this is a GPU node, did you configure the NVIDIA Container Toolkit? E1210 10:57:51.767489 35747 factory.go:133] You can check the prerequisites at: https://github.com/NVIDIA/k8s-device-plugin#prerequisites E1210 10:57:51.767501 35747 factory.go:134] You can learn how to set the runtime at: https://github.com/NVIDIA/k8s-device-plugin#quick-start E1210 10:57:51.767514 35747 factory.go:135] If this is not a GPU node, you should set up a toleration or nodeSelector to only deploy this plugin on GPU nodes E1210 10:57:51.767623 35747 main.go:154] error starting plugins: error creating plugin manager: unable to create plugin manager: platform detection failed root@LAPTOP-21R5QEJ2:~# kubectl logs -n kube-system hami-device-plugin-5hlt9 -c vgpu-monitor I1210 10:58:33.830763 35948 flags.go:27] FLAG: --add_dir_header="false" I1210 10:58:33.830819 35948 flags.go:27] FLAG: --alsologtostderr="false" I1210 10:58:33.830822 35948 flags.go:27] FLAG: --log_backtrace_at=":0" I1210 10:58:33.830825 35948 flags.go:27] FLAG: --log_dir="" I1210 10:58:33.830827 35948 flags.go:27] FLAG: --log_file="" I1210 10:58:33.830829 35948 flags.go:27] FLAG: --log_file_max_size="1800" I1210 10:58:33.830831 35948 flags.go:27] FLAG: --logtostderr="true" I1210 10:58:33.830832 35948 flags.go:27] FLAG: --one_output="false" I1210 10:58:33.830834 35948 flags.go:27] FLAG: --skip_headers="false" I1210 10:58:33.830836 35948 flags.go:27] FLAG: --skip_log_headers="false" I1210 10:58:33.830837 35948 flags.go:27] FLAG: --stderrthreshold="2" I1210 10:58:33.830839 35948 flags.go:27] FLAG: --v="4" I1210 10:58:33.830841 35948 flags.go:27] FLAG: --vmodule="" I1210 10:58:33.830843 35948 flags.go:27] FLAG: --help="false" W1210 10:58:33.830873 35948 client_config.go:659] Neither --kubeconfig nor --master was specified. Using the inClusterConfig. This might not work. I1210 10:58:33.831531 35948 envvar.go:172] "Feature gate default state" feature="WatchListClient" enabled=false I1210 10:58:33.831547 35948 envvar.go:172] "Feature gate default state" feature="InformerResourceVersion" enabled=false I1210 10:58:33.831569 35948 reflector.go:305] Starting reflector *v1.Pod (5m0s) from pkg/mod/k8s.io/client-go@v0.31.10/tools/cache/reflector.go:243 I1210 10:58:33.831588 35948 reflector.go:341] Listing and watching *v1.Pod from pkg/mod/k8s.io/client-go@v0.31.10/tools/cache/reflector.go:243 I1210 10:58:33.839143 35948 reflector.go:368] Caches populated for *v1.Pod from pkg/mod/k8s.io/client-go@v0.31.10/tools/cache/reflector.go:243 I1210 10:58:33.932168 35948 cudevshr.go:317] Pod informer started successfully I1210 10:58:33.932238 35948 lock.go:50] MIG apply lock directory already exists I1210 10:58:33.932407 35948 feedback.go:187] Starting watchAndFeedback I1210 10:58:33.932466 35948 main.go:137] Initializing metrics for vGPUmonitor I1210 10:58:33.932550 35948 reflector.go:305] Starting reflector *v1.Pod (1h0m0s) from pkg/mod/k8s.io/client-go@v0.31.10/tools/cache/reflector.go:243 I1210 10:58:33.932556 35948 reflector.go:341] Listing and watching *v1.Pod from pkg/mod/k8s.io/client-go@v0.31.10/tools/cache/reflector.go:243 E1210 10:58:33.932798 35948 main.go:126] Received error: failed to initialize NVML: ERROR_LIBRARY_NOT_FOUND I1210 10:58:33.932812 35948 main.go:164] Shutting down metrics server
最新发布
12-11
01-01 00:08:12.495 1711 1711 I AEE_AEDV: $** *** *** *** *** *** *** *** Exception *** *** *** *** *** *** *** **$ 01-01 00:08:12.496 1711 1711 D AEE_AEDV: /vendor/bin/aee_dumpstatev_v2: filepath /data/vendor/aee_exp/temp/db.qHk3oU, pid -1360007168, tid -1360007168, exp_class 6, db_opt 0 01-01 00:08:12.498 1717 1717 E AEE_DUMPSTATEV: execute /vendor/bin/aee_dumpstatev_v2 01-01 00:08:12.507 1036 1036 E SpeechMessengerNormal: openCcciDriver(), open(/dev/ccci_aud) fail!! mCcciDeviceHandler: -1, errno: 2 01-01 00:08:12.507 1036 1036 W SpeechMessengerNormal: checkCcciStatusAndRecovery(), #20, sleep 10 ms & retry openCcciDriver 01-01 00:08:12.528 1717 1717 W libc : Access denied finding property "ro.version.confidential" 01-01 00:08:12.528 1717 1717 I AEE_DUMPSTATEV: begin 01-01 00:08:12.528 1717 1717 I AEE_DUMPSTATEV: Built commit 7c708b4421ea60f803088d5c00a634c95909c17c 01-01 00:08:12.529 1717 1717 E AEE_DUMPSTATEV: start set_signal_for_dumpstate 01-01 00:08:12.529 1717 1717 D AEE_DUMPSTATEV: cpu cores:8, online:8 01-01 00:08:12.530 1717 1717 I AEE_DUMPSTATEV: aee_opt=0x0 01-01 00:08:12.531 1717 1717 I AEE_DUMPSTATEV: archive_file_to_db: current dumped file is /data/vendor/aee_exp/temp/db.qHk3oU/__exp_main.txt 01-01 00:08:12.531 1717 1717 D AEE_DUMPSTATEV: archive_file_to_db: Collect file /data/vendor/aee_exp/temp/db.qHk3oU/__exp_main.txt to __exp_main.txt successfully, size 1296 01-01 00:08:12.532 1717 1717 I AEE_DUMPSTATEV: archive_file_to_db: current dumped file is /data/vendor/aee_exp/temp/db.qHk3oU/SYS_PROPERTIES 01-01 00:08:12.533 1046 1046 E sensors-hal-HfManager: try 19 times to wait device ready... 01-01 00:08:12.534 1717 1717 D AEE_DUMPSTATEV: archive_file_to_db: Collect file /data/vendor/aee_exp/temp/db.qHk3oU/SYS_PROPERTIES to SYS_PROPERTIES successfully, size 36992 01-01 00:08:12.534 1717 1717 I AEE_DUMPSTATEV: archive_file_to_db: current dumped file is /data/vendor/aee_exp/temp/db.qHk3oU/_exp_detail.txt 01-01 00:08:12.535 1717 1717 D AEE_DUMPSTATEV: archive_file_to_db: Collect file /data/vendor/aee_exp/temp/db.qHk3oU/_exp_detail.txt to _exp_detail.txt successfully, size 92 01-01 00:08:12.542 1717 1717 E AEE_DUMPSTATEV: archive_file_to_db: Failed to dump SYS_BLOCKIO, can not open file /sys/kernel/debug/blockio, No such file or directory 01-01 00:08:12.543 1717 1717 I AEE_DUMPSTATEV: archive_file_to_db: current dumped file is /proc/blocktag/blockio 01-01 00:08:12.544 1090 1124 I UAH_HAL : (1124)[wait_boot_init_completed] Waiting for 1st Boot 0.1 sec... errno: 0, value: 0 01-01 00:08:12.547 1717 1717 D AEE_DUMPSTATEV: archive_file_to_db: Collect file /proc/blocktag/blockio to SYS_BLOCKIO successfully, size 18709 01-01 00:08:12.547 1717 1717 I AEE_DUMPSTATEV: archive_file_to_db: current dumped file is /proc/ufs_debug 01-01 00:08:12.550 1012 1332 E TetherController: addInterface p2p0->20 succ 01-01 00:08:12.550 1012 1333 E TetherController: addInterface p2p0->20 succ 01-01 00:08:12.552 1717 1717 D AEE_DUMPSTATEV: archive_file_to_db: Collect file /proc/ufs_debug to SYS_STORAGE_DEBUG_UFS successfully, size 50558 01-01 00:08:12.554 1717 1717 E AEE_DUMPSTATEV: archive_file_to_db: Failed to dump SYS_STORAGE_DEBUG_MSDC, can not open file /proc/msdc_debug, No such file or directory 01-01 00:08:12.555 1717 1717 I AEE_DUMPSTATEV: archive_file_to_db: current dumped file is /sys/kernel/debug/mmprofile/buffer 01-01 00:08:12.556 1012 1332 E TetherController: addInterface p2p1->21 succ 01-01 00:08:12.559 1012 1333 E TetherController: addInterface p2p1->21 succ 01-01 00:08:12.571 1720 1720 I AEE_AED : Built commit 1fe4561f177e76c5c927d9204bc9c10c0df47204 01-01 00:08:12.571 1720 1720 D AEE_AED : Rtt command(type:0, string: arg0:1) 01-01 00:08:12.571 1720 1720 E aee_v2 : client connect socket fail: Connection refused 01-01 00:08:12.571 1720 1720 E AEE_AED : aee:rttdRtt command connect socket fail: Connection refused 01-01 00:08:12.572 1720 1720 D AEE_AED : aee:rttd_64Rtt waiting 64_daemon finish the job... 01-01 00:08:12.572 580 580 D AEE_AED : $===AEE===AEE===AEE===$ 01-01 00:08:12.572 580 580 D AEE_AED : p 0 poll events 1 revents 1 01-01 00:08:12.573 580 580 D AEE_AED : requesting from: pid=1720 cmd=23 01-01 00:08:12.581 1720 1720 E AEE_AED : Rtt command read 64_socket fail: Not a data message 01-01 00:08:12.586 1717 1717 D AEE_DUMPSTATEV: archive_file_to_db: Collect file /sys/kernel/debug/mmprofile/buffer to SYS_MMPROFILE successfully, size 3169936 01-01 00:08:12.608 1068 1068 E sensors-hal-HfManager: try 20 times to wait device ready... 01-01 00:08:12.614 1014 1023 D bspFwUpdate: [bspFwUpdate][ufs] ufs fw move succ! 01-01 00:08:12.614 1014 1023 D bspFwUpdate: [bspFwUpdate](null):fw_update success 01-01 00:08:12.614 1014 1023 D bspFwUpdate: [bspFwUpdate]Going to detect /data/oplus/fw_update/ufs 01-01 00:08:12.614 1014 1023 D bspFwUpdate: [bspFwUpdate]Going to create 01-01 00:08:12.614 1014 1023 D bspFwUpdate: [bspFwUpdate](null),monitor read begin
06-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值