Skip to content
Snippets Groups Projects
Commit 8586d457 authored by Nick's avatar Nick :v:
Browse files

misc fixes

- fix for selinux enforcing
- bring back required chmod
- do not build non existing module anymore
- fix NullPointerException
- disable logspam
parent 6e8e5100
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ LOCAL_USE_AAPT2 := true
LOCAL_CERTIFICATE := platform
LOCAL_MODULE_TAGS := optional
LOCAL_PRIVILEGED_MODULE := true
LOCAL_INIT_RC := ../../../../etc/vncflinger.rc
LOCAL_SRC_FILES := $(call all-java-files-under, java)
LOCAL_PROGUARD_FLAG_FILES := ../../proguard-rules.pro
LOCAL_JNI_SHARED_LIBRARIES := libjni_vncflinger
......
......@@ -34,7 +34,7 @@ LOCAL_STATIC_LIBRARIES += \
LOCAL_CFLAGS := -DVNCFLINGER_VERSION="1.0"
LOCAL_CFLAGS += -Ofast -Werror -fexceptions -Wno-implicit-fallthrough -Wno-unused-parameter
LOCAL_CFLAGS += -DLOG_NDEBUG=0
#LOCAL_CFLAGS += -DLOG_NDEBUG=0
LOCAL_MODULE := libjni_vncflinger
......
......@@ -67,6 +67,8 @@ void AndroidDesktop::stop() {
mVirtualDisplay.clear();
mPixels.clear();
mInputDevice->stop();
runJniCallback();
}
void AndroidDesktop::processFrames() {
......
......@@ -35,7 +35,7 @@ public class MainActivity extends Activity {
didInit = true;
setContentView(R.layout.activity_main);
w = 1280; h = 720; dpi = 220; touch = false; relative = false; isInternal = true; //TODO: move activity -> service and then get from intent
w = 1280; h = 720; dpi = 220; touch = false; relative = false; isInternal = false; //TODO: move activity -> service and then get from intent
args = new String[] { "vncflinger", "-rfbunixandroid", "0", "-rfbunixpath", "@vncflinger", "-SecurityTypes", "None" };
if (!isInternal) display = ((DisplayManager)getSystemService(DISPLAY_SERVICE)).createVirtualDisplay("VNC", w, h, dpi, null, VIRTUAL_DISPLAY_FLAG_SECURE | VIRTUAL_DISPLAY_FLAG_PUBLIC | VIRTUAL_DISPLAY_FLAG_TRUSTED | VIRTUAL_DISPLAY_FLAG_SUPPORTS_TOUCH | VIRTUAL_DISPLAY_FLAG_SHOULD_SHOW_SYSTEM_DECORATIONS);
......@@ -51,12 +51,12 @@ public class MainActivity extends Activity {
protected void onDestroy() {
super.onDestroy();
quit();
display.release();
if (display != null) display.release();
}
private void onError(int exitCode) {
quit();
display.release();
if (display != null) display.release();
throw new IllegalStateException("VNCFlinger died, exit code " + exitCode);
}
......
on boot
# vnc
chmod 0666 /dev/uinput
......@@ -2,7 +2,6 @@ SYSTEM_EXT_PRIVATE_SEPOLICY_DIRS += \
external/vncflinger/sepolicy
PRODUCT_PACKAGES += \
vncflinger \
vncpasswd \
VncFlingerJava
......
/system/bin/vncflinger u:object_r:vncflinger_exec:s0
/system/bin/vncpasswd u:object_r:vncflinger_exec:s0
user=_app isPrivApp=true seinfo=platform name=org.eu.droid_ng.vncflinger domain=vncflinger type=app_data_file levelFrom=user
type vncflinger_exec, exec_type, file_type, system_file_type;
type vncflinger, domain;
typeattribute vncflinger coredomain;
type vncflinger, domain, coredomain;
init_daemon_domain(vncflinger)
app_domain(vncflinger)
net_domain(vncflinger)
binder_use(vncflinger)
net_domain(vncflinger);
# uinput
allow vncflinger uhid_device:chr_file rw_file_perms;
......@@ -20,9 +19,16 @@ binder_call(surfaceflinger, vncflinger);
get_prop(vncflinger, hwservicemanager_prop)
allow vncflinger hal_graphics_allocator:fd use;
allow vncflinger same_process_hal_file:file { execute read open getattr map };
hal_client_domain(vncflinger, hal_graphics_allocator);
#hal_client_domain(vncflinger, hal_graphics_allocator);
hwbinder_use(vncflinger);
# needed for app domain ONLY
allow vncflinger app_api_service:service_manager find;
allow vncflinger system_api_service:service_manager find;
allow vncflinger app_data_file:dir create_dir_perms;
allow vncflinger app_data_file:{ file lnk_file } create_file_perms;
get_prop(vncflinger, default_prop)
# socket
allow vncflinger rootfs:lnk_file getattr;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment