Copying file from TracerPlus on Android to Windows

Hi. I have an android phone/barcode reader running TracerPlus, and I need to read the text file from the TracerPlus folder on the device to a windows 7 PC. I can do this using explorer as it sees the android file system, but I need to be able to do it using a windows batch file as it is part of a bigger process. The android hard drive is not a mapped drive in Windows. I need to be able to either map the drive so that I can read the file in the conventional 'Windows' way (using cecopy.exe command, for example) or I need another method that can be incorporated into a batch file.

The android device is not linking to the internet or phone network - it is being used only as a barcode scanner, so outputting to something like Dropbox is not an option. Also, the device may not necessarily be connected to the PC at the time the file is created. When it is connected, it is sitting in its cradle and connects via USB.

I do understand that this is not a TracerPlus issue really, but I am not having much luck getting an answer from the Android community. The Android version is 4.1.2. Can anyone help please?
 

James

Member
The phone is connecting over MTP protocol, which isn't accessible with the "normal" Windows tools - Explorer uses Magic (c) to access the device, and although you can browse it in file picker dialogs, you can't access it on the command line because it doesn't have an actual path. Even if you could, the handset doesn't always display all the files without forcing a rescan of the sd card, either by using a scanning app or rebooting the phone. I'm running into the same problem, but I haven't really worked on solving it yet - I'm still developing the project forms. There are two possibilities I plan to explore, and I'd love to hear if either work for you.

First is by using the Android debug bridge. It's available in the Android SDK and unofficially a member of the xda-developers forum made a much smaller installer for adb and a few other tools, reducing the size from 150 MB to 10 MB. Turn on USB debugging on your handset, then you should be able to use "adb pull" in your scripts to copy files to the PC, and "adb push" to copy files to the handset.

The other, more expensive, harder to setup, may not even work option is to get a cheap bluetooth dongle for the PC and use tools on either side to script the transfer. I haven't done any research yet to find out if this is even possible, but it's a thought I had.

Edit: Of course, they offer TracerPlus Connect to copy data from the handset, but it's another expense and I'm not sure it's scriptable.
 
Last edited:

Dan Peluso

Member
Staff member
Hi,

I was going to answer similar to James in that using MTP is not likely scriptable. Using ADB may be a great option if you are able to put your phone into debug mode. This may or may not be possible depending on corporate environment/policies but it could be a good option.

The BT approach may be possible but seems like some code would need to be written.

Of course, with a certain level of bias, I would always recommend TracerPlus Connect as the best solution. As James mentioned, there is a seperate licensing cost for this, however. TracerPlus Connect is available for free trial if you want to take it for a test drive before purchasing.

Thanks. Let us know how you make out or if you come up with an alternative solution.
 
Hi Both

Thank you for your comments.

I have installed the SDK tools and used the ADB pull command as a line in a batch file, and it works fine. I tried using the ADB shell command to view the content of folders on the Android (knowing a few UNIX/Linux shell commands comes in handy) but hit the snag of being unable to view many folders below the root level because of a lack of permissions. However, with the aid of the standard file manager software on the unit, I managed to work out the file path and it worked!

I am now trying to persuade my customer to go for TP Connect as it would give them far greater flexibility.

Thanks again for your help, and apologies for the delay in replying.
 
Top