[REQUEST] for simple app gui - Android Apps and Games

I have looked for an app that acts as a dropbear (ssh server) gui
with no luck (I don´t think one exists, good or bad)
The app simply needs to check if a process called dropbear is running
if true; kill it
ELSE run /system/bin/dropbee
(dropbee is a sh script I wrote that launches dropbear with all the appropriate
parameters)
I can supply the sh scripts and dropbear binaries if someone want to put together an .apk?

Gscript would do the job. Try a quick search for it here or on the android market.
Its a gui for running scripts. You can run them from within the app or you can place a shortcut to specific scripts on your homescreen.

Related

Intents help

OK, I have figured out how to execute programs using the "make your own" in anycut.
However, can someone explain to me how to run a command line? Such as... "SU"?
If we can get it to load up SU, then it would be simple to execute the tether start/stop commands.
This is the only info I could find regarding intents....
http://code.google.com/android/reference/android/content/Intent.html
If you want to send commands to the console from a Java application, you need to use runtime exec. If you just want to make a toggle app, you might want to check with jasoncheng, as he seems to be trying something similar. The documentation on runtime is here. Example code here.
Thanks!!! That is what I was looking for but I guess after being up for 30 hours, my brain is coming to a crawl...

C Code in G1? JF? Anyone?

I'm just wondering is anyone trying this yet? i mean is it even possible?
Just a thought for you big shot android devs out there JF, Haykuro, LucidREM
Google "android jni"
Well, a quick trip around google would have helped you.
Android is using java, and currently it's not possible to use anything else.
But anyway, would you rather compile all of your code for multiple architectures? J makes things easier here...
You can write cli-apps in C though... i heard something about that there was plans to make other languages available in android, but i wouldn't hold my breath
Also, why is this related to JF/Haykuro/LucidREM?
I think you can do this with JNI: http://en.wikipedia.org/wiki/Java_Native_Interface
Using an ARM native compiler (such as the ones at CodeSourcery, http://www.codesourcery.com/sgpp/lite/arm/portal/[email protected]=lite) you can compile your apps and run them fine on the G1
Code:
$ arm-none-linux-gnueabi-gcc -static foo.c -o foo
$ adb push foo /data/foo # we are pushing to /data as it is +rwx (read, write, execute) for a standard user.
$ adb shell /data/foo
a=1
b=2
foo=a+b
foo=3
^^^
OH I love when I stumble across a post like this and have something new to play with.
The problem is due to the different location of the linker and mainly the different libc you have to statically link everything.
I have been having a hell of a time getting DPKG to build statically.
I picked up a copy of the newly released book, Unlocking Android, at Barnes and Noble yesterday. There is a whole chapter devoted to writing native apps using C (and ARM assembler) with the CodeSourcery tools linked above. The author walks through the steps you need to do to dynamically link the libraries so you don't end up with enormous statically linked executables. Well worth the price.
It is surprising what you can do with C on the phone, its actually not too difficult. The method outlined below doesn't use the non native toolchains and if you use the sourcery toolchain (as mentioned above) you will end up with bigger binaries as you need to link in a standard glibc and not androids bionic libc. This may or may not be important for your project.
The other advantage of the steps below is that you will build and link against any library that is available to the android platform
The easiest way that I've found to start when porting or writing new applications is this method.
1) Check out the current git android source.
2) Build the entire tree, "make" in the top level directory.
3) Create a new directory in mydroid/external/packagename/
4) Copy one of the simple android Android.mk (Make) files from a "like" target.
(If doing a library, choose a library, if coding an executable , choose that).
5) source the mydroid/build/envsetup.sh in the users bashrc
6) cd to your directory, then instead of the usual "make" do an mm.
This should create a binary, which you can adb push to the phone and run at the console.
You can do all the usual things if linked properly, like write the framebuffer using sdl, play sounds, create network connections.
Just remember that you dont have a standard libc (glibc) to play around with you have "bionic". If you are missing your favourite glibc function , it is probably intention and not abug. You'll either need to port it or make do with the functions provided by bionic.
These instructions are for a "pure" C program. you can mix the java like dex calling by 'shelling' out to the C application when you need performance, however premature optimization is the root of all evil, you'll be surprised what performance you can pull from davlik (And I expect the VM guys to improve this even further).
I know that is a lot to digest. Will do the best I can to answer your questions. I'm by no means an expert in the area, but have learned a bit about C on android.
Well I don't know much about all this but what i know is that e.g.
ScummVM IS written in C++ , and so is g-arcade.
His FAQ says:
"How did you do this? Is it Java?
No. ScummVM is a C++ program. For this port, I turned it into a really big JNI library so Android still thinks it's running a Java program, but almost all of it is implemented in C++."
(http://sites.google.com/site/scummvmandroid/faq#TOC-How-did-you-do-this-Is-it-Java-)
So if some1 wanna port MAME, feel free to xD

[Q] Robust Linux command-line utils for Android?

Has anyone compiled a set of command line utilities for Android more robust than BusyBox? Coming from an iPhone, I love Android and its hackability, but I'm surprised that I haven't seen more about command line tools like the BSD Subsystem packages that provide common utils on the iPhone.
It would be incredibly convenient for me (and others, I would think) to have a more complete set of commands available. I know that some have compiled bash for Android, though I haven't seen an installable version of that either.
Any insights?
Android command line utilities archive
I maintain an archive of useful command line utilities at vkfox"dot"com"slash"android and a blog at androidcommandline"dot"apps-1and1"dot"com that describes installation and use for the NON-ROOT terminal emulator user. Included are a properly compiled busybox, popular command line interpreter/compilers (tcl, nodejs, d8, pforth, squirrelfish javascript, php-cli, python, perl, java, pforth, etc.), utilities (grep, strace, gdb, ctags, links, etc.) and other things in which I have an interest. I also describe in the blog how to use dalvikvm without root to compile and execute java and provide dexed versions of the eclipse java compiler and other java utilities for this purpose.
Other places where you can get properly (NDK) compiled tools are the applications CCTools, Terminal IDE, and other terminal based developer apps.
Use at your own risk, and don't point the gun at your own feet.

BotBrew Vim Installation

Hello folks,
So i discovered the wonders of the amazing application "BotBrew", which is basically BusyBox but supercharged to bring a pretty full featured GNU UNIX terminal session to any arm device.
That being said I managed to successfully install Vim on my device without a problem. Its seriously amazing! running vim on my androids terminal!! No emulation! No mounted Linux, nothing but running the real vim on from my android's linux kernel. Phenomenal.
But im curious, i know that has all the same support as vim on linux, including syntax highlighting, etc. But i cant seem to get the syntax highlighting to work. It may be just because my terminal has its colors set to white on black, and maybe its overriding the colors of the syntax highlighting, or maybe I may have just not enabled it or something?
Is there a key combination to enable syntax highlighting in vim? As well as auto-completion?
I know in linux this happens automatically when you save the file with ":w" to whatever file extension it will start the syntax highlighting for that programming language.
So any thoughts on this guys? Maybe a terminal that has basic colors without color schemes? Or a keyboard shortcut that may enable autocompletion and syntax highlighting?
Thanks for your time guys. And i highly recommend getting BotBrew if you have experience on a Linux/UNIX terminal. get vim installed and check out the unreal list of amazing applications you can install and get your new terminal package manager "opkg".
Really you wont regret it.
Oh and help them out and add your device to the supported devices list if it works.
Take care everyone.
Ill take a screenshot in a bit too
Sent from my SPH-D600 using xda premium

Shell Scripting (Bash) : Favourite

I'm looking for the favourite apps/tools that people are using for bash scripting on their tablets/phones.
I've got a Nexus7, so its pretty unrestricted on what can go on there, however I'm trying to avoid rooting it if at all not necessary.
RBG
sl4a
and Tasker for automation

Categories

Resources