google / smali

Other
212 stars 35 forks source link

DEX version compatibility #49

Closed privacyguy123 closed 6 months ago

privacyguy123 commented 7 months ago

Does it matter, say, if I use a more recent version of smali/baksmali (DEX v41) to decompile/recompile a file that was compiled with DEX v38? Will this cause some sort of compatibility issues?

sgjesse commented 6 months ago

The DEX version for the output of smali is indirectly determined by setting API level (-a or --api). See https://source.android.com/docs/core/runtime/dex-format#definitions for info on which android versions supports which DEX versions. See https://apilevels.com/ for which API level each Android version has.

DEX v41 is currently only supported for reading. Writing will never generate anything higher than v39.

zerny commented 6 months ago

Closing as working as intended.