Specified api level 26 to be used with smali and updated to 3.0.5

This commit is contained in:
maelstrom 2024-08-18 01:44:10 +02:00
parent 89581ccb51
commit 513a4592fe
4 changed files with 9 additions and 1 deletions

8
NOTE.txt Normal file
View file

@ -0,0 +1,8 @@
Api level 26 (or whatever the minsdkver of the apk is) is necessary to be specified to smali.jar, or else it will use 15, which is quite old
and is sure not to work.
I got the latest 3.0.5 by cloning Google's fork (https://github.com/google/smali) and building it with gradle (./gradlew build)
I built it on Arch (via gradle build, because gradlew kept complaining about jdk in /usr/lib/jvm/java17-openjdk despite there being one)
because on Windows it would complain about some ANTLR grammar parsing..... for some reason.
Anyway, that's how i did it. But I used the fat jar, and renamed it accordingly (the dirty fat one.)

View file

@ -32,4 +32,4 @@ def compile_smali():
continue continue
print(f"Compiling {smali_dir.name} => {dest_dex.name}...") print(f"Compiling {smali_dir.name} => {dest_dex.name}...")
_ = subprocess.run(["java", "-jar", "tools/smali-2.5.2.jar", "a", smali_dir, "-o", dest_dex]) _ = subprocess.run(["java", "-jar", "tools/smali-3.0.5.jar", "a", "-a", "26", smali_dir, "-o", dest_dex])

Binary file not shown.

BIN
tools/smali-3.0.5.jar Normal file

Binary file not shown.