Skip to content
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

Ability to recompile and preview smali file into java #159

Open
MonkoftheFunk opened this issue Feb 14, 2022 · 7 comments
Open

Ability to recompile and preview smali file into java #159

MonkoftheFunk opened this issue Feb 14, 2022 · 7 comments
Labels
feature New feature or request open-for-contribution

Comments

@MonkoftheFunk
Copy link

Feature: I've gotten used to using apktoolm on my android device because it allows me to edit smali then preview the java to confirm my code and variables are correct. It won't convert if there is an error, and it shows me the error in my smali file. Thank-you

@Surendrajat
Copy link
Member

I wasn't aware of this app and this feature, so thanks for letting me know. I agree, it's a really neat feature and it makes perfect sense in APKLab.
However, this app seems to be closed-source and the smali to java conversion code is obfuscated. Jadx has this single class decompiling feature too, but it won't work without recompilation which defeats the purpose.
I will look into in free time but if you know such a tool or library that does the conversion, let me know.

@Surendrajat Surendrajat added feature New feature or request help wanted Extra attention is needed labels Mar 4, 2022
@MonkoftheFunk
Copy link
Author

Will do, thanks for looking into it, I'll look around, ya I meant to try to decompile it to see how it worked, maybe then to java again to get better idea.

@MonkoftheFunk
Copy link
Author

Found it
Looking in apktoolm found smali2java.java
Which led me to a vscode extension
github.com/only52607/smali2java
Might be worth bundling in

@Surendrajat
Copy link
Member

Surendrajat commented Mar 5, 2022

@MonkoftheFunk so it just uses Jadx. Cool. I never knew Jadx accepted smali files too. It seems trivial to implement now. Will try to open a PR soon.

@Surendrajat Surendrajat removed the help wanted Extra attention is needed label Mar 5, 2022
@Surendrajat Surendrajat self-assigned this Mar 5, 2022
@MonkoftheFunk
Copy link
Author

how goes it?

@Surendrajat
Copy link
Member

Surendrajat commented Mar 19, 2023

Hi. First, apologies for very late response. I started working on it but got distracted, and eventually lost interest.
However, now I'm unsure if I should add it at all when the other extension exists. Ideally, we can just send a PR to https://github.com/only52607/smali2java so that it picks up Jadx path set by APKLab and you can use it without adding path again. But that depends on @only52607 if he's open to such change. Let me know if there'll be any issue with this approach btw.
If not, then I'm open to community contribution, as I can't afford much time for now.

@MonkoftheFunk
Copy link
Author

I hear ya, thanks so much for the update and the work around!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request open-for-contribution
Projects
None yet
Development

No branches or pull requests

2 participants