android: Update DvmClass.findNativeFunction
@@ -233,7 +233,10 @@ public class DvmClass extends DvmObject<Class<?>> {
UnidbgPointer findNativeFunction(Emulator<?> emulator, String method) {
UnidbgPointer fnPtr = nativesMap.get(method);
int index = method.indexOf('(');
- if (fnPtr == null && index != -1) {
+ if (fnPtr == null && index == -1) {
+ index = method.length();
+ }
+ if (fnPtr == null) {
String symbolName = "Java_" + getClassName().replace("_", "_1").replace('/', '_') + "_" + method.substring(0, index);
for (Module module : emulator.getMemory().getLoadedModules()) {
Symbol symbol = module.findSymbolByName(symbolName, false);
