From 0b45c87455c7a2888e637b8eeac4d82662c94613 Mon Sep 17 00:00:00 2001 From: harry Date: Mon, 10 Jul 2017 18:37:12 +0800 Subject: [PATCH] ADD LISENCE --- README.md | 1 + src/main/java/com/yeetor/Main.java | 39 ++++++- src/main/java/com/yeetor/adb/AdbForward.java | 27 ++++- src/main/java/com/yeetor/adb/AdbServer.java | 39 ++++--- src/main/java/com/yeetor/adb/KeyEvent.java | 24 ++++ .../yeetor/androidcontrol/ChildChannel.java | 24 ++++ .../com/yeetor/androidcontrol/Command.java | 24 ++++ .../com/yeetor/androidcontrol/DeviceInfo.java | 24 ++++ .../com/yeetor/androidcontrol/Protocol.java | 24 ++++ .../androidcontrol/WSSocketHandler.java | 24 ++++ .../yeetor/androidcontrol/WebsocketEvent.java | 24 ++++ .../androidcontrol/client/BaseClient.java | 24 ++++ .../androidcontrol/client/LocalClient.java | 24 ++++ .../androidcontrol/client/RemoteClient.java | 24 ++++ .../androidcontrol/message/BinaryMessage.java | 24 ++++ .../androidcontrol/message/FileMessage.java | 24 ++++ .../androidcontrol/server/BaseServer.java | 24 ++++ .../androidcontrol/server/LocalServer.java | 24 ++++ .../androidcontrol/server/RemoteServer.java | 24 ++++ .../java/com/yeetor/engine/EngineDevice.java | 24 ++++ .../java/com/yeetor/engine/JavaScripts.java | 24 ++++ .../java/com/yeetor/engine/js/Functions.java | 24 ++++ src/main/java/com/yeetor/minicap/Banner.java | 24 ++++ .../yeetor/minicap/BinaryOutputReceiver.java | 24 ++++ src/main/java/com/yeetor/minicap/Minicap.java | 24 ++++ .../minicap/MinicapInstallException.java | 24 ++++ .../com/yeetor/minicap/MinicapListener.java | 24 ++++ src/main/java/com/yeetor/minicap/Size.java | 24 ++++ .../java/com/yeetor/minitouch/Minitouch.java | 24 ++++ .../minitouch/MinitouchInstallException.java | 24 ++++ .../yeetor/minitouch/MinitouchListener.java | 24 ++++ .../java/com/yeetor/server/BaseServer.java | 31 ++++++ .../java/com/yeetor/server/TCPServer.java | 28 +++++ .../java/com/yeetor/server/UDPServer.java | 28 +++++ .../com/yeetor/server/WebsocketServer.java | 28 +++++ src/main/java/com/yeetor/usb/Device.java | 28 +++++ src/main/java/com/yeetor/usb/USBListener.java | 104 ++++++++++++++++++ src/main/java/com/yeetor/util/Constant.java | 24 ++++ src/main/java/com/yeetor/util/Util.java | 24 ++++ src/main/resources/javax.usb.properties | 1 + 40 files changed, 1030 insertions(+), 20 deletions(-) create mode 100644 src/main/java/com/yeetor/server/BaseServer.java create mode 100644 src/main/java/com/yeetor/server/TCPServer.java create mode 100644 src/main/java/com/yeetor/server/UDPServer.java create mode 100644 src/main/java/com/yeetor/server/WebsocketServer.java create mode 100644 src/main/java/com/yeetor/usb/Device.java create mode 100644 src/main/java/com/yeetor/usb/USBListener.java create mode 100644 src/main/resources/javax.usb.properties diff --git a/README.md b/README.md index 96d2d5c..9d2ccfa 100644 --- a/README.md +++ b/README.md @@ -60,3 +60,4 @@ RemoteControl是一个服务器,简单来说,如果你只有这个,而没 * 操作录制、运行(使用脚本语言,js|lua|python语言的支持,可能只实现js) * 服务器支持 * 流压缩(h264) +* 目前获取已连接手机全部是通过adb获取,速度较慢。将用usb监听来实时监控手机的连接和信息 \ No newline at end of file diff --git a/src/main/java/com/yeetor/Main.java b/src/main/java/com/yeetor/Main.java index fe665a0..5827819 100644 --- a/src/main/java/com/yeetor/Main.java +++ b/src/main/java/com/yeetor/Main.java @@ -1,10 +1,39 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor; import com.neovisionaries.ws.client.WebSocketException; import com.yeetor.androidcontrol.client.RemoteClient; import com.yeetor.androidcontrol.server.LocalServer; import com.yeetor.androidcontrol.server.RemoteServer; +import com.yeetor.usb.USBListener; +import javax.usb.*; +import javax.usb.event.UsbDeviceListener; +import javax.usb.event.UsbServicesEvent; +import javax.usb.event.UsbServicesListener; import java.security.InvalidParameterException; @@ -17,7 +46,13 @@ public class Main { * [client ip port serialNumber] * [client ip port] */ - public static void main(String[] args) { + public static void main(String[] args) throws UsbException { + + // 监听USB的变化 + USBListener.listen(); + + // parse命令行 + try { Config config = new Config(args); @@ -26,7 +61,7 @@ public static void main(String[] args) { } else { if (config.isLocal) { new LocalServer(config.port).start(); - } else { + } else { new RemoteServer(config.port).start(); } } diff --git a/src/main/java/com/yeetor/adb/AdbForward.java b/src/main/java/com/yeetor/adb/AdbForward.java index 4ffd74b..0bb6546 100644 --- a/src/main/java/com/yeetor/adb/AdbForward.java +++ b/src/main/java/com/yeetor/adb/AdbForward.java @@ -1,8 +1,29 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.adb; -/** - * Created by harry on 2017/4/20. - */ public class AdbForward { private String serialNumber; private int port; diff --git a/src/main/java/com/yeetor/adb/AdbServer.java b/src/main/java/com/yeetor/adb/AdbServer.java index a20268a..6d46b52 100644 --- a/src/main/java/com/yeetor/adb/AdbServer.java +++ b/src/main/java/com/yeetor/adb/AdbServer.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.adb; import com.android.ddmlib.*; @@ -244,19 +268,4 @@ public AdbForward[] getForwardList() { } return new AdbForward[0]; } - -// public static String[] getForwardList(IDevice device) { -// CollectingOutputReceiver receiver = new CollectingOutputReceiver(); -// -// try { -// device.executeShellCommand("forward --list", receiver, 0); -// } catch (Exception e) { -// e.printStackTrace(); -// } -// -// String output = receiver.getOutput(); -// System.out.println(output); -// return null; -// } - } diff --git a/src/main/java/com/yeetor/adb/KeyEvent.java b/src/main/java/com/yeetor/adb/KeyEvent.java index e5f85bf..590cd99 100644 --- a/src/main/java/com/yeetor/adb/KeyEvent.java +++ b/src/main/java/com/yeetor/adb/KeyEvent.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.adb; /** diff --git a/src/main/java/com/yeetor/androidcontrol/ChildChannel.java b/src/main/java/com/yeetor/androidcontrol/ChildChannel.java index 572904e..5b089d3 100644 --- a/src/main/java/com/yeetor/androidcontrol/ChildChannel.java +++ b/src/main/java/com/yeetor/androidcontrol/ChildChannel.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol; import io.netty.channel.ChannelInitializer; diff --git a/src/main/java/com/yeetor/androidcontrol/Command.java b/src/main/java/com/yeetor/androidcontrol/Command.java index 309d2b9..17a8e17 100644 --- a/src/main/java/com/yeetor/androidcontrol/Command.java +++ b/src/main/java/com/yeetor/androidcontrol/Command.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol; import com.alibaba.fastjson.JSONException; diff --git a/src/main/java/com/yeetor/androidcontrol/DeviceInfo.java b/src/main/java/com/yeetor/androidcontrol/DeviceInfo.java index 751c60f..adeaf7d 100644 --- a/src/main/java/com/yeetor/androidcontrol/DeviceInfo.java +++ b/src/main/java/com/yeetor/androidcontrol/DeviceInfo.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol; import com.alibaba.fastjson.annotation.JSONField; diff --git a/src/main/java/com/yeetor/androidcontrol/Protocol.java b/src/main/java/com/yeetor/androidcontrol/Protocol.java index d2f2283..689f3a0 100644 --- a/src/main/java/com/yeetor/androidcontrol/Protocol.java +++ b/src/main/java/com/yeetor/androidcontrol/Protocol.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol; import com.yeetor.androidcontrol.client.LocalClient; diff --git a/src/main/java/com/yeetor/androidcontrol/WSSocketHandler.java b/src/main/java/com/yeetor/androidcontrol/WSSocketHandler.java index 6461cd8..79ee24a 100644 --- a/src/main/java/com/yeetor/androidcontrol/WSSocketHandler.java +++ b/src/main/java/com/yeetor/androidcontrol/WSSocketHandler.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol; import com.neovisionaries.ws.client.WebSocket; diff --git a/src/main/java/com/yeetor/androidcontrol/WebsocketEvent.java b/src/main/java/com/yeetor/androidcontrol/WebsocketEvent.java index 3206363..bedd51a 100644 --- a/src/main/java/com/yeetor/androidcontrol/WebsocketEvent.java +++ b/src/main/java/com/yeetor/androidcontrol/WebsocketEvent.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol; import io.netty.channel.ChannelHandlerContext; diff --git a/src/main/java/com/yeetor/androidcontrol/client/BaseClient.java b/src/main/java/com/yeetor/androidcontrol/client/BaseClient.java index 07f93bd..dc79367 100644 --- a/src/main/java/com/yeetor/androidcontrol/client/BaseClient.java +++ b/src/main/java/com/yeetor/androidcontrol/client/BaseClient.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol.client; /** diff --git a/src/main/java/com/yeetor/androidcontrol/client/LocalClient.java b/src/main/java/com/yeetor/androidcontrol/client/LocalClient.java index 0823fd1..5d47c87 100644 --- a/src/main/java/com/yeetor/androidcontrol/client/LocalClient.java +++ b/src/main/java/com/yeetor/androidcontrol/client/LocalClient.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol.client; import com.alibaba.fastjson.JSONObject; diff --git a/src/main/java/com/yeetor/androidcontrol/client/RemoteClient.java b/src/main/java/com/yeetor/androidcontrol/client/RemoteClient.java index c69966f..1590733 100644 --- a/src/main/java/com/yeetor/androidcontrol/client/RemoteClient.java +++ b/src/main/java/com/yeetor/androidcontrol/client/RemoteClient.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol.client; import com.alibaba.fastjson.JSONObject; diff --git a/src/main/java/com/yeetor/androidcontrol/message/BinaryMessage.java b/src/main/java/com/yeetor/androidcontrol/message/BinaryMessage.java index 822b2bf..fde3221 100644 --- a/src/main/java/com/yeetor/androidcontrol/message/BinaryMessage.java +++ b/src/main/java/com/yeetor/androidcontrol/message/BinaryMessage.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol.message; import com.alibaba.fastjson.JSON; diff --git a/src/main/java/com/yeetor/androidcontrol/message/FileMessage.java b/src/main/java/com/yeetor/androidcontrol/message/FileMessage.java index 919a3a9..66bde39 100644 --- a/src/main/java/com/yeetor/androidcontrol/message/FileMessage.java +++ b/src/main/java/com/yeetor/androidcontrol/message/FileMessage.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol.message; /** diff --git a/src/main/java/com/yeetor/androidcontrol/server/BaseServer.java b/src/main/java/com/yeetor/androidcontrol/server/BaseServer.java index e065479..633d78d 100644 --- a/src/main/java/com/yeetor/androidcontrol/server/BaseServer.java +++ b/src/main/java/com/yeetor/androidcontrol/server/BaseServer.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol.server; import com.alibaba.fastjson.JSON; diff --git a/src/main/java/com/yeetor/androidcontrol/server/LocalServer.java b/src/main/java/com/yeetor/androidcontrol/server/LocalServer.java index 3b587b6..d858da9 100644 --- a/src/main/java/com/yeetor/androidcontrol/server/LocalServer.java +++ b/src/main/java/com/yeetor/androidcontrol/server/LocalServer.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol.server; import com.alibaba.fastjson.JSONObject; diff --git a/src/main/java/com/yeetor/androidcontrol/server/RemoteServer.java b/src/main/java/com/yeetor/androidcontrol/server/RemoteServer.java index 3ac34a0..c01c5b6 100644 --- a/src/main/java/com/yeetor/androidcontrol/server/RemoteServer.java +++ b/src/main/java/com/yeetor/androidcontrol/server/RemoteServer.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.androidcontrol.server; import com.alibaba.fastjson.JSONObject; diff --git a/src/main/java/com/yeetor/engine/EngineDevice.java b/src/main/java/com/yeetor/engine/EngineDevice.java index 129d86c..bef0450 100644 --- a/src/main/java/com/yeetor/engine/EngineDevice.java +++ b/src/main/java/com/yeetor/engine/EngineDevice.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.engine; import com.android.ddmlib.IDevice; diff --git a/src/main/java/com/yeetor/engine/JavaScripts.java b/src/main/java/com/yeetor/engine/JavaScripts.java index 3c90ac5..4597b02 100644 --- a/src/main/java/com/yeetor/engine/JavaScripts.java +++ b/src/main/java/com/yeetor/engine/JavaScripts.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.engine; import com.yeetor.engine.js.Functions; diff --git a/src/main/java/com/yeetor/engine/js/Functions.java b/src/main/java/com/yeetor/engine/js/Functions.java index 0667094..a17c28a 100644 --- a/src/main/java/com/yeetor/engine/js/Functions.java +++ b/src/main/java/com/yeetor/engine/js/Functions.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.engine.js; /** diff --git a/src/main/java/com/yeetor/minicap/Banner.java b/src/main/java/com/yeetor/minicap/Banner.java index 2707f0d..4c8cd79 100644 --- a/src/main/java/com/yeetor/minicap/Banner.java +++ b/src/main/java/com/yeetor/minicap/Banner.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.minicap; /** diff --git a/src/main/java/com/yeetor/minicap/BinaryOutputReceiver.java b/src/main/java/com/yeetor/minicap/BinaryOutputReceiver.java index 9d76219..7e7f793 100644 --- a/src/main/java/com/yeetor/minicap/BinaryOutputReceiver.java +++ b/src/main/java/com/yeetor/minicap/BinaryOutputReceiver.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.minicap; import com.android.ddmlib.IShellOutputReceiver; diff --git a/src/main/java/com/yeetor/minicap/Minicap.java b/src/main/java/com/yeetor/minicap/Minicap.java index e8856d1..2f8ea2e 100644 --- a/src/main/java/com/yeetor/minicap/Minicap.java +++ b/src/main/java/com/yeetor/minicap/Minicap.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.minicap; import com.android.ddmlib.*; diff --git a/src/main/java/com/yeetor/minicap/MinicapInstallException.java b/src/main/java/com/yeetor/minicap/MinicapInstallException.java index 05ea41f..ccf113e 100644 --- a/src/main/java/com/yeetor/minicap/MinicapInstallException.java +++ b/src/main/java/com/yeetor/minicap/MinicapInstallException.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.minicap; /** diff --git a/src/main/java/com/yeetor/minicap/MinicapListener.java b/src/main/java/com/yeetor/minicap/MinicapListener.java index 1d19c55..8bc8fdc 100644 --- a/src/main/java/com/yeetor/minicap/MinicapListener.java +++ b/src/main/java/com/yeetor/minicap/MinicapListener.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.minicap; /** diff --git a/src/main/java/com/yeetor/minicap/Size.java b/src/main/java/com/yeetor/minicap/Size.java index 1f9e7ab..b96a5a3 100644 --- a/src/main/java/com/yeetor/minicap/Size.java +++ b/src/main/java/com/yeetor/minicap/Size.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.minicap; /** diff --git a/src/main/java/com/yeetor/minitouch/Minitouch.java b/src/main/java/com/yeetor/minitouch/Minitouch.java index 1ed3369..0e1de86 100644 --- a/src/main/java/com/yeetor/minitouch/Minitouch.java +++ b/src/main/java/com/yeetor/minitouch/Minitouch.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.minitouch; import com.android.ddmlib.IDevice; diff --git a/src/main/java/com/yeetor/minitouch/MinitouchInstallException.java b/src/main/java/com/yeetor/minitouch/MinitouchInstallException.java index 8985c76..471dedf 100644 --- a/src/main/java/com/yeetor/minitouch/MinitouchInstallException.java +++ b/src/main/java/com/yeetor/minitouch/MinitouchInstallException.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.minitouch; /** diff --git a/src/main/java/com/yeetor/minitouch/MinitouchListener.java b/src/main/java/com/yeetor/minitouch/MinitouchListener.java index add9920..e9365c4 100644 --- a/src/main/java/com/yeetor/minitouch/MinitouchListener.java +++ b/src/main/java/com/yeetor/minitouch/MinitouchListener.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.minitouch; import com.yeetor.minicap.Banner; diff --git a/src/main/java/com/yeetor/server/BaseServer.java b/src/main/java/com/yeetor/server/BaseServer.java new file mode 100644 index 0000000..838026e --- /dev/null +++ b/src/main/java/com/yeetor/server/BaseServer.java @@ -0,0 +1,31 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.yeetor.server; + +import io.netty.channel.EventLoopGroup; +import io.netty.channel.nio.NioEventLoopGroup; + +public abstract class BaseServer { +} diff --git a/src/main/java/com/yeetor/server/TCPServer.java b/src/main/java/com/yeetor/server/TCPServer.java new file mode 100644 index 0000000..8e051d6 --- /dev/null +++ b/src/main/java/com/yeetor/server/TCPServer.java @@ -0,0 +1,28 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.yeetor.server; + +public class TCPServer extends BaseServer { +} diff --git a/src/main/java/com/yeetor/server/UDPServer.java b/src/main/java/com/yeetor/server/UDPServer.java new file mode 100644 index 0000000..80acfa2 --- /dev/null +++ b/src/main/java/com/yeetor/server/UDPServer.java @@ -0,0 +1,28 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.yeetor.server; + +public class UDPServer extends BaseServer { +} diff --git a/src/main/java/com/yeetor/server/WebsocketServer.java b/src/main/java/com/yeetor/server/WebsocketServer.java new file mode 100644 index 0000000..352553e --- /dev/null +++ b/src/main/java/com/yeetor/server/WebsocketServer.java @@ -0,0 +1,28 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.yeetor.server; + +public class WebsocketServer extends BaseServer { +} diff --git a/src/main/java/com/yeetor/usb/Device.java b/src/main/java/com/yeetor/usb/Device.java new file mode 100644 index 0000000..8d6454c --- /dev/null +++ b/src/main/java/com/yeetor/usb/Device.java @@ -0,0 +1,28 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.yeetor.usb; + +public class Device { +} diff --git a/src/main/java/com/yeetor/usb/USBListener.java b/src/main/java/com/yeetor/usb/USBListener.java new file mode 100644 index 0000000..8e5dc2a --- /dev/null +++ b/src/main/java/com/yeetor/usb/USBListener.java @@ -0,0 +1,104 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +package com.yeetor.usb; + +import javax.usb.UsbException; +import javax.usb.UsbHostManager; +import javax.usb.UsbServices; +import javax.usb.event.UsbServicesEvent; +import javax.usb.event.UsbServicesListener; +import java.io.UnsupportedEncodingException; + +public class USBListener { + + private static USBListener instance; + + private UsbServices services = null; + + private USBListener() {} + + public static USBListener getInstance() { + if (instance == null) { + instance = new USBListener(); + instance.init(); + } + return instance; + } + + /** + * 启动USB监听服务 + */ + public static void listen() { + getInstance(); + } + + protected void init() { + try { + services = UsbHostManager.getUsbServices(); + } catch (UsbException e) { + e.printStackTrace(); // TODO: LOG + } + + services.addUsbServicesListener(new MyListener()); + } + + private void onDeviceConnected(UsbServicesEvent usbEvent) { + // 这个方法的作用只是起到通知的作用 + + try { + System.out.println(usbEvent.getUsbDevice().getSerialNumberString()); + } catch (UsbException e) { + e.printStackTrace(); + } catch (UnsupportedEncodingException e) { + e.printStackTrace(); + } + } + + private void onDeviceDisConnected(UsbServicesEvent usbEvent) { + + } + + + class MyListener implements UsbServicesListener { + + @Override + public void usbDeviceAttached(UsbServicesEvent usbServicesEvent) { + if (!usbServicesEvent.getUsbDevice().isUsbHub()) { + onDeviceConnected(usbServicesEvent); + } + } + + @Override + public void usbDeviceDetached(UsbServicesEvent usbServicesEvent) { + if (!usbServicesEvent.getUsbDevice().isUsbHub()) { + onDeviceDisConnected(usbServicesEvent); + } + } + } + +} + + + diff --git a/src/main/java/com/yeetor/util/Constant.java b/src/main/java/com/yeetor/util/Constant.java index b7f6812..0d4c993 100644 --- a/src/main/java/com/yeetor/util/Constant.java +++ b/src/main/java/com/yeetor/util/Constant.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.util; import java.io.File; diff --git a/src/main/java/com/yeetor/util/Util.java b/src/main/java/com/yeetor/util/Util.java index 7148841..9251f51 100644 --- a/src/main/java/com/yeetor/util/Util.java +++ b/src/main/java/com/yeetor/util/Util.java @@ -1,3 +1,27 @@ +/* + * MIT License + * + * Copyright (c) 2017 朱辉 + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in all + * copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + package com.yeetor.util; import com.android.ddmlib.*; diff --git a/src/main/resources/javax.usb.properties b/src/main/resources/javax.usb.properties new file mode 100644 index 0000000..c654287 --- /dev/null +++ b/src/main/resources/javax.usb.properties @@ -0,0 +1 @@ +javax.usb.services=org.usb4java.javax.Services \ No newline at end of file