[WFX] Android ADB 8.8
Moderators: white, Hacker, petermad, Stefan2
Re: [WFX] Android ADB 7.3
How view thumbnails .jpg on android device via ADB plugin? (sorry my english:)
Image: https://i.imgur.com/MdRlzZB.jpg
Image: https://i.imgur.com/MdRlzZB.jpg
Re: [WFX] Android ADB 7.3
sergk79 wrote: ↑2018-10-02, 16:39 UTC It looks like the plugin has an issue with listing filenames ending with two "==", so if you try to crate a dir with the name "privet==", the plugin will list it as "privet="
Here is the debug logs:
2018-10-02 12:33:58 [25A8] ADB Write: shell:ls -la "/data/local/"
2018-10-02 12:33:58 [25A8] ADB Read: OKAY
2018-10-02 12:33:58 [25A8] ADB Read Data: total 24
...
drwxrwx--x 40 system system 4096 2018-09-28 16:02 ..
drwxrwxrwx 2 root root 4096 2018-10-02 12:33 privet==
drwxrwx--x 3 shell shell 4096 2018-10-02 10:14 tmp
@sergk79
Try to list it from straight cmd/ADB prompt (not through the AndroidADB command line)
adb shell ls- la
to find out if the double "==" are being listed properly, or is it just an issue with the AndroidADB extension.
If it's being listed properly with a double "==" from straight cmd/ADB, then it's possible that only the listing/display is bad from the extension itself, but not its creation or renaming.
If it's being listed improperly with a single "=" from straight cmd/ADB, then it's possible that its creation or renaming is bad from the extension itself, but not its display/listing.
@jakubklos
With all due respect towards your preferred Linux version, however a lot of us "mere mortals* use it on Windows machines for daily file manipulations, and this is arguable the BESTADB extension with a graphical UI experience.
If you would be kind and possibly let "Enyby" fix up the code to work on "lame Windows", it would be greatly appreciated
Is it possible that the outdated ADB dll's might be causing some errors (ADBWinApi.DLL, ADBWinUSBApi.DLL)?
Re: [WFX] Android ADB 7.3
Post by *Enyby » 2018-09-07, 15:46 UTC
jakubklos
Odd. TC 9.0 x64 compiled with Lazarus. So all must work here too.
If you want - I can review your code for find solution. If this suitable for you we can discuss it on email.
Re:
OK, a little late and you've probably somehow handled the issue you had, but for future use, try this: https://www.fjsoft.at/en/
It's a nice piece of software, which among other things (contacts editing from Windows, backup, etc), offers the ability to remote-control your device from Windows! In newer devices, you may have to enable USB-debugging from developer options though.
- Wanderer -
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3
x64: Clients/Servers from Win7 to Win11 and Win2K12Srv to Win2K22Srv, mainly Win10 though.
Re: [WFX] Android ADB 7.3
I want to local the plugins, but can only local the RCData in resource, the list like "Options/Connect To Device", device function like "[logcat]/[power]", the windows like "Enter Device IP:Port" could not be local direct but the binary, and some string in Unicode some in UTF8, it would lost some function - icons, command, charature etc
Re: [WFX] Android ADB 7.3
I can not see a dir which is beginning from "." like ".System". What is the problem?
Re: [WFX] Android ADB 7.3
2Hirvitie,
Try to update content of plugin's bin folder (adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll) to the latest version.
Because with plugin is distributed not latest versions and theoretically, this may be the cause of some problems.
Here's my content of bin folder. Maybe it will helps.
Try to update content of plugin's bin folder (adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll) to the latest version.
Because with plugin is distributed not latest versions and theoretically, this may be the cause of some problems.
Here's my content of bin folder. Maybe it will helps.
#49857 Personal licence
Windows 10 Pro 64bit. TC 10.51 32 + 64bit
Windows 10 Pro 64bit. TC 10.51 32 + 64bit
Re: [WFX] Android ADB 7.3
Use another list command in plugins options.
All names started with dot is hidden. You need list command which show hidden files.
All names started with dot is hidden. You need list command which show hidden files.
Re: [WFX] Android ADB 7.3
2Tichij,2Enyby
Thank you very much. The fresh version and the right option made me a little happier.
Thank you very much. The fresh version and the right option made me a little happier.
Re: [WFX] Android ADB 7.3
There is one unpleasant problem.
If I copy a text file from the device to the PC, and then I look through it, everything works fine.
If I just press f3 in the panel to view the file, without copying it, then everything hangs for 2 minutes.
1 minute to try to copy directly and the second from a copy on the memory card.
Then the TC window "error loading file" appears.
ADB logs are no different. It looks like problems on the tc or plugin side.
How to fix it?
If I go to a temporary folder, then I can see a temporary file where the download should occur.
It contains the first 8192 bytes from the file.
And worst of all, the TC is blocked. I can not click cancel. I have to wait two minutes, or end adb.exe, then everything ends quickly.
Problem appear on x32 and x64 TC.
Call stack from x32 TC during hang:
wsock32.dll!recv+0x33
ADBPlugin.wfx+0x1ba0be
ADBPlugin.wfx+0x1c2472
ADBPlugin.wfx!FsGetFileW+0x75e
I think Adb plugin try read more bytes then received from adb.
Here copy file. it is OK:
Here view file. It is FAIL:
Copy file produce FsStatusInfoW with FS_STATUS_OP_GET_MULTI_THREAD.
View file produce FsStatusInfoW with FS_STATUS_OP_GET_SINGLE.
I think source of bug lead here. Copy file use separate thread and no deadlock.
View file use main thread and it is deadlocked by some reason.
Update TC from 9.21a to 9.22a. Issue appear but less often.
If I copy a text file from the device to the PC, and then I look through it, everything works fine.
If I just press f3 in the panel to view the file, without copying it, then everything hangs for 2 minutes.
1 minute to try to copy directly and the second from a copy on the memory card.
Then the TC window "error loading file" appears.
ADB logs are no different. It looks like problems on the tc or plugin side.
How to fix it?
If I go to a temporary folder, then I can see a temporary file where the download should occur.
It contains the first 8192 bytes from the file.
And worst of all, the TC is blocked. I can not click cancel. I have to wait two minutes, or end adb.exe, then everything ends quickly.
Problem appear on x32 and x64 TC.
Call stack from x32 TC during hang:
wsock32.dll!recv+0x33
ADBPlugin.wfx+0x1ba0be
ADBPlugin.wfx+0x1c2472
ADBPlugin.wfx!FsGetFileW+0x75e
I think Adb plugin try read more bytes then received from adb.
Here copy file. it is OK:
Code: Select all
2019-06-29 20:52:50 [15A0] Connecting to ADB server...
2019-06-29 20:52:50 [15A0] Connected
2019-06-29 20:52:50 [15A0] ADB Write: host:transport:emulator-5554
2019-06-29 20:52:50 [15A0] ADB Read: OKAY
2019-06-29 20:52:50 [15A0] ADB Write: sync:
2019-06-29 20:52:50 [15A0] ADB Read: OKAY
2019-06-29 20:52:50 [15A0] ADB Write: STA2!
2019-06-29 20:52:50 [15A0] ADB Read: FAIL
2019-06-29 20:52:50 [15A0] ADB Write: STAT!
2019-06-29 20:52:50 [15A0] ADB Read: unknown command
2019-06-29 20:52:50 [15A0] Connecting to ADB server...
2019-06-29 20:52:50 [15A0] Connected
2019-06-29 20:52:50 [15A0] ADB Write: host:transport:emulator-5554
2019-06-29 20:52:50 [15A0] ADB Read: OKAY
2019-06-29 20:52:50 [15A0] ADB Write: shell:busybox cp -f "/sdcard/Notes/1/compiler.dump.txt" "/storage/emulated/legacy/DAB859.tmp"
2019-06-29 20:52:50 [15A0] ADB Read: OKAY
2019-06-29 20:52:50 [15A0] ADB Read Data:
2019-06-29 20:52:50 [15A0] Connecting to ADB server...
2019-06-29 20:52:50 [15A0] Connected
2019-06-29 20:52:50 [15A0] ADB Write: host:transport:emulator-5554
2019-06-29 20:52:50 [15A0] ADB Read: OKAY
2019-06-29 20:52:50 [15A0] ADB Write: sync:
2019-06-29 20:52:50 [15A0] ADB Read: OKAY
2019-06-29 20:52:50 [15A0] ADB Write: STAT#
2019-06-29 20:52:50 [15A0] ADB Read: STAT°Ѓ
2019-06-29 20:52:50 [15A0] ADB STAT: "/storage/emulated/legacy/DAB859.tmp" size=65455 time=2019-06-29 20:52:56
2019-06-29 20:52:50 [15A0] ADB Write: RECV#
2019-06-29 20:52:50 [15A0] Connecting to ADB server...
2019-06-29 20:52:50 [15A0] Connected
2019-06-29 20:52:50 [15A0] ADB Write: host:transport:emulator-5554
2019-06-29 20:52:50 [15A0] ADB Read: OKAY
2019-06-29 20:52:50 [15A0] ADB Write: shell:busybox rm -f "/storage/emulated/legacy/DAB859.tmp"
2019-06-29 20:52:50 [15A0] ADB Read: OKAY
2019-06-29 20:52:50 [15A0] ADB Read Data:
Code: Select all
2019-06-29 20:53:28 [58B4] Connecting to ADB server...
2019-06-29 20:53:28 [58B4] Connected
2019-06-29 20:53:28 [58B4] ADB Write: host:transport:emulator-5554
2019-06-29 20:53:28 [58B4] ADB Read: OKAY
2019-06-29 20:53:28 [58B4] ADB Write: sync:
2019-06-29 20:53:28 [58B4] ADB Read: OKAY
2019-06-29 20:53:28 [58B4] ADB Write: STAT!
2019-06-29 20:53:28 [58B4] ADB Read: STAT°Ѓ
2019-06-29 20:53:28 [58B4] ADB STAT: "/sdcard/Notes/1/compiler.dump.txt" size=65455 time=2019-06-29 19:01:24
2019-06-29 20:53:28 [58B4] ADB Write: RECV!
2019-06-29 20:54:29 [58B4] Connecting to ADB server...
2019-06-29 20:54:29 [58B4] Connected
2019-06-29 20:54:29 [58B4] ADB Write: host:transport:emulator-5554
2019-06-29 20:54:29 [58B4] ADB Read: OKAY
2019-06-29 20:54:29 [58B4] ADB Write: shell:busybox cp -f "/sdcard/Notes/1/compiler.dump.txt" "/storage/emulated/legacy/5E2401C2.tmp"
2019-06-29 20:54:29 [58B4] ADB Read: OKAY
2019-06-29 20:54:29 [58B4] ADB Read Data:
2019-06-29 20:54:29 [58B4] Connecting to ADB server...
2019-06-29 20:54:29 [58B4] Connected
2019-06-29 20:54:29 [58B4] ADB Write: host:transport:emulator-5554
2019-06-29 20:54:29 [58B4] ADB Read: OKAY
2019-06-29 20:54:29 [58B4] ADB Write: sync:
2019-06-29 20:54:29 [58B4] ADB Read: OKAY
2019-06-29 20:54:29 [58B4] ADB Write: STAT%
2019-06-29 20:54:29 [58B4] ADB Read: STAT°Ѓ
2019-06-29 20:54:29 [58B4] ADB STAT: "/storage/emulated/legacy/5E2401C2.tmp" size=65455 time=2019-06-29 20:54:34
2019-06-29 20:54:29 [58B4] ADB Write: RECV%
2019-06-29 20:55:30 [58B4] Connecting to ADB server...
2019-06-29 20:55:30 [58B4] Connected
2019-06-29 20:55:30 [58B4] ADB Write: host:transport:emulator-5554
2019-06-29 20:55:30 [58B4] ADB Read: OKAY
2019-06-29 20:55:30 [58B4] ADB Write: shell:busybox rm -f "/storage/emulated/legacy/5E2401C2.tmp"
2019-06-29 20:55:30 [58B4] ADB Read: OKAY
2019-06-29 20:55:30 [58B4] ADB Read Data:
View file produce FsStatusInfoW with FS_STATUS_OP_GET_SINGLE.
I think source of bug lead here. Copy file use separate thread and no deadlock.
View file use main thread and it is deadlocked by some reason.
Update TC from 9.21a to 9.22a. Issue appear but less often.
Re: [WFX] Android ADB 7.3
viewtopic.php?f=3&t=53115 Here advice how to fix it.
I made a wrapper for the plugin. If the call was with
FS_STATUS_OP_GET_SINGLE then a new thread will be started for FsGetFileW, from where the plugin code will be called.
https://www20.zippyshare.com/v/40YVskuM/file.html
Extract wrapper.wfx and wrapper.wfx64 near ADBPlugin.wfx.
Unregister ADBPlugin.wfx, register wrapper.wfx.
All must work.
I made a wrapper for the plugin. If the call was with
FS_STATUS_OP_GET_SINGLE then a new thread will be started for FsGetFileW, from where the plugin code will be called.
https://www20.zippyshare.com/v/40YVskuM/file.html
Extract wrapper.wfx and wrapper.wfx64 near ADBPlugin.wfx.
Unregister ADBPlugin.wfx, register wrapper.wfx.
All must work.
Re: [WFX] Android ADB 7.3
Unfortunately I cannot reproduce the issue.
I am still on TC 8.51a x32 (it's a VM) connecting to ADB over TCP.
Tried short files to view (16bytes, 32kb and below 64kb) many many times. No issues at all.
Without being able to reproduce I cannot really fix it.
Apparently it times out in the RECV command. The command does not rely on a specified size. The protocol returns chunks of data with ID_DATA (and size to be read) and finally ID_DONE to signal the end of the file.
Either I can create a debug version of the plugin for you to see exactly how the data is signalled or if you can help me to reproduce....
I am still on TC 8.51a x32 (it's a VM) connecting to ADB over TCP.
Tried short files to view (16bytes, 32kb and below 64kb) many many times. No issues at all.
Without being able to reproduce I cannot really fix it.
Apparently it times out in the RECV command. The command does not rely on a specified size. The protocol returns chunks of data with ID_DATA (and size to be read) and finally ID_DONE to signal the end of the file.
Either I can create a debug version of the plugin for you to see exactly how the data is signalled or if you can help me to reproduce....
Re: [WFX] Android ADB 7.3
I have already figured out. The point is not how and what the plugin calls, but from which thread.
Apparently in the last TC, the behavior regarding multithreading is changed.
Here my code for fix:
Dirty code by illustrate main goal - run FsGetFileW from plugin in background thread.
Apparently in the last TC, the behavior regarding multithreading is changed.
Here my code for fix:
Code: Select all
procedure FsStatusInfoW(RemoteDir:pwidechar;InfoStartEnd,InfoOperation:integer); stdcall;
begin
currentInfo:=InfoOperation;
aFsStatusInfoW(RemoteDir,InfoStartEnd,InfoOperation);;
end;
function FsGetFileW(RemoteName,LocalName:pwidechar;CopyFlags:integer;RemoteInfo:pRemoteInfo):integer; stdcall;
var
Runner: TRunner;
ret: integer;
pRet: ^Integer;
begin
if currentInfo = FS_STATUS_OP_GET_SINGLE then begin
ret := 100;
pRet := @ret;
Runner := TRunner.Create;
Runner.aFsGetFileW := aFsGetFileW;
Runner.RemoteName := RemoteName;
Runner.LocalName := LocalName;
Runner.CopyFlags := CopyFlags;
Runner.RemoteInfo := RemoteInfo;
Runner.pRet:=pRet;
Runner.Start;
while ret = 100 do begin
aProgressProcW(aPluginNr,aSourceName, aTargetName,aPercentDone);
Sleep(100);
end;
Result := ret;
end else begin
Result := aFsGetFileW(RemoteName,LocalName,CopyFlags,RemoteInfo);
end;
end;
type
TRunner = class(TThread)
pRet: ^integer;
constructor TRunner.Create;
begin
inherited Create(True);
FreeOnTerminate := True;
end;
procedure TRunner.Execute;
begin
pRet^ := aFsGetFileW(RemoteName,LocalName,CopyFlags,RemoteInfo);
end;
{$ifdef WIN32}
adll:=LoadLibrary('ADBPlugin.wfx');
{$else}
adll:=LoadLibrary('ADBPlugin.wfx64');
{$endif}
aFsStatusInfoW := GetProcAddress(adll, 'FsStatusInfoW');
aFsGetFileW := GetProcAddress(adll, 'FsGetFileW');
Re: [WFX] Android ADB 7.3
Also, I think, need mention about drop support for Windows XP, in changelog.