Android 查看 Logcat (可纯手机方式 无需电脑)

安装 Logcat Reader
Github Google Play

如果有电脑 使用其ADB方式可执行如下命令 后续无需安装Termux

复制代码
# 使用 ADB 授予 android.permission.READ_LOGS 权限给 Logcat Reader
adb shell "pm grant com.dp.logcatapp android.permission.READ_LOGS && am force-stop com.dp.logcatapp"

没有电脑的情况且手机支持无线调试(Android11+) 可继续走下方步骤

安装 Termux
Github Google Play

  1. 打开 Termux 执行如下命令

    安装 android-tools

    pkg install android-tools

  2. 在「开发者选项」中开启「USB 调试」与「无线调试」

  3. 回到 Termux 执行如下命令

    adb 配对 (无线调试 - 使用配对码配对) 注意: 配对码界面不要关闭 切入后台即可,否则可能配对码和端口可能会变化的

    adb pair localhost:PORT

    adb 连接 此处的端口为无线调试界面显示的端口 (非配对的端口)

    adb connect localhost:PORT

    使用 ADB 授予 android.permission.READ_LOGS 权限给 Logcat Reader

    adb shell "pm grant com.dp.logcatapp android.permission.READ_LOGS && am force-stop com.dp.logcatapp"

相关推荐
秃了也弱了。11 分钟前
MySQL空间函数详解,MySQL记录经纬度并进行计算
android·数据库·mysql
.豆鲨包35 分钟前
【Android】Binder机制浅析
android·binder
Nerve2 小时前
GooglePay: API 文档
android·google
Nerve3 小时前
GooglePay: 订阅商品购买流程
android·google
summerkissyou19873 小时前
Audio-触摸音-播放流程
android
Nerve3 小时前
GooglePay: 消耗商品购买流程
android·google
LiteHeaven3 小时前
Android 8.1 Unable to create application data 问题分析
android
Nerve3 小时前
GooglePay: 一个基于 Google Play Billing Library 封装的 Android 支付库
android·google
Nerve3 小时前
Google Play 结算系统入门指南
android·google
青莲8434 小时前
Android Jetpack - 2 ViewModel
android·前端