MCPcopy Create free account
hub / github.com/cinit/TMoe / doFindMethod

Method doFindMethod

app/src/main/java/cc/ioctl/tmoe/util/dex/DexKit.java:152–171  ·  view source on GitHub ↗

Run the dex deobfuscation. This method may take a long time and should only be called in background thread. @param i the dex method index @return target method descriptor, null if the target is not found.

(int i)

Source from the content-addressed store, hash-verified

150 * @return target method descriptor, null if the target is not found.
151 */
152 @Nullable
153 public static Method doFindMethod(int i) {
154 if (i / 10000 == 0) {
155 throw new IllegalStateException("Index " + i + " attempted to access method!");
156 }
157 DexMethodDescriptor m = doFindMethodDesc(i);
158 if (m == null) {
159 return null;
160 }
161 if (m.name.equals("<init>") || m.name.equals("<clinit>")) {
162 Utils.logi("doFindMethod(" + i + ") methodName == " + m.name + " , return null");
163 return null;
164 }
165 try {
166 return m.getMethodInstance(Initiator.getHostClassLoader());
167 } catch (NoSuchMethodException e) {
168 Utils.loge(e);
169 return null;
170 }
171 }
172
173 /**
174 * Try to load the obfuscated method from deobfuscation cache. This method does not take much time and may be called

Callers 1

prepareForMethod · 0.95

Calls 6

doFindMethodDescMethod · 0.95
logiMethod · 0.95
getMethodInstanceMethod · 0.95
getHostClassLoaderMethod · 0.95
logeMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected