lighttpd for android - Android Q&A, Help & Troubleshooting

Hello guys!
I want to create my own web server (like Palapa Web Server, or HTTP Server powered by Apache), but I will use lighttpd. I got the sources, compiled it for arm. My problem is that:
2019-03-04 21:58:13.203 9236-9236/package.webify E/Webify: java.io.IOException: Cannot run program "lighttpd" (in directory "/data/user/0/package.webify/files/sbin"): error=13, Permission denied
My application downloads a ZIP file on my website, and it extracts it to getFilesDir() (/data/user/0/package.webify/files), and I try to run lighttpd, but it gives me "Permission denied".
What can I do to run the command? It should be a way, otherwise Palapa Web Server and the other apps that does the same thing wouldn't work either.

Related

android app: network access for external programs

Dear All,
I am trying to develop an app which calls a external program (written in C) using Runtime.getRuntime().exec method. This program is basically an gstreamer based rtsp server and it works good if I run from the android command prompt. However, when I run the program from the app, I am getting the following error.
Failed to bind socket (Permission denied)
I had given the network access in my AndroidManifest.xml file.
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
I also tried this
String cmd = "ping localhost";
Runtime.getRuntime().exec(cmd);
for which I got
ping: icmp open socket: Operation not permitted
I also tried to run an another program from an app (which shows an image on the android screen - surfaceflinger sink). So, I included android.permission.ACCESS_SURFACE_FLINGER in the manifest file. However, it wasn't able to display on surfaceflinger sink.
So, I have a feeling that these permissions are not passed on to these external programs. Is there a way to achieve this? I don't want to convert these 'C' based programs to Java. Can anyone please help me out.
Thanks,
Krishnan

ICEWM in Debian squeeze?

I installed debian squeeze via an app just called Linux Installer. installed ICEWM and xorg via apt-get but when i run startx I get a no screens found error. How can I fix this?
Edit: sorry heres the full report but its on my phone(optimus v).
Primary device is not PCI
(EE) open /dev/fb0: no such file or directory
(EE) No devices detected
Fatal server error:
no screens found
xinit: No such file or directory (errno 2): unable to connect to X server
xinit: No such process (errno 3): Server error.

[Q] Make a private Caldav server work

Hi, I recently purchased the ZTE Open C and want to synchronize its calendar with my own Caldav server.
Firefox rejects the connection tough, because the server has an invalid (self signed) certificate.
So i tried adding my certificate to firefox.
I found this guide:
http : // wiki . mozfr . org / Adding_CA_to_FirefoxOS
(Sorry for inserted spaces, won't let me post a link in first post.)
However I fail in the very first steps.
Code:
adb shell ls /data/b2g/mozilla/
Returns: /data/b2g/mozilla/: Permission denied
This means I dont have reading rights in this directory.
How do I get those rights, or alternativeley is there a better way to achieve my Caldav-Server goal?
Mathews123 said:
Hi, I recently purchased the ZTE Open C and want to synchronize its calendar with my own Caldav server.
Firefox rejects the connection tough, because the server has an invalid (self signed) certificate.
So i tried adding my certificate to firefox.
I found this guide:
http : // wiki . mozfr . org / Adding_CA_to_FirefoxOS
(Sorry for inserted spaces, won't let me post a link in first post.)
However I fail in the very first steps.
Code:
adb shell ls /data/b2g/mozilla/
Returns: /data/b2g/mozilla/: Permission denied
This means I dont have reading rights in this directory.
How do I get those rights, or alternativeley is there a better way to achieve my Caldav-Server goal?
Click to expand...
Click to collapse
You cannot use that method unless your phone is rooted, BUT...
I had the same problem and solved it a lot easier. Just launch the browser and input your server's URL. Then you will be warned about the not valid cert, add a permanent exception and that's all, now calendars should sync over HTTPS.
BTW this worked for me until FFOS v1.4. Today I updated to FFOS 2.1 and this trick stopped working, so you have been warned.
Thank you for the suggestion.
I am not running v2.0, so I tried it.
I could add the certificate.
However, when trying to connect, I get:
"Unknown Error. Please try again later."
Any way to figure out what's wrong now?
Seems to be a problem with the server I used. (Baikal)
Using a different one (Owncloud - sadly quite a lot bigger), it works with your tip.
So thanks for the help.
to ged rid of the "unknown error" in Caldav (etc.?)
doragasu said:
I had the same problem and solved it a lot easier. Just launch the browser and input your server's URL. Then you will be warned about the not valid cert, add a permanent exception and that's all, now calendars should sync over HTTPS.
Click to expand...
Click to collapse
thank you so much :victory:

Using native JRE methods to work with files on Android 5.0+

Hello, I am amateur developer, and I'm working on little utility that processes files. I have a library that works with filesystem using RandomAccessFile class. Trying to use this library results in throwing exception that says "(EACCESS): Permission denied". How can I get this permission using new Android's sdcard access API?

[DEV][AAOS][GAS] Google Services on Android Automotive OS build

Hello, I'm looking for a way to use Google Automotive Services in my custom ROM.
My aim is to develop an application using privilage/system permissions (android.car.permission.CAR_INFO, android.permission.SYSTEM_ALERT_WINDOW, etc.) and Google API, but I can't see a way to install it on the official emulator.
For a start - I've downloaded 12.1 sources, built an SDK image and created an emulator. Then I've downloaded AAOS 12.1 emulator image with a Play Store.
Side note: I'd like to do the same with AAOS 13, but there is no official AAOS 13 emulator image with GAS so far.
Then I've found all apk packages present in the emulator system img file and absent in my image, sign them all with my platform key and install with adb install with "-g" switch.
The emulator starts but it just pretends to work.
Google Maps starts, but it can't read the GPS signal (I'm in the middle of the ocean )
I still see "The device isn't Play Protect certified" message, even when registered at https://www.google.com/android/uncertified/.
When trying to log into a Google Account, I can see "addAccount(com.google): java.lang.SecurityException: Cannot delegate to Service with different signature." exception thrown.
There are a lot of security-related errors in logs:
GooglePlayServices not available due to error 9
com.google.android.carassistant requires Google Play services, but their signature is invalid
java.lang.SecurityException: UID 10157 is not associated with a first party app!
File error accessing recents directory,
Tried to access the API:ViewConfiguration which needs to have proper configuration from a non-UI Context:[email protected]
Package com.android.car.activityresolver is not installed for any user, java.lang.UnsatisfiedLinkError: dlopen failed: library "/system/lib64/libbluetooth_jni.so" needed or dlopened by "/apex/com.android.art/lib64/libnativeloader.so" is not accessible for the namespace "classloader-namespace"
java.lang.SecurityException: Caller com.google.android.gms needs to hold android.permission.SCHEDULE_EXACT_ALARM to set exact alarms.
and a lot more....
Side note: I've tried an another way - to install my app as a system one in the official emulator, but repacking those super images beat me .
What else should I do? Is there an easy way, like Open GApps for Automotive or how can I create my own GApps package?

Categories

Resources