-
Notifications
You must be signed in to change notification settings - Fork 83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
extrace apk icon, encouter image: unknown format #89
Comments
It looks that the icon is an adaptive icon. |
It works on my environment. package main
import (
"image/png"
"os"
"github.com/shogo82148/androidbinary"
"github.com/shogo82148/androidbinary/apk"
)
func main() {
apkPath := "taptap_2.68.4-mkt.100000_sem.apk"
pkg, err := apk.OpenFile(apkPath)
if err != nil {
panic(err)
}
defer pkg.Close()
icon, err := pkg.Icon(&androidbinary.ResTableConfig{
SDKVersion: 25,
})
if err != nil {
panic(err)
}
f, err := os.Create("icon.png")
if err != nil {
panic(err)
}
if err := png.Encode(f, icon); err != nil {
panic(err)
}
if err := f.Close(); err != nil {
panic(err)
}
} |
I still got this unknown format error with |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
My requirement is to extract the icon file from the apk file
Here is the code:
image: unknown format error show;
Here is the apk file download link:https://d2.tapurl.com/latest/sem-360ss_cn03syyx2_id235106
How can i solve thie problem,thx
The text was updated successfully, but these errors were encountered: