02-14-2012 07:50 PM
I'm building a tester whose only interface to this phone is the USB connection. So I send and retrieve data to the device using System Exec.vi and ADB. For example:
cmd /c adb push rec.txt
or
cmd /c adb shell "echo 64 > /data/test1"
Pretty sure is not the best way but it worked for me so far. At any rate, my trouble comes that before any of these commands can be used, I need to run the following command:
cmd /c adb start-server
but when I run that, System Exec.vi get stuck, and the only way for me to get out of it is to open a cmd window and type adb kill-server.
So I've been having to start the ADB server manually before I start my tests.
Does anyone know a way around this?
Solved! Go to Solution.
02-15-2012 08:02 AM
On the off chance, in system exec there is an option 'wait for completion', this is set to true by defaul and is an optional setting. Have you set it to false? labview could be waiting for the cmd to finish but as its starting a server this wont happen until the server is closed
hope it helps
TDarkins
02-15-2012 08:36 AM
Thx, you're right, what I ended up doing is running with 'wait for completion' set to False and then using cmd /c tasklist in a loop waiting for adb.exe to appear in the Windows process list.
05-31-2012 08:19 AM
hi, im trying to do the same thing but i am having erros while typing cmd/c, could you share your program please?
05-31-2012 10:10 AM
Here's a quick example of how I got this going, not particularly proud of how this went down, but at the end it worked.
- First, launch the ADB server.
- Then, using tasklist wait for the adb server to appear on the process list. This gets a bit trickey because in the processes list the ADB server and the ADB shell windows have the same name so you see to instances of "adb.exe", and have to wait for one of them to go away so I would know the adb server had truly started.
- Finally, I ran all my commands using adb shell. If for some reason adbserver went offline and you tried to run an adb shell cmd, ADB would automatically try to re-start the server and get stuck forever (you'd have to run "adb kill-server" from a separate window to exit, 'cuz abort doesn't work in this case). If you are running quick / manual tests it's no biggie, but if you running hour long scripts, then I'd suggest making sure adb server is running before using any other adb command.
Hope this helps.
01-22-2016 05:25 AM
hi all i am in the position to use adb via pxi with pharlap ETS anyone have adb tool and adb drivers for pharlap kindly support me to get up with NI RT PXI 8106 with PharLap ETS
01-25-2016 03:33 PM
Hi sunojau,
I'm not sure National Instruments would have created a driver for this specific application. Doing some searching online I found this universal driver that might work for you, http://adbdriver.com/downloads/ . If this is not what you are looking for I would post your question in a new thread on the LabVIEW Real-Time forums HERE to maximize your post traffic and potential that another forum member can help you.
------
Aaron F.
Applications Engineering
National Instruments
02-24-2016 10:49 PM
Hi aaron,
Thanks for your kind reply but actually those drivers can be used only on windows machines but i need a support for NI PXI with PharLap OS kindly help me out to get that in to PXI for ADB connection with android devices
02-25-2016 01:54 PM
Hi sunojau,
I don't believe National Instruments currently has support for that. What are you trying to do?
Thanks,
KingPGeorge
02-28-2016 11:23 PM
Hi KingPGeorge,
Trying to develop an interface for android device to run ADB commands through PXI to provide a Android App automation enhancement through PXI.
Thanks,
Sunoj.K.N