Send a broadcast from ADB to the phone: adb shell am broadcast -a com.android.test --es test_string "this is test string" --ei test_int 100 --ez test_boolean true The following e represents the parameter extra,--es for extra is a string type,--ei represents the int type, and--ez represents the Boolean type.Making your phone play and stop music is accomplished by broadcasting:Let your phone play music:adb sh
Common commands
Devices # Viewing connected devices
Start-server # start ADB server
Kill-server # stop ADB server
Logcat # Viewing logs
Install # installs an APK
Uninstall # Uninstall an APK
Shell # Enter Terminal
Other commands
Help # View the helpful information
Version # View versions
Devices # Viewing connected devices
Forward # port forwarding
Label:Several methods for filtering adb LogCat output in the shell command line category tags: LogCat adbWe 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 severa
1. The simulation event is all done through the input command, first look at the use of the input command: (Original: http://blog.csdn.net/huiguixian/article/details/11925389)Usage:input ...Input text Input KeyEvent Input tap Input swipe 1. KeyEvent refers to the keycode of the Android counterpart, such as the Keycode=3,back key of the home key keycode=4.Please refer to Then it's easier to use it, like simu
Recently in learning Python,python can be said to write some small script of the sharp weapon syntax simple, as the most famous in the "glue language" to write some command script is very convenient.
Today I want to use Python to execute the ADB's command to install the application. Save the side of the command to play the A
1. Open the DOS command line, input adb, enter, to view the command Help.2.ADB devices return, display device list:The output for each device instance has the following fixed format:[SerialNumber] [State]022btf7n43047029 Device037c708040609357 DeviceAdb-s 022btf7n43047029 Shell to enter the device to be operated (when
causes garbage collectionPause_time pause time, one representing the start of garbage collection time, the other represents the end of the recovery of the pause timeD/DALVIKVM (9050): Gc_concurrent freed 2049K, 65% free 3571k/9991k, external 4703k/5261k, paused 2ms+2msNote the "3571k/9991k" value in this message, which represents the heap size used by the program.2. Using DDMSDdms in Eclipse provides a GUI that looks at memory usage, and when we repeatedly click Cause GC, we see the heap of the
Label:Before entering the ADB shell into the Linux shell environment in CMD, you need to open the Android emulator (this article is for the emulator, not the real machine). If the emulator is started and the Error:device not found error message appears after entering the adb shell command, you can kill the ADB process
. Run the fastboot commandThere are two methods for the mobile phone to enter fastboot mode. If your mobile phone can be identified by ADB, it can be recognized even if it is stuck on the first screen.You can run ADB devices firstRun the ADB command to access fastboot.Run ADB
code is as follows
Import OS
Os.system ("adb shell am start-n com.android.settings/.") Settings ")
The results of the operation are as follows:
starting:intent {cmp=com.android.settings/. Settings}0
Successfully enter the settings application interface, then you can try something else you want to do
Of course it just solves the problem I'm running on my PC, and when I look up the problem, I notice that Uiautomator is ultimately going to compile the
ADB command: adb shell input text input text to device (the text box where the cursor is located) adb shell input keyevent send key event to device The key event KeyCode is as follows: 0--> "Keycode_unknown" 1--> "Keycode_menu" 2--> " Keycode_soft_right "3-->" Keycode_home "4-->" KEYCODE_BACK "5--> "Keycode_call" 6--
Tags: adb logcat filterThe ADB command does not appear to be filtered directly by registration, but it can filter the application's log by filtering the PID of the process Filter Condition: The app is running Implementation principle: 1. Get the PID when the app is running 2, through the Find command, filter the log of
Go to blog 77498935 Yipianfeng_ye's Special#启动apkmessage = os.popen("adb shell am start -W -n com.qihoo.appstore/.home.MainActivity")for line in message.readlines(): if "ThisTime" in line: print(line.split(":")[1])Import Os,timeClassApp():Def__init__(self,pagename,firstactivity):"" "Construction Method" "" Self.pagename = pagename self.firstactivty= firstactivity self.content=""#执行命令的文本 self.starttime=""#启动的时间DefStartApp(self):"" "Open App" "" "cmd =
Figure is my 65535 port is occupied, the general ADB uses 5037 port by default# #方式一5037 is the ADB default port, and if 5037 ports are occupied, view the process that occupies the portPidc:\users\wwx229495>netstat-aon|findstr 5037TCP 127.0.0.1:5037 0.0.0.0:0 LISTENING 8292View all processes with PID c:\users\qq>tasklist/fi "pid eq 8292" image namePID Session Name Session # Memory Usage ====================
In the Android app development everywhere SQLite database figure. So how do you use the ADB command to manipulate the database in development?The following is a complete description of the command set associated with database operations and the various workarounds when the phone lacks sqlite3.1. How to operate the database when the phone is missing sqlite3First l
In Android, if you want to use System-restricted permissionsAndroid.permission.WRITE_SECURE_SETTINGSWe need to install the program under/system/app/.Push to System/app1.adb remount2. ADB push demo.apk System/appIf you use the. SoAfter push, the run app will appear java.lang.UnsatisfiedLinkError:Couldn ' t load locsdk3:findlibrary returned NULLSolution:1, apply the application to. So push to System/libDelete
Transfer from http://blog.csdn.net/lfyx1357/article/details/74181331. Install Android App1) Launch Android emulator2) adb install (APK on the PC Path/) *.apk (upload the apk file to the Data/app directory with the emulator's own operating system)3) Browse open APK app in Android emulator interface2. Remove Android AppThere are several ways to remove Android.The first type: command line with UninstallThe pac
Most Android execution adb shell commands require root privileges, Android comes with the runtime. GetRuntime (). EXEC () is prone to error and finds a class that executes the adb shell command on the WebThe code is as follows:/** Check if the phone has root privileges, send some messages */Package com.dx.superbar.util;Import Java.io.DataOutputStream;Import Java.
Label:Configure the ADB command on your MacWhen you use the ADB command in Mac OS, you should configure the variables as follows:First, the terminal input CD ~Second, enter touch. Bash_profile returnTouch: If not, create a file, if any, update the file timeThird, input open-e. bash_profileOpen: Opening fileThe file wil
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.