示例#1
0
 def test_shell(self):
     print(
         Adb.shell(self.device_id, 'am', 'startservice', '-n'
                   'org.proxydroid/.ProxyDroidService', '--es', 'proxyType',
                   'http', '--es', 'host', '10.251.0.219', '--ei', 'port',
                   '6666', '--ez', 'tweezer.isTweezer', 'true', '--es',
                   'tweezer.proxyApp', 'com.ttyouqu.app'))
示例#2
0
 def test_get_process(self):
     print(Adb.get_process(self.device_id))
示例#3
0
 def test_grant_permission(self):
     print(
         Adb.grant_permission(self.device_id,
                              self.mock_location_app_pkg_name,
                              'android.permission.READ_PHONE_STATE'))
示例#4
0
 def test_get_app_permission(self):
     print(
         Adb.get_app_permission(self.device_id,
                                self.mock_location_app_pkg_name))
示例#5
0
 def test_get_app_version(self):
     print(Adb.get_app_version(self.device_id, self.pkg_name))
示例#6
0
 def test_get_base_apk_path(self):
     print(Adb.get_base_apk_path(self.device_id, self.pkg_name))
示例#7
0
 def test_get_device_model(self):
     print(Adb.get_device_model(self.device_id))
示例#8
0
 def test_adb_devices(self):
     print(Adb.exec('version'))
     print(Adb.devices(True))
示例#9
0
 def test_is_rooted(self):
     print(Adb.is_rooted(self.device_id))
示例#10
0
 def test_get_installed_packages(self):
     installed_apps = Adb.get_installed_packages(self.device_id)
     system_apps = Adb.get_system_packages(self.device_id)
     user_installed_apps = Adb.get_user_installed_packages(self.device_id)
     self.assertEqual(len(installed_apps),
                      len(system_apps) + len(user_installed_apps))
示例#11
0
 def test_get_sdk_level(self):
     print(Adb.get_sdk_level(self.device_id))
示例#12
0
 def test_top_app(self):
     print(Adb.top_app(self.device_id, Adb.get_sdk_level(self.device_id)))
示例#13
0
 def test_su_shell(self):
     print(Adb.su_shell(self.device_id, 'id'))
示例#14
0
 def test_start_app(self):
     print(Adb.start_app(self.device_id, 'com.weiqing.medivh'))
     print(Adb.start_app(self.device_id, 'com.weiqing.medih'))
示例#15
0
 def test_is_system_partition_rw(self):
     print(Adb.is_system_partition_rw(self.device_id))
示例#16
0
 def test_get_iface(self):
     ifaces = Adb.get_ifaces(self.device_id)
     for iface in ifaces:
         print('{0}:{1}'.format(iface.m_iface_name, iface.m_ip_addr))
示例#17
0
 def setUpClass(cls) -> None:
     cls.device_id = Adb.devices(True)[0]
     cls.pkg_name = 'com.ttyouqu.app'
     cls.mock_location_app_pkg_name = 'com.pkiller.mocklocation'