Code Monkey home page Code Monkey logo

droidvnc-ng's Introduction

droidVNC-NG

Join the chat at https://gitter.im/droidVNC-NG/community

This is an Android VNC server using contemporary Android 5+ APIs. It therefore does not require root access. In reverence to the venerable droid-VNC-server is is called droidVNC-NG.

If you have a general question, it's best to ask in the community chat. If your concern is about a bug or feature request instead, please use the issue tracker.

Get it on F-Droid Get it on Google Play

Features

  • Network export of device frame buffer with optional server-side scaling.
  • Injection of remote pointer and basic keyboard events.
  • Handling of client-to-server text copy & paste. Note that server-to-client copy & paste does not work in a generic way due to Android security restrictions.
  • Handling of special keys to trigger 'Recent Apps' overview, Home button, Back button and Power button.
  • Android permission handling.
  • Screen rotation handling.
  • File transfer via the local network, assuming TightVNC viewer for Windows version 1.3.x is used.
  • Password protection for secure-in-terms-of-VNC connection.
  • Ability to specify the port used.
  • Start of background service on device boot.
  • Reverse VNC.
  • Ability to connect to a UltraVNC-style Mode-2 repeater.
  • Functionality to provide default configuration via a JSON file.
  • Zeroconf/Bonjour publishing for VNC server auto-discovery.
  • Per-client mouse pointers on the controlled device.
  • Ability to control a device’s shared screen directly from a web browser by shipping the fabulous noVNC client with the server app. This alleviates the need for a native VNC client.

How to use

  1. Install the app from either marketplace.
  2. Get it all the permissions required.
  3. Set a good password and consider turning the Start on Boot off.
  4. Connect to your local Wi-Fi. For accepting a connection your device should be connected to some Local Area Network that you can control, normally it is a router. Connections via data networks (i.e. your mobile provider) are not supported.
  5. Click Start and connect to your device.

Keyboard Shortcuts From a VNC Viewer

  • Ctrl-Shift-Esc triggers 'Recent Apps' overview
  • Home/Pos1 acts as Home button
  • End acts as Power button
  • Escape acts as Back button

For accepting connections from outside

  1. You should allow Port Forwarding in your router's Firewall settings. Login to your router's settings (usually open 192.168.1.1 in your browser, some routers have password written on them).

  2. Find Port Forwarding, usually it's somewhere in Network - Firewall - Port Forwards.

  3. Create a new rule, this is an example from OpenWRT firmware.

    Name: VNC forwarding

    Protocol: TCP

    Source zone: wan may be "internet", "modem", something that suggests the external source.

    External port: 5900 by default or whatever you specified in the app.

    Destination zone: lan something that suggests local network.

    Internal IP address: your device's local IP address, leaving any is less secure. The device's address may change over time! You can look it up in your routers' connected clients info.

    Internal port: same as external port.

  4. Apply the settings, sometimes it requires rebooting a router.

  5. Figure out your public adress i.e. https://www.hashemian.com/whoami/.

  6. Use this address and port from above to connect to your device.

How to Pre-seed Preferences

DroidVNC-NG can read a JSON file with default settings that apply if settings were not changed by the user. A file named defaults.json needs to created under <external files directory>/Android/data/net.christianbeier.droidvnc_ng/files/ where depending on your device, <external files directory> is something like /storage/emulated/0 if the device shows two external storages or simply /sdcard if the device has one external storage.

An example defaults.json with completely new defaults (not all entries need to be provided) is:

{
    "port": 5901,
    "portReverse": 5555,
    "portRepeater": 5556,
    "scaling": 0.7,
    "viewOnly": false,
    "showPointers": true,
    "fileTransfer": true,
    "password": "supersecure",
    "accessKey": "evenmoresecure",
    "startOnBoot": true,
    "startOnBootDelay": 0
}

Remote Control via the Intent Interface

droidVNC-NG features a remote control interface by means of Intents. This allows starting the VNC server from other apps or on certain events. It is designed to be working with automation apps like MacroDroid, Automate or Tasker as well as to be called from code.

