Thursday, January 17, 2008

Set proxy for android web browser

There is no UI for proxy settings for android web browser. But the android web browser will read the proxy settings in its settings database.
Here is the instructions to enable the proxy in the android web browser.

  1. > adb shell
  2. # sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db
  3. sqlite> INSERT INTO system VALUES(99,’http_proxy', 'proxy:port');
  4. sqlite>.exit
You can talk to settings.db for more information.
  1. sqlite> SELECT * FROM system;
  2. sqlite> .tables
  3. sqlite> .databases
  4. sqlite> .schema table_name
  5. sqlite> more SQL expression to talk to the tables
Don't forget the ';' at the end of the SQL expression.

66 comments:

Ale said...

This is exactly what i was looking for! Thank you. One question: according to you, is it possible to make sqlite queries from a java application?

rtm said...

I didn't try the sqlite3 in the java application. But you can try in the following two ways: 1. catenate the strings of sqlite3 database_name and sql command, place sql command into "" (quotation), run the command in java, just like invoke a process; 2. java includes the opendatabase(...) and so you will get the database context, with that context you can operate the database.

Ale said...

Ok, really kind! I will try it ;) if I will have some problems I will probably write to you back. Thanks again.

Ahmy Yulrizka said...

thanks you this is also what im looking for. but is there any way to disable the proxy without deleting the record. mmm may be another options like use_proxy or something ?

jalandar said...

I am using following and gives following result
If anybody have answer plz reply me

E:\jagtap\Andriod SDK\android-sdk-windows-0.9_beta\tools>adb shell
# sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db

sqlite3 /data/data/com.google.android.providers.settings/databases/settings.db
sqlite3: not found
#

atomic said...

jalandar is correct, there doesn't appear to be an sqlite3 binary in the g1's $PATH. I'll attempt to cross-compile it and post back.

Also, there is another way of doing this that actually pulls up a proxy settings gui: The AnyCut app available on marketplace allows you to create a shortcut to "Proxy Settings" on the desktop.

atomic said...
This comment has been removed by the author.
Chinmay said...

the package is com.android.providers.settings not com.google.android.providers.settings

Qasim Ali Khawaja said...

sqlite> INSERT INTO system VALUES(99,'http_proxy','10.3.20.10:8080');
SQL error: not an error

If received the following error any suggestions ?

Vinod said...

INSERT INTO system VALUES(101,'http_proxy','10.3.20.10:8080');

change 99 to 101 it may works ....

Anonymous said...

Is there a way to make EVERYTHING go through a proxy? Through a VPN or otherwise encrypted tunnel for security on public access points?

NatDeFreitas said...

This page has a much simpler, cleaner way to do it using the Settings class:

http://alexmogurenko.com/blog/programming/android-how-to-set-proxy-for-android-browser/

Gary said...

I would like to know what is a proxy used for. I also would like to know what is Generic Viagra used for too.
There are some very complex topics to understand over the net

kevin jhonson said...

I dont think you have to do all these...here is the simple guide to enable proxy in Android.It works fine for me...

http://android-proxy.blogspot.com/

harunjo said...

just install with a easy way...(note you need root access for that)

http://forum.xda-developers.com/showthread.php?t=766569

transproxy.apk

Fábio Daneluzzzi said...

There are easy ways to use Proxy in Android for WIFI!

http://androidero.blogspot.com/2010/10/acessando-wifi-via-proxy.html

Scott said...

Guys i am dumb when it comes to this level. Do tell me the steps. Where do i need to open this and modify ? Is the file present in the memory ? Please inform.

рαωάή said...

Hi Scott:

Make sure your AVD is running before you start this.

1. Go to cmd>run
2. navigate to your tools directory of the sdk. mine is here: C:\Users\Pawan\Desktop\android-sdk_r07-windows\android-sdk-windows\tools
3. then follow whatever is given in the blogpost. One correction as pointed out by Chinmay is its com.android.providers and not com.google.android.providers..

