├── .gitignore ├── README.md ├── Resources ├── checkmark.jpg ├── icons │ ├── ic_launcher-1024x500.png │ ├── ic_launcher-web.png │ └── ic_launcher_wifi.png ├── issues │ ├── 00001.md │ ├── 00002.md │ ├── 00003.md │ ├── 00004.md │ └── 00005.md ├── screenshots │ ├── 1.png │ ├── 2.png │ ├── 3.png │ ├── 4.png │ ├── 5.png │ └── 6.png └── translations │ ├── en │ ├── changelog.txt │ ├── description.txt │ └── recent-changes.txt │ ├── es │ ├── changelog.txt │ ├── description.txt │ └── recent-changes.txt │ ├── ja │ ├── changelog.txt │ ├── description.txt │ └── recent-changes.txt │ ├── mk │ ├── changelog.txt │ ├── description.txt │ └── recent-changes.txt │ └── zh │ ├── changelog.txt │ ├── description.txt │ └── recent-changes.txt ├── app ├── build.gradle └── src │ └── main │ ├── AndroidManifest.xml │ ├── java │ ├── com │ │ └── matoski │ │ │ └── adbm │ │ │ ├── Constants.java │ │ │ ├── activity │ │ │ ├── AboutActivity.java │ │ │ ├── BaseHelpActivity.java │ │ │ ├── ChangeLogActivity.java │ │ │ ├── MainActivity.java │ │ │ ├── MyPreferencesActivity.java │ │ │ └── WiFiListViewCheckboxesActivity.java │ │ │ ├── adapter │ │ │ └── InteractiveArrayAdapter.java │ │ │ ├── enums │ │ │ ├── AdbStateEnum.java │ │ │ └── IPMode.java │ │ │ ├── interfaces │ │ │ └── IMessageHandler.java │ │ │ ├── pojo │ │ │ ├── IP.java │ │ │ └── Model.java │ │ │ ├── receiver │ │ │ ├── ActionPackageAdded.java │ │ │ ├── BootCompleteReceiver.java │ │ │ └── ConnectionDetectionReceiver.java │ │ │ ├── service │ │ │ └── ManagerService.java │ │ │ ├── tasks │ │ │ ├── GenericAsyncTask.java │ │ │ ├── NetworkStatusChecker.java │ │ │ └── RootCommandExecuter.java │ │ │ ├── util │ │ │ ├── ArrayUtils.java │ │ │ ├── FileUtil.java │ │ │ ├── GenericUtil.java │ │ │ ├── NetworkUtil.java │ │ │ ├── PreferenceUtil.java │ │ │ └── ServiceUtil.java │ │ │ └── widgets │ │ │ └── ControlWidgetProvider.java │ └── eu │ │ └── chainfire │ │ └── libsuperuser │ │ ├── Application.java │ │ ├── Debug.java │ │ ├── HideOverlaysReceiver.java │ │ ├── Shell.java │ │ ├── ShellNotClosedException.java │ │ ├── ShellOnMainThreadException.java │ │ └── StreamGobbler.java │ └── res │ ├── drawable-hdpi │ ├── ic_action_refresh.png │ ├── ic_clear.png │ ├── ic_launcher.png │ ├── ic_launcher_running.png │ ├── ic_launcher_wifi.png │ ├── play.png │ └── stop.png │ ├── drawable-ldpi │ ├── ic_launcher.png │ ├── ic_launcher_running.png │ ├── ic_launcher_wifi.png │ ├── play.png │ └── stop.png │ ├── drawable-mdpi │ ├── ic_action_refresh.png │ ├── ic_clear.png │ ├── ic_launcher.png │ ├── ic_launcher_running.png │ ├── ic_launcher_wifi.png │ ├── play.png │ └── stop.png │ ├── drawable-xhdpi │ ├── ic_action_refresh.png │ ├── ic_clear.png │ ├── ic_launcher.png │ ├── ic_launcher_running.png │ ├── ic_launcher_wifi.png │ ├── play.png │ └── stop.png │ ├── drawable-xxhdpi │ ├── ic_clear.png │ ├── ic_launcher.png │ ├── ic_launcher_running.png │ ├── ic_launcher_wifi.png │ ├── play.png │ └── stop.png │ ├── drawable │ ├── rounded_corners.xml │ └── widget_preview.png │ ├── layout │ ├── activity_main.xml │ ├── base_help.xml │ ├── control_widget.xml │ ├── list_item.xml │ ├── my_notification.xml │ └── wifi_list_activity.xml │ ├── menu │ └── main.xml │ ├── raw-en │ ├── about.html │ └── changelog.html │ ├── raw-es │ ├── about.html │ └── changelog.html │ ├── raw-ja │ ├── about.html │ └── changelog.html │ ├── raw-mk │ ├── about.html │ └── changelog.html │ ├── raw-zh │ ├── about.html │ └── changelog.html │ ├── raw │ ├── about.html │ └── changelog.html │ ├── values-en │ ├── array.xml │ └── strings.xml │ ├── values-es │ ├── array.xml │ └── strings.xml │ ├── values-ja │ ├── array.xml │ └── strings.xml │ ├── values-mk │ ├── array.xml │ ├── colors.xml │ ├── dimens.xml │ ├── strings.xml │ └── styles.xml │ ├── values-sw600dp │ └── dimens.xml │ ├── values-sw720dp-land │ └── dimens.xml │ ├── values-v11 │ └── styles.xml │ ├── values-v14 │ └── styles.xml │ ├── values-zh │ ├── array.xml │ └── strings.xml │ ├── values │ ├── array.xml │ ├── colors.xml │ ├── dimens.xml │ ├── static.xml │ ├── strings.xml │ └── styles.xml │ └── xml │ ├── control_widget.xml │ └── preferences.xml ├── build.gradle ├── changelog.md ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat └── settings.gradle /.gitignore: -------------------------------------------------------------------------------- 1 | # Built application files 2 | /*/build/ 3 | build 4 | *.apk 5 | 6 | # Gradle generated files 7 | .gradle/ 8 | gradle-app.setting 9 | 10 | # Signing files 11 | .signing/ 12 | 13 | # generated files 14 | bin/ 15 | gen/ 16 | javadoc 17 | 18 | # Local configuration file (sdk path, etc) 19 | local.properties 20 | 21 | # Private stuff 22 | signing.properties 23 | matoski.keystore 24 | 25 | # Intellij project files 26 | *.iml 27 | *.ipr 28 | *.iws 29 | .idea/ 30 | -------------------------------------------------------------------------------- /Resources/checkmark.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/Resources/checkmark.jpg -------------------------------------------------------------------------------- /Resources/icons/ic_launcher-1024x500.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/Resources/icons/ic_launcher-1024x500.png -------------------------------------------------------------------------------- /Resources/icons/ic_launcher-web.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/Resources/icons/ic_launcher-web.png -------------------------------------------------------------------------------- /Resources/icons/ic_launcher_wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/Resources/icons/ic_launcher_wifi.png -------------------------------------------------------------------------------- /Resources/issues/00001.md: -------------------------------------------------------------------------------- 1 | **Last reported:** *Dec 31, 2014, 3:28 AM* 2 | 3 | **Reports this week:** *0* 4 | 5 | **Reports total:** *1* 6 | 7 | **Application version:** *1.1.2* 8 | 9 | **Android version:** *Android 4.4* 10 | 11 | **Device:** *Garda (gardalteMetroPCS)* 12 | 13 | **Stack:** 14 | 15 | ``` 16 | java.lang.IndexOutOfBoundsException: getChars (-1 ... -1) starts before 0 17 | at android.text.SpannableStringBuilder.checkRange(SpannableStringBuilder.java:1029) 18 | at android.text.SpannableStringBuilder.getChars(SpannableStringBuilder.java:915) 19 | at android.text.TextUtils.getChars(TextUtils.java:83) 20 | at android.text.SpannableStringBuilder.(SpannableStringBuilder.java:61) 21 | at android.text.SpannableStringBuilder.subSequence(SpannableStringBuilder.java:907) 22 | at android.widget.TextView.getTransformedText(TextView.java:10141) 23 | at android.widget.Editor.performLongClick(Editor.java:1047) 24 | at android.widget.TextView.performLongClick(TextView.java:10153) 25 | at android.view.View$CheckForLongPress.run(View.java:19433) 26 | at android.os.Handler.handleCallback(Handler.java:733) 27 | at android.os.Handler.dispatchMessage(Handler.java:95) 28 | at android.os.Looper.loop(Looper.java:146) 29 | at android.app.ActivityThread.main(ActivityThread.java:5692) 30 | at java.lang.reflect.Method.invokeNative(Native Method) 31 | at java.lang.reflect.Method.invoke(Method.java:515) 32 | at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291) 33 | at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107) 34 | at dalvik.system.NativeStart.main(Native Method) 35 | ``` -------------------------------------------------------------------------------- /Resources/issues/00002.md: -------------------------------------------------------------------------------- 1 | **Last reported:** *Oct 31, 2014, 12:16 AM* 2 | 3 | **Reports this week:** *0* 4 | 5 | **Reports total:** *1* 6 | 7 | **Application version:** *1.1.2* 8 | 9 | **Android version:** *Android 2.3.3 - 2.3.7* 10 | 11 | **Device:** *ckt73_gb* 12 | 13 | **Stack:** 14 | 15 | ``` 16 | java.lang.RuntimeException: Unable to start activity ComponentInfo{com.matoski.adbm/com.matoski.adbm.activity.WiFiListViewCheckboxesActivity}: java.lang.NullPointerException 17 | at android.app.ActivityThread.performLaunchActivity(SourceFile:1728) 18 | at android.app.ActivityThread.handleLaunchActivity(SourceFile:1747) 19 | at android.app.ActivityThread.access$1500(SourceFile:155) 20 | at android.app.ActivityThread$H.handleMessage(SourceFile:993) 21 | at android.os.Handler.dispatchMessage(SourceFile:130) 22 | at android.os.Looper.loop(SourceFile:351) 23 | at android.app.ActivityThread.main(SourceFile:3814) 24 | at java.lang.reflect.Method.invokeNative(Native Method) 25 | at java.lang.reflect.Method.invoke(Method.java:538) 26 | at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(SourceFile:901) 27 | at com.android.internal.os.ZygoteInit.main(SourceFile:659) 28 | at dalvik.system.NativeStart.main(Native Method) 29 | Caused by: java.lang.NullPointerException 30 | at com.matoski.adbm.activity.WiFiListViewCheckboxesActivity.prepareAdapter(WiFiListViewCheckboxesActivity.java:148) 31 | at com.matoski.adbm.activity.WiFiListViewCheckboxesActivity.onCreate(WiFiListViewCheckboxesActivity.java:102) 32 | at android.app.Instrumentation.callActivityOnCreate(SourceFile:1082) 33 | at android.app.ActivityThread.performLaunchActivity(SourceFile:1692) 34 | ... 11 more 35 | ``` -------------------------------------------------------------------------------- /Resources/issues/00003.md: -------------------------------------------------------------------------------- 1 | **Last reported:** *Dec 15, 2014, 10:26 AM* 2 | 3 | **Reports this week:** *0* 4 | 5 | **Reports total:** *1* 6 | 7 | **Application version:** *1.1.2* 8 | 9 | **Android version:** *Android 4.4* 10 | 11 | **Device:** *MyPhone_Rio_Craze* 12 | 13 | **Stack:** 14 | 15 | ``` 16 | java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.matoski.adbm/com.matoski.adbm.activity.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.matoski.adbm.activity.MainActivity" on path: DexPathList[[zip file "/mnt/asec/com.matoski.adbm-1/pkg.apk"],nativeLibraryDirectories=[/mnt/asec/com.matoski.adbm-1/lib, /vendor/lib, /system/lib]] 17 | at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2264) 18 | at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2390) 19 | at android.app.ActivityThread.access$800(ActivityThread.java:151) 20 | at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1321) 21 | at android.os.Handler.dispatchMessage(Handler.java:110) 22 | at android.os.Looper.loop(Looper.java:193) 23 | at android.app.ActivityThread.main(ActivityThread.java:5299) 24 | at java.lang.reflect.Method.invokeNative(Native Method) 25 | at java.lang.reflect.Method.invoke(Method.java:515) 26 | at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:825) 27 | at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:641) 28 | at dalvik.system.NativeStart.main(Native Method) 29 | Caused by: java.lang.ClassNotFoundException: Didn't find class "com.matoski.adbm.activity.MainActivity" on path: DexPathList[[zip file "/mnt/asec/com.matoski.adbm-1/pkg.apk"],nativeLibraryDirectories=[/mnt/asec/com.matoski.adbm-1/lib, /vendor/lib, /system/lib]] 30 | at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56) 31 | at java.lang.ClassLoader.loadClass(ClassLoader.java:497) 32 | at java.lang.ClassLoader.loadClass(ClassLoader.java:457) 33 | at android.app.Instrumentation.newActivity(Instrumentation.java:1061) 34 | at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2255) 35 | ... 11 more 36 | Suppressed: java.io.IOException: unable to open DEX file 37 | at dalvik.system.DexFile.openDexFileNative(Native Method) 38 | at dalvik.system.DexFile.openDexFile(DexFile.java:296) 39 | at dalvik.system.DexFile.(DexFile.java:80) 40 | at dalvik.system.DexFile.(DexFile.java:59) 41 | at dalvik.system.DexPathList.loadDexFile(DexPathList.java:263) 42 | at dalvik.system.DexPathList.makeDexElements(DexPathList.java:230) 43 | at dalvik.system.DexPathList.(DexPathList.java:112) 44 | at dalvik.system.BaseDexClassLoader.(BaseDexClassLoader.java:48) 45 | at dalvik.system.PathClassLoader.(PathClassLoader.java:65) 46 | at android.app.ApplicationLoaders.getClassLoader(ApplicationLoaders.java:57) 47 | at android.app.LoadedApk.getClassLoader(LoadedApk.java:326) 48 | at android.app.LoadedApk.makeApplication(LoadedApk.java:508) 49 | at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4514) 50 | at android.app.ActivityThread.access$1500(ActivityThread.java:151) 51 | at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1381) 52 | ... 8 more 53 | ``` -------------------------------------------------------------------------------- /Resources/issues/00004.md: -------------------------------------------------------------------------------- 1 | **Last reported:** *Mar 19, 9:51 PM* 2 | 3 | **Reports this week:** *2* 4 | 5 | **Reports total:** *2* 6 | 7 | **Application version:** *1.2.2* 8 | 9 | **Android version:** *Android 4.4* 10 | 11 | **Device:** *Galaxy Core (afyonlteMetroPCS)* 12 | 13 | **Reason**: What was happening was, I was including the integer reference to the icon in the PendingIntent bundle, and that integer was later being referenced while being posted to the NotificationManager. In between getting the integer reference and the pending intent going off, the app was updated and all of the drawable references changed. The integer that used to reference the correct drawable now referenced either the incorrect drawable or none at all (none at all - causing this crash) 14 | 15 | **Stack:** 16 | 17 | ``` 18 | android.app.RemoteServiceException: Bad notification posted from package com.matoski.adbm: Couldn't create icon: StatusBarIcon(pkg=com.matoski.adbmuser=0 id=0x7f020004 level=0 visible=true num=0 ) 19 | at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1484) 20 | at android.os.Handler.dispatchMessage(Handler.java:102) 21 | at android.os.Looper.loop(Looper.java:146) 22 | at android.app.ActivityThread.main(ActivityThread.java:5692) 23 | at java.lang.reflect.Method.invokeNative(Native Method) 24 | at java.lang.reflect.Method.invoke(Method.java:515) 25 | at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291) 26 | at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107) 27 | at dalvik.system.NativeStart.main(Native Method) 28 | ``` -------------------------------------------------------------------------------- /Resources/issues/00005.md: -------------------------------------------------------------------------------- 1 | **Last reported:** *Apr 5, 1:14 PM* 2 | 3 | **Reports this week:** *0* 4 | 5 | **Reports total:** *1* 6 | 7 | **Application version:** *1.2.2* 8 | 9 | **Android version:** *Android 2.3.3 - 2.3.7* 10 | 11 | **Device:** *Streak (streak)* 12 | 13 | **Reason**: ? 14 | 15 | **Stack:** 16 | 17 | ``` 18 | java.lang.NoSuchFieldError: service 19 | at com.matoski.adbm.service.ManagerService.access$300(ManagerService.java) 20 | at com.matoski.adbm.service.ManagerService$MyNetworkStatusChecker.onProgressUpdate(ManagerService.java:112) 21 | at com.matoski.adbm.service.ManagerService$MyNetworkStatusChecker.onProgressUpdate(ManagerService.java:69) 22 | at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:432) 23 | at android.os.Handler.dispatchMessage(Handler.java:99) 24 | at android.os.Looper.loop(Looper.java:123) 25 | at android.app.ActivityThread.main(ActivityThread.java:3683) 26 | at java.lang.reflect.Method.invokeNative(Native Method) 27 | at java.lang.reflect.Method.invoke(Method.java:507) 28 | at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:864) 29 | at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:622) 30 | at dalvik.system.NativeStart.main(Native Method) 31 | ``` -------------------------------------------------------------------------------- /Resources/screenshots/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/Resources/screenshots/1.png -------------------------------------------------------------------------------- /Resources/screenshots/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/Resources/screenshots/2.png -------------------------------------------------------------------------------- /Resources/screenshots/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/Resources/screenshots/3.png -------------------------------------------------------------------------------- /Resources/screenshots/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/Resources/screenshots/4.png -------------------------------------------------------------------------------- /Resources/screenshots/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/Resources/screenshots/5.png -------------------------------------------------------------------------------- /Resources/screenshots/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/Resources/screenshots/6.png -------------------------------------------------------------------------------- /Resources/translations/en/changelog.txt: -------------------------------------------------------------------------------- 1 | 1.2.2 2 | ----- 3 | Added Japanese language by Mari (https://crowdin.com/profile/marimaari) 4 | 5 | 1.2.1 6 | ----- 7 | Default languages is set to en when building the application 8 | 9 | 1.2.0 10 | ----- 11 | + Bugfixes and optimizations 12 | + Upgraded SU library 13 | Added Chinese Simplified translation by yangfl (https://crowdin.com/profile/yangfl), yap7800 (https://crowdin.com/profile/yap7800) 14 | 15 | 1.1.2 16 | ----- 17 | Added Spanish translation by Ryo567 (eumase-04@hotmail.com) 18 | 19 | 1.1.1 20 | ----- 21 | Features: 22 | + Added an option to change languages 23 | + Upgraded SU library 24 | 25 | 1.0.9 26 | ----- 27 | Bugfixes: 28 | + Fixed an issue where all the wifi networks auto connect 29 | 30 | 1.0.8 31 | ----- 32 | Bugfixes: 33 | + Fixed an issue in preference where an user set the port to an absurdly big number for ADB port 34 | 35 | 1.0.7 36 | ----- 37 | Bugfixes: 38 | + Fixed an issue that affects Android 4.0.3 and 4.0.4 of a crash in get java.net.NetworkInterface.getNetworkInterfacesList 39 | 40 | 1.0.6 41 | ------ 42 | Bugfixes: 43 | + Fixed an issue introduced in an earlier version where it doesn't remove the double qoutes from the getSSID function, and therefore the autoconnect didn't work 44 | 45 | Features: 46 | + Added a button in preferences to clear the wifi list collected by the application, this is used to refresh the wifi list, and in some cases is useful, if the autoconnect doesn't work, or after an upgrade of the android system. 47 | 48 | 1.0.5 49 | ----- 50 | Bugfixes: 51 | + Some fixes for activity and service interaction 52 | + Handler fixes, now it doesn't crash the service 53 | 54 | 1.0.2 55 | ----- 56 | Features: 57 | + Upgraded SuperSU library 58 | 59 | Bugfixes: 60 | + Very rarely the service got called with null action, and because of it crashed the service 61 | 62 | 1.0.1 63 | ----- 64 | Bugfixes: 65 | + Fixed a crash that happens if you haven't saved any WiFi networks in the system, when you open the configuration screen for WiFi networks in settings 66 | 67 | 1.0.0 68 | ----- 69 | Released as open source, you can view the code at https://github.com/ilijamt/android-adbm 70 | 71 | 0.9.9 72 | ----- 73 | You should reset your preferences for this update from the preferences screen. 74 | 75 | Features: 76 | + Added a status to show if we have wakelock or not 77 | 78 | Bugfixes: 79 | + Tidy up for the strings, also added new time intervals for the preferences screen 80 | + Hopefully fixed the issue with AlarmManager holding the CPU awake, even if we don't have a wake lock acquired 81 | 82 | 83 | 0.9.8 84 | ----- 85 | Bugfixes: 86 | + Fixed the wake lock issues on some occasions 87 | 88 | 0.9.7 89 | ----- 90 | Bugfixes: 91 | + Sometimes the service doesn't start fast enough so it cannot bind the service in time to request update, and it results in an crash 92 | 93 | 0.9.6 94 | ----- 95 | Features: 96 | + You can toggle the ADB state by touching the image in the notification bar 97 | 98 | 0.9.5 99 | ----- 100 | Bugfixes: 101 | + Doesn't release wakelock always 102 | 103 | 0.9.4 104 | ----- 105 | Features: 106 | + Added an option to keep screen on while the service is running 107 | + Added an option to wake the screen when new package is installed if the keep screen functionality is not on 108 | 109 | Permission: 110 | + android.permission.WAKE_LOCK 111 | Used to wake up the screen on new package install, or to keep the screen on while the ADB service is on 112 | 113 | 0.9.1 114 | ----- 115 | Bugfixes: 116 | + Fixed a crash that occurs sometimes when starting the service 117 | 118 | 0.9 119 | ----- 120 | Features: 121 | + Added a Widget 122 | 123 | Bugfixes: 124 | + Various optimizations and bugfixes 125 | 126 | 0.8.4 127 | ----- 128 | Features: 129 | + Added About menu 130 | + Added Change Log menu 131 | 132 | Bugfixes: 133 | + Various optimizations and bugfixes 134 | 135 | 0.8.3 136 | ----- 137 | Features: 138 | + Added the ability to make the notification permanent or be able to clear it 139 | 140 | Bugfixes: 141 | + ADB Network status not updating properly 142 | 143 | 0.8.2 144 | ----- 145 | Features: 146 | + Added new icon for the states, now it has different icons for various states. 147 | White overlay: No WiFi connections 148 | Sky blue overlay: WiFi connection available but no connections 149 | Yellow overlay: WiFi connected, and ADB is running in network state 150 | 151 | Bugfixes: 152 | + Sometimes the DISCONNECT event didn't update the notification bar 153 | 154 | 0.8.0 - Initial release 155 | ----------------------- 156 | 157 | Features: 158 | + Easy control and access details from notification bar 159 | + Auto connect on saved WiFi networks 160 | + Auto start on boot, you can select if you want to or not from the preferences screen 161 | + Automatically switch between USB and NETWORK when you disconnect/connect from/to WiFi 162 | + Configurable service management 163 | -------------------------------------------------------------------------------- /Resources/translations/en/description.txt: -------------------------------------------------------------------------------- 1 | ADB Manager, your one stop to developing more easily on Android. 2 | 3 | Warning: REQUIRES ROOT! 4 | 5 | If you want to help translating this application, help me with the translation on: 6 | 7 | https://crowdin.net/project/adbm 8 | 9 | The most automated, easy-to-use and stable ADB management tool with a great support. 10 | 11 | Features: 12 | + Easy control and access details from notification bar 13 | + Auto connect on saved WiFi networks 14 | + Auto start on boot, you can select if you want to or not from the preferences screen 15 | + Automatically switch between USB and NETWORK when you disconnect/connect from/to WiFi 16 | + Configurable service management 17 | + Different color coded icons depending on the state of the ADB 18 | + Keep screen on while the service is running 19 | + Wake the screen when new package is installed 20 | + You can toggle the ADB state by touching the image in the notification bar 21 | 22 | It's really more simple to use than others, is always visible in notification bar. It supports advanced features like fully automate adb state control based on the WiFi network, and the state of the network. 23 | 24 | ADB manager enables you to automatically start ADB in network mode when you connect to any know configured network from the list in the preferences. 25 | 26 | Developing in cafes/bars/trains/toilet/other places over WiFi? ADB Manager will switch ADB into wireless and back automatically. 27 | 28 | Released as open source, you can view the code at https://github.com/ilijamt/android-adbm 29 | 30 | Future versions: 31 | + Delay between switching states 32 | 33 | Permissions: 34 | + android.permission.ACCESS_SUPERUSER 35 | Used with SuperSU if available 36 | 37 | + android.permission.RECEIVE_BOOT_COMPLETED 38 | Used to automatically start the service on the boot of the device, how long should it wait before starting and how often should the AlarmManager check to see if the service is running is configurable from the Preferences menu. 39 | 40 | + android.permission.ACCESS_NETWORK_STATE 41 | android.permission.ACCESS_WIFI_STATE 42 | Used to automate the switching between the ADB states 43 | 44 | + android.permission.INTERNET 45 | Used to retrieve the IP, as it crashes when checking for the IP address without this permission. 46 | 47 | + android.permission.WAKE_LOCK 48 | Used to wake up the screen on new package install, or to keep the screen on while the ADB service is on 49 | 50 | For any questions, suggestions, bug reports or to help with translation of the application please email me ilijamt+adbm@gmail.com -------------------------------------------------------------------------------- /Resources/translations/en/recent-changes.txt: -------------------------------------------------------------------------------- 1 | Released as open source, you can view the code at https://github.com/ilijamt/android-adbm 2 | 3 | Features: 4 | + Upgraded SU library 5 | + Added Japanese language by Mari (https://crowdin.com/profile/marimaari) 6 | + Added Chinese Simplified translation by yangfl (https://crowdin.com/profile/yangfl), yap7800 (https://crowdin.com/profile/yap7800) 7 | + Bugfixes and optimizations 8 | + Default languages is set to en when building the application -------------------------------------------------------------------------------- /Resources/translations/es/changelog.txt: -------------------------------------------------------------------------------- 1 | 1.2.2 2 | ----- 3 | + Añadida Japonés por Mari (https://crowdin.com/profile/marimaari) 4 | 5 | 1.2.1 6 | ----- 7 | Idiomas de forma predeterminada se establece en at al compilar la aplicación 8 | 9 | 1.2.0 10 | ----- 11 | + Correcciones de errores y optimizaciones 12 | + Se ha actualizado la biblioteca de SU 13 | Añadida traducción en chino simplificado por yangfl (https://crowdin.com/profile/yangfl), yap7800 (https://crowdin.com/profile/yap7800) 14 | 15 | 1.1.2 16 | ----- 17 | Añadida traducción al español por Ryo567 (eumase-04@hotmail.com) 18 | 19 | 1.1.1 20 | ----- 21 | Características: 22 | + Se ha añadido una opción para cambiar de idioma 23 | + Se ha actualizado la biblioteca de SU 24 | 25 | 1.0.9 26 | ----- 27 | Corrección de errores: 28 | + Se ha solucionado un error por el cual se conectaba automáticamente a todas las redes Wi-Fi 29 | 30 | 1.0.8 31 | ----- 32 | Corrección de errores: 33 | + Se ha solucionado un error de preferencia por el cual un usuario podía establecer un puerto absurdamente grande para un puerto ADB 34 | 35 | 1.0.7 36 | ----- 37 | Corrección de errores: 38 | + Se ha solucinoado un error que provocaba un cuelgue en Android 4.0.3 y 4.0.4 en java.net.NetworkInterface.getNetworkInterfacesList 39 | 40 | 1.0.6 41 | ------ 42 | Corrección de errores: 43 | + Se ha solucionado un error introducido en la versión anterior por el cual no se eliminaban las dobles comillas de la función de obtener SSID y, por lo tanto, la autoconexión no funcionaba 44 | 45 | Características: 46 | + Se ha añadido un botón en preferencias para eliminar todas las conexiones recogidas por la aplicación de la lista de Wi-Fi. Puede ser útil si la autoconexión no funciona o tras una actualización del sistema de Android. 47 | 48 | 1.0.5 49 | ----- 50 | Corrección de errores: 51 | + Se han solucionado algunos errores de actividad e interacción de servicio 52 | + Se ha solucionado un error de uso, ahora no se colgará el servicio 53 | 54 | 1.0.2 55 | ----- 56 | Características: 57 | + Se ha actualizado la biblioteca de SuperSU 58 | 59 | Corrección de errores: 60 | + En raras ocasiones el servicio recibía llamadas con acción nula, debido a cuelgues del servicio 61 | 62 | 1.0.1 63 | ----- 64 | Corrección de errores: 65 | + Se ha solucionado un cuelgue que se producía al abrir la pantalla de configuración de redes Wi-Fi en ajustes si no guardabas ninguna red Wi-Fi en el sistema 66 | 67 | 1.0.0 68 | ----- 69 | Publicado como código abierto. Puedes ver el código en https://github.com/ilijamt/android-adbm 70 | 71 | 0.9.9 72 | ----- 73 | Se deben reiniciar las preferencias de esta actualización desde la pantalla de preferencias. 74 | 75 | Características: 76 | + Se ha añadido un estado para mostrar si tenemos WakeLock o no 77 | 78 | Corrección de errores: 79 | + Se han reordenado las cadenas de texto, además se han añadido intervalos de tiempo en la pantalla de preferencias 80 | + Se ha solucionado un error con AlarmManager por el cual mantenía la CPU despierta, incluso cuando no se tenía un WakeLock 81 | 82 | 83 | 0.9.8 84 | ----- 85 | Corrección de errores: 86 | + Se han solucionado ciertos errores con WakeLock 87 | 88 | 0.9.7 89 | ----- 90 | Corrección de errores: 91 | + Se ha solucionado un error por el cual, a veces, el servicio no se iniciaba lo suficientemente rápido por lo que no podía enlazarse a tiempo para solicitar la actualización y, por lo tanto, se colgaba 92 | 93 | 0.9.6 94 | ----- 95 | Características: 96 | + Ahora puedes cambiar el estado de ADB tocando la imagen de la barra de notificaciones 97 | 98 | 0.9.5 99 | ----- 100 | Corrección de errores: 101 | + No siempre se liberaban los WakeLock 102 | 103 | 0.9.4 104 | ----- 105 | Características: 106 | + Se ha añadido una opción para mantener la pantalla mientras se ejecuta el servicio 107 | + Se ha añadido una opción para encender la pantalla cuando se instale un nuevo paquete si esta estaba apagada 108 | 109 | Permiso: 110 | + android.permission.WAKE_LOCK 111 | Utilizado para encender la pantalla al instalar un nuevo paquete o mantener la pantalla encendida mientras se ejecuta el servicio de ADB 112 | 113 | 0.9.1 114 | ----- 115 | Corrección de errores: 116 | + Se ha solucionado un error por el cual, al iniciar el servicio, se colgaba 117 | 118 | 0.9 119 | ----- 120 | Características: 121 | + Se ha añadido un widget 122 | 123 | Corrección de errores: 124 | + Varias optimizaciones y correcciones de errores 125 | 126 | 0.8.4 127 | ----- 128 | Características: 129 | + Se ha añadido un menú "Acerca de" 130 | + Se ha añadido un menú del registro de cambios 131 | 132 | Corrección de errores: 133 | + Varias optimizaciones y correcciones de errores 134 | 135 | 0.8.3 136 | ----- 137 | Características: 138 | + Se ha añadido la posibilidad de hacer que la notificación sea permanente o no 139 | 140 | Corrección de errores: 141 | + Se ha solucionado un error por el cual la red de ADB no se actualizaba adecuadamente 142 | 143 | 0.8.2 144 | ----- 145 | Características: 146 | + Se ha añadido un nuevo icono para los estados. Ahora hay distintos para cada uno. 147 | Interfaz blanca: sin conexiones Wi-Fi 148 | Interfaz azul cielo: conexión Wi-Fi disponible, pero no conectada 149 | Interfaz amarilla: conectado a Wi-Fi y ADB ejecutándose en estado de red 150 | 151 | Corrección de errores: 152 | + Se ha solucionado un error por el cual, a veces, el estado "DESCONECTADO" no se actualizaba en la barra de notificaciones 153 | 154 | v0.8.0 Versión inicial 155 | ----------------------- 156 | 157 | Características: 158 | + Control sencillo y acceso a los detalles desde la barra de notificaciones 159 | + Conexión automática a redes Wi-Fi guardadas 160 | + Se ejecuta automáticamente al inicio. Puedes desactivarlo en la pantalla de preferencias 161 | + Cambia automáticamente entre USB y RED cuando estés conectado o desconectado de Wi-Fi 162 | + Administración del servicio configurable 163 | -------------------------------------------------------------------------------- /Resources/translations/es/description.txt: -------------------------------------------------------------------------------- 1 | ADB Manager, tu primera parada para desarrollar fácilmente en Android. 2 | 3 | AVISO: ¡REQUIERE UN MÓVIL ROOTEADO! 4 | 5 | Si quieres ayudar a traducir esta aplicación, puedes hacerlo en: 6 | 7 | https://crowdin.net/project/adbm 8 | 9 | La herramienta de administración ADB más automatizada, sencilla y estable con un gran soporte. 10 | 11 | Características: 12 | + Control sencillo y acceso a los detalles desde la barra de notificaciones 13 | + Conexión automática a redes Wi-Fi guardadas 14 | + Se ejecuta automáticamente al inicio. Puedes desactivarlo en la pantalla de preferencias 15 | + Cambia automáticamente entre USB y RED cuando estés conectado o desconectado de Wi-Fi 16 | + Administración del servicio configurable 17 | + Iconos de distintos colores dependiendo del estado del ADB 18 | + Puedes mantener la pantalla encendida mientras se ejecuta el servicio 19 | + Enciende la pantalla cuando se instala un nuevo paquete 20 | + Ahora puedes cambiar el estado de ADB tocando la imagen de la barra de notificaciones 21 | 22 | Es mucho más fácil de usar que otras, siempre visible en la barra de notificaciones. Es compatible con características avanzadas como control de estado ADB totalmente automatizado basado en conexión Wi-Fi y el estado de la red. 23 | 24 | ADB Manager te permite iniciar ADB automáticamente en modo de red al conectarse a cualquier red configurada de la lista de preferencias. 25 | 26 | ¿Quieres desarrollar en el bar, el tren o en el baño con Wi-Fi? ADB Manager hará ADB inalámbrico cuando sea necesario automáticamente. 27 | 28 | Publicado como código abierto. Puedes ver el código en https://github.com/ilijamt/android-adbm 29 | 30 | Versiones futuras: 31 | + Demora entre cambios de estado 32 | 33 | Permisos: 34 | + android.permission.ACCESS_SUPERUSER 35 | Utilizado con SuperSU si está disponible 36 | 37 | + android.permission.RECEIVE_BOOT_COMPLETED 38 | Utilizado para iniciar automáticamente el servicio en el arranque del dispositivo, cuánto tiempo debe esperar antes de comenzar y con qué frecuencia debe el AlarmManager revisar si está ejecutando el servicio configurable desde el menú de preferencias. 39 | 40 | + android.permission.ACCESS_NETWORK_STATE 41 | android.permission.ACCESS_WIFI_STATE 42 | Utilizado para automatizar el cambio entre los estados del ADB 43 | 44 | + android.permission.INTERNET 45 | Utilizado para recuperar la dirección IP, se colgará si se realiza una comprobación de dirección IP sin este permiso. 46 | 47 | + android.permission.WAKE_LOCK 48 | Utilizado para encender la pantalla al instalar un nuevo paquete o mantener la pantalla encendida mientras se ejecuta el servicio de ADB 49 | 50 | Para cualquier duda, sugerencia, informes de errores o para ayudar con la traducción, envía un correo electrónico a <0>ilijamt+adbm@gmail.com -------------------------------------------------------------------------------- /Resources/translations/es/recent-changes.txt: -------------------------------------------------------------------------------- 1 | Publicado como código abierto. Puedes ver el código en https://github.com/ilijamt/android-adbm 2 | 3 | Características: 4 | + Se ha actualizado la biblioteca de SU 5 | + Añadida japonés por Mari (https://crowdin.com/profile/marimaari) 6 | Añadida traducción en chino simplificado por yangfl (https://crowdin.com/profile/yangfl), yap7800 (https://crowdin.com/profile/yap7800) 7 | + Correcciones de errores y optimizaciones 8 | + Idiomas valor predeterminado se establece en at al compilar la aplicación -------------------------------------------------------------------------------- /Resources/translations/ja/changelog.txt: -------------------------------------------------------------------------------- 1 | 1.2.2 2 | ----- 3 | 日本語が追加されました by Mari (https://crowdin.com/profile/marimaari) 4 | 5 | 1.2.1 6 | ----- 7 | アプリケーション組み立て時の既定言語は en に設定されています 8 | 9 | 1.2.0 10 | ----- 11 | + バグ修正と最適化 12 | + SU ライブラリのアップグレード 13 | 中国語が追加されました by yangfl (https://crowdin.com/profile/yangfl), yap7800 (https://crowdin.com/profile/yap7800) 14 | 15 | 1.1.2 16 | ----- 17 | japanese 18 | 19 | 20 | 21 | 22 | 1.1.1 23 | ----- 24 | 機能: 25 | + 言語を変更するオプションを追加しました 26 | + SU ライブラリのアップグレード 27 | 28 | 1.0.9 29 | ----- 30 | バグ修正: 31 | + 全ての wifi ネットワーク自動接続での問題を修正しました 32 | 33 | 1.0.8 34 | ----- 35 | バグ修正: 36 | + ADB ポートには明らかに大きい数のポートを設定したユーザーのプリファランスの問題を修正しました 37 | 38 | 1.0.7 39 | ----- 40 | バグ修正: 41 | + java.net.NetworkInterface.getNetworkInterfacesList のアンドロイド 4.0.3 と 4.0.4 の機能停止に影響する問題を修正しました 42 | 43 | 1.0.6 44 | ------ 45 | バグ修正: 46 | + ダブルクォートを getSSID 機能からはずさなかったため自動接続が起動しなかった、という以前のバージョンで起こった問題を修正しました。 47 | 48 | 機能: 49 | + アプリケーションによって集められた wifi リストを消去するボタンをプリファランスに追加しました。 これは wifi リストをリフレッシュするために使用され、自動接続が機能しない場合や、アンドロイドシステムをアップグレードした後などいくつかのケースで便利です。 50 | 51 | 1.0.5 52 | ----- 53 | バグ修正: 54 | + アクティビティとサービス相互作用のいくつかの修正 55 | + ハンドラーを修正、今はサービスを停止しません 56 | 57 | 1.0.2 58 | ----- 59 | 機能: 60 | + アップグレードされた SuperSU ライブラリ 61 | 62 | バグ修正: 63 | + ごく稀にサービスがヌルアクションを起こしたため、サービスがクラッシュしました。 64 | 65 | 1.0.1 66 | ----- 67 | バグ修正: 68 | +WiFi ネットワーク設定の設定画面をを開く時、 システムに任意の WiFi ネットワークを保存しなかった場合に発生するクラッシュを修正しました 69 | 70 | 1.0.0 71 | ----- 72 | オープンソースとしてリリースしました、次のコードでみることができます https://github.com/ilijamt/android-adbm 73 | 74 | 0.9.9 75 | ----- 76 | プリファランス画面からこの更新用のプリファランスをリセットする必要があります。 77 | 78 | 機能: 79 | + wakelockがあるかないかを見るためにステータスを追加されました 80 | 81 | バグ修正: 82 | + 文字列を整頓し、プリファランス画面に新しい時間間隔を追加しました。 83 | + wake lock を取得していなくても、AlarmManager が CPU を起こしたままにする問題を修正しているはずです。 84 | 85 | 86 | 0.9.8 87 | ----- 88 | バグ修正: 89 | + 何らかの原因で wake lock 問題が修正されました 90 | 91 | 0.9.7 92 | ----- 93 | バグ修正: 94 | + 時々サービスが十分な速さで開始しないので、更新のリクエスト時間内にサービスをbindできず、それがクラッシュという結果になります 95 | 96 | 0.9.6 97 | ----- 98 | 機能: 99 | + 通知バーの画像に触れることによってADB ステートを切り替えることができます 100 | 101 | 0.9.5 102 | ----- 103 | バグ修正: 104 | + wakelock を常にリリースしません 105 | 106 | 0.9.4 107 | ----- 108 | 機能: 109 | + サービスを実行中は画面がオンになっているようにオプションを追加しました 110 | + 新しいパッケージがインストールされる時に画面キープ機能が起動していない場合、画面を起こすためのオプションを追加しました 111 | 112 | アクセス許可: 113 | + android.permission.WAKE_LOCK 114 | 新しいパッケージのインストール時にスクリーンを起こすため、またはADB サービスが起動中画面を表示したままにするために使用した 115 | 116 | 0.9.1 117 | ----- 118 | バグ修正: 119 | + サービス開始時に時々起るクラッシュを修正しました 120 | 121 | 0.9 122 | ----- 123 | 機能: 124 | + ウィジェットが追加されました 125 | 126 | バグ修正: 127 | + さまざまな最適化とバグ修正 128 | 129 | 0.8.4 130 | ----- 131 | 機能: 132 | + About メニューを追加しました 133 | + 変更ログメニューを追加しました 134 | 135 | バグ修正: 136 | + さまざまな最適化とバグ修正 137 | 138 | 0.8.3 139 | ----- 140 | 機能: 141 | + 通知を永続的にするか、またはクリアすることができる機能を追加しました 142 | 143 | バグ修正: 144 | + ADB ネットワーク ステータスが正しく更新されません。 145 | 146 | 0.8.2 147 | ----- 148 | 機能: 149 | + ステータスに新しいアイコンを追加すると, 今度は様々なステータスに違うアイコンができる。 150 | ホワイトオーバーレイ: WiFi 接続なし 151 | スカイブルーオーバーレイ: WiFi 接続可能だが接続なし 152 | イエローオーバーレイ: WiFi 接続されました、そしてADB はネットワークステータス上で起動しています。 153 | 154 | バグ修正: 155 | + 時々 DISCONNECT の事象で通知バーが更新されません 156 | 157 | 0.8.0 - 最初のリリース 158 | ----------------------- 159 | 160 | 機能: 161 | + 通知バーからの簡単なコントロールとアクセスの詳細 162 | + 保存された WiFi ネットワークに自動接続します。 163 | + ブート時に自動起動させるか、させないかを設定画面から選択できます 164 | + WiFi から切断、またはWiFi に接続するとき、自動的にUSBモードかネットワークモードに切り替える 165 | + 設定可能なサービスの管理 166 | -------------------------------------------------------------------------------- /Resources/translations/ja/description.txt: -------------------------------------------------------------------------------- 1 | ADB Manager、 あなたのワンストップによって、アンドロイドでもっと簡単に開発できる 2 | 3 | 警告: ルートが必要です ! 4 | 5 | もしこのアプリケーションに興味がありましたら、次より翻訳のお手伝いをして下さい: 6 | 7 | https://crowdin.net/project/adbm 8 | 9 | 最も自動化され、使いやすく、安定した、充実のサポートつきのADB 管理ツール 10 | 11 | 機能: 12 | + 通知バーからの簡単なコントロールとアクセスの詳細 13 | + 保存された WiFi ネットワークに自動接続します。 14 | + ブート時に自動起動させるか、させないかを設定画面から選択できます 15 | + WiFi から切断、またはWiFi に接続するとき、自動的にUSBモードかネットワークモードに切り替える 16 | + 設定可能なサービスの管理 17 | + ADB の状態に応じて異なるカラーコードのアイコン 18 | + サービスを実行中は画面をオンにしておく 19 | + 新しいパッケージをインストールする時は画面を起こす 20 | + 通知バーの画像に触れることによってADB ステートを切り替えることができます 21 | 22 | 通知バーでいつでも見ることができるので、他のものより本当にもっと簡単に使用できる WiFi ネットワークと、ネットワークの状態に基づいて、 ADB 状態のコントロールを完全に自動化するような高度な機能をサポートします。 23 | 24 | プリファランスのリストから既知の設定されたネットワークにつないだ場合、ADB マネージャーは自動的にネットワークモードにてADB を開始することが可能です。 25 | 26 | WiFi にて、カフェ/バー/電車/トイレ/その他の場所で開発中ですか? ADB マネージャーが 自動的にADB からワイヤレスに切り替えたり、戻したりします。 27 | 28 | オープンソースとしてリリースしました、次のコードでみることができます https://github.com/ilijamt/android-adbm 29 | 30 | 将来のバージョン: 31 | + 状態の切り替えによる遅れ 32 | 33 | アクセス許可: 34 | + android.permission.ACCESS_SUPERUSER 35 | 利用可能な場合 SuperSU を使用 36 | 37 | + android.permission.RECEIVE_BOOT_COMPLETED 38 | デバイスのブート時に自動的に開始するために使用。開始するのにどのくらい待つ必要があるのか、どのくらいの頻度で AlarmManager がサービスの実行状況をチェックするのかは、設定メニューから設定可能です。 39 | 40 | + android.permission.ACCESS_NETWORK_STATE 41 | android.permission.ACCESS_WIFI_STATE 42 | ADB 状態間の切り替えを自動化するために使用 43 | 44 | + android.permission.INTERNET 45 | クラッシュによりこの許可なしに IP アドレスをチェックするとき、IPを回復するために使用 46 | 47 | + android.permission.WAKE_LOCK 48 | 新しいパッケージのインストール時にスクリーンを起こすため、またはADB サービスが起動中画面を表示したままにするために使用した 49 | 50 | 質問、提案、バグレポート、またはアプリケーションの翻訳に関するヘルプ等、ありましたら私までメールしてください ilijamt+adbm@gmail.com -------------------------------------------------------------------------------- /Resources/translations/ja/recent-changes.txt: -------------------------------------------------------------------------------- 1 | オープンソースとしてリリースしました、次のコードでみることができます https://github.com/ilijamt/android-adbm 2 | 3 | 機能: 4 | + SU ライブラリのアップグレード 5 | 日本語が追加されました by Mari (https://crowdin.com/profile/marimaari) 6 | + 中国語が追加されました by yangfl (https://crowdin.com/profile/yangfl), yap7800 (https://crowdin.com/profile/yap7800) 7 | + バグ修正と最適化 8 | + アプリケーション組み立て時の既定言語は en に設定されています -------------------------------------------------------------------------------- /Resources/translations/mk/changelog.txt: -------------------------------------------------------------------------------- 1 | 1.2.2 2 | ----- 3 | Додаден Јапонски превод од Mari (https://crowdin.com/profile/marimaari) 4 | 5 | 1.2.1 6 | ----- 7 | За стандарден јазик се користи en при изградба на апликацијата 8 | 9 | 1.2.0 10 | ----- 11 | + Поправени грешки и различни оптимизации 12 | + Надградена SU библиотеката 13 | Додаден Кинески превод од yangfl (https://crowdin.com/profile/yangfl), yap7800 (https://crowdin.com/profile/yap7800) 14 | 15 | 1.1.2 16 | ----- 17 | Додаден Шпански превод од Ryo567 (eumase-04@hotmail.com) 18 | 19 | 1.1.1 20 | ----- 21 | Карактеристики: 22 | + Додадена опција да се менуваа јазици 23 | + Надградена SU библиотеката 24 | 25 | 1.0.9 26 | ----- 27 | Поправени грешки: 28 | + Поправена грешка каде што сите бежични мрежи автоматски се поврзуваат 29 | 30 | 1.0.8 31 | ----- 32 | Поправени грешки: 33 | + Поправена грешка во конфигурацијата каде што корисникот може да постави порта на многу големи бројки за АДБ порта 34 | 35 | 1.0.7 36 | ----- 37 | Поправени грешки: 38 | + Поправена грешка која ја се појавува на Android 4.0.3 и 4.0.4 во java.net.NetworkInterface.getNetworkInterfacesList 39 | 40 | 1.0.6 41 | ------ 42 | Поправени грешки: 43 | + Поправена грешка внесена во поранеша верзија каде што не ги трга двојните наводници од getSSID функцијата, и авто поврзувањето не работеше 44 | 45 | Карактеристики: 46 | + Додаено копче во конфигурација за исчистување на листата од безжични мрежи собрани од апликацијата, ова се користи за да се освежи листата на безжични мрежи, и во некои случаи е корисно, ако авто поврзувањето не работи, или после надградба на уредот. 47 | 48 | 1.0.5 49 | ----- 50 | Поправени грешки: 51 | + Некои поправки за активноста и сервис интеграцијата 52 | + Поправки за поврзувањето со сервисот, сега не паѓа сервисот 53 | 54 | 1.0.2 55 | ----- 56 | Карактеристики: 57 | + Надградена библиотеката SuperSU 58 | 59 | Поправени грешки: 60 | + Многу ретко сервисот беше повикуван со нулл акција, и заради тоа сервисот паѓаше 61 | 62 | 1.0.1 63 | ----- 64 | Поправени грешки: 65 | + Поправено крашување на системот ако не се зачувани нито една безжична мрежа во системот, кога ќе го отвориш екрано за конфигурација на безжични мрежи во конфигурација 66 | 67 | 1.0.0 68 | ----- 69 | Пуштен како слободен софтвер, можете да го видите кодот на https://github.com/ilijamt/android-adbm 70 | 71 | 0.9.9 72 | ----- 73 | Треба да ги ресетирате вашите преференци за оваа верзија од екранот за конфигурација. 74 | 75 | Карактеристики: 76 | + Додаден статус за да ја покаже дали имаме wakelock или не 77 | 78 | Поправени грешки: 79 | + Исчистен текстот, исто така додадени временски интервали во екранот за конфигурација 80 | + Се надевам конечно е средена грешката со AlarmManager кое го држи процесорот запален, дури и ако немаме wakelock 81 | 82 | 83 | 0.9.8 84 | ----- 85 | Поправени грешки: 86 | + Поправени проблемите со wakelock во некои ситуации 87 | 88 | 0.9.7 89 | ----- 90 | Поправени грешки: 91 | + Некогаш сервисот не стартува доволно брзи, па затоа не може да се врзи на време за да побара статус, и поради тоа сервисот паѓа 92 | 93 | 0.9.6 94 | ----- 95 | Карактеристики: 96 | + Може да го смениш статусот на АДБ со притискање на сликата во местото за нотификацијата 97 | 98 | 0.9.5 99 | ----- 100 | Поправени грешки: 101 | + Не ослободува wakelock секогаш 102 | 103 | 0.9.4 104 | ----- 105 | Карактеристики: 106 | + Додадено опција да го држи екранот запален додека сервисот работи 107 | + Додадена опција да го запали екранот кога нов пакет е инсталиран ако опцијата за држи го екранот уклучен не е уклучена 108 | 109 | Пермисии: 110 | + android.permission.WAKE_LOCK 111 | Се користи за да го запали екранот на нова инсталација, или да го држи екранот уклучен додека АДБ севисот е уклучен 112 | 113 | 0.9.1 114 | ----- 115 | Поправени грешки: 116 | + Поправање на грешка која се појавува понекогаш кога се стартува сервисот 117 | 118 | 0.9 119 | ----- 120 | Карактеристики: 121 | + Додаден виџет 122 | 123 | Поправени грешки: 124 | + Оптимизации и поправки на грешки 125 | 126 | 0.8.4 127 | ----- 128 | Карактеристики: 129 | + Додадено За нас мени 130 | + Додедни Претходни измени мени 131 | 132 | Поправени грешки: 133 | + Оптимизации и поправки на грешки 134 | 135 | 0.8.3 136 | ----- 137 | Карактеристики: 138 | + Додадена можност да се направи нотификацијата трајна или да се може да се тргне 139 | 140 | Поправени грешки: 141 | + АДБ мрежен статус не се прикажува коректно 142 | 143 | 0.8.2 144 | ----- 145 | Карактеристики: 146 | + Додадена нова икона за состојбите, сега има различни икони за различниоте статуси. 147 | Бела позадина: Нема безжични конекции 148 | Небесно бела: Безжични мрежи постојат но нема конекција 149 | Жолта: Поврзан на безжична мрежа, и АДБ работи во мрежен статус 150 | 151 | Поправени грешки: 152 | + Некогаш DISCONNECT евентот не се ја освежува нотификацијата 153 | 154 | 0.8.0 - Иницијална верзија 155 | ----------------------- 156 | 157 | Карактеристики: 158 | + Едноставна контрола и пристап до деталите од нотификацијата 159 | + Авто поврзување на зачувани безжични мрежи 160 | + Автоматско стартувае на подигање, може да се одбери од конфигурациониот екран дали сакате или не 161 | + Автоматски менување помеѓу УСБ и МРЕЖЕН статус кога ќе се поврзиш или исклучиш од безжична мрежа 162 | + Конфигурабилен сервисен менаџмент 163 | -------------------------------------------------------------------------------- /Resources/translations/mk/description.txt: -------------------------------------------------------------------------------- 1 | АДБ Менаџер, твојот единствен чекор до полесно програмирање на Андроид. 2 | 3 | Напомена: ПОТРЕБНО Е РУТ! 4 | 5 | Ако сакате да помогните во превод на апликацијата, помогнете ми со превод на: 6 | 7 | https://crowdin.net/project/adbm 8 | 9 | Нај автоматизираниот, лесен за користење и стабилен АДБ менаџмент со супер подршка. 10 | 11 | Карактеристики: 12 | + Едноставна контрола и пристап до деталите од нотификацијата 13 | + Авто поврзување на зачувани безжични мрежи 14 | + Автоматско стартувае на подигање, може да се одбери од конфигурациониот екран дали сакате или не 15 | + Автоматски менување помеѓу УСБ и МРЕЖЕН статус кога ќе се поврзиш или исклучиш од безжична мрежа 16 | + Конфигурабилен сервисен менаџмент 17 | + Различни колор кодирани икони во зависност од статусот на АДБ 18 | + Држи го екранот уклучен додека сервисот работи 19 | + Разбуди го екранот кога нова пакет е инсталиран 20 | + Може да го смениш статусот на АДБ со притискање на сликата во местото за нотификацијата 21 | 22 | Многу е поедноставен за користење од другите, и секогаш е видлив како нотификација. Подржава напредни услуги како целосна автоматизација на статусот на адб во зависнот од безжичната мрежа, и статусот на мрежата. 23 | 24 | АДБ менаџер ти овозможува автоматски да го стартуваме АДБ во мрежен мод кога се конектираш на познати безжични мрежи од листата на конфигурација. 25 | 26 | Програмираш во кафиња/барови/возови/тоалет/други места преку безжична мрежа? АДБ Менаџер ќе го менува АДБ во безжичен и назад автоматски. 27 | 28 | Пуштен како слободен софтвер, можете да го видите кодот на https://github.com/ilijamt/android-adbm 29 | 30 | Идни верзии: 31 | + Временско одложување помеѓу менување на статуси 32 | 33 | Пермисии: 34 | + android.permission.ACCESS_SUPERUSER 35 | Се користи со SuperSU ако постои 36 | 37 | + android.permission.RECEIVE_BOOT_COMPLETED 38 | Се користи за да можме автоматски да се стартува сервисот на подигање на уредот, колку долго треба да се чека пред да стартува и колку долго AlarmManager треба да проверува за да провери дали сервисот работи е конфигурабилен во менито за конфигурација. 39 | 40 | + android.permission.ACCESS_NETWORK_STATE 41 | android.permission.ACCESS_WIFI_STATE 42 | Се користи за да го автоматизира менувањето помеѓу АДБ состојбите 43 | 44 | + android.permission.INTERNET 45 | Се користи за земање на ИП, поради тоа што проверката за ИП адреса го крашува системот без оваа пермисија. 46 | 47 | + android.permission.WAKE_LOCK 48 | Се користи за да го запали екранот на нова инсталација, или да го држи екранот уклучен додека АДБ севисот е уклучен 49 | 50 | За секакви прашања, сугестии, репорти за грешки или да помогниш со превод на апликацијата пратете ми маил на ilijamt+adbm@gmail.com -------------------------------------------------------------------------------- /Resources/translations/mk/recent-changes.txt: -------------------------------------------------------------------------------- 1 | Пуштен како слободен софтвер, можете да го видите кодот на https://github.com/ilijamt/android-adbm 2 | 3 | Карактеристики: 4 | + Надградена SU библиотеката 5 | Додаден Јапонски превод од Mari (https://crowdin.com/profile/marimaari) 6 | Додаден Кинески превод од yangfl (https://crowdin.com/profile/yangfl), yap7800 (https://crowdin.com/profile/yap7800) 7 | + Поправени грешки и различни оптимизации 8 | + За стандарден јазик се користи en при изградба на апликацијата -------------------------------------------------------------------------------- /Resources/translations/zh/changelog.txt: -------------------------------------------------------------------------------- 1 | 1.2.2 2 | ----- 3 | 添加日本翻译由 Mari (https://crowdin.com/profile/marimaari) 4 | 5 | 1.2.1 6 | ----- 7 | 默认语言设置为 en 构建应用程序时 8 | 9 | 1.2.0 10 | ----- 11 | + 错误修正和优化 12 | + 升级 SU 库 13 | + 添加简体中文翻译由 yangfl (https://crowdin.com/profile/yangfl)、 yap7800 (https://crowdin.com/profile/yap7800) 14 | 15 | 1.1.2 16 | ----- 17 | 添加西班牙语翻译,来自 Ryo567 (eumase-04@hotmail.com) 18 | 19 | 1.1.1 20 | ----- 21 | 功能: 22 | + 添加了选项以更改语言 23 | + 升级 SU 库 24 | 25 | 1.0.9 26 | ----- 27 | 错误修正: 28 | + 修复所有无线网络都自动连接的问题 29 | 30 | 1.0.8 31 | ----- 32 | 错误修正: 33 | + 修复用户在首选项中将 ADB 端口设置为极大数的问题 34 | 35 | 1.0.7 36 | ----- 37 | 错误修正: 38 | + 修复获取 java.net.NetworkInterface.getNetworkInterfacesList 导致崩溃的问题,影响 Android 4.0.3 和 4.0.4 。 39 | 40 | 1.0.6 41 | ------ 42 | 错误修正: 43 | + 修复了一个在早期版本中引入的问题,getSSID 函数结果中的双引号没有去除,导致自动连接无法工作。 44 | 45 | 功能: 46 | + 在首选项中添加了按钮,以清除应用程序收集的无线网络列表,用于刷新无线网络列表,若自动连接不起作用,或升级 android 系统后可能会有用 47 | 48 | 1.0.5 49 | ----- 50 | 错误修正: 51 | + 一些活动和服务交互方面的修复 52 | + 处理程序的修复,现在它不会导致服务崩溃 53 | 54 | 1.0.2 55 | ----- 56 | 功能: 57 | + 升级 SuperSU 库 58 | 59 | 错误修正: 60 | + 罕见情况下服务被 null 活动调用,并因此而崩溃。 61 | 62 | 1.0.1 63 | ----- 64 | 错误修正: 65 | + 修复了一个错误,如果系统中没有保存任何无线网络,在设置中打开无线网络配置界面会崩溃。 66 | 67 | 1.0.0 68 | ----- 69 | 开放了源代码,您可以在 https://github.com/ilijamt/android-adbm 查看代码 70 | 71 | 0.9.9 72 | ----- 73 | 此次更新,您应该在首选项界面中重置您的首选项。 74 | 75 | 功能: 76 | + 添加状态以显示我们是否有唤醒锁 77 | 78 | 错误修正: 79 | + 整理字符串,且在首选项界面中添加了新的时间间隔 80 | + 希望修复了 AlarmManager 保持 CPU 运行的问题,即使没有获得唤醒锁 81 | 82 | 83 | 0.9.8 84 | ----- 85 | 错误修正: 86 | + 修复某些情况下唤醒锁的问题 87 | 88 | 0.9.7 89 | ----- 90 | 错误修正: 91 | + 有时,服务启动速度不够快,不能及时绑定服务并请求更新,结果导致崩溃 92 | 93 | 0.9.6 94 | ----- 95 | 功能: 96 | + 可以触摸通知栏中的图标切换 ADB 状态 97 | 98 | 0.9.5 99 | ----- 100 | 错误修正: 101 | + 不总是释放唤醒锁 102 | 103 | 0.9.4 104 | ----- 105 | 功能: 106 | + 添加了选项,在服务运行时保持屏幕开启 107 | + 添加了选项,当保持屏幕功能没有启用时,在安装新软件包时唤醒屏幕 108 | 109 | 权限: 110 | + android.permission.WAKE_LOCK 111 | 用于在新软件包安装时唤醒屏幕,或在 ADB 服务运行时保持屏幕开启 112 | 113 | 0.9.1 114 | ----- 115 | 错误修正: 116 | + 修复有时启动服务时的崩溃 117 | 118 | 0.9 119 | ----- 120 | 功能: 121 | + 添加小部件 122 | 123 | 错误修正: 124 | + 各种优化和错误修正 125 | 126 | 0.8.4 127 | ----- 128 | 功能: 129 | + 添加关于菜单 130 | + 添加更改日志菜单 131 | 132 | 错误修正: 133 | + 各种优化和错误修正 134 | 135 | 0.8.3 136 | ----- 137 | 功能: 138 | + 添加永久通知,或选择清除 139 | 140 | 错误修正: 141 | + ADB 网络状态更新不正确 142 | 143 | 0.8.2 144 | ----- 145 | 功能: 146 | + 为状态添加了图标,现在不同状态有了不同的图标。 147 | 白遮罩: 无无线连接 148 | 天蓝遮罩: 无线网络可用,但没有连接 149 | 黄遮罩: 无线已连接,网络 ADB 正在运行 150 | 151 | 错误修正: 152 | + 有时断开连接事件并没有更新通知栏 153 | 154 | 0.8.0 - 首次发布 155 | ----------------------- 156 | 157 | 功能: 158 | + 从通知栏上控制,并获取详细信息 159 | + 在已保存的无线网络上自动连接 160 | + 开机自启动,您可以在首选项界面中选择或取消 161 | + 连接或断开无线网络时,自动在 USB 和网络调试之间切换 162 | + 可配置的服务管理 163 | -------------------------------------------------------------------------------- /Resources/translations/zh/description.txt: -------------------------------------------------------------------------------- 1 | ADB 管理器,更轻松地开发 Android。 2 | 3 | 警告:需要ROOT权限! 4 | 5 | 如果您想协助翻译此应用程序,见此: 6 | 7 | https://crowdin.net/project/adbm 8 | 9 | 最自动、易用、稳定的 ADB 管理工具,方便至极。 10 | 11 | 特色: 12 | + 从通知栏上控制,并获取详细信息 13 | + 在已保存的无线网络上自动连接 14 | + 开机自启动,您可以在首选项界面中选择或取消 15 | + 连接或断开无线网络时,自动在 USB 和网络调试之间切换 16 | + 可配置的服务管理 17 | + 根据 ADB 的状态切换图标颜色 18 | + 在服务运行时保持屏幕开启 19 | + 安装新软件包时唤醒屏幕 20 | + 触摸通知栏中的图标切换 ADB 状态 21 | 22 | 它比其它工具更易使用,总在通知栏中可见。 配备有高级功能,如基于无线网络和网络状态的全自动 ADB 状态控制。 23 | 24 | 在首选项中配置好已知网络列表,ADB 管理器就能在连接到这些网络时自动启动网络 ADB。 25 | 26 | 在咖啡馆/酒吧/火车/厕所/其他地方的无线网络上开发? ADB 管理器能自动切换无线和非无线 ADB。 27 | 28 | 这是开放源代码软件,您可以在 https://github.com/ilijamt/android-adbm 查看代码 29 | 30 | 将来版本: 31 | + 状态切换间延迟 32 | 33 | 权限: 34 | + android.permission.ACCESS_SUPERUSER 35 | 与SuperSU一起使用,如果有的话 36 | 37 | + android.permission.RECEIVE_BOOT_COMPLETED 38 | 用于在设备启动时自启动,在启动前应等待的时间及AlarmManager检查服务是否运行的频率可在首选项菜单中配置。 39 | 40 | + android.permission.ACCESS_NETWORK_STATE 41 | android.permission.ACCESS_WIFI_STATE 42 | 用于自动切换 ADB 状态 43 | 44 | + android.permission.INTERNET 45 | 用于检索 IP 地址,没有该权限时检索 IP 地址会崩溃。 46 | 47 | + android.permission.WAKE_LOCK 48 | 用于在新软件包安装时唤醒屏幕,或在 ADB 服务运行时保持屏幕开启 49 | 50 | 如有任何疑问、建议、bug 报告或协助翻译应用,请电邮我,地址 ilijamt+adbm@gmail.com -------------------------------------------------------------------------------- /Resources/translations/zh/recent-changes.txt: -------------------------------------------------------------------------------- 1 | 这是开放源代码软件,您可以在 https://github.com/ilijamt/android-adbm 查看代码 2 | 3 | 功能: 4 | + 升级 SU 库 5 | + 添加日本翻译由 Mari (https://crowdin.com/profile/marimaari) 6 | + 添加简体中文翻译由 yangfl (https://crowdin.com/profile/yangfl)、 yap7800 (https://crowdin.com/profile/yap7800) 7 | + 错误修正和优化 8 | + 默认语言设置为 en 构建应用程序时 -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 19 5 | buildToolsVersion "21.1.2" 6 | 7 | defaultConfig { 8 | applicationId "com.matoski.adbm" 9 | minSdkVersion 10 10 | targetSdkVersion 19 11 | versionCode 28 12 | versionName "1.3.1" 13 | } 14 | 15 | lintOptions { 16 | abortOnError true 17 | showAll true 18 | xmlReport false 19 | disable 'OldTargetApi', 'LongLogTag', 'UnusedResources', 'PluralsCandidate', 'TypographyDashes', 'RtlHardcoded', 'RtlSymmetry' 20 | } 21 | 22 | signingConfigs { 23 | release { 24 | def Properties props = new Properties() 25 | props.load(new FileInputStream(rootProject.file("signing.properties"))) 26 | assert props["key.store"] 27 | assert props["key.alias"] 28 | assert props["key.store.password"] 29 | assert props["key.alias.password"] 30 | storeFile rootProject.file(props["key.store"]) 31 | storePassword props["key.store.password"] 32 | keyAlias props["key.alias"] 33 | keyPassword props["key.alias.password"] 34 | } 35 | } 36 | 37 | buildTypes { 38 | release { 39 | minifyEnabled false 40 | shrinkResources false 41 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' 42 | signingConfig signingConfigs.release 43 | zipAlignEnabled true 44 | } 45 | } 46 | } 47 | 48 | dependencies { 49 | compile 'com.android.support:support-v4:21.0.3' 50 | compile 'com.google.code.gson:gson:2.3' 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 28 | 29 | 30 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 45 | 48 | 51 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/activity/AboutActivity.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.activity; 2 | 3 | import android.util.Log; 4 | 5 | import com.matoski.adbm.R; 6 | 7 | /** 8 | * Shows the About data for the application 9 | * 10 | * @author Ilija Matoski (ilijamt@gmail.com) 11 | */ 12 | public class AboutActivity extends BaseHelpActivity { 13 | 14 | /** 15 | * The tag used when logging with {@link Log} 16 | */ 17 | @SuppressWarnings("unused") 18 | private static final String LOG_TAG = AboutActivity.class.getName(); 19 | 20 | /* 21 | * (non-Javadoc) 22 | * 23 | * @see com.matoski.adbm.activity.BaseHelpActivity#getTitleId() 24 | */ 25 | @Override 26 | protected int getTitleId() { 27 | return R.string.about; 28 | } 29 | 30 | /* 31 | * (non-Javadoc) 32 | * 33 | * @see com.matoski.adbm.activity.BaseHelpActivity#getResourceId() 34 | */ 35 | @Override 36 | protected int getResourceId() { 37 | return R.raw.about; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/activity/BaseHelpActivity.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.activity; 2 | 3 | import android.app.Activity; 4 | import android.content.pm.PackageInfo; 5 | import android.content.pm.PackageManager; 6 | import android.content.pm.PackageManager.NameNotFoundException; 7 | import android.graphics.Color; 8 | import android.os.Bundle; 9 | import android.util.Log; 10 | import android.webkit.WebSettings; 11 | import android.webkit.WebView; 12 | import android.widget.TextView; 13 | 14 | import com.matoski.adbm.R; 15 | import com.matoski.adbm.util.FileUtil; 16 | 17 | /** 18 | * Base {@link Activity} used to display simple layouts with version, and text 19 | * 20 | * @author Ilija Matoski (ilijamt@gmail.com) 21 | */ 22 | public abstract class BaseHelpActivity extends Activity { 23 | 24 | /** 25 | * The tag used when logging with {@link Log} 26 | */ 27 | private static final String LOG_TAG = BaseHelpActivity.class.getName(); 28 | 29 | /** 30 | * This method needs to be overridden 31 | * 32 | *
 33 | 	 * int getResourceId() {
 34 | 	 * 	return R.raw.file;
 35 | 	 * }
 36 | 	 * 
