-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[gui] Why not add code editing features #2215
Comments
As far as I know no such feature is planned. May be because decompiling, editing and recompiling is 100 times more difficult to implement. For simple APK files you can use the function "Save as gradle project" which will create a project that you can compile using Android SDK. For more complex apps I strongly recommend to use apktool. |
@jpstotz what if we only compile one java method at a time (not recompile the entire project, nor the entire class). If we consider how .smali files are structeredn all methods are independant from each others, so each method would still compile fine even when it's isolated. For example say we have a class Example package com.example;
public class Example {
int field1;
Object field2;
// ...
String field_n;
public void targetMethod() {
System.out.println("To be edited");
}
public void methodOne() {
// Very long body
}
public void methodTwo() {
// ...
}
public void methodThree() {
// ...
}
// and so on
} Say the user would finish editing "targetMethod", Jadx would isolate the method in an internal temp .java file like this package com.example;
public class Example {
int field1;
Object field2;
// ...
String field_n;
public void targetMethod() {
System.out.println("Editing finished");
}
} It would also convert other compiled files to some And then compile with the command
Then convert it using The only problem that remains to be solved is for invalid java class and method names (like those starting with digits) which will cause compilation error, maybe we'd do some naming convention that replaces the names back afterwards, but I'm sure it's solvable. Let's have a minimal working example first. I can give it a shot if you confirm that it may be added |
In general you are correct for Java and class files but Jadx doesn't work on class files, but DEX files. I just outline the problems for modifying Android code as this is the main purpose of Jadx. Complexity increases when different source formats have to be considered.
|
Issue details
Is it a problem with the positioning of the software?
Jadx version
1.5
Java version
12
OS
The text was updated successfully, but these errors were encountered: