Giter Site home page Giter Site logo

cxplan / cxtouch Goto Github PK

View Code? Open in Web Editor NEW
270.0 7.0 72.0 15.52 MB

View and manage Android devices from PC client based java swing, supporting Windows, Linux and MacOS

License: GNU General Public License v3.0

Java 99.93% Batchfile 0.04% Shell 0.03%
android minicap java swing adb projection screenrecord screenshot

cxtouch's Introduction

CXTouch

This is an open source software which control and manage android device from PC client. This software is written in Java, so it can run on Windows, Linux and MacOS where a jre is installed (support Java 7 and later).

You can use CXTouch for gaming, watching movie, explore app, working on mobile, and all operation supported on device, but more convenient than doing them on device without root.

CXTouch support at least 4 devices running on a pc simultaneously, the supported amount of devices depends on your actual pc performance.

Show usage

Features

  • OS support
    • Desktop Client: support Windows, Linux, MacOS where a jre is installed.
    • Android: support version 4.4(SDK level 19) to 9.0(SDK Level 28)
  • Control any device by mouse and keyboard
    • Real-time screen projection
      • The refresh speed depends on Android version and device performance.
      • Support rotation sensed by CXTouch automatically.
    • Support typing text from pc keyboard.
    • Supports meta keys
    • Copy string content on device and paste string content on pc to editor on device.
  • Wireless connection: The usb cable is not needed in wireless mode, but may increase image latency.
  • Take a screenshot.
  • Shortcut for brightness up and down.
  • Shortcut for volume up and down.
  • Record screen of device.
  • Setting for quality and size of image
  • Support two languages: English and Chinese.

Requirements

  • Java 7 and later.
  • Make sure you enabled adb debugging on your device(s).
  • A addtional option should be open on some devices such as xiaomi
    • USB debugging (Security settings)
  • A ADB driver is needed if your os is Windows.

Screenshots

View

Latest Release

The latest version 1.2 is available.

  • The package or installer for each platform has two version(with jre and without jre) except Linux (JDK is a part of Linux normally)
  • The 32bit and 64bit version are supported on window os. (the 64 bit version is recommended if your windows is 64 bit.)

Build

The project is managed by maven, so you need to install maven before building project.

Go to the root path of project, and run command below:

mvn clean package -DskipTests=true

Then a built package will be generated in the folder ${project root}/main/target/CXTouch-*.zip

If you want to build mediate apk(CXTouch.apk), please go to the mediate repository .

Run in workspace

If you open the project using IDE, the work directory should be set: ${project root}/main, not ${project root}

Contributing

Any contributions that make sense and respect the agreement of project are accepted forever, if you have some good advice, please tell me by information below:

Mail: [email protected]

License

                   GNU GENERAL PUBLIC LICENSE
                     Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

Appreciating

Thanks Install4j for supporting building cross-platform installer which make using software convenient.

Install4j Web Site

cxtouch's People

Contributors

cxplan 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

cxtouch's Issues

adb shell 报错连接不上设备

Exception in thread "main" java.lang.RuntimeException: 远程主机强迫关闭了一个现有的连接。
at com.cxplan.projection.core.adb.AdbUtil.shell(AdbUtil.java:189)
at com.cxplan.projection.core.adb.AdbUtil.shell(AdbUtil.java:172)
at com.cxplan.projection.core.adb.AdbUtil.getDeviceIp(AdbUtil.java:269)
at com.android.ddmlib.CXAdbHelper.main(CXAdbHelper.java:179)
Caused by: java.io.IOException: 远程主机强迫关闭了一个现有的连接。
at sun.nio.ch.SocketDispatcher.read0(Native Method)
at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:43)
at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
at sun.nio.ch.IOUtil.read(IOUtil.java:197)
at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:759)
at com.android.ddmlib.AdbHelper.read(AdbHelper.java:736)
at com.android.ddmlib.AdbHelper.readAdbResponse(AdbHelper.java:222)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:456)
at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:382)
at com.android.ddmlib.Device.executeShellCommand(Device.java:617)
at com.cxplan.projection.core.adb.AdbUtil.shell(AdbUtil.java:187)
... 3 more

Excellent tool. Just need the Menu/Overview button.

Thank you Kenny for CXTouch. It is the only one that works with my Xiaomi Redmi.

Only thing I find missing is the Android soft button at the bottom. This button is commonly use to get the Menu/Overview/Task function.

Hope you can add it in the next version and keep up the good work.

does not send TAB key

Looks like tab key is handled by PC application to switch bewteen UI components, instead of being sent to devices.

无法投屏

一直显示“连接中”,但是上面的菜单键都可以使用(比如音量加减)
运行机子 win10 和 mac都不行

Add this project to scoop

This project solves my need for 4.4 remote control and is very useful. Hope to join scoop for easy installation

有部分手机链接不上

我的红米 note2可以链接, 红米6A,MI8 这两个都是显示连接中, 还有一台 魅蓝 note2 安装不上APK

How to run on mac

Can you make guide, how to run this script on mac...? because target folder output here is .exe file.
image

Connectivity Issue

I have Windows 7 (32 bit) installed on my PC and I am trying to mirror my Realme 5 on PC. There is no issue of ADB drivers. But, the software prompts a screen and it is showing a process connecting continuously. It is getting stuck on this stage.

Cannot bind listener: cannot bind to 127.0.0.1:30000

On some computers that I have installed CxTouch I came across this error :

Cannot bind listener: cannot bind to 127.0.0.1:30000: Normally not allowed only one use of each socket address (protocol / network address / port). (10048).

It does not allow me to see the smartphone, although the cx touch apk is installed.

So, any solution for this?

E/Device: Error during Sync: Local path doesn't exist.

When i try to start session with my device:
image

and in console this:

canvas size: 486,864
2020-09-01 13:20:26,108  INFO (com.cxplan.projection.ui.DeviceImageFrame:1006) - Frame size is changed:[502x963]
01:20:26 E/Device: Error during Sync: Local path doesn't exist.
2020-09-01 13:20:26,747 ERROR (com.cxplan.projection.ui.DeviceImageFrame:247) - Local path doesn't exist.
java.lang.RuntimeException: Local path doesn't exist.
        at com.cxplan.projection.service.ControllerInfrastructureService.installMainProcess(ControllerInfrastructureService.java:66)
        at com.cxplan.projection.ui.DeviceImageFrame.installMainPackage(DeviceImageFrame.java:245)
        at com.cxplan.projection.ui.DeviceImageFrame.access$12(DeviceImageFrame.java:241)
        at com.cxplan.projection.ui.DeviceImageFrame$4.run(DeviceImageFrame.java:225)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: com.android.ddmlib.InstallException: Local path doesn't exist.
        at com.android.ddmlib.Device.installPackage(Device.java:894)
        at com.cxplan.projection.service.ControllerInfrastructureService.installMainProcess(ControllerInfrastructureService.java:64)
        ... 8 more
Caused by: com.android.ddmlib.SyncException: Local path doesn't exist.
        at com.android.ddmlib.SyncService.pushFile(SyncService.java:398)
        at com.android.ddmlib.Device.syncPackageToDevice(Device.java:928)
        at com.android.ddmlib.Device.installPackage(Device.java:884)
        ... 9 more
2020-09-01 13:20:52,686  WARN (com.cxplan.projection.ui.DeviceImageFrame:956) - The thread of showing image is interrupted.
canvas size: 486,864
2020-09-01 13:20:58,547  INFO (com.cxplan.projection.ui.DeviceImageFrame:1006) - Frame size is changed:[502x963]
01:20:59 E/Device: Error during Sync: Local path doesn't exist.
2020-09-01 13:20:59,174 ERROR (com.cxplan.projection.ui.DeviceImageFrame:247) - Local path doesn't exist.
java.lang.RuntimeException: Local path doesn't exist.
        at com.cxplan.projection.service.ControllerInfrastructureService.installMainProcess(ControllerInfrastructureService.java:66)
        at com.cxplan.projection.ui.DeviceImageFrame.installMainPackage(DeviceImageFrame.java:245)
        at com.cxplan.projection.ui.DeviceImageFrame.access$12(DeviceImageFrame.java:241)
        at com.cxplan.projection.ui.DeviceImageFrame$4.run(DeviceImageFrame.java:225)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: com.android.ddmlib.InstallException: Local path doesn't exist.
        at com.android.ddmlib.Device.installPackage(Device.java:894)
        at com.cxplan.projection.service.ControllerInfrastructureService.installMainProcess(ControllerInfrastructureService.java:64)
        ... 8 more
