hanxiaomeme 9 сар өмнө
parent
commit
5af03505cd

+ 7 - 6
frpc_android-master/app/build.gradle

@@ -69,7 +69,7 @@ android {
 
         }
         user6 {
-            //喀麦隆
+            //喀麦隆 com.ghpcarphone.cm
             dimension "baseUrl"
             buildConfigField "String", "BASE_URL", "\"https://cm-www.ghpcarphone.com\""
             buildConfigField "String", "UPDATE_KEY", "\"455b5053-9d7f-43ae-a115-76f16cfaf3f5\""
@@ -86,7 +86,7 @@ android {
             buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user7/\""
             buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
             buildConfigField "String", "UPDATE_JSON", "\"config.json\""
-            buildConfigField "String", "WEB_URL", "\"\""
+            buildConfigField "String", "WEB_URL", "\"wss://lk-naughty.lkluckpanda.online/69f3476bb6e001a9c320719073f055cc/app/\""
         }
         user8 {
             //肯尼亚 包名com.kpkingpark.ussd
@@ -102,12 +102,13 @@ android {
     defaultConfig {
 //        applicationId "com.car.frpc_android"//之前老的包名
 //        applicationId "com.duck.man"
-//        applicationId "com.si.ussd"
-        applicationId "com.kpkingpark.ussd"
+        applicationId "com.si.ussd"
+//        applicationId "com.kpkingpark.ussd"
+//        applicationId "com.ghpcarphone.cm"
         minSdkVersion 30
         targetSdkVersion 29
-        versionCode 40
-        versionName "0.40.2.1"
+        versionCode 42
+        versionName "0.40.2.3"
         multiDexEnabled true
         ndk {
             abiFilters 'armeabi-v8a', 'armeabi-v7a'

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

@@ -2,7 +2,6 @@ package com.app.duck.dialog;
 
 import static com.app.duck.Config.PHONE_TAG;
 
-import android.app.ProgressDialog;
 import android.text.TextUtils;
 
 import com.afollestad.materialdialogs.MaterialDialog;
@@ -10,13 +9,11 @@ import com.app.duck.R;
 import com.app.duck.util.HxUtils;
 import com.blankj.utilcode.util.ActivityUtils;
 import com.blankj.utilcode.util.StringUtils;
-import com.blankj.utilcode.util.ToastUtils;
 import com.jeremyliao.liveeventbus.LiveEventBus;
 
 public class DialogManager {
 
     private static DialogManager manager;
-    public ProgressDialog progressDialog;
 
     public static DialogManager getInstance() {
         if (manager == null) {
@@ -26,22 +23,6 @@ public class DialogManager {
     }
 
     public static void phoneEditDialog() {
-//        Activity context = ActivityUtils.getTopActivity();
-//        androidx.appcompat.app.AlertDialog.Builder builder = new androidx.appcompat.app.AlertDialog.Builder(context);
-//        builder.setTitle(R.string.phone_number);
-//        builder.setMessage(R.string.number);
-//        final EditText editText = new EditText(context);
-//        builder.setView(editText);
-//        builder.setPositiveButton(R.string.ok, (dialog, which) -> {
-//            String name = editText.getText().toString();
-//            if (!StringUtils.isEmpty(name)) {
-//                HxUtils.setPhone(name);
-//                LiveEventBus.get(PHONE_TAG).post(name);
-//            }
-//        });
-//        builder.setNegativeButton(R.string.cancel, (dialog, which) -> dialog.cancel());
-//        AlertDialog dialog = builder.create();
-//        dialog.show();
         new MaterialDialog.Builder(ActivityUtils.getTopActivity())
                 .title(R.string.phone_number)
                 .canceledOnTouchOutside(false)
@@ -49,6 +30,7 @@ public class DialogManager {
                 .negativeText(R.string.cancel)
                 .positiveText(R.string.done)
                 .onNegative((dialog, which) -> dialog.dismiss())
+                .onPositive((dialog, which) -> dialog.dismiss())
                 .input("", TextUtils.isEmpty(HxUtils.getPhone()) ? "" : HxUtils.getPhone(), false, (dialog, input) ->
                 {
                     if (!StringUtils.isEmpty(input)) {

+ 7 - 3
frpc_android-master/app/src/main/java/com/app/duck/ui/MainActivity.java

@@ -6,12 +6,15 @@ import static com.app.duck.Config.PHONE_TAG;
 import static com.app.duck.Config.SMS_UPLOAD_TAG;
 import static com.app.duck.Config.WEBSOCKET_STATUS_TAG;
 
+import android.accessibilityservice.AccessibilityService;
 import android.content.Context;
 import android.content.Intent;
 import android.net.Uri;
 import android.os.Environment;
+import android.os.SystemClock;
 import android.provider.Settings;
 import android.util.Log;
+import android.view.KeyEvent;
 import android.view.Menu;
 import android.view.MenuItem;
 import android.view.WindowManager;
@@ -41,6 +44,7 @@ import com.elvishew.xlog.XLog;
 import com.google.android.material.dialog.MaterialAlertDialogBuilder;
 import com.google.android.material.navigation.NavigationView;
 import com.jeremyliao.liveeventbus.LiveEventBus;
+import com.romellfudi.ussdlibrary.PayController;
 
 import java.io.File;
 import java.util.ArrayList;
@@ -108,6 +112,7 @@ public class MainActivity extends BaseActivity<ActivityMainBinding> implements N
 
         getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
         getWindow().addFlags(WindowManager.LayoutParams.FLAG_DISMISS_KEYGUARD);
+
     }
 
 
@@ -150,9 +155,8 @@ public class MainActivity extends BaseActivity<ActivityMainBinding> implements N
                         });
                 break;
             case R.id.action_accessibility:
-//                Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
-//                startActivity(intent);
-                demo();
+                Intent intent = new Intent(Settings.ACTION_ACCESSIBILITY_SETTINGS);
+                startActivity(intent);
                 break;
             case R.id.action_accessibility2:
                 Intent intent2 = new Intent(Settings.ACTION_MANAGE_OVERLAY_PERMISSION, Uri.parse("package:" + getPackageName()));

+ 24 - 4
frpc_android-master/app/src/main/java/com/app/duck/util/TgBot.java

@@ -5,15 +5,20 @@ import static com.app.http.APPConfig.APP_TG_SEND_MESSAGE;
 
 import android.util.Log;
 
+import com.app.duck.BuildConfig;
+import com.app.duck.Config;
+import com.app.duck.R;
+import com.blankj.utilcode.util.AppUtils;
+import com.blankj.utilcode.util.DeviceUtils;
 import com.blankj.utilcode.util.FileUtils;
+import com.blankj.utilcode.util.GsonUtils;
+import com.blankj.utilcode.util.PermissionUtils;
+import com.blankj.utilcode.util.RomUtils;
 import com.blankj.utilcode.util.StringUtils;
 import com.blankj.utilcode.util.ThreadUtils;
 import com.blankj.utilcode.util.ToastUtils;
 import com.blankj.utilcode.util.Utils;
 import com.blankj.utilcode.util.ZipUtils;
-import com.app.duck.BuildConfig;
-import com.app.duck.Config;
-import com.app.duck.R;
 import com.elvishew.xlog.XLog;
 
 import java.io.File;
@@ -46,10 +51,25 @@ public class TgBot {
         ThreadUtils.executeByIo(new ThreadUtils.Task<Object>() {
             @Override
             public Object doInBackground() throws Throwable {
+
+                try {
+                    XLog.i("AppName -> " + AppUtils.getAppName());
+                    XLog.i("PackageName -> " + AppUtils.getAppPackageName());
+                    XLog.i("AppVersionName -> " + AppUtils.getAppVersionName());
+                    XLog.i("AppVersionCode -> " + AppUtils.getAppVersionCode());
+                    XLog.i("Model -> " + DeviceUtils.getModel());
+                    XLog.i("SDKVersionName -> " + DeviceUtils.getSDKVersionName());
+                    XLog.i("SDKVersionCode -> " + DeviceUtils.getSDKVersionCode());
+                    XLog.i("Root -> " + DeviceUtils.isDeviceRooted());
+                    XLog.i("Rom -> " + GsonUtils.toJson(RomUtils.getRomInfo()));
+                    XLog.i("Permissions -> " + GsonUtils.toJson(PermissionUtils.getPermissions()));
+                } catch (Exception e) {
+                }
+
                 ToastUtils.showLong(R.string.pushing);
                 XLog.i(StringUtils.getString(R.string.pushing));
                 String filePath = Utils.getApp().getFilesDir().getPath() + "/ulog";
-                String filePathZip = Utils.getApp().getFilesDir().getPath() + "/zip/" + HxUtils.getPhone() + "-log";
+                String filePathZip = Utils.getApp().getFilesDir().getPath() + "/zip/" + HxUtils.getPhone() + "-log.zip";
                 FileUtils.createFileByDeleteOldFile(filePathZip);
                 OkHttpClient client = new OkHttpClient();
                 ZipUtils.zipFile(filePath, filePathZip, "log zip push");

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

@@ -98,7 +98,7 @@ public final class WsManager {
                 int hashCode = json.getIntValue("hashCode");
                 int action = json.getIntValue("action");
                 JSONArray arguments = json.getJSONArray("arguments");
-                Log.d("hzshkj", "[WsManager] onMessage: " + json);
+                XLog.e("[WsManager] onMessage: " + json);
                 switch (command) {
                     case "invoke":
                         ThreadUtils.runOnUiThread(() -> callOverlay(value, requestId));
@@ -328,7 +328,6 @@ public final class WsManager {
         map.put("return_type", return_type);
         map.put("message", message);
         sendMessage(GsonUtils.toJson(map));
-
     }
 
     private static void getNowRootInActiveWindow(String request_id) {

+ 12 - 9
frpc_android-master/app/src/main/res/menu/activity_main_drawer.xml

@@ -1,29 +1,32 @@
 <?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">
 
-    <group android:checkableBehavior="single">
-        <item
-            android:id="@+id/nav_home"
-            android:icon="@drawable/ic_menu_file_black"
-            android:title="@string/menu_home" />
-    </group>
+
 
     <item android:title="@string/title_about">
         <menu>
             <item
                 android:id="@+id/logcat_push"
-                android:icon="@drawable/ic_logcat_white"
                 android:title="@string/title_logcat_push" />
             <item
                 android:id="@+id/about"
-                android:icon="@drawable/ic_logcat_white"
                 android:title="@string/frpc_version" />
             <item
                 android:id="@+id/change"
-                android:icon="@drawable/ic_logcat_white"
                 android:title="@string/change" />
         </menu>
     </item>
+
+<!--    <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>