Now repository can have apps and allowed to install them
This commit is contained in:
parent
d004e69e6b
commit
71c1312df9
4 changed files with 512 additions and 7 deletions
28
apktest.go
Normal file
28
apktest.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
"fmt"
|
||||
"github.com/avast/apkparser"
|
||||
"os"
|
||||
)
|
||||
|
||||
func main() {
|
||||
enc := xml.NewEncoder(os.Stdout)
|
||||
//enc.Indent("", "\t")
|
||||
zipErr, resErr, manErr := apkparser.ParseApk(os.Args[1], enc)
|
||||
if zipErr != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to open the APK: %s", zipErr.Error())
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
|
||||
if resErr != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to parse resources: %s", resErr.Error())
|
||||
}
|
||||
if manErr != nil {
|
||||
fmt.Fprintf(os.Stderr, "Failed to parse AndroidManifest.xml: %s", manErr.Error())
|
||||
os.Exit(1)
|
||||
return
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue