-
Notifications
You must be signed in to change notification settings - Fork 99
wfd command line
RC3 edited this page Jun 26, 2013
·
12 revisions
Wi Fi Display test tool.
Connect two Android >= 4.2 devices through Wi-Fi network, not p2p.
- wfd src /frameworks/av/media/libstagefright/wifi-display/wfd.cpp
- binary /system/bin/wfd
"usage"
" -l ip[:port] listen on the specified port (create a source)"
" -c host[:port] connect to wifi source (create a sink)"
" -u uri connect to an rtsp uri"
- Two Android >= 4.2 devices
- Rooted!
- 4.2.2 wfd source code.
- Log.w(TAG, "4.2.1 wfd source code is not implemented Source invoke function!");
- android-4.2.1_r1.2 version wfd - Invoke a Sink.
- Log.w(TAG, "4.2.1 wfd source code is not implemented Source invoke function!");
In my opinion, nexus devices is better.
C:\> adb root
C:\> adb remount
C:\> adb shell ls -l /system/bin/wfd
-rwxr-xr-x root shell 21868 2013-06-20 17:41 wfd
C:\> adb shell chown root:root /system/bin/wfd
C:\> adb shell chmod 7777 /system/bin/wfd
C:\> adb shell ls -l /system/bin/wfd
-rwsrwsrwt root root 21868 2013-06-20 17:41 wfd
apply sticky bit to wfd.
Connect your device to PC via usb(adb).
$ adb shell netcfg
wlan0 UP 192.168.1.2/24 0x00001043 12:34:56:78:90:ab <-- your device IP address.
$ adb shell wfd -l 192.168.1.2:20000
listen
Connect another device to PC via usb(adb).
$ adb shell netcfg
wlan0 UP 192.168.1.3/24 0x00001043 ab:90:78:56:34:12 <-- your device IP address.
$ adb shell wfd -c 192.168.1.2:20000 <-- Source device IP Address != your device IP address
connect to source
,
,
static void createSource(const AString &addr, int32_t port);
static jint nativeListen(JNIEnv* env, jobject remoteDisplayObj, jstring ifaceStr);
These 2 functions so similar. WFD command is shortcut to invoke WifiDisplaySource. More, more detail describes "Wireless display connect" section.
WFD instantiated WifiDisplaySink class. Any other classes is not instantiating WifiDisplaySink class in android-4.2.2_r1.2 version.
sp<WifiDisplaySink> sink = new WifiDisplaySink(session);