OverviewADB as a tool for interacting and communicating with PC and Android devicesAndroid Debug Bridge, Android Debugbridge, it is a CS Architecture command-line tool, the role of the PC through the ADB to operate the phoneThe composition of the ADBClient: All commands are PC-initiated and can be installed, uninstalled, and debugged for Android apps (multiple windows or programs can send commands)Server: Manages the client's connection to the ADB background process on the Android device (comman
Simulate some interfaces that can be used to test the interface before it is successfully developedUsed to query data1. First interfaceImportFlask,json#__name__, which represents the current Python fileServer=flask. Flask (__name__)#take this Python file as a service#Ip:8000/index?uge@server. Route ('/index', methods=['Get','Post'])#can only write one, then only support that onedefindex (): Res={'msg':'This is the first interface to develop','Msg_code': 0}returnJson.dumps (res,ensure_ascii=False
Software:Pip Install PYZMQCode:==server.py## Hello World Server in Python# binds REP socket to tcp://*:5555# expects "Hello" from the client, replies with "World"#Import ZMQImport timeContext = Zmq. Context ()Socket = Context.socket (ZMQ. REP)Socket.bind ("tcp://*:5555")While True:# Wait for next request from clientmessage = SOCKET.RECV ()Print ("Received Request:", message)# do some ' work 'Time.sleep (1)
:1ServerSocket SS =NewServerSocket (5555);2Socket socket =ss.accept ();3PrintStream PS =NewPrintStream (Socket.getoutputstream ());4PS.PRINTLN ("Server side: Open source China Hangzhou Forum");5PS.PRINTLN ("Server side: Hangzhou G20 Summit");6 //closes the output stream, indicating that the output has ended7 socket.shutdownoutput ();8 //determine if the socket is closed9 System.out.println (socket.isclosed ());TenScanner scan =NewScann
Encounter a problem: Yesterday the simulator is working properly, and eclipse is not recognized today. Later found to be 360 mobile phone assistant occupied 5555 port caused by, I wonder, usually this is not automatic start, today started. Needless to say, just a few steps will solve a similar port occupancy problem:Open a Command window, enter Netstat-an to see all the port occupancy, as shown in the simulator requires
is not specified, the ANDROID_PRODUCT_OUT environment variable is used. But it must be an absolute path.Devices-list All connected devicesUse this command to list all connected devicesConnect Port 5555 is used by default if No. port number is specified.Connecting devices via the default port of TCP/IP 5555来disconnect [Port 5555 is used by default if No. port num
By default, the Docker daemon generates a socket (/var/run/docker.sock) file to process local process traffic without listening to any ports, so you can only use the Docker client locally or use the Docker API to do so.If you want to operate a Docker host on another host, you need to have the Docker daemon listen to a port for remote communication.Modify the Docker service startup configuration file, add an unused port number, and restart the Docker daemon.
# Vim/etc/default/docker
Preg_match_all ("/\d*/", "5555", $images);
The output $images array is: Array ([0] = = Array ([0] = 5555 [1] = =))
Why there is an empty index in a two-dimensional array!
Reply to discussion (solution)
Looks like there's no match.
Var_dump ($images);Array (1) {[0]=>Array (2) {[0]=>String (4) "5555"[1]=>String (0) ""}}Because your rule is \d* * indicates a m
[:
]-connect to a device via TCP/IP
port 5555 is used by default if no port number is specified.
Use the default port 5555 of TCP/IP to connect to the deviceDisconnect [Port 5555 is used by default if no port number is specified.Using this command with no additional argumentsWill disconnect from all connected TCP/IP devices.
You
check is performed for all client requests. If a permission restriction is set on the previous node, once this header is opened on the server, it will also become invalid.forceSync# This parameter determines whether FileChannel. force needs to be called when transaction logs are submitted to ensure full data synchronization to the disk.jute.maxbuffer# The maximum data volume of each node. The default value is 1 MB. This restriction takes effect only when both the server and client are configure
Unity Android real machine debugging, unityandroid
Official Document https://docs.unity3d.com/Manual/AttachingMonoDevelopDebuggerToAnAndroidDevice.html
However, according to the official documentation, many people will see no device problems in the monodevelop Attach to Process dialog box.
After some tests, I found a solution.Process 1: Enable adb and then enable unity
Do not open unity before starting work every day, but set adb before opening unity and monodevelop. Next, let's talk about how
bind the same port to multiple sockets, as long as a different Betty IP address is specified each time. So I guess: when the port of an IP address is exhausted, I can select another IP address to send messages. First, write the following code for verification: Python code from socket import * from time import * s1 = socket (AF_INET, SOCK_STREAM) # s1.setsockopt (SOL_SOCKET, SO_REUSEADDR, 1) s1.bind ('2017. 168.0.35 ', 5555) s1.connect ('2017. 0.0.1 '
The preg_match_all () problem cannot be solved! Preg_match_all ("/\ d */", "5555", $ images );
Output $ images Array: Array ([0] => Array ([0] => 5555 [1] => ))
Why is there an empty index in the two-dimensional array!
Reply to discussion (solution)
It seems that there is no matching
Var_dump ($ images );Array (1 ){[0] =>Array (2 ){[0] =>String (4) 5555"[1] =>
By default, the Docker daemon generates a socket (/var/run/docker.sock) file for local process communication without listening to any ports, so you can only use the Docker client locally or use the Docker API to do the operation.If you want to operate the Docker host on another host, you need to have the Docker daemon listen on a port to enable remote communication.
Modify the Docker service startup configuration file, add an unoccupied port number, and restart the Docker daemon.
# Vim/etc/def
Tags: config The restart net boot BCD CTE Sam TACSTEP1:Phone PC connect the same wifi.STEP2:Phone use USB cable to connect PC.Step 3:$ adb devices
List of devices attached
0123456789ABCDEF deviceStep 4:$ adb usb
restarting in USB modeStep 5:$ adb tcpip 5555
restarting in TCP mode port: 5555Step 6:$ adb shell ifconfig
wlan0 Link encap:UNSPEC
inet addr:192.168.43.74
............Step 7:$ adb connect 192.168.43.74:
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.