If you have any difficulty, just email me at pavirulz@gmail.com.

Viel Glueck!

Pawan

sasha said...

Initially, the Apple Store had the largest number of apps, and iPhone users enjoyed a better selection than those that joined Team Android.
best android apps

best iphone apps

rahul said...

I'm new to android.
To open sqlite, do we have to root the phone first?
Because on every command adb is saying "permission denied".

Thank You

Hem said...

online-proxy.org is a free web based anonymous proxy servers and sites and offer complete proxy server list with Online proxy features.
Online proxy

Scarlett said...

Wow! I'm pretty sure that this caught up plenty of people's attention, Thumbs up for your work and Good writing skills!

i am jayne and i am a freelance writer..
see my related post here ------> Man Suits

Kashif Javed said...

Organic whole food vitamins are the most convenient way to ensure a healthy, balanced diet with all the nutrients your body needs to operate efficiently.

Natural vitamins supplements
and
Organic vitamins

Arghya Chakraborty said...

Best regards for your most informative blog. I got many unknown information from this post. Regards from Fort Worth Tow Truck Company

kathrin said...

For this motive to provide every product to the customer, and to accomplish the all needs of the people we introduce an authentic and valuable E-marketing place where mushroom of beautiful and well equipped houses and accommodations are provided by the so worthy and trusty E-marketing place which is geboon.com .
see Free Classified Ads

jenifer said...

That an interesting post. I never thought about this before. But, looking back at different situations, this might be right. Keep it up friend!
best online pharmacy

Mark said...

computer repair new york

Nice to be visiting your blog again, it has been months for me. Well this article that I've been waited for so long.

Emma jacob said...

It’s first time for me landing on your blog. I’ve reading your post recently and I’m so enjoying it.

classified ads Pakistan|real estate pakistan|Pakistan classifieds

eshaa said...

Thanks for this read mate. Well, this is my first visit to your blog! But I admire the precious time and effort you put into it, especially into interesting articles you share here!

website design perth

Cheap wedding dresses said...

Very happy to see your article, I very much to like and agree with your point of view. Thank you for sharing. At the same time,i love best pram very much .Welcome to look at my website and blog articles.Hope we can become good friends, and exchange and to help each other! Thanks!!
wedding dresses

suzan said...

Thanks for your post, I like this post very much.
tubal ligation reversal surgery

suzan said...

Yes, the post is very interesting and I really like.

doctor ratings and reviews
reviews by patients
find doctor list

sahib said...

Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration. Thanks for the great information. And thanks for sharing
4d ultrasounds

Raniasgarden said...

Thanks for the steps. i have to set this proxy..


Herbal Pain Relief

Massjo said...

Oracle sued Google in August of last year, alleging that Google's Android software infringes on patents and copyrights associated with Oracle's Java Buy Arimidex

sunitha said...

These kind of posts are always inspiring and I prefer to read quality content so I am happy to find out many good point here in the post, writing is simply great, thank you for the post. joomla development

Maggie Kesch said...

I've gotta tell you, you are spot on. I stumbled on your site from another link and am really interested in this topic. Do you mind if I link to this site from my blog? hosting ireland

madeel said...

Very good customer service, prompt delivery (lol...prompt for coming from so far away!), and good products. I recommend this company to my friends all the time. is a godsend to those of us without medical insurance.
Buy Ritalin online

sahib said...

Wow…I am bowled by your level of knowledge. I am so impressed. I think you have got a deep insight into this topic. Could not think on those lines ever…I think you are gifted…keep going. Thumbs up!
doctor reviews by patients
find doctor list

saim said...

Nice post. We are impressed by your clear description of your topic. Thanks for the information. Keep on writing.


find doctor list

sahib said...

