Comments (7)
Thanks for you interest and contribution to the project! I'm not sure if it is safe to put a file on /system, wouldnt work if we simply close the virtual device before closing the daemon? I'm not sure if i'm doing it!
Best
from droidvncserver.
Q: "wouldnt work if we simply close the virtual device before closing the daemon?"
A: you are already closing the device: close_app()
calls cleanupInput()
, which calls suinput_close(inputfd)
. This part is ok.
Problem is that the device is set as built-in, and Android refuses to close built-in devices!
sample of frameworks/base/services/input/InputReader.cpp
:
void InputReader::removeDeviceLocked(nsecs_t when, int32_t deviceId) {
InputDevice* device = NULL;
ssize_t deviceIndex = mDevices.indexOfKey(deviceId);
if (deviceIndex >= 0) {
device = mDevices.valueAt(deviceIndex);
mDevices.removeItemsAt(deviceIndex, 1);
} else {
ALOGW("Ignoring spurious device removed event for deviceId %d.", deviceId);
return;
}
if (device->isIgnored()) {
ALOGI("Device removed: id=%d, name='%s' (ignored non-input device)",
device->getId(), device->getName().string());
} else {
ALOGI("Device removed: id=%d, name='%s', sources=0x%08x",
device->getId(), device->getName().string(), device->getSources());
}
device->reset(when);
delete device;
}
Maybe only ICS does that, I don't know. But I don't think there is a safe way to force ICS to close a built-in device. Do you see my point?
A safe solution would be to use a non built-in device for keyboard, thus not using the default qwerty.idc
but some other file. Or to force qwerty.idc not to be built-in for the purpose of vnc-server. I don't know how to do this latter...
from droidvncserver.
Thanks for your suggestions... I am as well considering adding support for a second input method, which i think should work in even more devices than uinput brings us (i've heard some comments of not working on some devices)....
That would be to startup the "monkey --port PORT" android cmd that listens on a determined PORT, and injects touch/key events directly on the Java framework... have you acknowledge this already?
best
from droidvncserver.
I have used the monkey for stress test only, not as a uinput wrapper. Probably worth trying if the execution overhead is acceptable.
from droidvncserver.
I've made some research on this lately. Monkey uses the IWindowManager.aidl Binder interface to inject keys/touch through the WindowManagerService.java. Ideally we should have a AIDL->CPP translator so we could put the daemon injecting keys directly to the service, but we do not have that.
Any thoughs on this? My question would be, is it easier to implement the stubs by hand or adapting the AIDL translator to generate cpp files?
from droidvncserver.
Sorry for the delay, but to answer your question : I have no idea.
from droidvncserver.
Facing this problem still on Android 4.4.4 Samsung Galaxy S3 GT-I9305 (a European stock ROM). Is this solution already added in the app? Android still thinks a physical keyboard is present, hence doesn't show virtual keyboard no matter what I try (except restart).
from droidvncserver.
Related Issues (20)
- Android 4.4 droidVNC mouse points different location
- droidVNCserver compiled for armeabi architecture HOT 7
- ERROR! libandroidvncserver.so HOT 1
- Connect the Droid VNC Server via the Hostname HOT 1
- Does not detect root on Android 8.0 (Pixel XL) HOT 3
- unknown type name 'PixelFormatInfo'
- runing the project by Androidstudio HOT 23
- How to open Debug in this programme
- Command to stop Server HOT 1
- Add to F-Droid
- I was compiling wrapper libs for sdk25. Can anyone help with my error? HOT 1
- why i need root phone HOT 1
- How to trigger the home button?
- Recompiled via NDK for Android 7. Display is Messed Up
- droid vnc server Black Screen HOT 1
- Android 7.1 x86 doesnt work HOT 1
- Can I build nativeMethods myself? HOT 7
- Tutorial or APK ? HOT 1
- Cannot load nativemethod lib on Android 6.01
- Build failed on AndroidStudio
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from droidvncserver.