diff --git a/screencast/Android.bp b/screencast/Android.bp new file mode 100644 index 0000000..80ab70f --- /dev/null +++ b/screencast/Android.bp @@ -0,0 +1,132 @@ +cc_prebuilt_library_shared { + name: "libacrn_dm_backend", + arch: { + x86_64: { + srcs: ["libacrn_dm_backend.so"], + }, + }, + shared_libs: [ + "libEGL", + "libGLESv3", + "liblog", + "libz", + "libsync", + "libc", + ], + + strip: { + none:true, + }, + allow_undefined_symbols: true, + check_elf_files: false, +} + +android_app_import { + name: "DmBackendApp", + + // this needs to be a privileged application + privileged: true, + + // Make sure the build system doesn't try to resign the APK + dex_preopt: { + enabled: false, + }, + + arch: { + x86_64: { + apk: "DmBackendApp.apk", + }, + }, + presigned: false, + certificate: "platform", + apex_available: [ + "//apex_available:platform", + "com.intel.dm_backend", + ], +} + +cc_prebuilt_library_shared { + name: "libCastFrontClientJni", + arch: { + x86_64: { + srcs: ["libCastFrontClientJni.so"], + }, + }, + shared_libs: [ + "liblog", + ], + + strip: { + none:true, + }, + allow_undefined_symbols: true, + check_elf_files: false, +} + +android_app_import { + name: "ScreenCastClient", + + // this needs to be a privileged application + privileged: true, + + // Make sure the build system doesn't try to resign the APK + dex_preopt: { + enabled: false, + }, + + arch: { + x86_64: { + apk: "ScreenCastClient.apk", + }, + }, + presigned: false, + certificate: "platform", + apex_available: [ + "//apex_available:platform", + "com.intel.screencastfrontclient", + ], + +} +cc_prebuilt_binary { + name: "dm-backend", + srcs: ["dm-backend"], + shared_libs: ["libEGL", "libGLESv3", "libandroid", "liblog", "libsync", "libz"], + check_elf_files: false, +} +cc_prebuilt_binary { + name: "acrn-bkend-server", + srcs: ["acrn-bkend-server"], + shared_libs: [ + "libEGL", + "libGLESv3", + "liblog", + "libz", + "libsync", + "libc", + "libandroid", + ], + check_elf_files: false, +} +sh_binary { + name: "open-node", + src: "open-node.sh", + filename_from_src: true, +} +cc_prebuilt_binary { + name: "probe-node", + srcs: ["probe-node"], + shared_libs: [ + "liblog", + "libz", + "libsync", + "libc", + "libandroid", + ], + check_elf_files: false, +} +cc_prebuilt_binary { + name: "VirtualDisplayDemo", + srcs: ["VirtualDisplayDemo"], + shared_libs: ["libEGL", "libGLESv3", "libandroid", "liblog", "libsync", "libz"], + check_elf_files: false, +} diff --git a/screencast/DmBackendApp.apk b/screencast/DmBackendApp.apk new file mode 100644 index 0000000..2fd1ce4 Binary files /dev/null and b/screencast/DmBackendApp.apk differ diff --git a/screencast/ScreenCastClient.apk b/screencast/ScreenCastClient.apk new file mode 100644 index 0000000..7890c02 Binary files /dev/null and b/screencast/ScreenCastClient.apk differ diff --git a/screencast/VirtualDisplayDemo b/screencast/VirtualDisplayDemo new file mode 100755 index 0000000..b9b168d Binary files /dev/null and b/screencast/VirtualDisplayDemo differ diff --git a/screencast/acrn-bkend-server b/screencast/acrn-bkend-server new file mode 100755 index 0000000..b37a9db Binary files /dev/null and b/screencast/acrn-bkend-server differ diff --git a/screencast/dm-backend b/screencast/dm-backend new file mode 100755 index 0000000..4473757 Binary files /dev/null and b/screencast/dm-backend differ diff --git a/screencast/libCastFrontClientJni.so b/screencast/libCastFrontClientJni.so new file mode 100755 index 0000000..8d0f164 Binary files /dev/null and b/screencast/libCastFrontClientJni.so differ diff --git a/screencast/libacrn_dm_backend.so b/screencast/libacrn_dm_backend.so new file mode 100755 index 0000000..66d56da Binary files /dev/null and b/screencast/libacrn_dm_backend.so differ diff --git a/screencast/open-node.sh b/screencast/open-node.sh new file mode 100755 index 0000000..f98cf56 --- /dev/null +++ b/screencast/open-node.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +value=$(getprop | grep 'ro.boot.vm' | awk -F'[][]' '{print $4}') + +if [ "$value" == "3" ]; then + echo "VM3" + echo "1af4 1110 8086 202" > /sys/bus/pci/drivers/ivshm_ivshmem/new_id + chmod 666 /dev/ivshm0* +elif [ "$value" == "1" ]; then + echo "VM1" + echo "1af4 1110 8086 200" > /sys/bus/pci/drivers/ivshm_ivshmem/new_id + chmod 666 /dev/ivshm0* + echo "1af4 1110 8086 201" > /sys/bus/pci/drivers/ivshm_ivshmem/new_id + chmod 666 /dev/ivshm1* +else + echo "no ivshm config" +fi + +# Set udmabuf list limit and change permissions +echo 8192 > /sys/module/udmabuf/parameters/list_limit +cat /sys/module/udmabuf/parameters/list_limit +chmod 666 /dev/udmabuf + +# Create IPC directory and change permissions + +SOCKET_DIR="/dev/socket" +SOCKET_SERVER="$SOCKET_DIR/virt_disp_server" +SOCKET_CLIENT="$SOCKET_DIR/virt_disp_client" +LCS_SOCKET_SERVER="$SOCKET_DIR/virt_disp_server_lcs" +LCS_SOCKET_CLIENT="$SOCKET_DIR/virt_disp_client_lcs" + +if [ -f "$SOCKET_SERVER" ]; then + rm -f "$SOCKET_SERVER" +fi +touch "$SOCKET_SERVER" +chmod 777 "$SOCKET_SERVER" + +if [ -f "$SOCKET_CLIENT" ]; then + rm -f "$SOCKET_CLIENT" +fi +touch "$SOCKET_CLIENT" +chmod 777 "$SOCKET_CLIENT" + +if [ -f "$LCS_SOCKET_SERVER" ]; then + rm -f "$LCS_SOCKET_SERVER" +fi +touch "$LCS_SOCKET_SERVER" +chmod 777 "$LCS_SOCKET_SERVER" + +if [ -f "$LCS_SOCKET_CLIENT" ]; then + rm -f "$LCS_SOCKET_CLIENT" +fi +touch "$LCS_SOCKET_CLIENT" +chmod 777 "$LCS_SOCKET_CLIENT" + +restorecon "$SOCKET_SERVER" +restorecon "$SOCKET_CLIENT" +restorecon "$LCS_SOCKET_SERVER" +restorecon "$LCS_SOCKET_CLIENT" + +chown root /system/bin/probe-node +chmod u+s /system/bin/probe-node diff --git a/screencast/probe-node b/screencast/probe-node new file mode 100755 index 0000000..180f433 Binary files /dev/null and b/screencast/probe-node differ