google / smali

Other
175 stars 29 forks source link

DEX version compatibility #49

Closed privacyguy123 closed 1 month ago

privacyguy123 commented 2 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 2 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 1 month ago

Closing as working as intended.