mountainstorm / MobileDevice

A python package, and command line tool, which wraps Apple's MobileDevice API - providing access to iOS devices.
MIT License
195 stars 67 forks source link

Windows support #19

Open vipinbeni opened 10 years ago

vipinbeni commented 10 years ago

Hi Sir, Now i install it successfully but a new error is coming i attaching my error . how to import this dll errcore

,i want to extract all photo and vedio from appliction like flickr ,instagram ,imovie etc can this possible with script .

I m windows user

please help me

thanks

mountainstorm commented 10 years ago

Yep; at the moment I haven't added windows support. It should be relatively trivial if you can program in python and know ctypes as I designed the library to wrap Apple's MobileDeviceFramework.

All you should need to do is change the assertion in (CoreFoundation.py) to be a line something like:

CoreFoundation = DLL(u'C:\\Program Files\\iTunes\\CoreFoundation.dll')

You'll also need to do something similar in MobileDevice.py for the iTunesMobileDevice.dll. You will want to double check the path to them (I'm guessing they live under program files/itunes).

Ideally you need to lookup the path in the registry; but hard coding it should work in your case.

vipinbeni commented 10 years ago

Hi Sir, thanks for reply now I am able to resolved above issue now i get following function name error in MobileDevice.py please help me . i attaching error screen errmob

thanks

mountainstorm commented 10 years ago

Try replacing the line:

AMDeviceGetName = MobileDevice.AMDeviceGetName

in MobileDevice.py, with:

AMDeviceGetName = MobileDevice.AMDeviceCopyDeviceIdentifier

Let me know if it works :)

vipinbeni commented 10 years ago

Hi Sir, i change this but now i get similar error for at line 299 in MobileDevice.py err

mountainstorm commented 10 years ago

Strange; I'll have to get a copy of the windows dll and see what they have changed. It seems likely there would be a similar function.

Try just commenting it out for the moment (and anything else you find) but let me know what you needed to patch out e.g.

#AMDeviceMountImage = MobileDevice.AMDeviceMountImage
#AMDeviceMountImage.restype = mach_error_t
#AMDeviceMountImage.argtypes = [
#   AMDeviceRef, 
#   CFStringRef, 
#   CFDictionaryRef, 
#   AMDeviceProgressCallback, 
#   c_void_p
#]
vipinbeni commented 10 years ago

Dear Sir,

I want to extract images ,video, and document of application like instagram ,flickr, imovies, iBooks etc

a product extract these photo/video from below directory using afc pls help me how can i do

com.burbn.instagram - /Documents/DCIM com.yahoo.flickr - /Library/Caches/CapturedPhotos com.taptaptap- /Documents com.apple.mobileiphoto- /Library/Media com.apple.iBooks - /Documents

If you required i will provide you log of that product.

vipinbeni commented 10 years ago

After making comment i got another similar error shown below 1

after make this portion comment too then i got this error 2

delvinj commented 9 years ago

I'm not sure where Windows support stands, but I was able to get a little bit further than the above by commenting the following in MobileDevice.py.

AMDeviceMountImage AMDeviceUSBDeviceID AMDeviceUSBProductID

So I can at least enumerate, connect() and disconnect() to devices. So far so good.

However when I try using the device with WebKitInspector, I get the following:

    Traceback (most recent call last):
  File "test.py", line 70, in <module>
    devices_test()
  File "test.py", line 44, in devices_test
    inspector.navigate(u"<snip>");
  File "E:\Files\MobileDevice\webkitinspector.py", line 141, in navigate
    self.reportIdentifier(conn)
  File "E:\Files\MobileDevice\webkitinspector.py", line 53, in reportIdentifier
    u'WIRConnectionIdentifierKey': connection_uuid,
  File "E:\Files\MobileDevice\wirservice.py", line 48, in _sendmsg
    u'WIRFinalMessageKey': wi[start:end]
  File "E:\Files\MobileDevice\plistservice.py", line 59, in _sendmsg
    os.write(self.s, struct.pack(endian.encode(u'utf-8'), len(data)))
OSError: [Errno 9] Bad file descriptor
leandroprz commented 8 years ago

I'm experiencing the same issue. Any plans on updating the script to support Windows?