Running batch script using JAVA and storing output in a log file.
Batch script to be run will take input parameters / arguments.The below simple Java code will help to run a batch file (bat script) and store the output of batch run in to a file. The batch script to be run from the java takes few parameters as inputs.
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.InetAddress;
public class ApplicabilityCheck {
public static void main(String[] args) {
try {
System.out.println("ESS BVT");
String cfgprefix = "server1";
InetAddress hostname = InetAddress.getLocalHost();
String host = hostname.getCanonicalHostName();
String httpsPort = "16311";
String truststorepassword = "krishna";
String basicauthuser = "krishna";
String basicauthpassword = "krishna";
String essCleintPath = "C:\\Krish\\My Docs\\Foundation services install\\ESS - 15183\\ESSAuthnClientApp\\MyApp\\bin";
String essOutputDir = "C:\\Krish\\My Docs\\Foundation services install\\ESS - 15183\\ESSAuthnClientApp";
String passString = "succeeded";
File tokenOutFile = new File("ESS_Token_Out");
File essOutputFile = new File(essOutputDir + "\\ESS_OUTPUT.log");
File iosdpTrustStoreFile = new File(essCleintPath + "\\16311.jks");
File runExampleFile = new File(essCleintPath+ "\\runExampleApp.bat");
if (iosdpTrustStoreFile.exists() && runExampleFile.exists()) {
System.out.println("File:- "
+ iosdpTrustStoreFile.getAbsolutePath() + " Exists");
String setupExampleString = "setupExampleApp.bat -cfgprefix "
+ cfgprefix + " -host " + host + " -port " + httpsPort
+ " -protocol https -truststorelocation \""
+ iosdpTrustStoreFile.getAbsolutePath()
+ "\" -truststorepassword " + truststorepassword
+ " -basicauthuser " + basicauthuser
+ " -basicauthpassword " + basicauthpassword;
System.out.println(setupExampleString);
String runExampleAppString = "\""
+ runExampleFile.getAbsolutePath() + "\" " + cfgprefix
+ " -tokenOutFile " + tokenOutFile.getName() + " -uname "
+ basicauthuser + " -pword " + basicauthpassword;
System.out.println(runExampleAppString);
/* Now running the Run Example */
Runtime runtime = Runtime.getRuntime();
Process p = runtime.exec(runExampleAppString, null, new File(essCleintPath));
String line;
BufferedReader r = new BufferedReader(new InputStreamReader(p.getInputStream()));
BufferedWriter w = new BufferedWriter(new FileWriter(essOutputFile));
while ((line = r.readLine()) != null) {
if(line.contains(passString)) System.out.println("ESS installed");
w.write(line);
}
r.close();
w.close();
} else
System.out.println("Trust Store JKS file is not available");
} catch (Exception e) {
System.out.println(e);
}
}
}
References:
[1]

Krishna Weds Sudha - Marriage Live recorded video.
Thursday, March 22, 2012
// //
1 comments
//
How to invoke p(j)ython script through ANT scripts do deploy WAR files on to Webshere. ?
The below is a simple ant script invoking python files which will deploy and un-deploy the given J2EE Apps in running Websphere server profile. 1. The ant script will invoke python files.
2. Ant script's target pathconvert will convert the property values containg back slashes in a file path to forward slashes.
3. Ant script target timestamp will print the time stamp along with message in the given log file. Takes care of new line character using 
 at the end of message ...
