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

com.beust.jcommander.MissingCommandException #27

Open
ElderOrb opened this issue Sep 3, 2018 · 1 comment
Open

com.beust.jcommander.MissingCommandException #27

ElderOrb opened this issue Sep 3, 2018 · 1 comment

Comments

@ElderOrb
Copy link

ElderOrb commented Sep 3, 2018

On executing 'dex-oracle.ruby2.1 -v my.test.apk' I'm getting:

Exception in thread "main" com.beust.jcommander.MissingCommandException: Expected a command, got my.test.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)

@unoexperto
Copy link

I have the same problem. @CalebFenton could you please comment on this ? I tested with apk built for SDK 23. Here is my output

root@expert-x1:~/work/sideprojects/GCamReverse# dex-oracle -s d03f2c68 -i com test.apk
/var/lib/gems/2.5.0/gems/dex-oracle-1.0.5/lib/dex-oracle/utility.rb:6: warning: Insecure world writable dir /home/expert/work/sideprojects in PATH, mode 040777
Exception in thread "main" com.beust.jcommander.MissingCommandException: Expected a command, got test.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)
[ERROR] 2018-12-01 19:14:54: Failure to merge input DEX and driver DEX:
Exception in thread "main" com.android.dex.DexIndexOverflowException: method ID not in [0, 0xffff]: 65536
	at com.android.dx.merge.DexMerger$6.updateIndex(DexMerger.java:495)
	at com.android.dx.merge.DexMerger$IdMerger.mergeSorted(DexMerger.java:261)
	at com.android.dx.merge.DexMerger.mergeMethodIds(DexMerger.java:504)
	at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:161)
	at com.android.dx.merge.DexMerger.merge(DexMerger.java:188)
	at com.android.dx.merge.DexMerger.main(DexMerger.java:1120)


[ERROR] 2018-12-01 19:14:54: Your input DEX inexplicably contains const-string and const-string/jumbo. This probably means someone fucked with it. In any case, it means DexMerge is failing because there are too many strings.
Try this: baksmali the DEX, replace all const-string instructions with const-string/jumbo, then recompile with smali and use that DEX as input. Sorry, I don't want to do this for you. It's too complicated.

What command does it expect ?

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

2 participants