[WFX] Android ADB 7.3

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Stefan2, white, sheep, Hacker

Post Reply
yyang
Junior Member
Junior Member
Posts: 66
Joined: 2007-03-27, 11:41 UTC
Location: China

Post by *yyang » 2012-07-18, 08:27 UTC

With version 1.3, Chinese characters in file names fail to display properly (e.g., ?????.4e.???.pdf). I remember that version 1.2 works well, but not absolutely sure. If you could provide download link for version 1.2, I'll try it again.

My environment is Galaxy S+ with Android 2.3.6, and Windows XP Pro SP3 (both Simplified Chinese edition).
#147523

jakubklos
Senior Member
Senior Member
Posts: 219
Joined: 2012-07-11, 14:48 UTC

Post by *jakubklos » 2012-07-18, 08:29 UTC

nsp wrote:
damjang wrote:
damjang wrote:Is it possible to copy only the requested exe/dll of adb to plugin dir and use this instead of install all the sdk?
I try on winXPsp2 and on win7x64 with TC8.0x32. I installed only the android usb driver and copy the files (all only 340k) from the sdk platform-tools:

Code: Select all

adb.exe
AdbWinApi.dll
AdbWinUsbApi.dll
to a dir in TC. Then set the path in fsplugin.ini
Work ok!
This work fine also on Windows seven 32/64bit. Birdysync that synchronize contacts from Thunderbird to android alo use adb to communicate with device and only those 3 DLL are necessary for standard stuff.

If you have any usb driver provider by your device manufacturer or standard google usb driver (plus tweak for tegra 2 tablet) you can also use usb without any trouble for all debug enabled devices !
You just have to launch adb server.

Anyhow i did not succeed to do any screenshot.

2 new functionnalities :
A) could it be possible to get meta data for installed application like it is done with android commander in order to view it with file properties?

B) could be possible to to have a dedicated script folder in local pc to execute script in remote device.
Ok the adb binary is supplied with the plugin now in 1.4 and it works fine.

Regarding the screenshot.

This is how it is called:
java -jar " + PluginDir + 'screenshot.jar" -s ' + DeviceId + ' "' + TempFile + '"'
Please try if it's working from command line. If yes then do you have any national characters in your TC path?

About the 2 FRs:
A) Could you send me a screenshot or something? Is there any tool to get metadata apart from extracting the .apk or writing an android java app?
B) How do you see this exactly? Similar to the .apps folder? So you can copy a file to it and it will actually parse the script and run it via shell? Or it will be uploaded to the device and run there? Need more details.
Anyway, probably it would be better to have the script on the device already and simply run it, right?

jakubklos
Senior Member
Senior Member
Posts: 219
Joined: 2012-07-11, 14:48 UTC

Post by *jakubklos » 2012-07-18, 08:31 UTC

yyang wrote:With version 1.3, Chinese characters in file names fail to display properly (e.g., ?????.4e.???.pdf). I remember that version 1.2 works well, but not absolutely sure. If you could provide download link for version 1.2, I'll try it again.

My environment is Galaxy S+ with Android 2.3.6, and Windows XP Pro SP3 (both Simplified Chinese edition).
Are you sure the filename is in utf-8 on that device? It is 100% unicode and utf8 based so it should work. You can send me the file zipped (with utf8 encoding of course) and I will test

tcvol
Junior Member
Junior Member
Posts: 66
Joined: 2009-02-02, 12:35 UTC

Post by *tcvol » 2012-07-18, 09:04 UTC

excellent .. love it ..

yyang
Junior Member
Junior Member
Posts: 66
Joined: 2007-03-27, 11:41 UTC
Location: China

Post by *yyang » 2012-07-18, 09:16 UTC

jakubklos wrote:Are you sure the filename is in utf-8 on that device? It is 100% unicode and utf8 based so it should work. You can send me the file zipped (with utf8 encoding of course) and I will test
Thanks for your prompt reply! I've uploaded a small test case here: http://www.4shared.com/zip/lYC6lQcl/adbtestcase.html.

