Android Studio uses the adb wifi plug-in to implement real-machine wireless debugging and androidadb
It is always used as a simulator, and the garbage memory of a small version is unbearable. At the same time, most of the simulator versions are stopped at 4.4, which cannot reflect the features of Android 5.0 and 6.0, therefore, we decided to use the
http://blog.csdn.net/deng529828/article/details/206461971. The phone must have root privileges2. Download Tcpdump http://www.strazzere.com/android/tcpdump3. ADB Push C:\wherever_you_put\tcpdump/data/local/tcpdumpIf this step does not push the real machine, you can use ADB push c:\where_you_put\tcpdump/sdcard, that is, the file into a folder that does not require permission, here with SDcard, and then upload
There is a millet 2A in the hand because the USB port is damaged, can not use the USB cable debugging development, see online said can use WiFi connection debugging, record the method and encountered problems.
The first stepMobile phone installation WiFi ADB : Https://play.google.com/store/apps/details?id=com.ttxapps.wifiadbStep TwoPerform on the computeradb connect 172.27.35.2 //IP替换为手机
network card, please prohibit a wireless network card
12, a wireless network card, there are 2 virtual wireless network card, please prohibit a virtual wireless network card
13, the mobile phone system, in the use of XP system, Android mobile phone, the phone must be root after the support of Adhoc to use the software
14, the computer system version. WIN7 Home version does not support the software, XP does not support two-time packaging system
15
Pre-preparation: My Linux Mint operating system (in short toss the process of suspected is not a system problem), the first is to create a WiFi hotspot for Android phone use, this time notebook as a communication server side, Android phone as a client, communicates through the socket.1. Write the server-side code under Eclipse, including listening port good, clie
I forgot my data line at the company. I found a way to debug the android program using wifi and wrote down the backup.
1. First, let the android phone listen to the specified port:This step requires the use of shell, so there must be a terminal simulator on the mobile phone, but there are a lot of online, just find one
Obtain the current network type (2g, 3g, 4g, wifi), mobile phone model, and version number of Android.Obtain the mobile phone model: android. OS. build. MODEL: android. OS. build. VERSION. the code used to obtain the current network type of the mobile phone is as follows: This is a tool class, which can be saved for easy use.
Package com. iqtogether. qxueyou. sup
Android system debugging wifi SummaryI. Environment
Platform: CES-C110 Platform
Processor: CortexTM-A8 kernel CPU S5PC110
System: android2.2Ii. Problems
# Wpa_cli-iwlan0
Appearance: cocould not connect to wpa_supplicant-re-trying
This error may be caused by the failure to start your wpa_supplicant process.
See the following command:1) modify the wpa_supplicant.conf File
Comment out all the content and leave
Apprentice father guidance, today learned to use the WiFi debugging program, haha, mom no longer worry about the data line problem (only Eclipse,as have not tried, do not know whether it is feasible)The steps are simple:But before the start, or with a mobile phone connection, the following steps are completed, you can unplug the data line.1, Win + R Open run2. In
The data cable is lost and I don't want to spend any money to buy it. I checked it online. The Android mobile phone can debug the program through WiFi. That's great. I did it myself. Although the data on the Internet is very detailed, but there are still some problems. Record them and refer to them next time.
1. First
) { return true; } return Super. onoptionsitemselected (item); }}PC Client code:/**PC-side code PC as client, connect server based on server IP address and port number*/Importjava.net.*;ImportJava.io.*; Public classpc_client{ Public Static voidMain (string[] args)throwsIOException {//SOCKET socket = new Socket ("192.168.47.1", 30000);//Here's the IP address to fill out the IP address of the mobile serverSocket socket =NewSocket ("192.168.1.114", 30000);//Here's the IP address t
If the data cable is lost and you don't want to spend any money to buy it, you can check it online. Android phones can actually use wifi.ProgramDebugging, too good. I did it myself. Although I wrote a lot of details on the Internet, there are still some problems. I will record them and refer to them next time.
1. First, let the Android phone listen to the specif
Requirement: count the number of Wi-Fi/2G/3G/4G traffic
Issue:
1. How to Determine 2G/3G/4G
The system source code TelephonyManager class provides methods, but only hidden, so you can refer to the source code
Ii. How to make statistics
The TrafficStats class is provided after Android 2.2 for traffic statistics. For more information, see the manual.
Here I used
Static long getTotalRxBytes () // obtain the total number of accepted bytes, including Mob
How to obtain the Internet ip address of wifi for android
// Get the Internet IPpublic static String GetNetIp () {URL infoUrl = null; InputStream inStream = null; try {// http://iframe.ip138.com/ic.asp// infoUrl = new URL (http://city.ip138.com/city0.asp ); infoUrl = new URL (http://ip38.com); URLConnection connection = infoUrl. openConnection (); HttpURLConnection httpConnection = (HttpURLConnection) conne
notified to stop the process with an error. Note that the process ends normally (successfully) and does not stop. The device simply remains in the final state after the event ends.
-- Monitor-native-crashesMonitors and reports crash events of local code in the Android system. If -- kill-process-after-error is set, the system stops running.
-- Wait-dbgStop the running Monkey until a debugger is connected to it.
Next, let's look at an instance.
Monkey
Android annotation usage (image and text) and android usage
While using the SSH framework of Java, I have been lamenting that annotations are really convenient. For the principles of annotations, you can refer to my other article Java annotations for details. I have recently studied the use of
ends normally (successfully) and does not stop. The device simply remains in the final state after the event ends.
-- Monitor-native-crashesMonitors and reports crash events of local code in the Android system. If -- kill-process-after-error is set, the system stops running.
-- Wait-dbgStop the running monkey until a debugger is connected to it.
Next, let's look at an instance.
Monkey usage is $ ADB shell
[Development Diary of Android in a row from scratch] (8) -- Android data storage (II) and android Data StorageLet's talk about database operations. Come On!When talking about data storage, databases have to be mentioned. Databases
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.