AlexeySoshin/smali2java

Error when starting smali2java.

eGit opened this issue · 5 comments

eGit commented

I cannot make any sense of this error message:

./smali2java_linux_amd64 apktool/smali/
2022/05/18 00:01:12 Error occurred while walking path "./test_data/s.smali": lstat ./test_data/s.smali: no such file or directory

You've put the wrong arguments in. Read the readme.

smali2java -path_to_smali=smali

eGit commented

Sorry, I specified the path and it failed and when I (hours later) filed the issue, I just run the command without the path and was "happy" enough it failed as to not check really what was going on.

Here is the correct error - duplicate of #24:

`./smali2java_linux_amd64 -path_to_smali=./apktool/smali
panic: runtime error: slice bounds out of range [:-1]

goroutine 1 [running]:
github.com/alexeysoshin/smali2java/parser.(*MethodParser).Parse(0xc00008d750, 0xc00008d7f8, 0xc000193450, 0x5, 0x5, 0x40ccf0, 0xdbd1)
/Users/alexeysoshin/GitHub/smali2java/parser/method.go:84 +0xfb2
github.com/alexeysoshin/smali2java/parser.(*JavaFile).ParseLine(0xc00008d7f8, 0xc0005ceba0, 0x58, 0xc0005ceba0, 0x58)
/Users/alexeysoshin/GitHub/smali2java/parser/java_file.go:117 +0x9f3
main.convertSmali(0xc000436e80, 0x3e, 0xc0001a0000)
/Users/alexeysoshin/GitHub/smali2java/smali2java.go:70 +0x236
main.parseSmaliFiles.func1(0xc000436e80, 0x3e, 0x5141e0, 0xc000438dd0, 0x0, 0x0, 0x4ab33d, 0xc000438dd0)
/Users/alexeysoshin/GitHub/smali2java/smali2java.go:40 +0x185
path/filepath.walk(0xc000436e80, 0x3e, 0x5141e0, 0xc000438dd0, 0xc00008df10, 0x0, 0x0)
/usr/local/Cellar/go/1.15.3/libexec/src/path/filepath/path.go:360 +0x423
path/filepath.walk(0xc000345ad0, 0x28, 0x5141e0, 0xc00006ec30, 0xc00008df10, 0x0, 0x0)
/usr/local/Cellar/go/1.15.3/libexec/src/path/filepath/path.go:384 +0x2fe
path/filepath.walk(0xc0002b29c0, 0x20, 0x5141e0, 0xc000438340, 0xc00008df10, 0x0, 0x0)
/usr/local/Cellar/go/1.15.3/libexec/src/path/filepath/path.go:384 +0x2fe
path/filepath.walk(0xc0004cfa00, 0x1d, 0x5141e0, 0xc000438680, 0xc00008df10, 0x0, 0x0)
/usr/local/Cellar/go/1.15.3/libexec/src/path/filepath/path.go:384 +0x2fe
path/filepath.walk(0xc0001a4040, 0x15, 0x5141e0, 0xc000194680, 0xc00008df10, 0x0, 0x0)
/usr/local/Cellar/go/1.15.3/libexec/src/path/filepath/path.go:384 +0x2fe
path/filepath.walk(0x7ffe5b306c9c, 0xf, 0x5141e0, 0xc0001945b0, 0xc00008df10, 0x0, 0x10)
/usr/local/Cellar/go/1.15.3/libexec/src/path/filepath/path.go:384 +0x2fe
path/filepath.Walk(0x7ffe5b306c9c, 0xf, 0xc000074f10, 0x4b9e45, 0xc000184120)
/usr/local/Cellar/go/1.15.3/libexec/src/path/filepath/path.go:406 +0x105
main.parseSmaliFiles(0x7ffe5b306c9c, 0xf)
/Users/alexeysoshin/GitHub/smali2java/smali2java.go:29 +0x76
main.main()
/Users/alexeysoshin/GitHub/smali2java/smali2java.go:23 +0xe8
`

Same issue, tried windows build as well linux build via WS
attempts.txt

Same after 1 year

kup1o commented

Same here

smali2java -path-to-string "./cd/s.smali"

flag provided but not defined: -path-to-string
Usage of smali2java:
  -path_to_smali string
        Path to your smali files (default "./test_data/s.smali")