T0biasCZe / AdbFileManager

Fast Android <-> Windows file manager using ADB protocol
444 stars 29 forks source link

[BUG]Copying ... (Not Responding) #19

Open byrevx opened 5 months ago

byrevx commented 5 months ago

Issue 1: When start copying ... the dialog is blocked, no refresh appears.

2024-01-21 13_04_33-WORK2 (E_)

The copying takes place correctly, in a few minutes it copied 7Gb of files, but no update appears in the dialog window.

Issue 2: When installing Windows 10, it tries to discourage you from installing this application, being unknown.

Issue 3: Avast antivirus quarantines the launcher, suspected with IDP.generic - is it a false positive !?

T0biasCZe commented 5 months ago

the dialog only updates when whole file finishes, the progress bar doesnt move depending on part of file being copied

and folder acts as 1 "file" during copying, so that the progress bar gets updated when the whole folder finishes copying

byrevx commented 5 months ago

I understood, only the dialog seems frozen, it doesn't behave intuitively... at the first run I forcibly stopped the task, I didn't know what was happening!

I don't know how the "underground" routine works, maybe the file names should be extracted from the folders (recursively) and then copied, or maybe some kind of hook in the windows api. Honestly, I don't know exactly, I haven't made Windows applications for almost 20 years, at that time I was using Delphi, Pascal and Assembler, memories from long gone times!

maibe possibly simulating an action, something animated, a gradient bar, a small "robot" doing something :)) ...

P.S. The program works as it should, just a few "hiccups"!

I wish you a happy life. ByREV!

T0biasCZe commented 5 months ago

maybe some kind of hook in the windows api

nah under the hood the application just calls adb commands in cmd :DDD always just does "adb ls <current_directory" and then parses the output and shows it in the datagridview. And when you copy files it just uses the "adb push" and "adb pull" commands

but yeah unwrapping the list theoretically should work. i thought that i could go through the list, and unwrap each folder. and then do that again until it stops unwrapping folder the disadvantage would be that there would be some performance hit over just copying whole folder at once, since it would constantly be stopping and starting the copy operations

T0biasCZe commented 5 months ago

temporarily i just added label into the corner image

byrevx commented 5 months ago

Thanks for the reply. As I said, I haven't programmed on windows for 2 decades :), currently only PHP/WP, JS But I searched for some information + some query with ChatGPT & Bard and I got some solutions, but they are not tested and probably need some adaptations to what you use.

The adb command seems to already have the ability to view progress.

Variant 1 = This can be done using subprocesses in many programming languages: Python

2024-01-22 12_30_08-Copilot with GPT-4 - Personal - Microsoft​ Edge

and variant 2:, redirect the output of the adb pull command to a log file and then read that file periodically to update your progress bar:

adb pull -p /sdcard/movie.mp4 C:/Users/YourUsername/Desktop/ > adb_output.log

2024-01-22 12_30_43-Copilot with GPT-4 - Personal - Microsoft​ Edge

Remember, I don't know Python, the code in the images is not functionally tested or checked for syntax, it may have errors or not work as expected.

But as an idea, it can be a starting point for inspiration!

T0biasCZe commented 5 months ago

Remember, I don't know Python

but this application is in C# not Python :|

and i added option for "unwrapping" the folders, so when you select large folder(s), it replaces the folder with the contents of that folder, and it does that recursively for all the folders. so the progress bar is smoother and doesnt just show "0 files from 1 copied"

T0biasCZe commented 5 months ago

Added this in v1.7 release https://github.com/T0biasCZe/AdbFileManager/releases/tag/v1.7