Ant Script to call jython scripts which will deploy and undeploy provided J2E WAR file.
Below is the Ant script.
hi
<project name="DeployFSAdmin" default="install" basedir=".">
<description>
Silent Deployment of WAR files
</description>
<property name="FSAdminLog" value="c:/FSAdmin_install.log" />
<target id="install" name="install" depends="pathconvert">
<antcall target="timestamp">
<param name="LogFile" value="${FSAdminLog}" />
<param name="Message" value="Starting Server now" />
</antcall>
<exec executable="C:\\Program Files\\IBM\\WebSphere\\AppServer\\profiles\\AppSrv01\\bin\\startServer.bat" output="${FSAdminLog}" append="true">
<arg value="server1" />
</exec>
<antcall target="timestamp">
<param name="LogFile" value="${FSAdminLog}" />
<param name="Message" value="Starting FS Admin App Deployment now" />
</antcall>
<exec executable="C:\\Program Files\\IBM\\WebSphere\\AppServer\\profiles\\AppSrv01\\bin\\wsadmin.bat" output="${FSAdminLog}" append="true">
<arg value="-lang" />
<arg value="jython" />
<arg value="-username" />
<arg value="krishna" />
<arg value="-password" />
<arg value="krishna" />
<arg value="-f" />
<arg value="${deployFile}" />
<arg value="${updatedWARFile}" />
<arg value="FSAdminApp" />
<arg value="server1" />
</exec>
<antcall target="timestamp">
<param name="LogFile" value="${FSAdminLog}" />
<param name="Message" value="FS Admin App Deployment completed" />
</antcall>
</target>
<target id="unistall" name="uninstall">
<antcall target="timestamp">
<param name="LogFile" value="${FSAdminLog}" />
<param name="Message" value="Starting Server now." />
</antcall>
<exec executable="C:\\Program Files\\IBM\\WebSphere\\AppServer\\profiles\\AppSrv01\\bin\\startServer.bat" output="${FSAdminLog}" append="true">
<arg value="server1" />
</exec>
<antcall target="timestamp">
<param name="LogFile" value="${FSAdminLog}" />
<param name="Message" value="Un-Deployment of FS Admin in progress..." />
</antcall>
<exec executable="C:\\Program Files\\IBM\\WebSphere\\AppServer\\profiles\\AppSrv01\\bin\\wsadmin.bat" output="${FSAdminLog}" append="true">
<arg value="-lang" />
<arg value="jython" />
<arg value="-username" />
<arg value="krishna" />
<arg value="-password" />
<arg value="krishna" />
<arg value="-f" />
<arg value="${undeployFile}" />
<arg value="FSAdminApp" />
<arg value="server1" />
</exec>
<antcall target="timestamp">
<param name="LogFile" value="${FSAdminLog}" />
<param name="Message" value="Undeployment of FASApp completed" />
</antcall>
</target>
<!-- The target "pathconvert" is to convert all the windows back slahes into forward slashes-->
<target id="pathconvert" name="pathconvert">
<tempfile property="temp.file" />
<echo message="${warfile}" file="${temp.file}" />
<loadfile srcfile="${temp.file}" property="updatedWARFile">
<filterchain>
<replaceregex pattern="\\" replace="/" flags="g" />
</filterchain>
</loadfile>
<delete file="${temp.file}" />
</target>
<!-- To print the time stamp along with message in a log file -->
<target name="timestamp">
<tstamp>
<format property="logtime" pattern="yyyy.MM.dd ':' HH:mm:ss z" />
</tstamp>
<!-- New line charecter uasage 
 -->