You basically send an explicit Intent to net.christianbeier.droidvnc_ng.MainService with one of the following Actions and associated Extras set:

  • net.christianbeier.droidvnc_ng.ACTION_START: Starts the server.

    • net.christianbeier.droidvnc_ng.EXTRA_ACCESS_KEY: Required String Extra containing the remote control interface's access key. You can get/set this from the Admin Panel.
    • net.christianbeier.droidvnc_ng.EXTRA_REQUEST_ID: Optional String Extra containing a unique id for this request. Used to identify the answer from the service.
    • net.christianbeier.droidvnc_ng.EXTRA_PORT: Optional Integer Extra setting the listening port. Set to -1 to disable listening.
    • net.christianbeier.droidvnc_ng.EXTRA_PASSWORD: Optional String Extra containing VNC password.
    • net.christianbeier.droidvnc_ng.EXTRA_SCALING: Optional Float Extra between 0.0 and 1.0 describing the server-side framebuffer scaling.
    • net.christianbeier.droidvnc_ng.EXTRA_VIEW_ONLY: Optional Boolean Extra toggling view-only mode.
    • net.christianbeier.droidvnc_ng.EXTRA_SHOW_POINTERS: Optional Boolean Extra toggling per-client mouse pointers.
    • net.christianbeier.droidvnc_ng.EXTRA_FILE_TRANSFER: Optional Boolean Extra toggling the file transfer feature.
    • net.christianbeier.droidvnc_ng.EXTRA_FALLBACK_SCREEN_CAPTURE: Optional Boolean Extra indicating whether to start with fallback screen capture that does not need a user interaction to start but is slow and needs view-only to be off. Only applicable to Android 10 and newer.
  • net.christianbeier.droidvnc_ng.ACTION_CONNECT_REVERSE: Make an outbound connection to a listening viewer.

    • net.christianbeier.droidvnc_ng.EXTRA_ACCESS_KEY: Required String Extra containing the remote control interface's access key. You can get/set this from the Admin Panel.
    • net.christianbeier.droidvnc_ng.EXTRA_REQUEST_ID: Optional String Extra containing a unique id for this request. Used to identify the answer from the service.
    • net.christianbeier.droidvnc_ng.EXTRA_HOST: Required String Extra setting the host to connect to.
    • net.christianbeier.droidvnc_ng.EXTRA_PORT: Optional Integer Extra setting the remote port.
    • net.christianbeier.droidvnc_ng.EXTRA_RECONNECT_TRIES: Optional Integer Extra setting the number of tries reconnecting a once established connection. Needs request id to be set.
  • net.christianbeier.droidvnc_ng.ACTION_CONNECT_REPEATER Make an outbound connection to a repeater.

    • net.christianbeier.droidvnc_ng.EXTRA_ACCESS_KEY: Required String Extra containing the remote control interface's access key. You can get/set this from the Admin Panel.
    • net.christianbeier.droidvnc_ng.EXTRA_REQUEST_ID: Optional String Extra containing a unique id for this request. Used to identify the answer from the service.
    • net.christianbeier.droidvnc_ng.EXTRA_HOST: Required String Extra setting the host to connect to.
    • net.christianbeier.droidvnc_ng.EXTRA_PORT: Optional Integer Extra setting the remote port.
    • net.christianbeier.droidvnc_ng.EXTRA_REPEATER_ID: Required String Extra setting the ID on the repeater.
    • net.christianbeier.droidvnc_ng.EXTRA_RECONNECT_TRIES: Optional Integer Extra setting the number of tries reconnecting a once established connection. Needs request id to be set.
  • net.christianbeier.droidvnc_ng.ACTION_STOP: Stops the server.

    • net.christianbeier.droidvnc_ng.EXTRA_ACCESS_KEY: Required String Extra containing the remote control interface's access key. You can get/set this from the Admin Panel.
    • net.christianbeier.droidvnc_ng.EXTRA_REQUEST_ID: Optional String Extra containing a unique id for this request. Used to identify the answer from the service.

The service answers with a Broadcast Intent with its Action mirroring your request:

  • Action: one of the above Actions you requested
    • net.christianbeier.droidvnc_ng.EXTRA_REQUEST_ID: The request id this answer is for.
    • net.christianbeier.droidvnc_ng.EXTRA_REQUEST_SUCCESS: Boolean Extra describing the outcome of the request.

