python: Refactor aosp.py and chromium.py