Author Topic: [writing a VB app..] Phone showing as Device, no COM PORT listing..  (Read 1331 times)

empulse

  • Full Member
  • ***
  • Posts: 25
    • View Profile
I am trying to automate, or kind of automate a script via a GUI created in VB.  Problem is some phones when connected to a Windows PC show up on a COM Port, and other show up as a Phone / DEVICE / Mobile Device -- this makes addressing them via command prompts and *.exe's a bit hard.  Can't use send_command.exe because there is no COM Port to address.  Adb does work, if you use wait-for-device, but I can't get it to enter Download Mode from Adb either.

Working on LG Tribute VM, yes I know there is already a root script but it didn't work exactly the way it should have or was intended, it was just copied over and applied to this phone.

Code: [Select]
echo Pushing files..
adb.exe push busybox /data/local/tmp/ && adb.exe push lg_root.sh /data/local/tmp/ && adb.exe push UPDATE-SuperSU-v2.46.zip /data/local/tmp/
echo.
echo Rebooting..
adb reboot
echo.

echo Looking for LG serial port..

echo.
adb.exe wait-for-device
for /f "tokens=2*" %%a in ('reg query HKLM\hardware\devicemap\SERIALCOMM /v \Device\LG*ANDNETDIAG* 2^>nul ^| find "REG_SZ" 2^>nul') do set "comPath=%%~b"
if "%comPath%" == "" (
echo Serial port not found, please insert the phone manually into Download mode.
echo.
echo Disconnect the USB cable and turn off the phone.
echo Then press and hold the Volume Up button, and while you're doing that connect the USB cable again.
echo.
echo Waiting for device..
echo.
) else (
echo Phone found at %comPath%!
echo.
echo Rebooting into Download mode..
echo.
Send_Command.exe \\.\%comPath% < enterDownload | echo off
echo Waiting for device..
echo.
ping 127.0.0.1 -n 15 | echo off


example, if you open a command prompt and type reg query HKLM\hardware\devicemap\SERIALCOMM  do you see your device when connected, if not how do you resolve this..?

« Last Edit: April 24, 2015, 07:21:36 AM by empulse »