Closed drosseau closed 3 years ago
I noticed that if I go into the file and rename things that are just whitespace to whitespace with backtics around it smali won't fail anymore, but I'm not sure if it is creating a valid dex.
For example,
.method public static final (Ljava/lang/String;)V
becomes
.method public static final ` `(Ljava/lang/String;)V
Hmm, yeah. Maybe a bug in the logic used to detect if a name needs to be quoted or not.
Huh, apparently support for names with spaces was never added to baksmali. I could have sworn it was added at the same time support was added for smali.
Per the specs, white spaces and similar chars in SimpleName
s are allowed only since version 40: https://source.android.com/devices/tech/dalvik/dex-format#simplename
(I remember seeing this in a JEB changelog only a few months ago.)
Yeah, support was added to smali in 586ec594e2efd35dfe8d31cc221208fc886851dd. I guess I didn't think about support in baksmali at the time.
This is now supported in baksmali, as of v2.5.0
This is a valid Kotlin program:
Convert to dex:
baksmali doesn't have any errors:
Examples of some of the bad lines:
Names such as
this is a class
are valid too, but cause the same issues.Versions of everything:
Update:
Sadly
is also valid and has the same behavior.