Last active
August 29, 2015 14:06
-
-
Save burntcookie90/df9dededec882c32aa21 to your computer and use it in GitHub Desktop.
Python script to automate the creation of a chromeos apk during development
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/local/bin/python | |
import shutil | |
import json | |
from subprocess import call | |
import os | |
shutil.copyfile("app/build/outputs/apk/app-debug.apk", <packagename.apk>) | |
os.system("chromeos-apk <packagename.apk> -a") | |
with open('<packagename.apk>.android/manifest.json', "r+") as manifestFile: | |
manifestJson = json.load(manifestFile) | |
manifestJson["permissions"].append(<extra permissions>) | |
manifestFile.seek(0) | |
json.dump(manifestJson, manifestFile, indent=4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment