Skip to content

Instantly share code, notes, and snippets.

@burntcookie90
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save burntcookie90/df9dededec882c32aa21 to your computer and use it in GitHub Desktop.
Save burntcookie90/df9dededec882c32aa21 to your computer and use it in GitHub Desktop.
Python script to automate the creation of a chromeos apk during development
#!/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