"test.zip" contains my test file, "我的笔记.txt". From the ADB plugin, the display name is "????.txt" for me. The text file's content is "我的笔记" in UTF-8, by the way. This zip file was created by Total Commander for Android.

"test.txt" is the result of executing "ls > test.txt" in the directory of the test file ("我的笔记.txt") from an ADB shell console. Since "test.txt" is UTF-8 encoded, I think the encoding of the test file name is OK. Thank again!

jakubklos
Senior Member
Senior Member
Posts: 219
Joined: 2012-07-11, 14:48 UTC

Post by *jakubklos » 2012-07-18, 09:46 UTC

yyang wrote:
jakubklos wrote:Are you sure the filename is in utf-8 on that device? It is 100% unicode and utf8 based so it should work. You can send me the file zipped (with utf8 encoding of course) and I will test
Thanks for your prompt reply! I've uploaded a small test case here: http://www.4shared.com/zip/lYC6lQcl/adbtestcase.html.

"test.zip" contains my test file, "我的笔记.txt". From the ADB plugin, the display name is "????.txt" for me. The text file's content is "我的笔记" in UTF-8, by the way. This zip file was created by Total Commander for Android.

"test.txt" is the result of executing "ls > test.txt" in the directory of the test file ("我的笔记.txt") from an ADB shell console. Since "test.txt" is UTF-8 encoded, I think the encoding of the test file name is OK. Thank again!
Ok, I know what the problem is now. "busybox ls" corrupts the encoding somehow. Plain "ls" works fine however we lose some additional functionality. This seems like a pretty big bug of busybox to me.

Any ideas here? I use busybox for these operations (rm, mkdir, mv, ls). Of course if there is no busybox the stock tools are used but this is a different case. busybox exists but returns malformed data.

I have even found the bug:
https://dev.openwrt.org/ticket/7993
But it was not fixed

jakubklos
Senior Member
Senior Member
Posts: 219
Joined: 2012-07-11, 14:48 UTC

Post by *jakubklos » 2012-07-18, 10:59 UTC

jakubklos wrote:
yyang wrote:
jakubklos wrote:Are you sure the filename is in utf-8 on that device? It is 100% unicode and utf8 based so it should work. You can send me the file zipped (with utf8 encoding of course) and I will test
Thanks for your prompt reply! I've uploaded a small test case here: http://www.4shared.com/zip/lYC6lQcl/adbtestcase.html.

"test.zip" contains my test file, "我的笔记.txt". From the ADB plugin, the display name is "????.txt" for me. The text file's content is "我的笔记" in UTF-8, by the way. This zip file was created by Total Commander for Android.

"test.txt" is the result of executing "ls > test.txt" in the directory of the test file ("我的笔记.txt") from an ADB shell console. Since "test.txt" is UTF-8 encoded, I think the encoding of the test file name is OK. Thank again!
Ok, I know what the problem is now. "busybox ls" corrupts the encoding somehow. Plain "ls" works fine however we lose some additional functionality. This seems like a pretty big bug of busybox to me.

Any ideas here? I use busybox for these operations (rm, mkdir, mv, ls). Of course if there is no busybox the stock tools are used but this is a different case. busybox exists but returns malformed data.

I have even found the bug:
https://dev.openwrt.org/ticket/7993
But it was not fixed
Ok I have been able to overcome the problem:

