Ubuntu 10 : Using Android layoutopt command from terminal

Recently I got to know about “layoutopt” command of Android ,and this command is situated under androidsdk/tools folder.In windows,I do know how to set environment variables ,so that I could access “layoutopt” command from my command line.But in Ubuntu,I found it hard ,not because it is hard but the way to implement it couldn’t be found easily on the net. I found two ways to implement “layoutopt” command in Ubuntu and that is what I am going to share with you all

First Way

  1. Go to terminal
  2. Navigate to the android sdk folder’s tool by typing cd androidsdk/tools
  3. then type ./layoutopt

In this manner you can implement “layoutopt” by jumping directly to the tools location and typing out the “layoutopt” command

Second Way

  1. Go to terminal
  2. Type

  3. sudo su
  4. cd /etc
  5. gedit bash.bashrc

gedit bash.bashrc
Note:gedit works only if gedit is installed in your Ubuntu

After you have opened “bash.bashrc” on gedit then type the following codes on it

export PATH=$PATH:/home/santosh/android_sdk/android-sdk-linux_x86/tools/

  1. Here “santosh” is the username where you should put your username
  2. And my android sdk is placed in home folder named as android_sdk/android-sdk-linux_x86/ and you should put the location of your androidsdk folder


Now save the bash.bashrc file and exit the gedit.
Launch terminal and type layoutopt and holla ,you can access all android tools through command line

Hope now you all can enjoy Android tools through Ubuntu command lines


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s