Introducing XDA:DevCon – A Conference For Developers By Developers
XDA Developers Android and Mobile Development Forum
Forgot your password?
 
Post Reply+
Tip us?
 
LancerV
Old
(Last edited by LancerV; 31st March 2011 at 08:55 PM.)
#1  
LancerV's Avatar
Senior Member - OP
Thanks Meter 65
Posts: 634
Join Date: Nov 2007
Default [DEVS]How to run automated scripts with 1.5.7

Use this code in a VBS File, and after the cmd /K inser commands as follows, and for every other command you need add an & sign so it would look like bellow

Updateed this works

Code:
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "cmd /k"
WScript.Sleep 500 
WshShell.SendKeys "adb shell" 
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1500
WshShell.SendKeys "su"
WshShell.SendKeys "{ENTER}"
WScript.Sleep 1500
WshShell.SendKeys "reboot"
WshShell.SendKeys "{ENTER}"
Set objShell = Nothing
Free Host for XDA-Devs PM me for username/password
The Following User Says Thank You to LancerV For This Useful Post: [ Click to Expand ]
 
LancerV
Old
#2  
LancerV's Avatar
Senior Member - OP
Thanks Meter 65
Posts: 634
Join Date: Nov 2007
Found a way to run commands
Free Host for XDA-Devs PM me for username/password
 
kennethpenn
Old
#3  
kennethpenn's Avatar
Retired Forum Moderator / Recognized Developer
Thanks Meter 3728
Posts: 2,702
Join Date: Nov 2006
Location: Washington, D.C.

 
DONATE TO ME
Thanks for posting this for everyone... should make life a tad easier on this closed platform.
 
LancerV
Old
#4  
LancerV's Avatar
Senior Member - OP
Thanks Meter 65
Posts: 634
Join Date: Nov 2007
Yea the biggest issue Im having with gingerblur is you have to set the wait time and trying to calculate that is well a pita
Free Host for XDA-Devs PM me for username/password
 
shawnbuck
Old
#5  
shawnbuck's Avatar
Recognized Developer
Thanks Meter 88
Posts: 188
Join Date: Feb 2011
Location: NY
When you run su, does it account for it not being an interactive shell?
 
LancerV
Old
#6  
LancerV's Avatar
Senior Member - OP
Thanks Meter 65
Posts: 634
Join Date: Nov 2007
Quote:
Originally Posted by shawnbuck View Post
When you run su, does it account for it not being an interactive shell?
Yep, all the command does it act like you are typing which is why you need the WScript.Sleep 1500, 1500 stands for 1500ms so after 1500ms it waits and than keeps typing.
Free Host for XDA-Devs PM me for username/password
 
Post Reply+
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Go to top of page...

XDA PORTAL POSTS

Boot Animation Paradise for your Android Device

The default boot animations on any device, no matter whichmanufacturer, are generally pretty … more

Flash Custom ROM and Recovery to Samsung Galaxy S 4

After reading about Dan Rosenberg’s bootloader exploit for the Samsung Galaxy S 4,I … more