There is one special case where the service sends a Broadcast Intent with action net.christianbeier.droidvnc_ng.ACTION_STOP without any extras: that is when it is stopped by the system.

Examples

Start a password-protected view-only server on port 5901

Using adb shell am syntax:

adb shell am start-foreground-service \
 -n net.christianbeier.droidvnc_ng/.MainService \
 -a net.christianbeier.droidvnc_ng.ACTION_START \
 --es net.christianbeier.droidvnc_ng.EXTRA_ACCESS_KEY de32550a6efb43f8a5d145e6c07b2cde \
 --es net.christianbeier.droidvnc_ng.EXTRA_REQUEST_ID abc123 \
 --ei net.christianbeier.droidvnc_ng.EXTRA_PORT 5901 \
 --es net.christianbeier.droidvnc_ng.EXTRA_PASSWORD supersecure \
 --ez net.christianbeier.droidvnc_ng.EXTRA_VIEW_ONLY true
Start a server with defaults from Tasker
  • Tasker action-category in menu is System -> Send Intent
  • In there:
    • Action net.christianbeier.droidvnc_ng.ACTION_START
    • Extra net.christianbeier.droidvnc_ng.EXTRA_ACCESS_KEY:<your api key from DroidVNC-NG start screen>
    • Package net.christianbeier.droidvnc_ng
    • Class net.christianbeier.droidvnc_ng.MainService
    • Target: Service
Make an outbound connection to a listening viewer from the running server

For example from Java code:

See MainActivity.java.

Stop the server again

Using adb shell am syntax again:

adb shell am start-foreground-service \
 -n net.christianbeier.droidvnc_ng/.MainService \
 -a net.christianbeier.droidvnc_ng.ACTION_STOP \
 --es net.christianbeier.droidvnc_ng.EXTRA_ACCESS_KEY de32550a6efb43f8a5d145e6c07b2cde \
 --es net.christianbeier.droidvnc_ng.EXTRA_REQUEST_ID def456

Building

  • After cloning the repo, make sure you have the required git submodules set up via git submodule update --init.
  • Then simply build via Android Studio or gradlew.

Contributing

Contributions to the project are very welcome and encouraged! They can come in many forms. You can:

Notes

  • Requires at least Android 7.

  • Since Android 10, the permission to access the screen contents has to be given on each start and is not saved. You can, however, work around this by installing adb (or simply Android Studio) on a PC, connecting the device running droidVNC-NG to that PC and running adb shell cmd appops set net.christianbeier.droidvnc_ng PROJECT_MEDIA allow once. Alternatively, if using the intent interface, you can also start with net.christianbeier.droidvnc_ng.EXTRA_FALLBACK_SCREEN_CAPTURE set to true.

  • You can also use adb to manually give input permission prior to app start via adb shell settings put secure enabled_accessibility_services net.christianbeier.droidvnc_ng/.InputService:$(adb shell settings get secure enabled_accessibility_services).

  • If you are getting a black screen in a connected VNC viewer despite having given all permissions, it might be that your device does not support Android's MediaProjection API correctly. To find out, you can try screen recording with another app, ScreenRecorder. If it fails as well, your device most likely does not support screen recording via MediaProjection. This is known to be the case for Android-x86.

  • In case you happen to have a board with an Ethernet interface and experience strange hangs during a VNC session, setting the interface to a slower speed might help. This workaround can be applied with mii-tool, for instance.

  • If you see a a floating button similar to this on your screen after enabling accessibility, make sure you have the "shortcut" option in accessibility settings turned to off.

droidvnc-ng's People

Contributors

anreis75 avatar bk138 avatar diegulog avatar eisaev avatar foxrefire avatar gitter-badger avatar greatyingzi avatar linsui avatar poussinou avatar tripleight avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

droidvnc-ng's Issues

remember previous reverseVNC connections and present them to the user

If you'd like to put out an incentive for implementing this feature, you can do so at https://issuehunt.io/r/bk138/droidVNC-NG


