The devicename value is obtained:
devicename=192.168.137.150:5555 IP: Mobile IP address, port, open by the following command
# adb devices//View current connected devices
# adb TCPIP 5555//Open 5555 Port
# ADB Connect 192.168.137.150//Connect your phone to see if you can connect
# ADB devices//re-view current connected devices
Reference Address: Http://adbshell.com/commands/adb-connect
Element Locator Tool: Use the Android SDK's own tool locator: D:\Android\sdk\tools\uiautomatorviewer.bat
Get Apppackage: Unzip the APK installation package and then go to Androidmanifest.xml to search: Manifest gets the package name
Get app activity: launch the app and then cmd the console query:
#adb Shell
#dumpsys Activity | grep mfocusedactivity
Use when you have multiple devices: adb-s devicesid Shell
The ADB shell is not an internal command:
-No environment variables are configured, this only needs to be installed on Android: for example C:\Program File\android-sdk-windows\tools added to the system variable path;
Devicename,apppackage,appactivity access to the app