[APP] micro-httpd (GET / POST / CGI support) cross-compiled to Android - Android Software Development

Hello,
A while ago I've managed to cross-compile a basic web server, resulting in a native ARM executable (you can find it here) that allows any other device to connect to port 80 (or whatever) and browse the contents of the phone.
Easy to exchange photos at a cafeteria which has wifi and both phones are connected - for example. No need for an FTP client, slow bluetooth, and so on...
However, I wanted more and since webserver was only handling GET (no POST / no CGI), I've started looking for an alternative that did the job.
Below, you will find a native ARM executable of micro-httpd, a light weight web server that supports CGI.
Download
Use it at your own risk!
mini_httpd_1.19.arm.tar.gz
It supports .htpasswd files to restrict access to folders - and it comes also with its own utility htpasswd which manipulates the password files.
micro-httpd website: http://www.acme.com/software/mini_httpd/
micro-httpd configuration options: http://manpages.ubuntu.com/manpages/maverick/man8/mini-httpd.8.html
You can use almost any CGI interpreter you want, minus PHP. The PHP 4 Android (a native implementation of PHP) has only CLI (command line support) and even if you could change the PHP code of the scripts to output the missing headers. BUT! It also outputs debug messages that you cannot control, in the output of the script!
Those messages are are considered errors in HTTP / CGI.
The creators of PHP interpreter say that is only meant for Scripting Languages for Android (SL4A) which works with what they have. You can read more here: http://groups.google.com/group/php-for-android/browse_thread/thread/79d0b5f856189675?pli=1. This topic also mentions an alternative (CGI this time) from GroomDroid but that is also unstable.
Enter PERL!
I had good success with Perl 4 Android
I can how host a blog on my phone - I've set up a big tutorial on how to configure everything here Running native CGI scripts (perl) with micro-httpd on Android.
Result
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Next step would be to try out a file manager and test file upload, then go even deeper to see if I can access various phone details and offer a sort of management interface for them on the web.
Source code
You will find the source code and the license (free) on the tutorial website above.

Seems interesting !

Related

[TOOL] Scr33nDr0iD 1.1 - Instant Hotlinking

Here is a small application I made because I wanted to quickly get a simple screenshot from my Android device without having to download the SDK, or download a separate GUI and all that jazz. This is a simple enough application that grabs a current screenshot from your device and displays it, as well as saves it as a JPG in the same directory for quick access.
Not really much features, but it's a moderate size (7-8 MB) due to the package having ADB and FFMPEG bundled for the screenshot to have a customized compression. File sizes of the screenshots range from 15-25 kb each. It's a different method of taking a screenshot from the Android device, and I feel that using FFMPEG, has a more reliable output.
As of 1.1, i've added an "instant hotlinking" feature for the couple people that PM'ed me about it. Scr33nDr0iD now uploads your screenshot immediately to a direct download server for easy hotlinking and copies the link to your clipboard in a matter of seconds. That's just about the only unique feature that no other GUI for Android screenshots have.
..:: Screens ::..
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
..:: Downloads ::..
Download 1.1 for Windows (7.74 MB)
..:: Changelog ::..
1.1
- Added Instant Hotlinking (copies a hotlink URL to your clipboard)
1.0
- Initial Release
If there is any feature you want added to this application, just let me know and i'll code 'em up. If requested I can make this for Linux and MacOSX as well.
Looks promising but I'm not sure about 1 thing, is this software for your device or for your PC?
Well I put the tag [TOOL] so I figured that would assign it to PC only. And for you to download it, the only download link is for Windows right now. So, yeah, PC. Unless there's a good reason to put this on Android, i'll keep it on PC Operating systems.
qberty said:
Well I put the tag [TOOL] so I figured that would assign it to PC only. And for you to download it, the only download link is for Windows right now. So, yeah, PC. Unless there's a good reason to put this on Android, i'll keep it on PC Operating systems.
Click to expand...
Click to collapse
Thanks for answering quickly. Was just asking because [TOOL] could mean Android Tool, didn't specify PC or not. Thanks again though.
No problemo.
Updated Scr33nDr0iD to 1.1
Added an Instant Hotlinking feature. This allows it upload your screenshot as a JPG to a server for quick hotlinking and copies it to your clipboard.
(Couple of people PM'd me for this feature, so I threw it in. I haven't seen any other app with this feature so I figured it would be a cool addition)

