xychix / smali

Automatically exported from code.google.com/p/smali
0 stars 0 forks source link

Baksmali can't handle long class names #123

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What seems to be the problem?

$ baksmali ../rawapks/mystery/MarketMilitiaVirtuaTennis/classes.dex
This dex file has a link section, which is not supported. Ignoring.

Error occured while disassembling class 
LuTiSXIlPg.FKC5OW2SCNaaYgpjzxGmqY75ToPgypqSr95VgLNFZYuxyYP0UxMVAscp7KqDxd7UTNRfJ
O8C6KVaALCqqX8ezRTXCb5qF6mQ9yfXBzgl4ZYaguvQCBpOnYRjSfOrD1bxoxdjIFYL6HtU3KYH3uMSg
sfxMmtEIgaawWRNAx9Phgkc5rKKUAHf2OtJdPZeEBaOyL4pvQhQimnAJmX5CvsPNeNmmG6khG4mK67Q5
f4uA20grl4KAVvbtRftP7Izh9dcvJ; - skipping class
java.io.IOException: 文件名、目录名或卷标语法不正确。
        at java.io.WinNTFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(Unknown Source)
        at org.jf.baksmali.baksmali.disassembleDexFile(baksmali.java:195)
        at org.jf.baksmali.main.main(main.java:293)

What is the exact smali/baksmali command that you ran?
baksmali shoudl generate the out dir with the class
uTiSXIlPg.FKC5OW2SCNaaYgpjzxGmqY75ToPgypqSr95VgLNFZYuxyYP0UxMVAscp7KqDxd7UTNRfJO
8C6KVaALCqqX8ezRTXCb5qF6mQ9yfXBzgl4ZYaguvQCBpOnYRjSfOrD1bxoxdjIFYL6HtU3KYH3uMSgs
fxMmtEIgaawWRNAx9Phgkc5rKKUAHf2OtJdPZeEBaOyL4pvQhQimnAJmX5CvsPNeNmmG6khG4mK67Q5f
4uA20grl4KAVvbtRftP7Izh9dcvJ

What version of smali/baksmali are you using? What rom are you working
from?
$ baksmali -v
baksmali 1.3.2 (http://smali.googlecode.com)
Copyright (C) 2010 Ben Gruver (JesusFreke@JesusFreke.com)
BSD license (http://www.opensource.org/licenses/bsd-license.php)

What is the airspeed velocity of an unladen swallow?

Please provide any additional information below: error messages, symptoms,
etc.
baksmali can not disassemble the attached apk correctly。
See the attached apk。

Original issue reported on code.google.com by ustcchen...@gmail.com on 17 Jun 2012 at 7:17

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks. This has nothing to do with the (non-existant) link section, but it 
appears that it can't create a .smali file with that class name, because it's 
too long.

This is something that I'll need to fix.

Original comment by bgruv@google.com on 19 Jun 2012 at 11:11

GoogleCodeExporter commented 9 years ago
Issue 164 has been merged into this issue.

Original comment by bgruv@google.com on 12 Mar 2013 at 5:58

GoogleCodeExporter commented 9 years ago
Issue 164 has been merged into this issue.

Original comment by bgruv@google.com on 13 Mar 2013 at 9:29

GoogleCodeExporter commented 9 years ago
Finally got around to fixing this :)

The fix is in the dexlib_redesign branch, and will be in the next 2.0 beta - 
v2.0b6

Original comment by jesusfreke@jesusfreke.com on 14 Sep 2013 at 9:04

GoogleCodeExporter commented 9 years ago
:java -jar baksmali.jar -v
baksmali 2.0b6-dev (http://smali.googlecode.com)

still can't handle long file names...

Error occured while disassembling class 
Lpl.polidea.treeview.яLKwlekljkj5w3lkjkljkJlOWEIMmNWHEHKSPIJLNWLHNWLHJDKWPWISJN
NNHBHWKEWYHEYWPWWKELWJEKWEWNELWJEJHWELKWEWUEWIEKWLRJFKWNENWKJEJKWHEKWJEJHWKEWJHR
KLWHJEKWJEJHWJEHWHEKWEHWHEHjehhwkjrhwerwnbewnrwemnrwkjh5n4m4mwn54mnkhjJNdenrrrr3
453nmNMEWERTENRNERMERJEJRNNWKJEWNEWWKEJWEЯ; - skipping class
java.io.IOException: Operation not permitted
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(Unknown Source)
        at org.jf.baksmali.baksmali.disassembleClass(baksmali.java:159)
        at org.jf.baksmali.baksmali.access$000(baksmali.java:47)
        at org.jf.baksmali.baksmali$1.call(baksmali.java:95)
        at org.jf.baksmali.baksmali$1.call(baksmali.java:93)
        at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
        at java.util.concurrent.FutureTask.run(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at java.lang.Thread.run(Unknown Source)

Original comment by vene...@gmail.com on 11 Dec 2013 at 5:33

GoogleCodeExporter commented 9 years ago
it turns out that if I try to write to a VM mouted shared folder it won't work, 
but locally works, may a only-windows issue

Original comment by vene...@gmail.com on 11 Dec 2013 at 5:38

GoogleCodeExporter commented 9 years ago
Out of curiosity, could you try it directly on your windows system?

Original comment by jesusfreke@jesusfreke.com on 11 Dec 2013 at 7:32

GoogleCodeExporter commented 9 years ago
root@aes256:~# cp -r ~/smali-81648539c9f6/baksmali/build/libs/out2 
/media/sf_linux/out
cp: cannot create regular file 
`/media/sf_linux/out/яLKwlekljkj5w3lkjkljkJlOWEIMmNWHEHKSPIJLNWLHNWLHJDKWPWISJN
NNHBHWKEWYHEYWPWWKELWJEKWEWNELWJEJHWELKWEWUEWIEKWLRJFKWNENWKJ#HJEKWJEJHWJEHWHEKW
EHWHEHjehhwkjrhwerwnbewnrwemnrwkjh5n4m4mwn54mnkhjJNdenrrrr3453nmNMEWERTENRNERMER
JEJRNNWKJEWNEWWKEJWEЯ.smali': Operation not permitted

copy itself it's not allowed, so it's a filesystem problem. will try to test it 
directly in the next days

Original comment by vene...@gmail.com on 11 Dec 2013 at 11:19