-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show touch #44
Comments
Yes, injecting events does not display the circle. It is probably triggered at lower level. Nothing we can do IMO. So I'm closing. Feel free to reopen if there is a technical solution. |
Why close it then? Something like these videos: It's even better than the simple circle. |
Please re-consider |
@rom1v Thank you. Here's one that shows long clicking: |
At least, I added an option to enable show touches while scrcpy is running: #96. |
I have 1.1, and I don't see "touches" of the mouse. Only when I touch the screen myself (with the finger). |
|
Well I have it enabled anyway in the settings of the OS... |
Yes, I got it. I just notified that I added an option to automatically enable/disable the setting in developers options, because it is somehow related. I didn't say I implemented what you requested (that's why I left the issue open). |
I see. |
I don't know, maybe: https://github.com/Genymobile/scrcpy/releases.atom In the future, I hope it will be packaged in distributions (it is already packaged for Arch Linux and Homebrew for MacOS, so the update is automatic). |
I use Windows... |
Sorry for you
The URL is an rss/atom feed, you can use any feed reader. |
Haha. I like Linux only for development (and I hate the UX of MacOS), and I used it a very long time ago. About rss/atom, ok. |
I've now registered to this for the Atom/Rss of github: I hope it works. |
This is just #44 (comment) |
@rom1v Isn't it a new feature? If not, why mention it? |
The feature was implemented 2 months ago in the |
Well it doesn't work for me. |
It enables it on start, and disable it on stop. If you let it enabled, just don't use the option. When you touch the screen with your finger, it should show touches. |
@rom1v I've removed the flag. Still can't see the touches using the mouse. Also, almost sure it's because of this app: On first run, the mouse couldn't get to reach the taskbar of the Windows OS itself. Instead it gets hidden. On next runs, it didn't happen. |
I'm not sure you understand what the feature does. From
So:
(don't zip videos 😉)
Weird. |
So it doesn't show touches for the PC app. Only touches on the phone itself. About uploading videos, Github doesn't allow to upload them directly. It can only allow specific files types. |
+1 This feature will be very useful in automation. Without this, it's really hard to get touch position from video or picture. But it's not an easy job I think :( minitouch is an available option (maybe). |
@rom1v If it's impossible to cause the touch indicators appear on the device itself, it could be nice to show them just on the window of ScrCpy alone. |
IMHO we can close this since we have |
@twaik No, I already wrote about this: |
I always spread scrcpy among all the devs that I work with. Looking forward to get this function working.
|
@allco He talks about real touches. The request I made is for "simulated" touches (by the mouse). |
Have you found a solution to your problem yet? I am also having the same problem as you. |
Hi there, don't know if it is the right place to talk about this. |
Hello, I have created a workaround for a subset of this issue. Caution Unfortunately, I think my method is not possible on devices that have locked bootloaders. I have done this by editing the internal source code of the Android operating system and then recompiling and reinstalling it. This is the first Android custom ROM I have ever written. Here is a demo recording of what my workaround does for scrcpy. Watch to the end to see the workaround in action. redroid-dot.webmThe strategy behind my code is, since the "Show taps" backend only responds to physical touchscreen devices, Here is a full commands list to reproduce what my demo video shows. The custom ROM in the video is redroid, the Android docker container, but the code file I edited was not previously edited by any redroid-specific changes, meaning that my code also applies cleanly and works on any Android 14 based custom ROM (I have tested it bare metal on Samsung Galaxy S8+ SM-G955F). It is hopefully also not too difficult for people to backport to Android 13 or older for at least any versions in which the Prerequisites to reproduce my demoWarning Normal Debian 12 bookworm does not provide sufficient versions of all of these by default so you would need to find ways to install a new enough version of each one into your distro. Compare your versions with the version numbers I show in my demo video if you encounter any problem.
Commands I usedWarning Copy and paste each command one by one instead of clicking the github "copy" button and trying to run this as a script. git clone https://github.com/remote-android/redroid-patches.git
mkdir redroid-src
cd redroid-src
repo init -u https://android.googlesource.com/platform/manifest --git-lfs --depth=1 -b android-14.0.0_r45
git clone https://github.com/remote-android/local_manifests.git .repo/local_manifests -b 14.0.0
repo sync -c -j$(nproc)
../redroid-patches/apply-patch.sh $(pwd)
(curl https://gist.githubusercontent.com/robertkirkman/21ae17b3aa0e1b48ca67864f7cb0c158/raw/595f739b3b260c20874dd510abdd17292affc624/pointerlocationisshowtapsclone.patch && echo) | git apply -v -C frameworks/base
wget https://raw.githubusercontent.com/remote-android/redroid-doc/master/android-builder-docker/Dockerfile
docker buildx create --use
docker buildx build --build-arg userid=$(id -u) --build-arg groupid=$(id -g) --build-arg username=$(id -un) -t redroid-builder --load .
docker run -it --privileged --rm --hostname redroid-builder --name redroid-builder -v $(pwd):/src redroid-builder
cd /src
. build/envsetup.sh
lunch redroid_x86_64_only-userdebug
m -j$(nproc)
exit
cd out/target/product/redroid_x86_64_only/
sudo mount system.img system -o ro
sudo mount vendor.img vendor -o ro
sudo tar --xattrs -c vendor -C system --exclude="./vendor" . | docker import --platform=linux/amd64 -c 'ENTRYPOINT ["/init", "qemu=1", "androidboot.hardware=redroid", "androidboot.redroid_fps=30", "androidboot.redroid_width=1280", "androidboot.redroid_height=720", "androidboot.redroid_gpu_mode=host"]' - redroid-dot
sudo umount system vendor
docker run -itd --privileged --name redroid-dot -v ~/redroid-dot-data:/data -p 8022:8022 -p 5555:5555 redroid-dot
adb connect localhost
scrcpy Here is a direct link to the Java code patch implementation of my workaround, which applies to the Android 14 source code file |
Probably there could be other, more universal solution. Since app is running in adb it could use SurfaceTransactions via parts of licfsurface code and draw circle in emulated tap locations. |
In developer options, there is an option "show taps", that whenever you touch the screen, a white circle appears.
For some reason, it doesn't appear when using this app.
Please let us have it.
It can be useful for screenshots and screen-video capture.
The text was updated successfully, but these errors were encountered: