xiongzhu 10 сар өмнө
parent
commit
51fe896c23

+ 14 - 0
app/src/main/java/com/example/modifiermodule/Hook13.java

@@ -119,6 +119,13 @@ public class Hook13 extends BaseHook {
                     param.setResult(getProperty(PROP_IMEI, ""));
                 }
             });
+            XposedHelpers.findAndHookMethod(PhoneInterfaceManager, "getDeviceIdForPhone", String.class, new XC_MethodHook() {
+                @Override
+                protected void beforeHookedMethod(MethodHookParam param) {
+                    log("spoof PhoneInterfaceManager.getDeviceId");
+                    param.setResult(getProperty(PROP_IMEI, ""));
+                }
+            });
         } catch (Exception e) {
             e.printStackTrace();
         }
@@ -206,6 +213,13 @@ public class Hook13 extends BaseHook {
                     param.setResult(getProperty(PROP_IMSI, ""));
                 }
             });
+            XposedHelpers.findAndHookMethod(PhoneSubInfoController, "getDeviceIdForPhone", int.class, String.class, String.class, new XC_MethodHook() {
+                @Override
+                protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
+                    log("spoof PhoneSubInfoController.getDeviceIdForPhone");
+                    param.setResult(getProperty(PROP_IMEI, ""));
+                }
+            });
         } catch (Exception e) {
             e.printStackTrace();
         }