Apktool
Apktool copied to clipboard
Getters and setters for private fields/methods changed from access$ to -get / -wrap
I noticed that on Android N, the naming changed. Tried it on an HTC10 build and also on an CM14, both have the new naming.
Tried to compile an own apk then with SDK25 but still get the old access$ naming.
Any idea how to get the new naming to work on own compiled apks? Or is it possible to add a switch to get the old naming back?
Don't think it's related to android sdk, LG decompiled apps have -get(), -wrap() and -set() methods since api 23.
Wondering too how that can be achieved though..
@xpirt Do you always rename it to the new naming or use the old "access$" onces? Should still work I assume.
I usually leave them as they are, but yes renaming them makes it more readable and they don't break anything.
It seems that there's a new nice toolchain which generates those new getters/setters, it is called Jack.
Jack is a new Android toolchain that compiles Java source into Android dex bytecode. It replaces the previous Android toolchain, which consists of multiple tools, such as javac, ProGuard, jarjar, and dx.
https://source.android.com/source/jack.html
yepp @JesusFreke told me that yesterday too. https://github.com/JesusFreke/smali/issues/475
Thanks for the research on this. I'll mark as upstream since it appears this is something smali will need to patch.
4+ year update. Upstream ticket is still open. Tagged as "smali"
It appears after almost 8~ years. I am going to close this. The original notice was presumably because diff/changes were easy to notice as the world moved from a combination of javac/dx to jack.
Then like a few years later - AOSP realized that it was better to stay true to javac/dx to keep in line with language features and deprecated jack and went back. https://android-developers.googleblog.com/2017/03/future-of-java-8-language-feature.html
So now at this point with Google forking JesusFreke's smali which had this request in backlog as well for 8 years - it seems its safe to close this.