Thursday, May 3, 2012

Can not start AVD after creating - Android

Android system is emulated in the computer using Android Virtual Devices(AVDs). In my ubuntu ,When I create a new AVD using the AVD and SDK Manager it creates a file named

<avd-name>.ini

in the directory below  

~/.android/avd

When we try to start a virtual machine it tries to read the corresponding .ini file from that directory. Recently I created an AVD and when i tried to run it ,the AVD manger greeted me with the following error massage

PANIC: Could not open: ~/.android/avd/<avd-name>.ini

Just because of I typed
 
    sudo ./android

to run the  SDK and AVD Manager . For that it created the .ini file in
 
   /root/.android/avd

directory instead of the location desired by the Start command. Running
 
   ./android

command and cretaing new AVD there solved my problem.


Wednesday, May 2, 2012

Resuming cancelled download of Google Chrome

Say you are downloading a large file and it gets cancelled before finishing . But you want to resume that file and there is no such option in the chrome's default downloader . In linux, you can do the following -

Chrome usually saves the content of the file it is downloading to a file with following file-name pattern
         <filename>.<extention>.crdownload
in the directory where it usually saves the file after download. If you want to know which directory it is
follow the steps below-
  • Click the "wrench" icon on the upper right corner of the browser
  • Next Go to Preferences >> Under the hood >> Downloads   
So as you have a cancelled download , you most probably get a similar file with .crdownload extension.

Remove the .crdownload portion from the filename. (For safety you can make a copy of that file then remove the extension ) .

Then run a shell and type


wget -c <link to the file>

Here  <link to the file> is that chrome used to download the file . You can get it from the downloader of chrome.

If you do not find wget commnad ( in rare case ) type 

sudo apt-get install wget 

to install it in your machine.

After running the download command, wget will report how much of the target file it has already downloaded. By observing this you can be sure if it is really working.