Comments (3)
I did some more digging and I'm not a developer so this is me trying to understand something that I dont,
Appears that something around here is causing the issue:
Line 118 in 3e4728e
I had CHATGPT try to analyze this and it said this might work. I dont have time to figure out how to fork/modify/compile and run this, so figured I'd share here in case someone could help and validate that the error is not user error and that the injection can be modified somehow to work?
for entrypoint in entrypoints:
idx = 0
while idx != len(text):
line = text[idx].strip()
if line.startswith('.method') and entrypoint in line:
if ".locals " in text[idx + 1]:
locals_line_bit = text[idx + 1].split(".locals ")
if len(locals_line_bit) > 1:
try:
locals_variable_count = min(int(locals_line_bit[1]), 15)
locals_line_bit[1] = str(locals_variable_count + 1)
if load_library_name.startswith('lib'):
load_library_name = load_library_name[3:]
text[idx + 1] = ".locals ".join(locals_line_bit)
text.insert(idx + 2,
f" invoke-static {{v{locals_variable_count}}}, "
"Ljava/lang/System;->loadLibrary(Ljava/lang/String;)V")
text.insert(idx + 2,
f" const-string v{locals_variable_count}, "
f"\"{load_library_name}\"")
status = True
except ValueError:
# Handle the case where conversion to int fails
pass
break
idx += 1
Here is the decompiled code that it seems to be trying to inject into, if helpful context:
package crc642612969569d7a084;
import android.os.Bundle;
import java.util.ArrayList;
import mono.android.IGCUserPeer;
import mono.android.Runtime;
import mono.android.TypeManager;
/* loaded from: classes.dex */
public class WelcomeActivity extends SussmanActivity implements IGCUserPeer {
public static final String __md_methods = "n_onCreate:(Landroid/os/Bundle;)V:GetOnCreate_Landroid_os_Bundle_Handler\nn_onResume:()V:GetOnResumeHandler\n";
private ArrayList refList;
private native void n_onCreate(Bundle bundle);
private native void n_onResume();
static {
Runtime.register("Sussman.Droid.WelcomeActivity, Sussman.Droid", WelcomeActivity.class, __md_methods);
}
public WelcomeActivity() {
if (getClass() == WelcomeActivity.class) {
TypeManager.Activate("Sussman.Droid.WelcomeActivity, Sussman.Droid", "", this, new Object[0]);
}
}
public WelcomeActivity(int i) {
super(i);
if (getClass() == WelcomeActivity.class) {
TypeManager.Activate("Sussman.Droid.WelcomeActivity, Sussman.Droid", "System.Int32, mscorlib", this, new Object[]{Integer.valueOf(i)});
}
}
@Override // androidx.fragment.app.FragmentActivity, androidx.activity.ComponentActivity, androidx.core.app.ComponentActivity, android.app.Activity
public void onCreate(Bundle bundle) {
n_onCreate(bundle);
}
@Override // androidx.fragment.app.FragmentActivity, android.app.Activity
public void onResume() {
n_onResume();
}
@Override // crc642612969569d7a084.SussmanActivity, mono.android.IGCUserPeer
public void monodroidAddReference(Object obj) {
if (this.refList == null) {
this.refList = new ArrayList();
}
this.refList.add(obj);
}
@Override // crc642612969569d7a084.SussmanActivity, mono.android.IGCUserPeer
public void monodroidClearReferences() {
ArrayList arrayList = this.refList;
if (arrayList != null) {
arrayList.clear();
}
}
}
from frida-gadget.
APK i'm trying to figure out how it interfaces with a Steam Generator in my home. https://m.apkpure.com/mrsteam-steamlinx-mobile-app/com.geckoportal.mrsteam
from frida-gadget.
@Austin1
Thanks for providing detailed bug reports! 👍
I fixed the issue and deployed version 1.3.5 now.
Kindly update to the latest version and verify its functionality:
pip install frida-gadget --upgrade
from frida-gadget.
Related Issues (12)
- OnCreate error HOT 1
- invalid resource directory name: (apktool issue)
- Exception: Not Found, target class file: LoginActivity.smali HOT 1
- Missing directory results in FileNotFoundError
- Invalid register error HOT 1
- not work againt apk protected by jiagu HOT 5
- Application won't start after gadget injection HOT 2
- Seems not working for Apple Silicon processor HOT 1
- application did not start after injection - Unity VR project apk on Meta Quest 3 HOT 4
- Smali over register HOT 1
- AttributeError: 'NoneType' object has no attribute 'replace' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from frida-gadget.