alibaba / tidevice

tidevice can be used to communicate with iPhone device
MIT License
2.43k stars 459 forks source link

tidevice fsync /DCIM/ can not run successfully #238

Open Twinkle123321 opened 2 years ago

Twinkle123321 commented 2 years ago
image

tidevice -v 0.7.14 Python 3.6.5

anyone can help check this issue?

fanjlii commented 2 years ago

try tidevice fsync ls /DCIM/

Twinkle123321 commented 2 years ago

357B6373C74E6F6C9BCC56813F849D98 thanks a bunch! how about pull operation? it always return tidevice.exceptions.MuxError: write error: AFCStatus.INVALID_ARG and BrokenPipeError: [Errno 32] Broken pipe

same error in push_content in python tidevice related filepath = './images/test/testCase.json' #IMG_4675.JPG target_path = 'test-dir/' with open(filepath, 'rb') as f: preader = ProgressReader(f, filesize) settingFile.push_content(target_path, f) preader.finish()

could you help me check this?

try tidevice fsync ls /DCIM/

fanjlii commented 2 years ago

tidevice fsync pull /DCIM/a.jpg e:/a.jpg
tidevice fsync push e:/b.jpg /DCIM/b.jpg Only file operation is allowd, directory operation is disallowed

codeskyblue commented 2 years ago

Yes, directory operation is not implemented yet. pr welcome

codeskyblue commented 2 years ago

357B6373C74E6F6C9BCC56813F849D98 thanks a bunch! how about pull operation? it always return tidevice.exceptions.MuxError: write error: AFCStatus.INVALID_ARG and BrokenPipeError: [Errno 32] Broken pipe

same error in push_content in python tidevice related filepath = './images/test/testCase.json' #IMG_4675.JPG target_path = 'test-dir/' with open(filepath, 'rb') as f: preader = ProgressReader(f, filesize) settingFile.push_content(target_path, f) preader.finish()

could you help me check this?

try tidevice fsync ls /DCIM/

Try

tidevice fsync push hi.txt /DCIM/hi.txt
taozuia commented 2 years ago
image

上传成功了,但是打开相册不显示上传的照片,请问如何解决。谢谢

dhiravidamani238 commented 1 year ago

Hi

Can anyone answer this?

screenshot {'value': <PIL.PngImagePlugin.PngImageFile image mode=RGB size=349x500 at 0x103BB1390>, 'timestamp': 1679578634141}

How do i convert <PIL.PngImagePlugin.PngImageFile image mode=RGB size=349x500 at 0x103BB1390> value to NSImage to display on NSImageView in my mac application?

I'm getting this value using "tidevice perf -B bundleID" command in my macos application using swift language.

codeskyblue commented 1 year ago

我试着用野生版的chatgpt试了试, 给出了下面的答案

You can convert a PIL image to an NSImage using the following code:

from PIL import Image
from AppKit import NSImage

# Load the image using PIL
pil_image = Image.open('my_image.png')

# Convert the PIL image to an NSImage
ns_image = NSImage.alloc().initWithData_(pil_image.tobytes())

# Set the image on an NSImageView
image_view = NSImageView.alloc().initWithFrame_(NSMakeRect(0,0,349,500))
image_view.setImage_(ns_image)

Note that my_image.png should be replaced with the path to your PIL image file. Also, NSMakeRect(0,0,349,500) should be replaced with the desired size of your NSImageView.

Ryaningli commented 1 year ago
图像

上传成功了,但是打开相册不显示上传的照片,请问如何解决。谢谢

有解决方法么