<echo file="${LogFile}" message="
${logtime} : ${Message}.
" append="true" />
</target>
</project>
Below is the Deploying Python file.<project name="DeployFSAdmin" default="install" basedir=".">
<description>
Silent Deployment of WAR files
</description>
<property name="FSAdminLog" value="c:/FSAdmin_install.log" />
<target id="install" name="install" depends="pathconvert">
<antcall target="timestamp">
<param name="LogFile" value="${FSAdminLog}" />
<param name="Message" value="Starting Server now" />
</antcall>
<exec executable="C:\\Program Files\\IBM\\WebSphere\\AppServer\\profiles\\AppSrv01\\bin\\startServer.bat" output="${FSAdminLog}" append="true">
<arg value="server1" />
</exec>
<antcall target="timestamp">
<param name="LogFile" value="${FSAdminLog}" />
<param name="Message" value="Starting FS Admin App Deployment now" />
</antcall>
<exec executable="C:\\Program Files\\IBM\\WebSphere\\AppServer\\profiles\\AppSrv01\\bin\\wsadmin.bat" output="${FSAdminLog}" append="true">
<arg value="-lang" />
<arg value="jython" />
<arg value="-username" />
<arg value="krishna" />
<arg value="-password" />
<arg value="krishna" />
<arg value="-f" />
<arg value="${deployFile}" />
<arg value="${updatedWARFile}" />
<arg value="FSAdminApp" />
<arg value="server1" />
</exec>
<antcall target="timestamp">
<param name="LogFile" value="${FSAdminLog}" />
<param name="Message" value="FS Admin App Deployment completed" />
</antcall>
</target>
<target id="unistall" name="uninstall">
<antcall target="timestamp">
<param name="LogFile" value="${FSAdminLog}" />
<param name="Message" value="Starting Server now." />
</antcall>
<exec executable="C:\\Program Files\\IBM\\WebSphere\\AppServer\\profiles\\AppSrv01\\bin\\startServer.bat" output="${FSAdminLog}" append="true">
<arg value="server1" />
</exec>
<antcall target="timestamp">
<param name="LogFile" value="${FSAdminLog}" />
<param name="Message" value="Un-Deployment of FS Admin in progress..." />
</antcall>
<exec executable="C:\\Program Files\\IBM\\WebSphere\\AppServer\\profiles\\AppSrv01\\bin\\wsadmin.bat" output="${FSAdminLog}" append="true">
<arg value="-lang" />
<arg value="jython" />
<arg value="-username" />
<arg value="krishna" />
<arg value="-password" />
<arg value="krishna" />
<arg value="-f" />
<arg value="${undeployFile}" />
<arg value="FSAdminApp" />
<arg value="server1" />
</exec>
<antcall target="timestamp">
<param name="LogFile" value="${FSAdminLog}" />
<param name="Message" value="Undeployment of FASApp completed" />
</antcall>
</target>
<!-- The target "pathconvert" is to convert all the windows back slahes into forward slashes-->
<target id="pathconvert" name="pathconvert">
<tempfile property="temp.file" />
<echo message="${warfile}" file="${temp.file}" />
<loadfile srcfile="${temp.file}" property="updatedWARFile">
<filterchain>
<replaceregex pattern="\\" replace="/" flags="g" />
</filterchain>
</loadfile>
<delete file="${temp.file}" />
</target>
<!-- To print the time stamp along with message in a log file -->
<target name="timestamp">
<tstamp>
<format property="logtime" pattern="yyyy.MM.dd ':' HH:mm:ss z" />
</tstamp>
<!-- New line charecter uasage 
 -->
<echo file="${LogFile}" message="
${logtime} : ${Message}.
" append="true" />
</target>
</project>
hi
'''
Created on Jan 18, 2012
@author: krishna
'''
import sys
#--------------------------------------------------------------
# Install an application onto this server
#--------------------------------------------------------------
def install(serverName, nodeName, app, appName=None):
print "Installing the application"
appOptions = "[-server " + serverName + " -node " + nodeName
if len(appName) != 0:
appOptions = appOptions + " -appname " + appName +" -contextroot " + appName
appOptions = appOptions + " -defaultbinding.virtual.host default_host -usedefaultbindings]"
print "Server Options: " + appOptions
AdminApp.install(app, appOptions)
#--------------------------------------------------------------
# Save all changes and stop the server
#--------------------------------------------------------------
print "Now saving all the configurations"
AdminConfig.save()
print "Now stoping the server"
AdminControl.stopServer(serverName, nodeName)
#-----------------------------------------------------------------
# Main
#-----------------------------------------------------------------
if (len(sys.argv) != 3):
print "This script requires 3 parameters:, , "
print "e.g.: argsDeployWARfile.py C:/Krish/SimpleJ2E_1.0.0.war SimpleJ2E server1"
else:
application = sys.argv[0]
appName = sys.argv[1]
print "application: " + application
print "app name: " + appName
nodeName = AdminControl.getNode()
print nodeName
serverName = sys.argv[2]
print serverName
install(serverName, nodeName, application, appName)
Below is the un-deploying Python file.'''
Created on Jan 18, 2012
@author: krishna
'''
import sys
#--------------------------------------------------------------
# Install an application onto this server
#--------------------------------------------------------------
def install(serverName, nodeName, app, appName=None):
print "Installing the application"
appOptions = "[-server " + serverName + " -node " + nodeName
if len(appName) != 0:
appOptions = appOptions + " -appname " + appName +" -contextroot " + appName
appOptions = appOptions + " -defaultbinding.virtual.host default_host -usedefaultbindings]"
print "Server Options: " + appOptions
AdminApp.install(app, appOptions)
#--------------------------------------------------------------
# Save all changes and stop the server
#--------------------------------------------------------------
print "Now saving all the configurations"
AdminConfig.save()
print "Now stoping the server"
AdminControl.stopServer(serverName, nodeName)
#-----------------------------------------------------------------
# Main
#-----------------------------------------------------------------
if (len(sys.argv) != 3):
print "This script requires 3 parameters:
print "e.g.: argsDeployWARfile.py C:/Krish/SimpleJ2E_1.0.0.war SimpleJ2E server1"
else:
application = sys.argv[0]
appName = sys.argv[1]
print "application: " + application
print "app name: " + appName
nodeName = AdminControl.getNode()
print nodeName
serverName = sys.argv[2]
print serverName
install(serverName, nodeName, application, appName)
hi
'''
Created on Jan 18, 2012
@author: krishna
'''
#-----------------------------------------------------------------
# Main
#-----------------------------------------------------------------
if (len(sys.argv) != 2):
print "This script requires 1 parameters:, "
print "e.g.: undeployWAR.py SimpleJ2E server1"
else:
appName = sys.argv[0]
print "application name: " + appName
serverName = sys.argv[1]
print "Server Name: " + serverName
nodeName = AdminControl.getNode()
AdminApp.uninstall (appName)
print "Now saving all the configurations"
AdminConfig.save()
print "Now stopping the server"
AdminControl.stopServer(serverName, nodeName)
'''
Created on Jan 18, 2012
@author: krishna
'''
#-----------------------------------------------------------------
# Main
#-----------------------------------------------------------------
if (len(sys.argv) != 2):
print "This script requires 1 parameters:
print "e.g.: undeployWAR.py SimpleJ2E server1"
else:
appName = sys.argv[0]
print "application name: " + appName
serverName = sys.argv[1]
print "Server Name: " + serverName
nodeName = AdminControl.getNode()
AdminApp.uninstall (appName)
print "Now saving all the configurations"
AdminConfig.save()
print "Now stopping the server"
AdminControl.stopServer(serverName, nodeName)

The below is a simple HTML code containing JAVA script to use the object XMLHttpRequest to retrieve the contents of a weburl when GET is applied. Simple to say do HTTP GET and show the contents of URL.
References:
[1] [2]
Note : working only on Internet Explorer
<html>
<head>
<script type="text/javascript">
function loadXMLDoc()
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
alert('Http State is:' + xmlhttp.readyState);
alert('HTTP Status is :' + xmlhttp.statusText);
if (xmlhttp.readyState==4 )
{
if ( xmlhttp.status==200 )
{
alert('Response data as String :' + xmlhttp.responseText);
alert('Response data as XML:' + xmlhttp.responseXML);
}
}
}
try {
xmlhttp.open("GET","http://www.krishnababug.com/",true);
xmlhttp.send("");
}
catch (e) {
alert(e);
}
}
</script>
</head>
<body>
<h2>How to use XMLHttpRequest object</h2>
<div id="myDiv"></div>
<button type="button" onclick="loadXMLDoc()">Load URL - Click to change state</button>
</body>
</html>
<head>
<script type="text/javascript">
function loadXMLDoc()
{
if (window.XMLHttpRequest)
{// code for IE7+, Firefox, Chrome, Opera, Safari
xmlhttp=new XMLHttpRequest();
}
else
{// code for IE6, IE5
xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
}
xmlhttp.onreadystatechange=function()
{
alert('Http State is:' + xmlhttp.readyState);
alert('HTTP Status is :' + xmlhttp.statusText);
if (xmlhttp.readyState==4 )
{
if ( xmlhttp.status==200 )
{
alert('Response data as String :' + xmlhttp.responseText);
alert('Response data as XML:' + xmlhttp.responseXML);
}
}
}
try {
xmlhttp.open("GET","http://www.krishnababug.com/",true);
xmlhttp.send("");
}
catch (e) {
alert(e);
}
}
</script>
</head>
<body>
<h2>How to use XMLHttpRequest object</h2>
<div id="myDiv"></div>
<button type="button" onclick="loadXMLDoc()">Load URL - Click to change state</button>
</body>
</html>
References:
[1] [2]
Note : working only on Internet Explorer

I am using Cyanogen Mod7 (Android 2.3.7) so most of the built-in things are helping me :) Adding to them I have the below best apps for my daily use.
1. 3G Mobile Hotspot
The best wifi tither app on my phone. Less radiation , less heat and more over easy to use and connect any device.
2. Adobe reader
Nothing to say about it, best pdf reader as always.
3. Advance English (MSDict Viewer)
Good English dictionary for quick access. But till today couldn't locate the dictionary file where it is saving. When ever you go for factory reset you have to re download the dictionary file if you wont take back up of SDCARD.
4. Andro FTP
Best app to start FTP server on your phone and share your files with others when wifi enabled, and vice-verse to take files from others.
5. Android Booster
Famous app to monitor your GPRS usage, power management and statistics , and managing your memory by killing unwanted apps.
6. Androzip
File manager come zip application for my phone. I use send to bluetooth device option directly from here as I don't see , send via Bluetooth option in normal file manager.
7. Angry birds
Nothing to say about it , don't remember how many hours I spent on this :)
8. Any Post
Simple, lite app for posting status to multiple social networking sites at a time. Photo, Map and text options available.
10. Background
When ever I feel boring to see my phone screen I logon to this app to download new beautiful backgrounds for my phone.
11. BookMy show
Suitable for Indian Android users to book your movies, and special events near your city.
12. Brillinat Quotes
Want some inspiring quotes every day ? try this app !
13. Bubble pop
Most famous used app by my niece :) time pass bubble breaking game.
14. ByteConverter
When I see big numbers to convert between Bytes and bits etc need this.
15. compass
Helped multiple times to locate sun in new locations :)
16. Documents to go
Best office tool I have seen for my phone. Support doc,xls, ppt etc.
17. ES Task Manager
Helps controlling startup apps or services and cleaning cache memory.
18. Expense Manager
Password protected app to keep track of your expenses and income with clean analytical charts.
19. Facebook
Nothing to say about it , I still don't find the way to share videos I saw from others wall.
20 Full on SMS
Free SMS sending App works in India, but wont display name on the receiver phone :( with new TROI rules.
21. IBM Leap Manager
WIFI manager to connect to IBM wifi networks
22. IMDB
Nothing to say about it , on-time guide to find your favorite movie review.
23. Indian Rail
Simple app to find the trains status, PNR status and locating the train etc. Work in India.
24. Mail (Yahoo)
Mail client for Yahoo.
25. Maps
Google maps , still don't know how to use voice navigation on this. Any other best maps app for android which can compete with OVI maps.
26. Milage Tracker
Started recently to keep track of the petrol expenses. Need time to rate it.
27. MixZing Basic
Good music player with folder wise section options and categorizing with albums etc.
28. Mobo Video Player
Felt happy using it multiple times while playing 720 p videos on my phone and while watching movies with subtitles which sync perfectly with audio and video.
29. MX Video Player
Another best video player like above to watch all videos which needs some soft encoding.
30. NetQin Security
Good Security anti-virus app required for my phone to keep it healthy.
31. NewsHunt
Indian regional news papers with easy use and automatic support of regional language fonts like Telugu, kanada, Tamil, Gujarathi, Marathi,Hindi and many more. I like to read my favorite eenadu Telugu daily on this.
32. ngpay
Mall on the phone is the best apt quote for this. Easy to use HDFC and other bank transactions. Book your bus or train ticket on a fly. Order your piza or sweets what not day by day its growing like any thing in India. Safe to use.
33. Nimbuzz
Superb! multi-messenger .
34. Note Evrything
35. Pansi SMS
36. PVR
37. Quick boot
38. Radio Kushi
39. Ragalahari
40. Sametime
41. skype
42. speed Test
43. Super Manager
44. Tangram Moment
45. Terminal Emulator
46. TM World clock
47. Torch
48. TORI
49. Translate
50. TubeMate
51. Twica
52. Ustream
53. YuppTV
Please try to add your best apps in comments , I would like to tune my list to shift to stable apps.
1. 3G Mobile Hotspot
The best wifi tither app on my phone. Less radiation , less heat and more over easy to use and connect any device.
2. Adobe reader
Nothing to say about it, best pdf reader as always.
3. Advance English (MSDict Viewer)
Good English dictionary for quick access. But till today couldn't locate the dictionary file where it is saving. When ever you go for factory reset you have to re download the dictionary file if you wont take back up of SDCARD.
4. Andro FTP
Best app to start FTP server on your phone and share your files with others when wifi enabled, and vice-verse to take files from others.
5. Android Booster
Famous app to monitor your GPRS usage, power management and statistics , and managing your memory by killing unwanted apps.
6. Androzip
File manager come zip application for my phone. I use send to bluetooth device option directly from here as I don't see , send via Bluetooth option in normal file manager.
7. Angry birds
Nothing to say about it , don't remember how many hours I spent on this :)
8. Any Post
Simple, lite app for posting status to multiple social networking sites at a time. Photo, Map and text options available.
10. Background
When ever I feel boring to see my phone screen I logon to this app to download new beautiful backgrounds for my phone.
11. BookMy show
Suitable for Indian Android users to book your movies, and special events near your city.
12. Brillinat Quotes
Want some inspiring quotes every day ? try this app !
13. Bubble pop
Most famous used app by my niece :) time pass bubble breaking game.
14. ByteConverter
When I see big numbers to convert between Bytes and bits etc need this.
15. compass
Helped multiple times to locate sun in new locations :)
16. Documents to go
Best office tool I have seen for my phone. Support doc,xls, ppt etc.
17. ES Task Manager
Helps controlling startup apps or services and cleaning cache memory.
18. Expense Manager
Password protected app to keep track of your expenses and income with clean analytical charts.
19. Facebook
Nothing to say about it , I still don't find the way to share videos I saw from others wall.
20 Full on SMS
Free SMS sending App works in India, but wont display name on the receiver phone :( with new TROI rules.
21. IBM Leap Manager
WIFI manager to connect to IBM wifi networks
22. IMDB
Nothing to say about it , on-time guide to find your favorite movie review.
23. Indian Rail
Simple app to find the trains status, PNR status and locating the train etc. Work in India.
24. Mail (Yahoo)
Mail client for Yahoo.
25. Maps
Google maps , still don't know how to use voice navigation on this. Any other best maps app for android which can compete with OVI maps.
26. Milage Tracker
Started recently to keep track of the petrol expenses. Need time to rate it.
27. MixZing Basic
Good music player with folder wise section options and categorizing with albums etc.
28. Mobo Video Player
Felt happy using it multiple times while playing 720 p videos on my phone and while watching movies with subtitles which sync perfectly with audio and video.
29. MX Video Player
Another best video player like above to watch all videos which needs some soft encoding.
30. NetQin Security
Good Security anti-virus app required for my phone to keep it healthy.
31. NewsHunt
Indian regional news papers with easy use and automatic support of regional language fonts like Telugu, kanada, Tamil, Gujarathi, Marathi,Hindi and many more. I like to read my favorite eenadu Telugu daily on this.
32. ngpay
Mall on the phone is the best apt quote for this. Easy to use HDFC and other bank transactions. Book your bus or train ticket on a fly. Order your piza or sweets what not day by day its growing like any thing in India. Safe to use.
33. Nimbuzz
Superb! multi-messenger .
34. Note Evrything
35. Pansi SMS
36. PVR
37. Quick boot
38. Radio Kushi
39. Ragalahari
40. Sametime
41. skype
42. speed Test
43. Super Manager
44. Tangram Moment
45. Terminal Emulator
46. TM World clock
47. Torch
48. TORI
49. Translate
50. TubeMate
51. Twica
52. Ustream
53. YuppTV
Please try to add your best apps in comments , I would like to tune my list to shift to stable apps.
Thursday, October 20, 2011
//
Labels:
Mobile Stuff
//
1 comments
//
How to upgrade to Android 2.3.X (Gingerbread) from 2.1 (Eclair) using CynogenMod 7.1 (CM 7.1) on Motorola Milestone A853 / A953 ?
How to upgrade to Android 2.3.X (Gingerbread) from 2.1 (Eclair) using CynogenMod 7.1 (CM 7.1) on Motorola Milestone A853 / A953 ?
Before following the below steps to flash your phone with new Cynogenmod7 ROM; make sure that you have taken all necessary backups like contacts, SMS and most used apps etc.
Pre-Reqs:
1. Your phone must be rooted before. To root the phone follow the below instructions.(http://www.krishnababug.com/2011/07/root-android-phones-motorola-htc.html)
2. Download the required below files and keep it ready from http://forum.xda-developers.com/showthread.php?t=941346
a. Open Recovery - OpenRecovery 1.46 - BR 0.3.zip (for update OR1.46_extfs_mmcfix_update.zip )
Download from link
b. Google apps - gapps-gb-20110828-newtalk-signed.zip
c. CynogenMod ROM - update-cm-7.1.0-11.10.12-Milestone-odexed-signed.zip
3. Disable_recovery_check_by_OTA.sh - Search in google and download this file.
4. Enable USB debugging on your phone from Menu > Settings > Applications > Development and connect it to your computer via USB.
Now Create a Folder structure under sdcard root like below
sdcard
|
|__update.zip
|
|
|__OpenRecovery
| |
| |__scripts
| | |
| | |__Disable_recovery_check_by_OTA.sh
| |
| |__updates
| |
| |__update-cm-7.1.0-11.10.12-Milestone-odexed-signed.zip
| |
| |__gapps-gb-20111012-signed.zip
|
|____ Other_Stuff
Steps to flash your phone with new Android build by CynogenMod:
2. While you Power on; press X button on the physical keyboard on your milestone.
3. Hold ‘X’ until you see a Triangle with an Exclamation mark on it, and then let go of ‘X’.
4. (If required ) Press & Hold the Volume up button and press the camera button. You'll be taken to Android System Recovery.
5. Using D-Pad as cursor and golden button in the middle as ‘Enter’ , Perform a ‘Wipe Data/Factory Reset’ & ‘Wipe Cache Partition’
6. Once done , apply Sdcard :update.zip.
7. You will be taken to Motorola Milestone Open Recovery Version 1.46 .
8. From menu, go to Nandroid > Backup All. This will place a backup of your current ROM in a folder called Nandroid on your SD Card.
9. Move it to a safe location later.
10. Perform a wipe data/factory reset (In case of CynogenMod updates skip this step)
11. Perform wipe > wipe cache partition and wipe Dalvik cache.
12. Apply Update, scroll to ‘update milestone-signed.zip’ and apply.
13. Now Apply ‘gapps signed.zip’ and Apply.
14. Go back to Main Menu and reboot system
15. All set to see new CynogenMod logo after Motorola logo :) The first boot may take more time.
Possible errors :
1. E:signature verification failed error - If you get this error , make sure that the file under SDCARD > OpenRecovery > scripts > Disable_recovery_check_by_OTA.sh is fine and readable.
Note : Keep the above tree structure available always on ur sdcard and replace the new updates under updates directory each time when new updates are available.
Reference :
Before following the below steps to flash your phone with new Cynogenmod7 ROM; make sure that you have taken all necessary backups like contacts, SMS and most used apps etc.
Pre-Reqs:
1. Your phone must be rooted before. To root the phone follow the below instructions.(http://www.krishnababug.com/2011/07/root-android-phones-motorola-htc.html)
2. Download the required below files and keep it ready from http://forum.xda-developers.com/showthread.php?t=941346
a. Open Recovery - OpenRecovery 1.46 - BR 0.3.zip (for update OR1.46_extfs_mmcfix_update.zip )
Download from link
b. Google apps - gapps-gb-20110828-newtalk-signed.zip
c. CynogenMod ROM - update-cm-7.1.0-11.10.12-Milestone-odexed-signed.zip
3. Disable_recovery_check_by_OTA.sh - Search in google and download this file.
4. Enable USB debugging on your phone from Menu > Settings > Applications > Development and connect it to your computer via USB.
Now Create a Folder structure under sdcard root like below
sdcard
|
|__update.zip
|
|
|__OpenRecovery
| |
| |__scripts
| | |
| | |__Disable_recovery_check_by_OTA.sh
| |
| |__updates
| |
| |__update-cm-7.1.0-11.10.12-Milestone-odexed-signed.zip
| |
| |__gapps-gb-20111012-signed.zip
|
|____ Other_Stuff
Steps to flash your phone with new Android build by CynogenMod:
2. While you Power on; press X button on the physical keyboard on your milestone.
3. Hold ‘X’ until you see a Triangle with an Exclamation mark on it, and then let go of ‘X’.
4. (If required ) Press & Hold the Volume up button and press the camera button. You'll be taken to Android System Recovery.
5. Using D-Pad as cursor and golden button in the middle as ‘Enter’ , Perform a ‘Wipe Data/Factory Reset’ & ‘Wipe Cache Partition’
6. Once done , apply Sdcard :update.zip.
7. You will be taken to Motorola Milestone Open Recovery Version 1.46 .
8. From menu, go to Nandroid > Backup All. This will place a backup of your current ROM in a folder called Nandroid on your SD Card.
9. Move it to a safe location later.
10. Perform a wipe data/factory reset (In case of CynogenMod updates skip this step)
11. Perform wipe > wipe cache partition and wipe Dalvik cache.
12. Apply Update, scroll to ‘update milestone-signed.zip’ and apply.
13. Now Apply ‘gapps signed.zip’ and Apply.
14. Go back to Main Menu and reboot system
15. All set to see new CynogenMod logo after Motorola logo :) The first boot may take more time.
Possible errors :
1. E:signature verification failed error - If you get this error , make sure that the file under SDCARD > OpenRecovery > scripts > Disable_recovery_check_by_OTA.sh is fine and readable.
Note : Keep the above tree structure available always on ur sdcard and replace the new updates under updates directory each time when new updates are available.
Reference :
Wednesday, October 19, 2011
//
Labels:
Mobile Stuff
//
1 comments
//
Popular Posts
-
The best solution to know about these init levels is to understand the " man init " command output on Unix. There are basically 8...
-
How to Unlock BSNL 3G data card to use it with Airtel and Vodafone Model no : LW272 ? How to unlock BSNL 3G data card( Model no : LW272 )us...
-
How to transfer bike registration from one State to other (Karnataka to Andhra)?? Most of us having two wheelers purchased and registered in...
-
Latest Post on ETV D3 Old Post on ETV D1 D2 link ETV Dhee 3 - D3 - Enjoy maadi ETV Dhee feedback link - Direct ETV site use this...
-
ఓం శ్రీ స్వామియే శరణం ఆయ్యప్ప!! Related posts : Trip to Sabarimala - Part 1 Trip to Sabarimala - Part 2 Ayappa Deeksha required things...
Popular posts
- Airtel and vodafone GPRS settings for pocket PC phones
- Andhra 2 America
- Ayyappa Deeksha required things
- Blogs I watch !
- Captions for your bike
- DB2 FAQs
- Deepavali Vs The Goddes of sleep
- ETV - Dhee D2 D3
- Evolution of smoking in India Women
- How to make credit card payments?
- init 0, init 1, init 2 ..
- Java-J2EE interview preparation
- mCheck Application jar or jad download
- My SQL FAQs
- My Travelogues
- Old is blod - New is italic
- Online pay methids for credit cards
- Oracle FAQs
- Pilgrimages
- Smoking in Indian Women
- Technology Vs Humans
- Twitter feeds for all Telugu stars on single page.
- Unix best practices
- Unix FAQs

