Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows support #19

Open
vipinbeni opened this issue May 9, 2014 · 9 comments
Open

Windows support #19

vipinbeni opened this issue May 9, 2014 · 9 comments

Comments

@vipinbeni
Copy link

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
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

Try replacing the line:

AMDeviceGetName = MobileDevice.AMDeviceGetName

in MobileDevice.py, with:

AMDeviceGetName = MobileDevice.AMDeviceCopyDeviceIdentifier

Let me know if it works :)

@mountainstorm mountainstorm reopened this May 13, 2014
@mountainstorm mountainstorm changed the title Unable to install setup .py Windows support May 13, 2014
@vipinbeni
Copy link
Author

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

@mountainstorm
Copy link
Owner

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
Copy link
Author

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
Copy link
Author

After making comment i got another similar error shown below
1

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

@delvinj
Copy link

delvinj commented Jan 9, 2015

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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants