Quote:
Originally Posted by jiqqaman
First things first...
FOLLOW THE DIRECTIONS!! IF IT SAYS DONT MOVE YOUR MOUSE, DONT CLICK ANYTHING, DONT TOUCH YOUR KEYBOARD... THEN DONT!!!!
The reason for this is because for some reason a batch file cant send the command
Code:
adb shell cat sdcard/flash_image > /data/flash_image
[SIZE="3"]The only way I found to get around that was using Sendkeys. I know, send keys is lame, and poor programming, but its the only way that I could get this to work.
Basically, Sendkeys sends keystokes to a targeted window, as if you were typing. You might see your keyboard NumLock, Caps light blink while this is being used, which is perfectly normal. (Enjoy the light show)
|
That's because the windows shell interpreter parses the redirect as belonging to the Windows system, not the android system. So it's trying to redirect the output to c:/data/flash_image or some such nonsense. Since Windows doesn't do / for it's directory structure, but instead uses \ it gacks trying to find the directory to put it in (which would be wrong even if it worked, since it would be on your hard drive, not the phone). You can change the cat line to this:
Code:
adb shell cp /sdcard/flash_image /data/flash_image
and it should work just as well. Anytime you use a redirect in a batch script like that it's going to try and redirect to Windows. If it wasn't my day off and I wasn't so tired I might figure out a fix for that, but the code I posted above should do the trick well enough.  I wasn't sure initially why people wanted to to read the file into another one in the first place, but I did it with cp when I rooted and it worked fine. I suggest testing it, and then possibly changing your program. That way you can get rid of sendkeys and people breaking root by clicking something when it's running
Current Phone:
Sprint HTC ONE
Tablets:
Asus Eee Pad Transformer Prime
Asus Eee Pad Transformer
Previous Smart Phones:
HTC Evo 4G LTE
HTC Evo3D
HTC Evo 4G
PPC6700
Touch Diamond (WinMO 6.5)
HTC Hero
|