AmazeFileManager
AmazeFileManager copied to clipboard
File copy operation is paused when the phone goes in stand by mode
When I'm copying a large file using SFTP, the process can take more than 1 minute, so the phone goes in stand by mode after that time. Instead of continuing the copy operation in the background (as it does not require user input...), the copy operation does not continue until I unlock the phone. After unlocking the phone the copy operation continues, but pauses again at the next phone stand by.
Ping @TranceLove.
Copying files over SFTP also uses CopyService under the hood... and I tried the same on Oneplus 2 running Slim7 (7.1.2) and Sony Xperia Z1 Compact running CM13 (6.0.1) too, using Amaze's current master and my Ubuntu workstation running OpenSSH server 7.6p1. File copy was not suspended and file was successfully saved to device.
So my next questions to ask are
- details about device, Android version, etc
- does "standby mode" means pressing the power button on the device to turn screen off and lock device?
The device is a BQ Aquaris X5 running LineageOS based on Android 7.1.2 The Amaze version is 3.3.2 from f-droid
Yes, by stand by mode I mean either pressing the power button, or waiting enough time to have the device turn the screen off and lock itself automatically.
On the server side I'm using an old Fedora 20 server with openssh-server-6.4p1
When trying the same operation with FX File manager, the copy operation is much faster, and when the device is locked, the copy operation continues normally in the background, so it is not a problem neither on the server side, nor on the mobile operating system side.
Battery optimisation is enabled by default. We should present a way for user to disable it. Just for sake of testing, could you try disable battery optimisation for Amaze manually from system settings and try copying file again?
As for copying speeds, sadly it can't be improved any further.
On Mon, 21 Jan, 2019, 1:48 PM Franco Bugnano, [email protected] wrote:
The device is a BQ Aquaris X5 running LineageOS based on Android 7.1.2
Yes, by stand by mode I mean either pressing the power button, or waiting enough time to have the device turn the screen off and lock itself automatically.
On the server side I'm using an old Fedora 20 server with openssh-server-6.4p1
When trying the same operation with FX File manager, the copy operation is much faster, and when the device is locked, the copy operation continues normally in the background, so it is not a problem neither on the server side, nor on the mobile operating system side.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/TeamAmaze/AmazeFileManager/issues/1572#issuecomment-455984266, or mute the thread https://github.com/notifications/unsubscribe-auth/AE-FsMbTkNMMas8tutFmeEbHroNRVcq3ks5vFXfhgaJpZM4aJCDy .
Not being able to speed up the file transfer is not a big issue. However, I tried again copying a big file through SFTP with and without the battery optimizations for Amaze. With the battery optimizations, after about 2 minutes of stand by, the file copy operation pauses. Without the battery optimizations, the file copy operation fails after a few seconds.
Will look into it.
As for copying speeds, sadly it can't be improved any further.
Perhaps increase GenericCopyUtils.DEFAULT_BUFFER_SIZE from 8192 bytes to a bigger one may do?
Made a quick test using buffer size of 1 megabyte (1048576), copied a file over SFTP. Say a file needed 8 minutes to copy in the past, now it can be done in under 3 minutes.
@TranceLove didn't test increasing buffer size with wireless network. For internal memory, it's the ideal size and increasing it makes no difference in speeds (might increase chances of crash). For client implementations (both SMB and SFTP) you can try different values and make changes only to these implementation (maybe declare a separate variable for these). I'll leave it up to you. As for the pausing on copy operation, I'll see what can be done.
@zent-co could you please check this.
@VishalNehra I do not have a rooted device, but I tried enabling Root Explorer preference. While I can navigate to root directory, I cannot see any system files or folders. Short of rooting my phone, is there anything else I can do to attempt to recreate the issue?
The easiest way would still be root an unused phone. You can root an Android emulator, but the steps are clumsy and not easy to repeat.
An inexpensive solution I'd recommend LG Nexus 5x - lightweight, inexpensive (as of now), with some caveats though, but it's so cheap that you won't cry if it's broken some day.
Hi @bugnano:
I believe I have this issue fixed. I was not able to reproduce your exact problem, but I did see similar issues that I fixed. Would you be willing to test out a special build that I provide to see if this is fixed on your end?
Sure, just give me the apk and I'll try it
Cool. I'm not sure the best way to get you the apk. Want me to email it to you? If so, send me an email at zent.col at gmail.com
I tried the debug build and the copy operation is about twice as fast, but still not as fast as fx. Turning on or off the battery optimization did not change the fact that the copy operation stops after 2 minutes of stand by
Just to double check, does the copying operation automatically resume once the device comes out of standby? When the device comes out of standby is the notification that the server is still running in the notification panel?
I confirm that the copy operation resumes after the standby
And the notification is still in the notification panel? This notification states that the FTP Server is running and gives the ip address and port of the server
This should be fixed with wakelocks at #3066
Is still happening in v3.9
Is there changelog somewhere where I can check whether v3.9 has #3066 ?
https://github.com/TeamAmaze/AmazeFileManager/milestone/10?closed=1 seems suggest that it was part of 3.7...
@VishalNehra ping