MobileDevice icon indicating copy to clipboard operation
MobileDevice copied to clipboard

Windows support

Open vipinbeni opened this issue 10 years ago • 9 comments

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

vipinbeni avatar May 09 '14 08:05 vipinbeni

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.

mountainstorm avatar May 13 '14 08:05 mountainstorm

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

vipinbeni avatar May 13 '14 10:05 vipinbeni

Try replacing the line:

AMDeviceGetName = MobileDevice.AMDeviceGetName

in MobileDevice.py, with:

AMDeviceGetName = MobileDevice.AMDeviceCopyDeviceIdentifier

Let me know if it works :)

mountainstorm avatar May 13 '14 15:05 mountainstorm

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

vipinbeni avatar May 14 '14 03:05 vipinbeni

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
#]

mountainstorm avatar May 14 '14 06:05 mountainstorm

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 avatar May 14 '14 06:05 vipinbeni

After making comment i got another similar error shown below 1

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

vipinbeni avatar May 14 '14 08:05 vipinbeni

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

delvinj avatar Jan 09 '15 15:01 delvinj

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

leandroprz avatar Jan 20 '16 23:01 leandroprz