Tuesday, November 1, 2011

How to use Unix/Linux commands at the Windows command prompt

source: http://www.root777.com/security/how-to-use-unixlinux-commands-at-the-windows-command-prompt/


A lot of us who use Linux at work/school or have always grown up using unix commands for years and more often than not, there might have been instances where a ls command comes more naturally than the dir command at the command prompt in Windows. For the most part, a lot of us work around this drawback using the excellent tool: Cygwin. Cygwin is available for windows users here.The Cygwin tools are ports of the popular GNU development tools for Microsoft Windows. They run thanks to the Cygwin library which provides the UNIX system calls and environment these programs expect.
With these tools installed, it is possible to write Win32 console or GUI applications that make use of the standard Microsoft Win32 API and/or the Cygwin API. As a result, it is possible to easily port many significant Unix programs without the need for extensive changes to the source code. This includes configuring and building most of the available GNU software . Even if the development tools are of little to no use to you, you may have interest in the many standard Unix utilities provided with the package. They can be used both from the bash shell (provided) or from the standard Windows command shell.
While Cygwin would be an obvious choice for many Unix/Linux power users, there is an excellent and a much simpler alternative to using Cygwin. In this article, we will show you how to run your Unix commands right in the windows command prompt.
For this, we will be using CoreUtils. CoreUtils is available through Sourceforge and is available for download here. If you look in here, there are a number of GNUWin32 packages available, the one we would be using is the CoreUtils package. CoreUtils is a collection of basic file, shell and text manipulation utilities of the GNU operating system. These are the core utilities which are expected to exist on every OS. And when I talk about File utilities, they include chgrp, chmod, cp, dd, du, ln, ls, mkdir, mv, rm, touch, vdir among others. A sample of the text utilities include cat, cksum, cut, join, md5sum, shasum, sort, split etc. The shell root commands include echo, chroot, hostname, nice, pathchk, tty, who, whoami and yes su. So it is pretty much the whole nine yards here… The direct link for download of the CoreUtils package available through SourceForge is available here.
Once installed, you will need to add the path to the utilities to your PATH environment variable. Follow the steps below to achieve this
1. Click on Start –> Run and enter sysdm.cpl to bring up the system properties Dialog
2. Click on the Advanced tab –> Environment variables button Path to environment variable
3. In the System Variables pane, scroll down to Path and then click on edit.
4. Under Edit System Variable, in the variable value, at the end of the line , type the following including the semicolon which separates the individual elements in the path variable. ;C:\Program Files\GnuWin32\bin
env variable properties
Congratulations !! You have now added the GNUWin directory to your path and Unix commands can now be executed directly from the command line and run natively on the Win32 command prompt without the need for any emulation layer as shown below using the example of dir vs ls
command prompt comparing dir vs lsDownloads and Sources
1. Download CYGWIN
2. Download CoreUtils

How to Root Nexus S (2.3.6 works) and Nexus S 4G – Tutorial

souce: http://androidadvices.com/how-to-root-nexus-s-and-nexus-s-4g-%E2%80%93-tutorial/


For all those who own Sprint handsets of Nexus S as well as Nexus S 4G, here comes a great news as you can now enjoy the rooting process for your handsets, be it any version of firmware you are on, you can easily root your handsets easily. Basically, the rooting unlocks the device to a whole new level of possibilities which are helpful in further customizing the device which is the best part of the Android devices compared to other devices like Apple or say even Nokia whose operating systems are not so customizable which Android are. For your simplicity, we have come up with the simplest possible procedure to root your device unlike some of the complex and lengthy techniques.
So, let’s check out the same in the due course of this article on how you can easily root you devices. Before proceeding to the rooting procedure, you will have to ensure that you follow the below mentioned pre requisites carefully also most importantly you will have to also note that the rooting procedure will void the warranty, though the warranty can be claimed back once you un root the device. So, let’s proceed and see the instructions below. And also, we take no responsibility for your device and we should not be held responsible for any manner in part or in whole and proceed for the tutorial to root solely at your risk. It’s an unlikely even that you may brick your phone if you follow the instructions which are mentioned below.
Nexus SNexus S 4G
Pre Root Instructions:
  • Warranty will get void once you root Nexus S as well as Nexus S 4G, though warranty can be claimed once you un root your device.
  • In an unlikely event you may lose all the data which is present in your device, so it’s recommended to create a backup of all the data like call logmessagesapplications, music, videos and other data which is present in the phone, so that you can restore the same once the rooting process is completed.
  • Ensure that you have the installed the latest framework in your computer or also you can install the latest version of KIES which is dubbed as KIES 2 so as to ensure that all the required drivers are installed successfully.
  • It’s very important to maintain a minimum battery power of 50% so as to facilitate the smoother rooting process or else there is a high possibility that your device may end up turning completely off in the process of rooting.
  • Since the process of rooting will be taking place, all the APN settings with which you access the Internet will be wiped off completely, so ensure that you have noted all the required settings for accessing the internet so that you can configure them again back once the device gets rooted. Also, additionally ensure that you have also backed up the MMS Settings and other settings as in an unlikely event sometimes you may end up losing all the 3G Settings as well as the APN or MMS settings in the process of Rooting the device.
  • Last but not the least follow the below mentioned instructions carefully so as to save your phone from being turned into an expensive paper weight.
Procedure to Root Sprint 4G as well as Nexus S as well as Nexus S 4G:
  • First up you will have to download the Rooting package for Nexus S / Nexus S 4G device to your computer. Please note that after you download the zip file, you will have to unzip the same and in the process of unzipping if it prompts for the password then enter the password as androidadvices.com and nothing else. Kindly make a note of it as it has been found that despite mentioning several times its repeatedly being asked in the comments section.
Extracted files Nexus S Root
  • It’s always recommended to extract the files to the desktop as it will be easier for you to find the same. Now, after extraction of the files, just connect your Nexus S 4G or Nexus S device to the computer with the help of USB cable but ensure that you have enabled the USB Debugging which can be done by going to Settings > applications > Development  and enable USB Debugging. Its highly recommended to not to mount the SD card when you connect your phone with the computer.
Nexus S Debugging
  • Now, next up you will have to open the One click Nexus S 4G folder along with the drivers which should be required to root the device. Also, most importantly the drivers will be in the folder of PDA NET A 300 x64 for the 64 bit windows while for 32 bit windows you will have to select PDA NET A 300 32 bit.
  • After this you will have to click on the Run.exe file as soon as you finish installing the drivers.
  • That’s it you will have to now follow the on screen instructions to root your Nexus S 4G or Nexus S device. Please note that this process takes around 10 minutes which is the maximum time it will take for rooting the device.
Press Key to continue
  • Now, as soon as the rooting is finished you will have to reboot the device after which you will have to open the Android Market Place and then search for the application called the Root Checker and download the same.
ROOTING Path
After successful completion of the download, just tap on the application to open the same after which it will tell you whether the device has been successfully rooted or not, if the device is not rooted then you will have to follow the above procedure to root the same.
Please note that you will have to reconfigure the APN settings after updating the firmware to access the data services and the Internet services as all the Internet APN settings will be reset. You will have to contact your Service provider which is Verizon Wireless to get more info on the APN Settings. Not to forget also configure the MMS Settings. Do let us know if you face any issues while rooting the device as we will see to it that the issues are solved. Just in case if the rooting process is interrupted in the middle then you just need to re follow the whole procedure from the start to root your device.