Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 132 additions & 0 deletions screencast/Android.bp
Original file line number Diff line number Diff line change
@@ -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,
}
Binary file added screencast/DmBackendApp.apk
Binary file not shown.
Binary file added screencast/ScreenCastClient.apk
Binary file not shown.
Binary file added screencast/VirtualDisplayDemo
Binary file not shown.
Binary file added screencast/acrn-bkend-server
Binary file not shown.
Binary file added screencast/dm-backend
Binary file not shown.
Binary file added screencast/libCastFrontClientJni.so
Binary file not shown.
Binary file added screencast/libacrn_dm_backend.so
Binary file not shown.
62 changes: 62 additions & 0 deletions screencast/open-node.sh
Original file line number Diff line number Diff line change
@@ -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
Binary file added screencast/probe-node
Binary file not shown.