shogo82148 / androidbinary

Android binary file parser written in golang
MIT License
241 stars 79 forks source link

How to get the appname of apk? #26

Closed huanghantao closed 5 years ago

huanghantao commented 5 years ago

How to get the appname of apk?

shogo82148 commented 5 years ago

You can get the application name from Manifest.

package main

import (
    "github.com/shogo82148/androidbinary/apk"
)

func main() {
    pkg, _ := apk.OpenFile("your-android-app.apk")
    defer pkg.Close()

    name := pkg.Manifest().App.Name
}
huanghantao commented 5 years ago

thx

AlexanderMatveev commented 2 years ago

@huanghantao @shogo82148 looks like info.Manifest().App.Label.String() is correct one for now