senin-kamis 12.00
jumat 13
sabtu 11
Wednesday, October 20, 2010
Wednesday, October 13, 2010
Tuesday, October 12, 2010
Sunday, October 10, 2010
printer
http://eecchhoo.wordpress.com/2010/04/14/menginstall-printer-epson-tx111-di-ubuntu-linux/
Menginstall Printer Epson TX111 di Ubuntu Linux
i
5 Votes
Quantcast
Saat ditulisnya artikel ini printer Epson TX111 lumayan baru keluar. Mungkin yang jadi masalah buat pengguna Linux adalah, apakah printer ini bisa jalan jika pake Linux? Karena printer ini adalah printer multifungsi, selain bisa mencetak bisa juga untuk melakukan proses scan dan potocopy, yup Epson TX111 adalah printer multifungsi:
Jadi bagaimana cara menginstall printer Epson TX111 ini?
Instalasi CUPS (Common UNIX Printing System)
Coba buka aplikasi perambah anda, lalu buka alamat :
http://localhost:631/
Jika tidak muncul halaman seperti ini :
Artinya dalam Ubuntu anda belum terinstall CUPS, install dengan perintah :
sudo apt-get install cups
selesai :D
Download Driver Epson TX111
Untuk download driver Epson TX111, silahkan masuk ke halaman web :
http://www.avasys.jp/lx-bin2/linux_e/spc/DL1.do
Pilih tipe printernya Epson TX111 :
Setelah itu next, dan muncul halaman downloadnya. Download driver untuk Ubuntu :
Karena printer Epson TX111 itu gabung dengan Scanner, jadi kita juga harus download aplikasi iScan untuk scanner nya, scroll ke bagian bawah nanti terlihat bagian :
Download iScan untuk Ubuntu :
Instalasi Driver Epson TX111
Sekarang di komputer kita telah terdapat file :
pips-snx110-ubuntu8.04-3.8.0-CG.tgz
iscan_2.24.0-4.ltdl7_i386.deb
sekarang tinggal menginstall Driver Printer lalu menginstall iScan, caranya extract file pips-snx110-ubuntu8.04-3.8.0-CG.tgz dan jalankan hasil extractnya, perintah terminalnya seperti dibawah ini :
tar xvf pips-snx110-ubuntu8.04-3.8.0-CG.tgz
./pips-snx110-ubuntu8.04-3.8.0-CG.install
karena hasil ekstrak nya hanyalah file pips-snx110-ubuntu8.04-3.8.0-CG.install. Ikuti proses instalasi sampai selesai.
Instalasi Printer Epson TX111 pada CUPS
Buka halaman http://localhost:631/ menggunakan browser, maka akan terdapat halaman CUPS.
Buka halaman Adminstration.
Pada bagian Pinters, pilih Find New Printer, setelah itu akan terlihat printer EPSON Epson Stylus TX111, tambahkan printer tersebut :
Setelah itu ikuti tahapan2nya sampai selesai.
Setelah selesai lihatlah bagian Printers, maka sekarang printer Epson TX111 telah terregister ke CUPS :
Sekarang Printer sudah bisa digunakan, namun scannernya belum bisa :D
Instalasi Scanner Epson TX111
Cara menginstall scanner cukup sederhana, caranya, dobel klik file iscan_2.24.0-4.ltdl7_i386.deb, lalu pilih Install Package, tunggu sampai proses instalasi selesai. Setelah selesai sekarang anda dapat melihat aplikasi Image Scan! for Linux.
Buka aplikasi Image Scan! for Linux di lewat menu Ubuntu -> Graphics -> Image Scan! for Linux :
Menginstall Printer Epson TX111 di Ubuntu Linux
i
5 Votes
Quantcast
Saat ditulisnya artikel ini printer Epson TX111 lumayan baru keluar. Mungkin yang jadi masalah buat pengguna Linux adalah, apakah printer ini bisa jalan jika pake Linux? Karena printer ini adalah printer multifungsi, selain bisa mencetak bisa juga untuk melakukan proses scan dan potocopy, yup Epson TX111 adalah printer multifungsi:
Jadi bagaimana cara menginstall printer Epson TX111 ini?
Instalasi CUPS (Common UNIX Printing System)
Coba buka aplikasi perambah anda, lalu buka alamat :
http://localhost:631/
Jika tidak muncul halaman seperti ini :
Artinya dalam Ubuntu anda belum terinstall CUPS, install dengan perintah :
sudo apt-get install cups
selesai :D
Download Driver Epson TX111
Untuk download driver Epson TX111, silahkan masuk ke halaman web :
http://www.avasys.jp/lx-bin2/linux_e/spc/DL1.do
Pilih tipe printernya Epson TX111 :
Setelah itu next, dan muncul halaman downloadnya. Download driver untuk Ubuntu :
Karena printer Epson TX111 itu gabung dengan Scanner, jadi kita juga harus download aplikasi iScan untuk scanner nya, scroll ke bagian bawah nanti terlihat bagian :
Download iScan untuk Ubuntu :
Instalasi Driver Epson TX111
Sekarang di komputer kita telah terdapat file :
pips-snx110-ubuntu8.04-3.8.0-CG.tgz
iscan_2.24.0-4.ltdl7_i386.deb
sekarang tinggal menginstall Driver Printer lalu menginstall iScan, caranya extract file pips-snx110-ubuntu8.04-3.8.0-CG.tgz dan jalankan hasil extractnya, perintah terminalnya seperti dibawah ini :
tar xvf pips-snx110-ubuntu8.04-3.8.0-CG.tgz
./pips-snx110-ubuntu8.04-3.8.0-CG.install
karena hasil ekstrak nya hanyalah file pips-snx110-ubuntu8.04-3.8.0-CG.install. Ikuti proses instalasi sampai selesai.
Instalasi Printer Epson TX111 pada CUPS
Buka halaman http://localhost:631/ menggunakan browser, maka akan terdapat halaman CUPS.
Buka halaman Adminstration.
Pada bagian Pinters, pilih Find New Printer, setelah itu akan terlihat printer EPSON Epson Stylus TX111, tambahkan printer tersebut :
Setelah itu ikuti tahapan2nya sampai selesai.
Setelah selesai lihatlah bagian Printers, maka sekarang printer Epson TX111 telah terregister ke CUPS :
Sekarang Printer sudah bisa digunakan, namun scannernya belum bisa :D
Instalasi Scanner Epson TX111
Cara menginstall scanner cukup sederhana, caranya, dobel klik file iscan_2.24.0-4.ltdl7_i386.deb, lalu pilih Install Package, tunggu sampai proses instalasi selesai. Setelah selesai sekarang anda dapat melihat aplikasi Image Scan! for Linux.
Buka aplikasi Image Scan! for Linux di lewat menu Ubuntu -> Graphics -> Image Scan! for Linux :
Saturday, October 9, 2010
squid
Squid is a fully-featured HTTP/1.0 proxy which is almost (but not quite - we’re getting there!) HTTP/1.1 compliant. Squid offers a rich access control, authorization and logging environment to develop web proxy and content serving applications.
This is a short guide on how to set up a transparent squid proxy server. Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator.
Install Squid
Install squid and squid-common
sudo aptitude install squid squid-common
Edit the squid config file.
sudo vi /etc/squid/squid.conf
Set the allowed hosts.
acl internal_network src 192.168.0.0/24 (Where 192.168.0.0/24 is your IP range.)
http_access allow internal_network
Set the correct permissions.
sudo chown -R proxy:proxy /var/log/squid/
sudo chown proxy:proxy /etc/squid/squid.conf
You will need to restart squid for the changes to take affect.
sudo /etc/init.d/squid restart
Now open up your browser and set your proxy to point to your new squid server on port 3128
Authentication
If you wish to use authentication with your proxy you will need to install apache2 utilities
sudo aptitude install squid squid-common apache2-utils
To add your first user you will need to specify -c
sudo htpasswd -c /etc/squid.passwd first_user
Thereafter you add new users with
sudo htpasswd /etc/squid.passwd another_user
Edit the squid config file
sudo vi /etc/squid/squid.conf
Set the the authentication parameters and the acl
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid.passwd
auth_param basic children 5
auth_param basic realm NFYE Squid proxy-caching web server
auth_param basic credentialsttl 3 hours
auth_param basic casesensitive off
acl users proxy_auth REQUIRED
acl sectionx proxy_auth REQUIRED
http_access allow users
So this is what your squid.conf should look like.
acl all src 0.0.0.0/0.0.0.0
acl internal_network src 192.168.0.0/24
acl users proxy_auth REQUIRED
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl sectionx proxy_auth REQUIRED
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access allow users
http_access allow internal_network
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
Redirect the all HTTP traffic.
If you would like to redirect the all HTTP traffic through the proxy without needing to set up a proxy manually in all your applications you will need to add some rules
iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.0.1:3128
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
Where eth1,eth0 are the LAN, WAN devices and 192.168.0.1 is the IP address of your LAN device.
If you wish to monitor the performance of your proxy you can look as some log parser’s (sarg, calamaris, ect.)
This is a short guide on how to set up a transparent squid proxy server. Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-requested web pages. Squid has extensive access controls and makes a great server accelerator.
Install Squid
Install squid and squid-common
sudo aptitude install squid squid-common
Edit the squid config file.
sudo vi /etc/squid/squid.conf
Set the allowed hosts.
acl internal_network src 192.168.0.0/24 (Where 192.168.0.0/24 is your IP range.)
http_access allow internal_network
Set the correct permissions.
sudo chown -R proxy:proxy /var/log/squid/
sudo chown proxy:proxy /etc/squid/squid.conf
You will need to restart squid for the changes to take affect.
sudo /etc/init.d/squid restart
Now open up your browser and set your proxy to point to your new squid server on port 3128
Authentication
If you wish to use authentication with your proxy you will need to install apache2 utilities
sudo aptitude install squid squid-common apache2-utils
To add your first user you will need to specify -c
sudo htpasswd -c /etc/squid.passwd first_user
Thereafter you add new users with
sudo htpasswd /etc/squid.passwd another_user
Edit the squid config file
sudo vi /etc/squid/squid.conf
Set the the authentication parameters and the acl
auth_param basic program /usr/lib/squid/ncsa_auth /etc/squid.passwd
auth_param basic children 5
auth_param basic realm NFYE Squid proxy-caching web server
auth_param basic credentialsttl 3 hours
auth_param basic casesensitive off
acl users proxy_auth REQUIRED
acl sectionx proxy_auth REQUIRED
http_access allow users
So this is what your squid.conf should look like.
acl all src 0.0.0.0/0.0.0.0
acl internal_network src 192.168.0.0/24
acl users proxy_auth REQUIRED
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl SSL_ports port 443 563 # https, snews
acl SSL_ports port 873 # rsync
acl Safe_ports port 80 # http
acl Safe_ports port 21 # ftp
acl Safe_ports port 443 563 # https, snews
acl Safe_ports port 70 # gopher
acl Safe_ports port 210 # wais
acl Safe_ports port 1025-65535 # unregistered ports
acl Safe_ports port 280 # http-mgmt
acl Safe_ports port 488 # gss-http
acl Safe_ports port 591 # filemaker
acl Safe_ports port 777 # multiling http
acl Safe_ports port 631 # cups
acl Safe_ports port 873 # rsync
acl Safe_ports port 901 # SWAT
acl sectionx proxy_auth REQUIRED
acl purge method PURGE
acl CONNECT method CONNECT
http_access allow manager localhost
http_access allow users
http_access allow internal_network
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost
http_access deny all
http_reply_access allow all
icp_access allow all
Redirect the all HTTP traffic.
If you would like to redirect the all HTTP traffic through the proxy without needing to set up a proxy manually in all your applications you will need to add some rules
iptables -t nat -A PREROUTING -i eth1 -p tcp -m tcp --dport 80 -j DNAT --to-destination 192.168.0.1:3128
iptables -t nat -A PREROUTING -i eth0 -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 3128
Where eth1,eth0 are the LAN, WAN devices and 192.168.0.1 is the IP address of your LAN device.
If you wish to monitor the performance of your proxy you can look as some log parser’s (sarg, calamaris, ect.)
droid
Here is a potential work around. It uses the command line to add an
http proxy.
Note: you may need to update the escaping to use for windows.
cd to the location of adb
replace the pieces [host_or_IP] and [port] with the correct values for
the proxy. So if your proxy is corp_proxy, on port 8080, then in the
quotes should be corp_proxy:8080
----
./adb shell sqlite3 /data/data/com.google.android.providers.settings/
databases/settings.db "\"INSERT INTO system
VALUES(99,'http_proxy',' [host_or_IP]:[port]');\""
----
To see if it was added correctly you can run the following command
line. You should see 99|http_proxy| [host_or_IP]:[port]
----
./adb shell sqlite3 /data/data/com.google.android.providers.settings/
databases/settings.db "\"SELECT * FROM system\""
----
To remove the proxy, the following script can be run:
---
./adb shell sqlite3 /data/data/com.google.android.providers.settings/
databases/settings.db "\"DELETE FROM system WHERE _id=99\""
---
1. install Java SE and configure envirornment variables
get the Java SE from here: http://java.sun.com/javase/downloads/index.jsp
then you will get a bin file named with "jdk-6u17-linux-i586.bin"
open a shell terminate input command as below:
$ cd /opt/src : tranfer into the directory where store the jdk bin file
$ sudo chmod u+x jdk-6u17-linux-i586.bin : edit the bin's property to make it can be executed
$ ./jdk-6u17-linux-i586.bin : install jdk
mv the jdk directory to where you want to store your own program, here I move it to the /opt/android/, then it will be followed to configure the enviornment variables in shell configuration file. Go to /etc find profile add following sentences in it
"
#Java SE JDK
export JAVA_HOME=/opt/android/jdk1.6.0_17
export CLASSPATH=$CLASSPATH:.$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
"
store and quit
till now the jdk has been successfully installed, you may input following command in the shell to vertify it,
$ java -version
the shell will display some jdk information like this:
"
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-3ubuntu1)
OpenJDK Server VM (build 14.0-b16, mixed mode)
"
2. Downloadable SDK Components
website: http://developer.android.com/sdk/index.html
choose the Linux (i386) collumn's Package: android-sdk_r04-linux_86.tgz2.
then you will get a tar file : android-sdk_r04-linux_86.tgz, release it with following command:
$ sudo tar xfvz android-sdk_r04-linux_86.tgz
go into the "android-sdk-linux_86"
$ cd android-sdk-linux_86/tools
$ ./android
use the above command to start Android SDK and AVD Manager, select the Available Packages to install the android sdk you want to install, here I selected all. If you have any trouble when connect the website, change to "Settings", in "Misc" group select "Force https://... sources to be fetched using http://", push the "Save and Apply" button, then close the "Android SDK and AVD Manager". Restart it using the same command in the shell,
$ ./android
when setting up the ADT plugin or when using the SDK tools.
Optionally, you may want to add the location of the SDK's primary tools directory to your system PATH. The primary tools/ directory is located at the root of the SDK folder. Adding tools to your path lets you run Android Debug Bridge (adb) and the other command line tools without needing to supply the full path to the tools directory.
* On Linux, edit your ~/.bash_profile or ~/.bashrc file. Look for a line that sets the PATH environment variable and add the full path to the tools/ directory to it. If you don't see a line setting the path, you can add one:
export PATH=${PATH}:/tools
here I edit profile in /etc like this:
#Android environment variables
ANDROID_TOOLS=/opt/android/android-sdk-linux/tools
export PATH=$ANDROID_TOOLS:$PATH
input "adb" in a new shell to vertity whether the enviornment variables has affected.
when you get some adb information it means you have succeeded.
$ adb
"
Android Debug Bridge version 1.0.25 ...
"
3. Finally install the ADT plugin into the Eclipse
Install the ADT Plugin for Eclipse
Android offers a custom plugin for the Eclipse IDE, called Android Development Tools (ADT), that is designed to give you a powerful, integrated environment in which to build Android applications. It extends the capabilites of Eclipse to let you quickly set up new Android projects, create an application UI, add components based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) APKs in order to distribute your application.
make sure that you have a suitable version of Eclipse installed on your computer (3.4 or newer is recommended). If you need to install Eclipse, you can download it from this location:
http://www.eclipse.org/downloads/
here I choose Eclipse 3.5 (Galileo) for example:
# Start Eclipse, then select Help > Install New Softare.
# In the Available Software dialog, click Add...
# In the Add Site dialog that appears, enter a name for the remote site (for example, "Android Plugin") in the "Name" field.
In the "Location" field, enter this URL: https://dl-ssl.google.com/android/eclipse/
If you have trouble aqcuiring the plugin, you can try using "http" in the URL, instead of "https" (https is preferred for security reasons). Click OK.
# Back in the Available Software view, you should now see "Developer Tools" added to the list. Select the checkbox next to Developer Tools, which will automatically select the nested tools Android DDMS and Android Development Tools. Click Next.
# In the resulting Install Details dialog, the Android DDMS and Android Development Tools features are listed. Click Next to read and accept the license agreement and install any dependencies, then click Finish.
# Restart Eclipse.
Now modify your Eclipse preferences to point to the Android SDK directory:
# Select Window > Preferences... to open the Preferences panel
# Select Android from the left panel
# For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory
# Click Apply, then OK.
Done! If you haven't encountered any problems, then you're ready to begin developing Android applications.
Troubleshooting ADT Installation
If you are having trouble downloading the ADT plugin after following the steps above, here are some suggestions:
If Eclipse can not find the remote update site containing the ADT plugin, try changing the remote site URL to use http, rather than https. That is, set the Location for the remote site to: http://dl-ssl.google.com/android/eclipse/
If you are behind a firewall (such as a corporate firewall), make sure that you have properly configured your proxy settings in Eclipse. In Eclipse 3.3/3.4, you can configure proxy information from the main Eclipse menu in Window (on Mac OS X, Eclipse) > Preferences > General > Network Connections.
If you are still unable to use Eclipse to download the ADT plugin as a remote update site, you can download the ADT zip file to your local machine and manually install it:
1. Download the current ADT Plugin zip file from here: http://dl.google.com/android/ADT-0.9.5.zip (don't unpack it)
2. Follow steps 1 and 2 of "here I choose Eclipse 3.5 (Galileo) for example:" (above)
3. In the Add Site dialog, click Archive.
4. Browse and select the downloaded zip file.
5. In Eclipse 3.5 only, enter a name for the local update site (e.g., "Android Plugin") in the "Name" field.
6. Click OK.
7. Follow the remaining procedures as listed for "here I choose Eclipse 3.5 (Galileo) for example:" (above)
If you still cannot install ADT plugin and encounter the error message like this:
"
Cannot complete the install because one or more required items could
> not be found.
> Software
being installed: Android Development Tools
> 0.9.5.v200911191123-20404 (com.android.ide.eclipse.adt.feature.group
> 0.9.5.v200911191123-20404)
> Missing requirement: Android Development Tools
> 0.9.5.v200911191123-20404 (com.android.ide.eclipse.adt.feature.group
> 0.9.5.v200911191123-20404) requires 'org.eclipse.wst.xml.ui 0.0.0' but
> it could not be found
"
there may be miss some plugins in your eclipse
1. Go to "Help/Install New Software...
2. Add http://download.eclipse.org/releases/galileo/ to the update sites list(strange it's not installed by default on ubuntu)
3. From there, install WST (use the filter box to find the package)
4. Restart eclipse
5. Go back to "Help/Install New Software..." and install the Android ADT as explained on the android website.
OK, till here you may have a breath, an Android SDK with Eclipse IDE has been successfully installed in you Ubuntu system.
Congratulation!!!
Summarized by Benjamin Qi
Intern of Beijing PalmCity Science and Technology Co., Ltd
MSN: benjaminqi@hotmail.com
In this tutorial we are going to learn how to install any given Android application in Android emulator using [dot]APK ".apk" files.
Follow the instructions with SCREENSHOTS of the Android emulator. All you need is just the Android SDK platform (software development kit, with emulator) and .apk files. There is no need to install Eclipse or Netbeans SDk, to work with APK files [wiki]. An .apk file extension denotes an Android Package (APK) file. This file format, a variant of the JAR format, is used for the distribution and installation of bundled components onto the Android mobile device platform.
Let's proceed with installation. First of all download the required stuffs.
1.Android SDK: It can be downloaded from the official google website- here is a link to Latest Android SDK (for which you also need JAVA VM, JDK or JRE already installed). Read how to install it, before you proceed with this tutorial. Don't forget to update the SDK and also install the suitable platform version, in this tutorial we are going to use a stable Android Platform 1.5.
2.Sample APK file: Let's take Sudoku.apk, please download it.
Android Logo"Are you ready for installation?"
WINDOWS XP/VISTA/SEVEN System Setting
Kindly NOTE : For this tutorial, the SDK has been unzipped to this Windows folder location: "E:\android-sdk-windows\"
Start the emulator (Virtual Android):
Android SDK manger window
Either you can start the emulator directly by running emulator.exe from "E:\android-sdk-windows\tools\"
OR
Run the setup sdk "SDK Setup.exe" from "E:\android-sdk-windows\" and then create and start AVD (emulator), in the above picture you can see that we have already created bOtskOOl AVD using Android SDK and AVD manager.
After a few minutes a virtual Android shall boot up and then observe the desktop view, as shown in the picture. Press on menu button and you will find that the applications are arranged in a grid view.
emulator android startingandroid emulator logoandroid desktop viewApplication grid view android emulator
Copy .APK files:
Now, manually copy and paste the Sudoku.apk to destination folder "E:\android-sdk-windows\tools\".
Run the windows command:
Go to Start>>run>>cmd (open a windows command prompt or shell) and type the following commands "highlighted in bold orange".
cd e:\android-sdk-windows\tools\
comments: we do this in order to change our directory level to where the emulator is installed
windows command line
adb install Sudoku.apk
comments: android emulator command to install the Sudoku application in .apk format.
Thats all, it's done. You must get a success message, Hurray!! You have installed your application successfully.
In case if you get error message then please do read the tutorial again, see to it that you have copied the apk file in the right folder or there is no uppercase/lower case error while typing file name.Now switch to your Android emulator, and click on the menu button, you will observe that a Sudoku application appears in the grid view.
application installed
Hope you will be able to install your favourite Android apps easily.
If you want to uninstall any application, then please do read this tutorial on how to uninstall Android .apk files from emulator.
"On other websites, people talk about Environment variables, but in this tutorial installation it has been achieved without doing so and it works superbly."
http proxy.
Note: you may need to update the escaping to use for windows.
cd to the location of adb
replace the pieces [host_or_IP] and [port] with the correct values for
the proxy. So if your proxy is corp_proxy, on port 8080, then in the
quotes should be corp_proxy:8080
----
./adb shell sqlite3 /data/data/com.google.android.providers.settings/
databases/settings.db "\"INSERT INTO system
VALUES(99,'http_proxy',' [host_or_IP]:[port]');\""
----
To see if it was added correctly you can run the following command
line. You should see 99|http_proxy| [host_or_IP]:[port]
----
./adb shell sqlite3 /data/data/com.google.android.providers.settings/
databases/settings.db "\"SELECT * FROM system\""
----
To remove the proxy, the following script can be run:
---
./adb shell sqlite3 /data/data/com.google.android.providers.settings/
databases/settings.db "\"DELETE FROM system WHERE _id=99\""
---
1. install Java SE and configure envirornment variables
get the Java SE from here: http://java.sun.com/javase/downloads/index.jsp
then you will get a bin file named with "jdk-6u17-linux-i586.bin"
open a shell terminate input command as below:
$ cd /opt/src : tranfer into the directory where store the jdk bin file
$ sudo chmod u+x jdk-6u17-linux-i586.bin : edit the bin's property to make it can be executed
$ ./jdk-6u17-linux-i586.bin : install jdk
mv the jdk directory to where you want to store your own program, here I move it to the /opt/android/, then it will be followed to configure the enviornment variables in shell configuration file. Go to /etc find profile add following sentences in it
"
#Java SE JDK
export JAVA_HOME=/opt/android/jdk1.6.0_17
export CLASSPATH=$CLASSPATH:.$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export PATH=$PATH:$JAVA_HOME/bin
"
store and quit
till now the jdk has been successfully installed, you may input following command in the shell to vertify it,
$ java -version
the shell will display some jdk information like this:
"
java version "1.6.0_0"
OpenJDK Runtime Environment (IcedTea6 1.6.1) (6b16-1.6.1-3ubuntu1)
OpenJDK Server VM (build 14.0-b16, mixed mode)
"
2. Downloadable SDK Components
website: http://developer.android.com/sdk/index.html
choose the Linux (i386) collumn's Package: android-sdk_r04-linux_86.tgz2.
then you will get a tar file : android-sdk_r04-linux_86.tgz, release it with following command:
$ sudo tar xfvz android-sdk_r04-linux_86.tgz
go into the "android-sdk-linux_86"
$ cd android-sdk-linux_86/tools
$ ./android
use the above command to start Android SDK and AVD Manager, select the Available Packages to install the android sdk you want to install, here I selected all. If you have any trouble when connect the website, change to "Settings", in "Misc" group select "Force https://... sources to be fetched using http://", push the "Save and Apply" button, then close the "Android SDK and AVD Manager". Restart it using the same command in the shell,
$ ./android
when setting up the ADT plugin or when using the SDK tools.
Optionally, you may want to add the location of the SDK's primary tools directory to your system PATH. The primary tools/ directory is located at the root of the SDK folder. Adding tools to your path lets you run Android Debug Bridge (adb) and the other command line tools without needing to supply the full path to the tools directory.
* On Linux, edit your ~/.bash_profile or ~/.bashrc file. Look for a line that sets the PATH environment variable and add the full path to the tools/ directory to it. If you don't see a line setting the path, you can add one:
export PATH=${PATH}:
here I edit profile in /etc like this:
#Android environment variables
ANDROID_TOOLS=/opt/android/android-sdk-linux/tools
export PATH=$ANDROID_TOOLS:$PATH
input "adb" in a new shell to vertity whether the enviornment variables has affected.
when you get some adb information it means you have succeeded.
$ adb
"
Android Debug Bridge version 1.0.25 ...
"
3. Finally install the ADT plugin into the Eclipse
Install the ADT Plugin for Eclipse
Android offers a custom plugin for the Eclipse IDE, called Android Development Tools (ADT), that is designed to give you a powerful, integrated environment in which to build Android applications. It extends the capabilites of Eclipse to let you quickly set up new Android projects, create an application UI, add components based on the Android Framework API, debug your applications using the Android SDK tools, and even export signed (or unsigned) APKs in order to distribute your application.
make sure that you have a suitable version of Eclipse installed on your computer (3.4 or newer is recommended). If you need to install Eclipse, you can download it from this location:
http://www.eclipse.org/downloads/
here I choose Eclipse 3.5 (Galileo) for example:
# Start Eclipse, then select Help > Install New Softare.
# In the Available Software dialog, click Add...
# In the Add Site dialog that appears, enter a name for the remote site (for example, "Android Plugin") in the "Name" field.
In the "Location" field, enter this URL: https://dl-ssl.google.com/android/eclipse/
If you have trouble aqcuiring the plugin, you can try using "http" in the URL, instead of "https" (https is preferred for security reasons). Click OK.
# Back in the Available Software view, you should now see "Developer Tools" added to the list. Select the checkbox next to Developer Tools, which will automatically select the nested tools Android DDMS and Android Development Tools. Click Next.
# In the resulting Install Details dialog, the Android DDMS and Android Development Tools features are listed. Click Next to read and accept the license agreement and install any dependencies, then click Finish.
# Restart Eclipse.
Now modify your Eclipse preferences to point to the Android SDK directory:
# Select Window > Preferences... to open the Preferences panel
# Select Android from the left panel
# For the SDK Location in the main panel, click Browse... and locate your downloaded SDK directory
# Click Apply, then OK.
Done! If you haven't encountered any problems, then you're ready to begin developing Android applications.
Troubleshooting ADT Installation
If you are having trouble downloading the ADT plugin after following the steps above, here are some suggestions:
If Eclipse can not find the remote update site containing the ADT plugin, try changing the remote site URL to use http, rather than https. That is, set the Location for the remote site to: http://dl-ssl.google.com/android/eclipse/
If you are behind a firewall (such as a corporate firewall), make sure that you have properly configured your proxy settings in Eclipse. In Eclipse 3.3/3.4, you can configure proxy information from the main Eclipse menu in Window (on Mac OS X, Eclipse) > Preferences > General > Network Connections.
If you are still unable to use Eclipse to download the ADT plugin as a remote update site, you can download the ADT zip file to your local machine and manually install it:
1. Download the current ADT Plugin zip file from here: http://dl.google.com/android/ADT-0.9.5.zip (don't unpack it)
2. Follow steps 1 and 2 of "here I choose Eclipse 3.5 (Galileo) for example:" (above)
3. In the Add Site dialog, click Archive.
4. Browse and select the downloaded zip file.
5. In Eclipse 3.5 only, enter a name for the local update site (e.g., "Android Plugin") in the "Name" field.
6. Click OK.
7. Follow the remaining procedures as listed for "here I choose Eclipse 3.5 (Galileo) for example:" (above)
If you still cannot install ADT plugin and encounter the error message like this:
"
Cannot complete the install because one or more required items could
> not be found.
> Software
being installed: Android Development Tools
> 0.9.5.v200911191123-20404 (com.android.ide.eclipse.adt.feature.group
> 0.9.5.v200911191123-20404)
> Missing requirement: Android Development Tools
> 0.9.5.v200911191123-20404 (com.android.ide.eclipse.adt.feature.group
> 0.9.5.v200911191123-20404) requires 'org.eclipse.wst.xml.ui 0.0.0' but
> it could not be found
"
there may be miss some plugins in your eclipse
1. Go to "Help/Install New Software...
2. Add http://download.eclipse.org/releases/galileo/ to the update sites list(strange it's not installed by default on ubuntu)
3. From there, install WST (use the filter box to find the package)
4. Restart eclipse
5. Go back to "Help/Install New Software..." and install the Android ADT as explained on the android website.
OK, till here you may have a breath, an Android SDK with Eclipse IDE has been successfully installed in you Ubuntu system.
Congratulation!!!
Summarized by Benjamin Qi
Intern of Beijing PalmCity Science and Technology Co., Ltd
MSN: benjaminqi@hotmail.com
In this tutorial we are going to learn how to install any given Android application in Android emulator using [dot]APK ".apk" files.
Follow the instructions with SCREENSHOTS of the Android emulator. All you need is just the Android SDK platform (software development kit, with emulator) and .apk files. There is no need to install Eclipse or Netbeans SDk, to work with APK files [wiki]. An .apk file extension denotes an Android Package (APK) file. This file format, a variant of the JAR format, is used for the distribution and installation of bundled components onto the Android mobile device platform.
Let's proceed with installation. First of all download the required stuffs.
1.Android SDK: It can be downloaded from the official google website- here is a link to Latest Android SDK (for which you also need JAVA VM, JDK or JRE already installed). Read how to install it, before you proceed with this tutorial. Don't forget to update the SDK and also install the suitable platform version, in this tutorial we are going to use a stable Android Platform 1.5.
2.Sample APK file: Let's take Sudoku.apk, please download it.
Android Logo"Are you ready for installation?"
WINDOWS XP/VISTA/SEVEN System Setting
Kindly NOTE : For this tutorial, the SDK has been unzipped to this Windows folder location: "E:\android-sdk-windows\"
Start the emulator (Virtual Android):
Android SDK manger window
Either you can start the emulator directly by running emulator.exe from "E:\android-sdk-windows\tools\"
OR
Run the setup sdk "SDK Setup.exe" from "E:\android-sdk-windows\" and then create and start AVD (emulator), in the above picture you can see that we have already created bOtskOOl AVD using Android SDK and AVD manager.
After a few minutes a virtual Android shall boot up and then observe the desktop view, as shown in the picture. Press on menu button and you will find that the applications are arranged in a grid view.
emulator android startingandroid emulator logoandroid desktop viewApplication grid view android emulator
Copy .APK files:
Now, manually copy and paste the Sudoku.apk to destination folder "E:\android-sdk-windows\tools\".
Run the windows command:
Go to Start>>run>>cmd (open a windows command prompt or shell) and type the following commands "highlighted in bold orange".
cd e:\android-sdk-windows\tools\
comments: we do this in order to change our directory level to where the emulator is installed
windows command line
adb install Sudoku.apk
comments: android emulator command to install the Sudoku application in .apk format.
Thats all, it's done. You must get a success message, Hurray!! You have installed your application successfully.
In case if you get error message then please do read the tutorial again, see to it that you have copied the apk file in the right folder or there is no uppercase/lower case error while typing file name.Now switch to your Android emulator, and click on the menu button, you will observe that a Sudoku application appears in the grid view.
application installed
Hope you will be able to install your favourite Android apps easily.
If you want to uninstall any application, then please do read this tutorial on how to uninstall Android .apk files from emulator.
"On other websites, people talk about Environment variables, but in this tutorial installation it has been achieved without doing so and it works superbly."
Subscribe to:
Posts (Atom)