ma1co / Sony-PMCA-RE

Reverse Engineering Sony Digital Cameras
MIT License
2k stars 222 forks source link

Timeout switching modes is too short to install an app #119

Open AndreMPCosta opened 5 years ago

AndreMPCosta commented 5 years ago

Camera takes a while to switch modes:

pmca-console-v0.17-win.exe install -i
Loading app list
Found 10 apps
 [ 1] com.github.ma1co.openmemories.tweak
 [ 2] com.jonasjuffinger.timelapse
 [ 3] com.github.ma1co.openmemories.appstore
 [ 4] com.obsidium.focusbracket
 [ 5] com.obsidium.bettermanual
 [ 6] org.bostwickenator.dofmath
 [ 7] org.bostwickenator.googlephotos
 [ 8] com.github.ma1co.pmcademo.app
 [ 9] org.bostwickenator.ftpuploader
 [10] com.github.LubikR.synologyuploader
Enter number of app to install (0 to abort): 2

Installing com.jonasjuffinger.timelapse
Using drivers Windows-MSC, Windows-MTP
Looking for Sony devices

Querying mass storage device
Sony DSC is a camera in mass storage mode

Switching to app install mode
Waiting for camera to switch...
Operation timed out. Please run this command again when your camera has connected.

I can't do anything past this, if I reset the camera to MTP mode the same thing happens, if I try to install while in this mode, it says the camera isn't connected, if the timeout was longer it probably would work.

lorient7 commented 5 years ago

I have the same problem. I have tried with all the versions of pmca, and with different versions of Windows and MacOS. I have a Sony FDR-AX33 camera (PAL version) and it always gives me the error "Operation time out".

ma1co commented 5 years ago

The problem isn't the timeout. As the output says, you can simply re-run the command when the camera is connected, it will be detected. The problem is that your camera doesn't connect. What is your camera model? Does it display the app installation screen?

AndreMPCosta commented 5 years ago

As you can see in the output "Querying mass storage device Sony DSC is a camera in mass storage mode"

The camera successfully connects, it just takes a while to switch to app installation mode. The timeout is just like 5 seconds, it's not enough to switch modes.

ma1co commented 5 years ago

In that case, just run the command again as soon as the camera has switched.

AndreMPCosta commented 5 years ago

As soon as the camera is switched to app mode, if I try to run it again, your program searches it in mass storage mode, so it doesn't recognize the camera and it says it isn't connected... Can you see the issue here?

ma1co commented 5 years ago

No, the program always searches both in mass storage and mtp mode. As I wrote above, the problem is not the timeout value, it's that your camera is not detected.

AndreMPCosta commented 5 years ago

So enlighten me why the camera magically switches to app installation mode. Care to explain this magic, if the camera, as you say, is not detected.

lorient7 commented 5 years ago

I have the same problem with the Sony FDR-AX33 (PAL version) camera. I have tried in all ways and with all versions of the pmca application and several operating systems (Win10, Win7, MacOS). And I always receive the error of time out. I have tried with the USB mass storage mode and the MTP. I've tried the console and gui versions, and it gives the same error. I have tried several times to install the application, just when I get the "time out" error, and it does not work, it keeps giving the error. I have tried with the web installation, and it gives me a connection error.

 On the other hand, when I ask for information from the camera, I am given correctly. And when I run the option start tweaking (updater mode) it does not give me an error either, but the option to switch between PAL and NTSC does not appear on the camera. I have tried to install an apk, and it also gives me time out error.

I also found an error when selecting the 35 languages. If you re-launch the option start tweaking (updater mode), it will not let you remove the 35 languages, and errors will appear.

ma1co commented 5 years ago

@AndreMPCosta The camera switches from mass storage mode to app install mode (MTP). This means that it shows up as a new usb device. The computer / program doesn't detect the mtp device, so the operation times out. If you re-run the command, the device is still not detected, so you get the same result. So once again: What is your camera model?

@lorient7 Have you enabled usb app installation using tweaking in updater mode? Regarding the error when disabling the language tweak, please open a new issue and post the error message.

lorient7 commented 5 years ago

Have you enabled usb app installation using tweaking in updater mode? Regarding the error when disabling the language tweak, please open a new issue and post the error message.**


Yes, I have enabled usb app installation using tewaking in updater mode. I have enabled all options (languages, pal / ntsc etc). And I have tried combinations of all options. That's when I detected that I could not deselect the language section.

I have exactly the same problem as AndreMPCosta. Pmca detects my camera, and I can ask for information from the camera and show it to me. I can also use tewaking update mode. But when I try to install an application of the 10 available, or when I try to install an application by selecting the apk file, I get the following error:

Switching to app install mode Waiting for camera to switch... Operation timed out. Please run this command again when your camera has connected.

voidism commented 3 months ago

The problem may not be related with the timeout. I printed the error message before timeout, it is actually [Errno 13] Access denied

Using drivers OS-X-MSC, libusb-MTP, libusb-vendor-specific
Looking for Sony devices

Querying mass storage device
Sony DSC is a camera in mass storage mode

Switching to app install mode
Waiting for camera to switch...
[Errno 13] Access denied (insufficient permissions)
[Errno 13] Access denied (insufficient permissions)
[Errno 13] Access denied (insufficient permissions)

I ran the install command again but with sudo, and the installation worked successfully!

MasterMong commented 3 months ago

I solved this problem by use USB3 instead of USB2.