AmazeFileManager icon indicating copy to clipboard operation
AmazeFileManager copied to clipboard

FtpService improvements

Open TranceLove opened this issue 9 months ago • 6 comments

Description

  • FtpTileService convert to Kotlin
  • Replace EventBus with kotlinx.coroutines
  • FtpServerFragment update code to recommended
  • FtpService explicitly acquires wakelock and enforces START_STICKY to ensure it's still running in the background even in the doze mode
  • Upgrade ACRA to 2.13 for fixing https://github.com/square/leakcanary/issues/2568, which would also break FtpService when device screen is turned off

Issue tracker

Fixes #4125

Automatic tests

  • [ ] Added test cases

Manual tests

  • [x] Done

Device: Fairphone 5 running LineageOS 22 (Android 15)

  1. Start FTP server
  2. Connect to the FTP server using other device
  3. Start a file transfer
  4. Turn off the screen while transfer in progress
  5. File transfer should not break

Build tasks success

Successfully running following tasks on local:

  • [x] ./gradlew assembledebug
  • [x] ./gradlew spotlessCheck

Related PR

Depends on PR #4378

TranceLove avatar Apr 06 '25 02:04 TranceLove

3e2cbf3 for the conflict introduced by #4371

VishnuSanal avatar Apr 14 '25 08:04 VishnuSanal

Need to pass #4378 first to fix the foregroundService problem.

TranceLove avatar Apr 16 '25 16:04 TranceLove

Filezilla is not able to connect to the server. I have rebased to release/4.0 head:

Estado:	Conectando a 192.168.100.13:2211...
Respuesta:	fzSftp started, protocol_version=11
Comando:	open "[email protected]" 2211
Error:	FATAL ERROR: Remote side unexpectedly closed network connection
Error:	No se pudo conectar al servidor

Device: Moto G73 5G

EmmanuelMess avatar Apr 23 '25 20:04 EmmanuelMess

Filezilla is not able to connect to the server. I have rebased to release/4.0 head:

Estado:	Conectando a 192.168.100.13:2211...
Respuesta:	fzSftp started, protocol_version=11
Comando:	open "[email protected]" 2211
Error:	FATAL ERROR: Remote side unexpectedly closed network connection
Error:	No se pudo conectar al servidor

Device: Moto G73 5G

SFTP is not FTPS which we have here - a FTP server with TLS support :eyes:

TranceLove avatar May 04 '25 03:05 TranceLove

Okay,how are you testing this? I cannot get it to connect. With lftp on a real phone I get "`ls' en 0 [Negociando FEAT...]". For an emulator it doesn't even connect, but I suspect the ip bridging is broken.

EmmanuelMess avatar May 08 '25 00:05 EmmanuelMess

Easiest way would be let the FTP server run on real device, then connect over LAN. I too have a lot of trouble to get it run on emulator for local clients to connect.

TranceLove avatar Jun 12 '25 15:06 TranceLove