Does kotlin emit different bytecode for both android and desktop? Assuming both compile for the same...
k
Does kotlin emit different bytecode for both android and desktop? Assuming both compile for the same source and same target, and both compile the exact same class
m
Android will take the .class files and turn them into .dex (the format of the Android JVM)
But the initial .class files shouldn't be that different? (not sure about that last part but I don't see a strong reason why)
k
Hmmm
m
You can open an apk in Android Studio, it'll show the .dex files inside (or you can just unzip it too)
k
Yea
As i have heard that ummm most bytecode analysers need special support for android
Tho such analysers are typically memory heavy :(
a
Tell me what exactly you want to do, I can help. The bytecode is a bit more complicated than smali. But both of them are very easy to learn, except that the JVM is a stack machine and ART is a register machine. You can easily convert one to the other.