[Q] android web server without wifi - Android Q&A, Help & Troubleshooting

i looked at various android web servers. but does they really work without enabling wifi ?
looked at kws,paw server and servdroid. but look like they need wifi on for some point of time. after some time if we disabled it , it will work onwards. something i am missing here. as i only need to run web pages on that device only with localhost:8080/projectname.
we can also access html files by file:// url but needed web server for specific points.
update: this is my first post and know that this is not right forum section. could any moderator please move it to appropriate section as i don't have the permissions to do so.

Related

[REQ] Opera Mobile 9.7 User Agent Cab

I found this intersting topic
http://forum.xda-developers.com/showthread.php?p=5786377#post5786377
"I've figured out how to get Opera Mobile 10 Beta 3 to only display websites in desktop view without getting redirected to a mobile version of the site. UPDATE: Works in Opera 10 Final too!
The first 2 steps are pretty common knowledge, but they don't work for all sites. It's the 3rd step that makes every website work for me.
Step 1: Set a custom user agent string
This tells websites what kind of device you are using to browse the site (desktop computer, smartphone, etc).
Goto opera:config -> User Prefs -> Custom User-Agent
Find a desktop user agent string, type it in, and save. I'm using the one from my Firefox browser on my home desktop (it can be found by clicking Help -> About Mozilla Firefox). Mine looks like this:
Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6 (.NET CLR 3.5.30729)
You can use whatever string you can find that works. I've even seen people use an iPhone user agent to get iPhone versions of websites.
Step 2: Spoof a user agent ID
This tells websites what client you are using.
Goto opera:config -> User Agent -> Spoof User Agent ID
Type in the number corresponding to a browser to identify as that browser
Global values:
1 = Opera
2 = Mozilla
3 = Internet Explorer
Site-specific values:
4 = Mozilla, Opera not mentioned
5 = Internet Explorer, Opera not mentioned
Don't forget to save. I have mine set to 2, so websites think I'm using Firefox
Step 3: Set custom HTTP_Accept parameters
This one is hard to explain, but it basically tells the website which versions (i.e. desktop or mobile) are acceptable for viewing.
Goto opera:config -> Network -> HTTP Accept
Type this in exactly:
text/html, application/xml;q=0.9, application/xhtml+xml, application/x-obml2d, multipart/mixed, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
Please note that this is just the default entry minus the one element that allows for mobile/wap viewing.
Also in the Network section, go to HostName Expansion Prefix and delete wap from the list. Remember to save. Exit the browser and everything should work like a desktop from now on! You can go to www.whatsmyuseragent.com to check and see if everything is right. If you still want to view mobile versions of sites, you'll have to type in the specific mobile URL for that site (I keep mobile versions of my bookmarks just in case I get stuck on EDGE or a slow connection).
Hope this helps! If anyone with web-coding experience would like to explain further or correct anything I did wrong, please be my guest!"
by Eman3000; thx!
It's really useful and it does work everywhere.
However it takes ages to do it everytime.. can anyone make this process a lot faster? like write a .cab and/or a .reg?
Thanks
Loved it!
Been looking for alternative browser for this sole reason. Nice and easy workaround (with proper credits given and a link to the source... you rock). Thanks for the share.
The opera repo thread is riddled with so much "spam" posts that I'm sure I'd have never found it. Definitely the most useful hack I read in quite a while.
EDIT: I used this in Opera 9.5. Did some digging and this info seems to be stored in opera.ini (stored in Application Data in Opera's folder... don't know if this is a constant over versions) which somewhat makes the cab method unfeasable (considering that it would affect all of the other user settings...). Also compared complete registry dumps and nothing was changed so the reg method is out. Would be however possible to Mortscript this (may need to be adapted according to Opera version which could be a pain).
EDIT2: Searched xda and found this. Took a peek with MSCEInf and found these cabs just change a few lines in the registry (no files). No for my version but may interest you.
you also can use my free software "UA_Change" :
http://www.i900playeraddict.com/corwin.php?soft=evb_ua_change
or here :
http://forum.xda-developers.com/showthread.php?t=848812
All Opera Mobile/Mini versions: Official thread
Yes, there is great information collected in here, have a deep read to 1st page
frmariam said:
Been looking for alternative browser for this sole reason. Nice and easy workaround (with proper credits given and a link to the source... you rock). Thanks for the share.
The opera repo thread is riddled with so much "spam" posts that I'm sure I'd have never found it. Definitely the most useful hack I read in quite a while.
EDIT: I used this in Opera 9.5. Did some digging and this info seems to be stored in opera.ini (stored in Application Data in Opera's folder... don't know if this is a constant over versions) which somewhat makes the cab method unfeasable (considering that it would affect all of the other user settings...). Also compared complete registry dumps and nothing was changed so the reg method is out. Would be however possible to Mortscript this (may need to be adapted according to Opera version which could be a pain).
EDIT2: Searched xda and found this. Took a peek with MSCEInf and found these cabs just change a few lines in the registry (no files). No for my version but may interest you.
Click to expand...
Click to collapse
Glad it helped!
the setting are stored in "opera.ini" you said..
how about a banal copy-paste from the old ROM to the new one of this file?
I also use opera 9.7, latest build. Are the setting still stored in the opera.ini file?
EDIT: Someone says yes.. someone no.. mhmhm... Anyone has a proven answer pls?
What's Mortscript?
Corwin9S said:
you also can use my free software "UA_Change" :
http://www.i900playeraddict.com/corwin.php?soft=evb_ua_change
or here :
http://forum.xda-developers.com/showthread.php?t=848812
Click to expand...
Click to collapse
What you said changes only the UA
In the process I wrote in the first post there's other tricks not related to the UA setting. Also I don't speak french
but thx.
orb3000 said:
Yes, there is great information collected in here, have a deep read to 1st page
Click to expand...
Click to collapse
looked as deep as I could.. didn't find anything answering my question.. lol
So, opera is the best brower for android. I solved the problem by this way too. Thanks you for your tip, and opera too.
you the man
you are freaking awesome.. i would need a degree in networking to be able to do those stuffs
thank you

