Example #1
0
    def __init__(self):
        self._device_service = DeviceService()
        self._device_service.subscribe(self._on_device_changed)
        self._device_map = {}
        self._listeners = []

        self._refresh_device_map()
    def device_get_services(device):
        # get services
        from device_service import DeviceService
        from utils import bluetooth_uuid_to_string

        for serv in device.get_services():
            service = DeviceService(serv)
            uuid = service.get_uuid()
            print "uuid:%s" % uuid
            print bluetooth_uuid_to_string(uuid)
 def _get_udid(self):
     device_service = DeviceService()
     device_list = device_service.get_device_list()
     self.assertIsNotNone(device_list)
     self.assertTrue(len(device_list) > 0)
     return device_list[0]['udid']
 def setUp(self):
     self.image_mounter_service = ImageMounterService()
     self.device_service = DeviceService()
 def setUp(self):
     self.installation_proxy_service = InstallationProxyService()
     self.device_service = DeviceService()
 def setUp(self):
     self.device_service = DeviceService()
 def setUp(self):
     self.spring_board_service = SpringBoardService()
     self.device_service = DeviceService()
Example #8
0
 def setUp(self):
     self.syslog_relay_service = SyslogRelayService()
     self.device_service = DeviceService()
 def setUp(self):
     self.house_arrest_proxy_service = House_arrest_proxy_service()
     self.device_service = DeviceService()
Example #10
0
 def setUp(self):
     self.afc_service = AfcService()
     self.device_service = DeviceService()
Example #11
0
 def setUp(self):
     self.screenshotr_service = ScreenshotrService()
     self.device_service = DeviceService()
 def setUp(self):
     self.device_service = DeviceService()
     self.lockdown_service = LockdownService()
Example #13
0
File: app.py Project: ljm5000/idb
from libimobiledevice import IDeviceConnectionType, SbservicesInterfaceOrientation
from instrument_service import instrument_main, setup_parser as setup_instrument_parser
from screenshotr_service import ScreenshotrService
from spring_board_service import SpringBoardService
from image_mounter_service import ImageMounterService
from syslog_relay_service import SyslogRelayService
from lockdown_service import LockdownService

try:
    from PIL import Image
except:
    Image = None

ROOT_DIR = os.path.abspath(os.path.dirname(__file__))

device_service = DeviceService()


def _get_device_or_die(udid=None):
    device = None
    if udid is not None:
        device = device_service.new_device(udid)
    else:
        device_list = device_service.get_device_list()
        if len(device_list) > 0:
            device = device_service.new_device(device_list[0]['udid'])
    if device is None:
        print("No device attached")
        exit(-1)
    else:
        return device