What information can we retrieve from dumpsys shell command and how we can use it Possibility to use dumped CPU, RAM, Battery, storage stats for a pretty charts, which will allow you to check how your application affects the overall device!.Possibility to easily get system information in a simple string representation.Send the picture to the computer : Get into adb shell In the middle of adb pull /sdcard/sc.Android开发中,常常可以用 adb shell dumpsys 这条命令来dump出系统运行时的状态信息,例如可以这样来察看某个应用的内存使用信息ĭumpsys is an android tool that runs on the device and dumps interesting information about the status of system services. p Specify the storage path ( route :/sdcard/sc.png) Get the system version number adb shell getprop ro. Get the power consumption of the package name application adb shell dumpsys batterystats Package name | more Mobile phone power display 1%:adb shell dumsys battery set level 1 Mobile phone power display 100%:adb shell dumsys battery set level 100 Switch the mobile phone battery to non charged state :adb shell dumsys battery set status 1 Get battery information adb shell dumpsys battery Push from the computer to the mobile phone adb push d:\pushlog dev/logĭownload files from your mobile phone adb pull /dev/log/erro.log d:\Īndroid Is based on linux kernel, So in shell It can be used in linux The order of Mobile phones and computers copy files from each other View the running package name :adb shell dumpsys windown | findstr mCurretFocus View the currently active package information :adb shell dumpsys activity View all app package names :adb shell pm list packages The output log includes logcat journal, It also includes power consumption ,cpu And other information logsĭelete all data associated with the package :adb shell pm clear Output the specified level log :adb logcat *:E Logcat It is a real-time log, That is, in the process of outputting logs, If you operate the software, The log will also be output You can also output the specified log to a file adb logcat -b main > D:\main.log If you use logcat Do not specify the log of that buffer, Default output main and system Log, If you need to specify, Then useĪdb logcat -b Output the specified buffer log, such as adb logcat -b main Main: Refers to the mobile application log, Is the application log outputĮvent: It means that the time log such as the key output of the mobile phone Radio: Keep the communication log, For example, call SMS, etc Mobile phone four buffer logs, Include (radio,system,main,event) View device ( At present ) Connection status adb get-state state : abnormal : Abnormal connection of equipment :offline normal :device No device connected :unknown Step1 decompression Android SDK To the specified directory Step2 Add a new system environment variable ANDROID_HOME, The value is SDK Corresponding directory after decompression Step3 stay path Add ADB route :%ANDROID_HOME%/platform-tools common ADB command SDK Environment variable configuration ADB Included in Android SDK Platform tool package, Need configuration SDK Environment variables of. Server: Manage communication between clients and daemons, The server runs as a background process on the development server. adbd: Run commands on the device, Daemons run as daemons on each device. ĪDB Components and working principle ADB(Client)-ADB(Server)-adbd(ADB Daemon) Client: Used to send commands, The client runs on the development computer, You can send adb Command to call the client from the command line terminal. Provide convenience for the operation of various equipment ,Īnd to provide for shell( Can be used to run various commands on a connected device or simulator ) Access rights of. It is used to communicate with Android devices through the computer ( Including simulators ) Interact with each other. ADB Introduce ADB(Android Debug Bridge),Android Commissioning Bridge, Is a command window tool ,
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |