当前位置: 首页 > news >正文

Android studio “Layout Inspector“工具在Android14 userdebug设备无法正常使用

背景描述

做rom开发的都知道,“Layout Inspector”和“Attach Debugger to Android Process”是studio里很好用的工具,可以用来查看布局、调试系统进程(比如setting、launcher、systemui)。

问题描述

最进刚开始一个Android 14的项目,刷userdebug版本后,发现“Layout Inspector”和“Attach Debugger to Android Process”都无法正常使用,它像user版本一样看不到系统的进程。
拿出前半年做的Android 13 userdebug设备发现可以正常使用。
于是创建了1个Google case,请求帮助。

解决方案

在经过几轮log和截图后,google同事给出了反馈:

Thanks for the extra details.

From Android 14 if you need to debug a Java process which isn’t a debuggable app , and are using an userdebug build, you also need to enable JDWP by running the following commands

adb shell setprop persist.debug.dalvik.vm.jdwp.enabled 1
adb reboot

This change was made by the platform (Android), not by Layout Inspector.
Let me know if this fixes your problem.
验证之后是有效的,Android 14 userdebug版本的设备可以使用“Layout Inspector”和“Attach Debugger to Android Process”工具了,又可以快乐的调试系统进程了。

问题原因

在源码搜索persist.debug.dalvik.vm.jdwp.enabled发现是Google新加的代码。
在之前Android 13的项目里没有这段逻辑
在这里插入图片描述

http://www.lryc.cn/news/179044.html

相关文章:

  • Kafka(一)使用Docker Compose安装单机Kafka以及Kafka UI
  • 网络知识点之-MSTP平台
  • Azure AD混合部署,通过 Intune 管理设备,实现条件访问
  • 2023/09/30
  • 顶级人工智能会议接收率及信息
  • NLP 01(介绍)
  • 网页采集工具-免费的网页采集工具
  • 【自监督Re-ID】ICCV_2023_Oral | ISR论文阅读
  • ElasticSearch 10000条查询数量限制
  • 视频增强修复工具Topaz Video AI mac中文版安装教程
  • 【面试题精讲】Java自增自减运算符
  • 282_WEB_对于注册、数据data_callback中进行处理的理解
  • 测试C#图像文本识别模块Tesseract的基本用法
  • 计组+系统02:30min导图复习 存储系统
  • 2023华为杯数学建模D题-域碳排放量以及经济、人口、能源消费量的现状分析(如何建立指标和指标体系1,碳排放影响因素详细建模过程)
  • Excel·VBA分列、字符串拆分
  • 机器学习算法基础--层次聚类法
  • linux系统中wifi移植方法
  • Machine Learning(study notes)
  • centos7通过docker搭建nginx+php环境
  • Node.js 学习笔记
  • RabbitMQ之发布确认高级
  • lv5 嵌入式开发-10 信号机制(下)
  • 【postgresql】 ERROR: multiple assignments to same column “XXX“
  • 一文读懂Llama 2(从原理到实战)
  • 完整指南:如何使用 Node.js 复制文件
  • ElementUI - 主页面--动态树右侧内容管理
  • 全国排名前三的直播公司无锋科技入驻天府蜂巢成都直播产业基地
  • 机器人中的数值优化|【五】BFGS算法非凸/非光滑处理
  • ESP32S3的MPU-6050组件移植教程