Пример #1
0
    def __init__(self, apk_path, adb_path, aapt_path, is_emulator=False):
        self.apk_path = apk_path
        self.adb_path = adb_path
        self.aapt_path = aapt_path

        self.adb_wrapper = ADB(adb_path)

        self.apk_manager = Apk_manager(self.adb_wrapper, self.adb_path,
                                       self.apk_path, self.aapt_path)

        # self.is_emulator = True if is_emulator else self.is_target_emulator()
        self.adb_server_process = None
Пример #2
0
    def __init__(self):
        """Init adb and command.

        export CLASSPATH=/data/local/od.zip;
        app_process /system/bin org.cf.oracle.Driver
        @/data/local/od-targets.json;
        """
        self.cmd_dss_start = ['am', 'startservice',
                              'me.mikusjelly.dss/.DSService']
        self.cmd_dss_stop = ['am', 'force-stop', 'me.mikusjelly.dss']
        self.cmd_dss = ['am', 'broadcast', '-a', 'dss.start']

        self.cmd_get_finish = ['cat', '/data/local/dss_data/finish']
        self.cmd_set_finish = ['echo', 'No', '>',
                               '/data/local/dss_data/finish']
        self.cmd_set_new = ['echo', 'Yes', '>', '/data/local/dss_data/new']

        self.adb = ADB()
        self.adb.run_shell_cmd(self.cmd_set_new)
Пример #3
0
    def __init__(self):
        """Init adb and command.
        """
        self.cmd_dss_start = ['am', 'startservice',
                              'me.mikusjelly.dss/.DSService']
        self.cmd_dss_start_foreground = ['am', ' start-foreground-service',
                              'me.mikusjelly.dss/.DSService']
        self.cmd_dss_stop = ['am', 'force-stop', 'me.mikusjelly.dss']
        self.cmd_dss = ['am', 'broadcast', '-a', 'dss.start']

        self.cmd_get_finish = ['cat', '/sdcard/dss_data/finish']
        self.cmd_set_finish = ['echo', 'No', '>',
                               '/sdcard/dss_data/finish']
        self.cmd_set_new = ['echo', 'Yes', '>', '/sdcard/dss_data/new']

        self.get_sdk_int = ['getprop', 'ro.build.version.sdk']

        self.adb = ADB()
        self.sdk_int = self.adb.run_shell_cmd(self.get_sdk_int)
        self.sdk_int = self.sdk_int.decode(encoding='utf-8').strip()
        self.sdk_int = int(self.sdk_int)

        self.adb.run_shell_cmd(self.cmd_set_new)