2012-06-21 22:50:05 +08:00
|
|
|
#!/usr/bin/python
|
|
|
|
|
|
|
|
import os
|
2012-10-02 18:59:00 +08:00
|
|
|
import sys
|
2012-06-21 22:50:05 +08:00
|
|
|
|
|
|
|
TARGET_DEVICE_PATH = "/data/data/EngineTest"
|
|
|
|
DEVICE_NAME = ""
|
|
|
|
DEVICE_STR = ""
|
|
|
|
DEVICE_ARCH = "armeabi"
|
|
|
|
|
|
|
|
if (__name__ == "__main__"):
|
2012-10-02 18:59:00 +08:00
|
|
|
if (len(sys.argv) >= 3):
|
2012-10-24 16:46:36 +08:00
|
|
|
DEVICE_ARCH = sys.argv[1]
|
|
|
|
DEVICE_NAME = sys.argv[2]
|
2012-10-02 18:59:00 +08:00
|
|
|
|
2012-10-17 07:18:30 +08:00
|
|
|
if (DEVICE_NAME != ""):
|
|
|
|
DEVICE_STR = "-s \"" + DEVICE_NAME + "\""
|
2012-10-02 18:59:00 +08:00
|
|
|
|
|
|
|
print("Waiting for device \"%s\" with arch \"%s\" ..." % (DEVICE_NAME, DEVICE_ARCH))
|
2012-06-21 22:50:05 +08:00
|
|
|
os.system("adb %s wait-for-device" % DEVICE_STR)
|
|
|
|
os.system("adb %s shell mkdir -p %s" % (DEVICE_STR, TARGET_DEVICE_PATH))
|
|
|
|
os.system("adb %s push ./engine/libs/%s/libOpenCVEngine.so %s" % (DEVICE_STR, DEVICE_ARCH, TARGET_DEVICE_PATH))
|
|
|
|
os.system("adb %s push ./engine/libs/%s/OpenCVEngineNativeClient %s" % (DEVICE_STR, DEVICE_ARCH, TARGET_DEVICE_PATH))
|
|
|
|
os.system("adb %s push ./engine/libs/%s/OpenCVEngineNativeService %s" % (DEVICE_STR, DEVICE_ARCH, TARGET_DEVICE_PATH))
|
|
|
|
os.system("adb %s push ./engine/libs/%s/OpenCVEngineTest %s" % (DEVICE_STR, DEVICE_ARCH, TARGET_DEVICE_PATH))
|
|
|
|
os.system("adb %s push ./engine/libs/%s/OpenCVEngineTestApp %s" % (DEVICE_STR, DEVICE_ARCH, TARGET_DEVICE_PATH))
|
|
|
|
os.system("adb %s push ./engine/libs/%s/libOpenCVEngine_jni.so %s" % (DEVICE_STR, DEVICE_ARCH, TARGET_DEVICE_PATH))
|