EC's Evita Utility (Windows) - AT&T, Rogers HTC One X, Telstra One XL
I am posting my Windows command script that I use on my Evita for various ADB and FastBoot commands. Its not much, but it sure beats manually entering ADB and FastBoot commands.
Q&A
Q: But... There are already Android/HTC/Evita utilities.
A: I know there are already utilities out there, but guess what? I am an old school command line guy and don't give two $hits if your edit the script to your own liking or share it. :highfive:
Q: How often will you update the script?
A: Say what? That is entirely up to you! The code is below please share your updates here. :angel:
Requirements
Windows XP, 7, 8
Create Command File (Name it what ever you want dot cmd) for example ECs_Evita_Utility.CMD
Create Folder called ADB, and place adb.exe, AdbWinApi.dll, AdbWinUsbApi.dll in the folder.
Create a folder called FB and place fastboot.exe, AdbWinApi.dll, AdbWinUsbApi.dll in the folder.
Run the script! (No admin rights required.)
Version Information
2013.24.8.2
General release.
[size=+2]This script is free to use or edit, and should be used at your own risk![/size]
Now that is out of the way, here is the script :fingers-crossed:
Code:
[user=279333]@ECHO[/user] Off
Set VSN=ECs Evita Utility 2013.24.8.2
Set CLRW=0C
Set CLRS=0A
Set CLRA=0E
Set CLRF=0B
Set CLRE=03
Set LogFile="%~dp0\Logs\Logfile.log"
Title %VSN%
If Not Exist "%~dp0\Logs" MD "%~dp0\Logs"
Cls
:War
Echo %VSN%
Color %CLRW%
Echo %Date% - %Time% : Warning Menu. >> %LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * Warning use at your own risk! *
Echo * *
Echo **************************************
Echo.
Echo Do you want to continue?
Echo.
Set /P WARV=Press [Y] for Yes and [N] for No: || Set WARV=NothingEntered
If "%WARV%"=="NothingEntered" Goto WAR
If /i "%WARV%"=="Y" Goto STR
If /i "%WARV%"=="N" Goto END
Goto WAR
:STR
Color %CLRS%
Echo %Date% - %Time% : Start Menu. >> %LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = Start Menu = *
Echo * *
Echo * *
Echo **************************************
Echo.
Echo What do you want to use?
Echo.
Echo Press [A] for ADB
Echo Press [F] for Fastboot
Echo Press [E] to Exit
Echo.
Set /P STRV=Enter Choice: || Set STRV=NothingEntered
If "%STRV%"=="NothingEntered" Goto STR
If /i "%STRV%"=="A" Goto ADBSS
If /i "%STRV%"=="F" Goto FBS
If /i "%STRV%"=="E" Goto End
Goto STR
:ADBSS
Color %CLRW%
Cls
If not exist "%~dp0\ADB\ADB.exe" Goto ADBW
Echo %Date% - %Time% : Started ADB Server. >> %LogFile%
%~dp0\ADB\ADB.exe start-server
:ADBS
Color %CLRA%
Echo %Date% - %Time% : ADB Menu. >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = ADB Menu = *
Echo * *
Echo * Make sure your Android device *
Echo * debug mode is turned on! *
Echo * *
Echo **************************************
Echo.
Echo What do you want to do?
Echo.
Echo Press [1] to force reboot to Recovery
Echo Press [2] to force reboot to fastboot
Echo Press [3] to backup applications
Echo Press [4] to backup downloads
Echo Press [5] to backup camera photos
Echo Press [6] to backup pictures
Echo Press [7] to install applications
Echo Press [8] to uninstall applications
Echo Press [9] to install ROM
Echo Press [10] to copy to...
Echo Press [S] to go to the Start Menu
Echo Press [C] to force a device check
Echo Press [F] to go to the Fastboot Menu
Echo Press [E] to Exit
Echo.
Set /P ADBV=Enter Choice: || Set ADBV=NothingEntered
If "%ADBV%"=="NothingEntered" Goto ADBS
If "%ADBV%"=="1" Goto ADB1
If "%ADBV%"=="2" Goto ADB2
If "%ADBV%"=="3" Goto ADB3
If "%ADBV%"=="4" Goto ADB4
If "%ADBV%"=="5" Goto ADB5
If "%ADBV%"=="6" Goto ADB6
If "%ADBV%"=="7" Goto ADB7
If "%ADBV%"=="8" Goto ADB8
If "%ADBV%"=="9" Goto ADB9
If "%ADBV%"=="10" Goto ADB10
If /i "%ADBV%"=="S" Goto STR
If /i "%ADBV%"=="C" Goto ADBC
If /i "%ADBV%"=="F" Goto FBS
If /i "%ADBV%"=="E" Goto End
Goto ADBS
:ADBC
Echo %Date% - %Time% : ADB Checking Device State Menu. >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = ADB Check Device State = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Checking Device State. >> "%LogFile%
"%~dp0\ADB\ADB.exe" devices -l >> %LogFile%
"%~dp0\ADB\ADB.exe" devices -l
Echo.
Pause
Goto ADBS
:ADB1
Echo %Date% - %Time% : ADB Force to Recovery Menu. >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = ADB Force to Recovery = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Forcing device to Recovery. >> "%LogFile%
"%~dp0\ADB\ADB.exe" reboot recovery
Goto FBS
:ADB2
Echo %Date% - %Time% : ADB Force to Fastboot Menu. >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = ADB Force to Fastboot = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Forcing device to Fastboot. >> "%LogFile%
"%~dp0\ADB\ADB.exe" reboot bootloader
Goto FBS
:ADB3
Echo %Date% - %Time% : ADB Backup Applications. >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = ADB Backup Applications = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Checking for Applications Folder >> "%LogFile%
If exist "%~dp0\Backup\Applications" Echo %Date% - %Time% : Applications folder does exist. >> "%LogFile%
If not exist "%~dp0\Backup\Applications" Echo Echo %Date% - %Time% : Warning Applications folder does not exist! Creating Applications Folder. >> "%LogFile%
If not exist "%~dp0\Backup\Applications" MD "%~dp0\Backup\Applications"
Echo %Date% - %Time% : Starting Applications Backup. >> "%LogFile%
"%~dp0\ADB\ADB.exe" pull "./system/app" "%~dp0\Backup\Applications"
Echo %Date% - %Time% : Completed Application Backup. >> "%LogFile%
Goto ADBS
:ADB4
Echo %Date% - %Time% : ADB Backup Downloads Menu >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = ADB Backup Downloads = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Checking for Downloads Folder >> "%LogFile%
If exist "%~dp0\Backup\Downloads" Echo Echo %Date% - %Time% : Downloads folder does exist. >> "%LogFile%
If not exist "%~dp0\Backup\Downloads" Echo Echo %Date% - %Time% : Warning Downloads folder does not exist! Creating Downloads Folder. >> "%LogFile%
If not exist "%~dp0\Backup\Downloads" MD "%~dp0\Backup\Downloads"
Echo %Date% - %Time% : Starting Downloads Backup. >> "%LogFile%
"%~dp0\ADB\ADB.exe" pull "./sdcard/downloads" "%~dp0\Backup\Downloads"
Echo %Date% - %Time% : Completed Downloads Backup. >> "%LogFile%
Goto ADBS
:ADB5
Echo %Date% - %Time% : ADB Backup Camera Photos Menu >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = ADB Backup Camera Photos = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Checking for Camera Folder. >> "%LogFile%
If exist "%~dp0\Backup\Camera" Echo Echo %Date% - %Time% : Camera folder does exist. >> "%LogFile%
If not exist "%~dp0\Backup\Camera" Echo Echo %Date% - %Time% : Warning Camera folder does not exist! Creating Camera Folder. >> "%LogFile%
If not exist "%~dp0\Backup\Camera" MD "%~dp0\Backup\Camera"
Echo %Date% - %Time% : Starting Camera Photos Backup. >> "%LogFile%
"%~dp0\ADB\ADB.exe" pull "./sdcard/dcim/camera" "%~dp0\Backup\Camera"
Echo %Date% - %Time% : Completed Camera Photos Backup. >> "%LogFile%
Goto ADBS
:ADB6
Echo %Date% - %Time% : ADB Backup Pictures Menu >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = ADB Backup Pictures = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Pictures for Camera Folder. >> "%LogFile%
If exist "%~dp0\Backup\Pictures" Echo Echo %Date% - %Time% : Pictures folder exist. >> "%LogFile%
If not exist "%~dp0\Backup\Pictures" Echo Echo %Date% - %Time% : Warning Pictures folder does not exist! Creating pictures folder. >> "%LogFile%
If not exist "%~dp0\Backup\Pictures" MD "%~dp0\Backup\Pictures"
Echo %Date% - %Time% : Starting Pictures Backup. >> "%LogFile%
"%~dp0\ADB\ADB.exe" pull "./sdcard/pictures" "%~dp0\Backup\Pictures"
Echo %Date% - %Time% : Completed Pictures Backup. >> "%LogFile%
Goto ADBS
:ADBW
Echo %Date% - %Time% : ADB Warning Menu >> "%LogFile%
Color %CLRW%
Cls
Echo.
Echo *****************************************************
Echo * *
Echo * Sorry ADB.exe does not exist in the ADB directory *
Echo * Please fix this issue before using this feature *
Echo * *
Echo *****************************************************
Echo.
If not exist "%~dp0\ADB\ADB.exe" Echo Echo %Date% - %Time% : Error ADB.exe does not exist! Check the ADB Folder. >> "%LogFile%
pause
Goto STR
:FBS
If not exist "%~dp0\FB\Fastboot.exe" Goto FBW
"%~dp0\FB\Fastboot.exe" continue
Color %CLRF%
Echo %Date% - %Time% : Fastboot Menu. >> %LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = Fastboot Menu = *
Echo * *
Echo * Make sure your Android device *
Echo * is in Fastboot mode! *
Echo * *
Echo **************************************
Echo.
Echo What do you want to do?
Echo.
Echo Press [1] to unlock device
Echo Press [2] to flash a new boot image
Echo Press [3] to flash a new recovery image
Echo Press [4] to Reboot device to Bootloader
Echo Press [5] to SuperCID device
Echo Press [6] to Set S-Off
Echo Press [7] to Update TP Firmware
Echo Press [8] to Downgrade TP Firmware
Echo Press [9] to Reboot device to OS
Echo Press [S] to go to the Start Menu
Echo Press [A] to go to the ADB Menu
Echo Press [E] to Exit
Echo.
Set /P FBV=Enter Choice: || Set FBV=NothingEntered
If "%FBV%"=="NothingEntered" Goto FBS
If "%FBV%"=="1" Goto FB1
If "%FBV%"=="2" Goto FB2
If "%FBV%"=="3" Goto FB3
If "%FBV%"=="4" Goto FB4
If "%FBV%"=="5" Goto FB5
If "%FBV%"=="6" Goto FB6
If "%FBV%"=="7" Goto FB7
If "%FBV%"=="8" Goto FB8
If "%FBV%"=="9" Goto FB9
If /i "%FBV%"=="S" Goto STR
If /i "%FBV%"=="A" Goto ADBSS
If /i "%FBV%"=="E" Goto End
Goto FBS
:FB1
Echo %Date% - %Time% : Fastboot Unlock Menu >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = Fastboot Unlock = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Checking for Unlock Folder >> "%LogFile%
If exist "%~dp0\Install\Unlock" Echo Echo %Date% - %Time% : Unlock folder does exist. >> "%LogFile%
If not exist "%~dp0\Install\Unlock" Echo Echo %Date% - %Time% : Warning Unlock folder does not exist! Creating Unlock Folder. >> "%LogFile%
If not exist "%~dp0\Install\Unlock" MD "%~dp0\Install\Unlock"
Echo %Date% - %Time% : Checking for Unlock bin file >> "%LogFile%
If exist "%~dp0\Install\Unlock\Unlock_code.bin" Echo Echo %Date% - %Time% : Unlock bin file does exist. >> "%LogFile%
If not exist "%~dp0\Install\Unlock" Echo Echo %Date% - %Time% : Warning Unlock bin file does not exist! >> "%LogFile%
If not exist "%~dp0\Install\Unlock" Goto FBS
Echo %Date% - %Time% : Starting Unlock. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" flash unlocktoken "%~dp0\Install\Unlock\Unlock_code.bin"
Goto FB3
:FB2
Echo %Date% - %Time% : Fastboot Boot Flash Menu >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = Fastboot Boot Flash = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Checking for Boot Folder >> "%LogFile%
If exist "%~dp0\Install\Boot" Echo Echo %Date% - %Time% : Boot folder does exist. >> "%LogFile%
If not exist "%~dp0\Install\Boot" Echo Echo %Date% - %Time% : Warning Boot folder does not exist! Creating Boot Folder. >> "%LogFile%
If not exist "%~dp0\Install\Boot" MD "%~dp0\Install\Boot"
Echo %Date% - %Time% : Checking for Boot image file >> "%LogFile%
If exist "%~dp0\Install\Boot\Boot.img" Echo Echo %Date% - %Time% : Boot image file does exist. >> "%LogFile%
If not exist "%~dp0\Install\Boot\Boot.img" Echo Echo %Date% - %Time% : Warning Boot image file does not exist! >> "%LogFile%
If not exist "%~dp0\Install\Boot\Boot.img" Goto FBS
Echo %Date% - %Time% : Starting Boot Flash. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" flash boot "%~dp0\Install\Boot\Boot.img"
Echo %Date% - %Time% : Completed Boot Flash. >> "%LogFile%
Pause
Goto FBS
:FB3
Echo %Date% - %Time% : Fastboot Boot Flash Menu >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = Fastboot Recovery Flash = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Checking for Recovery Folder >> "%LogFile%
If exist "%~dp0\Install\Recovery" Echo Echo %Date% - %Time% : Recovery folder does exist. >> "%LogFile%
If not exist "%~dp0\Install\Recovery" Echo Echo %Date% - %Time% : Warning Recovery folder does not exist! Creating Recovery Folder. >> "%LogFile%
If not exist "%~dp0\Install\Recovery" MD "%~dp0\Install\Recovery"
Echo %Date% - %Time% : Checking for Recovery image file >> "%LogFile%
If exist "%~dp0\Install\Recovery\openrecovery-twrp-2.5.0.0-evita.img" Echo Echo %Date% - %Time% : Recovery image file does exist. >> "%LogFile%
If not exist "%~dp0\Install\Recovery\openrecovery-twrp-2.5.0.0-evita.img" Echo Echo %Date% - %Time% : Recovery image file does not exist! >> "%LogFile%
If not exist "%~dp0\Install\Recovery\openrecovery-twrp-2.5.0.0-evita.img" Goto FBS
Echo %Date% - %Time% : Starting Recovery Flash. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" flash recovery "%~dp0\Install\Recovery\openrecovery-twrp-2.5.0.0-evita.img"
Echo %Date% - %Time% : Completed Recovery Flash. >> "%LogFile%
Pause
Goto FBS
:FB4
Echo %Date% - %Time% : Fastboot Bootloader Menu >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = Fastboot Bootloader = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Starting Fastboot boot. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" reboot-bootloader
Echo %Date% - %Time% : Completed Fastboot boot. >> "%LogFile%
Goto FBS
:FB5
Echo %Date% - %Time% : Fastboot SuperCID Menu >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = Fastboot SuperCID = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Starting SuperCID. >> "%LogFile%
Echo %Date% - %Time% : Writing SuperCID. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" oem writecid 11111111
Echo %Date% - %Time% : Rebooting into Bootloader. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" reboot-bootloader
"%~dp0\FB\Fastboot.exe" continue
Echo %Date% - %Time% : Getting CID Information. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" getvar cid >> "%LogFile%
"%~dp0\FB\Fastboot.exe" getvar cid
Echo.
Echo [It should confirm your CID is 11111111]
Pause
Echo %Date% - %Time% : Rebooting device >> "%LogFile%
"%~dp0\FB\Fastboot.exe" reboot
Echo %Date% - %Time% : Completed SuperCID. >> "%LogFile%
Goto FBS
:FB6
Echo %Date% - %Time% : Fastboot S-Off Menu >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = Fastboot S-Off = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Checking for Boot Folder >> "%LogFile%
If exist "%~dp0\Install\S-Off" Echo Echo %Date% - %Time% : S-Off folder does exist. >> "%LogFile%
If not exist "%~dp0\Install\S-Off" Echo Echo %Date% - %Time% : Warning S-Off folder does not exist! Creating Boot Folder. >> "%LogFile%
If not exist "%~dp0\Install\S-Off" MD "%~dp0\Install\S-Off"
Echo %Date% - %Time% : Checking for Boot image file >> "%LogFile%
If exist "%~dp0\Install\S-Off\PJ8312000-OneX.zip" Echo Echo %Date% - %Time% : Boot image file does exist. >> "%LogFile%
If not exist "%~dp0\Install\S-Off\PJ8312000-OneX.zip" Echo Echo %Date% - %Time% : Warning Boot image file does not exist! >> "%LogFile%
If not exist "%~dp0\Install\S-Off\PJ8312000-OneX.zip" Goto FBS
Echo %Date% - %Time% : Checking for S-Off file >> "%LogFile%
If exist "%~dp0\Install\S-Off\soffbin3" Echo Echo %Date% - %Time% : Boot image file does exist. >> "%LogFile%
If not exist "%~dp0\Install\S-Off\soffbin3" Echo Echo %Date% - %Time% : Warning Boot image file does not exist! >> "%LogFile%
If not exist "%~dp0\Install\S-Off\soffbin3" Goto FBS
Echo %Date% - %Time% : Starting S-Off. >> "%LogFile%
Echo %Date% - %Time% : Rebooting into RUU. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" oem rebootRUU
Echo.
Echo [Wait for black HTC Screen]
Pause
Echo %Date% - %Time% : Flashing Boot Image. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" flash zip "%~dp0\Install\S-Off\PJ8312000-OneX.zip"
Echo %Date% - %Time% : Wait for FAILED remote: 92 supercid! error. >> "%LogFile%
Echo.
Echo [Wait for FAILED remote: 92 supercid! error]
Pause
Echo %Date% - %Time% : Booting into boot image. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" oem boot
Echo.
Echo [You may see some errors, just wait for the device to boot into Android]
Echo.
Echo %Date% - %Time% : Starting ADB server. >> "%LogFile%
"%~dp0\ADB\ADB.exe" start-server
Echo %Date% - %Time% : Waiting for device. >> "%LogFile%
"%~dp0\ADB\ADB.exe" wait-for-device
Echo %Date% - %Time% : Checking device state. >> "%LogFile%
"%~dp0\ADB\ADB.exe" devices -l >> %LogFile%
"%~dp0\ADB\ADB.exe" devices -l
Echo.
Echo %Date% - %Time% : Uploading file to device. >> "%LogFile%
"%~dp0\ADB\ADB.exe" push "%~dp0\Install\S-Off\soffbin3" /data/local/tmp/
Echo %Date% - %Time% : Changing permissions of file. >> "%LogFile%
"%~dp0\ADB\ADB.exe" shell chmod 744 /data/local/tmp/soffbin3
Echo %Date% - %Time% : Updating security partition >> "%LogFile%
"%~dp0\ADB\ADB.exe" shell su -c "/data/local/tmp/soffbin3"
Echo %Date% - %Time% : Rebooting to bootloader >> "%LogFile%
"%~dp0\ADB\ADB.exe" reboot bootloader
Echo %Date% - %Time% : Completed S-Off >> "%LogFile%
Goto FBS
:FB7
Echo %Date% - %Time% : Fastboot TP Update Menu >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = Fastboot TP Update = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Starting TP Firmware Update. >> "%LogFile%
Echo %Date% - %Time% : Rebooting into RUU. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" oem rebootRUU
Echo.
Echo [Wait for black HTC Screen]
Pause
Echo %Date% - %Time% : Flashing TP Update Firmware. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" flash zip "%~dp0\Install\HBoot\upgrade_tp.zip"
Echo.
Echo [Wait for Finished]
Pause
Goto ADBSS
:FB8
Echo %Date% - %Time% : Fastboot TP Update Menu >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = Fastboot TP Downgrade = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Starting TP Firmware Downgrade. >> "%LogFile%
Echo %Date% - %Time% : Rebooting into RUU. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" oem rebootRUU
Echo.
Echo [Wait for black HTC Screen]
Pause
Echo %Date% - %Time% : Flashing TP Downgrade Firmware. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" flash zip "%~dp0\Install\HBoot\downgrade_tp.zip"
Echo.
Echo [Wait for Finished]
Pause
Goto ADBSS
:FB9
Echo %Date% - %Time% : Fastboot Reboot Menu >> "%LogFile%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = Fastboot Reboot = *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Starting Reboot. >> "%LogFile%
"%~dp0\FB\Fastboot.exe" reboot
Echo %Date% - %Time% : Completed Reboot. >> "%LogFile%
Goto FBS
:FBW
Echo %Date% - %Time% : Fastboot Warning Menu >> "%LogFile%
Color %CLRW%
Cls
Echo.
Echo *********************************************************
Echo * *
Echo * Sorry Fastboot.exe does not exist in the FB directory *
Echo * Please fix this issue before using this feature *
Echo * *
Echo *********************************************************
Echo.
Echo Echo %Date% - %Time% : Error Fastboot.exe does not exist! Check the Fastboot Folder. >> "%LogFile%
pause
Goto STR
:End
Echo %Date% - %Time% : Killing ADB Server. >> %LogFile%
%~dp0\ADB\ADB.exe kill-server
Color %CLRE%
Cls
Echo.
Echo **************************************
Echo * *
Echo * %VSN% *
Echo * *
Echo * = Exit Menu = *
Echo * *
Echo * Sorry to see you go *
Echo * Thanks for using *
Echo * *
Echo **************************************
Echo.
Echo %Date% - %Time% : Exit Menu. >> %LogFile%
Pause
Hold :angel:
I like this, nice little script, I may take and port it to Linux for us Linux geeks. Good work on this.
mclovin926 said:
I like this, nice little script, I may take and port it to Linux for us Linux geeks. Good work on this.
Click to expand...
Click to collapse
Thanks, It originally grew from collecting various commands to do ADB and FastBoot functions in a text file. I persuaded my self to put together this script to make it easy doing it over and over. Over a few months It grew into the script you see now.
It would be nice to see Linux script when you get done with it. Post it up when you are done
Eventually I want to port my script into a PowerShell script. We will see if I get the time to do it.
Started porting over to PowerShell Its not as easy as command line, have to use a whole lot of functions and needs to be ran as an Administrator
Teaser
Code:
RunAdmin
New-EventLog –LogName Application –Source “ECs Evita Utility”
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 1 –Message “Starting Script.”
MainMenu
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 1 –Message “Exiting Script.”
ExitMenu
Edit
Working on it
Code:
#
#
#
#
#
#
function RunAdmin{
$myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent()
$myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID)
$adminRole=[System.Security.Principal.WindowsBuiltInRole]::Administrator
if ($myWindowsPrincipal.IsInRole($adminRole)){}Else{
$newProcess = new-object System.Diagnostics.ProcessStartInfo "PowerShell";
$newProcess.Arguments = $myInvocation.MyCommand.Definition;
$newProcess.Verb = "runas";
[System.Diagnostics.Process]::Start($newProcess);
}
if (!(Get-EventLog -LogName Application -Source "ECs Evita Utility")) {
New-EventLog –LogName Application –Source “ECs Evita Utility”
}
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 1 –Message “Starting Script.”
FnFCheck
}
function FnFCheck {
$Folders = @(
".\ADB";
".\Backup";
".\Backup\Applications";
".\Backup\Camera";
".\Backup\Documents";
".\Backup\Downloads";
".\Backup\Pictures";
".\Downloads";
".\Downloads\ADK";
".\Downloads\Drivers";
".\FB";
".\Install";
".\Install\Applications";
".\Install\Boot";
".\Install\Drivers";
".\Install\HBoot";
".\Install\Recovery";
".\Install\ROM";
".\Install\S-Off";
".\Install\Unlock"
)
$Files = @(
".\ADB\adb.exe";
".\ADB\AdbWinApi.dll";
".\ADB\AdbWinUsbApi.dll";
".\FB\AdbWinApi.dll";
".\FB\AdbWinUsbApi.dll";
".\FB\fastboot.exe";
)
foreach ($Folder in $Folders){
if (!(Test-Path $Folder -pathType container)){
Write-Host $Folder -NoNewline; Write-Host " Does Not Exist!" -ForegroundColor Yellow
New-Item $Folder -Type Directory
}
}
foreach ($File in $Files){
if (!(Test-Path $File)){
Write-Host $File -NoNewline; Write-Host " Does Not Exist!" -ForegroundColor Red
Write-Host
}
}
MainMenu
}
function SDKDownload {
$AndroidSDK = "http://dl.google.com/android/adt/adt-bundle-windows-x86_64-20130729.zip"
$ADKDL = ".\Downloads\ADK\adt-bundle-windows-x86_64-20130729.zip"
if (!(Test-Path $ADKDL)){
$WC = New-Object System.Net.WebClient
Write-Host "Downloading Android Development Kit v.20130729" -ForegroundColor Green
Write-Host "Please Wait..."
$WC.DownloadFile($AndroidSDK, $ADKDL)
}
}
function MainMenu {
Clear-Host
Do{
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 1 –Message “Entering Main Menu.”
Clear-Variable $MM
Clear-Host
Write-Host "Welcome to ECs Evita Utility"
Write-Host
Write-Host "Main Menu"
Write-Host
Write-Host "Enter [A] to go to ADB"
Write-Host "Enter [F] to go to FastBoot"
Write-Host "Enter [U] to go to Utilities"
Write-Host "Enter [E] to Exit"
$MM=Read-Host "Enter Selection"
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 1 –Message “Leaving Main Menu.”
If ($MM -eq "A"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected ADB.”
ADB
}
If ($MM -eq "F"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected FastBoot.”
FastBoot
}
If ($MM -eq "U"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected Utilities.”
Utilities
}
}
Until ($MM -eq "E")
ExitMenu
}
function ADB {
$ADBE = ".\ADB\adb.exe"
Clear-Host
&$ADBE start-server
Do{
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 1 –Message “Entering ADB Menu.”
Clear-Variable $ADBM
Clear-Host
Write-Host "ECs Evita Utility"
Write-Host
&$ADBE devices -l
Write-Host
Write-Host "ADB Menu"
Write-Host
Write-Host "Enter [1] to go to "
Write-Host "Enter [2] to go to "
Write-Host "Enter [3] to go to "
Write-Host "Enter [4] to go to "
Write-Host "Enter [5] to go to "
Write-Host "Enter [6] to go to "
Write-Host "Enter [7] to go to "
Write-Host "Enter [8] to go to "
Write-Host "Enter [9] to go to "
Write-Host "Enter [E] to Exit"
$ADBM=Read-Host "Enter Selection"
If ($ADBM -eq "1"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected ADB 1.”
ADB1
}
If ($ADBM -eq "2"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected ADB 2.”
ADB2
}
If ($ADBM -eq "3"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected ADB 3.”
ADB3
}
If ($ADBM -eq "4"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected ADB 4.”
ADB4
}
If ($ADBM -eq "5"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected ADB 5.”
ADB5
}
If ($ADBM -eq "6"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected ADB 6.”
ADB6
}
If ($ADBM -eq "7"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected ADB 7.”
ADB7
}
If ($ADBM -eq "8"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected ADB 8.”
ADB8
}
If ($ADBM -eq "9"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected ADB 9.”
ADB9
}
}
Until($ADBM -eq "E")
&$ADBE kill-server
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 1 –Message “Leaving ADB Menu.”
}
function ADB1 {
Clear-Host
Write-Host ADB1 Selected
sleep 2
}
function ADB2 {
Clear-Host
Write-Host ADB2 Selected
sleep 2
}
function ADB3 {
Clear-Host
Write-Host ADB3 Selected
sleep 2
}
function ADB4 {
Clear-Host
Write-Host ADB4 Selected
sleep 2
}
function ADB5 {
Clear-Host
Write-Host ADB5 Selected
sleep 2
}
function ADB6 {
Clear-Host
Write-Host ADB6 Selected
sleep 2
}
function ADB7 {
Clear-Host
Write-Host ADB7 Selected
sleep 2
}
function ADB8 {
Clear-Host
Write-Host ADB8 Selected
sleep 2
}
function ADB9 {
Clear-Host
Write-Host ADB9 Selected
sleep 2
}
function FastBoot {
Clear-Host
Do{
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 1 –Message “Entering FastBoot Menu.”
Clear-Variable $FBM
Clear-Host
Write-Host "ECs Evita Utility"
Clear-Host
Write-Host "FastBoot Menu"
Write-Host
Write-Host "Enter [1] to go to "
Write-Host "Enter [2] to go to "
Write-Host "Enter [3] to go to "
Write-Host "Enter [4] to go to "
Write-Host "Enter [5] to go to "
Write-Host "Enter [6] to go to "
Write-Host "Enter [7] to go to "
Write-Host "Enter [8] to go to "
Write-Host "Enter [9] to go to "
Write-Host "Enter [E] to Exit"
$FBM=Read-Host "Enter Selection"
If ($FBM -eq "1"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected FastBoot 1.”
FB1
}
If ($FBM -eq "2"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected FastBoot 2.”
FB2
}
If ($FBM -eq "3"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected FastBoot 3.”
FB3
}
If ($FBM -eq "4"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected FastBoot 4.”
FB4
}
If ($FBM -eq "5"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected FastBoot 5.”
FB5
}
If ($FBM -eq "6"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected FastBoot 6.”
FB6
}
If ($FBM -eq "7"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected FastBoot 7.”
FB7
}
If ($FBM -eq "8"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected FastBoot 8.”
FB8
}
If ($FBM -eq "9"){
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 2 –Message “Selected FastBoot 9.”
FB9
}
}
Until($FBM -eq "E")
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 1 –Message “Leaving FastBoot Menu.”
}
function FB1 {
Clear-Host
Write-Host FB1 Selected
sleep 2
}
function FB2 {
Clear-Host
Write-Host FB2 Selected
sleep 2
}
function FB3 {
Clear-Host
Write-Host FB3 Selected
sleep 2
}
function FB4 {
Clear-Host
Write-Host FB4 Selected
sleep 2
}
function FB5 {
Clear-Host
Write-Host FB5 Selected
sleep 2
}
function FB6 {
Clear-Host
Write-Host FB6 Selected
sleep 2
}
function FB7 {
Clear-Host
Write-Host FB7 Selected
sleep 2
}
function FB8 {
Clear-Host
Write-Host FB8 Selected
sleep 2
}
function FB9 {
Clear-Host
Write-Host FB9 Selected
sleep 2
}
function Utilities {
Clear-Host
Write-Host "ECs Evita Utility"
Clear-Host
Write-Host "This is Utilities Menu"
Sleep 5
}
function ExitMenu {
Clear-Host
Write-Host "ECs Evita Utility"
Write-Host
Write-Host "Good Bye!"
Write-EventLog –LogName Application –Source “ECs Evita Utility” –EntryType Information –EventID 1 –Message “Exiting Script.”
Sleep 5
exit
}
RunAdmin
Related
[Script]Universal Quick Flasher
While I was pushing some files trough adb I thought it would be handy to have a script which automates it, a simple bat file in this case, can become very handy if you need to push some system apps for testing. It will show several reboot options afterwards and additionally it can flash a kernel to your device. I know it's better to just upgrade my Quick Flasher tool, but this was written in 10 min so why not share and upgrade later co credits: - stepie22 (helped me in expanding it) It requires adb in it's directory and the files you want to push as well. Kernelflasher.bat: Code: @echo off REM /* REM * cd to the current directory REM */ cd /d %~dp0 mode con:lines=30 REM /* REM * Check if adb is available in the path variable, the default path or the current directory. REM * Asks user if they want to download it if it is not found. REM */ set found= set quotedPath="%PATH:;="; "%" set prog=adb.exe for %%i in (%quotedPath%) do if exist %%i\%prog% set found=%%i :adbdetected REM /* REM * Added incase usb isn't properly connected REM */ title Universal Quick Flasher v1.04 - Waiting for device... echo Waiting for device... echo Please plugin android device with usb debugging enabled adb wait-for-device cls adb root adb remount title Universal Quick Flasher v1.04 goto main if not ""==%found% goto adbdetected if exist adb.exe goto adbdetected if exist "%programfiles%\Android\android-sdk\platform-tools\adb.exe" goto adbdetected REM /* REM * Added Windows 7 Default location for android-sdk REM */ if exist "%USERPROFILE%\android-sdks\platform-tools\adb.exe" goto adbdetected if exist "%USERPROFILE%\android-sdk\platform-tools\adb.exe" goto adbdetected goto noadb :main cls echo. echo ************************************* echo * Universal Quick Flasher v1.04 * echo * * echo * By broodplank1337 * echo * and * echo * stepie22 * echo * * echo * All Filenames are CaseSensitive! * echo ************************************* echo. echo What do you want to flash? echo. echo [1] App (system app or regular app) echo [2] Kernel echo. echo Optional echo. echo [3] Reboot echo [4] Visit project page echo. echo [79] exit echo. echo. set /p choice=: if "%choice%"=="1" goto app if "%choice%"=="2" goto kernel if "%choice%"=="3" goto rmenu if "%choice%"=="4" goto ppage if "%choice%"=="79" goto exit REM /* REM * Display error if no valid option was chosen REM */ echo Error, no option found for '%choice%'. pause goto main :kernel cls echo. echo Enter kernel name (zImage or boot.img) set /p kername= Kernel name: echo. echo Enter kernel partition number echo As in (/dev/block/mmcblk0p*) where * is your number set /p kernum= Kernel Partition Number: echo. cls :kernelck REM /* REM * Display for rewiew REM */ echo. echo Kernel name: %kername% echo FLash to : /dev/block/mmcblk0p%kernum% echo. set /p valid=Correct (y or n): if "%valid%"=="y" goto kernelcont if "%valid%"=="Y" goto kernelcont if "%valid%"=="n" goto kernel if "%valid%"=="N" goto kernel set msg=Incorrent option goto kernelck :kernelcont if not exist %kername% ( set returnto=kernel goto nofile ) echo. echo Flashing %kername% to /dev/block/mmcblk0p%kernum% adb push %kername% /sdcard/%kername% adb -d shell su -c "dd if=/sdcard/%kername% of=/dev/block/mmcblk0p%kernum%" echo. echo Done! Rebooting Device... echo. adb reboot pause goto goagain :app set /p name=APK Name: cls echo. echo APK Name: %name% echo APK Type: echo. echo [1] System App (/system/app) echo [2] Framework App (/system/framework) echo [3] Regular App (/data/system) echo. set /p type=: if "%type%"=="1" goto sysapp if "%type%"=="2" goto frameapp if "%type%"=="3" goto normapp REM /* REM * Display error if no valid option was chosen REM */ echo Error, no option found for '%type%'. pause cls goto app :sysapp if not exist %name% ( set returnto=app goto nofile ) adb push %name% /system/app/%name% adb -d shell chmod 644 /system/app/%name% cls echo. echo Do you want to reboot your device (y/n)? echo. set /p choice=: if "%choice%"=="n" goto goagain if "%choice%"=="N" goto goagain if "%choice%"=="y" goto rmenu if "%choice%"=="Y" goto rmenu echo ERROR, no option found for '%choice%' pause goto sysapp REM /* REM * Display error if no valid option was chosen REM */ echo Error, no option found for '%reboot%'. pause cls goto sysapp :frameapp if not exist %name% ( set returnto=app goto nofile ) adb push %name% /system/framework/%name% adb -d shell chmod 644 /system/framework/%name% cls echo. echo Do you want to reboot your device (y/n)? echo. set /p choice=: if "%choice%"=="n" goto goagain if "%choice%"=="N" goto goagain if "%choice%"=="y" goto rmenu if "%choice%"=="Y" goto rmenu echo ERROR, no option found for '%choice%' pause goto frameapp REM /* REM * Display error if no valid option was chosen REM */ echo Error, no option found for '%reboot%'. pause cls goto frameapp :normapp if not exist %name% ( set returnto=app goto nofile ) adb install %name% goto goagain :rmenu cls echo. echo [1] Shutdown echo [2] Reboot Normaly echo [3] Reboot fast echo [4] Reboot into Recovery echo [5] Reboot into Bootloader (Download Mode) echo [9] Main Menu echo [79] Exit echo. set /p rmenu=: if "%rmenu%"=="1" goto shutdown if "%rmenu%"=="2" goto reboot if "%rmenu%"=="3" goto rebootf if "%rmenu%"=="4" goto rebootr if "%rmenu%"=="5" goto rebootdl if "%rmenu%"=="9" goto main if "%rmenu%"=="79" goto exit echo. echo No option found for '%rmenu%' pause goto rmenu :ppage start http://broodplank.net/?p=729 goto main :shutdown echo. echo Shutting down device. adb shell reboot -p goto goagain :reboot echo. echo Rebooting Device Completely. adb reboot echo Done! goto goagain :rebootf echo. echo Rebooting Device Fast (kill system_server) adb -d shell su -c "busybox killall system_server" echo Done! goto goagain :rebootr echo. echo Rebooting Device into Recovery. adb reboot recovery goto goagain :rebootdl echo. echo Rebooting Device into Bootloader (Download Mode) adb reboot bootloader goto goagain :nofile cls echo. echo ******************************** echo * That file could not be found * echo ******************************** echo. echo Press enter to try again. set /p nofile= goto %returnto% :noadb cls echo. echo ************************ echo * ADB was not detected * echo ************************ echo. echo Download?? (y/n) set /p choice=: if "%choice%"=="n" goto exit if "%choice%"=="N" goto exit if "%choice%"=="y" goto dl if "%choice%"=="Y" goto dl echo ERROR, no option found for '%choice%' pause goto noadb :dl cls echo. echo ************************ echo * ADB was not detected * echo ************************ echo. echo Downloading adb.rar from broodplank.net... echo Extract it in: %~dp0 start http://broodplank.net/files/ADB.rar pause goto exit :goagain cls echo. echo Press m to go to the Main Menu, echo Press any other key to exit. echo. set /p goagain=: if "%goagain%"=="m" goto main if "%goagain%"=="M" goto main :exit echo. echo. echo Exiting... pause exit
Really useful one..thank u.. Sent from my GT-I9001 using Tapatalk 2
VERY VERY NICE SCRIPT! Omg you're a monster Inviato dal mio GT-I9001 che di originale non ha più nulla con la CyanogenMod RC1 usando Tapatalk 2.
lontu said: Really useful one..thank u.. Sent from my GT-I9001 using Tapatalk 2 Click to expand... Click to collapse You're welcome umb3rts said: VERY VERY NICE SCRIPT! Omg you're a monster Inviato dal mio GT-I9001 che di originale non ha più nulla con la CyanogenMod RC1 usando Tapatalk 2. Click to expand... Click to collapse Haha, I develop all the time (like 90% of the time that I spend on my computer) so I have a lot of things like these. I will keep producing more and more without question
Usefull as always.. The tools and roms are growing like trees here. I cant update the index on androidworld so fast :silly:
I wish I had enough free time to spend on developing, i have some ideas sometime... but not enough time to learn/write, altough i'm a native Linux user. brood, you are fantastic as always Inviato dal mio GT-I9001 che di originale non ha più nulla con la CyanogenMod RC1 usando Tapatalk 2.
if i may give you an idea: you could write an app which does basically this Code: :rebootf echo. echo Rebooting Device Fast (kill system_server) adb -d shell su -c "busybox killall system_server" echo Done! exit untill now i had to kill system_server using terminal emulator.
Hey Brood. Could you make something like a bat to get quick to my adb.exe? I hate it to cd through all the directorys to get to it. Example: I want to go to cmd.exe then type "adb" then for example "adb devices" and adb should start? Is that possible? P.S: As always i love your work. The script is really nice and wellmade with the logo and etc
mrjraider said: Usefull as always.. The tools and roms are growing like trees here. I cant update the index on androidworld so fast :silly: Click to expand... Click to collapse Thanks and yes it's growing very fast idd! umb3rts said: I wish I had enough free time to spend on developing, i have some ideas sometime... but not enough time to learn/write, altough i'm a native Linux user. brood, you are fantastic as always Inviato dal mio GT-I9001 che di originale non ha più nulla con la CyanogenMod RC1 usando Tapatalk 2. Click to expand... Click to collapse The key is to not spend your computer time on gaming but on developing hehe (works for me). but if you don't have enough time it will become hard And you're welcome ^^ dr.wtf said: if i may give you an idea: you could write an app which does basically this Code: :rebootf echo. echo Rebooting Device Fast (kill system_server) adb -d shell su -c "busybox killall system_server" echo Done! exit untill now i had to kill system_server using terminal emulator. Click to expand... Click to collapse Of course I can make that, I'm in linux right now so when i'm back in windows, I will make the app and send it to you. XeLLaR* said: Hey Brood. Could you make something like a bat to get quick to my adb.exe? I hate it to cd through all the directorys to get to it. Example: I want to go to cmd.exe then type "adb" then for example "adb devices" and adb should start? Is that possible? P.S: As always i love your work. The script is really nice and wellmade with the logo and etc Click to expand... Click to collapse Yes that can be achieved by adding: "cd /d %~dp0" in the batch script, the command will automatically cd to it's directory. And you need to enter "adb shell" to enter the adb shell , else it will close. adb shell > normal shell usage adb -d shell ".." > command here And you're welcome btw
broodplank1337 said: Yes that can be achieved by adding: "cd /d %~dp0" in the batch script, the command will automatically cd to it's directory. And you need to enter "adb shell" to enter the adb shell , else it will close. adb shell > normal shell usage adb -d shell ".." > command here And you're welcome btw Click to expand... Click to collapse Thank you very much!! :good:
Hey Brood do you know a nice howto about building an app wich base is a batch file ? Or is ot not possible to buold an android app with batch commands ? Sent from my GT-I9001 using xda app-developers app
Diablob555 said: Hey Brood do you know a nice howto about building an app wich base is a batch file ? Or is ot not possible to buold an android app with batch commands ? Sent from my GT-I9001 using xda app-developers app Click to expand... Click to collapse i think that its impossible because DOS uses its own functions. means that batch commands are especially for windows. Sent from my GT-I9001 using xda app-developers app
So I'll need java commands ? Sent from my GT-I9001 using xda app-developers app
What, you haven't updated it here? I feel offended! Na, just joking. To people who don't know what I'm talking about: http://broodplank.net/?p=729 Sent from my GT-I9001 using xda app-developers app
stepie22 said: What, you haven't updated it here? I feel offended! Na, just joking. To people who don't know what I'm talking about: http://broodplank.net/?p=729 Sent from my GT-I9001 using xda app-developers app Click to expand... Click to collapse True, well it's my site so it's not very strange if it gets priority but it's good that you take a look at my site, it has more hidden stuff v1.4 Code: @echo off REM /* REM * cd to the current directory REM */ cd /d %~dp0 mode con:lines=30 REM /* REM * Check if adb is available in the path variable, the default path or the current directory. REM * Asks user if they want to download it if it is not found. REM */ set found= set quotedPath="%PATH:;="; "%" set prog=adb.exe for %%i in (%quotedPath%) do if exist %%i\%prog% set found=%%i :adbdetected REM /* REM * Added incase usb isn't properly connected REM */ title Universal Quick Flasher v1.04 - Waiting for device... echo Waiting for device... echo Please plugin android device with usb debugging enabled adb wait-for-device cls adb root adb remount title Universal Quick Flasher v1.04 goto main if not ""==%found% goto adbdetected if exist adb.exe goto adbdetected if exist "%programfiles%\Android\android-sdk\platform-tools\adb.exe" goto adbdetected REM /* REM * Added Windows 7 Default location for android-sdk REM */ if exist "%USERPROFILE%\android-sdks\platform-tools\adb.exe" goto adbdetected if exist "%USERPROFILE%\android-sdk\platform-tools\adb.exe" goto adbdetected goto noadb :main cls echo. echo ************************************* echo * Universal Quick Flasher v1.04 * echo * * echo * By broodplank1337 * echo * and * echo * stepie22 * echo * * echo * All Filenames are CaseSensitive! * echo ************************************* echo. echo What do you want to flash? echo. echo [1] App (system app or regular app) echo [2] Kernel echo. echo Optional echo. echo [3] Reboot echo [4] Visit project page echo. echo [79] exit echo. echo. set /p choice=: if "%choice%"=="1" goto app if "%choice%"=="2" goto kernel if "%choice%"=="3" goto rmenu if "%choice%"=="4" goto ppage if "%choice%"=="79" goto exit REM /* REM * Display error if no valid option was chosen REM */ echo Error, no option found for '%choice%'. pause goto main :kernel cls echo. echo Enter kernel name (zImage or boot.img) set /p kername= Kernel name: echo. echo Enter kernel partition number echo As in (/dev/block/mmcblk0p*) where * is your number set /p kernum= Kernel Partition Number: echo. cls :kernelck REM /* REM * Display for rewiew REM */ echo. echo Kernel name: %kername% echo FLash to : /dev/block/mmcblk0p%kernum% echo. set /p valid=Correct (y or n): if "%valid%"=="y" goto kernelcont if "%valid%"=="Y" goto kernelcont if "%valid%"=="n" goto kernel if "%valid%"=="N" goto kernel set msg=Incorrent option goto kernelck :kernelcont if not exist %kername% ( set returnto=kernel goto nofile ) echo. echo Flashing %kername% to /dev/block/mmcblk0p%kernum% adb push %kername% /sdcard/%kername% adb -d shell su -c "dd if=/sdcard/%kername% of=/dev/block/mmcblk0p%kernum%" echo. echo Done! Rebooting Device... echo. adb reboot pause goto goagain :app set /p name=APK Name: cls echo. echo APK Name: %name% echo APK Type: echo. echo [1] System App (/system/app) echo [2] Framework App (/system/framework) echo [3] Regular App (/data/system) echo. set /p type=: if "%type%"=="1" goto sysapp if "%type%"=="2" goto frameapp if "%type%"=="3" goto normapp REM /* REM * Display error if no valid option was chosen REM */ echo Error, no option found for '%type%'. pause cls goto app :sysapp if not exist %name% ( set returnto=app goto nofile ) adb push %name% /system/app/%name% adb -d shell chmod 644 /system/app/%name% cls echo. echo Do you want to reboot your device (y/n)? echo. set /p choice=: if "%choice%"=="n" goto goagain if "%choice%"=="N" goto goagain if "%choice%"=="y" goto rmenu if "%choice%"=="Y" goto rmenu echo ERROR, no option found for '%choice%' pause goto sysapp REM /* REM * Display error if no valid option was chosen REM */ echo Error, no option found for '%reboot%'. pause cls goto sysapp :frameapp if not exist %name% ( set returnto=app goto nofile ) adb push %name% /system/framework/%name% adb -d shell chmod 644 /system/framework/%name% cls echo. echo Do you want to reboot your device (y/n)? echo. set /p choice=: if "%choice%"=="n" goto goagain if "%choice%"=="N" goto goagain if "%choice%"=="y" goto rmenu if "%choice%"=="Y" goto rmenu echo ERROR, no option found for '%choice%' pause goto frameapp REM /* REM * Display error if no valid option was chosen REM */ echo Error, no option found for '%reboot%'. pause cls goto frameapp :normapp if not exist %name% ( set returnto=app goto nofile ) adb install %name% goto goagain :rmenu cls echo. echo [1] Shutdown echo [2] Reboot Normaly echo [3] Reboot fast echo [4] Reboot into Recovery echo [5] Reboot into Bootloader (Download Mode) echo [9] Main Menu echo [79] Exit echo. set /p rmenu=: if "%rmenu%"=="1" goto shutdown if "%rmenu%"=="2" goto reboot if "%rmenu%"=="3" goto rebootf if "%rmenu%"=="4" goto rebootr if "%rmenu%"=="5" goto rebootdl if "%rmenu%"=="9" goto main if "%rmenu%"=="79" goto exit echo. echo No option found for '%rmenu%' pause goto rmenu :ppage start http://broodplank.net/?p=729 goto main :shutdown echo. echo Shutting down device. adb shell reboot -p goto goagain :reboot echo. echo Rebooting Device Completely. adb reboot echo Done! goto goagain :rebootf echo. echo Rebooting Device Fast (kill system_server) adb -d shell su -c "busybox killall system_server" echo Done! goto goagain :rebootr echo. echo Rebooting Device into Recovery. adb reboot recovery goto goagain :rebootdl echo. echo Rebooting Device into Bootloader (Download Mode) adb reboot bootloader goto goagain :nofile cls echo. echo ******************************** echo * That file could not be found * echo ******************************** echo. echo Press enter to try again. set /p nofile= goto %returnto% :noadb cls echo. echo ************************ echo * ADB was not detected * echo ************************ echo. echo Download?? (y/n) set /p choice=: if "%choice%"=="n" goto exit if "%choice%"=="N" goto exit if "%choice%"=="y" goto dl if "%choice%"=="Y" goto dl echo ERROR, no option found for '%choice%' pause goto noadb :dl cls echo. echo ************************ echo * ADB was not detected * echo ************************ echo. echo Downloading adb.rar from broodplank.net... echo Extract it in: %~dp0 start http://broodplank.net/files/ADB.rar pause goto exit :goagain cls echo. echo Press m to go to the Main Menu, echo Press any other key to exit. echo. set /p goagain=: if "%goagain%"=="m" goto main if "%goagain%"=="M" goto main :exit echo. echo. echo Exiting... pause exit
[MOD][REF]Set governer on boot with init.d
Since everyones asking how to set a governor on boot, heres a sample of my init.d script that sets "on demand" with max frequency 1400000 (1.4GHZ) and min frequency 200000 (0.2GHZ) on boot, if you would like to use it or modify it let me know, i dont bite and im one to help! enjoy!! here's the guidelines! 100000 = 1GHZ DOWNLOAD
This is my Script to set / tweak my Governor on my XZ. It's easy to handle, i guess. #!/system/bin/sh LOG_FILE=/data/Init.d_Tweaks.log sleep 60 # Set Scaling Governor GOVERNOR="conservative" echo $GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo $GOVERNOR > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor echo $GOVERNOR > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor echo $GOVERNOR > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor echo "$GOVERNOR Governor is running" | tee -a $LOG_FILE; # Set Min & Max Frequency # 384000 486000 594000 702000 810000 918000 1026000 1134000 1242000 1350000 1458000 1512000 CPU_MIN="384000" CPU_MAX="1242000" echo $CPU_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq echo $CPU_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq echo $CPU_MIN > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq echo $CPU_MAX > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq echo $CPU_MIN > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq echo $CPU_MAX > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq echo $CPU_MIN > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq echo $CPU_MAX > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq echo "Min / Max Frequency is set to $CPU_MIN / $CPU_MAX" | tee -a $LOG_FILE; # Set IO Sheduler SHEDULER="deadline" echo $SHEDULER > /sys/block/mmcblk0/queue/scheduler echo $SHEDULER > /sys/block/mmcblk1/queue/scheduler echo "$SHEDULER Sheduler is running" | tee -a $LOG_FILE; # Set SD Cache READ_AHEAD_KB="512" echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:0/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:1/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:0/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:32/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/0:18/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:0/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:1/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:2/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:3/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:4/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:5/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:6/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:7/read_ahead_kb echo "256" > /sys/devices/virtual/bdi/default/read_ahead_kb echo "SD Cache is set to $READ_AHEAD_KB kb" | tee -a $LOG_FILE; # Tweak Governor # Ondemand if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then # Ondemand Tweaked echo "90" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core echo "75000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq echo "1242000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential echo "35" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step # Ondemand Battery # echo "95" /sys/devices/system/cpu/cpufreq/ondemand/up_threshold # echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load # echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core # echo "120000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate # echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor # echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq # echo "1026000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq # echo "5" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential # echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step # Ondemand Performance # echo "70" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold # echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load # echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core # echo "50000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate # echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor # echo "702000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq # echo "1512000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq # echo "15" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential # echo "50" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step fi; # Interactive if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then # Interactive Tweaked echo "90" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load echo "1242000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time echo "30000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate # Interactive Battery # echo "95" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load # echo "1026000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq # echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time # echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate # Interactive Performance # echo "80" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load # echo "1512000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq # echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time # echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate fi; # Conservative if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then # Conservative Tweaked echo "90" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold echo "60000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate echo "3" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor echo "30" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold echo "15" > /sys/devices/system/cpu/cpufreq/conservative/freq_step # Conservative Battery # echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold # echo "120000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate # echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor # echo "40" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold # echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step # Conservative Performance # echo "60" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold # echo "40000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate # echo "5" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor # echo "20" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold # echo "25" > /sys/devices/system/cpu/cpufreq/conservative/freq_step fi; echo "$GOVERNOR Governor is Tweaked" | tee -a $LOG_FILE; # Custom Kernel Tweaks # reduce / increase [mv] for all Frequencys # echo "-90000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels # Set GPU Governor # echo "simple" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor # Set GPU Clock # echo "325000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk # Swap / Tap 2 Wake # echo "0" > /sys/android_touch/doubletap2wake # echo "0" > /sys/android_touch/sweep2wake # echo "Custom Kernel Settings are applied" | tee -a $LOG_FILE; echo " " | tee -a $LOG_FILE; echo "@ $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE; echo " " | tee -a $LOG_FILE; Gesendet von meinem C6603 mit Tapatalk
HSD-Pilot said: This is my Script to set / tweak my Governor on my XZ. It's easy to handle, i guess. #!/system/bin/sh LOG_FILE=/data/Init.d_Tweaks.log sleep 60 # Set Scaling Governor GOVERNOR="conservative" echo $GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo $GOVERNOR > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor echo $GOVERNOR > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor echo $GOVERNOR > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor echo "$GOVERNOR Governor is running" | tee -a $LOG_FILE; # Set Min & Max Frequency # 384000 486000 594000 702000 810000 918000 1026000 1134000 1242000 1350000 1458000 1512000 CPU_MIN="384000" CPU_MAX="1242000" echo $CPU_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq echo $CPU_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq echo $CPU_MIN > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq echo $CPU_MAX > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq echo $CPU_MIN > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq echo $CPU_MAX > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq echo $CPU_MIN > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq echo $CPU_MAX > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq echo "Min / Max Frequency is set to $CPU_MIN / $CPU_MAX" | tee -a $LOG_FILE; # Set IO Sheduler SHEDULER="deadline" echo $SHEDULER > /sys/block/mmcblk0/queue/scheduler echo $SHEDULER > /sys/block/mmcblk1/queue/scheduler echo "$SHEDULER Sheduler is running" | tee -a $LOG_FILE; # Set SD Cache READ_AHEAD_KB="512" echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:0/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:1/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:0/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:32/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/0:18/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:0/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:1/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:2/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:3/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:4/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:5/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:6/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:7/read_ahead_kb echo "256" > /sys/devices/virtual/bdi/default/read_ahead_kb echo "SD Cache is set to $READ_AHEAD_KB kb" | tee -a $LOG_FILE; # Tweak Governor # Ondemand if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then # Ondemand Tweaked echo "90" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core echo "75000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq echo "1242000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential echo "35" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step # Ondemand Battery # echo "95" /sys/devices/system/cpu/cpufreq/ondemand/up_threshold # echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load # echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core # echo "120000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate # echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor # echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq # echo "1026000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq # echo "5" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential # echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step # Ondemand Performance # echo "70" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold # echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load # echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core # echo "50000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate # echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor # echo "702000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq # echo "1512000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq # echo "15" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential # echo "50" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step fi; # Interactive if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then # Interactive Tweaked echo "90" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load echo "1242000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time echo "30000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate # Interactive Battery # echo "95" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load # echo "1026000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq # echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time # echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate # Interactive Performance # echo "80" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load # echo "1512000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq # echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time # echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate fi; # Conservative if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then # Conservative Tweaked echo "90" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold echo "60000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate echo "3" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor echo "30" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold echo "15" > /sys/devices/system/cpu/cpufreq/conservative/freq_step # Conservative Battery # echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold # echo "120000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate # echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor # echo "40" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold # echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step # Conservative Performance # echo "60" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold # echo "40000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate # echo "5" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor # echo "20" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold # echo "25" > /sys/devices/system/cpu/cpufreq/conservative/freq_step fi; echo "$GOVERNOR Governor is Tweaked" | tee -a $LOG_FILE; # Custom Kernel Tweaks # reduce / increase [mv] for all Frequencys # echo "-90000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels # Set GPU Governor # echo "simple" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor # Set GPU Clock # echo "325000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk # Swap / Tap 2 Wake # echo "0" > /sys/android_touch/doubletap2wake # echo "0" > /sys/android_touch/sweep2wake # echo "Custom Kernel Settings are applied" | tee -a $LOG_FILE; echo " " | tee -a $LOG_FILE; echo "@ $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE; echo " " | tee -a $LOG_FILE; Gesendet von meinem C6603 mit Tapatalk Click to expand... Click to collapse thats pretty neat, mines just a basic compared to yours
HSD-Pilot said: This is my Script to set / tweak my Governor on my XZ. ... Click to expand... Click to collapse do i only have to change ondemand to hotplug to work on hotplug governor?
Maximus1a said: do i only have to change ondemand to hotplug to work on hotplug governor? Click to expand... Click to collapse If your Kernel supports it, sure. You can set any available Governor on your Phone. Just edit GOVERNOR="hotplug" To tweak it, just search the Forum for available Values. My Phone doesn't support it, that's why it's not in the script. Gesendet von meinem Full Android on C6603 mit Tapatalk 2
HSD-Pilot said: This is my Script to set / tweak my Governor on my XZ. It's easy to handle, i guess. #!/system/bin/sh LOG_FILE=/data/Init.d_Tweaks.log sleep 60 # Set Scaling Governor GOVERNOR="conservative" echo $GOVERNOR > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor echo $GOVERNOR > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor echo $GOVERNOR > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor echo $GOVERNOR > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor echo "$GOVERNOR Governor is running" | tee -a $LOG_FILE; # Set Min & Max Frequency # 384000 486000 594000 702000 810000 918000 1026000 1134000 1242000 1350000 1458000 1512000 CPU_MIN="384000" CPU_MAX="1242000" echo $CPU_MIN > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq echo $CPU_MAX > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq echo $CPU_MIN > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq echo $CPU_MAX > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq echo $CPU_MIN > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq echo $CPU_MAX > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq echo $CPU_MIN > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq echo $CPU_MAX > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq echo "Min / Max Frequency is set to $CPU_MIN / $CPU_MAX" | tee -a $LOG_FILE; # Set IO Sheduler SHEDULER="deadline" echo $SHEDULER > /sys/block/mmcblk0/queue/scheduler echo $SHEDULER > /sys/block/mmcblk1/queue/scheduler echo "$SHEDULER Sheduler is running" | tee -a $LOG_FILE; # Set SD Cache READ_AHEAD_KB="512" echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:0/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/254:1/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:0/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/179:32/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/0:18/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:0/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:1/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:2/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:3/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:4/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:5/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:6/read_ahead_kb echo $READ_AHEAD_KB > /sys/devices/virtual/bdi/7:7/read_ahead_kb echo "256" > /sys/devices/virtual/bdi/default/read_ahead_kb echo "SD Cache is set to $READ_AHEAD_KB kb" | tee -a $LOG_FILE; # Tweak Governor # Ondemand if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then # Ondemand Tweaked echo "90" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core echo "75000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/sync_freq echo "1242000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential echo "35" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step # Ondemand Battery # echo "95" /sys/devices/system/cpu/cpufreq/ondemand/up_threshold # echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load # echo "85" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core # echo "120000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate # echo "1" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor # echo "384000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq # echo "1026000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq # echo "5" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential # echo "10" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step # Ondemand Performance # echo "70" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold # echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_any_cpu_load # echo "60" > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold_multi_core # echo "50000" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_rate # echo "2" > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor # echo "702000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq # echo "1512000" > /sys/devices/system/cpu/cpufreq/ondemand/optimal_freq # echo "15" > /sys/devices/system/cpu/cpufreq/ondemand/down_differential # echo "50" > /sys/devices/system/cpu/cpufreq/ondemand/freq_step fi; # Interactive if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then # Interactive Tweaked echo "90" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load echo "1242000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time echo "30000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate # Interactive Battery # echo "95" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load # echo "1026000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq # echo "10000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time # echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate # Interactive Performance # echo "80" > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load # echo "1512000" > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq # echo "40000" > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time # echo "20000" > /sys/devices/system/cpu/cpufreq/interactive/timer_rate fi; # Conservative if [ -d "/sys/devices/system/cpu/cpufreq/$GOVERNOR" ]; then # Conservative Tweaked echo "90" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold echo "60000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate echo "3" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor echo "30" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold echo "15" > /sys/devices/system/cpu/cpufreq/conservative/freq_step # Conservative Battery # echo "95" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold # echo "120000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate # echo "1" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor # echo "40" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold # echo "10" > /sys/devices/system/cpu/cpufreq/conservative/freq_step # Conservative Performance # echo "60" > /sys/devices/system/cpu/cpufreq/conservative/up_threshold # echo "40000" > /sys/devices/system/cpu/cpufreq/conservative/sampling_rate # echo "5" > /sys/devices/system/cpu/cpufreq/conservative/sampling_down_factor # echo "20" > /sys/devices/system/cpu/cpufreq/conservative/down_threshold # echo "25" > /sys/devices/system/cpu/cpufreq/conservative/freq_step fi; echo "$GOVERNOR Governor is Tweaked" | tee -a $LOG_FILE; # Custom Kernel Tweaks # reduce / increase [mv] for all Frequencys # echo "-90000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels # Set GPU Governor # echo "simple" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/pwrscale/trustzone/governor # Set GPU Clock # echo "325000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/max_gpuclk # Swap / Tap 2 Wake # echo "0" > /sys/android_touch/doubletap2wake # echo "0" > /sys/android_touch/sweep2wake # echo "Custom Kernel Settings are applied" | tee -a $LOG_FILE; echo " " | tee -a $LOG_FILE; echo "@ $( date +"%m-%d-%Y %H:%M:%S" )" | tee -a $LOG_FILE; echo " " | tee -a $LOG_FILE; Gesendet von meinem C6603 mit Tapatalk Click to expand... Click to collapse How to set minimum gpu frequency? Will this work?: # echo "325000000" > /sys/devices/platform/kgsl-3d0.0/kgsl/kgsl-3d0/min_gpuclk
:good:
@Ricky Divjakovski Sorry for disturbing Please give the script in the post or give a mirror link sir.. All your threads are very helpful Thanks
[SCRIPT] Common ADB/FASTBOOT Functions
DISCLAIMER: I TAKE NO RESPONSIBILITY FOR DAMAGE CAUSED TO ANYONE OR ANYTHING BY USING MY SCRIPT. USE THIS AT YOUR OWN RISK. So pretty much this is a script that can: 1. Flash a new boot animation without going through all the hassle of entering remounting commands. (Main reason why I wrote this) (Requires root and maybe adb insecure by chainfire) 2. Flash a new startup logo. (Requires unlocked bootloader) 3. Basic reboot commands with the press of a number. 4. Push and Pull files without entering commands, just need to specify the file location by dragging and dropping into the command window. (Some cases may need root. If your case does not need root, and the script says failed to restart adb as root, your command will still work, hopefully) 5. Install an apk the same way as 4. (If it says failed to restart as root it will still work in most cases) 6. Extremely noob friendly :laugh:. Just a small little script to make your life a bit easier. I tested this numerous times on a Moto G xt1032 running cyanogenmod 11 m4 and it showed no flaws. If this does not work for you try installing adb insecure by chainfire. This works on windows only (I think). If you find any bugs please tell me and I will try to fix even though I am just starting out with the wonders of developing. Some of the functions of the script need root access! To use this, just copy and paste the lines below into a notepad window. Then save the file as something.bat Make sure to change the dropdown menu from txt document to all files when saving. Put the script in the folder where adb.exe and fastboot.exe are located. Double-click and enjoy! Press "Click to show content" below! @ECHO off echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo IF YOUR DEVICE IS LISTED BELOW TYPE 1 echo ELSE TYPE 2 TO EXIT echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ adb devices SET /p startcheck= Type your choice: if "%startcheck%" =="1" goto menu if "%startcheck%" =="2" goto exit :menu cls echo Type 0 for Device Check echo Type 1 to Flash Boot Animation (ADB root required) echo Type 2 to Flash Startup Logo echo Type 3 to Reboot to Bootloader echo Type 4 to Reboot echo Type 5 to Pull a File echo Type 6 to Push a File echo Type 7 to Install Apk echo Type 8 to Run ADB as Root echo Type 9 to Browse and Copy Apps to Computer (ADB root required) echo Type 10 to Browse and Copy SYSTEM Apps to Computer (ADB root required) echo Type 11 to Exit SET /p choice= Type your choice: if "%choice%" =="0" goto devcheck if "%choice%" =="1" goto anim if "%choice%" =="2" goto logo if "%choice%" =="3" goto rebootloader if "%choice%" =="4" goto reboot if "%choice%" =="5" goto adbpull if "%choice%" =="6" goto adbpush if "%choice%" =="7" goto apk if "%choice%" =="8" goto adbroot if "%choice%" =="9" goto apps if "%choice%" =="10" goto sysapps if "%choice%" =="11" goto exit goto end :end cls echo Type 1 to restart program echo Type 2 to exit SET /p restart= Type your choice if "%restart%" =="1" goto menu if "%restart%" =="2" goto exit :exit exit :anim cls adb kill-server adb start-server cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo IF YOUR DEVICE IS LISTED BELOW TYPE 1 echo ELSE TYPE 2 TO EXIT echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ adb devices SET /p adb= Type your choice if "%adb%" =="2" goto menu cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo TYPE THE PATH FOR YOUR bootanimation.zip echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SET /p bapath= Type your path here and press enter: cls adb wait-for-device root timeout -t 1 > nul echo Remounting system in read-write mode! adb wait-for-device remount timeout -t 2 > nul adb wait-for-device shell "su -c 'mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system'" echo Deleting existing bootanimation! adb wait-for-device shell "su -c 'rm /system/media/bootanimation.zip'" echo Sending new bootanimation! adb push %bapath% /system/media echo Remounting system in read-only mode! adb wait-for-device shell "su -c 'mount -o ro,remount -t yaffs2 /dev/block/mtdblock1 /system'" echo Done! echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo Press 1 to reboot! echo Press 2 to exit! SET /p dm= Type your choice if "%dm%" =="1" goto reboot if "%dm%" =="2" goto end :logo cls echo Rebooting to bootloader... adb reboot-bootloader echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo When device is in bootloader press any key to continue! echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PAUSE cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo IF YOUR DEVICE IS LISTED BELOW TYPE 1 echo ELSE TYPE 2 TO EXIT echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fastboot devices SET /p fbdev= Type your choice if "%fbdev%" =="2" goto menu cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo TYPE THE PATH FOR YOUR logo.bin echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SET /p lopath= Type your path here and press enter: cls echo Sending new logo! fastboot flash logo %lopath% echo Rebooting... fastboot reboot echo Done! echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo Press any key to return to menu! PAUSE goto menu :reboot cls adb reboot echo Rebooting... timeout -t 3 > nul goto menu :rebootloader cls adb reboot-bootloader echo Rebooting to bootloader... timeout -t 3 > nul goto menu :adbpull cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo TYPE THE PATH FOR THE FILE TO PULL echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SET /p adbpullpath= Type your path here and press enter: cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo TYPE THE PATH FOR THE FILE TO SAVE echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SET /p adbpullsave= Type your path here and press enter: cls echo !!!IF THIS ACTION NEEDS ROOT RUN OPTION 8 FROM MENU FIRST!!! timeout -t 2 > nul echo Pulling File! adb wait-for-device pull %adbpullpath% %adbpullsave% echo Done! echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo Press any key to return to menu! PAUSE goto menu :adbpush cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo TYPE THE PATH FOR THE FILE TO PUSH echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SET /p adbpushpath= Type your path here and press enter: cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo TYPE THE PATH FOR THE DIRECTORY TO PUSH TO echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SET /p adbpushsave= Type your path here and press enter: cls echo !!!IF THIS ACTION NEEDS ROOT RUN OPTION 8 FROM MENU FIRST!!! timeout -t 2 > nul echo Pushing File! adb wait-for-device push %adbpushpath% %adbpushsave% echo Done! echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo Press any key to return to menu! PAUSE goto menu :apk cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo IF YOUR DEVICE IS LISTED BELOW TYPE 1 echo ELSE TYPE 2 TO EXIT echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ adb devices SET /p apkcheck= Type your choice if "%apkcheck%" =="2" goto exit cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo TYPE THE PATH FOR THE APK TO INSTALL echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SET /p apkinstall= Type your path here and press enter: cls echo !!!IF THIS ACTION NEEDS ROOT RUN OPTION 8 FROM MENU FIRST!!! timeout -t 2 > nul echo Installing Apk! adb wait-for-device install %apkinstall% echo Done! echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo Press any key to return to menu! PAUSE goto menu :devcheck cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo DEVICE CONNECTION CHECK echo Your device should be listed below! echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ adb devices PAUSE goto menu :adbroot cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo Trying to run ADB as root! adb wait-for-device root echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo !!!ONCE DEVICE RECONNECTS TO COMPUTER PRESS ANY KEY TO GET TO MENU!!! PAUSE goto menu :apps cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ adb wait-for-device shell "su -c 'ls /data/app'" echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo Do you want to copy an app to the computer? set /p appans= (Y or N): if "%appans%" =="N" goto menu if "%appans%" =="n" goto menu if "%appans%" =="no" goto menu if "%appans%" =="No" goto menu if "%appans%" =="NO" goto menu cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ adb wait-for-device shell "su -c 'ls /data/app'" echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo Type the app's name EXACTLY including the .apk extension echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ set /p appcp= Type the name EXACTLY as it appears: cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo Type the destination directory echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ set /p appdd= Destination Directory: cls echo Copying App! adb pull /data/app/%appcp% %appdd% echo Done! PAUSE goto menu :sysapps cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ adb wait-for-device shell "su -c 'ls /system/app'" echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo Do you want to copy an app to the computer? set /p sappans= (Y or N): if "%sappans%" =="N" goto menu if "%sappans%" =="n" goto menu if "%sappans%" =="no" goto menu if "%sappans%" =="No" goto menu if "%sappans%" =="NO" goto menu cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ adb wait-for-device shell "su -c 'ls /system/app'" echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo Type the app's name EXACTLY including the .apk extension echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ set /p sappcp= Type the name EXACTLY as it appears: cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo Type the destination directory echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ set /p sappdd= Destination Directory: cls echo Copying App! adb pull /system/app/%sappcp% %sappdd% echo Done! PAUSE goto menu
[SCRIPT] Bootanimation.zip Flasher
This is a simple script that automatically flashes a new boot animation. It does the remount and deletion commands automatically to provide an easy and fast way to flash boot animations. ADB ROOT command must be functioning for this to work properly. DISCLAIMER: THE CREATOR IS NOT RESPONSIBLE FOR DAMAGE CAUSED BY THE USE OF THIS SCRIPT! USE THIS AT YOUR OWN RISK!!! 1. Copy the code below into a new notepad window. 2. Save the file as bootanimation flasher.bat in the folder where adb and its components are located. (MAKE SURE YOU HAVE THE .bat EXTENSION) 3. Run the script! Common Errors: "error protocol failure" - this error occurs when the command adb root did not function properly. Fix the issue and try again. Try and re-enable usb debugging if it still doesn't work. Try and use this app to get adb root functioning: http://forum.xda-developers.com/showthread.php?t=1687590 This was tried and tested with success on a oneplus one and a moto g (1st gen) Script (click button to show): @echo off echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo ROOT ACCESS IS REQUIRED. ADB ROOT COMMAND MUST BE FUNCTIONING. echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo THE CREATOR OF THIS SCRIPT IS NOT RESPONSIBLE FOR ANY DAMAGE! echo USE THIS AT YOUR OWN RISK!!! echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ PAUSE cls echo Starting ADB! adb kill-server > nul adb start-server > nul echo Done! timeout -t 1 > nul :menu cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo IF YOUR DEVICE IS LISTED BELOW TYPE 1 echo TYPE 2 TO TRY AGAIN echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ adb devices SET /p startcheck= Type your choice: if "%startcheck%" =="1" goto ask if "%startcheck%" =="2" goto menu goto menu :ask cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo TYPE 1 TO FLASH BOOTANIMATION! echo TYPE 2 TO BACKUP EXISTING BOOTANIMATION THEN FLASH! echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SET /p askbackup= Type your choice: if "%askbackup%" =="1" goto anim if "%askbackup%" =="2" goto backup goto menu :backup cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo TYPE THE PATH TO BACKUP BOOTANIMATION TO! echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SET /p backuppath= Type your path and press enter: cls echo Backing Up! adb pull /system/media/bootanimation.zip %backuppath% echo Done PAUSE goto anim :anim cls echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo TYPE THE PATH FOR YOUR bootanimation.zip echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ SET /p bapath= Type your path here and press enter: cls echo Running command adb root... adb wait-for-device root > nul timeout -t 1 > nul echo Success, Root Access obtained! echo Remounting system in read-write mode! adb wait-for-device remount > nul timeout -t 1 > nul adb wait-for-device shell "su -c 'mount -o rw,remount -t yaffs2 /dev/block/mtdblock1 /system'" echo Remount Succeded! echo Deleting existing bootanimation! adb wait-for-device shell "su -c 'rm /system/media/bootanimation.zip'" echo Sending new bootanimation! adb push %bapath% /system/media echo Remounting system in read-only mode! adb wait-for-device shell "su -c 'mount -o ro,remount -t yaffs2 /dev/block/mtdblock1 /system'" echo Done! echo ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ echo Press 1 to Reboot! echo Press 2 to Exit! SET /p dm= Type your choice if "%dm%" =="1" goto reboot if "%dm%" =="2" goto exit :reboot cls echo Rebooting! adb reboot timeout -t 1 > nul PAUSE :exit exit
Coolpad Firmware Downloader.bat
Hello . . . I really glad to be an XDA member. Here is a batch script for downloading coolpad android firmwares. First of all you have to download the zip file . Extract the zip file. Run Coolpad Firmware Downloader.bat. Click on the android model you wish to download. Your default browser will open a new tab. IDM or your some other downloader will capture a download link. That's it. Download Links : Oh, I'm only a user. So, I cannot post any download links and images. Maybe later. With best wishes, Ye Naing. The script . . . @ECHO off cd bin set file=1.mp3 ( echo Set Sound = CreateObject("WMPlayer.OCX.7"^) echo Sound.URL = "%file%" echo Sound.Controls.play echo do while Sound.currentmedia.duration = 0 echo wscript.sleep 100 echo loop echo wscript.sleep (int(Sound.currentmedia.duration^)+1^)*1000) >sound.vbs start /min sound.vbs title Coolpad Firmware Downloader Batch Script setlocal enabledelayedexpansion mode con cols=45 lines=50 graphic.exe hidecursor color 1F :menu cls echo ********************************************* echo Coolpad Firmware Downloader Batch Script echo ********************************************* cmdmenusel f770 "Coolpad 9976A" "Coolpad 8295M" "Coolpad 8190Q" "Coolpad 8297 " "Coolpad 7296" "Coolpad 7295C " "Coolpad 7295 " "Coolpad 7298A " "Coolpad 7270 " "Coolpad 7231 " "Coolpad 8122 " "Coolpad 8076 SC8810 " "Exit tool" if %errorlevel% == 1 goto MAIN1 if %errorlevel% == 2 goto MAIN2 if %errorlevel% == 3 goto MAIN3 if %errorlevel% == 4 goto MAIN4 if %errorlevel% == 5 goto MAIN5 if %errorlevel% == 6 goto MAIN6 if %errorlevel% == 7 goto MAIN7 if %errorlevel% == 8 goto MAIN8 if %errorlevel% == 9 goto MAIN9 if %errorlevel% == 10 goto MAIN10 if %errorlevel% == 11 goto MAIN11 if %errorlevel% == 12 goto MAIN12 if %errorlevel% == 13 exit goto menu :MAIN1 cls color 2F echo. echo ********************************************* echo Coolpad 9976A FlashTool Firmware echo ********************************************* echo. pause start htt start m.vbs goto menu :MAIN2 cls color 3F echo. echo ********************************************* echo Coolpad 8295M FlashTool Firmware echo ********************************************* echo. pause start htt start m.vbs goto menu :MAIN3 cls color 4F echo. echo ********************************************* echo Coolpad 8190Q echo ********************************************* echo. pause start htt start m.vbs goto menu :MAIN4 cls color 5F echo. echo ********************************************* echo Coolpad 8297 echo ********************************************* echo. pause start htt start m.vbs goto menu :MAIN5 cls color 6F echo. echo ********************************************* echo Coolpad 7296 Firmware echo ********************************************* echo. pause start http start m.vbs goto menu :MAIN6 cls color 7F echo. echo ********************************************* echo Coolpad 7295C Firmware echo ********************************************* echo. pause start http start m.vbs goto menu :MAIN7 cls color AF echo. echo ********************************************* echo Coolpad 7295 Firmware echo ********************************************* echo. pause start http start m.vbs goto menu :MAIN8 cls color 8F echo. echo ********************************************* echo Coolpad 7298A Firmware echo ********************************************* echo. pause start http start m.vbs goto menu :MAIN9 cls color 9F echo. echo ********************************************* echo Coolpad 7270 Firmware echo ********************************************* echo. pause start http start m.vbs goto menu :MAIN10 cls color 0F echo. echo ********************************************* echo Coolpad 7231 Firmware echo ********************************************* echo. pause start htt start m.vbs goto menu :MAIN11 cls color CF echo. echo ********************************************* echo Coolpad 8122 Firmware echo ********************************************* echo. pause start htt start m.vbs goto menu :MAIN12 cls color AF echo. echo ********************************************* echo Coolpad 8076 SC8810 Firmware echo ********************************************* echo. pause start http start m.vbs goto menu