37 | * 38 | * @return the resource id 39 | */ 40 | protected abstract int getResourceId(); 41 | 42 | /** 43 | * The methods returns the activity title id 44 | * 45 | *
 46 | 	 *  int getTitleId() {
 47 | 	 *    return R.string.title;
 48 | 	 *  }
 49 | 	 *  
50 | * @return 51 | */ 52 | protected abstract int getTitleId(); 53 | 54 | /* 55 | * (non-Javadoc) 56 | * 57 | * @see android.app.Activity#onCreate(android.os.Bundle) 58 | */ 59 | protected void onCreate(Bundle savedInstanceState) { 60 | super.onCreate(savedInstanceState); 61 | setContentView(R.layout.base_help); 62 | setTitle(getTitleId()); 63 | 64 | TextView versionView = (TextView) findViewById(R.id.help_about_version); 65 | versionView.setText(getVersion()); 66 | 67 | String html = FileUtil.readRawFile(getApplicationContext(), 68 | getResourceId()); 69 | 70 | if (html == null) { 71 | html = getResources().getString(R.string.no_data); 72 | } 73 | 74 | final WebView aboutText = (WebView) findViewById(R.id.help_about_text); 75 | final WebSettings settings = aboutText.getSettings(); 76 | 77 | settings.setDefaultTextEncodingName("utf-8"); 78 | 79 | aboutText.setBackgroundColor(Color.argb(1, 0, 0, 0)); 80 | aboutText.loadData(html, "text/html; charset=utf-8", "utf-8"); 81 | 82 | } 83 | 84 | /** 85 | * Get the current package version. 86 | * 87 | * @return The current version. 88 | */ 89 | protected String getVersion() { 90 | String result = ""; 91 | try { 92 | PackageManager manager = getPackageManager(); 93 | PackageInfo info = manager.getPackageInfo(getPackageName(), 0); 94 | 95 | result = String.format("%s (%s)", info.versionName, 96 | info.versionCode); 97 | } catch (NameNotFoundException e) { 98 | Log.w(LOG_TAG, 99 | "Unable to get application version: " + e.getMessage()); 100 | result = "Unable to get application version."; 101 | } 102 | 103 | return result; 104 | } 105 | 106 | } 107 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/activity/ChangeLogActivity.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.activity; 2 | 3 | import android.util.Log; 4 | 5 | import com.matoski.adbm.R; 6 | 7 | /** 8 | * Shows the Change Log data for the application 9 | * 10 | * @author Ilija Matoski (ilijamt@gmail.com) 11 | */ 12 | public class ChangeLogActivity extends BaseHelpActivity { 13 | 14 | /** 15 | * The tag used when logging with {@link Log} 16 | */ 17 | @SuppressWarnings("unused") 18 | private static final String LOG_TAG = ChangeLogActivity.class.getName(); 19 | 20 | /* 21 | * (non-Javadoc) 22 | * 23 | * @see com.matoski.adbm.activity.BaseHelpActivity#getTitleId() 24 | */ 25 | @Override 26 | protected int getTitleId() { 27 | return R.string.change_log; 28 | } 29 | 30 | /* 31 | * (non-Javadoc) 32 | * 33 | * @see com.matoski.adbm.activity.BaseHelpActivity#getResourceId() 34 | */ 35 | @Override 36 | protected int getResourceId() { 37 | return R.raw.changelog; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/activity/WiFiListViewCheckboxesActivity.java: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | */ 4 | package com.matoski.adbm.activity; 5 | 6 | import java.lang.reflect.Type; 7 | import java.util.ArrayList; 8 | import java.util.List; 9 | 10 | import android.app.Activity; 11 | import android.app.Application; 12 | import android.content.Context; 13 | import android.content.SharedPreferences; 14 | import android.net.wifi.WifiConfiguration; 15 | import android.net.wifi.WifiManager; 16 | import android.os.Bundle; 17 | import android.preference.PreferenceManager; 18 | import android.util.Log; 19 | import android.view.View; 20 | import android.view.View.OnClickListener; 21 | import android.widget.Button; 22 | import android.widget.ListView; 23 | 24 | import com.google.gson.Gson; 25 | import com.google.gson.GsonBuilder; 26 | import com.google.gson.reflect.TypeToken; 27 | import com.matoski.adbm.Constants; 28 | import com.matoski.adbm.R; 29 | import com.matoski.adbm.adapter.InteractiveArrayAdapter; 30 | import com.matoski.adbm.pojo.Model; 31 | 32 | /** 33 | * Activity that display the saved WiFi networks in an {@link ListView} to be 34 | * able to select which ones to connect if the network is in 35 | * {@link Constants#KEY_WIFI_LIST} 36 | * 37 | * @author Ilija Matoski (ilijamt@gmail.com) 38 | */ 39 | public class WiFiListViewCheckboxesActivity extends Activity { 40 | 41 | /** 42 | * The tag used when logging with {@link Log} 43 | */ 44 | private static final String LOG_TAG = WiFiListViewCheckboxesActivity.class 45 | .getName(); 46 | 47 | /** The WifiManager interface */ 48 | private WifiManager wifiManager = null; 49 | 50 | /** 51 | * The array adapter used to display the data in the activity 52 | */ 53 | protected InteractiveArrayAdapter adapter = null; 54 | 55 | /** 56 | * The preferences for the {@link Application} 57 | */ 58 | protected SharedPreferences preferences = null; 59 | 60 | /** 61 | * {@link Gson} object for building JSON strings 62 | */ 63 | private Gson gson; 64 | 65 | /** 66 | * The type of the {@link Model} used to convert to JSON or convert from 67 | * JSON to {@link Model} 68 | */ 69 | private Type gsonType; 70 | 71 | /** 72 | * The {@link ListView} that holds the data 73 | */ 74 | private ListView listView; 75 | 76 | /** 77 | * The save button reference, used for setting handlers 78 | */ 79 | private Button buttonSave; 80 | 81 | /** 82 | * The cancel button reference, used for setting handlers 83 | */ 84 | private Button buttonCancel; 85 | 86 | /* 87 | * (non-Javadoc) 88 | * 89 | * @see android.app.Activity#onCreate(android.os.Bundle) 90 | */ 91 | @Override 92 | protected void onCreate(Bundle savedInstanceState) { 93 | super.onCreate(savedInstanceState); 94 | setContentView(R.layout.wifi_list_activity); 95 | setTitle(R.string.app_wifi_list); 96 | 97 | this.wifiManager = (WifiManager) getBaseContext().getSystemService( 98 | Context.WIFI_SERVICE); 99 | this.gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation() 100 | .serializeNulls().create(); 101 | this.preferences = PreferenceManager.getDefaultSharedPreferences(this); 102 | this.buttonSave = (Button) findViewById(R.id.btn_save); 103 | this.buttonCancel = (Button) findViewById(R.id.btn_cancel); 104 | this.gsonType = new TypeToken>() { 105 | }.getType(); 106 | 107 | prepareAdapter(); 108 | 109 | this.buttonSave.setOnClickListener(new OnClickListener() { 110 | @Override 111 | public void onClick(View v) { 112 | String data = ""; 113 | if (!adapter.isEmpty()) { 114 | ArrayList objects = adapter.getList(); 115 | data = gson.toJson(objects, gsonType); 116 | preferences.edit().putString(Constants.KEY_WIFI_LIST, data) 117 | .apply(); 118 | Log.d(LOG_TAG, "Updated the WiFi auto connect list."); 119 | } 120 | finish(); 121 | } 122 | }); 123 | 124 | this.buttonCancel.setOnClickListener(new OnClickListener() { 125 | @Override 126 | public void onClick(View v) { 127 | finish(); 128 | } 129 | }); 130 | 131 | } 132 | 133 | /** 134 | * Helper function that prepares the adapter for the items in the list, also 135 | * takes care that we integrate known configuration networks and scan for 136 | * new saved ones and add them to the list. 137 | */ 138 | protected void prepareAdapter() { 139 | 140 | ArrayList objects = gson.fromJson( 141 | this.preferences.getString(Constants.KEY_WIFI_LIST, null), 142 | gsonType); 143 | 144 | if (objects == null) { 145 | objects = new ArrayList(); 146 | } 147 | 148 | Model model = null; 149 | List networks = this.wifiManager 150 | .getConfiguredNetworks(); 151 | 152 | if (networks != null) { 153 | for (WifiConfiguration configuration : networks) { 154 | 155 | if (configuration == null) { 156 | Log.e(LOG_TAG, "Network entry is NULL"); 157 | 158 | } else { 159 | model = new Model(configuration.SSID.replaceAll( 160 | "(^\")|(\"$)", "")); 161 | if (!objects.contains(model)) { 162 | Log.d(LOG_TAG, String.format( 163 | "New saved network detected: %s", 164 | model.getName())); 165 | objects.add(model); 166 | } 167 | } 168 | } 169 | } 170 | 171 | this.adapter = new InteractiveArrayAdapter(this, objects); 172 | 173 | this.listView = (ListView) findViewById(R.id.list_wifi); 174 | this.listView.setAdapter(this.adapter); 175 | 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/adapter/InteractiveArrayAdapter.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.adapter; 2 | 3 | import java.util.ArrayList; 4 | 5 | import android.app.Activity; 6 | import android.view.LayoutInflater; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.widget.ArrayAdapter; 10 | import android.widget.CheckBox; 11 | import android.widget.CompoundButton; 12 | 13 | import com.matoski.adbm.R; 14 | import com.matoski.adbm.pojo.Model; 15 | 16 | /** 17 | * An interactive array adapter, used to with {@link Model}, to provide an array 18 | * adapter that can have two states, selected or not selected 19 | * 20 | * @author Ilija Matoski (ilijamt@gmail.com) 21 | */ 22 | public class InteractiveArrayAdapter extends ArrayAdapter { 23 | 24 | /** 25 | * The current list of the available items in the array adapter 26 | */ 27 | private final ArrayList list; 28 | 29 | /** 30 | * Context of the Activity that implements the this adapter 31 | */ 32 | private final Activity context; 33 | 34 | /** 35 | * Instantiates a new interactive array adapter. 36 | * 37 | * @param context 38 | * Context of the Activity that implements the this adapter 39 | * @param list 40 | * The list of the available items in the array adapter 41 | */ 42 | public InteractiveArrayAdapter(Activity context, ArrayList list) { 43 | super(context, R.layout.list_item, list); 44 | this.context = context; 45 | this.list = list; 46 | } 47 | 48 | /** 49 | * View holder class used to hold the view model for an item 50 | * 51 | * @author Ilija Matoski (ilijamt@gmail.com) 52 | */ 53 | static class ViewHolder { 54 | 55 | /** 56 | * The model checkbox 57 | */ 58 | protected CheckBox checkbox; 59 | } 60 | 61 | /* 62 | * (non-Javadoc) 63 | * @see android.widget.ArrayAdapter#getView(int, android.view.View, 64 | * android.view.ViewGroup) 65 | */ 66 | @Override 67 | public View getView(int position, View convertView, ViewGroup parent) { 68 | View view = null; 69 | if (convertView == null) { 70 | LayoutInflater inflater = context.getLayoutInflater(); 71 | view = inflater.inflate(R.layout.list_item, parent, false); 72 | final ViewHolder viewHolder = new ViewHolder(); 73 | viewHolder.checkbox = (CheckBox) view.findViewById(R.id.check); 74 | viewHolder.checkbox 75 | .setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() { 76 | 77 | @Override 78 | public void onCheckedChanged(CompoundButton buttonView, 79 | boolean isChecked) { 80 | Model element = (Model) viewHolder.checkbox 81 | .getTag(); 82 | element.setSelected(buttonView.isChecked()); 83 | 84 | } 85 | }); 86 | view.setTag(viewHolder); 87 | viewHolder.checkbox.setTag(list.get(position)); 88 | } else { 89 | view = convertView; 90 | ((ViewHolder) view.getTag()).checkbox.setTag(list.get(position)); 91 | } 92 | ViewHolder holder = (ViewHolder) view.getTag(); 93 | holder.checkbox.setText(list.get(position).getName()); 94 | holder.checkbox.setChecked(list.get(position).isSelected()); 95 | return view; 96 | } 97 | 98 | /** 99 | * Returns the available list. 100 | * 101 | * @return the list of available {@link Model} 102 | */ 103 | public ArrayList getList() { 104 | return this.list; 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/enums/AdbStateEnum.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.enums; 2 | 3 | /** 4 | * The state of ADB 5 | * 6 | * @author Ilija Matoski (ilijamt@gmail.com) 7 | */ 8 | public enum AdbStateEnum { 9 | 10 | /** 11 | * ADB is running and is listening on the network port assigned 12 | */ 13 | ACTIVE, 14 | /** 15 | * ADB is not running 16 | */ 17 | NOT_ACTIVE 18 | 19 | } 20 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/enums/IPMode.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.enums; 2 | 3 | /** 4 | * IP Mode 5 | * 6 | * @author Ilija Matoski (ilijamt@gmail.com) 7 | */ 8 | public enum IPMode { 9 | /** 10 | * IP4 11 | */ 12 | ipv4, 13 | /** 14 | * IP6 15 | */ 16 | ipv6 17 | } 18 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/interfaces/IMessageHandler.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.interfaces; 2 | 3 | import com.matoski.adbm.enums.AdbStateEnum; 4 | 5 | /** 6 | * Message handler, used to transfer messages between the processes 7 | * 8 | * @author Ilija Matoski (ilijamt@gmail.com) 9 | */ 10 | public interface IMessageHandler { 11 | 12 | /** 13 | * Message to be sent to the process 14 | * 15 | * @param message 16 | * the message 17 | */ 18 | public void message(String message); 19 | 20 | /** 21 | * Update the process based on {@link AdbStateEnum} 22 | * 23 | * @param state 24 | * the state 25 | */ 26 | public void update(AdbStateEnum state); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/pojo/IP.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.pojo; 2 | 3 | /** 4 | * Contains the IP4 and IP6 of the network, it's used to store the IP addresses 5 | * for an easier transfer mechanism 6 | * 7 | *
 8 |  * new IP("127.0.0.1", "::1");
 9 |  * new IP("127.0.0.1");
10 |  * 
11 | * 12 | * @author Ilija Matoski (ilijamt@gmail.com) 13 | */ 14 | public class IP { 15 | 16 | /* 17 | * (non-Javadoc) 18 | * @see java.lang.Object#hashCode() 19 | */ 20 | @Override 21 | public int hashCode() { 22 | final int prime = 31; 23 | int result = 1; 24 | result = prime * result + ((ipv4 == null) ? 0 : ipv4.hashCode()); 25 | result = prime * result + ((ipv6 == null) ? 0 : ipv6.hashCode()); 26 | return result; 27 | } 28 | 29 | /* 30 | * (non-Javadoc) 31 | * @see java.lang.Object#equals(java.lang.Object) 32 | */ 33 | @Override 34 | public boolean equals(Object obj) { 35 | if (this == obj) { 36 | return true; 37 | } 38 | if (obj == null) { 39 | return false; 40 | } 41 | if (!(obj instanceof IP)) { 42 | return false; 43 | } 44 | IP other = (IP) obj; 45 | if (ipv4 == null) { 46 | if (other.ipv4 != null) { 47 | return false; 48 | } 49 | } else if (!ipv4.equals(other.ipv4)) { 50 | return false; 51 | } 52 | if (ipv6 == null) { 53 | if (other.ipv6 != null) { 54 | return false; 55 | } 56 | } else if (!ipv6.equals(other.ipv6)) { 57 | return false; 58 | } 59 | return true; 60 | } 61 | 62 | final public String ipv4; 63 | final public String ipv6; 64 | 65 | /** 66 | * Instantiates a new IP 67 | * 68 | * @param ipv4 69 | * the IP4 version of the IP 70 | * @param ipv6 71 | * the IP6 version of the IP 72 | */ 73 | public IP(String ipv4, String ipv6) { 74 | this.ipv4 = ipv4; 75 | this.ipv6 = ipv6; 76 | } 77 | 78 | /** 79 | * Instantiates a new IP 80 | * 81 | * @param ipv4 82 | * the IP4 version of the IP 83 | */ 84 | public IP(String ipv4) { 85 | this.ipv4 = ipv4; 86 | this.ipv6 = null; 87 | } 88 | 89 | } 90 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/pojo/Model.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.pojo; 2 | 3 | import com.google.gson.annotations.Expose; 4 | 5 | /** 6 | * A generic model that is used to hold the state of an object, and it's name. 7 | * 8 | *
  9 |  * new Model("name");
 10 |  * new Model("name", true);
 11 |  * 
12 | * 13 | * @author Ilija Matoski (ilijamt@gmail.com) 14 | */ 15 | public class Model { 16 | 17 | /* 18 | * (non-Javadoc) 19 | * @see java.lang.Object#hashCode() 20 | */ 21 | @Override 22 | public int hashCode() { 23 | final int prime = 31; 24 | int result = 1; 25 | result = prime * result + ((name == null) ? 0 : name.hashCode()); 26 | return result; 27 | } 28 | 29 | /* 30 | * (non-Javadoc) 31 | * @see java.lang.Object#equals(java.lang.Object) 32 | */ 33 | @Override 34 | public boolean equals(Object obj) { 35 | if (this == obj) { 36 | return true; 37 | } 38 | if (obj == null) { 39 | return false; 40 | } 41 | if (!(obj instanceof Model)) { 42 | return false; 43 | } 44 | Model other = (Model) obj; 45 | if (name == null) { 46 | if (other.name != null) { 47 | return false; 48 | } 49 | } else if (!name.equals(other.name)) { 50 | return false; 51 | } 52 | return true; 53 | } 54 | 55 | /** The name. */ 56 | @Expose 57 | private String name; 58 | 59 | /** The selected. */ 60 | @Expose 61 | private boolean selected; 62 | 63 | /** 64 | * Instantiates a new model. 65 | * 66 | * @param name 67 | * the name 68 | */ 69 | public Model(String name) { 70 | this.name = name; 71 | this.selected = false; 72 | } 73 | 74 | /** 75 | * Instantiates a new model. 76 | * 77 | * @param name 78 | * The name of the item 79 | * @param selected 80 | * Is the item in the selected 81 | */ 82 | public Model(String name, boolean selected) { 83 | this.name = name; 84 | this.selected = selected; 85 | } 86 | 87 | /** 88 | * Gets the name. 89 | * 90 | * @return the name 91 | */ 92 | public String getName() { 93 | return name; 94 | } 95 | 96 | /** 97 | * Sets the name. 98 | * 99 | * @param name 100 | * the new name 101 | */ 102 | public void setName(String name) { 103 | this.name = name; 104 | } 105 | 106 | /** 107 | * Checks if is selected. 108 | * 109 | * @return true, if is selected 110 | */ 111 | public boolean isSelected() { 112 | return selected; 113 | } 114 | 115 | /** 116 | * Sets the selected. 117 | * 118 | * @param selected 119 | * the new selected 120 | */ 121 | public void setSelected(boolean selected) { 122 | this.selected = selected; 123 | } 124 | 125 | } 126 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/receiver/ActionPackageAdded.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.receiver; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.util.Log; 7 | 8 | import com.matoski.adbm.Constants; 9 | import com.matoski.adbm.service.ManagerService; 10 | import com.matoski.adbm.util.ServiceUtil; 11 | 12 | /** 13 | * A {@link BroadcastReceiver} that triggers when we get {@link Intent#ACTION_PACKAGE_ADDED}. Used to trigger a screen 14 | * wake up by calling {@link ManagerService#wakeUpPhone()} through the service. 15 | * 16 | * @author Ilija Matoski (ilijamt@gmail.com) 17 | */ 18 | public class ActionPackageAdded extends BroadcastReceiver { 19 | 20 | /** 21 | * The tag used when logging with {@link Log} 22 | */ 23 | private static final String LOG_TAG = ActionPackageAdded.class.getName(); 24 | 25 | /* 26 | * (non-Javadoc) 27 | * @see android.content.BroadcastReceiver#onReceive(android.content.Context, android.content.Intent) 28 | */ 29 | @Override 30 | public void onReceive(Context context, Intent intent) { 31 | 32 | final String action = intent.getAction(); 33 | 34 | Log.i(LOG_TAG, String.format("Running action: %s", action)); 35 | 36 | if (action.equals(Intent.ACTION_PACKAGE_ADDED)) { 37 | ServiceUtil.runServiceAction(context, 38 | Constants.SERVICE_ACTION_PACKAGE_ADD); 39 | } 40 | 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/receiver/BootCompleteReceiver.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.receiver; 2 | 3 | import android.app.Application; 4 | import android.content.BroadcastReceiver; 5 | import android.content.Context; 6 | import android.content.Intent; 7 | import android.content.SharedPreferences; 8 | import android.preference.PreferenceManager; 9 | import android.util.Log; 10 | 11 | import com.matoski.adbm.Constants; 12 | import com.matoski.adbm.util.PreferenceUtil; 13 | import com.matoski.adbm.util.ServiceUtil; 14 | 15 | /** 16 | * A {@link BroadcastReceiver} that starts when we get {@link Intent#ACTION_BOOT_COMPLETED} 17 | * 18 | * @author Ilija Matoski (ilijamt@gmail.com) 19 | */ 20 | public class BootCompleteReceiver extends BroadcastReceiver { 21 | 22 | /** 23 | * The tag used when logging with {@link Log} 24 | */ 25 | private static String LOG_TAG = ConnectionDetectionReceiver.class.getName(); 26 | 27 | /** 28 | * The preferences for the {@link Application} 29 | */ 30 | private SharedPreferences preferences; 31 | 32 | /** 33 | * Should we run on boot? 34 | */ 35 | private boolean bRunOnBoot = Constants.START_ON_BOOT; 36 | 37 | /** 38 | * How long do we delay before starting the service? 39 | */ 40 | private int iDelayStart = Constants.DELAY_START_AFTER_BOOT; 41 | 42 | /** 43 | * How often should we check if the service is running? 44 | */ 45 | private long iRepeatTimeout = Constants.ALARM_TIMEOUT_INTERVAL; 46 | 47 | /* 48 | * (non-Javadoc) 49 | * @see android.content.BroadcastReceiver#onReceive(android.content.Context, android.content.Intent) 50 | */ 51 | @Override 52 | public void onReceive(Context context, Intent intent) { 53 | 54 | this.preferences = PreferenceManager 55 | .getDefaultSharedPreferences(context); 56 | 57 | try { 58 | this.bRunOnBoot = this.preferences.getBoolean( 59 | Constants.KEY_START_ON_BOOT, Constants.START_ON_BOOT); 60 | } catch (Exception e) { 61 | this.bRunOnBoot = Constants.START_ON_BOOT; 62 | } 63 | 64 | Log.d(LOG_TAG, String.format("Should we start on boot: %b", bRunOnBoot)); 65 | 66 | try { 67 | this.iDelayStart = Integer.parseInt(PreferenceUtil.getString( 68 | context, Constants.KEY_START_DELAY, 69 | Constants.DELAY_START_AFTER_BOOT)); 70 | } catch (Exception e) { 71 | this.iDelayStart = Constants.DELAY_START_AFTER_BOOT; 72 | } 73 | 74 | Log.d(LOG_TAG, String.format( 75 | "We are gonna delay the startup by %d seconds", iDelayStart)); 76 | 77 | try { 78 | this.iRepeatTimeout = Long.parseLong(PreferenceUtil.getString( 79 | context, Constants.KEY_ALARM_TIMEOUT_INTERVAL, 80 | Constants.ALARM_TIMEOUT_INTERVAL * 1000)); 81 | } catch (Exception e) { 82 | this.iRepeatTimeout = Constants.ALARM_TIMEOUT_INTERVAL * 1000; 83 | } 84 | 85 | Log.d(LOG_TAG, 86 | String.format( 87 | "We are gonna check every %d seconds to check if the service is running", 88 | iRepeatTimeout)); 89 | 90 | if (this.bRunOnBoot) { 91 | Log.d(LOG_TAG, "Starting the service on boot"); 92 | ServiceUtil.start(context, this.iDelayStart, this.iRepeatTimeout); 93 | } 94 | 95 | } 96 | 97 | } 98 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/receiver/ConnectionDetectionReceiver.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.receiver; 2 | 3 | import android.content.BroadcastReceiver; 4 | import android.content.Context; 5 | import android.content.Intent; 6 | import android.net.ConnectivityManager; 7 | import android.net.NetworkInfo; 8 | import android.net.wifi.WifiManager; 9 | import android.preference.PreferenceManager; 10 | import android.util.Log; 11 | 12 | import com.matoski.adbm.Constants; 13 | import com.matoski.adbm.service.ManagerService; 14 | import com.matoski.adbm.util.ServiceUtil; 15 | 16 | /** 17 | * A {@link BroadcastReceiver} that triggers when we get {@link WifiManager#NETWORK_STATE_CHANGED_ACTION}. Used to 18 | * trigger actions in {@link ManagerService} to start or stop the ADB service. 19 | * 20 | * @author Ilija Matoski (ilijamt@gmail.com) 21 | */ 22 | public class ConnectionDetectionReceiver extends BroadcastReceiver { 23 | 24 | /** 25 | * The tag used when logging with {@link Log} 26 | */ 27 | private static String LOG_TAG = ConnectionDetectionReceiver.class.getName(); 28 | 29 | /* 30 | * (non-Javadoc) 31 | * @see android.content.BroadcastReceiver#onReceive(android.content.Context, android.content.Intent) 32 | */ 33 | @Override 34 | public void onReceive(Context context, Intent intent) { 35 | 36 | final String action = intent.getAction(); 37 | final Boolean bAutoWiFiConnect; 38 | 39 | if (action.equals(WifiManager.NETWORK_STATE_CHANGED_ACTION)) { 40 | 41 | bAutoWiFiConnect = PreferenceManager.getDefaultSharedPreferences( 42 | context).getBoolean(Constants.KEY_ADB_START_ON_KNOWN_WIFI, 43 | Constants.ADB_START_ON_KNOWN_WIFI); 44 | 45 | NetworkInfo networkInfo = intent 46 | .getParcelableExtra(WifiManager.EXTRA_NETWORK_INFO); 47 | 48 | if (networkInfo.getType() == ConnectivityManager.TYPE_WIFI) { 49 | 50 | Log.d(LOG_TAG, String.format("Going through network state: %s", 51 | networkInfo.getDetailedState().toString())); 52 | 53 | switch (networkInfo.getDetailedState()) { 54 | case CONNECTED: 55 | 56 | Log.d(LOG_TAG, String.format( 57 | "Auto connecting to WiFi: %s", 58 | Boolean.toString(bAutoWiFiConnect))); 59 | 60 | if (bAutoWiFiConnect) { 61 | ServiceUtil.runServiceAction(context, 62 | Constants.ACTION_SERVICE_AUTO_WIFI); 63 | } else { 64 | ServiceUtil 65 | .runServiceAction( 66 | context, 67 | Constants.ACTION_SERVICE_UPDATE_NOTIFICATION_NETWORK_ADB); 68 | } 69 | 70 | break; 71 | 72 | case DISCONNECTED: 73 | ServiceUtil.runServiceAction(context, 74 | Constants.ACTION_SERVICE_ADB_STOP); 75 | 76 | break; 77 | 78 | case AUTHENTICATING: 79 | //case BLOCKED: 80 | //case CAPTIVE_PORTAL_CHECK: 81 | case CONNECTING: 82 | case DISCONNECTING: 83 | case FAILED: 84 | case IDLE: 85 | case OBTAINING_IPADDR: 86 | case SCANNING: 87 | case SUSPENDED: 88 | //case VERIFYING_POOR_LINK: 89 | default: 90 | break; 91 | 92 | } 93 | 94 | } 95 | 96 | } 97 | 98 | } 99 | 100 | } 101 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/tasks/GenericAsyncTask.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.tasks; 2 | 3 | import android.os.AsyncTask; 4 | import android.util.Log; 5 | import android.util.SparseArray; 6 | 7 | /** 8 | * A generic implementation of {@link AsyncTask} for running tasks 9 | * 10 | * @param 11 | * Parameter type 12 | * @param 13 | * Progress type 14 | * @param 15 | * Result type 16 | * 17 | * @author Ilija Matoski (ilijamt@gmail.com) 18 | */ 19 | public abstract class GenericAsyncTask extends 20 | AsyncTask { 21 | 22 | /** 23 | * The tag used when logging with {@link Log} 24 | */ 25 | @SuppressWarnings("unused") 26 | private static final String LOG_TAG = GenericAsyncTask.class.getName(); 27 | 28 | /** 29 | * Should we use root access for running the {@link GenericAsyncTask} 30 | */ 31 | protected Boolean mUseRoot = false; 32 | 33 | /** 34 | * A map of <{@link Integer}, {@link String}>, and used to fetch resources with 35 | * {@link GenericAsyncTask#getString(int)} 36 | */ 37 | protected SparseArray map = new SparseArray(); 38 | 39 | /** 40 | * Gets from the defined {@link GenericAsyncTask#map} 41 | * 42 | * @param resourceId 43 | * The resource id value in the map 44 | * 45 | * @return The string from the {@link GenericAsyncTask#map}, or empty string if it cannot find it in the 46 | * {@link GenericAsyncTask#map} 47 | */ 48 | protected String getString(int resourceId) { 49 | String data = this.map.get(resourceId); 50 | 51 | if (data == null) { 52 | return ""; 53 | } 54 | 55 | return data; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/tasks/NetworkStatusChecker.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.tasks; 2 | 3 | import java.util.List; 4 | 5 | import android.util.Log; 6 | 7 | import com.matoski.adbm.Constants; 8 | import com.matoski.adbm.R; 9 | import com.matoski.adbm.enums.AdbStateEnum; 10 | 11 | import eu.chainfire.libsuperuser.Shell; 12 | 13 | /** 14 | * A task that implements {@link GenericAsyncTask} to have the ability to check the ADB status 15 | * 16 | * @author Ilija Matoski (ilijamt@gmail.com) 17 | */ 18 | public class NetworkStatusChecker extends 19 | GenericAsyncTask { 20 | 21 | /** 22 | * The tag used when logging with {@link Log} 23 | */ 24 | private static final String LOG_TAG = NetworkStatusChecker.class.getName(); 25 | 26 | /* 27 | * (non-Javadoc) 28 | * @see android.os.AsyncTask#doInBackground(Params[]) 29 | */ 30 | @Override 31 | protected AdbStateEnum doInBackground(Void... params) { 32 | 33 | Log.d(LOG_TAG, String.format("Use root: %s", mUseRoot)); 34 | publishProgress(String.format(getString(R.string.item_use_root), 35 | mUseRoot)); 36 | 37 | final String getTcpPort = "getprop service.adb.tcp.port"; 38 | 39 | if (mUseRoot) { 40 | 41 | if (!Shell.SU.available()) { 42 | publishProgress(getString(R.string.item_no_su_access)); 43 | Log.e(LOG_TAG, "No superuser access available"); 44 | return AdbStateEnum.NOT_ACTIVE; 45 | } 46 | 47 | } 48 | 49 | Log.d(LOG_TAG, "Checking network status"); 50 | 51 | final List output; 52 | 53 | if (mUseRoot) { 54 | output = Shell.SU.run(getTcpPort); 55 | } else { 56 | output = Shell.run(Constants.SHELL_NON_ROOT_DEVICE, 57 | new String[] { getTcpPort }, null, false); 58 | } 59 | 60 | publishProgress(String.format( 61 | getString(R.string.item_executing_command), getTcpPort)); 62 | 63 | if (null == output) { 64 | 65 | if (mUseRoot) { 66 | publishProgress(getString(R.string.item_root_access_denied)); 67 | } 68 | 69 | publishProgress(getString(R.string.item_fail_retrieve_network_status)); 70 | return AdbStateEnum.NOT_ACTIVE; 71 | } 72 | if (!(output.size() > 0)) { 73 | publishProgress(getString(R.string.item_fail_retrieve_network_status)); 74 | return AdbStateEnum.NOT_ACTIVE; 75 | } 76 | 77 | final String command = output.get(0); 78 | final AdbStateEnum stateEnum = command.equalsIgnoreCase("-1") 79 | || !(command.length() > 0) ? AdbStateEnum.NOT_ACTIVE 80 | : AdbStateEnum.ACTIVE; 81 | 82 | publishProgress(String.format("%s = %s", getTcpPort, command)); 83 | 84 | Log.d(LOG_TAG, 85 | String.format("Network status: %s", stateEnum.toString())); 86 | 87 | publishProgress(String.format(getString(R.string.item_network_status), 88 | stateEnum.toString())); 89 | 90 | return stateEnum; 91 | } 92 | } -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/tasks/RootCommandExecuter.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.tasks; 2 | 3 | import java.util.List; 4 | 5 | import android.util.Log; 6 | 7 | import com.matoski.adbm.Constants; 8 | import com.matoski.adbm.R; 9 | import com.matoski.adbm.enums.AdbStateEnum; 10 | 11 | import eu.chainfire.libsuperuser.Shell; 12 | 13 | /** 14 | * A task that implements {@link GenericAsyncTask} to have the ability to run commands to enable/disable the ADB status 15 | * 16 | * @author Ilija Matoski (ilijamt@gmail.com) 17 | */ 18 | public class RootCommandExecuter extends 19 | GenericAsyncTask { 20 | 21 | /** 22 | * The tag used when logging with {@link Log} 23 | */ 24 | private static final String LOG_TAG = RootCommandExecuter.class.getName(); 25 | 26 | /* 27 | * (non-Javadoc) 28 | * @see android.os.AsyncTask#doInBackground(Params[]) 29 | */ 30 | @Override 31 | protected AdbStateEnum doInBackground(String... commands) { 32 | 33 | final String getTcpPort = "getprop service.adb.tcp.port"; 34 | 35 | Log.d(LOG_TAG, String.format("Use root: %s", mUseRoot)); 36 | 37 | publishProgress(String.format(getString(R.string.item_use_root), 38 | mUseRoot)); 39 | 40 | if (mUseRoot) { 41 | Log.d(LOG_TAG, "Executing root commands"); 42 | if (!Shell.SU.available()) { 43 | Log.e(LOG_TAG, "No superuser access available"); 44 | publishProgress(getString(R.string.item_no_su_access)); 45 | return AdbStateEnum.NOT_ACTIVE; 46 | } 47 | } 48 | 49 | publishProgress(getString(R.string.item_executing_commands)); 50 | 51 | publishProgress(commands); 52 | 53 | if (mUseRoot) { 54 | 55 | if (null == Shell.SU.run(commands)) { 56 | publishProgress(getString(R.string.item_root_access_denied)); 57 | } 58 | 59 | Log.d(LOG_TAG, "Processed the root commands"); 60 | 61 | } else { 62 | 63 | Shell.run(Constants.SHELL_NON_ROOT_DEVICE, commands, null, false); 64 | 65 | Log.d(LOG_TAG, "Processed the shell commands"); 66 | 67 | } 68 | 69 | publishProgress(String.format( 70 | getString(R.string.item_executing_command), getTcpPort)); 71 | 72 | final List networkStatus; 73 | 74 | if (mUseRoot) { 75 | networkStatus = Shell.SU.run(getTcpPort); 76 | } else { 77 | networkStatus = Shell.run(Constants.SHELL_NON_ROOT_DEVICE, 78 | new String[] { getTcpPort }, null, false); 79 | } 80 | 81 | if (null == networkStatus) { 82 | if (mUseRoot) { 83 | publishProgress(getString(R.string.item_root_access_denied)); 84 | } 85 | publishProgress(getString(R.string.item_fail_retrieve_network_status)); 86 | return AdbStateEnum.NOT_ACTIVE; 87 | } 88 | if (!(networkStatus.size() > 0)) { 89 | publishProgress(getString(R.string.item_fail_retrieve_network_status)); 90 | return AdbStateEnum.NOT_ACTIVE; 91 | } 92 | 93 | final String command = networkStatus.get(0); 94 | final AdbStateEnum stateEnum = command.equalsIgnoreCase("-1") 95 | || !(command.length() > 0) ? AdbStateEnum.NOT_ACTIVE 96 | : AdbStateEnum.ACTIVE; 97 | 98 | publishProgress(String.format("%s = %s", getTcpPort, command)); 99 | 100 | Log.d(LOG_TAG, 101 | String.format("Network status: %s", stateEnum.toString())); 102 | 103 | publishProgress(String.format(getString(R.string.item_network_status), 104 | stateEnum.toString())); 105 | 106 | return stateEnum; 107 | 108 | } 109 | } -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/util/ArrayUtils.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.util; 2 | 3 | import android.util.Log; 4 | 5 | /** 6 | * Helper class for dealing with arrays 7 | * 8 | * @author Ilija Matoski (ilijamt@gmail.com) 9 | */ 10 | public class ArrayUtils { 11 | 12 | /** 13 | * The tag used when logging with {@link Log} 14 | */ 15 | private static String LOG_TAG = ArrayUtils.class.getName(); 16 | 17 | /** 18 | * Join the array into a delimited string 19 | * 20 | * @param aArr 21 | * The array we need to convert to a string delimited list 22 | * 23 | * @param sSep 24 | * Separator to use 25 | * 26 | * @return The string delimited list 27 | */ 28 | public static String join(int[] aArr, String sSep) { 29 | Log.d(LOG_TAG, "Joinig an array with a separator: " + sSep); 30 | StringBuilder sbStr = new StringBuilder(); 31 | for (int i = 0, il = aArr.length; i < il; i++) { 32 | if (i > 0) sbStr.append(sSep); 33 | sbStr.append(aArr[i]); 34 | } 35 | return sbStr.toString(); 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/util/FileUtil.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.util; 2 | 3 | import java.io.ByteArrayOutputStream; 4 | import java.io.IOException; 5 | import java.io.InputStream; 6 | 7 | import android.content.Context; 8 | import android.util.Log; 9 | 10 | /** 11 | * Helper for file manipulation in the Android package 12 | * 13 | * @author Ilija Matoski (ilijamt@gmail.com) 14 | */ 15 | public class FileUtil { 16 | 17 | /** 18 | * The tag used when logging with {@link Log} 19 | */ 20 | private static String LOG_TAG = FileUtil.class.getName(); 21 | 22 | /** 23 | * Read a raw file from the android application package 24 | * 25 | * @param ctx 26 | * Context to use when getting the data 27 | * @param resId 28 | * The resource ID to read 29 | * 30 | * @return The whole file in a string 31 | */ 32 | public static String readRawFile(Context ctx, int resId) { 33 | 34 | Log.d(LOG_TAG, "Fetching raw file with id: " + resId); 35 | 36 | InputStream inputStream = ctx.getResources().openRawResource(resId); 37 | ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); 38 | 39 | int i; 40 | try { 41 | i = inputStream.read(); 42 | while (i != -1) { 43 | byteArrayOutputStream.write(i); 44 | i = inputStream.read(); 45 | } 46 | inputStream.close(); 47 | } catch (IOException e) { 48 | return null; 49 | } 50 | return byteArrayOutputStream.toString(); 51 | } 52 | } -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/util/GenericUtil.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.util; 2 | 3 | import java.util.Locale; 4 | 5 | import android.app.Activity; 6 | import android.content.Intent; 7 | import android.content.SharedPreferences; 8 | import android.content.res.Configuration; 9 | import android.net.Uri; 10 | import android.preference.PreferenceManager; 11 | 12 | import com.matoski.adbm.Constants; 13 | 14 | /** 15 | * Generic utilities used in the ADBM application 16 | * 17 | * @author ilijamt 18 | * 19 | */ 20 | public class GenericUtil { 21 | 22 | /** 23 | * Send an intent to open the translation page 24 | * 25 | * @param activity 26 | */ 27 | public static void openTranslationPage(Activity activity) { 28 | Intent i = new Intent(Intent.ACTION_VIEW); 29 | i.setData(Uri.parse(Constants.TRANSLATION_URL)); 30 | activity.startActivity(i); 31 | } 32 | 33 | /** 34 | * Update the application locale based on the language 35 | * 36 | * @param activity 37 | */ 38 | public static void updateApplicationLocale(Activity activity) { 39 | 40 | final SharedPreferences prefs = PreferenceManager 41 | .getDefaultSharedPreferences(activity); 42 | 43 | final String language = prefs.getString(Constants.KEY_LANGUAGE, 44 | Constants.KEY_LANGUAGE_DEFAULT); 45 | 46 | GenericUtil.updateApplicationLocale(activity, language); 47 | } 48 | 49 | /** 50 | * Update the application locale based on the language 51 | * 52 | * @param activity 53 | * @param language 54 | */ 55 | public static void updateApplicationLocale(Activity activity, 56 | String language) { 57 | 58 | Locale locale = new Locale(language.toString()); 59 | Locale.setDefault(locale); 60 | Configuration configuration = new Configuration(); 61 | configuration.locale = locale; 62 | activity.getBaseContext() 63 | .getResources() 64 | .updateConfiguration( 65 | configuration, 66 | activity.getBaseContext().getResources() 67 | .getDisplayMetrics()); 68 | 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/util/NetworkUtil.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.util; 2 | 3 | import java.net.InetAddress; 4 | import java.net.NetworkInterface; 5 | import java.net.SocketException; 6 | import java.util.Enumeration; 7 | 8 | import org.apache.http.conn.util.InetAddressUtils; 9 | 10 | import com.matoski.adbm.Constants; 11 | import com.matoski.adbm.enums.IPMode; 12 | import com.matoski.adbm.pojo.IP; 13 | 14 | import android.util.Log; 15 | 16 | /** 17 | * Network helper utilities 18 | * 19 | * @author Ilija Matoski (ilijamt@gmail.com) 20 | */ 21 | public class NetworkUtil { 22 | 23 | /** 24 | * The tag used when logging with {@link Log} 25 | */ 26 | private static String LOG_TAG = NetworkUtil.class.getName(); 27 | 28 | /** 29 | * Convert a {@link Integer} based encoded IP address to {@link String} 30 | * 31 | * @param addr 32 | * Address to convert 33 | * 34 | * @return Converted IP address 35 | */ 36 | public static String intToIp(int addr) { 37 | Log.d(LOG_TAG, String.format("Converting %d address", addr)); 38 | return ((addr & 0xFF) + "." + ((addr >>>= 8) & 0xFF) + "." 39 | + ((addr >>>= 8) & 0xFF) + "." + ((addr >>>= 8) & 0xFF)); 40 | } 41 | 42 | /** 43 | * Gets the local network address 44 | * 45 | * @return {@link IP} containing the IP addresses 46 | */ 47 | public static IP getLocalAddress() { 48 | return new IP(NetworkUtil.getLocalIPAddress(IPMode.ipv4), 49 | NetworkUtil.getLocalIPAddress(IPMode.ipv6)); 50 | } 51 | 52 | /** 53 | * Gets the local network address based on mode 54 | * 55 | * @param mode 56 | * What IP address to retrieve, from {@link IPMode} 57 | * 58 | * @param retry 59 | * How many times to retry if we get NULL, use this as a 60 | * workaround on older systems 61 | * @return The IP address, or null if not found 62 | */ 63 | public static String getLocalIPAddress(IPMode mode) { 64 | return getLocalIPAddress(mode, Constants.RETRY_GET_NETWORK_LIST); 65 | } 66 | 67 | /** 68 | * Gets the local network address based on mode 69 | * 70 | * @param mode 71 | * What IP address to retrieve, from {@link IPMode} 72 | * 73 | * @param retry 74 | * How many times to retry if we get NULL, use this as a 75 | * workaround on older systems 76 | * @return The IP address, or null if not found 77 | */ 78 | public static String getLocalIPAddress(IPMode mode, Integer retry) { 79 | try { 80 | for (Enumeration en = NetworkInterface 81 | .getNetworkInterfaces(); en.hasMoreElements();) { 82 | NetworkInterface intf = en.nextElement(); 83 | for (Enumeration enumIpAddr = intf 84 | .getInetAddresses(); enumIpAddr.hasMoreElements();) { 85 | InetAddress inetAddress = enumIpAddr.nextElement(); 86 | 87 | switch (mode) { 88 | case ipv4: 89 | if (!inetAddress.isLoopbackAddress() 90 | && InetAddressUtils.isIPv4Address(inetAddress 91 | .getHostAddress())) { 92 | return inetAddress.getHostAddress().toString(); 93 | } 94 | break; 95 | case ipv6: 96 | String address = inetAddress.getHostAddress(); 97 | if (!inetAddress.isLoopbackAddress() 98 | && (InetAddressUtils.isIPv6Address(address) 99 | || InetAddressUtils 100 | .isIPv6HexCompressedAddress(address) || InetAddressUtils 101 | .isIPv6StdAddress(address))) { 102 | return inetAddress.getHostAddress().toString(); 103 | } 104 | break; 105 | 106 | } 107 | } 108 | } 109 | } catch (SocketException ex) { 110 | Log.e("Socket exception in GetIP Address of Utilities", 111 | ex.toString()); 112 | } catch (Exception e) { 113 | Log.e("Exception in GetIP Address of Utilities", e.toString()); 114 | return getLocalIPAddress(mode, --retry); 115 | } 116 | 117 | // if retry has expired then return null, we give up there is no choice 118 | // this was added as a fix for Android 4.0.3 and 4.0.4 119 | return null; 120 | } 121 | } 122 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/util/PreferenceUtil.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.util; 2 | 3 | import android.content.Context; 4 | import android.content.SharedPreferences; 5 | import android.preference.PreferenceManager; 6 | import android.util.Log; 7 | 8 | /** 9 | * Helper class for {@link PreferenceManager} 10 | * 11 | * @author Ilija Matoski (ilijamt@gmail.com) 12 | */ 13 | public class PreferenceUtil { 14 | 15 | /** 16 | * The tag used when logging with {@link Log} 17 | */ 18 | private static String LOG_TAG = PreferenceUtil.class.getName(); 19 | 20 | /** 21 | * Gets the data for the defined key 22 | * 23 | * @param context 24 | * Application/base context 25 | * @param key 26 | * The key to use to get the data 27 | * @param dflt 28 | * Default value of the data 29 | * 30 | * @return the value of the property, if not found it will return dflt 31 | */ 32 | public static String getString(Context context, String key, String dflt) { 33 | 34 | SharedPreferences prefs = PreferenceManager 35 | .getDefaultSharedPreferences(context); 36 | 37 | String value = dflt; 38 | 39 | try { 40 | value = prefs.getString(key, dflt); 41 | Log.i(LOG_TAG, String.format("%s = %s", key, dflt)); 42 | } catch (Exception e) { 43 | Log.e(LOG_TAG, e.getMessage()); 44 | } 45 | 46 | return value; 47 | 48 | } 49 | 50 | /** 51 | * Gets the data for the defined key 52 | * 53 | * @param context 54 | * Application/base context 55 | * @param key 56 | * The key to use to get the data 57 | * @param dflt 58 | * Default value of the data 59 | * 60 | * @return the value of the property, if not found it will return dflt 61 | */ 62 | public static String getString(Context context, String key, boolean dflt) { 63 | return PreferenceUtil.getString(context, key, Boolean.toString(dflt)); 64 | } 65 | 66 | /** 67 | * Gets the data for the defined key 68 | * 69 | * @param context 70 | * Application/base context 71 | * @param key 72 | * The key to use to get the data 73 | * @param dflt 74 | * Default value of the data 75 | * 76 | * @return the value of the property, if not found it will return dflt 77 | */ 78 | public static String getString(Context context, String key, Long dflt) { 79 | return PreferenceUtil.getString(context, key, Long.toString(dflt)); 80 | } 81 | 82 | /** 83 | * Gets the data for the defined key 84 | * 85 | * @param context 86 | * Application/base context 87 | * @param key 88 | * The key to use to get the data 89 | * @param dflt 90 | * Default value of the data 91 | * 92 | * @return the value of the property, if not found it will return dflt 93 | */ 94 | public static String getString(Context context, String key, Integer dflt) { 95 | return PreferenceUtil.getString(context, key, Integer.toString(dflt)); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /app/src/main/java/com/matoski/adbm/widgets/ControlWidgetProvider.java: -------------------------------------------------------------------------------- 1 | package com.matoski.adbm.widgets; 2 | 3 | import android.appwidget.AppWidgetManager; 4 | import android.appwidget.AppWidgetProvider; 5 | import android.content.ComponentName; 6 | import android.content.Context; 7 | import android.os.Bundle; 8 | import android.util.Log; 9 | 10 | import com.matoski.adbm.Constants; 11 | import com.matoski.adbm.service.ManagerService; 12 | import com.matoski.adbm.util.ArrayUtils; 13 | import com.matoski.adbm.util.ServiceUtil; 14 | 15 | /** 16 | * Used to update the widget of it's status, it notifies {@link ManagerService} if there is an update and updates the 17 | * widget with the new data. 18 | * 19 | * @author Ilija Matoski (ilijamt@gmail.com) 20 | */ 21 | public class ControlWidgetProvider extends AppWidgetProvider { 22 | 23 | /** 24 | * The tag used when logging with {@link Log} 25 | */ 26 | private static final String LOG_TAG = ControlWidgetProvider.class.getName(); 27 | 28 | /* 29 | * (non-Javadoc) 30 | * @see android.appwidget.AppWidgetProvider#onDeleted(android.content.Context, int[]) 31 | */ 32 | @Override 33 | public void onDeleted(Context context, int[] appWidgetIds) { 34 | super.onDeleted(context, appWidgetIds); 35 | Log.i(LOG_TAG, "Widget has been deleted"); 36 | } 37 | 38 | /* 39 | * (non-Javadoc) 40 | * @see android.appwidget.AppWidgetProvider#onEnabled(android.content.Context) 41 | */ 42 | @Override 43 | public void onEnabled(Context context) { 44 | super.onEnabled(context); 45 | Log.i(LOG_TAG, "Widget has been enabled"); 46 | } 47 | 48 | /* 49 | * (non-Javadoc) 50 | * @see android.appwidget.AppWidgetProvider#onDisabled(android.content.Context) 51 | */ 52 | @Override 53 | public void onDisabled(Context context) { 54 | super.onDisabled(context); 55 | Log.i(LOG_TAG, "Widget has been disabled"); 56 | } 57 | 58 | /* 59 | * (non-Javadoc) 60 | * @see android.appwidget.AppWidgetProvider#onUpdate(android.content.Context, android.appwidget.AppWidgetManager, 61 | * int[]) 62 | */ 63 | @Override 64 | public void onUpdate(Context context, AppWidgetManager appWidgetManager, 65 | int[] appWidgetIds) { 66 | super.onUpdate(context, appWidgetManager, appWidgetIds); 67 | 68 | ComponentName widget = new ComponentName(context, 69 | ControlWidgetProvider.class); 70 | 71 | int[] allWidgetsIds = appWidgetManager.getAppWidgetIds(widget); 72 | 73 | Log.d(LOG_TAG, 74 | String.format("Widget has been updated: %s", 75 | ArrayUtils.join(allWidgetsIds, ","))); 76 | 77 | Bundle bundle = new Bundle(); 78 | bundle.putIntArray(AppWidgetManager.EXTRA_APPWIDGET_IDS, allWidgetsIds); 79 | 80 | ServiceUtil.runServiceAction(context, 81 | Constants.ACTION_SERVICE_UPDATE_WIDGETS, bundle); 82 | 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /app/src/main/java/eu/chainfire/libsuperuser/Application.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package eu.chainfire.libsuperuser; 18 | 19 | import android.content.Context; 20 | import android.os.Handler; 21 | import android.widget.Toast; 22 | 23 | /** 24 | * Base application class to extend from, solving some issues with toasts and 25 | * AsyncTasks you are likely to run into 26 | */ 27 | public class Application extends android.app.Application { 28 | /** 29 | * Shows a toast message 30 | * 31 | * @param context 32 | * Any context belonging to this application 33 | * @param message 34 | * The message to show 35 | */ 36 | public static void toast(Context context, String message) { 37 | // this is a static method so it is easier to call, 38 | // as the context checking and casting is done for you 39 | 40 | if (context == null) 41 | return; 42 | 43 | if (!(context instanceof Application)) { 44 | context = context.getApplicationContext(); 45 | } 46 | 47 | if (context instanceof Application) { 48 | final Context c = context; 49 | final String m = message; 50 | 51 | ((Application) context).runInApplicationThread(new Runnable() { 52 | @Override 53 | public void run() { 54 | Toast.makeText(c, m, Toast.LENGTH_LONG).show(); 55 | } 56 | }); 57 | } 58 | } 59 | 60 | private static Handler mApplicationHandler = new Handler(); 61 | 62 | /** 63 | * Run a runnable in the main application thread 64 | * 65 | * @param r 66 | * Runnable to run 67 | */ 68 | public void runInApplicationThread(Runnable r) { 69 | mApplicationHandler.post(r); 70 | } 71 | 72 | @Override 73 | public void onCreate() { 74 | super.onCreate(); 75 | 76 | try { 77 | // workaround bug in AsyncTask, can show up (for example) when you 78 | // toast from a service 79 | // this makes sure AsyncTask's internal handler is created from the 80 | // right (main) thread 81 | Class.forName("android.os.AsyncTask"); 82 | } catch (ClassNotFoundException e) { 83 | } 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /app/src/main/java/eu/chainfire/libsuperuser/HideOverlaysReceiver.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package eu.chainfire.libsuperuser; 18 | 19 | import android.content.BroadcastReceiver; 20 | import android.content.Context; 21 | import android.content.Intent; 22 | 23 | /** 24 | *

25 | * Base receiver to extend to catch notifications when overlays should be 26 | * hidden. 27 | *

28 | *

29 | * Tapjacking protection in SuperSU prevents some dialogs from receiving user 30 | * input when overlays are present. For security reasons this notification is 31 | * only sent to apps that have previously been granted root access, so even if 32 | * your app does not require root, you still need to request 33 | * it, and the user must grant it. 34 | *

35 | *

36 | * Note that the word overlay as used here should be interpreted as "any view or 37 | * window possibly obscuring SuperSU dialogs". 38 | *

39 | */ 40 | public abstract class HideOverlaysReceiver extends BroadcastReceiver { 41 | public static final String ACTION_HIDE_OVERLAYS = "eu.chainfire.supersu.action.HIDE_OVERLAYS"; 42 | public static final String CATEGORY_HIDE_OVERLAYS = Intent.CATEGORY_INFO; 43 | public static final String EXTRA_HIDE_OVERLAYS = "eu.chainfire.supersu.extra.HIDE"; 44 | 45 | @Override 46 | public final void onReceive(Context context, Intent intent) { 47 | if (intent.hasExtra(EXTRA_HIDE_OVERLAYS)) { 48 | onHideOverlays(intent.getBooleanExtra(EXTRA_HIDE_OVERLAYS, false)); 49 | } 50 | } 51 | 52 | /** 53 | * Called when overlays should be hidden or may be shown 54 | * again. 55 | * 56 | * @param hide 57 | * Should overlays be hidden? 58 | */ 59 | public abstract void onHideOverlays(boolean hide); 60 | } 61 | -------------------------------------------------------------------------------- /app/src/main/java/eu/chainfire/libsuperuser/ShellNotClosedException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package eu.chainfire.libsuperuser; 18 | 19 | /** 20 | * Exception class used to notify developer that a shell was not close()d 21 | */ 22 | @SuppressWarnings("serial") 23 | public class ShellNotClosedException extends RuntimeException { 24 | public static final String EXCEPTION_NOT_CLOSED = "Application did not close() interactive shell"; 25 | 26 | public ShellNotClosedException() { 27 | super(EXCEPTION_NOT_CLOSED); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /app/src/main/java/eu/chainfire/libsuperuser/ShellOnMainThreadException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package eu.chainfire.libsuperuser; 18 | 19 | /** 20 | * Exception class used to crash application when shell commands are executed 21 | * from the main thread, and we are in debug mode. 22 | */ 23 | @SuppressWarnings("serial") 24 | public class ShellOnMainThreadException extends RuntimeException { 25 | public static final String EXCEPTION_COMMAND = "Application attempted to run a shell command from the main thread"; 26 | public static final String EXCEPTION_NOT_IDLE = "Application attempted to wait for a non-idle shell to close on the main thread"; 27 | public static final String EXCEPTION_WAIT_IDLE = "Application attempted to wait for a shell to become idle on the main thread"; 28 | 29 | public ShellOnMainThreadException(String message) { 30 | super(message); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /app/src/main/java/eu/chainfire/libsuperuser/StreamGobbler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2012-2014 Jorrit "Chainfire" Jongma 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package eu.chainfire.libsuperuser; 18 | 19 | import java.io.BufferedReader; 20 | import java.io.IOException; 21 | import java.io.InputStream; 22 | import java.io.InputStreamReader; 23 | import java.util.List; 24 | 25 | /** 26 | * Thread utility class continuously reading from an InputStream 27 | */ 28 | public class StreamGobbler extends Thread { 29 | /** 30 | * Line callback interface 31 | */ 32 | public interface OnLineListener { 33 | /** 34 | *

Line callback

35 | * 36 | *

This callback should process the line as quickly as possible. 37 | * Delays in this callback may pause the native process or even 38 | * result in a deadlock

39 | * 40 | * @param line String that was gobbled 41 | */ 42 | public void onLine(String line); 43 | } 44 | 45 | private String shell = null; 46 | private BufferedReader reader = null; 47 | private List writer = null; 48 | private OnLineListener listener = null; 49 | 50 | /** 51 | *

StreamGobbler constructor

52 | * 53 | *

We use this class because shell STDOUT and STDERR should be read as quickly as 54 | * possible to prevent a deadlock from occurring, or Process.waitFor() never 55 | * returning (as the buffer is full, pausing the native process)

56 | * 57 | * @param shell Name of the shell 58 | * @param inputStream InputStream to read from 59 | * @param outputList List to write to, or null 60 | */ 61 | public StreamGobbler(String shell, InputStream inputStream, List outputList) { 62 | this.shell = shell; 63 | reader = new BufferedReader(new InputStreamReader(inputStream)); 64 | writer = outputList; 65 | } 66 | 67 | /** 68 | *

StreamGobbler constructor

69 | * 70 | *

We use this class because shell STDOUT and STDERR should be read as quickly as 71 | * possible to prevent a deadlock from occurring, or Process.waitFor() never 72 | * returning (as the buffer is full, pausing the native process)

73 | * 74 | * @param shell Name of the shell 75 | * @param inputStream InputStream to read from 76 | * @param onLineListener OnLineListener callback 77 | */ 78 | public StreamGobbler(String shell, InputStream inputStream, OnLineListener onLineListener) { 79 | this.shell = shell; 80 | reader = new BufferedReader(new InputStreamReader(inputStream)); 81 | listener = onLineListener; 82 | } 83 | 84 | @Override 85 | public void run() { 86 | // keep reading the InputStream until it ends (or an error occurs) 87 | try { 88 | String line = null; 89 | while ((line = reader.readLine()) != null) { 90 | Debug.logOutput(String.format("[%s] %s", shell, line)); 91 | if (writer != null) writer.add(line); 92 | if (listener != null) listener.onLine(line); 93 | } 94 | } catch (IOException e) { 95 | } 96 | 97 | // make sure our stream is closed and resources will be freed 98 | try { 99 | reader.close(); 100 | } catch (IOException e) { 101 | } 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-hdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-hdpi/ic_clear.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher_running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-hdpi/ic_launcher_running.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher_wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-hdpi/ic_launcher_wifi.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-hdpi/play.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-hdpi/stop.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/ic_launcher_running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-ldpi/ic_launcher_running.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/ic_launcher_wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-ldpi/ic_launcher_wifi.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-ldpi/play.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-ldpi/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-ldpi/stop.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-mdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-mdpi/ic_clear.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher_running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-mdpi/ic_launcher_running.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher_wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-mdpi/ic_launcher_wifi.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-mdpi/play.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-mdpi/stop.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_action_refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-xhdpi/ic_action_refresh.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-xhdpi/ic_clear.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher_running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-xhdpi/ic_launcher_running.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher_wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-xhdpi/ic_launcher_wifi.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-xhdpi/play.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-xhdpi/stop.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_clear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-xxhdpi/ic_clear.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher_running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-xxhdpi/ic_launcher_running.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher_wifi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-xxhdpi/ic_launcher_wifi.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-xxhdpi/play.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable-xxhdpi/stop.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/rounded_corners.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 8 | 9 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/widget_preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ilijamt/android-adbm/0b563af74e92218c07ca8ced59bc01756b78cb68/app/src/main/res/drawable/widget_preview.png -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 10 | 11 | 15 | 16 | 23 | 24 | 31 | 32 | 39 | 40 | 41 | 46 | 47 | 54 | 55 | 62 | 63 | 70 | 71 | 72 | 77 | 78 | 85 | 86 | 93 | 94 | 101 | 102 | 103 | 108 | 109 | 116 | 117 | 124 | 125 | 132 | 133 | 134 | 135 | 140 | 141 | 148 | 149 | 150 | 151 | 163 | 164 | 165 | -------------------------------------------------------------------------------- /app/src/main/res/layout/base_help.xml: -------------------------------------------------------------------------------- 1 | 5 | 6 | 15 | 16 | 20 | 21 | 25 | 26 | 33 | 34 | 35 | 39 | 40 | 46 | 47 | 52 | 53 | 54 | 55 | 61 | 62 | 63 | -------------------------------------------------------------------------------- /app/src/main/res/layout/control_widget.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 19 | 20 | 31 | 32 | 42 | 43 | -------------------------------------------------------------------------------- /app/src/main/res/layout/list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 14 | 15 | 16 | 27 | -------------------------------------------------------------------------------- /app/src/main/res/layout/my_notification.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 18 | 19 | 29 | 30 | 39 | 40 | -------------------------------------------------------------------------------- /app/src/main/res/layout/wifi_list_activity.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 13 | 14 |