ADB provides wireless debugging over Wi-Fi. To enable it follow the steps below.
1. adb devices - You’ll get your device signature if it is connected to the USB
2. adb tcpip 5555 - This will open a port (open the wireless service)
3. Find the IP address of your Android device by going into the device Wi-Fi settings, mine is 192.168.10.10
adb connect 192.168.10.10:5555Now you can disconnect your phone from the computer and still get the debug messages from your program over wi-fi . Filter your logcat
5. Type adb logcat -s “YOUR_PROGRAM_TAG”
adb logcat -s <tag>
To get back to USB debugging
adb usbIn the native VRLib code, messages can generally be printed using the LOG() macro. In most source files this is defined to pass a tag specific to that file. Log.h defines a few additional logging macros, but all resolve to calling __android_log_print().
Logcat will not necessarily be running when an application crashes. Fortunately, it keeps a buffer of recent output, and in many cases a command can be issued to logcat immediately after a crash to capture the log that includes the backtrace for the crash:
adb logcat > crash.log
Simply issue the above command, give the shell a moment to copy the buffered output to the log file, and then end adb (Ctrl+C in a Windows cmd prompt or OS X Terminal prompt). Then search the log for “backtrace:” to locate the stack trace beginning with the crash.
If too much time as elapsed and the log does not show the backtrace, there a full dump state of the crash should still exist. Use the following command to redirect the entire dumpstate to a file:
adb shell dumpstate > dumpstate.log
Copying the full dumpstate to a log file usually takes significantly longer than simply capturing the currently buffered logcat log, but it may provide additional information about the crash.
The backtrace in a logcat capture or dumpstate generally shows the function where the crash occurred, but does not provide line numbering. To get more information about a crash, the Android Native Development Kit (NDK) must be installed. When the NDK is installed, the ndk-stack utility can be used to parse the logcat log or dumpstate for more detailed information about the state of the stack. To use ndk-stack, issue the following:
ndk-stack -sym <path to symbol file>-dump<source log file>> stack.log
For example, this command:
ndk-stack -sym VrNative\Oculus360Photos\obj\local\armeabi-v7a -dump crash.log > stack.log
uses the symbol information for Oculus 360 Photos to output a more detailed stack trace to a file named stack.log, using the backtrace found in crash.log.
you may want to adb install apk through WIFI
adb connect 192.168.10.235:5555 adb install "E:\Documents\Unreal Projects\GearVR\APK\Android_ETC2\GearVR-armv7-es2.apk" or adb -r install "E:\Documents\Unreal Projects\GearVR\APK\Android_ETC2\GearVR-armv7-es2.apk"if u want to uninstall it, then try this:
//adb uninstall <package> adb uninstall com.YourCompany.GearVR or uniostall apk butu keep the data and cache files: //adb uninstall -k <package> adb uninstall -k com.YourCompany.GearVR
watch the CPU and Mermory cache used:
adb shell top
You may have this issue:
Eliran Kuta ‘s world, Imagine everything is double check over and is okay. then you may need to check like this:
1、Make sure that Aggressive Wi-Fi to Cellular handover
under Networking section in the device's developer options is tured off.
2、ping continously from your pc to the device to make sure it's not in network idle mode ping -t 192.168.1.10
(windows cmd), unlock the device and even try to surf to some website just to make it get out of the network idle.
3、When it replies to the ping, connect it via usb, and:
adb usb
adb tcpip 5555
//adb connect <DEVICE_IP_ADDRESS>:5555
adb connect 192.168.10.1:5555
4、In casr it's still not connected, try to switch the usb connection mode as MTP / PTP / Camera while the device is connected through usb and repeat these steps over again...
or trying "adb kill-server", or "adb disconnect <DEVICE_IP_ADDRESS>"
then do it again.
error: device offline
2.Set USB Debugging OFF.
3.In Terminal write : adb kill-server
4.Then : adb start-server
5.Then : adb connect xx.xx.xx.xx:5555 (the devices ip), it should say unable to connect.
6.Now turn ON USB debugging again and type the adb connect xx.xx.xx.xx:5555 again.
It should now ask for authorization and you are back online without needing to connect cable to USB, only wifi.
0.0.0.0/24 via 192.168.1.1 dev eth0
192.168.0.0/24 dev wlan0 proto kernel scope link src 192.168.0.109
192.168.1.0/24 dev eth0 proto kernel scope link src 192.168.1.151
ifconfig eth0 [IP] netmask [NETMASK]
route add default gw [GATEWAY] dev eth0
setprop net.eth0.dns1 8.8.8.8
setprop net.eth0.dns2 4.4.4.4
getprop
//eth0 UP [IP ADDR] [NETMASK] 0x00001043