Nice site! I enjoy a couple of from the articles which have been written, and particularly the comments posted! I will definitely be visiting again!
organic supplements
Natural Allergy Relief
Natural Colon Cleanser
Natural Weight Loss
Testosterone Booster

sahib said...

This is such a helpful reading material for me; I’ve learned a lot of new things. Thanks for the great post!

best naturals

Ecommerce said...

Thanks for creating this interesting blog and i got a good knowledge to read your informational post.

Android app developer

shalini said...

Its really an amazing work done by author, its an admirable work done
Keep it up..
india domain registration

Massjo said...

That is an awfully astounding column that have posted. Thanks a lot for that fantastically amazing post!
Generic Levitra

Website Hosting India said...

Well great knowledge i got through this post and useful information for me.Website Hosting India

Blackberry Repair said...

I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have enjoyed reading. Nice blog. I will keep visiting this blog very often.

Cell phone repair mississauga
iphone repair mississauga
Cell phone unlocking mississauga
mississauga iphone repair

Android app development said...

This is one of the best post.I came to know one of the new topic about proxy setting In Android
application.
Android app developers

gohost said...

You have done a great job by sharing this informative post. I would like to appreciate your good work and also would like to encourage you to keep it up.hosting server

sowmya said...

This article is really good. I love it and hope to read more from you. Keep the good work. This site is really awesome.
indian seo forum

kenge said...

I see the article quiet critical. Thanks for sharing anyways, nice to hear different opinions on that topic.

buy codeine online

Android developer said...

This looks actually perfect. All these tinny capacity are fabricated with lot of accomplishments knowledge. I like it a lot.

Android developers

domina said...

Thanks for the information on the android web browser and it was very useful for me..
Buy domain names

TM said...

ugh i like android but updating is such a pain in the @S$

Android app development said...

This is one of the knowledgeable post.I got some good tips by read your blog details.Your blog opportunity is really useful.
Android app developers

Nick Kolas said...

This is one awesome post.Thanks Again. Really Cool. Lake Park Air Conditioner Repair

anita grace said...

Curcumin protects DNA damage in a chronically arsenic-exposed population of West Bengal.

herbal vitamins
|curcumin

joli said...

Hi, great Blog. The way you explained it is really awesome and makes everyone to read till the end. Keep posting..
locksmith in new york

Pop Neo said...

Remember that ready-made garments are much less costly when outdoor wedding dresses compared to people who usually are custom-made. long formal dresses For which simple wedding dresses rationale, these mermaid prom dresses kinds of retailers which offer ready-made outfits are often in addition beneficial.
We offer wedding dresses, bridesmaid dresses, beach wedding dresses,my friends welcome to visit and see!
wedding dresses

rajeeshkumarngn41 said...

Laptop Repairs in MississaugaWhether your hard drive has failed, your flash drive has stopped working,computer repair in mississauga

rietungn1 said...

Web Design MississaugaEven we serve you our best customized services for web designing, search engine optimization, social optimization, logo design, search engine marketing and pay per click management or PPC.Mississauga Web Design

rietungn1 said...

Web Design MississaugaA website or an online portal will help. Web Design Mississauga can change your innovative ideas into unique and extra ordinary real web site.Mississauga Web Design

Cisgirin said...

Need Some more details about this, How can i get that...


Joomla developers

Hannah bolton said...

I read and walked for miles at night along the beach, writing bad blank verse and searching endlessly for someone wonderful who would step out of the darkness and change my life. It never crossed my mind that that person could be me.

cheap business electricity

Esay leoz said...

HDMI is the default cable on newer HDTVs, Blu-ray players, Apple TV, many new computers and video cards, and a multitude of other video devices. HDMI cables and ports are very easy to use, and are almost as easy to connect as USB devices.
Call us today or shop online at www.esaleoz.com.au

JAMES DEAN said...

Nice It’s really great to post my comments on such a blog. Thanks
advertising | top advertising agencies in Pakistan | Marketing Agency | Advertisement