[APP][1.6+] KeyEvent Display v0.0.4

Description
Once, I was playing with a number of Chinese tablets and trying different ROMs on them as they are technically the same hardware (HSG X5A variants).
I've had some problems getting the hard buttons to work though, so I wrote this application to detect key events and print them out. It will print out the following:
KeyEvents: The KeyEvents as Android understands them (KeyUp, KeyDown, KeyLongPress, KeyMultiple)
LogCat: Any relevant messages in logcat. Its filtered based on keywords declared in arrays.xml
Kernel: Any relevant messages in the kernel log. Its filtered based on keywords declared in arrays.xml. Kernel log parsing needs root.
The three checkboxes at the top control what information will be displayed.
This is a personal debug tool, but I hope it will be of some use to someone else.
No Ads.
Notes
While the application is running, the only "hard" keys which should work is "Home" and power. All others will produce their keycodes.
The SU request is to read the kernel log, so I can check if any keyevents are thrown by the kernel.
The location of keylayout files in Android is /system/usr/keylayout.
Kernel log parsing needs root
Both logcat and kernel log monitoring will only display lines containing words from two arrays in arrays.xml (i.e. you need to recompile the app to change them at the moment)
Currently the filters are:
Logcat:
HwGPIOE->GPDA
keycode
keycharacter
Kernel:
HwGPIOE->GPDA
keycode
keycharacter
Permissions
READ_LOGS: Used to access the Logcat log.
WRITE_EXTERNAL_STORAGE: Used to write the exported data to the SD card.
Changelog
v0.0.1: First public release.
v0.0.2: Improved stability, added Exit button.
v0.0.3: Code updates.
v0.0.4: Changed drawables, added sharing, added more info in export text
Acknowledgements
Original icon by OCAL (http://www.clker.com/clipart-style-paintbrush.html).
Licence
Licensed under the Apache Licence 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
Links
Market link: https://market.android.com/details?id=aws.apps.keyeventdisplay
Webpage: http://aschillings.co.uk/html/keyevent_display.html
Github: https://github.com/alt236/KeyEvent-Display---Android
Screenshots
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
|
This could be handy for anyone trying to redesign an apple BT keyboard for use with Android.

[APP] iptraf 3.0.0 for Android (with APK Installer)

Introduction:
Here's the classic iptraf for Android!
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Installation:
You need to have a rooted phone and busybox installed on /system/xbin
You also need to have about 1Mb free on your /system partition.
Usage:
To use iptraf, you need to either have an SSH server on your phone (for example DroidSSHd) and connect using Putty from your PC, or you can use the Terminal Emulator (please see attached screenshots).
Any terminal emulator application should work, but iptraf requires at least 80×24 characters screen so for smaller screens you might need to reduce the font size a lot to make it fit.
The price is payed for the installer and the effort to have iptraf cross-compiled for Android, since iptraf is distributed under GPL license. Put in a different way, you are just buying me a beer for making it easier for you to have iptraf on your phone!
Filters:
If you decide to connect using SSH, the trouble is that iptraf will show the SSH traffic too – something that you might not want to have there constantly updating.
It would seem intuitive to create a filter which excludes SSH port from the traffic, but once you do that, iptraf will not show anything else; iptraf actually has an “implicit no-display” policy meaning that once you apply a filter (include / exclude) nothing else is displayed, even if the filter is Exclude mode. You will need to have an additional Include entry added to the filter (after the Exclusion entry taking care of the SSH port) where everything is 0 and all the ports have an Y next to them. Please check attached screenshots as an example on how the entries of the filter should look like.
Please do not forget to “Apply filter…” every time you change something in the filters. X saves the filter, Ctrl-X cancel the changes, but even if you press X, the filter is not yet applied unless you Apply the filter.
Download
Please donate by buying it from the Google Play :fingers-crossed:
Use it at your own risk!
IptrafInstaller.apk
Source code: https://code.google.com/p/iptraf-installer/
Could you please make the sources of the iptraf binary available?
(preferably on github)
1 Euro to download from Android Market? That sucks
M66B said:
Could you please make the sources of the iptraf binary available?
(preferably on github)
Click to expand...
Click to collapse
As soon as possible ... I am working on an updated version.
defim said:
1 Euro to download from Android Market? That sucks
Click to expand...
Click to collapse
Well, you can actually download for free from few posts above.
I'm to lazy to update app by manual download .apk

【Tool】[windows /linux][Smali Viewer(Beta)-APK analysis tool]

Smali Viewer(“SV”) is a free APK analysis software, regardless of the depth or breadth of analysis from the point of view, are designed to meet user needs, making the process in the APK in your analysis , more handy.
SV for Android mobile smart device applications APK files reverse , for the analysis of mobile application software code , using a variety of methods to determine the suspected samples for screening , such as certificate information , permissions information sensitive SP number information , Android Manifest , the function flowchart (CFG), a string table resource file information, sensitive information behavior , dynamic behavior , and so comprehensive determination .
Operating Environment:
Need to install java 1.7 and above
Installation:
Download SmaliViewer.Zip package, extract the installation directory in the specified folder open SmaliViewer .
Start method :
Click SmaliViewer.bat under windows system to run the program ; under Linux Click SmaliViewer.sh run the program. The first time you run the program , agree to " user agreement ."
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
2 Workspace
View the work area through the operation menu and shortcut menu , you can open the following eight working window , the window through which eight kinds of work , to show you the results of the analysis contained SV depth and breadth of the APK 's :
Work area is divided into four regions, see the following picture :
1 - menus and toolbars .
2 - the main work area .
3 - Operation log and status display area.
4 - class structure display area.
5 - member list display area
We are committed to APK analysis,and want to make APK analysis easyer.
Welcome to download it & Send your suggestions to us
DOWNLOAD:http://blog.avlyun.com/wp-content/uploads/2014/04/SmaliViewer.zip
Contact us:
Email address: [email protected]

[Tool][Windows] Cassini.1.2 - Now Compress Any App! (*)

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Now Support all Apps! (*)​
Download - Cassini.1.2 - 3.5MB [Google Drive]
Download - Cassini.1.2 - 3.5MB [Dev-Host]​
About
First of all, the reason that this program took this much time to come out is because my career-deciding exams where on. So I'm sorry about that.
The newest edition features a GUI - like UI that helps user to easily create new projects (for rom or collection of apps) and manage them.
With the new algorithm the for compression you can ensure that almost all of your apps get compressed successfully! You just have find the perfect set of settings for that particular app. Use it ti compress apps and get a performance boost for your phone as well as save some space!​
Setting Up your PC!
Note: You can skip this step if you already have Java installed on your PC, or you don't want to use the Sign Apk setting for compression.
Download The following resources first:
Java SE Run-time Environment 7 [ Java Dependencies For Signing APK tool ]
Now let's begin setting up your PC,
Install the above mentioned programs.
Go to Advanced System Properties.
It looks like this:
Go to Environment Variables, then create a new System Variable, having name JAVA_HOME and value as the path where you have installed the JRE.
It looks like this:
Now after creating the JAVA_HOME variable, search for Path system variable in the System Variables list. Now this is a bit tricky. Once found click on it and then on Edit. Move the cursor to the end of the string till you see ";" (without quotes), add the path to your JRE bin folder just after it.
It looks like this:
Manual for Cassini.1.2 - Information about the program.​
Include this in your signature if you like and support Cassini and you are using the apps compressed by Cassini!
​
:good: Hit thanks if you liked it! :good:​
Screens for Cassini.1.2
Screenshots of Cassini.1.2

Categories

Resources