Skip to content

Instantly share code, notes, and snippets.

@billyriantono
Forked from luca020400/blobs.py
Created January 3, 2021 07:22
Show Gist options
  • Save billyriantono/685c6d2196fd881f2c35ca5d38bd65f7 to your computer and use it in GitHub Desktop.
Save billyriantono/685c6d2196fd881f2c35ca5d38bd65f7 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from __future__ import print_function
import json
import os
import subprocess
device = "msm8996-common"
vendor = "xiaomi"
system = "system/"
data = json.load(open("proprietary-files.json", "rb"))
for section in data:
for blob in data[section]:
target = blob
if data[section][blob].get("target") is not None:
target = data[section][blob].get("target")
directory = os.path.dirname(system + target)
if not os.path.exists(directory):
os.makedirs(directory)
subprocess.call(["adb", "pull", system + blob, system + target])
{
"ADSP": {
"bin/adsprpcd": {
"target": "vendor/bin/adsprpcd"
},
"vendor/lib64/libadsprpc.so": {}
},
"Widevine DRM": {
"vendor/bin/hw/android.hardware.drm@1.0-service.widevine": {
"sha1sum": "fd6e14710c196fdd4131afe2ce10c4a5be1b309c"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment