Using the ADB command in Python, you can import an OS module.
1 simple adb order.
such as: Os.system (' adb version ')
2 A somewhat complicated adb order.
such as: Os.system (' adb shell ' dumpsys activity | grep "Mfocusedactivit
Use the cmd command Netstat-ano to see which PID process is occupied by Port 5037, and then go to Task Manager to view the corresponding process for that PID.To use the ADB command, first configure the environment variable, set the environment variable name: Adbpath,d:\java\adt-bundle-windows-x86-20131019\sdk\platform-tools, and will%adbpath%; Add to PathReview C
How to add the ADB command from the Android SDK to the environment variable on Mac Pro will be explained here!Method/Step
1Start the terminal, you can search for "terminal" in spotlight
2Enter the current user's home directory with the following command:CD $HOME
3Update the. bash_profile file (when the file exists), if the file does not exist, you can create it with the following command:Touch. Bash
LogCat is stored in a buffer called circular memory buffers.Usually, you can use the logcat plug-in provided by eclipse to view logcat,In fact, you can also use commands to export logcat so that you can view logcat in certain situations,The following is a simple usage command:
adb logcat -d > logcat.txt
Refer to the materials searched on the Internet and the development practices you have developed some tim
We can always see the log log content of the program is full of screens in the Android development, and the information that really makes sense to the developer is submerged in the torrent, so that the developers are at a loss and seriously affect the development efficiency. This article describes several methods of filtering adblogcat output in the shell command line. 1, only show the required output (whitelist) The most convenient of course is throu
%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%:: Creating a DirectoryMD%y%:: Export the image toADB pull/sdcard/screen.png%y%:: Delete the image cut from the phoneADB Shell Rm-r/sdcard/screen.png:: Du recorder screen commandset/p t= Please enter time (seconds): 5adb shell Screenrecord--time-limit%t%/sdcard/view.mp4@ping-N 5 127.1 >nul 2>nul:: Change the directory of the current directory to the batch itselfcd/d "%~dp0":: Gets the current timeSet y=%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time
Install ADT Development Tools on the Ubuntu system on the virtual machine, configure the environment to import the Android project error:The ADB command could not be found:Ubuntu 12.04 64-bit settings compatible with 32-bit implementationsRef:http://www.2cto.com/os/201210/159883.htmlMy Configure is as follows:1. **newwork setting:etc/apt/apt.conf2. Sudo echo "Deb http://archive.ubuntu.com/ubuntu/raring main
In Android, in addition to starting a program from the interface, you can also start the program from the command line, using the command line tool AM.
Enter am -- help in the work area of the ADB Tool
Bytes ------------------------------------------------------------------------------------------------------------------
Bash-3.2 # Am -- HelpUsage: am [subcomman
1. Make sure your phone is connected to your computer and start debugging2. Input command: adb logcat *:e >c:\log.txt:"E" means log log levelADB log log level:
Each output of the Android log information has a label and its priority.·the label of the log is a brief indication of the original information of the system part. (For example,"View" is to view the system's label).·priority has the foll
Open the name of the app package you want to view:$ adb shell Dumpsys Activity Top | Head-n 10TASK com.ss.android.article.news id=5 ACTIVITY com.ss.android.article.news/ Com.ss.android.article.base.activity.DetailActivity 4407b468 pid=2714 Local fragmentactivity 42df3028 State: mcreated=truemresumed=true mstopped=false mreallystopped=false mloadersstarted=true FragmentManager Misc State: [email protected]df3028 [email protec
-Get program startup information, get package nameADB Logcat | grep START-Cold start app (cold start refers to the first time the app starts in a mobile device)/hot start (the app presses the home key or the back button to back up the background)ADB shell am start-w-n com.android.browser/. Browseractivity (Package name w must be capitalized)-Cold boot Exit appADB shell am force-stop com.android.browser (package name)-Hot start Exit appADB shell Input
Today, when you debug your phone, there is an error executing adb rootError:insufficient Permissions for deviceWhether it's changing the data cable or restarting the phone is not useful,After Baidu a bit, finally found a solutionFirst execute the LSUSB commandThen find the record of your linked phone, such asBus 001 Device 107: ID 0fce:51e1 phone model Communications ABGo to the/ETC/UDEV/RULES.D pathThen find a file similar to 50-android-usb.rulesIn t
A20 adb shell Command implementation hard disk partition 1' input busybox fdisk/dev/block/sda; 2' in Command (m for help): Then input m to view help; command (m for help ): mmCommand Actiona toggle a bootable flagb edit bsd encrypt toggle the dos encrypt flagd delete a previous list known partition typesn add a new par
1.win+r cmd into the command line2.CD Enter the [Sdk]/platform-tools directory3. Execute the following command line, copy xxx.db to F:/destADB pull/data/data/[package name]/xxx.db F:\dest4. Yes, this step will normally be an error "failed to copy xxx.db to F:\dest\dest.db:permission denied"The reason is insufficient authority5. Only use shell command to add Read
Tags: android style http color using AR java for strongWe can always see the log log content of the program is full of screens in the Android development, and the information that really makes sense to the developer is submerged in the torrent, so that the developers are at a loss and seriously affect the development efficiency. This article describes several methods of filtering adb logcat output in the shell com
1. ADB copy (push) file to device: ①adb Shell②CD mnt③CD SDcard④mkdir MyFile⑤exit⑥adb Push d:\aaa.txt/mnt/sdcard/myfile/ If the folder already exists, you do not have to create it.2.ADB Install local application :First, go to the folder where the app is located, such as: [Email protected]:/mnt/sdcard/myfile #Execute
Tags: cat esc das Start key combination Flex write lock ROP intADB command analog key input KeyCodeMay 18, 2017 14:57:32Hits: 1883Example:This command is equivalent to pressing the Backkey key of the device.ADB shell Input KeyEvent 4You can unlock the screenADB shell Input KeyEvent 82Screen operation, the first four numbers are coordinate points, followed by the sliding time (in milliseconds)
phone screen)/1602 (max in event 0035) = 0.674Rateh = 1920 (high on the phone screen)/2503 (max in event 0036) = 0.767Step Two: Click on the screen to calculate the coordinates of the click positionADB Shell GetEvent | Grep-e "0035"-E "0036"Click on the desired location on the screen and the following output will be available:/dev/input/event0:0003 0035 00000341/dev/input/event0:0003 0036 000008ecConverts the position data from 16 to 10 in the back of 0035 and 0036width = 0x341 = 3*16*16 + 4*16
The memory of the android program is divided into two parts: Native and Dalvik. Dalvik is the Java heap we usually call. The objects we create are allocated here, bitmap is directly allocated on native. The memory limit is that native + Dalvik cannot exceed the maximum limit. The memory size of Android programs is generally limited to 16 MB, of course there are also 24 MB.
Run the following command to view the memory usage of the program:
The memory of the android program is divided into two parts: Native and Dalvik. Dalvik is the Java heap we usually call. The objects we create are allocated here, bitmap is directly allocated on native. The memory limit is that native + Dalvik cannot exceed the maximum limit. The memory size of Android programs is generally limited to 16 MB, of course there are also 24 MB. Run the following command to view the memory usage of the program:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.