SSLstrip on Android?

Has anyone implemented an SSLstrip on Android, so that, if I was running Wireless Tether, I could scan packets with Shark, and get passwords and logins from secure sites that have been downgraded to http? Is it possible?
I'm looking for the same.
Currently what I do is: tethering + Shark, then analyse pcap with Wireshark on PC, of course you miss all SSL traffic.
BUT if you add a laptop, then ARP poisoning + SSLstrip...
of course need a laptop so it's not great
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A
Bump? I can look into maybe porting it over IF ITS POSSIBLE...cuz I mean if we can port other things with the ndk this should be portable, right?
there is! program called Faceniff. It does not show full passwords neither youre able to use credentials, but you can clearly see it works gathering acount name and password.
Sent from my LG-P999 using XDA App
SSlstrip on android app
would be very interested in this appm would be worth some cash and hope xda would put it on their market
More info can now be found here:
loganmc10 said:
More info can now be found here:
Click to expand...
Click to collapse
link ???..............
I want to install sslstrip in my device but not the APK one I want to use it through terminal (don't want for debian, just for regular android system)
is it ported anywhere, I couldnt see anything about it

[Q] no https connection

Don't ask me how! I'll wont post if I'll knew!!!
But for about 2-3 weeks, I've start loosing https connection.
ex: https: / / www[ddotfacebook[dot]com was the first one that I got lost...
After that, was my bank web site; next paypal site tell me that the [certificate] as out of date...
And a couple of other... last thing is android help site/group site no more access.
I've already check the hosts file, nothing in but the usual localhost.
The weird thing is it was gradualy loosing https site/connection...
Even check my router but no filtering enabled...
I cango on those site on my lan and my wireless computer, iphone via wifi, and others too...
What else you should suggest before resetting the whole tab?
Ps:android version 2.2
what do u mean with " loosing http conncection"
Cant you open the sites or are the parsed as ordinary http?
jiffer1991 said:
what do u mean with " loosing http conncection"
Cant you open the sites or are the parsed as ordinary http?
Click to expand...
Click to collapse
To be specific, is just tne HTTPS secured connection that don't work... but not all.
Here I quote what I get from facebook after trying to log-in (btw: the facebook apps don't work too)
Web page not available
The Web page at https://www.facebook.com/login.php?login_attempt=1 might be temporarily down or it may have moved permanently to a new web address.
Here are some suggestions: Check to make sure your device has a signal and data conne
Click to expand...
Click to collapse
Same thing with my bank.
Most of the time I use dolphin browser, but with the built-in browser and ninesky browser, I got the same result too...

How to redirect a web link

Hi All, I would like your help thinking what is the best way to redirect a browser link to another, let me explain:
If the user is trying to browse to:
http://SPECIFIC_WEBSITE/SpecificPage.aspx?type=3&id=4451714
I would like to redirect the mobile to (with the same id):
http://SPECIFIC_WEBSITE/DifferentPage.aspx?id=4451714
There is a common website that I use all the time, and most of the links are like the first one, than it shows annoying ads, after you close the ad, it will redirect to the second one... I would like to skip it.
how can I do it? I thought about using adaway, but i think it uses DNS level, which doesn't help me.
local proxy maybe? some kind of script in the kernel?
any idea?
Thanks,
AYahoo.

[q] epub rendering fails when the data connection is on

Hi everybody. This is my problem:
I’m trying to read some epub3 ebooks using the Astri-Bee reader on an Android phone (an LG L4II with Android 4.1.2). As soon as I open any of these books I get a message like this:
This XML file does not appear to have any style information associated with it. The document tree is shown below.
If I turn off the data connection (the data connection thorough the mobile network), the error changes to:
Pagina web no disponible.
Es posible que la página web htp://0.0.0.0:49346/OEBPS/Text/1.xhtml se encuentre temporalmente fuera de servicio o se haya trasladado a otra dirección web de forma permanente.
(Sorry for the Spanish, I have this device in Spanish. Basically, it says a web page cannot be reached in the place addressed by the url htp://0.0.0.0:49346/OEBPS/Text/1.xhtml)
If I turn on the WiFi (keeping the data connection off) the problem solves magically and the epubs render fine.
If I turn off the WiFi (without turning de data on) the books still display fine.
If I turn back on the mobile data connection the rendering may be ok for a while, but, in the end will fail.
Some of these books I’m trying to read with Astri-Bee are examples created for the IDPF to help developers to test their readers (and designers to understand the epub standard). They are expected to have no design errors. In addition, I’ve tested them with the Kobo epub reader (in the same device) and (with Kobo) they display without any errors.
It seems to me that Astri-Bee is using some functions provided by Android (to extract the epubs' contents) and that they fail in certain conditions (when the mobile data connection is on, mainly). Unhappily, I have no idea on how the guts of Android work. It might be even something completely different, like a software conflict or so. This looks like a mystery to me.
Thanks in advance for any help you may provide.
Mmmmm… No answers yet. May be I didn't post this appropriately; may be nobody knows how to help me out of this thing. Let's try to move a little beyond and set down some plausible reading of these weird symptoms. They are gonna be plain speculation, but may be a speculation leading someone to have an idea on how to help.
An epub is a simple "linear" web site packed with some metadata (by mean of using zip compression). An epub reader basically is a web browser layout engine wrapped in a particular interface (with some specific-purpose functionalities). I haven't been able to find in a quick search any information about the guts of Astri-Bee, but I guess it's probably implemented by mean of reusing a named web browser layout engine. That seems to me the most sensible. Being so (and given the symptoms described, above, in the first post), Astri-Bee probably works this way:
- It recovers the metadata and builds the ebook internal structure, index an so on.
- It calls the web-browser-engine to lay out the first html inside the book. Being this engine for web browsing, its call probably requires as parameters an IP address, a port and a path. Astri-Bee passes them all.
- In order to make the book html reachable to the engine, Astri-Bee serves it in the localhost 49346 port (being ../OEBPS/Text/1.xhtml a normal path inside an epub).
- Finally Astre-Bee shows the engine-laid-out html being the first element of the book.
I can add here (to the symptoms described in my first post) that, when the data connection has just been turned off, and Astree-Bee is showing the web-page-cannot-be-reached message, the Astri-Bee page up/down functionality perfectly works and makes it browse the same message for further pages:
A web page cannot be reached in the place addressed by the url htp://0.0.0.0:49346/OEBPS/Text/2.xhtml.
This seems a hint leading to think Astri-Bee is properly unzipping and decoding the metadata, and only fails at browsing the htmls contained inside the book (when the data is on). Which reinforces the idea under the working-steps described above.
As already stated, all this may look like plain speculation. In fact, it is. But seems sensible and looks by now like the most probable explanation to me. It means Astri-Bee is probably using functions provided by Android to manage the network connections it needs for (self) serving and reading the epub htmls. So a crash in the way Android manages or provides these services when de data connection is on will lead to such symptoms as the described above in the first post.
I don't know how to test this thesis I've set up in this seccond post, and what’s more important, I can't even hint how to solve the rendering problem I described in my first post. I'm qualified but not at all an operative system authority and Android is way far from my expertise. Still need some help.
Anyone out there with some ideas?
Come on. I can't believe there's no one in this forum with a useful idea. Not one asking to make sure the software versions are the last ones. I've already checked that. One, I mean, that brings light to this problem. That helps me out of it.
I'm willing to check and try any sensible suggestions. :fingers-crossed: One of those ebooks is a demo of a functionally advanced epub and Astri-Bee has proved itself as the best epub renderer out there. It would be great to have that pair working in this phone of mine, as I already have them working all right in my tablet. :cyclops:
I look forward to your comments, guys, if there're any.

Categories

Resources