-
Notifications
You must be signed in to change notification settings - Fork 2
Android
The program was tested on a Cyanogenmod-11.0 Android tablet.
Edit the Makefile and make sure the following lines are as they come: CC=arm-linux-androideabi-gcc CC_FLAGS=-static -Wall -pedantic -std=c99
Use the arm-linux-androideabi-gcc-Compiler and make sure the "-static"-flag is set in the compiler options!
Or compile it using
arm-linux-androideabi-gcc -static -Wall -pedantic -std=c99 -o nanoHttp nanoHttp.c -D_POSIX_SOURCE
root required! Remount the /system directory in read-write mode, copy the file, and remount /system again in read-only mode:
- mount -o remount,rw /system
- cp /storage/sdcard/nanoHttp /system/bin/
- mount -o remount,ro /system
Place the following file in cd /data/local/userinit.d/99nanoHttpd
#!/system/bin/sh
umask 077
# Modify "/storage/sdcard/www" - Change the directory your html contents are placed
/system/bin/nanoHttp -w /storage/sdcard/www &