登录
首页 » Others » Android调试工具adb应用.docx(该实验含详细图文教程)

Android调试工具adb应用.docx(该实验含详细图文教程)

于 2020-05-21 发布
0 297
下载积分: 1 下载次数: 2

代码说明:

基于Android的adb应用实验十 Android调试工具adb日期:2020年4月21日一、实验目的1、了解Android开发过程adb的重要作用。2、学习adb调试Android设备的方法。3、掌握adb的常用指令。 二、实验原理1、adb的介绍Android调试桥(adb)是一种功能多样的命令行工具,可让您与设备进行通信。adb命令可用于执行各种设备操作(例如安装和调试应用),并提供对Unix shell(可用来在设备上运行各种命令)的访问权限。它是一种客户端-服务器程序,包括以下三个组件:客户端:用于发送命令。客户端在开发计算机上运行。您可以通过发出 adb 命令来从命令行终端调用客户端。守护进程(adbd):在设备上运行命令。守护进程在每个设备上作为后台进程运行。服务器:管理客户端和守护进程之间的通信。服务器在开发机器上作为后台进程运行。adb包含在Android SDK 平台工具软件包中。您可以使用SDK管理器下载此软件包,该管理器会将其安装在android_sdk/platform-tools/下。2、adb的工作原理当您启动某个adb客户端时,客户端会先检查是否有adb服务器进程正在运行。如果没有,它将启动服务器进程。服务器在启动后会与本地TCP端口5037绑定,并监听adb客户端发出的命令 - 所有adb客户端均通过端口5037与adb 服务器通信。然后,服务器会与所有正在运行的设备建立连接。它通过扫描5555到5585 之间(该范围供前 16 个模拟器使用)的奇数号端口查找模拟器。服务器一旦发现adb守护进程(adbd),便会与相应的端口建立连接。请注意,每个模拟器都使用一对按顺序排列的端口 - 用于控制台连接的偶数号端口和用于adb连接的奇数号端口。例如:模拟器 1,控制台:5554模拟器 1,adb:5555模拟器 2,控制台:5556模拟器 2,adb:5557依此类推如上所示,在端口5555处与adb连接的模拟器与控制台监听端口为 5554 的模拟器是同一个。服务器与所有设备均建立连接后,您便可以使用adb命令访问这些设备。由于服务器管理与设备的连接,并处理来自多个adb客户端的命令,因此您可以从任意客户端(或从某个脚本)控制任意设备。3、在设备上启用adb调试要在通过USB连接的设备上使用adb,您必须在设备的系统设置中启用USB 调试(位于开发者选项下)。在搭载 Android 4.2 及更高版本的设备上,“开发者选项”屏幕默认情况下处于隐藏状态。如需将其显示出来,请依次转到设置 > 关于手机,然后点按版本号七次。返回上一屏幕,在底部可以找到开发者选项。在某些设备上,“开发者选项”屏幕所在的位置或命名方式可能有所不同。现在,您已经可以通过USB连接设备。您可以通过从android_sdk/platform-tools/目录执行adb devices来验证设备是否已连接。如果已连接,您将看到设备名称以“设备”形式列出。注意:当您连接搭载 Android 4.2.2 或更高版本的设备时,系统会显示一个对话框,询问您是否接受允许通过此计算机进行调试的RSA密钥。这种安全机制可以保护用户设备,因为它可以确保只有在您能够解锁设备并确认对话框的情况下才能执行USB调试和其他adb命令。4、查询设备在发出 adb 命令前,了解哪些设备实例已连接到 adb 服务器会很有帮助。您可以使用devices命令生成已连接设备的列表。命令行输入: adb devices作为响应:adb 会针对每个设备输出以下状态信息;序列号:由 adb 创建的字符串,用于通过端口号唯一标识设备。下面是一个序列号示例:emulator-5554状态:设备的连接状态可以是以下几项之一:offline:设备未连接到 adb 或没有响应。device:设备现已连接到 adb 服务器。请注意,此状态并不表示 Android 系统已完全启动并可正常运行,因为在设备连接到 adb 时系统仍在启动。不过,在启动后,这是设备的正常运行状态。no device:未连接任何设备。说明:如果包含-l选项,则devices命令会告知您设备是什么。当您连接了多个设备时,此信息很有用,可帮助您将它们区分开来。5、安装应用您可以使用adb的install命令在模拟器或连接的设备上安装APK:adb install path_to_apk安装测试APK时,必须结合使用-t选项和install命令。6、操作指令(1)基本指令进入指定设备            adb -s serialNumber shell查看版本                adb version查看日志                adb logcat查看设备                adb devices连接状态                adb get-state启动ADB服务            adb start-server停止ADB服务            adb kill-server电脑推文件送到设备      adb push local remote设备文件拉取到电脑      adb pull remote local(2)adb shell下的am 与 pmam和pm命令必须先切换到adb shell模式下才能使用am全称activity manager,使用am去模拟各种系统的行为,例如去启动一个activity,强制停止进程,发送广播进程启动app                am start -n {packageName}/.{activityName}杀app的进程           am kill 强制停止一切           am force-stop 启动服务               am startservice停止服务               am stopservicepm全称package manager,使用pm命令去模拟Android行为或者查询设备上的应用等列出手机所有的包名     pm list packages安装/卸载              pm install/uninstall(3)其他指令重启机器                     adb reboot获取序列号                   adb get-serialno重启到bootloader,即刷机模式 adb reboot bootloader重启到recovery,即恢复模式   adb reboot recovery安装APK:                    adb install //比如:adb install baidu.apk卸载APK:                    adb uninstall //比如:adb uninstall com.baidu.search获取机器MAC地址       adb shell cat /sys/class/net/wlan0/address查看占用内存排序             adb shell top查看占用内存前6的app:      adb shell top -m 6刷新一次内存信息,然后返回:  adb shell top -n 1查询各进程内存使用情况:      adb shell procrank杀死一个进程:                adb shell kill [pid]查看进程列表:                adb shell ps查看wifi密码:               adb shell cat /data/misc/wifi/*.conf7、adb连接不同模拟机设备的端口号夜神模拟器:         adb connect 127.0.0.1:62001逍遥安卓模拟器:     adb connect 127.0.0.1:21503天天模拟器:         adb connect 127.0.0.1:6555 海马玩模拟器:       adb connect 127.0.0.1:53001网易MUMU模拟器:    adb connect 127.0.0.1:7555原生模拟器:         adb connect (你的IP地址):5555

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • NGSIM使用手册(1)
    美国NGSIM系统的使用手册,方便读者高效的利用NGSIM进行数据下载,完成交通领域的研究Technical Report Documentation Page1. Report No2. Government Accession no3. Recipients Catalog NoFHWA-HOP-06-0124. Title and subtitle5. Report DateNext Generation Simulation(NGSIM) Data Format Planly20046. Performing Organization Code7. Author(s8. Performing Organization report noVijay Kovvali, richard margiotta, Robert franc, vassiliAlexiadis9. Performing Organization Name and Address10. Work Unit NoCAMBRIDGE SYSTEMATIC INC150 CAMBRIDGE PARK DRIVE SUITE 400011. Contract or grant noCAMBRIDGE MA 02140DTFH61-02-C-0003612. Sponsoring Agency Name and Address13. Type of Report and Period CoveredDepartment of transportationFinal reportFederal Highway AdministrationJuly 2003-july 2004Office of Acquisition Management14. Sponsoring Agency Code400 Seventh Street SW, RM 4410Washington, DC 2059015. Supplementary notesFHWA COTR: John Halkias, Office of Operations, and James Colyar, Office of Operations r&d16. AbstractThe Next Generation Simulation Program(NGSIM) Data Format Plan was developed to define thestructure, documentation, and transfer requirements for data that will be collected for estimationcalibration, and validation of core behavioral algorithms. The development of the data Format Plan isbased on existing formats that are relevant to ngsim and augmented to fill in gaps. to this end, a reviewof existing data formats was undertaken and their relevance to NGSiM was assessed. The review includeddata standards developed for intelligent transportation systems(ITS), data formats developed specificallyfor traffic simulation models, and data formats developed for broader transportation applications. Thespecified data formats were developed with the objective of promoting efficient research by maintainingonsistency between data collection and research, and providing consistent storage and transmittalprotocols. On the other hand, this plan intentionally avoids over specification of data formats, so as tominimize unnecessary limitations to research. This document specifies the conceptual data model by meansof Unified Modeling Language UMl class diagrams; the data dictionary in the data standard prescribed bP1489-1999 format developed by the Institute of Electrical and Electronics Engineers(IEEE); the dataexchange structure for data transfer from user to user or from the database/repository to users; and theNGSIM metadata17. Key words1 8. Distribution StatementNext generation simulation, NGSIM, trafficNo restrictions. This document is available to thesimulation, high-level plan, traffic data collection, public through the National Technical Informationvehicle trajectory dataService, Springfield, VA2216119. Security Classif. (of this report) 20. Security Classif. (of this page) 21. No of Pages22. PriceUnclassifiedUnclassifiedForm dot e1700.7(8-72)Reproduction of completed pages authorizedTABLE OF CONTENTSEXECUTIVE SUMMARY1.0 INTRODUCTION1.1High- Level plan context……垂垂垂垂·着垂垂垂垂非垂·非垂垂看垂音非非;·垂垂音看垂看垂1.2 Background1.3 Data Collection Types……1344581. 4 Data Conversion1.5 Data Formats·····.···············.··.···.·;···..·.··..·.···2.0 NGSIM DATA REQUIREMENTS22 Microsimulation Software Data format,…………172.1 NGSIM Data…192.3 Rcquirements for NgsiM data Collection..................193.0 RECOMMENDED NGSIM DATA FORMATS..m. 233.1 NGSIM Data model233.2 NGSIM Data Dictionary……………243.3 NGSIM Metadata.............................253.4 NGSIM Data Exchange Format273.5 File and Directory Naming Convention……293.6 Summary30REFERENCES31APPENDIX A-REVIEW OF EXISTING TRANSPORTATION DATA FORMATS3APPENDIX B-ACCURACY REQUIREMENTS FOR NGSIM DATACOLLECTION,45APPENDIX C-DATA MODEL∴….,,53APPENdIXD-DATA DICTIONARY.APPENDIX E-METADATA. ...........................................................................................99APPENdIX F-SYSTEM-STATE DATA看香音看音香n117List of FiguresFigure 1 Diagram. NGSIM task interdependencies4Figure2. Diagran. Data format classification relevant to ngsim1………Figure 3. Diagram. Top level data model of general traffic simulation55Figure4. Diagram. Influencing factors database packages………………56Figure 5. Diagram. Behavioral models packages57Figure6. Diagran. Facility type generalization…………18Figure 7. Diagram. Traffic management systems generalization......59Figure 8. Diagram. Transit management systems generalizationFigure9. Diagran. nvironment generalization.………………………0Figure 10. Diagram NTCIP Controller class diagram61Figure 11 Diagram Actuated traffic signal controller generalization2Figure12 Diagram. Generalized microsimulation data model………………63Figure 13 Diagram Data concept components and constructs(IEEE Std 1489-1999)66List of tablesTable 1. Example validation data by algorithm categoryTable 2. Summary of NGSiM categorizations for data formatsTable 3. Accuracy requirements for vehicle trajectory data. ..45Table 4. Accuracy requirements for instrumented vehicle data.........46Table 5. Accuracy requirements for wide-area detector data......... 47Table 6. Accuracy requirements for nctwork-rclated data48Table 7. Accuracy requirements for representative transportation managementsystems data52Table 8. Terminology for UMLmodeler54Table 9. Data dictionary for NgSim.67Table 10 processing documentation metadata for ngsimwwwwwm116Table1l. Requisite vehicle trajectory data…………………………117Table 12. requisite wide-area detector data requirements……118EXECUTIVE SUMMARYThe Next Generation Simulation Program(NGsim) Data Format plan was developed todefine the structure, documentation, and transfer requirements for data that will be col-lected for estimation, calibration, and validation of core behavioral algorithms. Thedevelopment of the data format plan is based on existing formats that are relevant toNGSIM and augmented to fill in gaps. To this end, a review of existing data formats wasundertaken and their relevance to ngsim was assessed. The review included data standards developed for intelligent transportation systems (ITS), data formats developed spe-cifically for traffic simulation models and data formats developed for broader transporta-tion applications. The specified data formats were developed with the objective of pro-moting efficient research by maintaining consistency between data collection andresearch, and providing consistent storage and transmittal protocols. On the other handthis plan intentionally avoids overspecification of data formats, so as to minimize unnecessary limitations to researchFour data format components were specified in this document, including: 1)data model,2)data dictionary, 3 )metadata, and 4) data exchange formatNGSIM Data Model- The conceptual data model for NGSIM data formats is pre-sented by means of Unified Modeling Language() class diagrams. Used in con-junction with the data dictionary, the data model allows for construction of a formaldatabase/repository for NGSIM validation dataNGSIM Data Dictionary This provides definition of individual data elementsrequired by NGsim. It follows the data standard prescribed by P1489-1999 formatdeveloped by the Institutc of Elcctrical and Electronics Engineers(ieee)NGSIM Data Exchange Format- The data cxchange structure dcfincs how datashould be transferred from user to user or from the database /repository to users. Thisdocument specifies the framework for developing data exchange formats by providingthe data model and the data dictionary; it also provides clear guidance on the formatstandards with which the data exchange format should conform Currently it doesnot provide specific schema for the data exchange formatsNGSIM Metadata- This includes both traditional metadata(definitions, specificationsand valid value lists for data elements and general information about the dataset andits availability); and processing metadata(what has happened to the data from data col-lection to data archival). Administrative metadata formats were adapted fromContent Standard for Digital Geospatial Metadata(FGDC-STD-001-1998), developedby the Federal Geographic Data Committee(FGDC). Recommendations for NGSiMprocessing metadata are based on the guidance provided in ASTM E2259-03, devel-oped by the American Society for Testing and Materials(ASTm)1.0 INTRODUCTIONThe objectives of the NGsim program include the followingDevelopment of a core set of open behavioral algorithms in support of traffic simulation with a primary focus on microscopic modelingCollection of extensive data that will be used for estimation calibration and validationof the core behavioral algorithms; and storing the data in a repository that can be uni-versally accessedThe High-Level Plan for DatasetsTask E3)identified different kinds of traffic data col-lection methods and technologies and recommended three kinds of data collection effortsfor ngsim, including vehicle trajectory data wide area detector data and instrumentedvehicle dataThis report Task F)presents the documentation, format structure, and transfer requirements for the ngsim data formats for these data collection efforts identified in task e3This report is organized as followsExecutive Summary -Provides an executive summary of this documentSection1.0-Provides an overview and introduction to this report, including the con-text of the data format plan within NGsIM, information on NGsim data collection anddata types, information on data conversion, general information on data formats, anda summary of available transportation data formats and their relevance for ngsimSection 2.0-Presents definitions and categorization for different data types, and pro-vides ngsim data requirementsSection 3.0-Presents data format recommendations for the NGsim program,including a data model, data elements for the data dictionary, metadata to describe thedata collection effort and data exchange formatsReferences-Presents references used in developing this data format planAppendix a-Presents a review of existing transportation data formatsAppendix B-Presents accuracy requirements for NGSiM data collectionAppendix C- Presents a UML representation of the ngsim data modelAppendix D-Presents a high-level NGSIM data dictionaryAppendix E- Presents metadata categories, dictionary, and recommended metadataformats for ngsim1.1 HIGH-LEVEL PLAN CONTEXTInterdependencies among NGSIM tasks are shown in figure 1. The High-Level Plan forDatasets(Task E. 3) presents an assessment of existing datasets of potential use for NGSIM,and makes recommendations on the focus for nGsim data collection methodologies. Thisreport on the data Format Plan task f) provides recommendations on the data exchangeformat(s) for NGSIM data collection efforts. The data formats are also influenced by theHigh-Level Verification and Validation Plan(task e 2)Task E 1-1Core algorithmAssessmentTask e,3Task e.1-2Task e2High-LevelCore AlgorithmHigh-Level Verificationlan for DatasetsPlanandⅤ alidation planTask eData format planFigure 1 Diagram. NGSIM task interdependencies.1.2 BACKGROUNDThe NGSiM field data collection effort pursues data required for developing, estimating,calibrating and validating traffic behavioral algorithms. Tactical route execution, opera-tional driving, and en-route strategic traveler behaviors were identified as the focus of theNGSIM core behavioral algorithm research in the identification and prioritization of coreAlgorithms Task D)report. The High-Level Verification and Validation Plan(task e2)provides an example of the data collection datasets for each algorithm category as shownin table 1. the table illustrates the extent over which data must be collected for each levelof algorithm. For example, for operational driving algorithms, a single stretch of roadwayon a freeway will likely be sufficient, while, for development of tactical driving algo-rithms, the data collection effort should be expanded to include the freeway section andmultiple entry and exit ramps that feed the freeway. The data formats developed in thisplan address the data, both static and dynamic, that are pertinent to the data collectionefforts necessary for developing and validating all three categories of driver behavioralalgorithms4
    2020-12-05下载
    积分:1
  • 偏微分方的数值解法的MATLAB
    介绍了应用最为广泛的椭圆型、双曲型、抛物型偏微分方程的数值解法,而且还详细编程实现了每种方程的多种常见数值解法。附件使用MATLAB编程来实现这些算法。
    2020-12-03下载
    积分:1
  • 基于匹配追踪算法的时频滤波去噪方法
    【实例简介】地震资料信噪比是影响地震资料质量的关键因素之一!目前的去噪方法大多难以保证在去噪的同时不损 伤有效波#为此!提出了基于匹配追踪算法的时频滤波方法!该方法采用+减去,去噪方式!可以有效地去除噪 声!且不损伤有效波#匹配追踪算法的基本原理是!将任意信号分解为波形的线性延展!而这些波形是从函数的 冗余代码中选出!可以最佳匹配信号的结构#用选出的波形中代表有效信号的部分对信号进行重构!可以达到 无损去噪的目的#分别利用匹配追踪时频滤波法和4We滤波法对含有随机噪声的仿真信号进行了去噪处理!结 果表明!匹配追踪时频滤波法可以较好地去除仿真信号中的随机噪声!降低对高频信号的损伤#
    2021-11-03 00:33:06下载
    积分:1
  • 简历模板大全下载(【互联派】产品&运营简历)
    简历模板大全(【互联派】产品&运营简历)
    2020-12-07下载
    积分:1
  • ORACLE EBS R12 中文帮助文档
    oracle ebs r12中文帮助文档 CHM格式
    2020-12-04下载
    积分:1
  • Arduino 所有接口标准定义图
    Arduino 所有接口标准定义图,包含所有型号及最新Arduino Due
    2021-02-14 11:59:49下载
    积分:1
  • 大气参数计算MATLAB代码
    大气参数matlab计算代码,只需输入高度参数即可,计算可得到某一高度下的大气参数
    2020-12-08下载
    积分:1
  • 化和反归化matlab
    资源中包括归一化程序及对应的反归一化程序,test程序是对上述两种程序的测试样例。资源为个人编写,尊重知识产权
    2020-12-11下载
    积分:1
  • N76E003串口0、串口1中断序模板
    N76E003串口0、串口1中断程序模板,配置两个串口工作在模式0(半双工模式),程序由KEIL4 创建,注释清晰,已成功编译。具体程序解析,可看我博客
    2020-12-06下载
    积分:1
  • 基于模糊聚类的信号分选方法
    基于模糊聚类思想的信号分选方法 有测试数据 代码附有详细的注释,对做信号分选方面的同学有帮助
    2020-12-09下载
    积分:1
  • 696516资源总数
  • 106914会员总数
  • 0今日下载