Caused by: com.android.ddmlib.SyncException: Local path doesn't exist.
        at com.android.ddmlib.SyncService.pushFile(SyncService.java:398)
        at com.android.ddmlib.Device.syncPackageToDevice(Device.java:928)
        at com.android.ddmlib.Device.installPackage(Device.java:884)
        ... 9 more
2020-09-01 13:21:04,250  WARN (com.cxplan.projection.ui.DeviceImageFrame:956) - The thread of showing image is interrupted.

感谢作者的作品

你好,测试了下你做的软件,运行的很好,麻烦请问下是否有考虑做web去控制安卓的相关的项目?

没有找到设备

adb devices 明明都能看到 设备 运行程序 显示没有找到设备 红米 Note3 开发者模式都是打开的 USB模拟点击也是打开的 CXTouch1.2

No devices found

I'm on mac With Catalina, and when I start CXTouch I have problem with adb.
Schermata 2020-05-03 alle 17 25 17

I have the debug USB enabled, JAVA updated and I work perfectly with my Android Studio, so what can I do?

Regards

[ERROR] 与客户端无连接,无法发送, 当前连接

I don't see the screen and every action fails like:

[ERROR] 与客户端无连接,无法发送, 当前连接:JID{id='<dev id>', type=DEVICE}, message ID: <some msg id>

java.lang.NoSuchFieldException: AA_TEXT_PROPERTY_KEY
java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel
Caused by: java.lang.ClassNotFoundException: com.sun.java.swing.plaf.windows.WindowsLookAndFeel
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/sun/java/swing/plaf/windows/WindowsLookAndFeel

openjdk 11.0.1 2018-10-16
OpenJDK Runtime Environment (build 11.0.1+13-Ubuntu-3ubuntu3.18.10.1)
OpenJDK 64-Bit Server VM (build 11.0.1+13-Ubuntu-3ubuntu3.18.10.1, mixed mode, sharing)

Otherwise: Why it brings its own adb? It's messing up with the already installed one.

Touchpad Issue

Hello, I am from Spain. I have a doubt about your program/code, it's working fine but if my tablet lose his connection to the internet/Wi-Fi (network) and I re-connect the tablet, the touch part of the tablet doesn't work using it from the PC.

If I check the base information (DeviceInfo file) and I modify the different parameters it still doesn't work at all.

What can I do to fix this issue (for working out of network connection with the touch part of the tablet)?

Looking forward to hearing from you soon.

Best regards.

Plugin org.codehaus.mojo:exec-maven-plugin:1.2.1 or one of its dependencies could not be resolved

Plugin org.codehaus.mojo:exec-maven-plugin:1.2.1 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.codehaus.mojo:exec-maven-plugin:jar:1.2.1: Could not transfer artifact org.codehaus.mojo:exec-maven-plugin:pom:1.2.1 from/to central (http://repo.maven.apache.org/maven2): Failed to transfer file: http://repo.maven.apache.org/maven2/org/codehaus/mojo/exec-maven-plugin/1.2.1/exec-maven-plugin-1.2.1.pom. Return code is: 501 , ReasonPhrase:HTTPS Required. -> [Help 1]

can please anyone have solution for this issue.
thankyou

does not respond to keyevents

Connection is okay and latency is awesome. It also supports mouse and navigation events. However keyevents doesn't work.

logcat shows warning when pressing keys:
W/BroadcastQueue: Unable to launch app com.cxplan.projection.mediate/10199 for broadcast Intent { act=COM.CXPLAN.TOUCH.INPUTER flg=0x10 cmp=com.cxplan.projection.mediate/.inputer.InputerReceiver (has extras) }: process is bad

CXmediate app also fail with:
E/AndroidRuntime: FATAL EXCEPTION: Connect Thread
Process: com.cxplan.projection.mediate, PID: 711
java.lang.RuntimeException: Connecting to message server is timeout: forward port=2014
at com.cxplan.projection.mediate.inputer.CXTouchIME$1.run(CXTouchIME.java:164)
at java.lang.Thread.run(Thread.java:760)

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.