"busybox ls" not used because utf8 is not supported (https://dev.openwrt.org/ticket/7993), ls syntax detection improved, new option to switch back to busybox ls in fsplugin.ini
v1.4 will cover it too

jakubklos
Senior Member
Senior Member
Posts: 219
Joined: 2012-07-11, 14:48 UTC

New version 1.4

Post by *jakubklos » 2012-07-19, 06:49 UTC

Ok guys, a new version has been released.
1.4
- adb binary included (works only with the connect feature) - no need to install Android SDK
- "busybox ls" not used because utf8 is not supported (https://dev.openwrt.org/ticket/7993), ls syntax detection improved, new option to switch back to busybox ls in fsplugin.ini
- Execution operations full unicode
- An error is displayed if Java could not be run
- Copy/Move between 2 ADB devices support added

damjang
Senior Member
Senior Member
Posts: 205
Joined: 2003-10-09, 15:58 UTC
Contact:

Post by *damjang » 2012-07-19, 08:48 UTC

I have tested the v1.4 and for standalone use of adb.exe there is missing the AdbWinUsbApi.dll. Without it for me connection with usb don't work.
Then I have also find some problem in dir show. In TC it is listed like:

Code: Select all

12.00    txt    1.980
but the ls -l sniffed with SocketSniff is:

Code: Select all

Receive: Return Code: 0x00000000
001Fhost:transport:304D19D5A44B229E

Receive: Return Code: 0x00002733


Send: Return Code: 0x00000000
OKAY

Receive: Return Code: 0x00000000
002Bshell:ls -l "/mnt/sdcard/Android/apk/test/"

Receive: Return Code: 0x00002733


Send: Return Code: 0x00000000
OKAY

Send: Return Code: 0x00000000
-rwxrwxr-x system   sdcard_rw        0 1980-01-01 01:00 prova 2012.01.01 12.00.txt
-rwxrwxr-x system   sdcard_rw   522359 2012-05-07 01:05 Barcode_Scanner_v4.1.apk
-rwxrwxr-x system   sdcard_rw   532395 2004-01-01 14:01 Barcode_Scanner_v4.2.apk
-rwxrwxr-x system   sdcard_rw  6378112 1980-01-01 01:00 DejaOffice2_2_2_309.apk
I tested on Android 2.3.5 rooted, busybox v1.20.2 to winXP-SP2 TC8.0x32

Umpal
Junior Member
Junior Member
Posts: 32
Joined: 2010-12-23, 13:33 UTC

Post by *Umpal » 2012-07-19, 11:03 UTC

Guys, how do I know what port should I use in order connect to my phone (through WiFi)? I tried 5555 and 5554 as on the posted screenshot but it didn't work. My USB Debug is on, I even turned off my PC's firewall to be sure.

jakubklos
Senior Member
Senior Member
Posts: 219
Joined: 2012-07-11, 14:48 UTC

Post by *jakubklos » 2012-07-19, 11:26 UTC

damjang wrote:I have tested the v1.4 and for standalone use of adb.exe there is missing the AdbWinUsbApi.dll. Without it for me connection with usb don't work.
Then I have also find some problem in dir show. In TC it is listed like:

Code: Select all

12.00    txt    1.980
but the ls -l sniffed with SocketSniff is:

Code: Select all

Receive: Return Code: 0x00000000
001Fhost:transport:304D19D5A44B229E

Receive: Return Code: 0x00002733


Send: Return Code: 0x00000000
OKAY

Receive: Return Code: 0x00000000
002Bshell:ls -l "/mnt/sdcard/Android/apk/test/"

Receive: Return Code: 0x00002733


Send: Return Code: 0x00000000
OKAY

Send: Return Code: 0x00000000
-rwxrwxr-x system   sdcard_rw        0 1980-01-01 01:00 prova 2012.01.01 12.00.txt
-rwxrwxr-x system   sdcard_rw   522359 2012-05-07 01:05 Barcode_Scanner_v4.1.apk
-rwxrwxr-x system   sdcard_rw   532395 2004-01-01 14:01 Barcode_Scanner_v4.2.apk
-rwxrwxr-x system   sdcard_rw  6378112 1980-01-01 01:00 DejaOffice2_2_2_309.apk
I tested on Android 2.3.5 rooted, busybox v1.20.2 to winXP-SP2 TC8.0x32
Ok, I will add the usb dll too.

As for the ls issue. I will use your ls output and debug and try to fix it
Thank you

jakubklos
Senior Member
Senior Member
Posts: 219
Joined: 2012-07-11, 14:48 UTC

Post by *jakubklos » 2012-07-19, 11:27 UTC

Umpal wrote:Guys, how do I know what port should I use in order connect to my phone (through WiFi)? I tried 5555 and 5554 as on the posted screenshot but it didn't work. My USB Debug is on, I even turned off my PC's firewall to be sure.
You need to use some WiFi ADB app from the market. I use "WiFi ADB" and start it. It will show you the IP and the port...

Umpal
Junior Member
Junior Member
Posts: 32
Joined: 2010-12-23, 13:33 UTC

Post by *Umpal » 2012-07-19, 11:38 UTC

jakubklos wrote:
Umpal wrote:Guys, how do I know what port should I use in order connect to my phone (through WiFi)? I tried 5555 and 5554 as on the posted screenshot but it didn't work. My USB Debug is on, I even turned off my PC's firewall to be sure.
You need to use some WiFi ADB app from the market. I use "WiFi ADB" and start it. It will show you the IP and the port...
Thanks for quick reply.
Unfortunately WiFi ADB says that requires rooted phon. I tried with ADB WiFi (where says 'Touch the bug to switch server state'. When I click info appears: 'Can't execute ADB server state change commands'.
I went with WiFi ABD widget as well but this little fellow displays 'Please Wait' for a second and nothing happens.
Any other idea? I don't want to root this phone yet.

jakubklos
Senior Member
Senior Member
Posts: 219
Joined: 2012-07-11, 14:48 UTC

Post by *jakubklos » 2012-07-19, 11:39 UTC

damjang wrote:I have tested the v1.4 and for standalone use of adb.exe there is missing the AdbWinUsbApi.dll. Without it for me connection with usb don't work.
Then I have also find some problem in dir show. In TC it is listed like:

Code: Select all

12.00    txt    1.980
but the ls -l sniffed with SocketSniff is:

Code: Select all

Receive: Return Code: 0x00000000
001Fhost:transport:304D19D5A44B229E

Receive: Return Code: 0x00002733


Send: Return Code: 0x00000000
OKAY

Receive: Return Code: 0x00000000
002Bshell:ls -l "/mnt/sdcard/Android/apk/test/"

Receive: Return Code: 0x00002733


Send: Return Code: 0x00000000
OKAY

Send: Return Code: 0x00000000
-rwxrwxr-x system   sdcard_rw        0 1980-01-01 01:00 prova 2012.01.01 12.00.txt
-rwxrwxr-x system   sdcard_rw   522359 2012-05-07 01:05 Barcode_Scanner_v4.1.apk
-rwxrwxr-x system   sdcard_rw   532395 2004-01-01 14:01 Barcode_Scanner_v4.2.apk
-rwxrwxr-x system   sdcard_rw  6378112 1980-01-01 01:00 DejaOffice2_2_2_309.apk
I tested on Android 2.3.5 rooted, busybox v1.20.2 to winXP-SP2 TC8.0x32
Both issues fixed:
1.5
- adb binary - also added AdbWinUsbApi.dll
- ls syntax detection improved
Please, wait for the release

jakubklos
Senior Member
Senior Member
Posts: 219
Joined: 2012-07-11, 14:48 UTC

Post by *jakubklos » 2012-07-19, 11:41 UTC

Umpal wrote:
jakubklos wrote:
Umpal wrote:Guys, how do I know what port should I use in order connect to my phone (through WiFi)? I tried 5555 and 5554 as on the posted screenshot but it didn't work. My USB Debug is on, I even turned off my PC's firewall to be sure.
You need to use some WiFi ADB app from the market. I use "WiFi ADB" and start it. It will show you the IP and the port...
Thanks for quick reply.
Unfortunately WiFi ADB says that requires rooted phon. I tried with ADB WiFi (where says 'Touch the bug to switch server state'. When I click info appears: 'Can't execute ADB server state change commands'.
I went with WiFi ABD widget as well but this little fellow displays 'Please Wait' for a second and nothing happens.
Any other idea? I don't want to root this phone yet.
I do not think WiFi ADB can work without a rooted phone unfortunately. In that case you should try to get it working with USB instead or simply root your phone.

I do not have to tell you what benefit you will get when you root your phone. It's a must have :)

Post Reply