├── .classpath ├── .gitignore ├── .project ├── AndroidManifest.xml ├── LICENSE ├── README.md ├── bin ├── AndroidManifest.xml ├── adb_wireless.apk ├── classes.dex ├── classes │ └── siir │ │ └── es │ │ └── adbWireless │ │ ├── AutoConnectTask.class │ │ ├── BuildConfig.class │ │ ├── Debug.class │ │ ├── MainActivity$1.class │ │ ├── MainActivity$2.class │ │ ├── MainActivity$3.class │ │ ├── MainActivity.class │ │ ├── R$attr.class │ │ ├── R$drawable.class │ │ ├── R$id.class │ │ ├── R$layout.class │ │ ├── R$menu.class │ │ ├── R$string.class │ │ ├── R$xml.class │ │ ├── R.class │ │ ├── TrackShutdown.class │ │ ├── Utils$1.class │ │ ├── Utils$2.class │ │ ├── Utils.class │ │ └── adbWidgetProvider.class ├── dexedLibs │ └── android-support-v4-ebfeddd30a37afffd9cd74b5bd101db1.jar ├── res │ ├── drawable-hdpi-v11 │ │ └── ic_stat_adbwireless.png │ ├── drawable-hdpi-v9 │ │ └── ic_stat_adbwireless.png │ ├── drawable-hdpi │ │ ├── ic_launcher.png │ │ └── ic_stat_adbwireless.png │ ├── drawable-ldpi-v11 │ │ └── ic_stat_adbwireless.png │ ├── drawable-ldpi-v9 │ │ └── ic_stat_adbwireless.png │ ├── drawable-ldpi │ │ ├── bt_off.png │ │ ├── bt_on.png │ │ ├── ic_launcher.png │ │ ├── ic_stat_adbwireless.png │ │ ├── widget.png │ │ └── widgeton.png │ ├── drawable-mdpi-v11 │ │ └── ic_stat_adbwireless.png │ ├── drawable-mdpi-v9 │ │ └── ic_stat_adbwireless.png │ ├── drawable-mdpi │ │ ├── ic_launcher.png │ │ └── ic_stat_adbwireless.png │ ├── drawable-xhdpi-v11 │ │ └── ic_stat_adbwireless.png │ ├── drawable-xhdpi-v9 │ │ └── ic_stat_adbwireless.png │ ├── drawable-xhdpi │ │ ├── bt_off.png │ │ ├── bt_on.png │ │ ├── ic_launcher.png │ │ └── ic_stat_adbwireless.png │ └── drawable │ │ ├── bt_off.png │ │ ├── bt_on.png │ │ ├── widget.png │ │ └── widgeton.png └── resources.ap_ ├── build.xml ├── gen └── siir │ └── es │ └── adbWireless │ ├── BuildConfig.java │ └── R.java ├── libs └── android-support-v4.jar ├── local.properties ├── proguard-project.txt ├── project.properties ├── res ├── drawable-hdpi-v11 │ └── ic_stat_adbwireless.png ├── drawable-hdpi-v9 │ └── ic_stat_adbwireless.png ├── drawable-hdpi │ ├── ic_launcher.png │ └── ic_stat_adbwireless.png ├── drawable-ldpi-v11 │ └── ic_stat_adbwireless.png ├── drawable-ldpi-v9 │ └── ic_stat_adbwireless.png ├── drawable-ldpi │ ├── bt_off.png │ ├── bt_on.png │ ├── ic_launcher.png │ ├── ic_stat_adbwireless.png │ ├── widget.png │ └── widgeton.png ├── drawable-mdpi-v11 │ └── ic_stat_adbwireless.png ├── drawable-mdpi-v9 │ └── ic_stat_adbwireless.png ├── drawable-mdpi │ ├── ic_launcher.png │ └── ic_stat_adbwireless.png ├── drawable-xhdpi-v11 │ └── ic_stat_adbwireless.png ├── drawable-xhdpi-v9 │ └── ic_stat_adbwireless.png ├── drawable-xhdpi │ ├── bt_off.png │ ├── bt_on.png │ ├── ic_launcher.png │ └── ic_stat_adbwireless.png ├── drawable │ ├── background.jpg │ ├── bt_off.png │ ├── bt_on.png │ ├── widget.png │ └── widgeton.png ├── layout-small │ └── main.xml ├── layout │ ├── adb_appwidget.xml │ └── main.xml ├── menu │ └── activity_main.xml ├── values │ └── strings.xml └── xml │ ├── adb_appwidget_info.xml │ └── preferences.xml └── src └── siir └── es └── adbWireless ├── AutoConnectTask.java ├── Debug.java ├── MainActivity.java ├── SettingsActivity.java ├── TrackShutdown.java ├── Utils.java └── adbWidgetProvider.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | *.apk 3 | *.ap_ 4 | 5 | # Files for the Dalvik VM 6 | *.dex 7 | 8 | # Java class files 9 | *.class 10 | 11 | # Generated files 12 | bin/ 13 | gen/ 14 | 15 | # Gradle files 16 | .gradle/ 17 | build/ 18 | 19 | # Local configuration file (sdk path, etc) 20 | local.properties 21 | 22 | # Proguard folder generated by Eclipse 23 | proguard/ 24 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | adb_wireless 4 | 5 | 6 | 7 | 8 | 9 | com.android.ide.eclipse.adt.ResourceManagerBuilder 10 | 11 | 12 | 13 | 14 | com.android.ide.eclipse.adt.PreCompilerBuilder 15 | 16 | 17 | 18 | 19 | org.eclipse.jdt.core.javabuilder 20 | 21 | 22 | 23 | 24 | com.android.ide.eclipse.adt.ApkBuilder 25 | 26 | 27 | 28 | 29 | 30 | com.android.ide.eclipse.adt.AndroidNature 31 | org.eclipse.jdt.core.javanature 32 | 33 | 34 | -------------------------------------------------------------------------------- /AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 22 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 35 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | 45 | 46 | 47 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | <<<<<<< HEAD 2 | adbwireless 3 | ========== 4 | 5 | ADB Wireless source has gone missing, cloning it if needed here. 6 | 7 | ---------- 8 | 9 | PREVIOUS README 10 | 11 | adbWireless 12 | ---------- 13 | adbWireless enable `ADB` wireless connection to connect to the phone as if connected by USB. 14 | 15 | This App is for developers, if you don't know that it serves don't install! 16 | 17 | `Rooted Phone Only!` 18 | 19 | Versions 20 | ---------- 21 | * **1.5.4** 22 | * Color buttons: "gray = off" and "green = on", when you see the gray button adb is off, when you see the green button adb is on, more simple 23 | * Added option: Screen always on (be careful with battery consumption) 24 | 25 | * **1.5.3** 26 | * Added option for `Auto connect` to computer, see [adbWireless Service](https://github.com/MrSiir/adbWireless#adbwireless-service) 27 | 28 | * **1.5.2** 29 | * Bug fixed, pressing the back button sometimes the message does not disappear ever (Thanks to Sullivan by notify) 30 | 31 | * **1.5.1** 32 | * Auto Start: Added option to enable it at boot (be careful if you enable this option) 33 | 34 | * **1.5** 35 | * Now allows landscape mode 36 | * Compiled with latest Android SDK 37 | * Minor fixes 38 | 39 | * **1.4.1** 40 | * Minor fixes 41 | 42 | * **1.4** 43 | * Added desktop Widget (try!) 44 | 45 | * **1.3** 46 | * Automatic WiFi control by Skywriter 47 | 48 | 49 | adbWireless Service 50 | ---------- 51 | For the auto connection to the computer, more info: 52 | 53 | this has gone missing ---> https://github.com/MrSiir/adbWireless/tree/master/server 54 | 55 | ======= 56 | adb_wireless 57 | ============ 58 | 59 | ADB无线调试 60 | >>>>>>> 41c9589a73634e0bea98afc00f2e449588ecec50 61 | -------------------------------------------------------------------------------- /bin/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 22 | 26 | 27 | 28 | 29 | 30 | 31 | 34 | 35 | 36 | 37 | 38 | 39 | 42 | 43 | 44 | 45 | 46 | 47 | 50 | 51 | 52 | 53 | -------------------------------------------------------------------------------- /bin/adb_wireless.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/adb_wireless.apk -------------------------------------------------------------------------------- /bin/classes.dex: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes.dex -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/AutoConnectTask.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/AutoConnectTask.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/BuildConfig.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/BuildConfig.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/Debug.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/Debug.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/MainActivity$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/MainActivity$1.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/MainActivity$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/MainActivity$2.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/MainActivity$3.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/MainActivity$3.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/MainActivity.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/MainActivity.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/R$attr.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/R$attr.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/R$drawable.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/R$drawable.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/R$id.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/R$id.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/R$layout.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/R$layout.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/R$menu.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/R$menu.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/R$string.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/R$string.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/R$xml.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/R$xml.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/R.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/R.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/TrackShutdown.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/TrackShutdown.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/Utils$1.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/Utils$1.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/Utils$2.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/Utils$2.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/Utils.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/Utils.class -------------------------------------------------------------------------------- /bin/classes/siir/es/adbWireless/adbWidgetProvider.class: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/classes/siir/es/adbWireless/adbWidgetProvider.class -------------------------------------------------------------------------------- /bin/dexedLibs/android-support-v4-ebfeddd30a37afffd9cd74b5bd101db1.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/dexedLibs/android-support-v4-ebfeddd30a37afffd9cd74b5bd101db1.jar -------------------------------------------------------------------------------- /bin/res/drawable-hdpi-v11/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-hdpi-v11/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /bin/res/drawable-hdpi-v9/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-hdpi-v9/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /bin/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/drawable-hdpi/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-hdpi/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /bin/res/drawable-ldpi-v11/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-ldpi-v11/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /bin/res/drawable-ldpi-v9/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-ldpi-v9/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /bin/res/drawable-ldpi/bt_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-ldpi/bt_off.png -------------------------------------------------------------------------------- /bin/res/drawable-ldpi/bt_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-ldpi/bt_on.png -------------------------------------------------------------------------------- /bin/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/drawable-ldpi/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-ldpi/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /bin/res/drawable-ldpi/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-ldpi/widget.png -------------------------------------------------------------------------------- /bin/res/drawable-ldpi/widgeton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-ldpi/widgeton.png -------------------------------------------------------------------------------- /bin/res/drawable-mdpi-v11/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-mdpi-v11/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /bin/res/drawable-mdpi-v9/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-mdpi-v9/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /bin/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/drawable-mdpi/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-mdpi/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /bin/res/drawable-xhdpi-v11/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-xhdpi-v11/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /bin/res/drawable-xhdpi-v9/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-xhdpi-v9/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /bin/res/drawable-xhdpi/bt_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-xhdpi/bt_off.png -------------------------------------------------------------------------------- /bin/res/drawable-xhdpi/bt_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-xhdpi/bt_on.png -------------------------------------------------------------------------------- /bin/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /bin/res/drawable-xhdpi/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable-xhdpi/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /bin/res/drawable/bt_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable/bt_off.png -------------------------------------------------------------------------------- /bin/res/drawable/bt_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable/bt_on.png -------------------------------------------------------------------------------- /bin/res/drawable/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable/widget.png -------------------------------------------------------------------------------- /bin/res/drawable/widgeton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/res/drawable/widgeton.png -------------------------------------------------------------------------------- /bin/resources.ap_: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/bin/resources.ap_ -------------------------------------------------------------------------------- /build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 9 | 29 | 30 | 31 | 35 | 36 | 37 | 38 | 39 | 40 | 49 | 50 | 51 | 52 | 56 | 57 | 69 | 70 | 71 | 89 | 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /gen/siir/es/adbWireless/BuildConfig.java: -------------------------------------------------------------------------------- 1 | /** Automatically generated file. DO NOT MODIFY */ 2 | package siir.es.adbWireless; 3 | 4 | public final class BuildConfig { 5 | public final static boolean DEBUG = true; 6 | } -------------------------------------------------------------------------------- /gen/siir/es/adbWireless/R.java: -------------------------------------------------------------------------------- 1 | /* AUTO-GENERATED FILE. DO NOT MODIFY. 2 | * 3 | * This class was automatically generated by the 4 | * aapt tool from the resource data it found. It 5 | * should not be modified by hand. 6 | */ 7 | 8 | package siir.es.adbWireless; 9 | 10 | public final class R { 11 | public static final class attr { 12 | } 13 | public static final class drawable { 14 | public static final int background=0x7f020000; 15 | public static final int bt_off=0x7f020001; 16 | public static final int bt_on=0x7f020002; 17 | public static final int ic_launcher=0x7f020003; 18 | public static final int ic_stat_adbwireless=0x7f020004; 19 | public static final int widget=0x7f020005; 20 | public static final int widgeton=0x7f020006; 21 | } 22 | public static final class id { 23 | public static final int FrameLayout01=0x7f070000; 24 | public static final int LinearLayout01=0x7f070004; 25 | public static final int iv_button=0x7f070005; 26 | public static final int menu_about=0x7f07000a; 27 | public static final int menu_exit=0x7f07000b; 28 | public static final int menu_prefs=0x7f070009; 29 | public static final int scrollView1=0x7f070002; 30 | public static final int tv_footer_1=0x7f070006; 31 | public static final int tv_footer_2=0x7f070007; 32 | public static final int tv_footer_3=0x7f070008; 33 | public static final int tv_top_text=0x7f070003; 34 | public static final int widgetButton=0x7f070001; 35 | } 36 | public static final class layout { 37 | public static final int adb_appwidget=0x7f030000; 38 | public static final int main=0x7f030001; 39 | } 40 | public static final class menu { 41 | public static final int activity_main=0x7f060000; 42 | } 43 | public static final class string { 44 | public static final int about=0x7f050012; 45 | public static final int app_name=0x7f050000; 46 | /** Start 1.5.3 47 | */ 48 | public static final int autcon_incomplete=0x7f050038; 49 | public static final int autocon=0x7f05003b; 50 | public static final int autoconip=0x7f05003f; 51 | public static final int autoconport=0x7f050043; 52 | public static final int button_activate_wifi=0x7f05000a; 53 | public static final int button_cancle=0x7f050007; 54 | public static final int button_close=0x7f050006; 55 | public static final int button_continue=0x7f050009; 56 | public static final int button_exit=0x7f050008; 57 | public static final int connect_sample=0x7f050019; 58 | public static final int default_autocon=0x7f05003d; 59 | public static final int default_autoconip=0x7f050041; 60 | public static final int default_autoconport=0x7f050045; 61 | public static final int default_haptic=0x7f05002d; 62 | public static final int default_noti=0x7f05002c; 63 | public static final int default_onboot=0x7f050030; 64 | public static final int default_screenon=0x7f050049; 65 | public static final int default_sound=0x7f05002b; 66 | /** Defaults 67 | */ 68 | public static final int default_vibrate=0x7f05002a; 69 | public static final int default_wifi_off=0x7f05002f; 70 | public static final int default_wifi_on=0x7f05002e; 71 | public static final int exit_info=0x7f05001a; 72 | public static final int footer_text_1=0x7f050002; 73 | public static final int footer_text_2=0x7f050003; 74 | public static final int footer_text_3=0x7f050004; 75 | public static final int footer_text_off=0x7f050005; 76 | public static final int haptic=0x7f050023; 77 | public static final int menu_about=0x7f050010; 78 | public static final int menu_exit=0x7f050011; 79 | public static final int menu_prefs=0x7f05000f; 80 | public static final int no_root=0x7f05000c; 81 | public static final int no_root_title=0x7f05000b; 82 | public static final int no_wifi=0x7f05000e; 83 | public static final int no_wifi_title=0x7f05000d; 84 | public static final int noti_text=0x7f050015; 85 | public static final int noti_title=0x7f050016; 86 | public static final int notification=0x7f050021; 87 | /** Settings 88 | */ 89 | public static final int onboot=0x7f05001b; 90 | public static final int pref_autocon_key=0x7f05003e; 91 | public static final int pref_autoconip_key=0x7f050042; 92 | public static final int pref_autoconport_key=0x7f050046; 93 | public static final int pref_haptic_key=0x7f050034; 94 | public static final int pref_noti_key=0x7f050033; 95 | public static final int pref_onboot_key=0x7f050037; 96 | public static final int pref_screenon_key=0x7f05004a; 97 | public static final int pref_sound_key=0x7f050032; 98 | /** Keys 99 | */ 100 | public static final int pref_vibrate_key=0x7f050031; 101 | public static final int pref_wifi_off_key=0x7f050036; 102 | public static final int pref_wifi_on_key=0x7f050035; 103 | /** End 1.5.3 104 | Start 1.5.4 105 | */ 106 | public static final int screenon=0x7f050047; 107 | public static final int server_autocon=0x7f05003c; 108 | public static final int server_autoconip=0x7f050040; 109 | public static final int server_autoconport=0x7f050044; 110 | public static final int server_haptic=0x7f050024; 111 | public static final int server_noti=0x7f050022; 112 | public static final int server_onboot=0x7f05001c; 113 | public static final int server_screenon=0x7f050048; 114 | public static final int server_sound=0x7f050020; 115 | public static final int server_vibrate=0x7f05001e; 116 | public static final int server_wifi_off=0x7f050028; 117 | public static final int server_wifi_on=0x7f050026; 118 | public static final int settings_title_autcon=0x7f050039; 119 | public static final int settings_title_wifi=0x7f05003a; 120 | public static final int sound=0x7f05001f; 121 | public static final int top_text=0x7f050001; 122 | public static final int turning_off_wifi=0x7f050018; 123 | public static final int turning_on_wifi=0x7f050017; 124 | public static final int tv_exit=0x7f050013; 125 | public static final int tv_settings=0x7f050014; 126 | public static final int vibrate=0x7f05001d; 127 | public static final int widget_start=0x7f050029; 128 | public static final int wifi_off=0x7f050027; 129 | public static final int wifi_on=0x7f050025; 130 | } 131 | public static final class xml { 132 | public static final int adb_appwidget_info=0x7f040000; 133 | public static final int preferences=0x7f040001; 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /libs/android-support-v4.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/libs/android-support-v4.jar -------------------------------------------------------------------------------- /local.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must *NOT* be checked into Version Control Systems, 5 | # as it contains information specific to your local configuration. 6 | 7 | # location of the SDK. This is only used by Ant 8 | # For customization when using a Version Control System, please read the 9 | # header note. 10 | sdk.dir=/home/vagrant/android-sdk 11 | 12 | ndk.dir=/home/vagrant/android-ndk 13 | -------------------------------------------------------------------------------- /proguard-project.txt: -------------------------------------------------------------------------------- 1 | # To enable ProGuard in your project, edit project.properties 2 | # to define the proguard.config property as described in that file. 3 | # 4 | # Add project specific ProGuard rules here. 5 | # By default, the flags in this file are appended to flags specified 6 | # in ${sdk.dir}/tools/proguard/proguard-android.txt 7 | # You can edit the include path and order by changing the ProGuard 8 | # include property in project.properties. 9 | # 10 | # For more details, see 11 | # http://developer.android.com/guide/developing/tools/proguard.html 12 | 13 | # Add any project specific keep options here: 14 | 15 | # If your project uses WebView with JS, uncomment the following 16 | # and specify the fully qualified class name to the JavaScript interface 17 | # class: 18 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 19 | # public *; 20 | #} 21 | -------------------------------------------------------------------------------- /project.properties: -------------------------------------------------------------------------------- 1 | # This file is automatically generated by Android Tools. 2 | # Do not modify this file -- YOUR CHANGES WILL BE ERASED! 3 | # 4 | # This file must be checked in Version Control Systems. 5 | # 6 | # To customize properties used by the Ant build system edit 7 | # "ant.properties", and override values to adapt the script to your 8 | # project structure. 9 | # 10 | # To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): 11 | #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt 12 | 13 | # Project target. 14 | target=android-17 15 | -------------------------------------------------------------------------------- /res/drawable-hdpi-v11/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-hdpi-v11/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /res/drawable-hdpi-v9/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-hdpi-v9/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-hdpi/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-hdpi/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /res/drawable-ldpi-v11/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-ldpi-v11/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /res/drawable-ldpi-v9/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-ldpi-v9/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /res/drawable-ldpi/bt_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-ldpi/bt_off.png -------------------------------------------------------------------------------- /res/drawable-ldpi/bt_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-ldpi/bt_on.png -------------------------------------------------------------------------------- /res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-ldpi/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-ldpi/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /res/drawable-ldpi/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-ldpi/widget.png -------------------------------------------------------------------------------- /res/drawable-ldpi/widgeton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-ldpi/widgeton.png -------------------------------------------------------------------------------- /res/drawable-mdpi-v11/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-mdpi-v11/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /res/drawable-mdpi-v9/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-mdpi-v9/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-mdpi/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-mdpi/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /res/drawable-xhdpi-v11/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-xhdpi-v11/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /res/drawable-xhdpi-v9/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-xhdpi-v9/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/bt_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-xhdpi/bt_off.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/bt_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-xhdpi/bt_on.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /res/drawable-xhdpi/ic_stat_adbwireless.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable-xhdpi/ic_stat_adbwireless.png -------------------------------------------------------------------------------- /res/drawable/background.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable/background.jpg -------------------------------------------------------------------------------- /res/drawable/bt_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable/bt_off.png -------------------------------------------------------------------------------- /res/drawable/bt_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable/bt_on.png -------------------------------------------------------------------------------- /res/drawable/widget.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable/widget.png -------------------------------------------------------------------------------- /res/drawable/widgeton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/haikuowuya/adb_wireless/c890df83d509a46f94c66abf430beee9dc3b9962/res/drawable/widgeton.png -------------------------------------------------------------------------------- /res/layout-small/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 17 | 18 | 24 | 25 | 31 | 32 | 33 | 34 | 40 | 41 | 42 | 52 | 53 | 54 | 59 | 60 | 61 | -------------------------------------------------------------------------------- /res/layout/adb_appwidget.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 26 | 27 | 33 | 34 | 40 | 41 | 42 | 43 | 50 | 51 | 52 | 63 | 64 | 65 | 71 | 72 | 73 | 74 | -------------------------------------------------------------------------------- /res/menu/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 9 | 15 | 21 | 22 | -------------------------------------------------------------------------------- /res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 无线调试 5 | 欢迎使用无线调试,点击下面的按钮你可以开启/关闭无线调试 6 | 无线调试已经打开,请在你的电脑中执行以下命令: 7 | 8 | 9 | 无线调试已经关闭 10 | 关闭 11 | 取消 12 | 退出 13 | 继续 14 | 打开WIFI 15 | 设备没有Root 16 | 你的设备需要Root后才可以使用所有的功能! 17 | 没有可用WIFI 18 | WIFI是关闭的,你需要打开才可以使用无线调试 19 | 设置 20 | 关于 21 | 退出 22 | 无线调试允许开发人员摆脱USB数据线和距离的束缚。\n作者:MrSiir(mrsiir@gmail.com)\n\nadbWirelessService代码地址:\nhttps://github.com/MrSiir/adbWireless/tree/master/server[已丢失]\n\nAndroid源代码地址:\nhttps://github.com/slightlywobbly/adbWireless 23 | 确定退出无线调试客户端? 24 | 设置 25 | 连接到 26 | USB调试已经连接 27 | 打开WIFI 28 | 关闭WIFI 29 | 连接到 192.168.1.106 30 | 退出应用程序,请点击退出按钮 31 | 32 | 33 | 自动启动 34 | 当设备启动的时候应用程序也自动启动 35 | 震动 36 | 当与设备连接成功的时候 37 | 声音 38 | 当与设备连接成功的时候 39 | 通知 40 | 当与设备连接成功的时候 41 | 触摸反馈 42 | 当按钮按下的时候 43 | WIFI自动打开 44 | 当应用开启的时候自动打开WIFI 45 | WIFI自动关闭 46 | 当应用退出的时候自动关闭WIFI 47 | 无线调试已经打开\n连接到 48 | 49 | 50 | true 51 | true 52 | true 53 | true 54 | false 55 | false 56 | false 57 | 58 | 59 | key_vibrate 60 | key_sound 61 | key_noti 62 | key_haptic 63 | key_wifi_on 64 | key_wifi_off 65 | key_onboot 66 | 67 | 68 | 你必须配置端口和IP地址 69 | 自动连接 70 | WIFI设置 71 | 自动连接 72 | 当你启动ADB的时候自动连接到电脑 73 | false 74 | key_autocon 75 | 电脑名称/IP地址 76 | 电脑地址, 需要无线调试服务 77 | 78 | key_autoconip 79 | 电脑开启的端口 80 | 默认端口是8555 81 | 8555 82 | key_autoconport 83 | 84 | 85 | 86 | 设备屏幕常亮 87 | 设备不会进入休眠模式 88 | false 89 | key_screenon 90 | 91 | 92 | 93 | -------------------------------------------------------------------------------- /res/xml/adb_appwidget_info.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | -------------------------------------------------------------------------------- /res/xml/preferences.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 11 | 16 | 21 | 26 | 31 | 36 | 37 | 38 | 43 | 44 | 50 | 56 | 57 | 58 | 63 | 68 | 69 | 70 | -------------------------------------------------------------------------------- /src/siir/es/adbWireless/AutoConnectTask.java: -------------------------------------------------------------------------------- 1 | /** 2 | * siir.es.adbWireless.adbWireless.java This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is 3 | * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with 4 | * this program. If not, see . 5 | **/ 6 | 7 | package siir.es.adbWireless; 8 | 9 | import java.net.URI; 10 | 11 | import org.apache.http.client.HttpClient; 12 | import org.apache.http.client.methods.HttpGet; 13 | import org.apache.http.impl.client.DefaultHttpClient; 14 | 15 | import android.os.AsyncTask; 16 | 17 | class AutoConnectTask extends AsyncTask 18 | { 19 | 20 | private String url; 21 | 22 | public AutoConnectTask(String u) 23 | { 24 | this.url = u; 25 | } 26 | 27 | @Override 28 | protected Void doInBackground(Void... params) 29 | { 30 | try 31 | { 32 | URI url = new URI(this.url); 33 | System.out.println("url = " + this.url); 34 | HttpClient httpClient = new DefaultHttpClient(); 35 | HttpGet method = new HttpGet(url); 36 | httpClient.execute(method); 37 | } 38 | catch (Exception e) 39 | { 40 | Debug.error("ERROR doInBackground()", e); 41 | } 42 | return null; 43 | } 44 | 45 | } -------------------------------------------------------------------------------- /src/siir/es/adbWireless/Debug.java: -------------------------------------------------------------------------------- 1 | /** 2 | * siir.es.adbWireless.adbWireless.java 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | **/ 18 | 19 | package siir.es.adbWireless; 20 | 21 | import android.util.Log; 22 | 23 | public class Debug { 24 | 25 | private static final String TAG = "adbWireless"; 26 | 27 | public static void log(String msg) { 28 | Log.d(TAG, msg); 29 | } 30 | 31 | public static void error(String msg, Exception e) { 32 | Log.e(TAG, msg, e); 33 | } 34 | 35 | public static void info(String msg) { 36 | Log.i(TAG, msg); 37 | } 38 | 39 | public static void warn(String msg) { 40 | Log.w(TAG, msg); 41 | } 42 | } -------------------------------------------------------------------------------- /src/siir/es/adbWireless/MainActivity.java: -------------------------------------------------------------------------------- 1 | 2 | package siir.es.adbWireless; 3 | 4 | import android.app.Activity; 5 | import android.app.AlertDialog; 6 | import android.app.NotificationManager; 7 | import android.content.Context; 8 | import android.content.DialogInterface; 9 | import android.content.Intent; 10 | import android.content.SharedPreferences; 11 | import android.content.res.Configuration; 12 | import android.os.Bundle; 13 | import android.os.Vibrator; 14 | import android.view.KeyEvent; 15 | import android.view.Menu; 16 | import android.view.MenuItem; 17 | import android.view.View; 18 | import android.view.View.OnClickListener; 19 | import android.widget.ImageView; 20 | import android.widget.RemoteViews; 21 | import android.widget.TextView; 22 | import android.widget.Toast; 23 | 24 | public class MainActivity extends Activity 25 | { 26 | public static final String PORT = "5555"; 27 | public static final boolean USB_DEBUG = false; 28 | 29 | public static boolean mState = false; 30 | public static boolean wifiState; 31 | 32 | private TextView tv_footer_1; 33 | private TextView tv_footer_2; 34 | private TextView tv_footer_3; 35 | private ImageView iv_button; 36 | 37 | private Toast toastBack; 38 | 39 | public static RemoteViews remoteViews = new RemoteViews("siir.es.adbWireless", R.layout.adb_appwidget); 40 | 41 | @Override 42 | public void onCreate(Bundle savedInstanceState) 43 | { 44 | super.onCreate(savedInstanceState); 45 | setContentView(R.layout.main);//TODO 46 | initView(); 47 | if (Utils.mNotificationManager == null) 48 | { 49 | Utils.mNotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE); 50 | } 51 | if (!Utils.hasRootPermission()) 52 | { 53 | AlertDialog.Builder builder = new AlertDialog.Builder(this); 54 | builder.setMessage(getString(R.string.no_root)).setCancelable(true).setPositiveButton(getString(R.string.button_close), new DialogInterface.OnClickListener() 55 | { 56 | public void onClick(DialogInterface dialog, int id) 57 | { 58 | MainActivity.this.finish(); 59 | } 60 | }); 61 | builder.setIcon(android.R.drawable.ic_dialog_alert); 62 | builder.create(); 63 | builder.setTitle(R.string.no_root_title); 64 | builder.show(); 65 | } 66 | 67 | if (!Utils.checkWifiState(this)) 68 | { 69 | wifiState = false; 70 | Utils.saveWiFiState(this, wifiState); 71 | if (Utils.prefsWiFiOn(this)) 72 | { 73 | Utils.enableWiFi(this, true); 74 | } 75 | else 76 | { 77 | Utils.WiFidialog(this); 78 | } 79 | } 80 | else 81 | { 82 | wifiState = true; 83 | Utils.saveWiFiState(this, wifiState); 84 | } 85 | 86 | this.iv_button.setOnClickListener(new OnClickListener() 87 | { 88 | public void onClick(View v) 89 | { 90 | Vibrator vib = (Vibrator) getSystemService(Context.VIBRATOR_SERVICE); 91 | if (Utils.prefsHaptic(MainActivity.this)) 92 | vib.vibrate(45); 93 | try 94 | { 95 | if (!mState) 96 | { 97 | Utils.adbStart(MainActivity.this); 98 | } 99 | else 100 | { 101 | Utils.adbStop(MainActivity.this); 102 | } 103 | updateState(); 104 | } 105 | catch (Exception e) 106 | { 107 | e.printStackTrace(); 108 | } 109 | 110 | } 111 | }); 112 | } 113 | 114 | private void initView() 115 | { 116 | this.iv_button = (ImageView) findViewById(R.id.iv_button); 117 | this.tv_footer_1 = (TextView) findViewById(R.id.tv_footer_1); 118 | this.tv_footer_2 = (TextView) findViewById(R.id.tv_footer_2); 119 | this.tv_footer_3 = (TextView) findViewById(R.id.tv_footer_3); 120 | } 121 | 122 | @Override 123 | protected void onResume() 124 | { 125 | super.onResume(); 126 | SharedPreferences settings = getSharedPreferences("wireless", 0); 127 | mState = settings.getBoolean("mState", false); 128 | wifiState = settings.getBoolean("wifiState", false); 129 | updateState(); 130 | } 131 | 132 | @Override 133 | protected void onPause() 134 | { 135 | super.onPause(); 136 | Debug.log("onPause()"); 137 | } 138 | 139 | @Override 140 | protected void onDestroy() 141 | { 142 | try 143 | { 144 | Utils.adbStop(this); 145 | } 146 | catch (Exception e) 147 | {} 148 | try 149 | { 150 | Utils.mNotificationManager.cancelAll(); 151 | } 152 | catch (Exception e) 153 | {} 154 | /* 155 | * try { if(Utils.mWakeLock != null) { Utils.mWakeLock.release(); } } catch (Exception e) { } 156 | */ 157 | try 158 | { 159 | if (Utils.prefsWiFiOff(this) && !wifiState && Utils.checkWifiState(this)) 160 | { 161 | Utils.enableWiFi(this, false); 162 | } 163 | } 164 | catch (Exception e) 165 | {} 166 | super.onDestroy(); 167 | } 168 | 169 | @Override 170 | public boolean onCreateOptionsMenu(Menu menu) 171 | { 172 | getMenuInflater().inflate(R.menu.activity_main, menu); 173 | return true; 174 | } 175 | 176 | @Override 177 | public boolean onMenuItemSelected(int featureId, MenuItem item) 178 | { 179 | switch (item.getItemId()) 180 | { 181 | case R.id.menu_prefs: 182 | Intent i = new Intent(this, SettingsActivity.class); 183 | startActivityForResult(i, Utils.ACTIVITY_SETTINGS); 184 | break; 185 | case R.id.menu_about: 186 | this.showHelpDialog(); 187 | return true; 188 | case R.id.menu_exit: 189 | showExitDialog(); 190 | return true; 191 | } 192 | return super.onMenuItemSelected(featureId, item); 193 | } 194 | 195 | /** 196 | * onBackPressed() requires Android 2.0, API 5 (ECLAIR) 197 | */ 198 | @Override 199 | public boolean onKeyDown(int keyCode, KeyEvent event) 200 | { 201 | if (keyCode == KeyEvent.KEYCODE_BACK) 202 | { 203 | if (toastBack == null || toastBack.getView().getWindowVisibility() != View.VISIBLE) 204 | { 205 | toastBack = Toast.makeText(this, R.string.exit_info, Toast.LENGTH_LONG); 206 | // toastBack.show(); 207 | } 208 | showExitDialog(); 209 | return true; 210 | } 211 | return super.onKeyDown(keyCode, event); 212 | } 213 | 214 | @Override 215 | public void onConfigurationChanged(Configuration newConfig) 216 | { 217 | super.onConfigurationChanged(newConfig); 218 | } 219 | 220 | private void updateState() 221 | { 222 | if (mState) 223 | { 224 | tv_footer_1.setText(R.string.footer_text_1); 225 | try 226 | { 227 | tv_footer_2.setText("adb connect " + Utils.getWifiIp(this)); 228 | } 229 | catch (Exception e) 230 | { 231 | tv_footer_2.setText("adb connect ?"); 232 | } 233 | tv_footer_2.setVisibility(View.VISIBLE); 234 | tv_footer_3.setVisibility(View.VISIBLE); 235 | iv_button.setImageResource(R.drawable.bt_on); 236 | } 237 | else 238 | { 239 | tv_footer_1.setText(R.string.footer_text_off); 240 | tv_footer_2.setVisibility(View.INVISIBLE); 241 | tv_footer_3.setVisibility(View.INVISIBLE); 242 | iv_button.setImageResource(R.drawable.bt_off); 243 | } 244 | } 245 | 246 | private void showHelpDialog() 247 | { 248 | AlertDialog.Builder builder = new AlertDialog.Builder(this); 249 | builder.setMessage(getString(R.string.about)).setCancelable(true).setPositiveButton(getString(R.string.button_close), new DialogInterface.OnClickListener() 250 | { 251 | public void onClick(DialogInterface dialog, int id) 252 | {} 253 | }); 254 | builder.setIcon(R.drawable.ic_launcher); 255 | builder.create(); 256 | builder.setTitle(R.string.app_name); 257 | builder.show(); 258 | } 259 | 260 | private void showExitDialog() 261 | { 262 | AlertDialog.Builder builder = new AlertDialog.Builder(this); 263 | builder.setMessage(getString(R.string.tv_exit)).setCancelable(true).setPositiveButton("退出", new DialogInterface.OnClickListener() 264 | { 265 | public void onClick(DialogInterface dialog, int which) 266 | { 267 | MainActivity.this.finish(); 268 | } 269 | }).setNegativeButton(getString(R.string.button_cancle), new DialogInterface.OnClickListener() 270 | { 271 | public void onClick(DialogInterface dialog, int id) 272 | {} 273 | }); 274 | builder.setIcon(R.drawable.ic_launcher); 275 | builder.setTitle(R.string.app_name); 276 | builder.show(); 277 | } 278 | } -------------------------------------------------------------------------------- /src/siir/es/adbWireless/SettingsActivity.java: -------------------------------------------------------------------------------- 1 | /** 2 | * siir.es.adbWireless.adbWireless.java This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is 3 | * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with 4 | * this program. If not, see . 5 | **/ 6 | 7 | package siir.es.adbWireless; 8 | 9 | import android.os.Bundle; 10 | import android.preference.PreferenceActivity; 11 | 12 | public class SettingsActivity extends PreferenceActivity 13 | { 14 | 15 | @SuppressWarnings("deprecation") 16 | @Override 17 | public void onCreate(Bundle savedInstanceState) 18 | { 19 | super.onCreate(savedInstanceState); 20 | addPreferencesFromResource(R.xml.preferences); 21 | } 22 | } -------------------------------------------------------------------------------- /src/siir/es/adbWireless/TrackShutdown.java: -------------------------------------------------------------------------------- 1 | /** 2 | * siir.es.adbWireless.adbWireless.java 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | **/ 18 | 19 | package siir.es.adbWireless; 20 | 21 | import android.content.BroadcastReceiver; 22 | import android.content.Context; 23 | import android.content.Intent; 24 | import android.content.SharedPreferences; 25 | import android.widget.Toast; 26 | 27 | public class TrackShutdown extends BroadcastReceiver { 28 | 29 | @Override 30 | public void onReceive(Context context, Intent intent) { 31 | 32 | SharedPreferences settings = context.getSharedPreferences("wireless", 0); 33 | SharedPreferences.Editor editor = settings.edit(); 34 | editor.putBoolean("mState", false); 35 | editor.commit(); 36 | 37 | if (Utils.prefsOnBoot(context)) { 38 | 39 | if (!Utils.hasRootPermission()) { 40 | Toast.makeText(context, R.string.no_root, Toast.LENGTH_LONG).show(); 41 | return; 42 | } 43 | 44 | if (!Utils.checkWifiState(context)) { 45 | MainActivity.wifiState = false; 46 | Utils.saveWiFiState(context, MainActivity.wifiState); 47 | 48 | if (Utils.prefsWiFiOn(context)) { 49 | Utils.enableWiFi(context, true); 50 | } else { 51 | Toast.makeText(context, R.string.no_wifi, Toast.LENGTH_LONG).show(); 52 | return; 53 | } 54 | } else { 55 | MainActivity.wifiState = true; 56 | Utils.saveWiFiState(context, MainActivity.wifiState); 57 | } 58 | 59 | try { 60 | Utils.adbStart(context); 61 | } catch (Exception e) { 62 | Debug.error("call adbStart() ERROR ********", e); 63 | } 64 | 65 | } 66 | 67 | } 68 | } -------------------------------------------------------------------------------- /src/siir/es/adbWireless/Utils.java: -------------------------------------------------------------------------------- 1 | /** 2 | * siir.es.adbWireless.adbWireless.java This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is 3 | * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with 4 | * this program. If not, see . 5 | **/ 6 | 7 | package siir.es.adbWireless; 8 | 9 | import java.io.BufferedReader; 10 | import java.io.DataOutputStream; 11 | import java.io.InputStreamReader; 12 | 13 | import android.app.Activity; 14 | import android.app.AlertDialog; 15 | import android.app.Notification; 16 | import android.app.NotificationManager; 17 | import android.app.PendingIntent; 18 | import android.appwidget.AppWidgetManager; 19 | import android.content.ComponentName; 20 | import android.content.Context; 21 | import android.content.DialogInterface; 22 | import android.content.Intent; 23 | import android.content.SharedPreferences; 24 | import android.net.wifi.WifiInfo; 25 | import android.net.wifi.WifiManager; 26 | import android.os.PowerManager; 27 | import android.os.PowerManager.WakeLock; 28 | import android.preference.PreferenceManager; 29 | import android.widget.Toast; 30 | 31 | public class Utils 32 | { 33 | 34 | public static NotificationManager mNotificationManager; 35 | public static WakeLock mWakeLock; 36 | 37 | public static final int START_NOTIFICATION_ID = 1; 38 | public static final int ACTIVITY_SETTINGS = 2; 39 | 40 | public static void saveWiFiState(Context context, boolean wifiState) 41 | { 42 | SharedPreferences settings = context.getSharedPreferences("wireless", 0); 43 | SharedPreferences.Editor editor = settings.edit(); 44 | editor.putBoolean("wifiState", wifiState); 45 | editor.commit(); 46 | } 47 | 48 | public static void WiFidialog(final Context context) 49 | { 50 | AlertDialog.Builder builder = new AlertDialog.Builder(context); 51 | builder.setMessage(context.getString(R.string.no_wifi)).setCancelable(true).setPositiveButton(context.getString(R.string.button_exit), new DialogInterface.OnClickListener() 52 | { 53 | public void onClick(DialogInterface dialog, int id) 54 | { 55 | System.exit(0); 56 | } 57 | }).setNegativeButton(R.string.button_activate_wifi, new DialogInterface.OnClickListener() 58 | { 59 | public void onClick(DialogInterface dialog, int id) 60 | { 61 | Utils.enableWiFi(context, true); 62 | dialog.cancel(); 63 | } 64 | }); 65 | builder.setIcon(android.R.drawable.ic_dialog_alert); 66 | builder.create(); 67 | builder.setTitle(R.string.no_wifi_title); 68 | builder.show(); 69 | } 70 | 71 | @SuppressWarnings("deprecation") 72 | public static boolean adbStart(Context context) 73 | { 74 | try 75 | { 76 | if (!MainActivity.USB_DEBUG) 77 | { 78 | Utils.setProp("service.adb.tcp.port", MainActivity.PORT); 79 | try 80 | { 81 | if (Utils.isProcessRunning("adbd")) 82 | { 83 | Utils.runRootCommand("stop adbd"); 84 | } 85 | } 86 | catch (Exception e) 87 | {} 88 | Utils.runRootCommand("start adbd"); 89 | } 90 | try 91 | { 92 | MainActivity.mState = true; 93 | } 94 | catch (Exception e) 95 | {} 96 | SharedPreferences settings = context.getSharedPreferences("wireless", 0); 97 | SharedPreferences.Editor editor = settings.edit(); 98 | editor.putBoolean("mState", true); 99 | editor.commit(); 100 | 101 | MainActivity.remoteViews.setImageViewResource(R.id.widgetButton, R.drawable.widgeton); 102 | ComponentName cn = new ComponentName(context, adbWidgetProvider.class); 103 | AppWidgetManager.getInstance(context).updateAppWidget(cn, MainActivity.remoteViews); 104 | 105 | // Try to auto connect 106 | if (Utils.prefsAutoCon(context)) 107 | { 108 | Utils.autoConnect(context, "c"); 109 | } 110 | 111 | // Wake Lock 112 | if (Utils.prefsScreenOn(context)) 113 | { 114 | final PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); 115 | mWakeLock = pm.newWakeLock(PowerManager.SCREEN_BRIGHT_WAKE_LOCK, context.getClass().getName()); 116 | mWakeLock.acquire(); 117 | } 118 | 119 | if (Utils.prefsNoti(context)) 120 | { 121 | Utils.showNotification(context, R.drawable.ic_stat_adbwireless, context.getString(R.string.noti_text) + " " + Utils.getWifiIp(context)); 122 | } 123 | } 124 | catch (Exception e) 125 | { 126 | return false; 127 | } 128 | return true; 129 | } 130 | 131 | public static boolean adbStop(Context context) throws Exception 132 | { 133 | try 134 | { 135 | if (!MainActivity.USB_DEBUG) 136 | { 137 | if (MainActivity.mState) 138 | { 139 | setProp("service.adb.tcp.port", "-1"); 140 | runRootCommand("stop adbd"); 141 | runRootCommand("start adbd"); 142 | } 143 | } 144 | MainActivity.mState = false; 145 | 146 | SharedPreferences settings = context.getSharedPreferences("wireless", 0); 147 | SharedPreferences.Editor editor = settings.edit(); 148 | editor.putBoolean("mState", false); 149 | editor.commit(); 150 | 151 | MainActivity.remoteViews.setImageViewResource(R.id.widgetButton, R.drawable.widget); 152 | ComponentName cn = new ComponentName(context, adbWidgetProvider.class); 153 | AppWidgetManager.getInstance(context).updateAppWidget(cn, MainActivity.remoteViews); 154 | 155 | // Try to auto disconnect 156 | if (Utils.prefsAutoCon(context)) 157 | { 158 | Utils.autoConnect(context, "d"); 159 | } 160 | 161 | // Wake Lock 162 | if (mWakeLock != null) 163 | { 164 | mWakeLock.release(); 165 | } 166 | 167 | if (Utils.mNotificationManager != null) 168 | { 169 | Utils.mNotificationManager.cancelAll(); 170 | } 171 | } 172 | catch (Exception e) 173 | { 174 | return false; 175 | } 176 | return true; 177 | 178 | } 179 | 180 | public static void autoConnect(Context context, String mode) 181 | { 182 | String autoConIP = Utils.prefsAutoConIP(context); 183 | String autoConPort = Utils.prefsAutoConPort(context); 184 | 185 | if (autoConIP.trim().equals("") || autoConPort.trim().equals("")) 186 | { 187 | Toast.makeText(context, R.string.autcon_incomplete, Toast.LENGTH_LONG).show(); 188 | return; 189 | } 190 | 191 | String urlRequest = "http://" + autoConIP + ":" + autoConPort + "/" + mode + "/" + Utils.getWifiIp(context); 192 | 193 | try 194 | { 195 | new AutoConnectTask(urlRequest).execute(); 196 | } 197 | catch (Exception e) 198 | {} 199 | 200 | } 201 | 202 | public static boolean isProcessRunning(String processName) throws Exception 203 | { 204 | boolean running = false; 205 | Process process = null; 206 | process = Runtime.getRuntime().exec("ps"); 207 | BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream())); 208 | String line = null; 209 | while ((line = in.readLine()) != null) 210 | { 211 | if (line.contains(processName)) 212 | { 213 | running = true; 214 | break; 215 | } 216 | } 217 | in.close(); 218 | process.waitFor(); 219 | return running; 220 | } 221 | 222 | public static boolean hasRootPermission() 223 | { 224 | Process process = null; 225 | DataOutputStream os = null; 226 | boolean rooted = true; 227 | try 228 | { 229 | process = Runtime.getRuntime().exec("su"); 230 | os = new DataOutputStream(process.getOutputStream()); 231 | os.writeBytes("exit\n"); 232 | os.flush(); 233 | process.waitFor(); 234 | if (process.exitValue() != 0) 235 | { 236 | rooted = false; 237 | } 238 | } 239 | catch (Exception e) 240 | { 241 | rooted = false; 242 | } 243 | finally 244 | { 245 | if (os != null) 246 | { 247 | try 248 | { 249 | os.close(); 250 | process.destroy(); 251 | } 252 | catch (Exception e) 253 | {} 254 | } 255 | } 256 | return rooted; 257 | } 258 | 259 | public static boolean runRootCommand(String command) 260 | { 261 | Process process = null; 262 | DataOutputStream os = null; 263 | try 264 | { 265 | process = Runtime.getRuntime().exec("su"); 266 | os = new DataOutputStream(process.getOutputStream()); 267 | os.writeBytes(command + "\n"); 268 | os.writeBytes("exit\n"); 269 | os.flush(); 270 | process.waitFor(); 271 | } 272 | catch (Exception e) 273 | { 274 | return false; 275 | } 276 | finally 277 | { 278 | try 279 | { 280 | if (os != null) 281 | { 282 | os.close(); 283 | } 284 | process.destroy(); 285 | } 286 | catch (Exception e) 287 | {} 288 | } 289 | return true; 290 | } 291 | 292 | public static boolean setProp(String property, String value) 293 | { 294 | return runRootCommand("setprop " + property + " " + value); 295 | } 296 | 297 | public static String getWifiIp(Context context) 298 | { 299 | WifiManager mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); 300 | int ip = mWifiManager.getConnectionInfo().getIpAddress(); 301 | return (ip & 0xFF) + "." + ((ip >> 8) & 0xFF) + "." + ((ip >> 16) & 0xFF) + "." + ((ip >> 24) & 0xFF); 302 | } 303 | 304 | public static void enableWiFi(Context context, boolean enable) 305 | { 306 | if (enable) 307 | { 308 | Toast.makeText(context, R.string.turning_on_wifi, Toast.LENGTH_LONG).show(); 309 | } 310 | else 311 | { 312 | Toast.makeText(context, R.string.turning_off_wifi, Toast.LENGTH_LONG).show(); 313 | } 314 | WifiManager mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); 315 | mWifiManager.setWifiEnabled(enable); 316 | } 317 | 318 | public static boolean checkWifiState(Context context) 319 | { 320 | try 321 | { 322 | WifiManager mWifiManager = (WifiManager) context.getSystemService(Context.WIFI_SERVICE); 323 | WifiInfo wifiInfo = mWifiManager.getConnectionInfo(); 324 | if (!mWifiManager.isWifiEnabled() || wifiInfo.getSSID() == null) 325 | { 326 | return false; 327 | } 328 | 329 | return true; 330 | } 331 | catch (Exception e) 332 | { 333 | return false; 334 | } 335 | } 336 | 337 | @SuppressWarnings("deprecation") 338 | public static void showNotification(Context context, int icon, String text) 339 | { 340 | final Notification notifyDetails = new Notification(icon, text, System.currentTimeMillis()); 341 | notifyDetails.flags = Notification.FLAG_ONGOING_EVENT; 342 | if (prefsSound(context)) 343 | { 344 | notifyDetails.defaults |= Notification.DEFAULT_SOUND; 345 | } 346 | if (prefsVibrate(context)) 347 | { 348 | notifyDetails.defaults |= Notification.DEFAULT_VIBRATE; 349 | } 350 | Intent notifyIntent = new Intent(context, MainActivity.class); 351 | notifyIntent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP); 352 | PendingIntent intent = PendingIntent.getActivity(context, 0, notifyIntent, 0); 353 | notifyDetails.setLatestEventInfo(context, context.getResources().getString(R.string.noti_title), text, intent); 354 | 355 | if(Utils.mNotificationManager == null) 356 | { 357 | Utils.mNotificationManager = (NotificationManager) context.getSystemService(Activity.NOTIFICATION_SERVICE); 358 | } 359 | Utils.mNotificationManager.notify(Utils.START_NOTIFICATION_ID, notifyDetails); 360 | } 361 | 362 | public static boolean prefsOnBoot(Context context) 363 | { 364 | SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); 365 | return pref.getBoolean(context.getResources().getString(R.string.pref_onboot_key), false); 366 | } 367 | 368 | public static boolean prefsVibrate(Context context) 369 | { 370 | SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); 371 | return pref.getBoolean(context.getResources().getString(R.string.pref_vibrate_key), true); 372 | } 373 | 374 | public static boolean prefsSound(Context context) 375 | { 376 | SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); 377 | return pref.getBoolean(context.getResources().getString(R.string.pref_sound_key), true); 378 | } 379 | 380 | public static boolean prefsNoti(Context context) 381 | { 382 | SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); 383 | return pref.getBoolean(context.getResources().getString(R.string.pref_noti_key), true); 384 | } 385 | 386 | public static boolean prefsHaptic(Context context) 387 | { 388 | SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); 389 | return pref.getBoolean(context.getResources().getString(R.string.pref_haptic_key), true); 390 | } 391 | 392 | public static boolean prefsWiFiOn(Context context) 393 | { 394 | SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); 395 | return pref.getBoolean(context.getResources().getString(R.string.pref_wifi_on_key), false); 396 | } 397 | 398 | public static boolean prefsWiFiOff(Context context) 399 | { 400 | SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); 401 | return pref.getBoolean(context.getResources().getString(R.string.pref_wifi_off_key), false); 402 | 403 | } 404 | 405 | public static boolean prefsAutoCon(Context context) 406 | { 407 | SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); 408 | return pref.getBoolean(context.getResources().getString(R.string.pref_autocon_key), false); 409 | } 410 | 411 | public static String prefsAutoConIP(Context context) 412 | { 413 | SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); 414 | return pref.getString(context.getResources().getString(R.string.pref_autoconip_key), ""); 415 | } 416 | 417 | public static String prefsAutoConPort(Context context) 418 | { 419 | SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); 420 | return pref.getString(context.getResources().getString(R.string.pref_autoconport_key), "8555"); 421 | } 422 | 423 | public static boolean prefsScreenOn(Context context) 424 | { 425 | SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(context); 426 | return pref.getBoolean(context.getResources().getString(R.string.pref_screenon_key), false); 427 | } 428 | 429 | } -------------------------------------------------------------------------------- /src/siir/es/adbWireless/adbWidgetProvider.java: -------------------------------------------------------------------------------- 1 | /** 2 | * siir.es.adbWireless.adbWireless.java 3 | * 4 | * This program is free software: you can redistribute it and/or modify 5 | * it under the terms of the GNU General Public License as published by 6 | * the Free Software Foundation, either version 3 of the License, or 7 | * (at your option) any later version. 8 | * 9 | * This program is distributed in the hope that it will be useful, 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 12 | * GNU General Public License for more details. 13 | * 14 | * You should have received a copy of the GNU General Public License 15 | * along with this program. If not, see . 16 | * 17 | **/ 18 | 19 | package siir.es.adbWireless; 20 | 21 | import android.app.PendingIntent; 22 | import android.appwidget.AppWidgetManager; 23 | import android.appwidget.AppWidgetProvider; 24 | import android.content.ComponentName; 25 | import android.content.Context; 26 | import android.content.Intent; 27 | import android.content.SharedPreferences; 28 | import android.os.Vibrator; 29 | import android.widget.RemoteViews; 30 | import android.widget.Toast; 31 | 32 | public class adbWidgetProvider extends AppWidgetProvider { 33 | 34 | private static String ACTION_CLICK = "siir.es.adbwireless.widget_update"; 35 | private RemoteViews views = new RemoteViews("siir.es.adbWireless", R.layout.adb_appwidget); 36 | 37 | @Override 38 | public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { 39 | super.onUpdate(context, appWidgetManager, appWidgetIds); 40 | 41 | SharedPreferences settings = context.getSharedPreferences("wireless", 0); 42 | MainActivity.mState = settings.getBoolean("mState", false); 43 | MainActivity.wifiState = settings.getBoolean("wifiState", false); 44 | 45 | final int N = appWidgetIds.length; 46 | for (int i = 0; i < N; i++) { 47 | int appWidgetId = appWidgetIds[i]; 48 | Intent intent = new Intent(context, adbWidgetProvider.class); 49 | intent.setAction(ACTION_CLICK); 50 | PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, 0); 51 | views.setOnClickPendingIntent(R.id.widgetButton, pendingIntent); 52 | if (MainActivity.mState) { 53 | views.setImageViewResource(R.id.widgetButton, R.drawable.widgeton); 54 | } else { 55 | views.setImageViewResource(R.id.widgetButton, R.drawable.widget); 56 | } 57 | appWidgetManager.updateAppWidget(appWidgetId, views); 58 | } 59 | } 60 | 61 | @Override 62 | public void onReceive(Context context, Intent intent) { 63 | super.onReceive(context, intent); 64 | if (intent.getAction().equals(ACTION_CLICK)) { 65 | 66 | if (!Utils.hasRootPermission()) { 67 | Toast.makeText(context, R.string.no_root, Toast.LENGTH_LONG).show(); 68 | return; 69 | } 70 | 71 | if (!Utils.checkWifiState(context)) { 72 | MainActivity.wifiState = false; 73 | Utils.saveWiFiState(context, MainActivity.wifiState); 74 | 75 | if (Utils.prefsWiFiOn(context)) { 76 | Utils.enableWiFi(context, true); 77 | } else { 78 | Toast.makeText(context, R.string.no_wifi, Toast.LENGTH_LONG).show(); 79 | return; 80 | } 81 | } else { 82 | MainActivity.wifiState = true; 83 | Utils.saveWiFiState(context, MainActivity.wifiState); 84 | } 85 | 86 | SharedPreferences settings = context.getSharedPreferences("wireless", 0); 87 | MainActivity.mState = settings.getBoolean("mState", false); 88 | MainActivity.wifiState = settings.getBoolean("wifiState", false); 89 | 90 | Vibrator vib = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE); 91 | if (Utils.prefsHaptic(context)) { 92 | vib.vibrate(45); 93 | } 94 | 95 | try { 96 | if (MainActivity.mState) { 97 | views.setImageViewResource(R.id.widgetButton, R.drawable.widget); 98 | ComponentName cn = new ComponentName(context, adbWidgetProvider.class); 99 | AppWidgetManager.getInstance(context).updateAppWidget(cn, views); 100 | Utils.adbStop(context); 101 | } else { 102 | views.setImageViewResource(R.id.widgetButton, R.drawable.widgeton); 103 | ComponentName cn = new ComponentName(context, adbWidgetProvider.class); 104 | AppWidgetManager.getInstance(context).updateAppWidget(cn, views); 105 | Toast.makeText(context, context.getString(R.string.widget_start) + " " + Utils.getWifiIp(context), Toast.LENGTH_LONG).show(); 106 | Utils.adbStart(context); 107 | } 108 | 109 | } catch (Exception e) { 110 | } 111 | } 112 | } 113 | } --------------------------------------------------------------------------------