Is your feature request related to a problem? Please describe.
on mobile devices especially with unstable connections or if you have to frequently switch between devices, it can become really tedious (and error-prone) if you have to type in the IP every time for a reverse VNC connection.

Describe the solution you'd like
having a kind of a history or the ability to save connections (as most viewers do), would eliminate the problem - especially and even permanently, if the client has a fixed IP or uses a DDNS service.

Describe alternatives you've considered
using a DDNS service makes it less error-prone, but it's still tedious if the user has to type in the same domain over and over again.

Additional context
the icing on the cake would be something like an (additional) widget to start a particular reverse VNC connection, resulting in a "one-tap-support"! ...or perhaps just implementing it this way, could help to keep the GUI slim.

createVirtualDisplay throws SecurityException

If you'd like to put out an incentive for fixing this bug, you can do so at https://issuehunt.io/r/bk138/droidVNC-NG

Describe the bug

To Reproduce

no idea yet :-/

Expected Behavior

no crash

Logs/Backtraces

Your environment (please complete the following information):

  • OS and version: Android 9, 10
  • VNC viewer and version:

Additional context

java.lang.SecurityException: 
  at android.os.Parcel.createException (Parcel.java:1966)
  at android.os.Parcel.readException (Parcel.java:1934)
  at android.os.Parcel.readException (Parcel.java:1884)
  at android.hardware.display.IDisplayManager$Stub$Proxy.createVirtualDisplay (IDisplayManager.java:1106)
  at android.hardware.display.DisplayManagerGlobal.createVirtualDisplay (DisplayManagerGlobal.java:502)
  at android.hardware.display.DisplayManager.createVirtualDisplay (DisplayManager.java:1267)
  at android.media.projection.MediaProjection.createVirtualDisplay (MediaProjection.java:149)
  at net.christianbeier.droidvnc_ng.MainService.startScreenCapture (MainService.java:377)
  at net.christianbeier.droidvnc_ng.MainService.onConfigurationChanged (MainService.java:196)
  at android.app.ActivityThread.performConfigurationChanged (ActivityThread.java:5220)
  at android.app.ActivityThread.handleConfigurationChanged (ActivityThread.java:5456)
  at android.app.ActivityThread.handleConfigurationChanged (ActivityThread.java:5370)
  at android.app.servertransaction.ConfigurationChangeItem.execute (ConfigurationChangeItem.java:42)
  at android.app.servertransaction.TransactionExecutor.executeCallbacks (TransactionExecutor.java:108)
  at android.app.servertransaction.TransactionExecutor.execute (TransactionExecutor.java:68)
  at android.app.ActivityThread$H.handleMessage (ActivityThread.java:1950)
  at android.os.Handler.dispatchMessage (Handler.java:106)
  at android.os.Looper.loop (Looper.java:214)
  at android.app.ActivityThread.main (ActivityThread.java:7073)
  at java.lang.reflect.Method.invoke (Native Method)
  at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run (RuntimeInit.java:494)
  at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:965)
Caused by: android.os.RemoteException: 
  at com.android.server.display.DisplayManagerService$BinderService.createVirtualDisplay (DisplayManagerService.java:2932)
  at android.hardware.display.IDisplayManager$Stub.onTransact (IDisplayManager.java:209)
  at android.os.Binder.execTransact (Binder.java:739)

[Feature request] Please make network bindings configurable

Please consider making the network bindings of the VNC service configurable, so that one can prevent it from being exposed in potentially untrusted networks. Maybe this could be realized by a checkable list of the current networks/IP addresses (including localhost, for instance if one wants to employ some tunneling technology for making the service externally accessible).

Thanks in advance! ;-)

[Feature request] Could you create a button for background service reset cleary?

This request from a last comment of #46: pull request.
Please consider to make a button for about clean restart of background service.


