Closed GoogleCodeExporter closed 9 years ago
[deleted comment]
Yes, I understand that. But I looked through the code and saw that the whole
file is read into a byte[]. Is that necessary? Can't it use a stream to work
through the file? The visitor structure looks like it it doesn't need to have
processed the whole file first. I would thought that dex2jar would be a
streaming reader. You understand what I mean?
Original comment by goo...@umito.nl
on 17 Jul 2012 at 3:30
I tried asmdex, but that one gives even faster a outofmemory error. I can use
dex2jar fine for smaller apps.
Original comment by goo...@umito.nl
on 17 Jul 2012 at 3:46
[deleted comment]
Ok, that's a great solution. That looks like what I want to have. Unfortunately
it gives me "not support magic", because I supply the apk file that is on the
device and not the dex file that is unzipped normally when you use a normal
File.
Original comment by goo...@umito.nl
on 17 Jul 2012 at 7:37
I created a DataIN that extends MemoryCacheSeekableStream that wraps the
ZipInputStream to get the dex file from the apk ondevice, and that works! So I
guess I'm done now. ;)
Original comment by goo...@umito.nl
on 17 Jul 2012 at 8:55
[deleted comment]
I have attached the files I used. Note that because seekablestream uses
interface DataInput, the return type of readByte needs to be byte, not int. So
I have changed that in DataIn and other classes that implement that interface.
This change is not included in zip file. However, it's just changing return
type (with eventual cast if necessary). It works great on my device now. To
open APK file on device I use APKFileStreamerDataIn, also included.
Original comment by goo...@umito.nl
on 18 Jul 2012 at 7:25
Attachments:
Original issue reported on code.google.com by
goo...@umito.nl
on 17 Jul 2012 at 1:21