[Q] Configuration file for a C daemon - C++ or Other Android Development Languages

Hello everybody!
I'm developing an android application that rely on a standalone daemon written in C.
The regular android app is mainly used to set some configuration parameters that are used by the C daemon. My question is: what is the best way or best practice to store these configuration/settings (how?Where?) and then read them from the daemon?
Thanks!

Related

[Q] Android general questions

I'm new to Android and have a few question that didn't get answered by Google it. I have bought my first Android phone (SGS2 of course, after years of being a Symbian fanboy), but have not received it yet.
1. Does everything run on top of Dalvik JVM? At the bottom is the Linux kernel. Then there is a Linux process which runs Dalvik VM. Could for instance Sun's JVM run on a Linux process of its own or another Linux application?
2. Can C/C++ Linux program run on Android? Though compiled for ARM. Android has NDK (Native Development Kit) which allows it to run C/C++ applications inside Android applications, but I'm wondering about running C/C++ applications directly on Android. BusyBox is coded in C, but runs on Android. Is it running directly on the kernel's linux process or within an Android application on Dalvik?
3. The latter(Q2) would indicate that not everything run on top of Dalvik. Otherwise C/C++ programs would not run.
4. Android uses ADB (Android Debug Bridge) for its CLI magic. BusyBox uses Ash. Can one install bash as the default shell, with full GNU Core Utilities commands? Some forum posts indicate that it is possible to install an ARM re-compiled bash version.
5. Android can be rooted by installing applications like Super User or BusyBox that would let the user execute applications as root. That would indicate that there exist a root user, in addition to the actual user. Is this similar to how it is on Linux? Can I define a password for the root user so that no applications can run root directly?
6. Are all user data stored in the database SQLite? User data is accessible through different applications, but how does Android determine access rights to it?
7. I have read that Android applications run on their own Linux process and are assigned a unique user ID. Does this mean that we can run ps to see all running processes or does it act like the Sun JVM just showing each VM process? However looks like different applications can run in the same process. Can these be distinguished or do we just the the once process.
8, Is the camera application (that some have made modifications of) a Google app or Samsung app? Just wondering since the former would allow such modified versions to run on other than Samsung phones, but given that different phones have different camera specs I don't see how this could go well.
9. Can the codes typed in the dialer be executed through a shell instead (adb)?
There are some apps that run direct c++ code. The stock gallery app for example is written in c++. So not everything uses that dalvik virtual machine. I don't know enough to answer all your questions though.
Not many replies. That is disappointing.
Perhaps I could move this thread to another forum here on XDA? Or perhaps another forum.
In the meantime I'll try some more Google search on the subjects...

[Q] Wireless Adaptor Support in Emulator

I need to re configure wireless adaptor to setup an adhoc network over android phones. I need a way to test it on emulator but i have heard it doesnt has support to it hence cannot be accessed. Is there any way i can do it ? The reconfiguring is done at runtime by a library file by executing low level commands.
In simpler words i need a way to connect 2 or more android virtual devices using wifi, adhoc-ly. How can i enable wifi and add a network on the virtual device ?
Please use the Q&A Forum for questions Thanks
Moving to Q&A

[Q] Linux on Android MK808

I have an MK808 and want to install more of linux environment. At the moment I have optware installed and running transmission successfully, but I don't know how to have it start transmission up on boot. Also wanting todo the same for openSSH and Samba.
So instead of using optware I was looking at a more full linux distro. I come across a thread on this forum where it was modifying so Linux ran at the top level with android chrooted under it, but I can not find the kernel image and my init is a binary file not a shell script as per the instructions. Any ideas?
The other option is Linux on Android, but will this let me access my android files when using SSH from it (ie. I can have a mount to access the android file system)? Can I have it start on boot and run the services I wanting (transmission, openSSH and Samba).

[Q] Secure ADB connection over network

I am using Geniatech ATV Android Set Top Boxes running android 4.2.2 for a current project. I might put some of those devices in public places like shopping centers. These boxes are connected to the local network there by cable or wireless.
I have a VPN connection to ssh remotely into the boxes (using debian kit) and on the boxes USB debugging is enabled, so that i have ADB access, which I use for chrome browser observation as well as for updating or installing new applications.
The problem is that everyone on the same local network as the box can also use adb to connect to the boxes and then have full access to everything, which is a big security problem.
What I want to do is restrict the interface of adb to only work over the vpn connection.
Alternatively I need a way to stop and start the adb daemon using my ssh connection to the box. The problem here is that I only connect to a debian kit instance running on the same box, which uses the same filesystem but doesn't have access to the start or stop adb commands.
Does anyone have an idea how to achieve this? I can't find a lot of information on this special requirements.

[Q] Power off Android using Python - SL4A

Hello All,
I'm looking for some guidance on how to control my android devices using python (SL4A).
Just looking to write a simple script that can power off the device. This will be eventually be triggered by Tasker... Any ideas?

Categories

Resources