killall -9 PTPCamera (kill the PTPCamera process) after connecting the camera for gphoto to work properly. It really helps, but every time you connect the camera, you have to repeat the procedure again. Of course, you can simply remove the PTPCamera program, but I wanted to get by with a less radical solution.
MassStorageCamera.app , PTPCamera.app , TWAINBridge.app , etc.) live in the system /System/Library/Image Capture/Devices and /Library/Image Capture/Devices folders. $ pgrep PTPCamera 29045 $ ps -O ppid -p 29045 PID PPID TT STAT TIME COMMAND 29045 202 ?? S 0:00.10 /System/Library/Image Capture/Devices/PTPCamer $ ps -p 202 PID TTY TIME CMD 202 ?? 0:16.75 /sbin/launchd $ ps -A -O user | grep /sbin/launchd 1 root ?? Ss 3:06.80 /sbin/launchd 172 _windowserver ?? Ss 0:00.06 /sbin/launchd 202 nickz ?? Ss 0:16.76 /sbin/launchd 206 _spotlight ?? Ss 0:00.27 /sbin/launchd 28919 _cvmsroot ?? Ss 0:00.01 /sbin/launchd 28937 _securityagent ?? Ss 0:00.01 /sbin/launchd $ launchctl list | grep PTPCamera 29045 - [0x0-0x457457].com.apple.PTPCamera launchctl log level debug ), and trigger PTPCamera to restart./etc/syslog.conf file *.debug /var/log/debug.log syslogd daemon about the need to re-read the settings sudo killall -HUP syslogd debug.log . Find the required: ([0x0-0x2d92d9].com.apple.PTPCamera[24472]): Spawned by PID 240: com.apple.SystemUIServer.agent launchd information about com.apple.SystemUIServer.agent : $ launchctl list com.apple.SystemUIServer.agent { "Program" = "/System/Library/CoreServices/SystemUIServer.app/Contents/MacOS/SystemUIServer"; }; PTPCamera is SystemUIServer , no less.SystemUIServer itself, but in one of the linked frameworks: $ otool -L /System/Library/CoreServices/SystemUIServer.app/Contents/MacOS/SystemUIServer /System/Library/CoreServices/SystemUIServer.app/Contents/MacOS/SystemUIServer: /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI /System/Library/PrivateFrameworks/Admin.framework/Versions/A/Admin /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon /System/Library/PrivateFrameworks/SystemUIPlugin.framework/Versions/A/SystemUIPlugin /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit /System/Library/Frameworks/Security.framework/Versions/A/Security /System/Library/PrivateFrameworks/ICANotifications.framework/Versions/A/ICANotifications /System/Library/PrivateFrameworks/iPod.framework/Versions/A/iPod ... ICANotifications.framework . ICA is short for image capture , the same acronym is used in public frameworks to capture images.strings command.strings /System/Library/PrivateFrameworks/ICANotifications.framework/Versions/A/ICANotifications , and enjoy the results: ... /Library/Caches/com.apple.ImageCaptureNotifications.DeviceDiscoveryDatabase.%d ... CREATE TABLE DBVersion (ID integer primary key not null, typeID integer, value integer) CREATE TABLE SourceFile (ID integer primary key not null, typeID integer, bundleID varchar(256), bundleVersion integer, bundlePath varchar(256), deviceDiscoveryPath varchar(256), deviceDiscoveryModDate varchar(20), readDate varchar(20), iTWAINDS integer) CREATE TABLE IOUSBDevice (ID integer primary key not null, typeID integer, idVendor integer, idProduct integer) CREATE TABLE IOUSBInterface (ID integer primary key not null, typeID integer, bInterfaceClass integer, bInterfaceSubClass integer, bInterfaceProtocol integer) ... com.apple.ImageCaptureNotifications.DeviceDiscoveryDatabase in /Library/Caches . $ ls /Library/Caches/com.apple.ImageCaptureNotifications.DeviceDiscoveryDatabase.* /Library/Caches/com.apple.ImageCaptureNotifications.DeviceDiscoveryDatabase.501 $ sqlite3 /Library/Caches/com.apple.ImageCaptureNotifications.DeviceDiscoveryDatabase.501 sqlite> .schema CREATE TABLE DBVersion (ID integer primary key not null, typeID integer, value integer); CREATE TABLE IOUSBDevice (ID integer primary key not null, typeID integer, idVendor integer, idProduct integer); CREATE TABLE IOUSBInterface (ID integer primary key not null, typeID integer, bInterfaceClass integer, bInterfaceSubClass integer, bInterfaceProtocol integer); ... com.apple.ImageCaptureNotifications.DeviceDiscoveryDatabase.501 ), each user has its own file. From the content it is clear that the base sets the list of correspondences of the class of devices and the control program that must be launched when a device is detected.PTPCamera for any selected user, this is an unambiguous success !/Library/Caches tells us that the OS can regenerate the contents if necessary).Source: https://habr.com/ru/post/173323/
All Articles