简体   繁体   中英

what is relationship between Android and lua and SMALI languages?

I have noticed that some of the android applications as containing Lua scripts and bytecode.

I think Android can under Java Davlik bytecode or native calls.

  • How it can load lua scripts (.lua files) and lua bytecode (.o) at runtime ?
  • Why the apktool decompiles into SMALI instead of .class if the DALVIK is on Java type VM and when the coding is done on Java?

Any hints on this?

Android runs dalvik bytecode, and smali is an "assembly" language for dalvik bytecode. Android apps are typically written in the java (or other jvm) language and compiled to .class files as per usual. Those class files are then converted to dalvik bytecode by the "dx" utility, which is a part of the Android SDK. The output of dx is (typically) a single dex file that contains all of the application's classes.

Lua is completely unrelated. For an Android application to be able to load Lua scripts/bytecode, it must include its own Lua interpreter/VM.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM