Smali error message doesn't say what file or what the problem is #410

Closed
iBotPeaches opened this Issue Mar 18, 2015 · 8 comments

Comments

Projects
None yet
1 participant
@iBotPeaches
Owner

iBotPeaches commented Mar 18, 2015

Original issue 299 created by rogerbinns on 2012-02-03T05:57:40.000Z:

I made some changes to smali code and then rebuild with apktool 1.4.3. This is the exception I get which doesn't include the file name or what the problem is. It takes a lot of effort to try to work out the actual problem.

I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: java.io.FileInputStream@1b5ae101
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:45)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)

@iBotPeaches iBotPeaches self-assigned this Mar 18, 2015

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #1 originally posted by bluesun77 on 2012-02-11T13:19:15.000Z:

fgsg

Owner

iBotPeaches commented Mar 18, 2015

Comment #1 originally posted by bluesun77 on 2012-02-11T13:19:15.000Z:

fgsg

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #2 originally posted by rogerbinns on 2012-02-23T07:07:54.000Z:

I should note that when using the smali tool separately it did tell me exactly which file, line and cause was.

Owner

iBotPeaches commented Mar 18, 2015

Comment #2 originally posted by rogerbinns on 2012-02-23T07:07:54.000Z:

I should note that when using the smali tool separately it did tell me exactly which file, line and cause was.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #3 originally posted by pruthvibejjenki on 2012-09-25T12:24:06.000Z:

please explain how this issue was solved?

Owner

iBotPeaches commented Mar 18, 2015

Comment #3 originally posted by pruthvibejjenki on 2012-09-25T12:24:06.000Z:

please explain how this issue was solved?

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #4 originally posted by nickwender on 2012-10-25T10:23:45.000Z:

I also used smali to find the problem. Get smali from code.google.com/p/smali/

Then run smali on the directory with the code you need to rebuild as follows:

java -Xmx512m -jar smali-.jar -o someOutputFile.dex c:\path\to\code\folder

Note that is whatever version of smali you have. Just use whatever the smali jar filename for this part.

The output file (-o option) is somewhat pointless if all you want is to have smali print what the problem is, but if it works it would be nice to know where your dex file will be

Owner

iBotPeaches commented Mar 18, 2015

Comment #4 originally posted by nickwender on 2012-10-25T10:23:45.000Z:

I also used smali to find the problem. Get smali from code.google.com/p/smali/

Then run smali on the directory with the code you need to rebuild as follows:

java -Xmx512m -jar smali-.jar -o someOutputFile.dex c:\path\to\code\folder

Note that is whatever version of smali you have. Just use whatever the smali jar filename for this part.

The output file (-o option) is somewhat pointless if all you want is to have smali print what the problem is, but if it works it would be nice to know where your dex file will be

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #5 originally posted by connor.tumbleson on 2012-11-16T23:53:40.000Z:

We can pipe smali output to the screen. I'll see about that.

Owner

iBotPeaches commented Mar 18, 2015

Comment #5 originally posted by connor.tumbleson on 2012-11-16T23:53:40.000Z:

We can pipe smali output to the screen. I'll see about that.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #6 originally posted by connor.tumbleson on 2012-11-16T23:53:47.000Z:

<empty>

Owner

iBotPeaches commented Mar 18, 2015

Comment #6 originally posted by connor.tumbleson on 2012-11-16T23:53:47.000Z:

<empty>

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #7 originally posted by connor.tumbleson on 2013-01-04T05:15:10.000Z:

Issue 384 has been merged into this issue.

Owner

iBotPeaches commented Mar 18, 2015

Comment #7 originally posted by connor.tumbleson on 2013-01-04T05:15:10.000Z:

Issue 384 has been merged into this issue.

@iBotPeaches

This comment has been minimized.

Show comment
Hide comment
@iBotPeaches

iBotPeaches Mar 18, 2015

Owner

Comment #8 originally posted by connor.tumbleson on 2013-01-05T14:50:10.000Z:

Now it'll tell you the file that the problem occurred on, but the problem is it only will show you that file. Then if you have another error. It'll show the next one on the next run, since it only processes a failure then dies out.

[7,16] mismatched input 'static' expecting COLON
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: /home/ibotpeaches/build/wip/rom_wip_aries/d_apks/Browser.apk/smali/com/android/browser/Z.smali

Owner

iBotPeaches commented Mar 18, 2015

Comment #8 originally posted by connor.tumbleson on 2013-01-05T14:50:10.000Z:

Now it'll tell you the file that the problem occurred on, but the problem is it only will show you that file. Then if you have another error. It'll show the next one on the next run, since it only processes a failure then dies out.

[7,16] mismatched input 'static' expecting COLON
Exception in thread "main" brut.androlib.AndrolibException: Could not smali file: /home/ibotpeaches/build/wip/rom_wip_aries/d_apks/Browser.apk/smali/com/android/browser/Z.smali

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment