├── settings.gradle ├── wiseKit ├── src │ └── main │ │ ├── res │ │ ├── values │ │ │ ├── strings.xml │ │ │ ├── dimens.xml │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ ├── drawable │ │ │ ├── loading_bg.9.png │ │ │ ├── search_box_bg.xml │ │ │ ├── dialog_loading.xml │ │ │ └── color_progressbar.xml │ │ ├── mipmap-xxhdpi │ │ │ ├── delete.png │ │ │ ├── search.png │ │ │ └── return_jiao.png │ │ ├── mipmap │ │ │ └── dialog_loading_img.png │ │ └── layout │ │ │ ├── activity_base.xml │ │ │ ├── fragment_activity_base.xml │ │ │ ├── fragment_base.xml │ │ │ ├── activity_webview_base.xml │ │ │ ├── dialog_loading.xml │ │ │ └── base_top_view.xml │ │ ├── AndroidManifest.xml │ │ └── java │ │ └── com │ │ └── wise │ │ └── wisekit │ │ ├── dialog │ │ └── LoadingDialog.java │ │ ├── widget │ │ └── SearchEditText.java │ │ ├── activity │ │ ├── BaseFragmentActivity.java │ │ └── BaseActivity.java │ │ ├── fragment │ │ └── BaseFragment.java │ │ └── utils │ │ ├── SPUtils.java │ │ └── DateUtils.java ├── proguard-rules.pro ├── build.gradle └── wiseKit.iml ├── app ├── src │ └── main │ │ ├── res │ │ ├── drawable │ │ │ ├── ic_red.png │ │ │ ├── ic_black.png │ │ │ ├── ic_launcher.png │ │ │ ├── button_background.xml │ │ │ └── ic_launcher_background.xml │ │ ├── mipmap-xxhdpi │ │ │ ├── switch_on.png │ │ │ └── switch_off.png │ │ ├── values │ │ │ ├── dimens.xml │ │ │ ├── colors.xml │ │ │ ├── styles.xml │ │ │ └── strings.xml │ │ └── layout │ │ │ ├── activity_log.xml │ │ │ ├── log_list_item.xml │ │ │ ├── actionbar_indeterminate_progress.xml │ │ │ ├── activity_set_password.xml │ │ │ ├── list_item.xml │ │ │ ├── activity_main.xml │ │ │ ├── activity_set_button.xml │ │ │ └── activity_serial_port.xml │ │ ├── java │ │ └── com │ │ │ └── RRG │ │ │ └── usbninja │ │ │ ├── LogInfo.java │ │ │ ├── app │ │ │ └── MainApplication.java │ │ │ ├── SetPasswordActivity.java │ │ │ ├── ButtonModel.java │ │ │ ├── config │ │ │ └── ConfigInfo.java │ │ │ ├── ble │ │ │ ├── ConvertData.java │ │ │ ├── BluetoothLe.java │ │ │ └── HolloBluetooth.java │ │ │ ├── LogActivity.java │ │ │ ├── SetButtonActivity.java │ │ │ ├── MainActivity.java │ │ │ └── SerialPortActivity.java │ │ └── AndroidManifest.xml ├── proguard-rules.pro ├── build.gradle └── app.iml ├── .idea └── vcs.xml ├── README.txt ├── USBNinja.iml ├── gradlew.bat └── gradlew /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app', ':wiseKit' 2 | -------------------------------------------------------------------------------- /wiseKit/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | WiseKit 3 | 4 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_red.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/USBNinjaRRG/USBNinja-android/HEAD/app/src/main/res/drawable/ic_red.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/USBNinjaRRG/USBNinja-android/HEAD/app/src/main/res/drawable/ic_black.png -------------------------------------------------------------------------------- /app/src/main/res/drawable/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/USBNinjaRRG/USBNinja-android/HEAD/app/src/main/res/drawable/ic_launcher.png -------------------------------------------------------------------------------- /wiseKit/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/switch_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/USBNinjaRRG/USBNinja-android/HEAD/app/src/main/res/mipmap-xxhdpi/switch_on.png -------------------------------------------------------------------------------- /app/src/main/res/mipmap-xxhdpi/switch_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/USBNinjaRRG/USBNinja-android/HEAD/app/src/main/res/mipmap-xxhdpi/switch_off.png -------------------------------------------------------------------------------- /wiseKit/src/main/res/drawable/loading_bg.9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/USBNinjaRRG/USBNinja-android/HEAD/wiseKit/src/main/res/drawable/loading_bg.9.png -------------------------------------------------------------------------------- /wiseKit/src/main/res/mipmap-xxhdpi/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/USBNinjaRRG/USBNinja-android/HEAD/wiseKit/src/main/res/mipmap-xxhdpi/delete.png -------------------------------------------------------------------------------- /wiseKit/src/main/res/mipmap-xxhdpi/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/USBNinjaRRG/USBNinja-android/HEAD/wiseKit/src/main/res/mipmap-xxhdpi/search.png -------------------------------------------------------------------------------- /wiseKit/src/main/res/mipmap-xxhdpi/return_jiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/USBNinjaRRG/USBNinja-android/HEAD/wiseKit/src/main/res/mipmap-xxhdpi/return_jiao.png -------------------------------------------------------------------------------- /wiseKit/src/main/res/mipmap/dialog_loading_img.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/USBNinjaRRG/USBNinja-android/HEAD/wiseKit/src/main/res/mipmap/dialog_loading_img.png -------------------------------------------------------------------------------- /app/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 16sp 5 | 6 | 7 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /wiseKit/src/main/res/drawable/search_box_bg.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #3F51B5 4 | #303F9F 5 | #ff4081 6 | 7 | #123123 8 | 9 | -------------------------------------------------------------------------------- /wiseKit/src/main/res/values/dimens.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 16dp 4 | 16dp 5 | 45dp 6 | 18sp 7 | 8 | 9 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_log.xml: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /app/src/main/java/com/RRG/usbninja/LogInfo.java: -------------------------------------------------------------------------------- 1 | package com.RRG.usbninja; 2 | 3 | public class LogInfo { 4 | 5 | private String type; 6 | private String content; 7 | 8 | public String getType() { 9 | return type; 10 | } 11 | 12 | public void setType(String type) { 13 | this.type = type; 14 | } 15 | 16 | public String getContent() { 17 | return content; 18 | } 19 | 20 | public void setContent(String content) { 21 | this.content = content; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /app/src/main/res/drawable/button_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /wiseKit/src/main/res/layout/activity_base.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 10 | 11 | 15 | 16 | -------------------------------------------------------------------------------- /README.txt: -------------------------------------------------------------------------------- 1 | USBNinja Bluetooth Android Remote Control Open Source Project 2 | 3 | The USBNinja is a USB Cable that embedded an BADUSB in it. It has 6KB Flash Memory in it to store your own payload. 4 | These payloads can be triggered by a Bluetooth Remote Control or this Application. The Cable can simulate itself to an 5 | HID-Keyboard or an HID-Mouse to Control your computer. 6 | 7 | For more information, please visit: https://usbninja.com 8 | 9 | This project can let the user control their Cable easily without their Remote Control Hardware. It`s very useful when the 10 | Hardware is lost or have no battery. -------------------------------------------------------------------------------- /wiseKit/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | #导航栏背景颜色 5 | #0d61e0 6 | 7 | #导航栏颜色 8 | #FFFFFF 9 | 10 | #背景颜色 11 | #e6e6e6 12 | 13 | #分割线颜色 14 | #bfbfbf 15 | 16 | #tab bar 选中字体颜色 17 | #ea9518 18 | 19 | #tab bar 未选中字体颜色 20 | #515151 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /wiseKit/src/main/res/drawable/dialog_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /wiseKit/src/main/res/layout/fragment_activity_base.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 11 | 12 | 16 | 17 | -------------------------------------------------------------------------------- /wiseKit/src/main/res/layout/fragment_base.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 11 | 12 | 17 | 18 | -------------------------------------------------------------------------------- /wiseKit/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /app/src/main/res/layout/log_list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/java/com/RRG/usbninja/app/MainApplication.java: -------------------------------------------------------------------------------- 1 | package com.RRG.usbninja.app; 2 | 3 | import android.app.Application; 4 | import android.content.Context; 5 | 6 | import com.RRG.usbninja.LogInfo; 7 | 8 | import java.util.ArrayList; 9 | 10 | public class MainApplication extends Application { 11 | 12 | private static final String TAG = MainApplication.class.getName(); 13 | 14 | public static MainApplication instance; 15 | 16 | public ArrayList logList = new ArrayList<>(); 17 | 18 | //get Application Context 19 | public static Context getAppContext() { 20 | return instance.getApplicationContext(); 21 | } 22 | 23 | @Override 24 | public void onCreate() { 25 | super.onCreate(); 26 | 27 | instance = this; 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /wiseKit/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # You can control the set of applied configuration files using the 3 | # proguardFiles setting in build.gradle. 4 | # 5 | # For more details, see 6 | # http://developer.android.com/guide/developing/tools/proguard.html 7 | 8 | # If your project uses WebView with JS, uncomment the following 9 | # and specify the fully qualified class name to the JavaScript interface 10 | # class: 11 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 12 | # public *; 13 | #} 14 | 15 | # Uncomment this to preserve the line number information for 16 | # debugging stack traces. 17 | #-keepattributes SourceFile,LineNumberTable 18 | 19 | # If you keep the line number information, uncomment this to 20 | # hide the original source file name. 21 | #-renamesourcefileattribute SourceFile 22 | -------------------------------------------------------------------------------- /wiseKit/src/main/res/layout/activity_webview_base.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 14 | 15 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /USBNinja.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /wiseKit/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.library' 2 | 3 | android { 4 | compileSdkVersion 28 5 | 6 | 7 | 8 | defaultConfig { 9 | minSdkVersion 18 10 | targetSdkVersion 28 11 | versionCode 1 12 | versionName "1.0" 13 | 14 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 15 | 16 | } 17 | 18 | buildTypes { 19 | release { 20 | minifyEnabled false 21 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 22 | } 23 | } 24 | buildToolsVersion '28.0.3' 25 | } 26 | 27 | dependencies { 28 | implementation fileTree(dir: 'libs', include: ['*.jar']) 29 | 30 | implementation 'com.android.support:appcompat-v7:27.1.1' 31 | testImplementation 'junit:junit:4.12' 32 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 33 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 34 | } 35 | -------------------------------------------------------------------------------- /wiseKit/src/main/res/drawable/color_progressbar.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | USBNinja 3 | BLE is not supported 4 | Data: 5 | Device address: 6 | State: 7 | No data 8 | Connected 9 | Disconnected 10 | Bluetooth not supported. 11 | Wake Up 12 | Unknown device 13 | Unknown characteristic 14 | Unknown service 15 | 16 | Connect 17 | Disconnect 18 | Scan 19 | Stop 20 | 21 | -------------------------------------------------------------------------------- /app/src/main/res/layout/actionbar_indeterminate_progress.xml: -------------------------------------------------------------------------------- 1 | 16 | 20 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_set_password.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 12 | 13 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /app/src/main/res/layout/list_item.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 16 | 20 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | 5 | compileSdkVersion 28 6 | defaultConfig { 7 | applicationId "com.RRG.usbninja" 8 | minSdkVersion 18 9 | targetSdkVersion 28 10 | versionCode 1 11 | versionName "1.1" 12 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | debuggable false 19 | jniDebuggable false 20 | renderscriptDebuggable false 21 | pseudoLocalesEnabled true 22 | } 23 | } 24 | buildToolsVersion '28.0.3' 25 | } 26 | 27 | dependencies { 28 | implementation fileTree(include: ['*.jar'], dir: 'libs') 29 | implementation project(':wiseKit') 30 | implementation 'com.android.support:appcompat-v7:28.0.0' 31 | implementation 'com.android.support.constraint:constraint-layout:1.1.3' 32 | testImplementation 'junit:junit:4.12' 33 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 34 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 35 | } 36 | -------------------------------------------------------------------------------- /wiseKit/src/main/res/layout/dialog_loading.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 19 | 20 | 28 | 29 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /app/src/main/java/com/RRG/usbninja/SetPasswordActivity.java: -------------------------------------------------------------------------------- 1 | package com.RRG.usbninja; 2 | 3 | import android.os.Bundle; 4 | import android.view.LayoutInflater; 5 | import android.view.View; 6 | import android.widget.EditText; 7 | import android.widget.Toast; 8 | 9 | import com.RRG.usbninja.config.ConfigInfo; 10 | import com.wise.wisekit.activity.BaseActivity; 11 | 12 | public class SetPasswordActivity extends BaseActivity { 13 | 14 | private EditText mPasswordEditText; 15 | 16 | @Override 17 | protected void onCreate(Bundle savedInstanceState) { 18 | super.onCreate(savedInstanceState); 19 | LayoutInflater.from(this).inflate(R.layout.activity_set_password, topContentView); 20 | 21 | initView(); 22 | 23 | } 24 | 25 | private void initView() { 26 | 27 | topLeftBtn.setVisibility(View.VISIBLE); 28 | topRightBtn.setVisibility(View.VISIBLE); 29 | 30 | mPasswordEditText = findViewById(R.id.password); 31 | 32 | setTitle("Set Password"); 33 | setRightText("Done"); 34 | 35 | topRightBtn.setOnClickListener(new View.OnClickListener() { 36 | @Override 37 | public void onClick(View view) { 38 | 39 | //Password 40 | if (mPasswordEditText.getText().toString().length() == 0) { 41 | Toast.makeText(SetPasswordActivity.this, "Please enter the password for the connection",Toast.LENGTH_SHORT).show(); 42 | return; 43 | } 44 | 45 | ConfigInfo.getInstance().setPassword(mPasswordEditText.getText().toString()); 46 | 47 | finish(); 48 | } 49 | }); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /app/src/main/res/layout/activity_main.xml: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 18 | 19 |