Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smali compilation failed on macOS #26

Open
skeltavik opened this issue Aug 14, 2018 · 10 comments
Open

Smali compilation failed on macOS #26

skeltavik opened this issue Aug 14, 2018 · 10 comments

Comments

@skeltavik
Copy link

I got an error stating that the smali compilation procedure is failing. Any idea what can be the problem?

I'm running this on macOS 10.14 Mojave

Exception in thread "main" com.beust.jcommander.MissingCommandException: Expected a command, got itsme-1.32.0004.apk
	at com.beust.jcommander.JCommander.parseValues(JCommander.java:725)
	at com.beust.jcommander.JCommander.parse(JCommander.java:304)
	at com.beust.jcommander.JCommander.parse(JCommander.java:287)
	at org.jf.baksmali.Main.main(Main.java:90)
/usr/local/lib/ruby/gems/2.5.0/gems/dex-oracle-1.0.5/lib/dex-oracle/plugin.rb:19: warning: constant ::NIL is deprecated
/usr/local/lib/ruby/gems/2.5.0/gems/dex-oracle-1.0.5/lib/dex-oracle/plugin.rb:19: warning: constant ::Data is deprecated
/usr/local/lib/ruby/gems/2.5.0/gems/dex-oracle-1.0.5/lib/dex-oracle/plugin.rb:19: warning: constant ::TRUE is deprecated
/usr/local/lib/ruby/gems/2.5.0/gems/dex-oracle-1.0.5/lib/dex-oracle/plugin.rb:19: warning: constant ::FALSE is deprecated
/usr/local/lib/ruby/gems/2.5.0/gems/dex-oracle-1.0.5/lib/dex-oracle/plugin.rb:19: warning: constant ::Fixnum is deprecated
/usr/local/lib/ruby/gems/2.5.0/gems/dex-oracle-1.0.5/lib/dex-oracle/plugin.rb:19: warning: constant ::Bignum is deprecated
Optimizing 0 methods over 0 Smali files.
Optimizations:
Exception in thread "main" com.beust.jcommander.MissingCommandException: Expected a command, got /var/folders/r5/l_1fgfmd39z6gs_6whhtd_kw0000gn/T/d20180814-2606-1po2zww
	at com.beust.jcommander.JCommander.parseValues(JCommander.java:725)
	at com.beust.jcommander.JCommander.parse(JCommander.java:304)
	at com.beust.jcommander.JCommander.parse(JCommander.java:287)
	at org.jf.smali.Main.main(Main.java:87)
Traceback (most recent call last):
	5: from /usr/local/bin/dex-oracle:23:in `<main>'
	4: from /usr/local/bin/dex-oracle:23:in `load'
	3: from /usr/local/lib/ruby/gems/2.5.0/gems/dex-oracle-1.0.5/bin/dex-oracle:96:in `<top (required)>'
	2: from /usr/local/lib/ruby/gems/2.5.0/gems/dex-oracle-1.0.5/lib/dex-oracle/smali_input.rb:18:in `finish'
	1: from /usr/local/lib/ruby/gems/2.5.0/gems/dex-oracle-1.0.5/lib/dex-oracle/smali_input.rb:35:in `update_apk'
/usr/local/lib/ruby/gems/2.5.0/gems/dex-oracle-1.0.5/lib/dex-oracle/smali_input.rb:30:in `compile': Crap, smali compilation failed. (RuntimeError)
@CalebFenton
Copy link
Owner

Thanks for the report.

What version of smali / baksmali do you have on your path?

What version of dex-oracle are you using? Is it from master?

@hynekdav
Copy link

Hello, I got the same error.
I have smali/baksmali version 2.2.4, in my path.
I am using dex-oracle version 1.0.5 installed via gem install dex-oracle.

@CalebFenton
Copy link
Owner

@hynekdav thanks for the info. I think I just need to update the published gem from what's on master. Could you test with master as a confirmation?

I think it's the new versions of smali / baksmali require subcommands (assemble, disassemble) and maybe 1.0.5 dex-oracle doesn't know that.

@hynekdav
Copy link

@CalebFenton it works just fine bundled from master.

@ddzobov
Copy link

ddzobov commented Nov 11, 2018

Have same problem.

Installed step-by-step from readme and got this error. Any updates?

@CalebFenton
Copy link
Owner

Try from master?

@ddzobov
Copy link

ddzobov commented Nov 11, 2018

Built gem from master - no difference 😔

@CalebFenton
Copy link
Owner

CalebFenton commented Nov 11, 2018 via email

@ddzobov
Copy link

ddzobov commented Nov 11, 2018

What's the exact error you're getting?

Exception in thread "main" com.beust.jcommander.MissingCommandException: Expected a command, got simple.apk

@ddzobov
Copy link

ddzobov commented Nov 12, 2018

Solved. Ran from bin directory

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants