Closed shogo82148 closed 7 years ago
I have no panic but I can not get the icon of #9 . I'm checking the implementation now.
Memo
It seems that I need to parseidmapEntries
.
ResTable::getEntry
https://android.googlesource.com/platform/frameworks/base/+/master/libs/androidfw/ResourceTypes.cpp#5968IdmapEntries
https://android.googlesource.com/platform/frameworks/base/+/master/libs/androidfw/ResourceTypes.cpp#259idmapentries are parsed here.
I'm going to Hokkaido tomorrow. ^_^
Welcome to Japan!
package main
import (
"image/png"
"os"
"github.com/shogo82148/androidbinary/apk"
)
func main() {
pkg, err := apk.OpenFile("test.apk")
if err != nil {
panic(err)
}
icon, err := pkg.Icon(nil)
if err != nil {
panic(err)
}
png.Encode(os.Stdout, icon)
}
It seems to be working well. I'm going to review it again tomorrow, and then merge it.
Great job
Fix #9