JesusFreke / smali

smali/baksmali
6.3k stars 1.07k forks source link

Try to run examples/BracketedMemberNames #876

Open RealYukiSan opened 1 year ago

RealYukiSan commented 1 year ago

I am new to Smali, followed your "hello world" example, which was a success, but I am facing problems while running BracketedMemberNames

smali a -o classes BracketedMemberNames.smali
zip test.zip classes.dex
adb push test.zip /storage/emulated/0/Download
adb shell dalvikvm -cp /storage/emulated/0/Download/test.zip BracketedMemberNames

error log:

Unable to locate class 'BracketedMemberNames'
java.lang.ClassNotFoundException: BracketedMemberNames
Exception in thread "main" java.lang.ClassNotFoundException: BracketedMemberNames
RealYukiSan commented 1 year ago

It seems < and > brackets cause syntax errors, so I remove them, but in the smali file there's a comment: # this will cause a verification error But when I execute the .dex there's no error as expected in the comment section.

$ adb shell dalvikvm -cp /storage/emulated/0/Download/test.zip BracketedMemberNames
Hello World!