Thank you for that you consider this un-common issue.
( Frankly I didn't notice "Inputs not working after some time #38" ever. :-o )

Actually i already knew your code because it was one of the 2 solutions i though about.
It would be working fine but i have a worry something.
Because i've encountered another patten of exception but not caught it exactly so..
Anyway the easy way for handling or escaping from un-handled exception might be needed i think.

For example, if droidVNC has a button explicitly for clean restart background service include every states or variables, it could be more stable when unknown exceptions occures.

Could you consider about it?

Thanks.

Originally posted by @redburn82 in #46 (comment)

vnc-server reverse connection

some vnc-server support a reverse connection to vnc-client (like: winvnc.exe -connect 192.168.1.5:5900 or better with vnc-repeater winvnc.exe -id:123456 -connect 192.168.1.5:5900)
i think this would be a great enhancent and your vnc-server to an free teamviewer alternative!

Screencast without having to Grant Permissions

Request to include information in the app on how people can permanently give permission to screencast.

adb shell cmd appops set net.christianbeier.droidvnc_ng PROJECT_MEDIA allow

Including the command, and a url link to using ADB should be enough. You've done a good job of keeping the interface clean. I trust you'll keep it that way. Thank you

On Android-X86 I get only a black (blank) screen

On a Android-X86 ( https://www.android-x86.org ) install I only get a black ( blank ) screen on the VNC viewer.
With Android-X86 anyone can easily run an Android VM on Hyper-V, it´s great for development.
I tried with Android-X86 9 and Android-X86 8.
Currently I am using Android-X86 8 ( https://osdn.net/projects/android-x86/downloads/69704/android-x86_64-8.1-r6.iso )
The mouse works in the viewer, only the screen isn't presented.
I tried with UltraVNC and RealVNC viewers on a Windows 10 with the same results.
Using RealVNC standalone X64 ( https://www.realvnc.com/download/file/viewer.files/VNC-Viewer-6.21.406-Windows-64bit.exe )
Using UltraVNC 1.2.2.4 ( can´t remember where I downloaded it, it was years ago ).
Its easy to reproduce, creating the VM and installing only driodVNC-NG, nothing more.
On the android side, droidVNC-NG seems to be working good, see attached image.
imagem_2021-09-02_093951

Xiaomi mi a2 lite + Android 10 - black client screen

Installed, given all permissions:
Screenshot_20211229-111317
The client (RealVnc on Fedora 33) discovers the server and connects but shows just a black, empty screen:
Screenshot_2021-12-29_05-24-08
On the phone, I have a permanent notification stating "Doing some work"

[Feature] "View only" mode

Hi, I would like to know if there is any way I can use the program in "view only" mode, without using the accessibility permissions, as in Android 9 Go they are usually disabled and do not allow me to run the server at startup. Really I like much this app, I want to remotely control a bunch of Android tablets from a PC, but with this problem it gets very complicated.

Add possibility to start server when usb cable is plugged in

Hi,
my phone display was broken due to water. After some time, the display came back, but I guess this was simply luck. In case you want to have a backup when display is damaged, it would help to start VNC server only when USB is connected.

Still, if someone wants the server to be started all the time, the option requested here could be disabled.

Many thanks

Interference with browser apps when accessibility for droidVNC-NG is enabled

This is very strange and I'm not sure how/why the app's accessibility option is related to other apps like browsers, but whenever I enable accessibility for droidVNC-NG through the settings, my tab groups in Firefox Chrome or Brave (I have tested both) completely disappear and I'm only left with a list of all open tabs (no groups at all). The second I disable accessibility for droidVNC-NG, I am able to interact again with my tab groups in these browsers.

Please note that this does not happen when I activate accessibility for other apps, e.g. Anydesk.

So at the moment I have the accessibility option always disabled. When I want to use droidVNC-NG, I enable it and when I am done I have to disable it again. Is this option supposed to be activated once and be left like this?

Start on Boot doesn't work?

Hi,

what exactly does start on boot does?
I notice despite granting project permission, the VNC server is not up after reboot.

regards,

Arya

File transfer not working on Android >= 9

Thank you very much for the working VNC for Android.
Tell me how to transfer files to the device?
The file system is not visible on Android 9
I am using TightVNC viewer for Windows version 1.3.10

2021-10-21_19-54

Accessibility using ADB

Hi,
Thanks for this app! I would like to use the server on a wierd device: a "network radio" which is a walkie talkie but Android OS on it. Accessibility service is stil in the device but left out of settings. I can only enable the service for apps using an ADB command. Would you mind letting me know the ADB command to enable Accessibilty service for DroidVNC-NG please?

Many thanks,
Phil

crash w.r.t. FD_ISSET

*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 0, tid: 0 >>> net.christianbeier.droidvnc_ng <<<

backtrace:
  #00  pc 0000000000083558  /apex/com.android.runtime/lib64/bionic/libc.so (abort+160)
  #00  pc 00000000000a9490  /apex/com.android.runtime/lib64/bionic/libc.so (__fortify_fatal(char const*, ...)+120)
  #00  pc 00000000000a9274  /apex/com.android.runtime/lib64/bionic/libc.so (__FD_ISSET_chk+92)
  #00  pc 00000000000120bc  /data/app/net.christianbeier.droidvnc_ng-43RC_mLD5hJFrhpU9S5Ong==/base.apk!libvncserver.so (offset 0xcb000)
  #00  pc 00000000000e6c10  /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36)
  #00  pc 0000000000084ee4  /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64)

Possible to add support for videos?

Fantastic software, thanks a lot for it!

It installs fine on a projector device of mine with Android 9, works fine - except, when I play videos (e.g. via NewPipe), then I get a black screen.

I don't really care all that much about quality, it might just as well send 1 frame per second over VNC, as long as there is a picture of the video shown, instead of just a black screen, in the VNC viewer.

Thanks again!

EDIT: Just noticed that this has to do with, whether the videos are rendering on the GPU or not. So the answer to this question is most likely "no"... I've tested this, by trying Kodi, setting it (cannot remember how exactly now) to "software rendering" somewhere - and those kind of videos do appear through droidVNC-NG on a VNC client/connection... So this is not droidVNC-NG's problem per se.

Will there be a android app that with root permission?

some phone like XiaoMi, OR the android 10, need to grant access every time.

but we can get root access if we want.

So, if we can provide root access for "Start on Boot", we dont need to click the screenl

grante input access for root access, so , we dont need to do this for each time.

willi you ?

Keyboard shortcuts: Ctrl-Shift-Esc

Just wanted to note that, as of now, the keyboard shortcuts are:

https://github.com/bk138/droidVNC-NG/blob/2542f9a89884dbba2344b00c597e722ae9fa85ac/app/src/main/res/values/strings.xml

From a VNC viewer, Ctrl-Shift-Esc triggers 'Recent Apps' overview, Home/Pos1 acts as Home button, Escape acts as Back button.

However, on Windows 10, Ctrl-Shift-Esc actually starts Task manager. However, there is a workaround for TightVNC Viewer on Windows - there are actually GUI buttons in the top row, among them, Ctrl and Alt:

image

Just click on the Ctrl GUI button to toggle it, then you can [ress just Shift-Esc on keyboard, and this will arrive as Ctrl-Shift-Esc in droidVNC-NG server, trigerring Recent Apps - while not triggering the Windows Task Manager.

RemoteHostkeyboard issue

The issue is visible password for user when I control an android device by using VNC, Password typing must be hidden, like when you type a password user must see only dots. please advise me how to solve this issue.

no pointer input on a rooted LineageOS 18.1 on a Raspberry Pi 4

I tried droidVNC-NG 1.0.2 on a rooted LineageOS 18.1 on a Raspberry Pi 4.
Finally a VNC-server that works on the new android 11!

Well "works" in some way: I can connect and get the screen on my Win7 or Win10 with the realVNC viewer. The keyboard shortcuts like Pos1 and ESC are working, but no mouse-input, which is more important on an android device than the home- and back-buttons.
The app on android says all three permissions granted.

Which VNC client do You use?

Zoom gesture support

First let me thank you for this tool, works really good.
Using VNC for my PCs since ages, I am happy that this works rootless on android, too. There are other VNC servers on g-play, but rather spooky tools, I dont like them.
I am impressed by the speed of your droidVNC, using the camera on the remote device, the lag to the PC is really minimal.
The missing keyboard support is no big deal for me, as I just use it to support my mother on her tablet from remote.

Now my request is:
I would like to use the zoom gesture in an app on the remote device. The two finger thing.
I dont know if this is easy to implement, I would expect holding the secondary mouse button and use the mouse wheel to zoom in and out. Idk if there is a more elegant way to do that from a PC.

app freezes when using domains for reverseVNC

If you'd like to put out an incentive for fixing this bug, you can do so at https://issuehunt.io/r/bk138/droidVNC-NG


beforehand: thank you very much @bk138 for such an awesome FOSS app!!!
i've looked so long for an FOSS no root VNC server on android... and now it popped up on fdroid, and it even has reverseVNC resp. VNCi. 👏

Describe the bug
...sadly that's also where i experience kind of a bug: as soon as i try to use a domain for reverseVNC, the app seems to freeze.

To Reproduce

  1. open droidVNC-NG
  2. start server
  3. grant permissions
  4. tap "connect to a listening viewer"
  5. enter any domain (whether with or without port) and tap "ok".
  6. see the app frozen ☹️
  7. sometimes after ~3 minutes the input field closes with a toast message that the connection failed.

Expected Behavior
reverseVNC should also work with domains, as i guess most of the time it is the point of reverseVNC to make it easier for the person with the server.
BTW: having a kind of a history or list to save reverse connections would come in handy! ...or perhaps even a widget to start a particular reverse connection (resulting in a "one-tap-support") would be absolutely brilliant!

Your environment (please complete the following information):

  • OS and version: android 7.1.2
  • VNC viewer and version: doesn't matter... it's the same for different viewers or even if you don't use any at all. 😜

Additional context
using the local IPs works like a charm, whether for a normal VNC connection or also reverseVNC (even if i try all 3 within the "same session").
BTW: interestingly i noticed the same behaviour (as described in the procedure) when i mistakenly used the IP of my router for a reverse connection.

Not working in Samsung m30s

If you'd like to put out an incentive for fixing this bug, you can do so at https://issuehunt.io/r/bk138/droidVNC-NG

Describe the bug

App not working

To Reproduce

Expected Behavior

Show the localhost:5901 VNC server

Logs/Backtraces

Your environment (please complete the following information):

  • OS and version: Ubuntu 21.04 (hirsute)
  • VNC viewer and version: tightvncserver or tigervncserver

Additional context

Wiki or FAQ: how to wake up from screensaver?

Great app. Thank you for producing the 1st ever open source remote access app that seems to be easy to install and has substantial potential.

Could I contribute to a Wiki or documentation effort to add some documentation for the basics, at least?

On first run, was not immediately obvious to me that Esc (back?) would wake up the screensaver ... without sending through an unwanted keypress whilst doing so :)

Maybe a Wiki and / or FAQ page may help?

built-in keyboard

The feature I want to talk about here is that this app needs a built-in keyboard so user won't just connect and see what only on the screen of the phone but only interact with the option is giving on Its screen
for example people can be texting from another device through that phone where the droidVNC is installed.

Input ability Denied

If you'd like to put out an incentive for fixing this bug, you can do so at https://issuehunt.io/r/bk138/droidVNC-NG

Describe the bug

I am able to launch server on my Samsung A7 tablet. However I cannot get permission to input data remotely. I allowed every accessibility except for voice but I seem to always be denied input. I have been able to enable Scren capturiing and file access

To Reproduce

Expected Behavior

I had expected to be able to click on buttons. However, the remoted mouse icon moves as expected but is unable to activate functions be cause input has been denied by the server.

Logs/Backtraces

Your environment (please complete the following information):

  • OS and version: Android 9
  • VNC viewer and version: RealVNC 3.7.1.44443

Additional context

can't Install apk INSTALL_FAILED_OLDER_SDK

Can't install apk on an old phone, I got this error:

adb install droidvnc-ng-1.0.0.apk 
droidvnc-ng-1.0.0.apk: 1 file pushed. 2.9 MB/s (5347226 bytes in 1.757s)
	pkg: /data/local/tmp/droidvnc-ng-1.0.0.apk
Failure [INSTALL_FAILED_OLDER_SDK]


  • OS and version: EMUI 3.1
  • VNC viewer and version: droidvnc-ng-1.1.0.apk

I didn't find any info about requirements, so I'm not sure about minimal OS version.

Cannot unlock lock screen on Xiaomi

Describe the bug
There seem to be no way to unlock the screen using the VNC session on a Xiaomi Redmi Note 9, Android 11.
The computer Home key works to unlock the screen on a Samsung Galaxy A72, but not on the Xiaomi.

A possible cause of this behaviour is that the Xiaomi does not have a home key.
To unlock the screen on the phone, one must use the power button.

To Reproduce
Start DroidVNC / Enable accessibility & shortcuts
Start session
Lock screen
Start vncviewer on computer
Press home key (or any other for that matter, including ctrl-shift-esc), the screen stays locked.

Expected Behavior
Some key combination allows to unlock the screen on a Xiaomi Redmi Note 9.

Logs/Backtraces
n/a

Your environment (please complete the following information):
Phone: Android 11 / DroidNG 1.2.3
Desktop: Ubuntu 18.04, vncviewer: TigerVNC Viewer 64-bit v1.7.0

Additional context
A secondary problem occurs:
After I press the power key to light up the screen, still locked, I seem to be able to "swipe up", the phone screen shows the on screen keyboard, but the vncviewer window is still blank (black). Some key combination (not sure which, it does not seem consistent) allowed me to light up the vncviewer window and see the on screen keyboard, but it blanked on the phone and I was not able to interact with it.
When unlocked, I can interact with the phone.

[Question] Dealing with Screen Capture permission

Hello,

I am using this vnc server succesfully on raspberry pi 3 to be able to control/monitor an obscure device that provides access only via an android app. Thank you for this!

However, one inconvinient aspect is that whenever the android system reboots and vnc server autostarts, it asks for the Screen Capture permission by displaying a dialog box.

If the permission is not provided and we connect via VNC only a black screen is displayed.

Surprisingly despite the black screen, the window reacts to all input events via VNC, so it is acually possible, but difficult to accept the permission by clicking in the right spot. If done, then the black screen goes away and we get to see the desktop.

So my question is this, are there any means of accepting/providing this permission automatically/permanently?

Unfortunately I am not well versed with Android, but since my device has root access this should be somewhat feasable? (Either some app that can assist with it or system file modifications? or somehow running the vncserver as root?)

-- Android 10 with root (LineageOS 17)
-- Raspberry Pi 3

Inputs not working after some time

Describe the bug
No input from remote device on server device

To Reproduce
Keep an active connection, after time the server device fails to respond to inputs, but not on all devices I am operating

Expected Behavior
Inputs to be sent to device

Logs/Backtraces

Your environment (please complete the following information):

  • OS and version: Windows 11 264 & Android 11
  • VNC viewer and version: Real VNC Viewer 6.21 (and TightVNC)

Additional context
I have tried different VNC viewers and the same response
I have disconnected and re-connected and it does not resolve the issue
I have used different devices to connect, (both Android and Windows)
Only restarting the server device manually (ie physically in person) seems to solve the issue
I can still awake the screen on by pressing ctrl+esc but no other inputs are being sent once screen is awake other than esc

OpenVPN interface not binding

If I configure ipsec in the device, I can connect via vpn ip. But if I use the openvpn client, then I cannot connect via the ip issued by the vpn server.

Android 6?

If you'd like to put out an incentive for implementing this feature, you can do so at https://issuehunt.io/r/bk138/droidVNC-NG
(I'm open to this...)

Describe the solution you'd like
Would it be possible to support Android 6?

Describe alternatives you've considered
After a lot of searching, we haven't found anything that works.

Additional context
We have industrial Android 6 devices that need basic remote support.
Must be via APK
If building for 6 means we lose a feature then that may be ok.

"The server is now reachable at ... :5900"

If you'd like to put out an incentive for fixing this bug, you can do so at https://issuehunt.io/r/bk138/droidVNC-NG

Describe the bug

If the user sets the port to something other than default, say 5901, a message shows that says "The server is now reachable at some.ip:5900" after hitting start. It's not actually reachable at port 5900, but rather the correct user supplied port, 5901 in this case. The incorrect
message appears right below the stop button.

Your environment (please complete the following information):

  • OS and version: A7, droidVNC version 1.2.4 from Fdroid
  • VNC viewer and version: N/A

Additional context

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.