├── .gitignore ├── Contributions.md ├── Documentation.md ├── README.md ├── Support App ├── iSpy │ └── custom_vendors.xml └── tinyCam │ └── custom_vendors.xml ├── assets ├── api-return-json.png ├── donate.en.png ├── product.jpg ├── tinyCam-01.png ├── tinyCam-02.png └── tinyCam-03.png ├── docs └── all-urls.txt └── firmware_mod ├── bin ├── USBMissileLauncherUtils ├── audioplay ├── avconv ├── bftpd ├── boa ├── boa_indexer ├── busybox ├── curl ├── curl.bin ├── dropbearmulti ├── gdbserver ├── getimage ├── jq ├── mJpegStreamer ├── mime.types ├── mosquitto_pub ├── mosquitto_pub.bin ├── mosquitto_sub ├── mosquitto_sub.bin ├── motor ├── ossplay ├── ossrecord ├── sample-Audio ├── setconf └── v4l2rtspserver ├── config ├── autostart │ └── README ├── bftpd.conf ├── boa.conf ├── camera.conf ├── hostname.conf ├── htpasswd.conf ├── mqtt.dist └── wpa_supplicant.conf ├── daemon-scripts ├── listen-to-play ├── mqtt-control ├── mqtt-status ├── night-vision-detection ├── rtsp-h264 ├── rtsp-mjpeg └── sound-on-startup ├── driver ├── audio.ko ├── sample_motor.ko ├── sensor_jxf22.ko └── tx-isp.ko ├── lib ├── libcrypto.so.42 ├── libmosquitto.so.1 ├── libmosquittopp.so.1 ├── libssl.so.44 ├── libusb-0.1.so.4 ├── libusb-1.0.so.0 └── libz.so.1 ├── run.sh ├── scripts ├── func.sh ├── iwlist.awk ├── listen-to-play.sh ├── mqtt-control.sh ├── mqtt-status-interval.sh ├── mqtt-status.sh ├── night-vision-detection.sh └── update-configuration.sh ├── sounds ├── startup.wav └── voice │ └── en │ ├── code_ok.wav │ ├── code_wrong.wav │ ├── connect_wifi_ok.wav │ ├── connecting.wav │ ├── copy.wav │ ├── dang.wav │ ├── get_msg.wav │ ├── init_ok.wav │ ├── update_system.wav │ └── waiting_to_connecting.wav └── www ├── DCIM ├── assets │ ├── css │ │ └── styles.css │ └── js │ │ └── script.js └── index.html ├── cgi-bin ├── api.cgi ├── dcim.cgi └── getfile.cgi ├── favicon.ico ├── index.html └── live.html /.gitignore: -------------------------------------------------------------------------------- 1 | # Custom Folders And Files # 2 | ############################ 3 | #none 4 | 5 | 6 | # Compiled source # 7 | ################### 8 | *.com 9 | *.class 10 | *.dll 11 | *.exe 12 | *.o 13 | *.so 14 | 15 | # Packages # 16 | ############ 17 | # it's better to unpack these files and commit the raw source 18 | # git has its own built in compression methods 19 | *.7z 20 | *.dmg 21 | *.gz 22 | *.iso 23 | *.jar 24 | *.rar 25 | *.tar 26 | *.zip 27 | 28 | # Logs and databases # 29 | ###################### 30 | *.log 31 | *.sql 32 | *.sqlite 33 | 34 | # OS generated files # 35 | ###################### 36 | .DS_Store 37 | .DS_Store? 38 | ._* 39 | .Spotlight-V100 40 | .Trashes 41 | ehthumbs.db 42 | Thumbs.db 43 | -------------------------------------------------------------------------------- /Contributions.md: -------------------------------------------------------------------------------- 1 | * [EliasKotlyar](https://github.com/EliasKotlyar) 2 | - create initial project in repo [Xiaomi-Dafang-Hacks](https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks) 3 | - compiled binary ex v4l2rtspserver-master 4 | * [Jhyrachy](https://github.com/Jhyrachy) 5 | - compiled `avconv` 6 | * [shinebar1001](https://github.com/shinebar1001) 7 | - make script for check light sensor 8 | 9 | ... and others. 10 | -------------------------------------------------------------------------------- /Documentation.md: -------------------------------------------------------------------------------- 1 | # How use api.cgi? 2 | ## Code informations of request. 3 | CODE | Description 4 | ------------ | ------------- 5 | 1234 | In soon ... 6 | 7 | ## Show data from file and system 8 | ### /cgi-bin/api.cgi?action=showlog or /cgi-bin/api.cgi?action=showlog&raw-0 9 | >View data from all /var/log/* file in HTML page. 10 | #### Additional Param 11 | ##### raw=1 12 | >View data from all /var/log/* file in RAW text. 13 | 14 | 15 | ## Control System 16 | ### /cgi-bin/api.cgi?action=reboot 17 | >Rebooting camera. 18 | 19 | Return: 20 | ```json 21 | { 22 | code: 1234, 23 | status: "info", 24 | description: "Rebooting device..." 25 | } 26 | ``` 27 | 28 | ### /cgi-bin/api.cgi?action=poweroff 29 | >Safe power off camera. 30 | 31 | Return: 32 | ```json 33 | { 34 | code: 1234, 35 | status: "info", 36 | description: "Power off camera..." 37 | } 38 | ``` 39 | 40 | ### /cgi-bin/api.cgi?action=sethostname&hostname=Dafang 41 | > Set hostname on System. 42 | 43 | Return: 44 | ```json 45 | { 46 | code: 1234, 47 | status: "success", 48 | description: "The hostname has been changed successfully to 'Dafang'." 49 | } 50 | ``` 51 | ```json 52 | { 53 | code: 1234, 54 | status: "info", 55 | description: "The hostname is already set to 'Dafang', so has not been changed." 56 | } 57 | ``` 58 | ```json 59 | { 60 | code: 1234, 61 | status: "error", 62 | description: "An error occurred while changing the hostname." 63 | } 64 | ``` 65 | 66 | ## Control LED and IR 67 | ### /cgi-bin/api.cgi?action=blue_led_on 68 | >Safe power off camera. 69 | 70 | Return: 71 | ```json 72 | { 73 | code: 1234, 74 | status: "success", 75 | description: "Blue LED is On." 76 | } 77 | ``` 78 | 79 | ### /cgi-bin/api.cgi?action=blue_led_off 80 | >Safe power off camera. 81 | 82 | Return: 83 | ```json 84 | { 85 | code: 1234, 86 | status: "success", 87 | description: "Blue LED is Off." 88 | } 89 | ``` 90 | 91 | 92 | ### /cgi-bin/api.cgi?action=yellow_led_on 93 | >Safe power off camera. 94 | 95 | Return: 96 | ```json 97 | { 98 | code: 1234, 99 | status: "success", 100 | description: "Yellow LED is On." 101 | } 102 | ``` 103 | 104 | 105 | ### /cgi-bin/api.cgi?action=yellow_led_off 106 | >Safe power off camera. 107 | 108 | Return: 109 | ```json 110 | { 111 | code: 1234, 112 | status: "success", 113 | description: "Yellow LED is Off." 114 | } 115 | ``` 116 | 117 | 118 | ### /cgi-bin/api.cgi?action=ir_led_on 119 | >Safe power off camera. 120 | 121 | Return: 122 | ```json 123 | { 124 | code: 1234, 125 | status: "success", 126 | description: "IR LED is On." 127 | } 128 | ``` 129 | 130 | 131 | ### /cgi-bin/api.cgi?action=ir_led_off 132 | >Safe power off camera. 133 | 134 | Return: 135 | ```json 136 | { 137 | code: 1234, 138 | status: "success", 139 | description: "IR LED is Off." 140 | } 141 | ``` 142 | 143 | 144 | ### /cgi-bin/api.cgi?action=ir_cut_on 145 | >Safe power off camera. 146 | 147 | Return: 148 | ```json 149 | { 150 | code: 1234, 151 | status: "success", 152 | description: "IR cut is On." 153 | } 154 | ``` 155 | 156 | 157 | ### /cgi-bin/api.cgi?action=ir_cut_off 158 | >Safe power off camera. 159 | 160 | Return: 161 | ```json 162 | { 163 | code: 1234, 164 | status: "success", 165 | description: "IR cut is Off." 166 | } 167 | ``` 168 | ## Control Motor PTZ 169 | ### /cgi-bin/api.cgi?action=motor_left 170 | >The motor has moved the camera to the left. 171 | ### /cgi-bin/api.cgi?action=motor_right 172 | >The motor has moved the camera to the right. 173 | ### /cgi-bin/api.cgi?action=motor_up 174 | >The motor has moved the camera to the up. 175 | ### /cgi-bin/api.cgi?action=motor_down 176 | >The motor has moved the camera to the down. 177 | 178 | Return ex for move left: 179 | ```json 180 | { 181 | code: 1234, 182 | status: "success", 183 | description: "The motor has moved the camera to the left for '100'ms." 184 | } 185 | ``` 186 | #### Additional Param 187 | ##### ns=[value] 188 | >Set value in range 0 - 2500 ns. 189 | 190 | Return ex for move right with 600 ns: 191 | ```json 192 | { 193 | code: 1234, 194 | status: "success", 195 | description: "The motor has moved the camera to the right for '600'ms." 196 | } 197 | ``` 198 | 199 | ### /cgi-bin/api.cgi?action=motor_vcalibrate 200 | >Motor is calibration on vertical. 201 | ### /cgi-bin/api.cgi?action=motorr_hcalibrate 202 | >Motor is calibration on horizontal. 203 | ### /cgi-bin/api.cgi?action=motor_calibrate 204 | >Motor is calibration on vertical and horizontal. 205 | 206 | ## Control Audio 207 | ### /cgi-bin/api.cgi?action=audio_test 208 | >Camera playing audio for test. 209 | ### /cgi-bin/api.cgi?action=audio_record_start 210 | >Camera start record audio to file. 211 | ### /cgi-bin/api.cgi?action=audio_record_stop 212 | >Camera stop record audio to file. 213 | 214 | ## Control Video 215 | ### /cgi-bin/api.cgi?action=h264_start 216 | >Camera start stream video in H264 format. 217 | ### /cgi-bin/api.cgi?action=mjpeg_start 218 | >Camera start stream video in MJPEG format. 219 | ### /cgi-bin/api.cgi?action=rtsp_stop 220 | >Camera stop stream video in H264 and MJPEG format. 221 | 222 | ## Other 223 | ### /cgi-bin/api.cgi?action=xiaomi_start 224 | >Camera starting with factory firmware. 225 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Repo build, coming soon. 2 | 3 | [![Donate with PayPal](/assets/donate.en.png)](https://paypal.me/kszere) 4 | 5 | # Custom Software For Xiaomi Dafang 6 | This repository cointains Custom Software with HTTP API and panel site for the Xiaomi Dafang Camera. 7 | 8 | This Software based with [Xiaomi Dafang Hacks](https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks). 9 | 10 | 11 | ## Manual And Documentation API 12 | Manual and documentation is make for old version. Please check [all-urls.txt](/docs/all-urls.txt) file. 13 | * [Manual](https://kszere.gitbooks.io/custom-software-for-xiaomi-dafang-manual/content/) 14 | * [API Documentation](https://kszere.gitbooks.io/custom-software-for-xiaomi-dafang-doc-api/content/) 15 | * [How add Xiaomi Dafang API on Camera](https://github.com/kszere/Xiaomi-Dafang-API/wiki/How-add-Xiaomi-Dafang-API-on-Camera) 16 | * [How add XML config on tinyCam App on Android](https://github.com/kszere/Xiaomi-Dafang-API/wiki/How-add-XML-config-on-tinyCam-App-on-Android) 17 | 18 | ## Features 19 | * HTTP API with return JSON data 20 | 21 | ![API return data with JSON](/assets/api-return-json.png) 22 | * support with app on Android 23 | * tinyCam (you must added config file) 24 | * IP Cam Viewer (added to app) 25 | * WEB Panel with HTML5/CSS/JS \(in soon\) 26 | 27 | ### ToDo 28 | * [ ] Correct and add real check return data status in api \(success, error, info\) 29 | * [ ] Create table with return code api 30 | * [ ] Add additional functions for all Actions if possible it 31 | * [ ] Create panel with framework CSS on Dafang 32 | 33 | ### Changelog 34 | ###### v0.0.5 Beta 35 | * [x] push v0.0.5 Beta 36 | * [x] change name repo from **Xiaomi-Dafang-API** to **Custom-Software-For-Xiaomi-Dafang** \(2018-02-21\) 37 | * [x] refresh home page api.cgi \(2018-02-22\) 38 | * [x] repair set_timezone action \(2018-02-23\) 39 | * [x] change url API Documentation And Manual \(2018-02-23\) 40 | * [x] add Support for iSpy App \(2018-02-24\) 41 | * [x] Added "camera.conf" configuration file \(2018-02-24\) 42 | * [x] added OSD to RTSP and snaphot \(2018-02-24\) 43 | * [x] Added safe test load source \*.cgi files \(2018-02-24\) 44 | * [x] Added LEDs Switch \(2018-02-24\) 45 | * [x] Added NightVision Switch \(2018-02-24\) 46 | * [x] Added Daemon Night Vision Detection \(2018-02-25\) 47 | * [x] Added auto function for NightVision \(2018-02-25\) 48 | * [x] Refresh motor functions and added vaild \(2018-02-26\) 49 | 50 | ###### v0.0.4 Beta 51 | * [x] added nightvision in ?action=get_snaphot when v4l2rtspserver-master running 52 | * [x] added home page api.cgi with informations about API 53 | * [x] update Manual and Documentation API 54 | 55 | ###### v0.0.3 Beta 56 | * [x] start making GitBook Documentation API [click here](https://kszere.gitbooks.io/custom-software-for-xiaomi-dafang-doc-api/content/) \(2018-01-30\) 57 | * [x] update system informaations on API \(2018-01-31\) 58 | * [x] added new ?action=get_snaphot for making snaphot, also when running v4l2rtspserver-master \(2018-01-31\) 59 | * [x] added new ?action=set_timezone for change timezone localy time (\(2018-01-31\)) 60 | 61 | ###### v0.0.2 Beta 62 | * [x] create XML file configuration Camera for tinyCam on Android \(2018-01-23\) 63 | * [x] added system informations on API \(2018-01-28\) 64 | * [x] added light sensor information on API \(2018-01-28\) 65 | 66 | ###### v0.0.1 Beta 67 | * [x] create repo \(2018-01-23\) 68 | * [x] upload first version api \(2018-01-23\) 69 | -------------------------------------------------------------------------------- /Support App/iSpy/custom_vendors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | /cgi-bin/api.cgi 6 | 7 |
?action=motor_calibrate
8 | ?action=set_motor&direction=right 9 | ?action=motor_right 10 | ?action=set_motor&direction=down 11 | ?action=set_motor&direction=up 12 | ?action=set_motor&direction=stop 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | action=reboot 24 | action=poweroff 25 | ?action=set_led&led=blue&state=1 26 | ?action=set_led&led=blue&state=0 27 | ?action=set_led&led=yellow&state=1 28 | ?action=set_led&led=yellow&state=0 29 | ?action=set_led&led=ir&state=1 30 | ?action=set_led&led=ir&state=0 31 | ?action=set_ir_cut&state=1 32 | ?action=set_ir_cut&state=0 33 | ?action=set_nightvision&state=1 34 | ?action=set_nightvision&state=0 35 | 36 |
37 | -------------------------------------------------------------------------------- /Support App/tinyCam/custom_vendors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | /cgi-bin/api.cgi?action=get_snaphot&raw=1 6 | /unicast 7 | /cgi-bin/api.cgi?action=motor_calibrate 8 | /cgi-bin/api.cgi?action=set_motor&direction=left 9 | /cgi-bin/api.cgi?action=set_motor&direction=right 10 | /cgi-bin/api.cgi?action=set_motor&direction=up 11 | /cgi-bin/api.cgi?action=set_motor&direction=down 12 | /api.cgi?action=set_motor&direction=stop 13 | /cgi-bin/api.cgi?action=set_nightvision&state=1 14 | /cgi-bin/api.cgi?action=set_nightvision&state=0 15 | /cgi-bin/api.cgi?action=audio_test 16 | /cgi-bin/api.cgi?action=set_led&led=blue&state=2 17 | /cgi-bin/api.cgi?action=set_led&led=yellow&state=2 18 | /cgi-bin/api.cgi?action=set_led&led=ir&state=2 19 | /cgi-bin/api.cgi?action=set_ir_cut&state=2 20 | /cgi-bin/api.cgi?action=h264_start 21 | /cgi-bin/api.cgi?action=mjpeg_start 22 | /cgi-bin/api.cgi?action=rtsp_stop 23 | /cgi-bin/api.cgi?action=reboot 24 | /cgi-bin/api.cgi?action=poweroff 25 | Warning, Test section. 26 | Uwaga, Sekcja testowa. 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /assets/api-return-json.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/assets/api-return-json.png -------------------------------------------------------------------------------- /assets/donate.en.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/assets/donate.en.png -------------------------------------------------------------------------------- /assets/product.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/assets/product.jpg -------------------------------------------------------------------------------- /assets/tinyCam-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/assets/tinyCam-01.png -------------------------------------------------------------------------------- /assets/tinyCam-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/assets/tinyCam-02.png -------------------------------------------------------------------------------- /assets/tinyCam-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/assets/tinyCam-03.png -------------------------------------------------------------------------------- /docs/all-urls.txt: -------------------------------------------------------------------------------- 1 | 0 - off 2 | 1 - on 3 | 2 - toggle 4 | 5 | /api.cgi 6 | 7 | /api.cgi?action=showlog 8 | RETURN IN HTML 9 | 10 | /api.cgi?action=reboot 11 | /api.cgi?action=poweroff 12 | /api.cgi?action=set_hostname&hostname=Dafang 13 | /api.cgi?action=set_timezone&tz=UTC-1:00 14 | /api.cgi?action=systeminfo 15 | 16 | /api.cgi?action=set_led&led=blue&state=0 17 | /api.cgi?action=set_led&led=blue&state=1 18 | /api.cgi?action=set_led&led=blue&state=2 19 | /api.cgi?action=set_led&led=yellow&state=0 20 | /api.cgi?action=set_led&led=yellow&state=1 21 | /api.cgi?action=set_led&led=yellow&state=2 22 | /api.cgi?action=set_led&led=ir&state=0 23 | /api.cgi?action=set_led&led=ir&state=1 24 | /api.cgi?action=set_led&led=ir&state=2 25 | 26 | /api.cgi?action=set_ir_cut&state=0 27 | /api.cgi?action=set_ir_cut&state=1 28 | /api.cgi?action=set_ir_cut&state=2 29 | 30 | /api.cgi?action=set_nightvision&state=0 31 | /api.cgi?action=set_nightvision&state=1 32 | /api.cgi?action=set_nightvision&state=2 33 | /api.cgi?action=set_nightvision&auto=0 34 | /api.cgi?action=set_nightvision&auto=1 35 | 36 | /api.cgi?action=set_motor&direction=stop 37 | /api.cgi?action=set_motor&direction=left 38 | /api.cgi?action=set_motor&direction=left&ns=100 39 | /api.cgi?action=set_motor&direction=right 40 | /api.cgi?action=set_motor&direction=right&ns=100 41 | /api.cgi?action=set_motor&direction=up 42 | /api.cgi?action=set_motor&direction=up&ns=100 43 | /api.cgi?action=set_motor&direction=down 44 | /api.cgi?action=set_motor&direction=down&ns=100 45 | 46 | BOTH MOTORS CALIBRATION 47 | /api.cgi?action=motor_calibrate 48 | 49 | /api.cgi?action=motor_calibrate&calibrate=vertical 50 | /api.cgi?action=motor_calibrate&calibrate=horizontal 51 | 52 | AUDIO SECTION 53 | VIDEO SECTION 54 | 55 | RETURN FRAME STREAM FROM v4l2rtspserver-master 56 | /api.cgi?action=get_snaphot&raw=0 57 | /api.cgi?action=get_snaphot&raw=1 58 | CUSTOM PARAM, COULD COMBINE 59 | /api.cgi?action=get_snaphot&nightvision=0 60 | /api.cgi?action=get_snaphot&nightvision=1 61 | /api.cgi?action=get_snaphot&flip=0 62 | /api.cgi?action=get_snaphot&flip=1 63 | /api.cgi?action=get_snaphot&width=1920&height=1080 64 | /api.cgi?action=get_snaphot&json=0 65 | /api.cgi?action=get_snaphot&json=1 66 | 67 | /api.cgi?action=check_light 68 | /api.cgi?action=xiaomi_start 69 | -------------------------------------------------------------------------------- /firmware_mod/bin/USBMissileLauncherUtils: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/USBMissileLauncherUtils -------------------------------------------------------------------------------- /firmware_mod/bin/audioplay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/audioplay -------------------------------------------------------------------------------- /firmware_mod/bin/avconv: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/avconv -------------------------------------------------------------------------------- /firmware_mod/bin/bftpd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/bftpd -------------------------------------------------------------------------------- /firmware_mod/bin/boa: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/boa -------------------------------------------------------------------------------- /firmware_mod/bin/boa_indexer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/boa_indexer -------------------------------------------------------------------------------- /firmware_mod/bin/busybox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/busybox -------------------------------------------------------------------------------- /firmware_mod/bin/curl: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | LD_LIBRARY_PATH='/thirdlib:/system/lib:/system/sdcard/lib' 3 | /system/sdcard/bin/curl.bin "$@" 4 | -------------------------------------------------------------------------------- /firmware_mod/bin/curl.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/curl.bin -------------------------------------------------------------------------------- /firmware_mod/bin/dropbearmulti: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/dropbearmulti -------------------------------------------------------------------------------- /firmware_mod/bin/gdbserver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/gdbserver -------------------------------------------------------------------------------- /firmware_mod/bin/getimage: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/getimage -------------------------------------------------------------------------------- /firmware_mod/bin/jq: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/jq -------------------------------------------------------------------------------- /firmware_mod/bin/mJpegStreamer: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/mJpegStreamer -------------------------------------------------------------------------------- /firmware_mod/bin/mime.types: -------------------------------------------------------------------------------- 1 | # This is a comment. I love comments. -*- indent-tabs-mode: t -*- 2 | 3 | # This file controls what Internet media types are sent to the client for 4 | # given file extension(s). Sending the correct media type to the client 5 | # is important so they know how to handle the content of the file. 6 | # Extra types can either be added here or by using an AddType directive 7 | # in your config files. For more information about Internet media types, 8 | # please read RFC 2045, 2046, 2047, 2048, and 2077. The Internet media type 9 | # registry is at . 10 | 11 | # IANA types 12 | 13 | # MIME type Extensions 14 | application/1d-interleaved-parityfec 15 | application/3gpp-ims+xml 16 | application/activemessage 17 | application/andrew-inset ez 18 | application/applefile 19 | application/atom+xml atom 20 | application/atomcat+xml atomcat 21 | application/atomdeleted+xml atomdeleted 22 | application/atomicmail 23 | application/atomsvc+xml atomsvc 24 | application/auth-policy+xml apxml 25 | application/batch-SMTP 26 | application/beep+xml 27 | application/calendar+xml xcs 28 | application/cals-1840 29 | application/ccmp+xml ccmp 30 | application/ccxml+xml ccxml 31 | application/cdmi-capability cdmia 32 | application/cdmi-container cdmic 33 | application/cdmi-domain cdmid 34 | application/cdmi-object cdmio 35 | application/cdmi-queue cdmiq 36 | application/cea-2018+xml 37 | application/cellml+xml cellml cml 38 | application/cfw 39 | application/cnrp+xml 40 | application/commonground 41 | application/conference-info+xml 42 | application/cpl+xml cpl 43 | application/csta+xml 44 | application/CSTAdata+xml 45 | application/cybercash 46 | application/davmount+xml davmount 47 | application/dca-rft 48 | application/dec-dx 49 | application/dialog-info+xml 50 | application/dicom dcm 51 | application/dns 52 | application/dskpp+xml xmls 53 | application/dssc+der dssc 54 | application/dssc+xml xdssc 55 | application/dvcs dvc 56 | application/ecmascript 57 | application/EDI-Consent 58 | application/EDI-X12 59 | application/EDIFACT 60 | application/emma+xml emma 61 | application/epp+xml 62 | application/eshop 63 | application/exi exi 64 | application/fastinfoset finf 65 | application/fastsoap 66 | application/fdt+xml fdt 67 | # fits, fit, fts: image/fits 68 | application/fits 69 | application/font-tdpfr pfr 70 | application/framework-attributes+xml 71 | application/gzip gz tgz 72 | application/H224 73 | application/hal+xml hal 74 | application/held+xml 75 | application/http 76 | application/hyperstudio stk 77 | application/ibe-key-request+xml 78 | application/ibe-pkg-reply+xml 79 | application/ibe-pp-data 80 | application/iges 81 | application/im-iscomposing+xml 82 | application/index 83 | application/index.cmd 84 | application/index.obj 85 | application/index.response 86 | application/index.vnd 87 | application/inkml+xml ink inkml 88 | application/iotp 89 | application/ipfix ipfix 90 | application/ipp 91 | application/isup 92 | application/javascript js 93 | application/json json 94 | application/kpml-request+xml 95 | application/kpml-response+xml 96 | application/link-format wlnk 97 | application/lost+xml lostxml 98 | application/lostsync+xml lostsyncxml 99 | application/mac-binhex40 hqx 100 | application/macwriteii 101 | application/mads+xml mads 102 | application/marc mrc 103 | application/marcxml+xml mrcx 104 | application/mathematica nb ma mb 105 | application/mathml-content+xml 106 | application/mathml-presentation+xml 107 | application/mathml+xml mml 108 | application/mbms-associated-procedure-description+xml 109 | application/mbms-deregister+xml 110 | application/mbms-envelope+xml 111 | application/mbms-msk-response+xml 112 | application/mbms-msk+xml 113 | application/mbms-protection-description+xml 114 | application/mbms-reception-report+xml 115 | application/mbms-register-response+xml 116 | application/mbms-register+xml 117 | application/mbms-user-service-description+xml 118 | application/mbox mbox 119 | application/media_control+xml 120 | application/mediaservercontrol+xml 121 | application/metalink4+xml meta4 122 | application/mets+xml mets 123 | application/mikey 124 | application/mods+xml mods 125 | application/moss-keys 126 | application/moss-signature 127 | application/mosskey-data 128 | application/mosskey-request 129 | application/mp21 m21 mp21 130 | # mp4, mpg4: video/mp4, see RFC 4337 131 | application/mp4 132 | application/mpeg4-generic 133 | application/mpeg4-iod 134 | application/mpeg4-iod-xmt 135 | application/msc-ivr+xml 136 | application/msc-mixer+xml 137 | application/msword doc 138 | application/mxf mxf 139 | application/nasdata 140 | application/news-checkgroups 141 | application/news-groupinfo 142 | application/news-transmission 143 | application/nss 144 | application/ocsp-request orq 145 | application/ocsp-response ors 146 | application/octet-stream bin lha lzh exe class so dll img iso 147 | application/oda oda 148 | application/oebps-package+xml opf 149 | application/ogg ogx 150 | application/oxps oxps 151 | application/parityfec 152 | # xer: application/xcap-error+xml 153 | application/patch-ops-error+xml 154 | application/pdf pdf 155 | application/pgp-encrypted 156 | application/pgp-keys 157 | application/pgp-signature sig 158 | application/pidf-diff+xml 159 | application/pidf+xml 160 | application/pkcs10 p10 161 | application/pkcs7-mime p7m p7c 162 | application/pkcs7-signature p7s 163 | application/pkcs8 p8 164 | # ac: application/vnd.nokia.n-gage.ac+xml 165 | application/pkix-attr-cert 166 | application/pkix-cert cer 167 | application/pkix-crl crl 168 | application/pkix-pkipath pkipath 169 | application/pkixcmp 170 | application/pls+xml pls 171 | application/poc-settings+xml 172 | application/postscript ps eps ai 173 | application/prs.alvestrand.titrax-sheet 174 | application/prs.cww cw cww 175 | application/prs.nprend rnd rct 176 | application/prs.plucker 177 | application/prs.rdf-xml-crypt rdf-crypt 178 | application/prs.xsf+xml xsf 179 | application/pskc+xml pskcxml 180 | application/qsig 181 | application/raptorfec 182 | application/rdf+xml rdf 183 | application/reginfo+xml rif 184 | application/relax-ng-compact-syntax rnc 185 | application/remote-printing 186 | application/resource-lists-diff+xml rld 187 | application/resource-lists+xml rl 188 | application/riscos 189 | application/rlmi+xml 190 | application/rls-services+xml rs 191 | application/rpki-ghostbusters gbr 192 | application/rpki-manifest mft 193 | application/rpki-roa roa 194 | application/rpki-updown 195 | application/rtf rtf 196 | application/rtx 197 | application/samlassertion+xml 198 | application/samlmetadata+xml 199 | application/sbml+xml 200 | application/scvp-cv-request scq 201 | application/scvp-cv-response scs 202 | application/scvp-vp-request spq 203 | application/scvp-vp-response spp 204 | application/sdp sdp 205 | application/set-payment 206 | application/set-payment-initiation 207 | application/set-registration 208 | application/set-registration-initiation 209 | application/sgml 210 | application/sgml-open-catalog soc 211 | application/shf+xml shf 212 | application/sieve siv sieve 213 | application/simple-filter+xml cl 214 | application/simple-message-summary 215 | application/simpleSymbolContainer 216 | application/slate 217 | # obsoleted by application/smil+xml 218 | application/smil smil smi sml 219 | # smil, smi: application/smil for now 220 | application/smil+xml 221 | application/smpte336m 222 | application/soap+fastinfoset 223 | application/soap+xml 224 | application/sparql-query rq 225 | application/sparql-results+xml srx 226 | application/spirits-event+xml 227 | application/srgs gram 228 | application/srgs+xml grxml 229 | application/sru+xml sru 230 | application/ssml+xml ssml 231 | application/tamp-apex-update tau 232 | application/tamp-apex-update-confirm auc 233 | application/tamp-community-update tcu 234 | application/tamp-community-update-confirm cuc 235 | application/tamp-error ter 236 | application/tamp-sequence-adjust tsa 237 | application/tamp-sequence-adjust-confirm sac 238 | # tsq: application/timestamp-query 239 | application/tamp-status-query 240 | # tsr: application/timestamp-reply 241 | application/tamp-status-response 242 | application/tamp-update tur 243 | application/tamp-update-confirm tuc 244 | application/tei+xml tei teiCorpus odd 245 | application/thraud+xml tfi 246 | application/timestamp-query tsq 247 | application/timestamp-reply tsr 248 | application/timestamped-data tsd 249 | application/tve-trigger 250 | application/ulpfec 251 | application/vcard+xml 252 | application/vemmi 253 | application/vnd.3gpp.bsf+xml 254 | application/vnd.3gpp.pic-bw-large plb 255 | application/vnd.3gpp.pic-bw-small psb 256 | application/vnd.3gpp.pic-bw-var pvb 257 | # sms: application/vnd.3gpp2.sms 258 | application/vnd.3gpp.sms 259 | application/vnd.3gpp2.bcmcsinfo+xml 260 | application/vnd.3gpp2.sms sms 261 | application/vnd.3gpp2.tcap tcap 262 | application/vnd.3M.Post-it-Notes pwn 263 | application/vnd.accpac.simply.aso aso 264 | application/vnd.accpac.simply.imp imp 265 | application/vnd.acucobol acu 266 | application/vnd.acucorp atc acutc 267 | application/vnd.adobe.formscentral.fcdt fcdt 268 | application/vnd.adobe.fxp fxp fxpl 269 | application/vnd.adobe.partial-upload 270 | application/vnd.adobe.xdp+xml xdp 271 | application/vnd.adobe.xfdf xfdf 272 | application/vnd.aether.imp 273 | application/vnd.ah-barcode 274 | application/vnd.ahead.space ahead 275 | application/vnd.airzip.filesecure.azf azf 276 | application/vnd.airzip.filesecure.azs azs 277 | application/vnd.americandynamics.acc acc 278 | application/vnd.amiga.ami ami 279 | application/vnd.amundsen.maze+xml 280 | application/vnd.anser-web-certificate-issue-initiation cii 281 | # Not in IANA listing, but is on FTP site? 282 | application/vnd.anser-web-funds-transfer-initiation fti 283 | # atx: audio/ATRAC-X 284 | application/vnd.antix.game-component 285 | application/vnd.apple.installer+xml dist distz pkg mpkg 286 | # m3u: application/x-mpegurl for now 287 | application/vnd.apple.mpegurl m3u8 288 | application/vnd.aristanetworks.swi swi 289 | application/vnd.astraea-software.iota iota 290 | application/vnd.audiograph aep 291 | application/vnd.autopackage package 292 | application/vnd.avistar+xml 293 | application/vnd.balsamiq.bmml+xml bmml 294 | application/vnd.blueice.multipass mpm 295 | application/vnd.bluetooth.ep.oob ep 296 | application/vnd.bmi bmi 297 | application/vnd.businessobjects rep 298 | application/vnd.cab-jscript 299 | application/vnd.canon-cpdl 300 | application/vnd.canon-lips 301 | application/vnd.cendio.thinlinc.clientconf tlclient 302 | application/vnd.century-systems.tcp_stream 303 | application/vnd.chemdraw+xml cdxml 304 | application/vnd.chipnuts.karaoke-mmd mmd 305 | application/vnd.cinderella cdy 306 | application/vnd.cirpack.isdn-ext 307 | application/vnd.claymore cla 308 | application/vnd.cloanto.rp9 rp9 309 | application/vnd.clonk.c4group c4g c4d c4f c4p c4u 310 | application/vnd.cluetrust.cartomobile-config c11amc 311 | application/vnd.cluetrust.cartomobile-config-pkg c11amz 312 | application/vnd.collection+json 313 | application/vnd.collection.next+json 314 | # icc: application/vnd.iccprofile 315 | application/vnd.commerce-battelle ica icf icd ic0 ic1 ic2 ic3 ic4 ic5 ic6 ic7 ic8 316 | application/vnd.commonspace csp cst 317 | application/vnd.contact.cmsg cdbcmsg 318 | application/vnd.cosmocaller cmc 319 | application/vnd.crick.clicker clkx 320 | application/vnd.crick.clicker.keyboard clkk 321 | application/vnd.crick.clicker.palette clkp 322 | application/vnd.crick.clicker.template clkt 323 | application/vnd.crick.clicker.wordbank clkw 324 | application/vnd.criticaltools.wbs+xml wbs 325 | application/vnd.ctc-posml pml 326 | application/vnd.ctct.ws+xml 327 | application/vnd.cups-pdf 328 | application/vnd.cups-postscript 329 | application/vnd.cups-ppd ppd 330 | application/vnd.cups-raster 331 | application/vnd.cups-raw 332 | application/vnd.curl curl 333 | application/vnd.cybank 334 | application/vnd.dart dart 335 | application/vnd.data-vision.rdz rdz 336 | application/vnd.dece.data uvf uvvf uvd uvvd 337 | application/vnd.dece.ttml+xml uvt uvvt 338 | application/vnd.dece.unspecified uvx uvvx 339 | application/vnd.dece.zip uvz uvvz 340 | application/vnd.denovo.fcselayout-link fe_launch 341 | application/vnd.dir-bi.plate-dl-nosuffix 342 | application/vnd.dm.delegation+xml 343 | application/vnd.dna dna 344 | application/vnd.dolby.mobile.1 345 | application/vnd.dolby.mobile.2 346 | application/vnd.dpgraph dpg mwc dpgraph 347 | application/vnd.dreamfactory dfac 348 | application/vnd.dtg.local 349 | application/vnd.dtg.local.flash fla 350 | application/vnd.dtg.local.html 351 | application/vnd.dvb.ait ait 352 | # class: application/octet-stream 353 | application/vnd.dvb.dvbj 354 | application/vnd.dvb.esgcontainer 355 | application/vnd.dvb.ipdcdftnotifaccess 356 | application/vnd.dvb.ipdcesgaccess 357 | application/vnd.dvb.ipdcesgaccess2 358 | application/vnd.dvb.ipdcesgpdd 359 | application/vnd.dvb.ipdcroaming 360 | application/vnd.dvb.iptv.alfec-base 361 | application/vnd.dvb.iptv.alfec-enhancement 362 | application/vnd.dvb.notif-aggregate-root+xml 363 | application/vnd.dvb.notif-container+xml 364 | application/vnd.dvb.notif-generic+xml 365 | application/vnd.dvb.notif-ia-msglist+xml 366 | application/vnd.dvb.notif-ia-registration-request+xml 367 | application/vnd.dvb.notif-ia-registration-response+xml 368 | application/vnd.dvb.notif-init+xml 369 | # pfr: application/font-tdpfr 370 | application/vnd.dvb.pfr 371 | application/vnd.dvb.service svc 372 | # dxr: application/x-director 373 | application/vnd.dxr 374 | application/vnd.dynageo geo 375 | application/vnd.easykaraoke.cdgdownload 376 | application/vnd.ecdis-update 377 | application/vnd.ecowin.chart mag 378 | application/vnd.ecowin.filerequest 379 | application/vnd.ecowin.fileupdate 380 | application/vnd.ecowin.series 381 | application/vnd.ecowin.seriesrequest 382 | application/vnd.ecowin.seriesupdate 383 | application/vnd.enliven nml 384 | application/vnd.eprints.data+xml 385 | application/vnd.epson.esf esf 386 | application/vnd.epson.msf msf 387 | application/vnd.epson.quickanime qam 388 | application/vnd.epson.salt slt 389 | application/vnd.epson.ssf ssf 390 | application/vnd.ericsson.quickcall qcall qca 391 | application/vnd.eszigno3+xml es3 et3 392 | application/vnd.etsi.aoc+xml 393 | application/vnd.etsi.cug+xml 394 | application/vnd.etsi.iptvcommand+xml 395 | application/vnd.etsi.iptvdiscovery+xml 396 | application/vnd.etsi.iptvprofile+xml 397 | application/vnd.etsi.iptvsad-bc+xml 398 | application/vnd.etsi.iptvsad-cod+xml 399 | application/vnd.etsi.iptvsad-npvr+xml 400 | application/vnd.etsi.iptvservice+xml 401 | application/vnd.etsi.iptvsync+xml 402 | application/vnd.etsi.iptvueprofile+xml 403 | application/vnd.etsi.mcid+xml 404 | application/vnd.etsi.overload-control-policy-dataset+xml 405 | application/vnd.etsi.sci+xml 406 | application/vnd.etsi.simservs+xml 407 | application/vnd.etsi.tsl.der 408 | application/vnd.etsi.tsl+xml 409 | application/vnd.eudora.data 410 | application/vnd.ezpix-album ez2 411 | application/vnd.ezpix-package ez3 412 | application/vnd.f-secure.mobile 413 | application/vnd.fdf fdf 414 | application/vnd.fdsn.mseed msd mseed 415 | application/vnd.fdsn.seed seed dataless 416 | application/vnd.ffsns 417 | # all extensions: application/vnd.hbci 418 | application/vnd.fints 419 | application/vnd.FloGraphIt gph 420 | application/vnd.fluxtime.clip ftc 421 | application/vnd.font-fontforge-sfd sfd 422 | application/vnd.framemaker fm 423 | application/vnd.frogans.fnc fnc 424 | application/vnd.frogans.ltf ltf 425 | application/vnd.fsc.weblaunch fsc 426 | application/vnd.fujitsu.oasys oas 427 | application/vnd.fujitsu.oasys2 oa2 428 | application/vnd.fujitsu.oasys3 oa3 429 | application/vnd.fujitsu.oasysgp fg5 430 | application/vnd.fujitsu.oasysprs bh2 431 | application/vnd.fujixerox.ART-EX 432 | application/vnd.fujixerox.ART4 433 | application/vnd.fujixerox.ddd ddd 434 | application/vnd.fujixerox.docuworks xdw 435 | application/vnd.fujixerox.docuworks.binder xbd 436 | application/vnd.fujixerox.HBPL 437 | application/vnd.fut-misnet 438 | application/vnd.fuzzysheet fzs 439 | application/vnd.genomatix.tuxedo txd 440 | application/vnd.geocube+xml g3 g³ 441 | application/vnd.geogebra.file ggb 442 | application/vnd.geogebra.tool ggt 443 | application/vnd.geometry-explorer gex gre 444 | application/vnd.geonext gxt 445 | application/vnd.geoplan g2w 446 | application/vnd.geospace g3w 447 | application/vnd.globalplatform.card-content-mgt 448 | application/vnd.globalplatform.card-content-mgt-response 449 | # application/vnd.gmx deprecated 2009-03-04 450 | application/vnd.google-earth.kml+xml kml 451 | application/vnd.google-earth.kmz kmz 452 | application/vnd.grafeq gqf gqs 453 | application/vnd.gridmp 454 | application/vnd.groove-account gac 455 | application/vnd.groove-help ghf 456 | application/vnd.groove-identity-message gim 457 | application/vnd.groove-injector grv 458 | application/vnd.groove-tool-message gtm 459 | application/vnd.groove-tool-template tpl 460 | application/vnd.groove-vcard vcg 461 | application/vnd.hal+json 462 | application/vnd.HandHeld-Entertainment+xml zmm 463 | application/vnd.hbci hbci hbc kom upa pkd bpd 464 | # rep: application/vnd.businessobjects 465 | application/vnd.hcl-bireports 466 | application/vnd.hhe.lesson-player les 467 | application/vnd.hp-HPGL hpgl 468 | application/vnd.hp-hpid hpi hpid 469 | application/vnd.hp-hps hps 470 | application/vnd.hp-jlyt jlt 471 | application/vnd.hp-PCL pcl 472 | application/vnd.hp-PCLXL 473 | application/vnd.httphone 474 | application/vnd.hydrostatix.sof-data sfd-hdstx 475 | application/vnd.hzn-3d-crossword x3d 476 | application/vnd.ibm.afplinedata 477 | application/vnd.ibm.electronic-media emm 478 | application/vnd.ibm.MiniPay mpy 479 | application/vnd.ibm.modcap list3820 listafp afp pseg3820 480 | application/vnd.ibm.rights-management irm 481 | application/vnd.ibm.secure-container sc 482 | application/vnd.iccprofile icc icm 483 | application/vnd.ieee.1905 1905.1 484 | application/vnd.igloader igl 485 | application/vnd.immervision-ivp ivp 486 | application/vnd.immervision-ivu ivu 487 | application/vnd.informedcontrol.rms+xml 488 | # application/vnd.informix-visionary obsoleted by application/vnd.visionary 489 | application/vnd.infotech.project 490 | application/vnd.infotech.project+xml 491 | application/vnd.innopath.wamp.notification 492 | application/vnd.insors.igm igm 493 | application/vnd.intercon.formnet xpw xpx 494 | application/vnd.intergeo i2g 495 | application/vnd.intertrust.digibox 496 | application/vnd.intertrust.nncp 497 | application/vnd.intu.qbo qbo 498 | application/vnd.intu.qfx qfx 499 | application/vnd.iptc.g2.conceptitem+xml 500 | application/vnd.iptc.g2.knowledgeitem+xml 501 | application/vnd.iptc.g2.newsitem+xml 502 | application/vnd.iptc.g2.newsmessage+xml 503 | application/vnd.iptc.g2.packageitem+xml 504 | application/vnd.iptc.g2.planningitem+xml 505 | application/vnd.ipunplugged.rcprofile rcprofile 506 | application/vnd.irepository.package+xml irp 507 | application/vnd.is-xpr xpr 508 | application/vnd.isac.fcs fcs 509 | application/vnd.jam jam 510 | application/vnd.japannet-directory-service 511 | application/vnd.japannet-jpnstore-wakeup 512 | application/vnd.japannet-payment-wakeup 513 | application/vnd.japannet-registration 514 | application/vnd.japannet-registration-wakeup 515 | application/vnd.japannet-setstore-wakeup 516 | application/vnd.japannet-verification 517 | application/vnd.japannet-verification-wakeup 518 | application/vnd.jcp.javame.midlet-rms rms 519 | application/vnd.jisp jisp 520 | application/vnd.joost.joda-archive joda 521 | application/vnd.jsk.isdn-ngn 522 | application/vnd.kahootz ktz ktr 523 | application/vnd.kde.karbon karbon 524 | application/vnd.kde.kchart chrt 525 | application/vnd.kde.kformula kfo 526 | application/vnd.kde.kivio flw 527 | application/vnd.kde.kontour kon 528 | application/vnd.kde.kpresenter kpr kpt 529 | application/vnd.kde.kspread ksp 530 | application/vnd.kde.kword kwd kwt 531 | application/vnd.kenameaapp htke 532 | application/vnd.kidspiration kia 533 | application/vnd.Kinar kne knp sdf 534 | application/vnd.koan skp skd skm skt 535 | application/vnd.kodak-descriptor sse 536 | application/vnd.las.las+xml lasxml 537 | application/vnd.liberty-request+xml 538 | application/vnd.llamagraphics.life-balance.desktop lbd 539 | application/vnd.llamagraphics.life-balance.exchange+xml lbe 540 | application/vnd.lotus-1-2-3 123 wk4 wk3 wk1 541 | application/vnd.lotus-approach apr vew 542 | application/vnd.lotus-freelance prz pre 543 | application/vnd.lotus-notes nsf ntf ndl ns4 ns3 ns2 nsh nsg 544 | application/vnd.lotus-organizer or3 or2 org 545 | application/vnd.lotus-screencam scm 546 | application/vnd.lotus-wordpro lwp sam 547 | application/vnd.macports.portpkg portpkg 548 | application/vnd.marlin.drm.actiontoken+xml 549 | application/vnd.marlin.drm.conftoken+xml 550 | application/vnd.marlin.drm.license+xml 551 | application/vnd.marlin.drm.mdcf mdc 552 | application/vnd.mcd mcd 553 | application/vnd.medcalcdata mc1 554 | application/vnd.mediastation.cdkey cdkey 555 | application/vnd.meridian-slingshot 556 | application/vnd.MFER mwf 557 | application/vnd.mfmp mfm 558 | application/vnd.micrografx.flo flo 559 | application/vnd.micrografx.igx igx 560 | application/vnd.mif mif 561 | application/vnd.minisoft-hp3000-save 562 | application/vnd.mitsubishi.misty-guard.trustweb 563 | application/vnd.Mobius.DAF daf 564 | application/vnd.Mobius.DIS dis 565 | application/vnd.Mobius.MBK mbk 566 | application/vnd.Mobius.MQY mqy 567 | application/vnd.Mobius.MSL msl 568 | application/vnd.Mobius.PLC plc 569 | application/vnd.Mobius.TXF txf 570 | application/vnd.mophun.application mpn 571 | application/vnd.mophun.certificate mpc 572 | application/vnd.motorola.flexsuite 573 | application/vnd.motorola.flexsuite.adsi 574 | application/vnd.motorola.flexsuite.fis 575 | application/vnd.motorola.flexsuite.gotap 576 | application/vnd.motorola.flexsuite.kmr 577 | application/vnd.motorola.flexsuite.ttc 578 | application/vnd.motorola.flexsuite.wem 579 | application/vnd.motorola.iprm 580 | application/vnd.mozilla.xul+xml xul 581 | application/vnd.ms-artgalry cil 582 | application/vnd.ms-asf asf 583 | application/vnd.ms-cab-compressed cab 584 | application/vnd.ms-excel xls 585 | application/vnd.ms-excel.template.macroEnabled.12 xltm 586 | application/vnd.ms-excel.addin.macroEnabled.12 xlam 587 | application/vnd.ms-excel.sheet.binary.macroEnabled.12 xlsb 588 | application/vnd.ms-excel.sheet.macroEnabled.12 xlsm 589 | application/vnd.ms-fontobject eot 590 | application/vnd.ms-htmlhelp chm 591 | application/vnd.ms-ims ims 592 | application/vnd.ms-lrm lrm 593 | application/vnd.ms-office.activeX+xml 594 | application/vnd.ms-officetheme thmx 595 | application/vnd.ms-playready.initiator+xml 596 | application/vnd.ms-powerpoint ppt 597 | application/vnd.ms-powerpoint.addin.macroEnabled.12 ppam 598 | application/vnd.ms-powerpoint.presentation.macroEnabled.12 pptm 599 | application/vnd.ms-powerpoint.slide.macroEnabled.12 sldm 600 | application/vnd.ms-powerpoint.slideshow.macroEnabled.12 ppsm 601 | application/vnd.ms-powerpoint.template.macroEnabled.12 potm 602 | application/vnd.ms-project mpp 603 | application/vnd.ms-tnef tnef tnf 604 | application/vnd.ms-wmdrm.lic-chlg-req 605 | application/vnd.ms-wmdrm.lic-resp 606 | application/vnd.ms-wmdrm.meter-chlg-req 607 | application/vnd.ms-wmdrm.meter-resp 608 | application/vnd.ms-word.document.macroEnabled.12 docm 609 | application/vnd.ms-word.template.macroEnabled.12 dotm 610 | application/vnd.ms-works wcm wdb wks wps 611 | application/vnd.ms-wpl wpl 612 | application/vnd.ms-xpsdocument xps 613 | application/vnd.mseq mseq 614 | application/vnd.msign 615 | application/vnd.multiad.creator crtr 616 | application/vnd.multiad.creator.cif cif 617 | application/vnd.music-niff 618 | application/vnd.musician mus 619 | application/vnd.muvee.style msty 620 | application/vnd.mynfc taglet 621 | application/vnd.ncd.control 622 | application/vnd.ncd.reference 623 | application/vnd.nervana entity request bkm kcm 624 | application/vnd.netfpx 625 | # ntf: application/vnd.lotus-notes 626 | application/vnd.nitf nitf 627 | application/vnd.neurolanguage.nlu nlu 628 | application/vnd.noblenet-directory nnd 629 | application/vnd.noblenet-sealer nns 630 | application/vnd.noblenet-web nnw 631 | application/vnd.nokia.catalogs 632 | application/vnd.nokia.conml+wbxml 633 | application/vnd.nokia.conml+xml 634 | application/vnd.nokia.iptv.config+xml 635 | application/vnd.nokia.iSDS-radio-presets 636 | application/vnd.nokia.landmark+wbxml 637 | application/vnd.nokia.landmark+xml 638 | application/vnd.nokia.landmarkcollection+xml 639 | application/vnd.nokia.n-gage.ac+xml ac 640 | application/vnd.nokia.n-gage.data ngdat 641 | application/vnd.nokia.n-gage.symbian.install n-gage 642 | application/vnd.nokia.ncd 643 | application/vnd.nokia.pcd+wbxml 644 | application/vnd.nokia.pcd+xml 645 | application/vnd.nokia.radio-preset rpst 646 | application/vnd.nokia.radio-presets rpss 647 | application/vnd.novadigm.EDM edm 648 | application/vnd.novadigm.EDX edx 649 | application/vnd.novadigm.EXT ext 650 | application/vnd.ntt-local.content-share 651 | application/vnd.ntt-local.file-transfer 652 | application/vnd.ntt-local.sip-ta_remote 653 | application/vnd.ntt-local.sip-ta_tcp_stream 654 | application/vnd.oasis.opendocument.chart odc 655 | application/vnd.oasis.opendocument.chart-template otc 656 | application/vnd.oasis.opendocument.database odb 657 | application/vnd.oasis.opendocument.formula odf 658 | application/vnd.oasis.opendocument.formula-template otf 659 | application/vnd.oasis.opendocument.graphics odg 660 | application/vnd.oasis.opendocument.graphics-template otg 661 | application/vnd.oasis.opendocument.image odi 662 | application/vnd.oasis.opendocument.image-template oti 663 | application/vnd.oasis.opendocument.presentation odp 664 | application/vnd.oasis.opendocument.presentation-template otp 665 | application/vnd.oasis.opendocument.spreadsheet ods 666 | application/vnd.oasis.opendocument.spreadsheet-template ots 667 | application/vnd.oasis.opendocument.text odt 668 | application/vnd.oasis.opendocument.text-master odm 669 | application/vnd.oasis.opendocument.text-template ott 670 | application/vnd.oasis.opendocument.text-web oth 671 | application/vnd.obn 672 | application/vnd.oftn.l10n+json 673 | application/vnd.oipf.contentaccessdownload+xml 674 | application/vnd.oipf.contentaccessstreaming+xml 675 | application/vnd.oipf.cspg-hexbinary 676 | application/vnd.oipf.dae.svg+xml 677 | application/vnd.oipf.dae.xhtml+xml 678 | application/vnd.oipf.mippvcontrolmessage+xml 679 | application/vnd.oipf.pae.gem 680 | application/vnd.oipf.spdiscovery+xml 681 | application/vnd.oipf.spdlist+xml 682 | application/vnd.oipf.ueprofile+xml 683 | application/vnd.olpc-sugar xo 684 | application/vnd.oma.bcast.associated-procedure-parameter+xml 685 | application/vnd.oma.bcast.drm-trigger+xml 686 | application/vnd.oma.bcast.imd+xml 687 | application/vnd.oma.bcast.ltkm 688 | application/vnd.oma.bcast.notification+xml 689 | application/vnd.oma.bcast.provisioningtrigger 690 | application/vnd.oma.bcast.sgboot 691 | application/vnd.oma.bcast.sgdd+xml 692 | application/vnd.oma.bcast.sgdu 693 | application/vnd.oma.bcast.simple-symbol-container 694 | application/vnd.oma.bcast.smartcard-trigger+xml 695 | application/vnd.oma.bcast.sprov+xml 696 | application/vnd.oma.bcast.stkm 697 | application/vnd.oma.cab-address-book+xml 698 | application/vnd.oma.cab-feature-handler+xml 699 | application/vnd.oma.cab-pcc+xml 700 | application/vnd.oma.cab-user-prefs+xml 701 | application/vnd.oma.dcd 702 | application/vnd.oma.dcdc 703 | application/vnd.oma.dd2+xml dd2 704 | application/vnd.oma.drm.risd+xml 705 | application/vnd.oma.group-usage-list+xml 706 | application/vnd.oma.pal+xml 707 | application/vnd.oma.poc.detailed-progress-report+xml 708 | application/vnd.oma.poc.final-report+xml 709 | application/vnd.oma.poc.groups+xml 710 | application/vnd.oma.poc.invocation-descriptor+xml 711 | application/vnd.oma.poc.optimized-progress-report+xml 712 | application/vnd.oma.push 713 | application/vnd.oma.scidm.messages+xml 714 | application/vnd.oma.xcap-directory+xml 715 | application/vnd.oma-scws-config 716 | application/vnd.oma-scws-http-request 717 | application/vnd.oma-scws-http-response 718 | application/vnd.omads-email+xml 719 | application/vnd.omads-file+xml 720 | application/vnd.omads-folder+xml 721 | application/vnd.omaloc-supl-init 722 | application/vnd.openofficeorg.extension oxt 723 | application/vnd.openxmlformats-officedocument.custom-properties+xml 724 | application/vnd.openxmlformats-officedocument.customXmlProperties+xml 725 | application/vnd.openxmlformats-officedocument.drawing+xml 726 | application/vnd.openxmlformats-officedocument.drawingml.chart+xml 727 | application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml 728 | application/vnd.openxmlformats-officedocument.drawingml.diagramColors+xml 729 | application/vnd.openxmlformats-officedocument.drawingml.diagramData+xml 730 | application/vnd.openxmlformats-officedocument.drawingml.diagramLayout+xml 731 | application/vnd.openxmlformats-officedocument.drawingml.diagramStyle+xml 732 | application/vnd.openxmlformats-officedocument.extended-properties+xml 733 | application/vnd.openxmlformats-officedocument.presentationml.commentAuthors+xml 734 | application/vnd.openxmlformats-officedocument.presentationml.comments+xml 735 | application/vnd.openxmlformats-officedocument.presentationml.handoutMaster+xml 736 | application/vnd.openxmlformats-officedocument.presentationml.notesMaster+xml 737 | application/vnd.openxmlformats-officedocument.presentationml.notesSlide+xml 738 | application/vnd.openxmlformats-officedocument.presentationml.presProps+xml 739 | application/vnd.openxmlformats-officedocument.presentationml.presentation pptx 740 | application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml 741 | application/vnd.openxmlformats-officedocument.presentationml.slide sldx 742 | application/vnd.openxmlformats-officedocument.presentationml.slide+xml 743 | application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml 744 | application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml 745 | application/vnd.openxmlformats-officedocument.presentationml.slideUpdateInfo+xml 746 | application/vnd.openxmlformats-officedocument.presentationml.slideshow ppsx 747 | application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml 748 | application/vnd.openxmlformats-officedocument.presentationml.tableStyles+xml 749 | application/vnd.openxmlformats-officedocument.presentationml.tags+xml 750 | application/vnd.openxmlformats-officedocument.presentationml.template potx 751 | application/vnd.openxmlformats-officedocument.presentationml.template.main+xml 752 | application/vnd.openxmlformats-officedocument.presentationml.viewProps+xml 753 | application/vnd.openxmlformats-officedocument.spreadsheetml.calcChain+xml 754 | application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml 755 | application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml 756 | application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml 757 | application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml 758 | application/vnd.openxmlformats-officedocument.spreadsheetml.externalLink+xml 759 | application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheDefinition+xml 760 | application/vnd.openxmlformats-officedocument.spreadsheetml.pivotCacheRecords+xml 761 | application/vnd.openxmlformats-officedocument.spreadsheetml.pivotTable+xml 762 | application/vnd.openxmlformats-officedocument.spreadsheetml.queryTable+xml 763 | application/vnd.openxmlformats-officedocument.spreadsheetml.revisionHeaders+xml 764 | application/vnd.openxmlformats-officedocument.spreadsheetml.revisionLog+xml 765 | application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml 766 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet xlsx 767 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml 768 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheetMetadata+xml 769 | application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml 770 | application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml 771 | application/vnd.openxmlformats-officedocument.spreadsheetml.tableSingleCells+xml 772 | application/vnd.openxmlformats-officedocument.spreadsheetml.template xltx 773 | application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml 774 | application/vnd.openxmlformats-officedocument.spreadsheetml.userNames+xml 775 | application/vnd.openxmlformats-officedocument.spreadsheetml.volatileDependencies+xml 776 | application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml 777 | application/vnd.openxmlformats-officedocument.theme+xml 778 | application/vnd.openxmlformats-officedocument.themeOverride+xml 779 | application/vnd.openxmlformats-officedocument.vmlDrawing 780 | application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml 781 | application/vnd.openxmlformats-officedocument.wordprocessingml.document docx 782 | application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml 783 | application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml 784 | application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml 785 | application/vnd.openxmlformats-officedocument.wordprocessingml.fontTable+xml 786 | application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml 787 | application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml 788 | application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml 789 | application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml 790 | application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml 791 | application/vnd.openxmlformats-officedocument.wordprocessingml.template dotx 792 | application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml 793 | application/vnd.openxmlformats-officedocument.wordprocessingml.webSettings+xml 794 | application/vnd.openxmlformats-package.core-properties+xml 795 | application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml 796 | application/vnd.openxmlformats-package.relationships+xml 797 | application/vnd.orange.indata 798 | application/vnd.osa.netdeploy ndc 799 | application/vnd.osgeo.mapguide.package mgp 800 | # jar: application/x-java-archive 801 | application/vnd.osgi.bundle 802 | application/vnd.osgi.dp dp 803 | application/vnd.osgi.subsystem esa 804 | application/vnd.otps.ct-kip+xml 805 | application/vnd.palm prc pdb pqa oprc 806 | application/vnd.paos+xml 807 | application/vnd.pawaafile paw 808 | application/vnd.pg.format str 809 | application/vnd.pg.osasli ei6 810 | application/vnd.piaccess.application-license pil 811 | application/vnd.picsel efif 812 | application/vnd.pmi.widget wg 813 | application/vnd.poc.group-advertisement+xml 814 | application/vnd.pocketlearn plf 815 | application/vnd.powerbuilder6 pbd 816 | application/vnd.powerbuilder6-s 817 | application/vnd.powerbuilder7 818 | application/vnd.powerbuilder7-s 819 | application/vnd.powerbuilder75 820 | application/vnd.powerbuilder75-s 821 | application/vnd.preminet preminet 822 | application/vnd.previewsystems.box box vbox 823 | application/vnd.proteus.magazine mgz 824 | application/vnd.publishare-delta-tree qps 825 | # pti: image/prs.pti 826 | application/vnd.pvi.ptid1 ptid 827 | application/vnd.pwg-multiplexed 828 | application/vnd.pwg-xhtml-print+xml 829 | application/vnd.qualcomm.brew-app-res bar 830 | application/vnd.Quark.QuarkXPress qxd qxt qwd qwt qxl qxb 831 | application/vnd.quobject-quoxdocument quox quiz 832 | application/vnd.radisys.moml+xml 833 | application/vnd.radisys.msml-audit-conf+xml 834 | application/vnd.radisys.msml-audit-conn+xml 835 | application/vnd.radisys.msml-audit-dialog+xml 836 | application/vnd.radisys.msml-audit-stream+xml 837 | application/vnd.radisys.msml-audit+xml 838 | application/vnd.radisys.msml-conf+xml 839 | application/vnd.radisys.msml-dialog-base+xml 840 | application/vnd.radisys.msml-dialog-fax-detect+xml 841 | application/vnd.radisys.msml-dialog-fax-sendrecv+xml 842 | application/vnd.radisys.msml-dialog-group+xml 843 | application/vnd.radisys.msml-dialog-speech+xml 844 | application/vnd.radisys.msml-dialog-transform+xml 845 | application/vnd.radisys.msml-dialog+xml 846 | application/vnd.radisys.msml+xml 847 | application/vnd.rainstor.data tree 848 | application/vnd.rapid 849 | application/vnd.realvnc.bed bed 850 | application/vnd.recordare.musicxml mxl 851 | application/vnd.recordare.musicxml+xml 852 | application/vnd.RenLearn.rlprint 853 | application/vnd.rig.cryptonote cryptonote 854 | application/vnd.route66.link66+xml link66 855 | # gbr: application/rpki-ghostbusters 856 | application/vnd.rs-274x 857 | application/vnd.ruckus.download 858 | application/vnd.s3sms 859 | application/vnd.sailingtracker.track st 860 | application/vnd.sbm.cid 861 | application/vnd.sbm.mid2 862 | application/vnd.scribus scd sla slaz 863 | application/vnd.sealed.3df s3df 864 | application/vnd.sealed.csf scsf 865 | application/vnd.sealed.doc sdoc sdo s1w 866 | application/vnd.sealed.eml seml sem 867 | application/vnd.sealed.mht smht smh 868 | application/vnd.sealed.net 869 | # spp: application/scvp-vp-response 870 | application/vnd.sealed.ppt sppt s1p 871 | application/vnd.sealed.tiff stif 872 | application/vnd.sealed.xls sxls sxl s1e 873 | # stm: audio/x-stm 874 | application/vnd.sealedmedia.softseal.html stml s1h 875 | application/vnd.sealedmedia.softseal.pdf spdf spd s1a 876 | application/vnd.seemail see 877 | application/vnd.sema sema 878 | application/vnd.semd semd 879 | application/vnd.semf semf 880 | application/vnd.shana.informed.formdata ifm 881 | application/vnd.shana.informed.formtemplate itp 882 | application/vnd.shana.informed.interchange iif 883 | application/vnd.shana.informed.package ipk 884 | application/vnd.SimTech-MindMapper twd twds 885 | application/vnd.smaf mmf 886 | application/vnd.smart.notebook notebook 887 | application/vnd.smart.teacher teacher 888 | application/vnd.software602.filler.form+xml fo 889 | application/vnd.software602.filler.form-xml-zip zfo 890 | application/vnd.solent.sdkm+xml sdkm sdkd 891 | application/vnd.spotfire.dxp dxp 892 | application/vnd.spotfire.sfs sfs 893 | application/vnd.sss-cod 894 | application/vnd.sss-dtf 895 | application/vnd.sss-ntf 896 | application/vnd.stepmania.package smzip 897 | application/vnd.stepmania.stepchart sm 898 | application/vnd.street-stream 899 | application/vnd.sun.wadl+xml wadl 900 | application/vnd.sus-calendar sus susp 901 | application/vnd.svd 902 | application/vnd.swiftview-ics 903 | application/vnd.syncml+xml xsm 904 | application/vnd.syncml.dm+wbxml bdm 905 | application/vnd.syncml.dm+xml xdm 906 | application/vnd.syncml.dm.notification 907 | application/vnd.syncml.dmddf+wbxml 908 | application/vnd.syncml.dmddf+xml ddf 909 | application/vnd.syncml.dmtnds+wbxml 910 | application/vnd.syncml.dmtnds+xml 911 | application/vnd.syncml.ds.notification 912 | application/vnd.tao.intent-module-archive tao 913 | application/vnd.tcpdump.pcap pcap cap dmp 914 | application/vnd.tmobile-livetv tmo 915 | application/vnd.trid.tpt tpt 916 | application/vnd.triscape.mxs mxs 917 | application/vnd.trueapp tra 918 | application/vnd.truedoc 919 | # cab: application/vnd.ms-cab-compressed 920 | application/vnd.ubisoft.webplayer 921 | application/vnd.ufdl ufdl ufd frm 922 | application/vnd.uiq.theme utz 923 | application/vnd.umajin umj 924 | application/vnd.unity unityweb 925 | application/vnd.uoml+xml uoml uo 926 | application/vnd.uplanet.alert 927 | application/vnd.uplanet.alert-wbxml 928 | application/vnd.uplanet.bearer-choice 929 | application/vnd.uplanet.bearer-choice-wbxml 930 | application/vnd.uplanet.cacheop 931 | application/vnd.uplanet.cacheop-wbxml 932 | application/vnd.uplanet.channel 933 | application/vnd.uplanet.channel-wbxml 934 | application/vnd.uplanet.list 935 | application/vnd.uplanet.list-wbxml 936 | application/vnd.uplanet.listcmd 937 | application/vnd.uplanet.listcmd-wbxml 938 | application/vnd.uplanet.signal 939 | application/vnd.vcx vcx 940 | # sxi: application/vnd.sun.xml.impress 941 | application/vnd.vd-study mxi study-inter model-inter 942 | # mcd: application/vnd.mcd 943 | application/vnd.vectorworks vwx 944 | application/vnd.verimatrix.vcas 945 | application/vnd.vidsoft.vidconference vsc 946 | application/vnd.visio vsd vst vsw vss 947 | application/vnd.visionary vis 948 | # vsc: application/vnd.vidsoft.vidconference 949 | application/vnd.vividence.scriptfile 950 | application/vnd.vsf vsf 951 | application/vnd.wap.sic sic 952 | application/vnd.wap.slc slc 953 | application/vnd.wap.wbxml wbxml 954 | application/vnd.wap.wmlc wmlc 955 | application/vnd.wap.wmlscriptc wmlsc 956 | application/vnd.webturbo wtb 957 | application/vnd.wfa.wsc wsc 958 | application/vnd.wmc wmc 959 | application/vnd.wmf.bootstrap 960 | # nb: application/mathematica for now 961 | application/vnd.wolfram.mathematica 962 | application/vnd.wolfram.mathematica.package m 963 | application/vnd.wolfram.player nbp 964 | application/vnd.wordperfect wpd 965 | application/vnd.wqd wqd 966 | application/vnd.wrq-hp3000-labelled 967 | application/vnd.wt.stf stf 968 | application/vnd.wv.csp+xml 969 | application/vnd.wv.csp+wbxml wv 970 | application/vnd.wv.ssp+xml 971 | application/vnd.xara xar 972 | application/vnd.xfdl xfdl xfd 973 | application/vnd.xfdl.webform 974 | application/vnd.xmi+xml 975 | application/vnd.xmpie.cpkg cpkg 976 | application/vnd.xmpie.dpkg dpkg 977 | # dpkg: application/vnd.xmpie.dpkg 978 | application/vnd.xmpie.plan 979 | application/vnd.xmpie.ppkg ppkg 980 | application/vnd.xmpie.xlim xlim 981 | application/vnd.yamaha.hv-dic hvd 982 | application/vnd.yamaha.hv-script hvs 983 | application/vnd.yamaha.hv-voice hvp 984 | application/vnd.yamaha.openscoreformat osf 985 | application/vnd.yamaha.openscoreformat.osfpvg+xml 986 | application/vnd.yamaha.remote-setup 987 | application/vnd.yamaha.smaf-audio saf 988 | application/vnd.yamaha.smaf-phrase spf 989 | application/vnd.yamaha.through-ngn 990 | application/vnd.yamaha.tunnel-udpencap 991 | application/vnd.yellowriver-custom-menu cmp 992 | application/vnd.zul zir zirz 993 | application/vnd.zzazz.deck+xml zaz 994 | application/voicexml+xml vxml 995 | application/vq-rtcp-xr 996 | application/watcherinfo+xml wif 997 | application/whoispp-query 998 | application/whoispp-response 999 | application/widget wgt 1000 | application/wita 1001 | application/wordperfect5.1 1002 | application/wsdl+xml wsdl 1003 | application/wspolicy+xml wspolicy 1004 | application/x400-bp 1005 | application/xcap-att+xml xav 1006 | application/xcap-caps+xml xca 1007 | application/xcap-diff+xml xdf 1008 | application/xcap-el+xml xel 1009 | application/xcap-error+xml xer 1010 | application/xcap-ns+xml xns 1011 | application/xcon-conference-info-diff+xml 1012 | application/xcon-conference-info+xml 1013 | application/xenc+xml 1014 | application/xhtml+xml xhtml xhtm xht 1015 | # application/xhtml-voice+xml obsoleted by application/xv+xml 1016 | # xml, xsd, rng: text/xml 1017 | application/xml 1018 | # mod: audio/x-mod 1019 | application/xml-dtd dtd 1020 | # ent: text/xml-external-parsed-entity 1021 | application/xml-external-parsed-entity 1022 | application/xmpp+xml 1023 | application/xop+xml xop 1024 | application/xslt+xml xsl xslt 1025 | application/xv+xml mxml xhvml xvml xvm 1026 | application/yang yang 1027 | application/yin+xml yin 1028 | application/zip zip 1029 | application/zlib 1030 | audio/1d-interleaved-parityfec 1031 | audio/32kadpcm 726 1032 | # 3gp, 3gpp: video/3gpp 1033 | audio/3gpp 1034 | # 3g2, 3gpp2: video/3gpp2 1035 | audio/3gpp2 1036 | audio/ac3 ac3 1037 | audio/AMR amr 1038 | audio/AMR-WB awb 1039 | audio/amr-wb+ 1040 | audio/asc acn 1041 | # aa3, omg: audio/ATRAC3 1042 | audio/ATRAC-ADVANCED-LOSSLESS aal 1043 | # aa3, omg: audio/ATRAC3 1044 | audio/ATRAC-X atx 1045 | audio/ATRAC3 at3 aa3 omg 1046 | audio/basic au snd 1047 | audio/BV16 1048 | audio/BV32 1049 | audio/clearmode 1050 | audio/CN 1051 | audio/DAT12 1052 | audio/dls dls 1053 | audio/dsr-es201108 1054 | audio/dsr-es202050 1055 | audio/dsr-es202211 1056 | audio/dsr-es202212 1057 | audio/DV 1058 | audio/DVI4 1059 | audio/eac3 1060 | audio/EVRC evc 1061 | # qcp: audio/qcelp 1062 | audio/EVRC-QCP 1063 | audio/EVRC0 1064 | audio/EVRC1 1065 | audio/EVRCB evb 1066 | audio/EVRCB0 1067 | audio/EVRCWB evw 1068 | audio/EVRCWB0 1069 | audio/EVRCWB1 1070 | audio/fwdred 1071 | audio/G719 1072 | audio/G722 1073 | audio/G7221 1074 | audio/G723 1075 | audio/G726-16 1076 | audio/G726-24 1077 | audio/G726-32 1078 | audio/G726-40 1079 | audio/G728 1080 | audio/G729 1081 | audio/G7291 1082 | audio/G729D 1083 | audio/G729E 1084 | audio/GSM 1085 | audio/GSM-EFR 1086 | audio/GSM-HR-08 1087 | audio/iLBC lbc 1088 | audio/ip-mr_v2.5 1089 | # wav: audio/wav 1090 | audio/L16 l16 1091 | audio/L20 1092 | audio/L24 1093 | audio/L8 1094 | audio/LPC 1095 | audio/mobile-xmf mxmf 1096 | # mp4, mpg4: video/mp4, see RFC 4337 1097 | audio/mp4 1098 | audio/MP4A-LATM 1099 | audio/MPA 1100 | audio/mpa-robust 1101 | audio/mpeg mp3 mpga mp1 mp2 1102 | audio/mpeg4-generic 1103 | audio/ogg oga ogg spx 1104 | audio/parityfec 1105 | audio/PCMA 1106 | audio/PCMA-WB 1107 | audio/PCMU 1108 | audio/PCMU-WB 1109 | audio/prs.sid sid psid 1110 | audio/qcelp qcp 1111 | audio/raptorfec 1112 | audio/RED 1113 | audio/rtp-enc-aescm128 1114 | audio/rtp-midi 1115 | audio/rtx 1116 | audio/SMV smv 1117 | # qcp: audio/qcelp, see RFC 3625 1118 | audio/SMV-QCP 1119 | audio/SMV0 1120 | # mid: audio/midi 1121 | audio/sp-midi 1122 | audio/speex 1123 | audio/t140c 1124 | audio/t38 1125 | audio/telephone-event 1126 | audio/tone 1127 | audio/UEMCLIP 1128 | audio/ulpfec 1129 | audio/VDVI 1130 | audio/VMR-WB 1131 | audio/vnd.3gpp.iufp 1132 | audio/vnd.4SB 1133 | audio/vnd.audikoz koz 1134 | audio/vnd.CELP 1135 | audio/vnd.cisco.nse 1136 | audio/vnd.cmles.radio-events 1137 | audio/vnd.cns.anp1 1138 | audio/vnd.cns.inf1 1139 | audio/vnd.dece.audio uva uvva 1140 | audio/vnd.digital-winds eol 1141 | audio/vnd.dlna.adts 1142 | audio/vnd.dolby.heaac.1 1143 | audio/vnd.dolby.heaac.2 1144 | audio/vnd.dolby.mlp mlp 1145 | audio/vnd.dolby.mps 1146 | audio/vnd.dolby.pl2 1147 | audio/vnd.dolby.pl2x 1148 | audio/vnd.dolby.pl2z 1149 | audio/vnd.dolby.pulse.1 1150 | audio/vnd.dra 1151 | # wav: audio/wav, cpt: application/mac-compactpro 1152 | audio/vnd.dts dts 1153 | audio/vnd.dts.hd dtshd 1154 | # dvb: video/vnd.dvb.file 1155 | audio/vnd.dvb.file 1156 | audio/vnd.everad.plj plj 1157 | # rm: audio/x-pn-realaudio 1158 | audio/vnd.hns.audio 1159 | audio/vnd.lucent.voice lvp 1160 | audio/vnd.ms-playready.media.pya pya 1161 | # mxmf: audio/mobile-xmf 1162 | audio/vnd.nokia.mobile-xmf 1163 | audio/vnd.nortel.vbk vbk 1164 | audio/vnd.nuera.ecelp4800 ecelp4800 1165 | audio/vnd.nuera.ecelp7470 ecelp7470 1166 | audio/vnd.nuera.ecelp9600 ecelp9600 1167 | audio/vnd.octel.sbc 1168 | # audio/vnd.qcelp deprecated in favour of audio/qcelp 1169 | audio/vnd.rhetorex.32kadpcm 1170 | audio/vnd.rip rip 1171 | audio/vnd.sealedmedia.softseal.mpeg smp3 smp s1m 1172 | audio/vnd.vmx.cvsd 1173 | audio/vorbis 1174 | audio/vorbis-config 1175 | image/cgm 1176 | image/fits fits fit fts 1177 | image/g3fax 1178 | image/gif gif 1179 | image/ief ief 1180 | image/jp2 jp2 jpg2 1181 | image/jpeg jpg jpeg jpe jfif 1182 | image/jpm jpm jpgm 1183 | image/jpx jpx jpf 1184 | image/ktx ktx 1185 | image/naplps 1186 | image/png png 1187 | image/prs.btif btif btf 1188 | image/prs.pti pti 1189 | image/svg+xml svg svgz 1190 | image/t38 t38 1191 | image/tiff tiff tif 1192 | image/tiff-fx tfx 1193 | image/vnd.adobe.photoshop psd 1194 | image/vnd.airzip.accelerator.azv azv 1195 | image/vnd.cns.inf2 1196 | image/vnd.dece.graphic uvi uvvi uvg uvvg 1197 | image/vnd.djvu djvu djv 1198 | # sub: text/vnd.dvb.subtitle 1199 | image/vnd.dvb.subtitle 1200 | image/vnd.dwg 1201 | image/vnd.dxf dxf 1202 | image/vnd.fastbidsheet fbs 1203 | image/vnd.fpx fpx 1204 | image/vnd.fst fst 1205 | image/vnd.fujixerox.edmics-mmr mmr 1206 | image/vnd.fujixerox.edmics-rlc rlc 1207 | image/vnd.globalgraphics.pgb pgb 1208 | image/vnd.microsoft.icon ico 1209 | image/vnd.mix 1210 | image/vnd.ms-modi mdi 1211 | image/vnd.net-fpx 1212 | image/vnd.radiance hdr rgbe xyze 1213 | image/vnd.sealed.png spng spn s1n 1214 | image/vnd.sealedmedia.softseal.gif sgif sgi s1g 1215 | image/vnd.sealedmedia.softseal.jpg sjpg sjp s1j 1216 | image/vnd.svf 1217 | image/vnd.wap.wbmp wbmp 1218 | image/vnd.xiff xif 1219 | message/CPIM 1220 | message/delivery-status 1221 | message/disposition-notification 1222 | message/external-body 1223 | message/feedback-report 1224 | message/global u8msg 1225 | message/global-delivery-status u8dsn 1226 | message/global-disposition-notification u8mdn 1227 | message/global-headers u8hdr 1228 | message/http 1229 | # cl: application/simple-filter+xml 1230 | message/imdn+xml 1231 | # message/news obsoleted by message/rfc822 1232 | message/partial 1233 | message/rfc822 eml mail art 1234 | message/s-http 1235 | message/sip 1236 | message/sipfrag 1237 | message/tracking-status 1238 | message/vnd.si.simp 1239 | model/iges igs iges 1240 | model/mesh msh mesh silo 1241 | model/vnd.collada+xml dae 1242 | model/vnd.dwf dwf 1243 | # 3dml, 3dm: text/vnd.in3d.3dml 1244 | model/vnd.flatland.3dml 1245 | model/vnd.gdl gdl gsm win dor lmp rsm msm ism 1246 | model/vnd.gs-gdl 1247 | model/vnd.gtw gtw 1248 | model/vnd.moml+xml moml 1249 | model/vnd.mts mts 1250 | model/vnd.parasolid.transmit.binary x_b xmt_bin 1251 | model/vnd.parasolid.transmit.text x_t xmt_txt 1252 | model/vnd.vtu vtu 1253 | model/vrml wrl vrml 1254 | multipart/alternative 1255 | multipart/appledouble 1256 | multipart/byteranges 1257 | multipart/digest 1258 | multipart/encrypted 1259 | multipart/form-data 1260 | multipart/header-set 1261 | multipart/mixed 1262 | multipart/parallel 1263 | multipart/related 1264 | multipart/report 1265 | multipart/signed 1266 | multipart/voice-message vpm 1267 | text/1d-interleaved-parityfec 1268 | text/calendar ics ifb 1269 | text/css css 1270 | text/csv csv 1271 | text/directory 1272 | text/dns soa zone 1273 | # text/ecmascript obsoleted by application/ecmascript 1274 | text/enriched 1275 | text/fwdred 1276 | text/html html htm 1277 | # text/javascript obsoleted by application/javascript 1278 | text/jcr-cnd cnd 1279 | text/mizar miz 1280 | text/n3 n3 1281 | text/parityfec 1282 | text/plain txt asc text pm el c h cc hh cxx hxx f90 1283 | text/prs.fallenstein.rst rst 1284 | text/prs.lines.tag tag dsc 1285 | text/raptorfec 1286 | text/RED 1287 | text/rfc822-headers 1288 | text/richtext rtx 1289 | # rtf: application/rtf 1290 | text/rtf 1291 | text/rtp-enc-aescm128 1292 | text/rtx 1293 | text/sgml sgml sgm 1294 | text/t140 1295 | text/tab-separated-values tsv 1296 | text/troff 1297 | text/turtle ttl 1298 | text/ulpfec 1299 | text/uri-list uris uri 1300 | text/vcard vcf vcard 1301 | text/vnd.abc abc 1302 | # curl: application/vnd.curl 1303 | text/vnd.curl 1304 | text/vnd.DMClientScript dms 1305 | text/vnd.dvb.subtitle sub 1306 | text/vnd.esmertec.theme-descriptor jtd 1307 | text/vnd.fly fly 1308 | text/vnd.fmi.flexstor flx 1309 | text/vnd.graphviz gv dot 1310 | text/vnd.in3d.3dml 3dml 3dm 1311 | text/vnd.in3d.spot spot spo 1312 | text/vnd.IPTC.NewsML 1313 | text/vnd.IPTC.NITF 1314 | text/vnd.latex-z 1315 | text/vnd.motorola.reflex 1316 | text/vnd.ms-mediapackage mpf 1317 | text/vnd.net2phone.commcenter.command ccc 1318 | text/vnd.radisys.msml-basic-layout 1319 | text/vnd.si.uricatalogue uric 1320 | text/vnd.sun.j2me.app-descriptor jad 1321 | text/vnd.trolltech.linguist ts 1322 | text/vnd.wap.si si 1323 | text/vnd.wap.sl sl 1324 | text/vnd.wap.wml wml 1325 | text/vnd.wap.wmlscript wmls 1326 | text/xml xml xsd rng 1327 | text/xml-external-parsed-entity ent 1328 | video/1d-interleaved-parityfec 1329 | video/3gpp 3gp 3gpp 1330 | video/3gpp2 3g2 3gpp2 1331 | video/3gpp-tt 1332 | video/BMPEG 1333 | video/BT656 1334 | video/CelB 1335 | video/DV 1336 | video/H261 1337 | video/H263 1338 | video/H263-1998 1339 | video/H263-2000 1340 | video/H264 1341 | video/H264-RCDO 1342 | video/H264-SVC 1343 | video/JPEG 1344 | video/jpeg2000 1345 | video/mj2 mj2 mjp2 1346 | video/MP1S 1347 | video/MP2P 1348 | video/MP2T 1349 | video/mp4 mp4 mpg4 1350 | video/MP4V-ES 1351 | video/mpeg mpeg mpg mpe 1352 | video/mpeg4-generic 1353 | video/MPV 1354 | video/nv 1355 | video/ogg ogv 1356 | video/parityfec 1357 | video/pointer 1358 | video/quicktime mov qt 1359 | video/raptorfec 1360 | video/raw 1361 | video/rtp-enc-aescm128 1362 | video/rtx 1363 | video/SMPTE292M 1364 | video/ulpfec 1365 | video/vc1 1366 | video/vnd.CCTV 1367 | video/vnd.dece.hd uvh uvvh 1368 | video/vnd.dece.mobile uvm uvvm 1369 | video/vnd.dece.mp4 uvu uvvu 1370 | video/vnd.dece.pd uvp uvvp 1371 | video/vnd.dece.sd uvs uvvs 1372 | video/vnd.dece.video uvv uvvv 1373 | video/vnd.directv.mpeg 1374 | video/vnd.directv.mpeg-tts 1375 | video/vnd.dlna.mpeg-tts 1376 | video/vnd.dvb.file dvb 1377 | video/vnd.fvt fvt 1378 | # rm: audio/x-pn-realaudio 1379 | video/vnd.hns.video 1380 | video/vnd.iptvforum.1dparityfec-1010 1381 | video/vnd.iptvforum.1dparityfec-2005 1382 | video/vnd.iptvforum.2dparityfec-1010 1383 | video/vnd.iptvforum.2dparityfec-2005 1384 | video/vnd.iptvforum.ttsavc 1385 | video/vnd.iptvforum.ttsmpeg2 1386 | video/vnd.motorola.video 1387 | video/vnd.motorola.videop 1388 | video/vnd.mpegurl mxu m4u 1389 | video/vnd.ms-playready.media.pyv pyv 1390 | video/vnd.nokia.interleaved-multimedia nim 1391 | video/vnd.nokia.videovoip 1392 | # mp4: video/mp4 1393 | video/vnd.objectvideo 1394 | video/vnd.sealed.mpeg1 smpg s11 1395 | # smpg: video/vnd.sealed.mpeg1 1396 | video/vnd.sealed.mpeg4 s14 1397 | video/vnd.sealed.swf sswf ssw 1398 | video/vnd.sealedmedia.softseal.mov smov smo s1q 1399 | # uvu, uvvu: video/vnd.dece.mp4 1400 | video/vnd.uvvu.mp4 1401 | video/vnd.vivo 1402 | 1403 | # Non-IANA types 1404 | 1405 | application/epub+zip epub 1406 | application/mac-compactpro cpt 1407 | application/metalink+xml metalink 1408 | application/rss+xml rss 1409 | application/vnd.android.package-archive apk 1410 | application/vnd.oma.dd+xml dd 1411 | application/vnd.oma.drm.content dcf 1412 | # odf: application/vnd.oasis.opendocument.formula 1413 | application/vnd.oma.drm.dcf o4a o4v 1414 | application/vnd.oma.drm.message dm 1415 | application/vnd.oma.drm.rights+wbxml drc 1416 | application/vnd.oma.drm.rights+xml dr 1417 | application/vnd.sun.xml.calc sxc 1418 | application/vnd.sun.xml.calc.template stc 1419 | application/vnd.sun.xml.draw sxd 1420 | application/vnd.sun.xml.draw.template std 1421 | application/vnd.sun.xml.impress sxi 1422 | application/vnd.sun.xml.impress.template sti 1423 | application/vnd.sun.xml.math sxm 1424 | application/vnd.sun.xml.writer sxw 1425 | application/vnd.sun.xml.writer.global sxg 1426 | application/vnd.sun.xml.writer.template stw 1427 | application/vnd.symbian.install sis 1428 | application/vnd.wap.mms-message mms 1429 | application/x-annodex anx 1430 | application/x-bcpio bcpio 1431 | application/x-bittorrent torrent 1432 | application/x-bzip2 bz2 1433 | application/x-cdlink vcd 1434 | application/x-chess-pgn pgn 1435 | application/x-cpio cpio 1436 | application/x-csh csh 1437 | application/x-director dcr dir dxr 1438 | application/x-dvi dvi 1439 | application/x-futuresplash spl 1440 | application/x-gtar gtar 1441 | application/x-hdf hdf 1442 | application/x-java-archive jar 1443 | application/x-java-jnlp-file jnlp 1444 | application/x-java-pack200 pack 1445 | application/x-killustrator kil 1446 | application/x-latex latex 1447 | application/x-netcdf nc cdf 1448 | application/x-perl pl 1449 | application/x-rpm rpm 1450 | application/x-sh sh 1451 | application/x-shar shar 1452 | application/x-shockwave-flash swf 1453 | application/x-stuffit sit 1454 | application/x-sv4cpio sv4cpio 1455 | application/x-sv4crc sv4crc 1456 | application/x-tar tar 1457 | application/x-tcl tcl 1458 | application/x-tex tex 1459 | application/x-texinfo texinfo texi 1460 | application/x-troff t tr roff 1461 | application/x-troff-man man 1 2 3 4 5 6 7 8 1462 | application/x-troff-me me 1463 | application/x-troff-ms ms 1464 | application/x-ustar ustar 1465 | application/x-wais-source src 1466 | application/x-xpinstall xpi 1467 | application/x-xspf+xml xspf 1468 | application/x-xz xz 1469 | audio/midi mid midi kar 1470 | audio/x-aiff aif aiff aifc 1471 | audio/x-annodex axa 1472 | audio/x-flac flac 1473 | audio/x-mod mod ult uni m15 mtm 669 med 1474 | audio/x-mpegurl m3u 1475 | audio/x-ms-wax wax 1476 | audio/x-ms-wma wma 1477 | audio/x-pn-realaudio ram rm 1478 | audio/x-realaudio ra 1479 | audio/x-s3m s3m 1480 | audio/x-stm stm 1481 | audio/x-wav wav 1482 | chemical/x-xyz xyz 1483 | image/bmp bmp 1484 | image/x-cmu-raster ras 1485 | image/x-portable-anymap pnm 1486 | image/x-portable-bitmap pbm 1487 | image/x-portable-graymap pgm 1488 | image/x-portable-pixmap ppm 1489 | image/x-rgb rgb 1490 | image/x-targa tga 1491 | image/x-xbitmap xbm 1492 | image/x-xpixmap xpm 1493 | image/x-xwindowdump xwd 1494 | text/cache-manifest manifest 1495 | text/html-sandboxed sandboxed 1496 | text/x-pod pod 1497 | text/x-setext etx 1498 | video/webm webm 1499 | video/x-annodex axv 1500 | video/x-flv flv 1501 | video/x-javafx fxm 1502 | video/x-ms-asf asx 1503 | video/x-ms-wm wm 1504 | video/x-ms-wmv wmv 1505 | video/x-ms-wmx wmx 1506 | video/x-ms-wvx wvx 1507 | video/x-msvideo avi 1508 | video/x-sgi-movie movie 1509 | x-conference/x-cooltalk ice 1510 | x-epoc/x-sisx-app sisx 1511 | -------------------------------------------------------------------------------- /firmware_mod/bin/mosquitto_pub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | LD_LIBRARY_PATH='/thirdlib:/system/lib:/system/sdcard/lib' 3 | /system/sdcard/bin/mosquitto_pub.bin "$@" 4 | -------------------------------------------------------------------------------- /firmware_mod/bin/mosquitto_pub.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/mosquitto_pub.bin -------------------------------------------------------------------------------- /firmware_mod/bin/mosquitto_sub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | LD_LIBRARY_PATH='/thirdlib:/system/lib:/system/sdcard/lib' 3 | /system/sdcard/bin/mosquitto_sub.bin "$@" 4 | -------------------------------------------------------------------------------- /firmware_mod/bin/mosquitto_sub.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/mosquitto_sub.bin -------------------------------------------------------------------------------- /firmware_mod/bin/motor: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/motor -------------------------------------------------------------------------------- /firmware_mod/bin/ossplay: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/ossplay -------------------------------------------------------------------------------- /firmware_mod/bin/ossrecord: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/ossrecord -------------------------------------------------------------------------------- /firmware_mod/bin/sample-Audio: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/sample-Audio -------------------------------------------------------------------------------- /firmware_mod/bin/setconf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/setconf -------------------------------------------------------------------------------- /firmware_mod/bin/v4l2rtspserver: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/bin/v4l2rtspserver -------------------------------------------------------------------------------- /firmware_mod/config/autostart/README: -------------------------------------------------------------------------------- 1 | Autostarts in this directory 2 | 3 | -------------------------------------------------------------------------------- /firmware_mod/config/bftpd.conf: -------------------------------------------------------------------------------- 1 | +#Configuration file for bftpd. 2 | #The given values are only examples, modify this file for your own needs. 3 | 4 | global{ 5 | #If set to no, access is allowed. 6 | #If set to yes, access is denied without giving a reason. 7 | #If set to anything else, access is denied giving the content of this 8 | #variable as a reason. 9 | DENY_LOGIN="no" 10 | 11 | #The port number where the daemon should listen (only for daemon mode) 12 | PORT="21" 13 | 14 | #You can force bftpd to use a specific port range in passive mode. 15 | #Passive mode means that the client will open data connections 16 | #and the server stays 'passive'. 17 | #This option can be very useful with some firewall configurations. 18 | #Seperate values with "," and define ranges with "-". 19 | #bftpd will try to bind one of these ports in ascending order as 20 | #you specify them here. 21 | #If none of the given ports could be bound, the connection is 22 | #is refused. If you want to bind any free port in that case, add 23 | #"0" to the list. 24 | #PASSIVE_PORTS="10000,12000-12100,13000" 25 | PASSIVE_PORTS="0" 26 | 27 | #If PORT data connections should be opened from port 20, say yes here. You 28 | #will probably need this if your server is behind a firewall that restricts 29 | #outgoing packets from ports higher than 1024. Note that this may be a 30 | #security hole, as the server can not drop its root privileges completely 31 | #if you say yes here. 32 | DATAPORT20="no" 33 | 34 | #The password for the administration commands, encrypted (man mkpasswd). 35 | ADMIN_PASS="x" 36 | 37 | #With this option, you can put your entire FTP environment into a chroot 38 | #jail. Apart from security, this offers you the possibility of having 39 | #virtual users that don't exist in the system. 40 | #Additionally, you can make some kind of 'file pool' by creating a directory 41 | #with files which you can symlink from the users' homes (this means setting 42 | #DO_CHROOT=no in order for the users to be able to access that dir. 43 | #Note that you need the following files in your initial chroot directory: 44 | #/etc/passwd, /etc/shadow, /etc/group 45 | #On GNU systems, you will also need the NSS libraries in /lib. 46 | #INITIAL_CHROOT="/ftp" 47 | 48 | #The bftpdutmp file enables you to record user logins and logouts in 49 | #bftpd, which is useful for the administration interface (which is not 50 | #finished yet). You also need the file to be able to restrict the number 51 | #of users simultaneously logged on, and so on. 52 | #Note that the directory in which the file resides must already exist. 53 | #Set the option to "" if you do not want that. This is discouraged for normal 54 | #use, but can be helpful if you want to create a boot floppy or something. 55 | PATH_BFTPDUTMP="/var/run/bftpd/bftpdutmp" 56 | 57 | #This option controls the buffer size while transferring files. 58 | #If you are on a very fast network (fast meaning 100 Mbit/s or more), 59 | #you should set this to 64000 or something like that. 60 | #Transferring from localhost to localhost, I had a transfer speed of 61 | #approx. 15 MB/s with XFER_BUFSIZE=2048 and a speed of approx. 20 MB/s 62 | #with XFER_BUFSIZE=64000. You should not set big values for this if you have 63 | #slow (dialup) clients. 64 | # This option can also be used to (crudely) throttle back 65 | # transfer speeds. Setting this to a very low value 66 | # can slow transfer speeds. 67 | XFER_BUFSIZE="2048" 68 | 69 | 70 | # This variable controls whether the transfer buffer (see above option) 71 | # should change size as more (or less) clients connect to the server. 72 | # Setting this option to "yes" will put more work on your CPU, but 73 | # will avoid chewing up as much bandwidth as more people connect. 74 | # Setting this option to "no" is easier on the CPU, but may cause 75 | # your bandwidth to spike. 76 | CHANGE_BUFSIZE="no" 77 | 78 | 79 | 80 | # This option allows you to add a delay (in microseconds) to 81 | # the time between when one piece of data was sent 82 | # and when the next will be sent. This is to aid in 83 | # throttling bandwidth and applies to each client. The 84 | # throttling effects the DATA transfers only (not control 85 | # connections). 86 | # A value of zero (0) means there is no added delay. 87 | # A value of about 500000 (five hundred thousand) should 88 | # delay for about half a second. 89 | # These delays should be kept low to avoid triggering 90 | # data transfer timeouts. 91 | XFER_DELAY="0" 92 | 93 | # This option determines whether hidden files 94 | # ( files that start with a "." ) 95 | # will be shown in a directory listing. 96 | # If this option is set to "yes", the client will be 97 | # able to see hidden files ONLY if they pass the "-a" 98 | # option to the list command. For example "ls -a". 99 | # If this option is set to "no", then hidden files are 100 | # never shown, regardless of whether "-a" is used. 101 | # Additionally, if we want the server to always send hidden 102 | # files to the client, whether they request hidden files or 103 | # not, set this to "always". 104 | SHOW_HIDDEN_FILES="no" 105 | 106 | # This option determines whether files not readable 107 | # to the ftp user will be shown in a directory listing. 108 | SHOW_NONREADABLE_FILES="no" 109 | 110 | #When set to yes, this option makes the server allow data connections which 111 | #don't go to the client who initiated them. 112 | #This is needed for FXP. 113 | ALLOW_FXP="no" 114 | 115 | #After how many seconds of idle time should a user be kicked from the server? 116 | CONTROL_TIMEOUT="300" 117 | 118 | #After how many seconds of idle time should a user be kicked from the server 119 | #during a file transfer? 120 | DATA_TIMEOUT="30" 121 | 122 | #Use Ratio if you want the client to send a file before he can get a file. 123 | #Usage: RATIO=send/receive or RATIO=none. Example: RATIO=2/1 lets the client 124 | #receive a 1 MB file when he has sent a 2 MB file. 125 | RATIO="none" 126 | 127 | # Use this option to track bandwidth usage. After each session, the server 128 | # will log how much data was uploaded and downloaded for each user. 129 | # This option should point to the directory where the log files will 130 | # be saved. 131 | # Each day gets its own log file, to make it easier to rotate logs. 132 | # Please note, this directory must be created manually. 133 | # BANDWIDTH="/var/log/bftpd" 134 | 135 | #ROOTDIR specifies the root directory of the client. It defaults to %h 136 | #(user's home directory). %u is replaced by the user name. 137 | ROOTDIR="%h" 138 | 139 | #Umask for the files or directories users create. 140 | UMASK="022" 141 | 142 | #Name of the log file. Say "syslog" to log into syslog. 143 | #Say "" for no logging. 144 | LOGFILE="/var/log/bftpd.log" 145 | 146 | #Use %v for version, %h for the server FQDN and %i for the server IP address. 147 | # Note: If you use the "%h" option and you do an inital CHROOT, then 148 | # you'll need to copy your /etc/hosts and /etc/host.conf files into 149 | # the chroot jail. 150 | HELLO_STRING="bftpd %v at %i ready." 151 | 152 | #The server automatically chdirs to the directory given here after login. 153 | AUTO_CHDIR="/" 154 | 155 | #Authentication type, values: PAM, PASSWD 156 | AUTH="PASSWD" 157 | 158 | # The FILE_AUTH varible over-rides the AUTH value. If the FILE_AUTH 159 | # value is set to something other than an empty string ("") 160 | # bftpd will search through the pathname given in order 161 | # to find username/password matches. 162 | # The format of this file is as shown below: 163 | # username password group home_folder 164 | # (for example:) 165 | # robert secret users /home/robert 166 | # james moose users /mnt/storage 167 | # 168 | # A entry with the password field set to * (star) requires 169 | # no password. Any password the users enters will be accepted. 170 | # The following example is for a user with no password. 171 | # anyone * users /home/ftp 172 | #FILE_AUTH="/etc/ftpdpassword" 173 | 174 | 175 | #Enable this if you want the client's IP address to be resolved to a host 176 | #name. Note that it increases the overhead and it may not work if your DNS 177 | #is not configured correctly. Clients without a valid DNS name will take very 178 | #long to connect. 179 | RESOLVE_CLIENT_IP="no" 180 | 181 | #Path to the message of the day, seen by all users before login. 182 | MOTD_GLOBAL="/etc/ftpmotd" 183 | 184 | #Path to the message of the day, seen after login, relative to the root 185 | #path of the user (see ROOTDIR). 186 | # Use symbols %u and %h in place of user's username and home directory. 187 | MOTD_USER="/.ftpmotd" 188 | 189 | #If RESOLVE_UIDS is enabled, in directory lists the user and group names 190 | #are shown instead of UID/GID. This may slow down directory listings. 191 | RESOLVE_UIDS="yes" 192 | 193 | #If DO_CHROOT is enabled, a user can not access directories other than his 194 | #HOMEDIR and its subdirectories. DON'T disable this globally if you don't 195 | #want to have a security hole! 196 | DO_CHROOT="yes" 197 | 198 | #Enable this to log each login to wtmp. 199 | LOG_WTMP="yes" 200 | 201 | #If you want bftpd to bind itself to one specific network interface, enter 202 | #its IP address here. Else enter 'any'. This option only works in standalone 203 | #mode. 204 | BIND_TO_ADDR="any" 205 | 206 | 207 | # This option allows you to over-ride the IP address Bftpd 208 | # sends to the client. This may be useful is you are behind 209 | # a router. If an address is given in this option, it over-rides 210 | # the LAN IP your PC had. It is recommended you leave this option 211 | # commented out unless you have a special setup. 212 | #OVERRIDE_IP="127.0.0.1" 213 | 214 | 215 | #Path to the ftpusers file. It can contain user names that are denied. 216 | #If it does not exist, every user can log in. If you don't want this, 217 | #just put a nonexistent filename here. 218 | PATH_FTPUSERS="/etc/ftpusers" 219 | 220 | #Enable this if you want to deny any user who has a shell which is not in 221 | #/etc/shells. 222 | AUTH_ETCSHELLS="no" 223 | 224 | #With the option ALLOWCOMMAND_XXXX, you can disable the command XXXX. 225 | #For example, if you don't want any user to delete files, you can do 226 | #ALLOWCOMMAND_DELE="no" 227 | #Of course, you can disable it for specific users by writing the appropiate 228 | #lines into the user structures. 229 | ALLOWCOMMAND_DELE="yes" 230 | ALLOWCOMMAND_STOR="yes" 231 | ALLOWCOMMAND_SITE="no" 232 | 233 | #Files that belong to these groups (comma-separated) are hidden in LIST/NLST. 234 | HIDE_GROUP="" 235 | 236 | #What message should be used as reply for the QUIT command? 237 | QUIT_MSG="See you later..." 238 | 239 | #The number of users that can be logged in at the same time. 240 | #If set to "0", an unlimited users will be able to connect. This is not 241 | #recommended, as it makes DoS attacks possible, even if the clients are 242 | #kicked after a short time. 243 | USERLIMIT_GLOBAL="0" 244 | 245 | #This variable controls how often one user can be logged in at one time. 246 | #This allows you to have a big connection limit (see above) and nevertheless 247 | #prevent single users from having a lot of connections. 248 | #This option may also be useful in a user {} or group {} environment. 249 | USERLIMIT_SINGLEUSER="0" 250 | 251 | #This variable controls how many users are allowed to connect from the same IP 252 | #address. This prvents one user (or machine) from taking all of the avail 253 | #connections. 254 | #If you want to allow unlimited connections, leave this option as "0". 255 | USERLIMIT_HOST="0" 256 | 257 | #This option allows you to force files to be compressed 258 | #on the fly during upload. A ".gz" extension will be given 259 | #to the file. This should usually be turned off ("no"), but 260 | #may be useful to servers with smaller storage space. 261 | #To enable this option set the value to "yes". 262 | # 263 | # To use this option, bftpd must be configured using 264 | # "./configure --enable-libz" _before_ running "make". 265 | GZ_UPLOAD="no" 266 | 267 | #This option allows you to set whether or not files 268 | #with the extension .gz should be uncompressed on-the-fly 269 | #during downloads. This should usually be turned off ("no"). 270 | #To enable this feature, set the value to "yes". 271 | # 272 | #To use this option, bftpd must be configured using 273 | # "./configure --enable-libz" _before_ running "make". 274 | GZ_DOWNLOAD="no" 275 | 276 | # This option is enabled when the server should run 277 | # a script before writing to the file system. This should 278 | # usually be commented out, unless you need to prepare the 279 | # file system for writing. 280 | # NOTE: Be careful when using this option and the DO_CHROOT option. 281 | # The location of the root directory can change when using DO_CHROOT. 282 | # The current working directory (cwd) is passed to the script you run. 283 | # PRE_WRITE_SCRIPT="/bin/true" 284 | 285 | # This option is enabled when the server should run 286 | # a script after writing to the file system. This should 287 | # usually be commented out, unless you need to do something 288 | # to the file system after writing. 289 | # NOTE: Be careful when using this option and the DO_CHROOT option. 290 | # The location of the root directory can change when using DO_CHROOT. 291 | # The current working directory (cwd) is passed to the script you run. 292 | # POST_WRITE_SCRIPT="/bin/false" 293 | 294 | # The GNU C library makes some assumptions about the local time zone 295 | # when run in a chroot environment. The Bftpd server tries to work 296 | # around these assumptions to give the correct time. If we are 297 | # running in an environment which does not require the time zone 298 | # fix, set TIMEZONE_FIX to "no". 299 | # TIMEZONE_FIX="no" 300 | } 301 | 302 | user ftp { 303 | #Any password fits. 304 | ANONYMOUS_USER="yes" 305 | DENY_LOGIN="Anonymous login disabled." 306 | #ROOTDIR="/path/for/anonymous/user" 307 | } 308 | 309 | user anonymous { 310 | #If the client wants anonymous, ftp is taken instead. 311 | ALIAS="ftp" 312 | } 313 | 314 | 315 | 316 | 317 | 318 | 319 | -------------------------------------------------------------------------------- /firmware_mod/config/boa.conf: -------------------------------------------------------------------------------- 1 | # Boa v0.94 configuration file 2 | # File format has not changed from 0.93 3 | # File format has changed little from 0.92 4 | # version changes are noted in the comments 5 | # 6 | # The Boa configuration file is parsed with a custom parser. If it 7 | # reports an error, the line number will be provided; it should be easy 8 | # to spot. The syntax of each of these rules is very simple, and they 9 | # can occur in any order. Where possible these directives mimic those 10 | # of NCSA httpd 1.3; I saw no reason to introduce gratuitous 11 | # differences. 12 | 13 | # $Id: boa.conf,v 1.3.2.6 2003/02/02 05:02:22 jnelson Exp $ 14 | 15 | # The "ServerRoot" is not in this configuration file. It can be 16 | # compiled into the server (see defines.h) or specified on the command 17 | # line with the -c option, for example: 18 | # 19 | # boa -c /usr/local/boa 20 | 21 | 22 | # Port: The port Boa runs on. The default port for http servers is 80. 23 | # If it is less than 1024, the server must be started as root. 24 | 25 | Port 80 26 | 27 | # Listen: the Internet address to bind(2) to. If you leave it out, 28 | # it takes the behavior before 0.93.17.2, which is to bind to all 29 | # addresses (INADDR_ANY). You only get one "Listen" directive, 30 | # if you want service on multiple IP addresses, you have three choices: 31 | # 1. Run boa without a "Listen" directive 32 | # a. All addresses are treated the same; makes sense if the addresses 33 | # are localhost, ppp, and eth0. 34 | # b. Use the VirtualHost directive below to point requests to different 35 | # files. Should be good for a very large number of addresses (web 36 | # hosting clients). 37 | # 2. Run one copy of boa per IP address, each has its own configuration 38 | # with a "Listen" directive. No big deal up to a few tens of addresses. 39 | # Nice separation between clients. 40 | # The name you provide gets run through inet_aton(3), so you have to use dotted 41 | # quad notation. This configuration is too important to trust some DNS. 42 | 43 | #Listen 192.68.0.5 44 | 45 | # User: The name or UID the server should run as. 46 | # Group: The group name or GID the server should run as. 47 | 48 | 49 | User root 50 | Group root 51 | 52 | # ServerAdmin: The email address where server problems should be sent. 53 | # Note: this is not currently used, except as an environment variable 54 | # for CGIs. 55 | 56 | #ServerAdmin root@localhost 57 | 58 | # PidFile: where to put the pid of the process. 59 | # Comment out to write no pid file. 60 | # Note: Because Boa drops privileges at startup, and the 61 | # pid file is written by the UID/GID before doing so, Boa 62 | # does not attempt removal of the pid file. 63 | # PidFile /var/run/boa.pid 64 | 65 | # ErrorLog: The location of the error log file. If this does not start 66 | # with /, it is considered relative to the server root. 67 | # Set to /dev/null if you don't want errors logged. 68 | # If unset, defaults to /dev/stderr 69 | # Please NOTE: Sending the logs to a pipe ('|'), as shown below, 70 | # is somewhat experimental and might fail under heavy load. 71 | # "Usual libc implementations of printf will stall the whole 72 | # process if the receiving end of a pipe stops reading." 73 | #ErrorLog "|/usr/sbin/cronolog --symlink=/var/log/boa/error_log /var/log/boa/error-%Y%m%d.log" 74 | 75 | ErrorLog /var/log/boa.log 76 | 77 | # AccessLog: The location of the access log file. If this does not 78 | # start with /, it is considered relative to the server root. 79 | # Comment out or set to /dev/null (less effective) to disable. 80 | # Useful to set to /dev/stdout for use with daemontools. 81 | # Access logging. 82 | # Please NOTE: Sending the logs to a pipe ('|'), as shown below, 83 | # is somewhat experimental and might fail under heavy load. 84 | # "Usual libc implementations of printf will stall the whole 85 | # process if the receiving end of a pipe stops reading." 86 | #AccessLog "|/usr/sbin/cronolog --symlink=/var/log/boa/access_log /var/log/boa/access-%Y%m%d.log" 87 | 88 | AccessLog /var/log/boa.log 89 | 90 | # CGILog /var/log/boa/cgi_log 91 | # CGILog: The location of the CGI stderr log file. If this does not 92 | # start with /, it is considered relative to the server root. 93 | # The log file would contain any contents send to /dev/stderr 94 | # by the CGI. If this is commented out, it defaults to whatever 95 | # ErrorLog points. Set to /dev/null to disable CGI stderr logging. 96 | # Please NOTE: Sending the logs to a pipe ('|'), as shown below, 97 | # is somewhat experimental and might fail under heavy load. 98 | # "Usual libc implementations of printf will stall the whole 99 | # process if the receiving end of a pipe stops reading." 100 | #CGILog "|/usr/sbin/cronolog --symlink=/var/log/boa/cgi_log /var/log/boa/cgi-%Y%m%d.log" 101 | 102 | # CGIumask 027 (no mask for user, read-only for group, and nothing for user) 103 | # CGIumask 027 104 | # The CGIumask is set immediately before execution of the CGI. 105 | 106 | # UseLocaltime: Logical switch. Uncomment to use localtime 107 | # instead of UTC time 108 | #UseLocaltime 109 | 110 | # VerboseCGILogs: this is just a logical switch. 111 | # It simply notes the start and stop times of cgis in the error log 112 | # Comment out to disable. 113 | 114 | #VerboseCGILogs 115 | 116 | # ServerName: the name of this server that should be sent back to 117 | # clients if different than that returned by gethostname + gethostbyname 118 | 119 | #ServerName www.your.org.here 120 | 121 | # VirtualHost: a logical switch. 122 | # Comment out to disable. 123 | # Given DocumentRoot /var/www, requests on interface 'A' or IP 'IP-A' 124 | # become /var/www/IP-A. 125 | # Example: http://localhost/ becomes /var/www/127.0.0.1 126 | # 127 | # Not used until version 0.93.17.2. This "feature" also breaks commonlog 128 | # output rules, it prepends the interface number to each access_log line. 129 | # You are expected to fix that problem with a postprocessing script. 130 | 131 | #VirtualHost 132 | 133 | 134 | # VHostRoot: the root location for all virtually hosted data 135 | # Comment out to disable. 136 | # Incompatible with 'Virtualhost' and 'DocumentRoot'!! 137 | # Given VHostRoot /var/www, requests to host foo.bar.com, 138 | # where foo.bar.com is ip a.b.c.d, 139 | # become /var/www/a.b.c.d/foo.bar.com 140 | # Hostnames are "cleaned", and must conform to the rules 141 | # specified in rfc1034, which are be summarized here: 142 | # 143 | # Hostnames must start with a letter, end with a letter or digit, 144 | # and have as interior characters only letters, digits, and hyphen. 145 | # Hostnames must not exceed 63 characters in length. 146 | 147 | #VHostRoot /var/www 148 | 149 | # DefaultVHost 150 | # Define this in order to have a default hostname when the client does not 151 | # specify one, if using VirtualHostName. If not specified, the word 152 | # "default" will be used for compatibility with older clients. 153 | 154 | #DefaultVHost foo.bar.com 155 | 156 | # DocumentRoot: The root directory of the HTML documents. 157 | # Comment out to disable server non user files. 158 | 159 | DocumentRoot /system/sdcard/www 160 | 161 | # UserDir: The name of the directory which is appended onto a user's home 162 | # directory if a ~user request is received. 163 | 164 | UserDir public_html 165 | 166 | # DirectoryIndex: Name of the file to use as a pre-written HTML 167 | # directory index. Please MAKE AND USE THESE FILES. On the 168 | # fly creation of directory indexes can be _slow_. 169 | # Comment out to always use DirectoryMaker 170 | 171 | DirectoryIndex index.html 172 | 173 | # DirectoryMaker: Name of program used to create a directory listing. 174 | # Comment out to disable directory listings. If both this and 175 | # DirectoryIndex are commented out, accessing a directory will give 176 | # an error (though accessing files in the directory are still ok). 177 | 178 | DirectoryMaker /system/sdcard/bin/boa_indexer 179 | 180 | # DirectoryCache: If DirectoryIndex doesn't exist, and DirectoryMaker 181 | # has been commented out, the the on-the-fly indexing of Boa can be used 182 | # to generate indexes of directories. Be warned that the output is 183 | # extremely minimal and can cause delays when slow disks are used. 184 | # Note: The DirectoryCache must be writable by the same user/group that 185 | # Boa runs as. 186 | 187 | # DirectoryCache /var/spool/boa/dircache 188 | 189 | # KeepAliveMax: Number of KeepAlive requests to allow per connection 190 | # Comment out, or set to 0 to disable keepalive processing 191 | 192 | KeepAliveMax 1000 193 | 194 | # KeepAliveTimeout: seconds to wait before keepalive connection times out 195 | 196 | KeepAliveTimeout 10 197 | 198 | # MimeTypes: This is the file that is used to generate mime type pairs 199 | # and Content-Type fields for boa. 200 | # Set to /dev/null if you do not want to load a mime types file. 201 | # Do *not* comment out (better use AddType!) 202 | 203 | MimeTypes /system/sdcard/bin/mime.types 204 | 205 | # DefaultType: MIME type used if the file extension is unknown, or there 206 | # is no file extension. 207 | 208 | DefaultType text/plain 209 | 210 | # CGIPath: The value of the $PATH environment variable given to CGI progs. 211 | 212 | CGIPath /bin:/usr/bin:/usr/local/bin 213 | 214 | # SinglePostLimit: The maximum allowable number of bytes in 215 | # a single POST. Default is normally 1MB. 216 | 217 | # AddType: adds types without editing mime.types 218 | # Example: AddType type extension [extension ...] 219 | 220 | # Uncomment the next line if you want .cgi files to execute from anywhere 221 | #AddType application/x-httpd-cgi cgi 222 | 223 | # Redirect, Alias, and ScriptAlias all have the same semantics -- they 224 | # match the beginning of a request and take appropriate action. Use 225 | # Redirect for other servers, Alias for the same server, and ScriptAlias 226 | # to enable directories for script execution. 227 | 228 | # Redirect allows you to tell clients about documents which used to exist in 229 | # your server's namespace, but do not anymore. This allows you to tell the 230 | # clients where to look for the relocated document. 231 | # Example: Redirect /bar http://elsewhere/feh/bar 232 | 233 | # Aliases: Aliases one path to another. 234 | # Example: Alias /path1/bar /path2/foo 235 | 236 | Alias /doc /usr/doc 237 | 238 | # ScriptAlias: Maps a virtual path to a directory for serving scripts 239 | # Example: ScriptAlias /htbin/ /www/htbin/ 240 | 241 | ScriptAlias /cgi-bin/ /system/sdcard/www/cgi-bin/ 242 | 243 | ServerName dafang 244 | 245 | #Auth / Basic:/system/sdcard/config/htpasswd.conf -------------------------------------------------------------------------------- /firmware_mod/config/camera.conf: -------------------------------------------------------------------------------- 1 | ################# 2 | # PATH SETTINGS # 3 | ################# 4 | 5 | CONFIGPATH=/system/sdcard/config 6 | BINPATH=/system/sdcard/bin 7 | SDPATH=/system/sdcard 8 | 9 | PATH='/system/bin:/bin:/usr/bin:/sbin:/usr/sbin:/media/mmcblk0p2/data/bin:/media/mmcblk0p2/data/sbin:/media/mmcblk0p2/data/usr/bin' 10 | VERSION='v0.0.5 Beta' 11 | 12 | ################### 13 | # GLOBAL SETTINGS # 14 | ################### 15 | 16 | CONFIG_GLOBAL_VOLUME=100 17 | CONFIG_GLOBAL_OSD_POSITION='DOWN' 18 | CONFIG_GLOBAL_OSD_VALUE='[ Cam 1 ] [ Dafang ] [ %Y - %m - %d %H : %M : %S %Z %z ]' 19 | CONFIG_GLOBAL_ACCESS_USER=-1 20 | CONFIG_GLOBAL_ACCESS_PASS=-1 21 | CONFIG_GLOBAL_IR=0 22 | CONFIG_GLOBAL_IR_CUT=0 23 | CONFIG_GLOBAL_RENDER_BW=-1 24 | CONFIG_LDR_AVG=1 25 | CONFIG_GLOBAL_SPEAKER_GAIN=500 26 | 27 | 28 | ################### 29 | # ACCESS SETTINGS # 30 | ################### 31 | 32 | CONFIG_ACCESS_API=-1 33 | 34 | 35 | ################### 36 | # STREAM SETTINGS # 37 | ################### 38 | 39 | CONFIG_STREAM_WIDTH=1920 40 | CONFIG_STREAM_HEIGHT=1080 41 | CONFIG_STREAM_NIGHTMODE=2 42 | CONFIG_STREAM_FLIP=0 43 | CONFIG_STREAM_ACCESS_USER='PASS' 44 | CONFIG_STREAM_ACCESS_PASS='PASS' 45 | 46 | 47 | #################### 48 | # SNAPHOT SETTINGS # 49 | #################### 50 | 51 | CONFIG_SNAPHOT_WIDTH=1920 52 | CONFIG_SNAPHOT_HEIGHT=1080 53 | CONFIG_SNAPHOT_NIGHTMODE=2 54 | CONFIG_SNAPHOT_FLIP=0 55 | 56 | 57 | ################### 58 | # CAMERA SETTINGS # 59 | ################### 60 | 61 | CONFIG_MOTOR_NS=100 62 | -------------------------------------------------------------------------------- /firmware_mod/config/hostname.conf: -------------------------------------------------------------------------------- 1 | Dafang 2 | -------------------------------------------------------------------------------- /firmware_mod/config/htpasswd.conf: -------------------------------------------------------------------------------- 1 | # Username: Root, Password : ismart12 2 | root:AO7Ch3nYD/G0s 3 | -------------------------------------------------------------------------------- /firmware_mod/config/mqtt.dist: -------------------------------------------------------------------------------- 1 | ############################################################ 2 | # edit this file and move it to /system/sdcard/config/mqtt # 3 | ############################################################ 4 | 5 | # Options for mosquitto_sub & mosquitto_pub 6 | 7 | USER=mqtt-user 8 | PASS=mqtt-password 9 | HOST=mqtt-host 10 | PORT=1883 11 | 12 | TOPIC=topic/dafang/ 13 | # the topic used. send a message to topic/dafang/set with the payload help for help. 14 | # Results will be placed in topic/dafang/${command} or topic/dafang/error - so please subscribe topic/dafang/# for testing purposes 15 | 16 | MOSQUITTOOPTS="" 17 | # add Options for Mosquitto here. For example --cafile /system/sdcard/config/DST_Root_CA_X3.pem --tls-version tlsv1 18 | # or using a special id to connect to brokers like azure 19 | 20 | CURLOPTS="" 21 | # add options for curl here e.g --user user:password 22 | 23 | FIFO=/var/run/mqtt-sub 24 | # the FIFO used. Change it if you like to 25 | 26 | STATUSINTERVAL=30 27 | # Send a mqtt statusupdate every 30 seconds 28 | 29 | STATUSFORMAT=json 30 | # Configure format of status. Standard is text, uncomment this line for json 31 | 32 | -------------------------------------------------------------------------------- /firmware_mod/config/wpa_supplicant.conf: -------------------------------------------------------------------------------- 1 | ctrl_interface=/var/run/wpa_supplicant 2 | ctrl_interface_group=0 3 | ap_scan=1 4 | 5 | network={ 6 | ssid="SSID" 7 | key_mgmt=WPA-PSK 8 | pairwise=CCMP TKIP 9 | group=CCMP TKIP WEP104 WEP40 10 | psk="PW" 11 | priority=2 12 | } 13 | -------------------------------------------------------------------------------- /firmware_mod/daemon-scripts/listen-to-play: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -f /system/sdcard/www/cgi-bin/func.cgi ]; then 3 | source /system/sdcard/www/cgi-bin/func.cgi 4 | else 5 | echo "[`date +"%Y-%m-%d %H:%M:%S"`][ERROR] - Functions file 'func.cgi' not found." 6 | exit 1 7 | fi 8 | 9 | NAME="Listen To Play" 10 | NAME_F="listen-to-play" 11 | PIDFILE="/run/$NAME_F.pid" 12 | PID="$(cat "$PIDFILE" 2>/dev/null)" 13 | 14 | status(){ 15 | if [ "$PID" ]; then 16 | returnLog "i" "Daemon $NAME is running. PID: $PID" || return 1 17 | else 18 | returnLog "i" "Daemon $NAME is stopped." || return 0 19 | fi 20 | } 21 | 22 | start(){ 23 | if ! [ -f $PIDFILE ]; then 24 | /system/sdcard/bin/busybox mkfifo /run/$NAME_F.fifo 25 | /system/sdcard/bin/busybox nohup /system/sdcard/scripts/$NAME_F.sh &>/dev/null & 26 | echo "$!" > "$PIDFILE" 27 | if [ `ps | grep $NAME_F.sh | grep -v grep | wc -l` -eq 1 ]; then 28 | returnLog "s" "Starting Daemon $NAME. PID: $(cat "$PIDFILE" 2>/dev/null)." 29 | else 30 | returnLog "e" "An error occurred while starting Daemon $NAME." 31 | exit 1 32 | fi 33 | else 34 | returnLog "i" "Daemon $NAME already running. PID: $PID." 35 | fi 36 | } 37 | 38 | stop(){ 39 | if [ "$PID" ]; then 40 | kill $PID && rm "$PIDFILE" && rm /run/$NAME_F.fifo 41 | if [ $? -eq 0 ]; then 42 | returnLog "s" "Stoping Daemon $NAME." 43 | else 44 | returnLog "e" "An error occurred while stopping Daemon $NAME." 45 | exit 1 46 | fi 47 | else 48 | returnLog "i" "Daemon $NAME already stopped." 49 | fi 50 | } 51 | 52 | if [ $# -eq 0 ]; then 53 | start 54 | else 55 | case $1 in start|stop|status) 56 | $1 57 | ;; 58 | esac 59 | fi 60 | -------------------------------------------------------------------------------- /firmware_mod/daemon-scripts/mqtt-control: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | PIDFILE="/run/mqtt-control.pid" 3 | 4 | status() 5 | { 6 | pid="$(cat "$PIDFILE" 2>/dev/null)" 7 | if [ "$pid" ]; then 8 | kill -0 "$pid" >/dev/null && echo "PID: $pid" || return 1 9 | fi 10 | } 11 | 12 | start() 13 | { 14 | if [ -f $PIDFILE ]; then 15 | echo "MQTT Control already running"; 16 | 17 | elif [ ! -f /system/sdcard/config/mqtt ]; then 18 | echo "You have to configure mqtt first. Please see /system/sdcard/config/mqtt.dist for further instructions" 19 | else 20 | 21 | LOG=/dev/null 22 | echo "Starting MQTT - Control" 23 | /system/sdcard/bin/busybox nohup /system/sdcard/scripts/mqtt-control.sh &>/dev/null & 24 | echo "$!" > "$PIDFILE" 25 | fi 26 | } 27 | 28 | stop() 29 | { 30 | pid="$(cat "$PIDFILE" 2>/dev/null)" 31 | if [ "$pid" ]; then 32 | kill $pid && rm "$PIDFILE" 33 | killall mosquitto_sub 2>/dev/null 34 | killall mosquitto_sub.bin 2>/dev/null 35 | fi 36 | } 37 | 38 | if [ $# -eq 0 ]; then 39 | start 40 | else 41 | case $1 in start|stop|status) 42 | $1 43 | ;; 44 | esac 45 | fi 46 | 47 | -------------------------------------------------------------------------------- /firmware_mod/daemon-scripts/mqtt-status: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | PIDFILE="/run/mqtt-status.pid" 3 | 4 | status() 5 | { 6 | pid="$(cat "$PIDFILE" 2>/dev/null)" 7 | if [ "$pid" ]; then 8 | kill -0 "$pid" >/dev/null && echo "PID: $pid" || return 1 9 | fi 10 | } 11 | 12 | start() 13 | { 14 | if [ -f $PIDFILE ]; then 15 | echo "MQTT-Status already running"; 16 | 17 | else 18 | 19 | LOG=/dev/null 20 | echo "Starting MQTT-Status" 21 | /system/sdcard/bin/busybox nohup /system/sdcard/scripts/mqtt-status-interval.sh &>/dev/null & 22 | echo "$!" > "$PIDFILE" 23 | fi 24 | } 25 | 26 | stop() 27 | { 28 | pid="$(cat "$PIDFILE" 2>/dev/null)" 29 | if [ "$pid" ]; then 30 | kill $pid && rm "$PIDFILE" 31 | fi 32 | } 33 | 34 | if [ $# -eq 0 ]; then 35 | start 36 | else 37 | case $1 in start|stop|status) 38 | $1 39 | ;; 40 | esac 41 | fi 42 | 43 | -------------------------------------------------------------------------------- /firmware_mod/daemon-scripts/night-vision-detection: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | if [ -f /system/sdcard/scripts/func.sh ]; then 3 | source /system/sdcard/scripts/func.sh 4 | else 5 | echo "[`date +"%Y-%m-%d %H:%M:%S"`][ERROR] - Functions file 'func.cgi' not found." 6 | exit 1 7 | fi 8 | 9 | NAME="Night Vision Detection" 10 | NAME_F="night-vision-detection" 11 | PIDFILE="/run/$NAME_F.pid" 12 | PID="$(cat "$PIDFILE" 2>/dev/null)" 13 | COUNT_PROCESSES="$(ps | grep $NAME_F.sh | grep -v grep | wc -l)" 14 | 15 | status(){ 16 | if [ $COUNT_PROCESSES -ge 1 ]; then 17 | if [ $COUNT_PROCESSES -gt 1 ]; then 18 | returnLog "e" "Daemon $NAME started in $COUNT_PROCESSES processes." 19 | exit 1 20 | fi 21 | returnLog "i" "Daemon $NAME is running. PID: $PID" || return 1 22 | else 23 | returnLog "i" "Daemon $NAME is stopped." || return 0 24 | fi 25 | } 26 | 27 | start(){ 28 | if ! [ -f $PIDFILE -a $COUNT_PROCESSES -ge 1 ]; then 29 | /system/sdcard/bin/busybox nohup /system/sdcard/scripts/$NAME_F.sh &>/dev/null & 30 | if [ $? -eq 0 ]; then 31 | returnLog "s" "Starting Daemon $NAME. PID: $(echo "$!" > "$PIDFILE" | cat "$PIDFILE")." 32 | else 33 | returnLog "e" "An error occurred while starting Daemon $NAME." 34 | exit 1 35 | fi 36 | else 37 | returnLog "i" "Daemon $NAME already running. PID: $PID." 38 | fi 39 | } 40 | 41 | stop(){ 42 | if [ "$PID" -a $COUNT_PROCESSES -gt 1 ]; then 43 | kill $PID && rm "$PIDFILE" && rm /run/ldr 44 | if [ $? -eq 0 ]; then 45 | returnLog "s" "Stopping Daemon $NAME." 46 | else 47 | returnLog "e" "An error occurred while stopping Daemon $NAME." 48 | exit 1 49 | fi 50 | else 51 | returnLog "i" "Daemon $NAME already stopped." 52 | fi 53 | } 54 | 55 | forcestopall(){ 56 | killAll "$NAME_F.sh" &>/dev/null 57 | rm "$PIDFILE" /run/ldr &>/dev/null 58 | returnLog "i" "Daemon $NAME force stopped ($COUNT_PROCESSES processes)." 59 | } 60 | 61 | help(){ 62 | echo "./$NAME_F 63 | ./$NAME_F help 64 | Return this help. 65 | 66 | ./$NAME_F status 67 | This return info started or stopped Daemon $NAME 68 | 69 | ./$NAME_F start 70 | This will Starting Daemon $NAME 71 | 72 | ./$NAME_F stop 73 | This will stopping Daemon $NAME 74 | 75 | ./$NAME_F forcestopall 76 | This will force stopping Daemon $NAME" 77 | } 78 | 79 | if [ $# -eq 0 ]; then 80 | help 81 | else 82 | case $1 in start|stop|status|help|forcestopall) 83 | $1 84 | ;; 85 | *) 86 | help 87 | ;; 88 | esac 89 | fi 90 | -------------------------------------------------------------------------------- /firmware_mod/daemon-scripts/rtsp-h264: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | PIDFILE="/run/v4l2rtspserver-master-h264.pid" 3 | export LD_LIBRARY_PATH='/thirdlib:/system/lib' 4 | 5 | if [ -f /system/sdcard/config/osd ]; then 6 | source /system/sdcard/config/osd 2>/dev/null 7 | fi 8 | 9 | status() 10 | { 11 | pid="$(cat "$PIDFILE" 2>/dev/null)" 12 | if [ "$pid" ]; then 13 | kill -0 "$pid" >/dev/null && echo "PID: $pid" || return 1 14 | fi 15 | } 16 | 17 | start() 18 | { 19 | if ls /var/run/v4l2rtspserver* 1> /dev/null 2>&1; then 20 | echo "A v4l2rtspserver is already running, please stop it or reboot" 21 | else 22 | LOG=/dev/null 23 | echo "Starting v4l2rtspserver-master" 24 | /system/sdcard/controlscripts/rtsp-mjpeg stop 25 | # /system/sdcard/controlscripts/rtsp-h264-with-segmentation stop 26 | killall v4l2rtspserver-master # As the run.sh starts a v4l2rtspserver as well 27 | /system/sdcard/bin/busybox nohup /system/sdcard/bin/v4l2rtspserver-master &>/dev/null & 28 | echo "$!" > "$PIDFILE" 29 | if [ -f /system/sdcard/config/osd ]; then 30 | source /system/sdcard/config/osd 31 | /system/sdcard/bin/setconf -k o -v "${OSD}" 32 | fi; 33 | fi 34 | } 35 | 36 | 37 | stop() 38 | { 39 | pid="$(cat "$PIDFILE" 2>/dev/null)" 40 | if [ "$pid" ]; then 41 | kill $pid & rm "$PIDFILE" 1> /dev/null 2>&1 42 | fi 43 | } 44 | 45 | if [ $# -eq 0 ]; then 46 | start 47 | else 48 | case $1 in start|startnight|stop|status) 49 | $1 50 | ;; 51 | esac 52 | fi 53 | 54 | -------------------------------------------------------------------------------- /firmware_mod/daemon-scripts/rtsp-mjpeg: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | PIDFILE="/run/v4l2rtspserver-master-mjpeg.pid" 3 | export LD_LIBRARY_PATH='/thirdlib:/system/lib' 4 | 5 | if [ -f /system/sdcard/config/osd ]; then 6 | source /system/sdcard/config/osd 2>/dev/null 7 | fi 8 | 9 | status() 10 | { 11 | pid="$(cat "$PIDFILE" 2>/dev/null)" 12 | if [ "$pid" ]; then 13 | kill -0 "$pid" >/dev/null && echo "PID: $pid" || return 1 14 | fi 15 | } 16 | 17 | start() 18 | { 19 | if ls /var/run/v4l2rtspserver* 1> /dev/null 2>&1; then 20 | echo "A v4l2rtspserver is already running, please stop it or reboot" 21 | else 22 | LOG=/dev/null 23 | echo "Starting v4l2rtspserver-master with parameter -fMJPG" 24 | /system/sdcard/controlscripts/rtsp-h264 stop 25 | # /system/sdcard/controlscripts/rtsp-h264-with-segmentation stop 26 | killall v4l2rtspserver-master # As the run.sh starts a v4l2rtspserver as well 27 | /system/sdcard/bin/busybox nohup /system/sdcard/bin/v4l2rtspserver-master -fMJPG &>/dev/null & 28 | echo "$!" > "$PIDFILE" 29 | if [ -f /system/sdcard/config/osd ]; then 30 | source /system/sdcard/config/osd 31 | /system/sdcard/bin/setconf -k o -v "${OSD}" 32 | fi; 33 | fi 34 | } 35 | 36 | stop() 37 | { 38 | pid="$(cat "$PIDFILE" 2>/dev/null)" 39 | if [ "$pid" ]; then 40 | kill $pid & rm "$PIDFILE" 1> /dev/null 2>&1 41 | fi 42 | } 43 | 44 | if [ $# -eq 0 ]; then 45 | start 46 | else 47 | case $1 in start|startnight|stop|status) 48 | $1 49 | ;; 50 | esac 51 | fi 52 | 53 | -------------------------------------------------------------------------------- /firmware_mod/daemon-scripts/sound-on-startup: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | status() 4 | { 5 | if [ -f /system/sdcard/config/autostart/sound-on-startup ]; then echo "enabled"; fi 6 | } 7 | 8 | start() 9 | { 10 | LOG=/dev/null 11 | UPTIME=`cat /proc/uptime | sed 's/\..*//g` 12 | 13 | if [ ! -f /system/sdcard/config/autostart/sound-on-startup ] && [ $UPTIME -gt 60 ] ; then 14 | echo "#!/bin/sh" > "/system/sdcard/config/autostart/sound-on-startup" 15 | echo "/system/sdcard/controlscripts/sound-on-startup" >> "/system/sdcard/config/autostart/sound-on-startup" 16 | echo "enabling sound on startup" 17 | fi 18 | 19 | # Don't play sound on activation 20 | if [ $UPTIME -lt 60 ]; then 21 | /system/sdcard/bin/ossplay /usr/share/notify/CN/speaker.wav & 22 | echo "Please configure this option at least 1 minute after system startup" 23 | fi 24 | 25 | } 26 | 27 | stop() 28 | { 29 | echo "disabling sound on startup" 30 | rm /system/sdcard/config/autostart/sound-on-startup 31 | 32 | } 33 | 34 | if [ $# -eq 0 ]; then 35 | start 36 | else 37 | case $1 in start|stop|status) 38 | $1 39 | ;; 40 | esac 41 | fi 42 | 43 | -------------------------------------------------------------------------------- /firmware_mod/driver/audio.ko: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/driver/audio.ko -------------------------------------------------------------------------------- /firmware_mod/driver/sample_motor.ko: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/driver/sample_motor.ko -------------------------------------------------------------------------------- /firmware_mod/driver/sensor_jxf22.ko: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/driver/sensor_jxf22.ko -------------------------------------------------------------------------------- /firmware_mod/driver/tx-isp.ko: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/driver/tx-isp.ko -------------------------------------------------------------------------------- /firmware_mod/lib/libcrypto.so.42: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/lib/libcrypto.so.42 -------------------------------------------------------------------------------- /firmware_mod/lib/libmosquitto.so.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/lib/libmosquitto.so.1 -------------------------------------------------------------------------------- /firmware_mod/lib/libmosquittopp.so.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/lib/libmosquittopp.so.1 -------------------------------------------------------------------------------- /firmware_mod/lib/libssl.so.44: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/lib/libssl.so.44 -------------------------------------------------------------------------------- /firmware_mod/lib/libusb-0.1.so.4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/lib/libusb-0.1.so.4 -------------------------------------------------------------------------------- /firmware_mod/lib/libusb-1.0.so.0: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/lib/libusb-1.0.so.0 -------------------------------------------------------------------------------- /firmware_mod/lib/libz.so.1: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/lib/libz.so.1 -------------------------------------------------------------------------------- /firmware_mod/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | CONFIGPATH=/system/sdcard/config 4 | echo "Starting up CFW" 5 | 6 | ## Update hostname: 7 | hostname -F $CONFIGPATH/hostname.conf 8 | 9 | ## Get real Mac address from config file: 10 | MAC=`cat /params/config/.product_config | grep MAC | cut -c16-27 | sed 's/\(..\)/\1:/g;s/:$//'` 11 | 12 | ## Start Wifi: 13 | insmod /driver/8189es.ko rtw_initmac="$MAC" 14 | wpa_supplicant -B -i wlan0 -c $CONFIGPATH/wpa_supplicant.conf -P /var/run/wpa_supplicant.pid 15 | udhcpc -i wlan0 -p /var/run/udhcpc.pid -b -x hostname:`hostname` 16 | 17 | ## Start Audio: 18 | insmod /system/sdcard/driver/audio.ko 19 | 20 | ## Start GPIO: 21 | setgpio () { 22 | GPIOPIN=$1 23 | echo $GPIOPIN > /sys/class/gpio/export 24 | echo out > /sys/class/gpio/gpio$GPIOPIN/direction 25 | echo 0 > /sys/class/gpio/gpio$GPIOPIN/active_low 26 | echo 1 > /sys/class/gpio/gpio$GPIOPIN/value 27 | } 28 | # IR-LED 29 | setgpio 49 30 | echo 1 > /sys/class/gpio/gpio49/active_low 31 | echo 1 > /sys/class/gpio/gpio49/value 32 | # Yellow-LED 33 | setgpio 38 34 | echo 0 > /sys/class/gpio/gpio38/value 35 | # Blue-LED 36 | setgpio 39 37 | # IR-Cut: 38 | setgpio 25 39 | setgpio 26 40 | 41 | # Startup Motor: 42 | insmod /system/sdcard/driver/sample_motor.ko 43 | 44 | 45 | 46 | ## Start Sensor: 47 | insmod /system/sdcard/driver/tx-isp.ko isp_clk=100000000 48 | insmod /system/sdcard/driver/sensor_jxf22.ko data_interface=2 pwdn_gpio=-1 reset_gpio=18 sensor_gpio_func=0 49 | 50 | ## Update time 51 | /system/sdcard/bin/busybox ntpd -q -n -p time.google.com 52 | 53 | ## Start FTP & SSH 54 | /system/sdcard/bin/dropbearmulti dropbear -R 55 | /system/sdcard/bin/bftpd -d 56 | 57 | ## Start Webserver: 58 | /system/sdcard/bin/boa -c /system/sdcard/config/ 59 | 60 | ## Get OSD-Information 61 | if [ -f /system/sdcard/config/osd ]; then 62 | source /system/sdcard/config/osd 2>/dev/null 63 | fi 64 | 65 | ## Autostart 66 | for i in `ls /system/sdcard/config/autostart/`; do /system/sdcard/config/autostart/$i; done 67 | 68 | #Start 69 | 70 | /system/sdcard/bin/busybox nohup /system/sdcard/bin/v4l2rtspserver -fMJPG -W 1920 -H 1080 -F 10 &>/dev/null & 71 | 72 | if [ -f /system/sdcard/config/osd ]; then 73 | source /system/sdcard/config/osd 74 | /system/sdcard/bin/setconf -k o -v "${OSD}" 75 | fi; 76 | 77 | 78 | echo "Startup finished!" 79 | /system/sdcard/bin/ossplay -g 100 /system/sdcard/sounds/startup.wav & 80 | -------------------------------------------------------------------------------- /firmware_mod/scripts/func.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -f /system/sdcard/config/camera.conf ]; then 4 | source /system/sdcard/config/camera.conf 5 | else 6 | getReturn 123 "error" "Configuration file 'camera.conf' not found." 7 | exit 1 8 | fi 9 | 10 | # START FUNCTIONS 11 | setGpio(){ 12 | echo $2 > /sys/class/gpio/gpio$1/value 13 | if [ $( cat /sys/class/gpio/gpio$1/value ) -eq "$2" ]; then 14 | true 15 | else 16 | false 17 | fi 18 | } 19 | # setGpio 49 0 20 | 21 | getReturn(){ 22 | echo "Content-type: application/json; charset=utf-8; Pragma: no-cache; Expires: Wednesday, 27-Dec-95 05:29:10 GMT" 23 | echo "" 24 | echo "{ 25 | \"code\": $1, 26 | \"status\": \"$2\", 27 | \"description\": \"$3\" 28 | }" 29 | } 30 | # getReturn 123 "sc" "desc" 31 | 32 | returnLog(){ 33 | if [ $1 == "s" ]; then 34 | echo -e "\e[1;97m[\e[0m`date +"%Y-%m-%d %H:%M:%S"`\e[1;97m][\e[1;32mSUCCESS\e[1;97m]\e[1;39m - $2\e[0m" 35 | elif [ $1 == "i" ]; then 36 | echo -e "\e[1;97m[\e[0m`date +"%Y-%m-%d %H:%M:%S"`\e[1;97m][\e[1;33mINFO\e[1;97m]\e[1;39m - $2\e[0m" 37 | elif [ $1 == "e" ]; then 38 | echo -e "\e[1;97m[\e[0m`date +"%Y-%m-%d %H:%M:%S"`\e[1;97m][\e[1;31mERROR\e[1;97m]\e[1;39m - $2\e[0m" 39 | fi 40 | } 41 | # returnLog "s" "Log data" 42 | 43 | runWithValid(){ 44 | $1 45 | if ! [ $? -eq 0 ]; then 46 | returnLog "e" "An error occurred while $2." 47 | exit 1 48 | fi 49 | } 50 | # runWithValid "command" "return second text" 51 | 52 | killAll(){ 53 | ps | grep "$1" | awk '{print $1}' | xargs kill 54 | } 55 | # END FUNCTIONS 56 | 57 | # Source: http://isquared.nl/blog/2008/11/01/Bourne-Bash-Shell-CGI-Scripts/ 58 | 59 | _DEBUG_= 60 | 61 | if [ "${REQUEST_METHOD}" = "POST" ] 62 | then 63 | POST_QUERY_STRING=`dd bs=1 count=${CONTENT_LENGTH} 2>/dev/null` 64 | if [ "${QUERY_STRING}" != "" ] 65 | then 66 | QUERY_STRING=${POST_QUERY_STRING}"&"${QUERY_STRING} 67 | else 68 | QUERY_STRING=${POST_QUERY_STRING}"&" 69 | fi 70 | fi 71 | 72 | #echo "Content-type: text/plain"; echo 73 | 74 | _IFS=${IFS}; IFS=\& 75 | i=0 76 | for _VAR in ${QUERY_STRING} 77 | do 78 | if [ ${_DEBUG_} ] 79 | then 80 | i=`expr $i + 1`; echo "--- ENTER LOOP $i ---" 81 | echo _VAR: ${_VAR} 82 | echo -n variable: `echo ${_VAR} | cut -d= -f1`" " 83 | echo value: `echo ${_VAR} | cut -d= -f2` 84 | fi 85 | 86 | eval "`echo F_${_VAR} | cut -d= -f1`=`echo ${_VAR} | cut -d= -f2`" 87 | 88 | if [ ${_DEBUG_} ] 89 | then 90 | echo "--- EXIT LOOP $i ---" 91 | fi 92 | done 93 | IFS=${_IFS} 94 | unset i _IFS _VAR 95 | 96 | if [ ${_DEBUG_} ] 97 | then 98 | echo query string: ${QUERY_STRING} 99 | echo post-part of query string: ${POST_QUERY_STRING} 100 | fi 101 | -------------------------------------------------------------------------------- /firmware_mod/scripts/iwlist.awk: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | awk ' 4 | 5 | BEGIN { OFS = "\t"; } 6 | 7 | /\ "Quality", q[2] -> value 30 | split(q[2], qvalues, "/"); 31 | if (qvalues[2]) { 32 | quality = int(qvalues[1] / qvalues[2] * 100); # we have both parts, divide 33 | } else { 34 | quality = qvalues[1]; # we have only one part, use it as-is 35 | } 36 | } 37 | 38 | /\/dev/null 4 | # next two lines are a little bit cruel 5 | killall mosquitto_sub 2> /dev/null 6 | killall mosquitto_sub.bin 2> /dev/null 7 | 8 | export LD_LIBRARY_PATH='/thirdlib:/system/lib:/system/sdcard/lib' 9 | 10 | /system/sdcard/bin/mosquitto_sub.bin -h $HOST -u $USER -P $PASS -t ${TOPIC}set ${MOSQUITTOOPTS} ${MOSQUITTOSUBOPTS} > $FIFO 2> /dev/null & 11 | 12 | 13 | while read line < $FIFO 14 | do 15 | case $line in 16 | 17 | help) 18 | /system/sdcard/bin/mosquitto_pub.bin -h $HOST -u $USER -P $PASS -t ${TOPIC}help -m "possible commands: status, osd (followed by new osd-text), `grep \)$ /system/sdcard/www/cgi-bin/action.cgi | grep -v \= | grep -v \* | sed -e "s/ //g" | grep -v osd | grep -v setldr | grep -v settz | grep -v showlog | sed -e "s/)//g"`" 19 | ;; 20 | 21 | status) 22 | /system/sdcard/bin/mosquitto_pub.bin -h $HOST -u $USER -P $PASS -t ${TOPIC}status -m "`/system/sdcard/scripts/mqtt-status.sh`" 23 | ;; 24 | 25 | osd*) 26 | osdtext=`echo "$line" | sed -e "s/^osd //"` 27 | /system/sdcard/bin/setconf -k o -v "$osdtext" 28 | echo "OSD=\"${osdtext}\"" > /system/sdcard/config/osd 29 | ;; 30 | 31 | *) 32 | /system/sdcard/bin/curl -m 2 ${CURLOPTS} -s http://127.0.0.1/cgi-bin/action.cgi\?cmd\=${line} -o /dev/null 2>/dev/null 33 | if [ $? -eq "0" ]; 34 | then 35 | 36 | /system/sdcard/bin/mosquitto_pub.bin -h $HOST -u $USER -P $PASS -t ${TOPIC}${line} -m "OK (this means: action.cgi invoke with parameter ${line}, nothing more, nothing less)" 37 | 38 | else 39 | /system/sdcard/bin/mosquitto_pub.bin -h $HOST -u $USER -P $PASS -t ${TOPIC}error -m "An error occured when executing ${line}" 40 | 41 | fi 42 | ;; 43 | esac 44 | done 45 | 46 | -------------------------------------------------------------------------------- /firmware_mod/scripts/mqtt-status-interval.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | source /system/sdcard/config/mqtt 3 | export LD_LIBRARY_PATH='/thirdlib:/system/lib:/system/sdcard/lib' 4 | 5 | if [ $STATUSINTERVAL -lt 30 ]; then STATUSINTERVAL=30; fi 6 | 7 | while true 8 | do 9 | /system/sdcard/bin/mosquitto_pub.bin -h $HOST -u $USER -P $PASS -t ${TOPIC}status -m "`/system/sdcard/scripts/mqtt-status.sh`" 10 | sleep $STATUSINTERVAL 11 | done 12 | 13 | -------------------------------------------------------------------------------- /firmware_mod/scripts/mqtt-status.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | source /system/sdcard/config/mqtt 3 | 4 | getgpio(){ 5 | GPIOPIN=$1 6 | cat /sys/class/gpio/gpio$GPIOPIN/value 7 | } 8 | 9 | ## Uptime 10 | UPTIME=`/system/sdcard/bin/busybox uptime` 11 | 12 | ## Wifi 13 | SSID=`/system/bin/iwconfig 2>/dev/null | grep ESSID | sed -e "s/.*ESSID:\"//" | sed -e "s/\".*//"` 14 | BITRATE=`/system/bin/iwconfig 2>/dev/null | grep "Bit R" | sed -e "s/ S.*//" | sed -e "s/.*\://"` 15 | QUALITY=`/system/bin/iwconfig 2>/dev/null | grep "Quali" | sed -e "s/ *//"` 16 | 17 | ## LED Status - (@pplucky & @lolouk44) 18 | 19 | # Blue Led 20 | blue=$(getgpio 39) 21 | if [ "$blue" == "0" ]; then blue="on"; fi 22 | if [ "$blue" == "1" ]; then blue="off"; fi 23 | 24 | # Yellow Led 25 | yellow=$(getgpio 38) 26 | if [ "$yellow" == "0" ]; then yellow="on"; fi 27 | if [ "$yellow" == "1" ]; then yellow="off"; fi 28 | 29 | # IR Cut 30 | ir_cut=$(getgpio 26) 31 | if [ "$ir_cut" == "0" ]; then ir_cut="on"; fi 32 | if [ "$ir_cut" == "1" ]; then ir_cut="off"; fi 33 | 34 | 35 | # IR Led 36 | ir_led=$(getgpio 49) 37 | if [ "$ir_led" == "0" ]; then ir_led="on"; fi 38 | if [ "$ir_led" == "1" ]; then ir_led="off"; fi 39 | 40 | 41 | 42 | ## RTSP status 43 | string=$(pidof v4l2rtspserver-master) 44 | if [[ ${#string} == "0" ]]; then 45 | RTSPRUNNING="not running" 46 | else 47 | RTSPRUNNING="running" 48 | fi 49 | 50 | 51 | if [ "$STATUSFORMAT" == "json" ]; then 52 | 53 | NOISELEVEL=`echo $QUALITY | awk '{ print $6}' | sed -e 's/.*=//' | sed -e 's/\/100/\%/'` 54 | LINKQUALITY=`echo $QUALITY | awk '{ print $2}' | sed -e 's/.*=//' | sed -e 's/\/100/\%/'` 55 | SIGNALLEVEL=`echo $QUALITY | awk '{ print $4}' | sed -e 's/.*=//' | sed -e 's/\/100/\%/'` 56 | 57 | 58 | echo "{\"Uptime\":\"$UPTIME\", \"RTSP-Server\":\"$RTSPRUNNING\", \"IR-Cut\":\"$ir_cut\", \"Wifi\":{\"SSID\":\"$SSID\", \"Bitrate\":\"$BITRATE\", \"SignalLevel\":\"$SIGNALLEVEL\", \"Linkquality\":\"$LINKQUALITY\", \"NoiseLevel\":\"$NOISELEVEL\"}, \"LEDs\":{\"Blue\":\"$blue\", \"Yellow\":\"$yellow\", \"Infrared\":\"$ir_led\"}}" 59 | 60 | 61 | else 62 | echo "$UPTIME - " 63 | echo "SSID: $SSID, Bitrate: $BITRATE, $QUALITY - " 64 | echo "LEDs: blue=$blue, yellow=$yellow, IR=$ir_led - " 65 | echo "IR-Cut=$ir_cut - " 66 | echo "RTSP-Server: $RTSPRUNNING" 67 | fi 68 | 69 | 70 | ## enable this for the format used befor 71 | # echo $blue,$yellow,$ir_cut,$ir_led,$rstp 72 | -------------------------------------------------------------------------------- /firmware_mod/scripts/night-vision-detection.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -f /system/sdcard/scripts/func.sh ]; then 4 | source /system/sdcard/scripts/func.sh 5 | else 6 | echo "[`date +"%Y-%m-%d %H:%M:%S"`][ERROR] - Functions file 'func.cgi' not found." 7 | exit 1 8 | fi 9 | 10 | 11 | while true 12 | do 13 | 14 | if [ -z $CONFIG_LDR_AVG ]; then CONFIG_LDR_AVG=1; fi 15 | # if no config availabe, use 1 as average 16 | 17 | dd if=/dev/jz_adc_aux_0 count=20 | sed -e 's/[^\.]//g' | wc -m >> /run/ldr &>/dev/null 18 | # add new line to file with measurements 19 | 20 | tail -n $CONFIG_LDR_AVG /run/ldr > /run/ldr_tmp 21 | mv /run/ldr_tmp /run/ldr 22 | # cut /var/run/ldr to desired number of lines 23 | 24 | LINES=`cat /run/ldr | wc -l` 25 | if [ $LINES -lt $CONFIG_LDR_AVG ]; then CONFIG_LDR_AVG=$LINES; fi 26 | # to avoid slow switching when starting up, use the number of lines when there are less than the average 27 | # this may cause some flickering when starting up 28 | 29 | SUM=`awk '{s+=$1} END {printf "%.0f", s}' /run/ldr` 30 | [[ ! $SUM -eq 0 -o ! $CONFIG_LDR_AVG -eq 0 ]] && AVGMEASUREMENT=$(( $SUM / $CONFIG_LDR_AVG )) || AVGMEASUREMENT=0 # calculate the average 31 | 32 | if [ $AVGMEASUREMENT -lt 50 ]; then # light detected 33 | 34 | if [ $CONFIG_GLOBAL_RENDER_BW -eq 0 -o ! $CONFIG_GLOBAL_RENDER_BW -eq 0 -a ! $CONFIG_GLOBAL_RENDER_BW -eq 1 ]; then 35 | runWithValid "$BINPATH/setconf -k n -v 0" "switch v4l2rtspserver to day vision" 36 | elif [ $CONFIG_GLOBAL_RENDER_BW -eq 1 ]; then 37 | runWithValid "$BINPATH/setconf -k n -v 1" "switch v4l2rtspserver to night vision" 38 | fi 39 | 40 | if [ $CONFIG_GLOBAL_IR -eq 0 -o ! $CONFIG_GLOBAL_IR -eq 0 -a ! $CONFIG_GLOBAL_IR -eq 1 ]; then 41 | runWithValid "setGpio 49 1" "changing IR LED to disable" 42 | elif [ $CONFIG_GLOBAL_IR -eq 1 ]; then 43 | runWithValid "setGpio 49 0" "changing IR LED to enable" 44 | fi 45 | 46 | if [ $CONFIG_GLOBAL_IR_CUT -eq 1 -o ! $CONFIG_GLOBAL_IR_CUT -eq 0 -a ! $CONFIG_GLOBAL_IR_CUT -eq 1 ]; then 47 | runWithValid "setGpio 25 0 && setGpio 26 1" "changing IR CUT to enable" 48 | elif [ $CONFIG_GLOBAL_IR_CUT -eq 0 ]; then 49 | runWithValid "setGpio 25 1 && setGpio 26 0" "changing IR CUT to disable" 50 | fi 51 | 52 | else # nothing in Buffer -> no light 53 | 54 | if [ $CONFIG_GLOBAL_RENDER_BW -eq 1 -o ! $CONFIG_GLOBAL_RENDER_BW -eq 0 -a ! $CONFIG_GLOBAL_RENDER_BW -eq 1 ]; then 55 | runWithValid "$BINPATH/setconf -k n -v 1" "switch v4l2rtspserver to night vision" 56 | elif [ $CONFIG_GLOBAL_RENDER_BW -eq 0 ]; then 57 | runWithValid "$BINPATH/setconf -k n -v 0" "switch v4l2rtspserver to day vision" 58 | fi 59 | 60 | if [ $CONFIG_GLOBAL_IR -eq 1 -o ! $CONFIG_GLOBAL_IR -eq 0 -a ! $CONFIG_GLOBAL_IR -eq 1 ]; then 61 | runWithValid "setGpio 49 0" "changing IR LED to enable" 62 | elif [ $CONFIG_GLOBAL_IR -eq 0 ]; then 63 | runWithValid "setGpio 49 1" "changing IR LED to disable" 64 | fi 65 | 66 | if [ $CONFIG_GLOBAL_IR_CUT -eq 0 -o ! $CONFIG_GLOBAL_IR_CUT -eq 0 -a ! $CONFIG_GLOBAL_IR_CUT -eq 1 ]; then 67 | runWithValid "setGpio 25 1 && setGpio 26 0" "changing IR CUT to disable" 68 | elif [ $CONFIG_GLOBAL_IR_CUT -eq 1 ]; then 69 | runWithValid "setGpio 25 0 && setGpio 26 1" "changing IR CUT to enable" 70 | fi 71 | 72 | fi 73 | sleep 10 74 | done 75 | -------------------------------------------------------------------------------- /firmware_mod/scripts/update-configuration.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -f /system/sdcard/scripts/func.sh ]; then 4 | source /system/sdcard/scripts/func.sh 5 | else 6 | echo "[`date +"%Y-%m-%d %H:%M:%S"`][ERROR] - Functions file 'func.sh' not found." 7 | exit 1 8 | fi 9 | 10 | runWithValid "cp -f /system/sdcard/config/camera.conf /run/camera.conf" "copy 'camera.conf' from microSD to '/run/camera.conf'" 11 | 12 | while [ true ] 13 | do 14 | set -a;source /system/sdcard/config/camera.conf;set +a 15 | # runWithValid "set -o allexport;source /system/sdcard/config/camera.conf;set +o allexport" "update configuration from 'camera.conf' file" 16 | sleep 10 17 | done 18 | -------------------------------------------------------------------------------- /firmware_mod/sounds/startup.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/sounds/startup.wav -------------------------------------------------------------------------------- /firmware_mod/sounds/voice/en/code_ok.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/sounds/voice/en/code_ok.wav -------------------------------------------------------------------------------- /firmware_mod/sounds/voice/en/code_wrong.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/sounds/voice/en/code_wrong.wav -------------------------------------------------------------------------------- /firmware_mod/sounds/voice/en/connect_wifi_ok.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/sounds/voice/en/connect_wifi_ok.wav -------------------------------------------------------------------------------- /firmware_mod/sounds/voice/en/connecting.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/sounds/voice/en/connecting.wav -------------------------------------------------------------------------------- /firmware_mod/sounds/voice/en/copy.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/sounds/voice/en/copy.wav -------------------------------------------------------------------------------- /firmware_mod/sounds/voice/en/dang.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/sounds/voice/en/dang.wav -------------------------------------------------------------------------------- /firmware_mod/sounds/voice/en/get_msg.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/sounds/voice/en/get_msg.wav -------------------------------------------------------------------------------- /firmware_mod/sounds/voice/en/init_ok.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/sounds/voice/en/init_ok.wav -------------------------------------------------------------------------------- /firmware_mod/sounds/voice/en/update_system.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/sounds/voice/en/update_system.wav -------------------------------------------------------------------------------- /firmware_mod/sounds/voice/en/waiting_to_connecting.wav: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/sounds/voice/en/waiting_to_connecting.wav -------------------------------------------------------------------------------- /firmware_mod/www/DCIM/assets/css/styles.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | 3 | 4 | /*------------------------- 5 | Simple reset 6 | --------------------------*/ 7 | 8 | *{ 9 | margin:0; 10 | padding:0; 11 | } 12 | 13 | 14 | /*------------------------- 15 | Demo page 16 | -------------------------*/ 17 | 18 | body { 19 | background-color: #23232e; 20 | font: 14px normal Arial, Helvetica, sans-serif; 21 | z-index: -4; 22 | } 23 | 24 | 25 | /*------------------------- 26 | File manager 27 | -------------------------*/ 28 | 29 | 30 | .filemanager { 31 | width: 95%; 32 | max-width:1340px; 33 | position: relative; 34 | margin: 100px auto 50px; 35 | } 36 | 37 | @media all and (max-width: 965px) { 38 | .filemanager { 39 | margin: 30px auto 0; 40 | padding: 1px; 41 | } 42 | } 43 | 44 | 45 | /*------------------------- 46 | Breadcrumps 47 | -------------------------*/ 48 | 49 | 50 | .filemanager .breadcrumbs { 51 | color: #ffffff; 52 | margin-left:20px; 53 | font-size: 24px; 54 | font-weight: 700; 55 | line-height: 35px; 56 | } 57 | 58 | .filemanager .breadcrumbs a:link, .breadcrumbs a:visited { 59 | color: #ffffff; 60 | text-decoration: none; 61 | } 62 | 63 | .filemanager .breadcrumbs a:hover { 64 | text-decoration: underline; 65 | } 66 | 67 | .filemanager .breadcrumbs .arrow { 68 | color: #6a6a72; 69 | font-size: 24px; 70 | font-weight: 700; 71 | line-height: 20px; 72 | } 73 | 74 | 75 | /*------------------------- 76 | Search box 77 | -------------------------*/ 78 | 79 | 80 | .filemanager .search { 81 | position: absolute; 82 | padding-right: 30px; 83 | cursor: pointer; 84 | right: 0; 85 | font-size: 17px; 86 | color: #ffffff; 87 | display: block; 88 | width: 40px; 89 | height: 40px; 90 | } 91 | 92 | .filemanager .search:before { 93 | content: ''; 94 | position: absolute; 95 | margin-top:12px; 96 | width: 10px; 97 | height: 11px; 98 | border-radius: 50%; 99 | border: 2px solid #ffffff; 100 | right: 8px; 101 | } 102 | 103 | .filemanager .search:after { 104 | content: ''; 105 | width: 3px; 106 | height: 10px; 107 | background-color: #ffffff; 108 | border-radius: 2px; 109 | position: absolute; 110 | top: 23px; 111 | right: 6px; 112 | -webkit-transform: rotate(-45deg); 113 | transform: rotate(-45deg); 114 | } 115 | 116 | .filemanager .search input[type=search] { 117 | border-radius: 2px; 118 | color: #4D535E; 119 | background-color: #FFF; 120 | width: 250px; 121 | height: 44px; 122 | margin-left: -215px; 123 | padding-left: 20px; 124 | text-decoration-color: #4d535e; 125 | font-size: 16px; 126 | font-weight: 400; 127 | line-height: 20px; 128 | display: none; 129 | outline: none; 130 | border: none; 131 | padding-right: 10px; 132 | -webkit-appearance: none; 133 | } 134 | 135 | ::-webkit-input-placeholder { /* WebKit browsers */ 136 | color: #4d535e; 137 | } 138 | :-moz-placeholder { /* Mozilla Firefox 4 to 18 */ 139 | color: #4d535e; 140 | opacity: 1; 141 | } 142 | ::-moz-placeholder { /* Mozilla Firefox 19+ */ 143 | color: #4d535e; 144 | opacity: 1; 145 | } 146 | :-ms-input-placeholder { /* Internet Explorer 10+ */ 147 | color: #4d535e; 148 | } 149 | 150 | 151 | /*------------------------- 152 | Content area 153 | -------------------------*/ 154 | 155 | .filemanager .data { 156 | margin-top: 60px; 157 | z-index: -3; 158 | } 159 | 160 | .filemanager .data.animated { 161 | -webkit-animation: showSlowlyElement 700ms; /* Chrome, Safari, Opera */ 162 | animation: showSlowlyElement 700ms; /* Standard syntax */ 163 | } 164 | 165 | .filemanager .data li { 166 | border-radius: 3px; 167 | background-color: #373743; 168 | width: 307px; 169 | height: 118px; 170 | list-style-type: none; 171 | margin: 10px; 172 | display: inline-block; 173 | position: relative; 174 | overflow: hidden; 175 | padding: 0.3em; 176 | z-index: 1; 177 | cursor: pointer; 178 | box-sizing: border-box; 179 | transition: 0.3s background-color; 180 | } 181 | 182 | .filemanager .data li:hover { 183 | background-color: #42424E; 184 | 185 | } 186 | 187 | .filemanager .data li a { 188 | position: absolute; 189 | top: 0; 190 | left: 0; 191 | width: 100%; 192 | height: 100%; 193 | } 194 | 195 | .filemanager .data li .name { 196 | color: #ffffff; 197 | font-size: 15px; 198 | font-weight: 700; 199 | line-height: 20px; 200 | width: 150px; 201 | white-space: nowrap; 202 | display: inline-block; 203 | position: absolute; 204 | overflow: hidden; 205 | text-overflow: ellipsis; 206 | top: 40px; 207 | } 208 | 209 | .filemanager .data li .details { 210 | color: #b6c1c9; 211 | font-size: 13px; 212 | font-weight: 400; 213 | width: 55px; 214 | height: 10px; 215 | top: 64px; 216 | white-space: nowrap; 217 | position: absolute; 218 | display: inline-block; 219 | } 220 | 221 | .filemanager .nothingfound { 222 | background-color: #373743; 223 | width: 23em; 224 | height: 21em; 225 | margin: 0 auto; 226 | display: none; 227 | font-family: Arial; 228 | -webkit-animation: showSlowlyElement 700ms; /* Chrome, Safari, Opera */ 229 | animation: showSlowlyElement 700ms; /* Standard syntax */ 230 | } 231 | 232 | .filemanager .nothingfound .nofiles { 233 | margin: 30px auto; 234 | top: 3em; 235 | border-radius: 50%; 236 | position:relative; 237 | background-color: #d72f6e; 238 | width: 11em; 239 | height: 11em; 240 | line-height: 11.4em; 241 | } 242 | .filemanager .nothingfound .nofiles:after { 243 | content: '×'; 244 | position: absolute; 245 | color: #ffffff; 246 | font-size: 14em; 247 | margin-right: 0.092em; 248 | right: 0; 249 | } 250 | 251 | .filemanager .nothingfound span { 252 | margin: 0 auto auto 6.8em; 253 | color: #ffffff; 254 | font-size: 16px; 255 | font-weight: 700; 256 | line-height: 20px; 257 | height: 13px; 258 | position: relative; 259 | top: 2em; 260 | } 261 | 262 | @media all and (max-width:965px) { 263 | 264 | .filemanager .data li { 265 | width: 100%; 266 | margin: 5px 0; 267 | } 268 | 269 | } 270 | 271 | /* Chrome, Safari, Opera */ 272 | @-webkit-keyframes showSlowlyElement { 273 | 100% { transform: scale(1); opacity: 1; } 274 | 0% { transform: scale(1.2); opacity: 0; } 275 | } 276 | 277 | /* Standard syntax */ 278 | @keyframes showSlowlyElement { 279 | 100% { transform: scale(1); opacity: 1; } 280 | 0% { transform: scale(1.2); opacity: 0; } 281 | } 282 | 283 | 284 | /*------------------------- 285 | Icons 286 | -------------------------*/ 287 | 288 | .icon { 289 | font-size: 23px; 290 | } 291 | .icon.folder { 292 | display: inline-block; 293 | margin: 1em; 294 | background-color: transparent; 295 | overflow: hidden; 296 | } 297 | .icon.folder:before { 298 | content: ''; 299 | float: left; 300 | background-color: #7ba1ad; 301 | 302 | width: 1.5em; 303 | height: 0.45em; 304 | 305 | margin-left: 0.07em; 306 | margin-bottom: -0.07em; 307 | 308 | border-top-left-radius: 0.1em; 309 | border-top-right-radius: 0.1em; 310 | 311 | box-shadow: 1.25em 0.25em 0 0em #7ba1ad; 312 | } 313 | .icon.folder:after { 314 | content: ''; 315 | float: left; 316 | clear: left; 317 | 318 | background-color: #a0d4e4; 319 | width: 3em; 320 | height: 2.25em; 321 | 322 | border-radius: 0.1em; 323 | } 324 | .icon.folder.full:before { 325 | height: 0.55em; 326 | } 327 | .icon.folder.full:after { 328 | height: 2.15em; 329 | box-shadow: 0 -0.12em 0 0 #ffffff; 330 | } 331 | 332 | .icon.file { 333 | width: 2.5em; 334 | height: 3em; 335 | line-height: 3em; 336 | text-align: center; 337 | border-radius: 0.25em; 338 | color: #FFF; 339 | display: inline-block; 340 | margin: 0.9em 1.2em 0.8em 1.3em; 341 | position: relative; 342 | overflow: hidden; 343 | box-shadow: 1.74em -2.1em 0 0 #A4A7AC inset; 344 | text-overflow: ellipsis; 345 | } 346 | 347 | .icon.file:first-line { 348 | font-size: 13px; 349 | font-weight: 700; 350 | } 351 | .icon.file:after { 352 | content: ''; 353 | position: absolute; 354 | z-index: -1; 355 | border-width: 0; 356 | border-bottom: 2.6em solid #DADDE1; 357 | border-right: 2.22em solid rgba(0, 0, 0, 0); 358 | top: -34.5px; 359 | right: -4px; 360 | } 361 | 362 | .icon.file.f-avi, 363 | .icon.file.f-flv, 364 | .icon.file.f-mkv, 365 | .icon.file.f-mov, 366 | .icon.file.f-mpeg, 367 | .icon.file.f-mpg, 368 | .icon.file.f-mp4, 369 | .icon.file.f-m4v, 370 | .icon.file.f-wmv { 371 | box-shadow: 1.74em -2.1em 0 0 #7e70ee inset; 372 | } 373 | .icon.file.f-avi:after, 374 | .icon.file.f-flv:after, 375 | .icon.file.f-mkv:after, 376 | .icon.file.f-mov:after, 377 | .icon.file.f-mpeg:after, 378 | .icon.file.f-mpg:after, 379 | .icon.file.f-mp4:after, 380 | .icon.file.f-m4v:after, 381 | .icon.file.f-wmv:after { 382 | border-bottom-color: #5649c1; 383 | } 384 | 385 | .icon.file.f-mp2, 386 | .icon.file.f-mp3, 387 | .icon.file.f-m3u, 388 | .icon.file.f-wma, 389 | .icon.file.f-xls, 390 | .icon.file.f-xlsx { 391 | box-shadow: 1.74em -2.1em 0 0 #5bab6e inset; 392 | } 393 | .icon.file.f-mp2:after, 394 | .icon.file.f-mp3:after, 395 | .icon.file.f-m3u:after, 396 | .icon.file.f-wma:after, 397 | .icon.file.f-xls:after, 398 | .icon.file.f-xlsx:after { 399 | border-bottom-color: #448353; 400 | } 401 | 402 | .icon.file.f-doc, 403 | .icon.file.f-docx, 404 | .icon.file.f-psd{ 405 | box-shadow: 1.74em -2.1em 0 0 #03689b inset; 406 | } 407 | 408 | .icon.file.f-doc:after, 409 | .icon.file.f-docx:after, 410 | .icon.file.f-psd:after { 411 | border-bottom-color: #2980b9; 412 | } 413 | 414 | .icon.file.f-gif, 415 | .icon.file.f-jpg, 416 | .icon.file.f-jpeg, 417 | .icon.file.f-pdf, 418 | .icon.file.f-png { 419 | box-shadow: 1.74em -2.1em 0 0 #e15955 inset; 420 | } 421 | .icon.file.f-gif:after, 422 | .icon.file.f-jpg:after, 423 | .icon.file.f-jpeg:after, 424 | .icon.file.f-pdf:after, 425 | .icon.file.f-png:after { 426 | border-bottom-color: #c6393f; 427 | } 428 | 429 | .icon.file.f-deb, 430 | .icon.file.f-dmg, 431 | .icon.file.f-gz, 432 | .icon.file.f-rar, 433 | .icon.file.f-zip, 434 | .icon.file.f-7z { 435 | box-shadow: 1.74em -2.1em 0 0 #867c75 inset; 436 | } 437 | .icon.file.f-deb:after, 438 | .icon.file.f-dmg:after, 439 | .icon.file.f-gz:after, 440 | .icon.file.f-rar:after, 441 | .icon.file.f-zip:after, 442 | .icon.file.f-7z:after { 443 | border-bottom-color: #685f58; 444 | } 445 | 446 | .icon.file.f-html, 447 | .icon.file.f-rtf, 448 | .icon.file.f-xml, 449 | .icon.file.f-xhtml { 450 | box-shadow: 1.74em -2.1em 0 0 #a94bb7 inset; 451 | } 452 | .icon.file.f-html:after, 453 | .icon.file.f-rtf:after, 454 | .icon.file.f-xml:after, 455 | .icon.file.f-xhtml:after { 456 | border-bottom-color: #d65de8; 457 | } 458 | 459 | .icon.file.f-js { 460 | box-shadow: 1.74em -2.1em 0 0 #d0c54d inset; 461 | } 462 | .icon.file.f-js:after { 463 | border-bottom-color: #a69f4e; 464 | } 465 | 466 | .icon.file.f-css, 467 | .icon.file.f-saas, 468 | .icon.file.f-scss { 469 | box-shadow: 1.74em -2.1em 0 0 #44afa6 inset; 470 | } 471 | .icon.file.f-css:after, 472 | .icon.file.f-saas:after, 473 | .icon.file.f-scss:after { 474 | border-bottom-color: #30837c; 475 | } 476 | -------------------------------------------------------------------------------- /firmware_mod/www/DCIM/assets/js/script.js: -------------------------------------------------------------------------------- 1 | $(function(){ 2 | 3 | var filemanager = $('.filemanager'), 4 | breadcrumbs = $('.breadcrumbs'), 5 | fileList = filemanager.find('.data'); 6 | 7 | // Start by fetching the file data from scan route with an AJAX request 8 | 9 | $.get('/cgi-bin/dcim.cgi', function(data) { 10 | 11 | var response = [data], 12 | currentPath = '', 13 | breadcrumbsUrls = []; 14 | 15 | var folders = [], 16 | files = []; 17 | 18 | // This event listener monitors changes on the URL. We use it to 19 | // capture back/forward navigation in the browser. 20 | 21 | $(window).on('hashchange', function(){ 22 | 23 | goto(window.location.hash); 24 | 25 | // We are triggering the event. This will execute 26 | // this function on page load, so that we show the correct folder: 27 | 28 | }).trigger('hashchange'); 29 | 30 | 31 | // Hiding and showing the search box 32 | 33 | filemanager.find('.search').click(function(){ 34 | 35 | var search = $(this); 36 | 37 | search.find('span').hide(); 38 | search.find('input[type=search]').show().focus(); 39 | 40 | }); 41 | 42 | 43 | // Listening for keyboard input on the search field. 44 | // We are using the "input" event which detects cut and paste 45 | // in addition to keyboard input. 46 | 47 | filemanager.find('input').on('input', function(e){ 48 | 49 | folders = []; 50 | files = []; 51 | 52 | var value = this.value.trim(); 53 | 54 | if(value.length) { 55 | 56 | filemanager.addClass('searching'); 57 | 58 | // Update the hash on every key stroke 59 | window.location.hash = 'search=' + value.trim(); 60 | 61 | } 62 | 63 | else { 64 | 65 | filemanager.removeClass('searching'); 66 | window.location.hash = encodeURIComponent(currentPath); 67 | 68 | } 69 | 70 | }).on('keyup', function(e){ 71 | 72 | // Clicking 'ESC' button triggers focusout and cancels the search 73 | 74 | var search = $(this); 75 | 76 | if(e.keyCode == 27) { 77 | 78 | search.trigger('focusout'); 79 | 80 | } 81 | 82 | }).focusout(function(e){ 83 | 84 | // Cancel the search 85 | 86 | var search = $(this); 87 | 88 | if(!search.val().trim().length) { 89 | 90 | window.location.hash = encodeURIComponent(currentPath); 91 | search.hide(); 92 | search.parent().find('span').show(); 93 | 94 | } 95 | 96 | }); 97 | 98 | 99 | // Clicking on folders 100 | 101 | fileList.on('click', 'li.folders', function(e){ 102 | e.preventDefault(); 103 | 104 | var nextDir = $(this).find('a.folders').attr('href'); 105 | 106 | if(filemanager.hasClass('searching')) { 107 | 108 | // Building the breadcrumbs 109 | 110 | breadcrumbsUrls = generateBreadcrumbs(nextDir); 111 | 112 | filemanager.removeClass('searching'); 113 | filemanager.find('input[type=search]').val('').hide(); 114 | filemanager.find('span').show(); 115 | } 116 | else { 117 | breadcrumbsUrls.push(nextDir); 118 | } 119 | 120 | window.location.hash = encodeURIComponent(nextDir); 121 | currentPath = nextDir; 122 | }); 123 | 124 | 125 | // Clicking on breadcrumbs 126 | 127 | breadcrumbs.on('click', 'a', function(e){ 128 | e.preventDefault(); 129 | 130 | var index = breadcrumbs.find('a').index($(this)), 131 | nextDir = breadcrumbsUrls[index]; 132 | 133 | breadcrumbsUrls.length = Number(index); 134 | 135 | window.location.hash = encodeURIComponent(nextDir); 136 | 137 | }); 138 | 139 | 140 | // Navigates to the given hash (path) 141 | 142 | function goto(hash) { 143 | 144 | hash = decodeURIComponent(hash).slice(1).split('='); 145 | 146 | if (hash.length) { 147 | var rendered = ''; 148 | 149 | // if hash has search in it 150 | 151 | if (hash[0] === 'search') { 152 | 153 | filemanager.addClass('searching'); 154 | rendered = searchData(response, hash[1].toLowerCase()); 155 | 156 | if (rendered.length) { 157 | currentPath = hash[0]; 158 | render(rendered); 159 | } 160 | else { 161 | render(rendered); 162 | } 163 | 164 | } 165 | 166 | // if hash is some path 167 | 168 | else if (hash[0].trim().length) { 169 | 170 | rendered = searchByPath(hash[0]); 171 | 172 | if (rendered.length) { 173 | 174 | currentPath = hash[0]; 175 | breadcrumbsUrls = generateBreadcrumbs(hash[0]); 176 | render(rendered); 177 | 178 | } 179 | else { 180 | currentPath = hash[0]; 181 | breadcrumbsUrls = generateBreadcrumbs(hash[0]); 182 | render(rendered); 183 | } 184 | 185 | } 186 | 187 | // if there is no hash 188 | 189 | else { 190 | currentPath = data.path; 191 | breadcrumbsUrls.push(data.path); 192 | render(searchByPath(data.path)); 193 | } 194 | } 195 | } 196 | 197 | // Splits a file path and turns it into clickable breadcrumbs 198 | 199 | function generateBreadcrumbs(nextDir){ 200 | var path = nextDir.split('/').slice(0); 201 | for(var i=1;i 1) { 309 | itemsLength += ' items'; 310 | } 311 | else { 312 | itemsLength = 'Empty'; 313 | } 314 | 315 | var folder = $('
  • '+icon+'' + name + ' ' + itemsLength + '
  • '); 316 | folder.appendTo(fileList); 317 | }); 318 | 319 | } 320 | 321 | if(scannedFiles.length) { 322 | 323 | scannedFiles.forEach(function(f) { 324 | 325 | var fileSize = bytesToSize(f.size), 326 | name = escapeHTML(f.name), 327 | fileType = name.split('.'), 328 | icon = ''; 329 | 330 | fileType = fileType.length > 1 ? fileType[fileType.length-1] : ''; 331 | 332 | icon = '' + fileType + ''; 333 | 334 | var file = $('
  • '+icon+''+ name +' '+fileSize+'
  • '); 335 | file.appendTo(fileList); 336 | }); 337 | 338 | } 339 | 340 | 341 | // Generate the breadcrumbs 342 | 343 | var url = ''; 344 | 345 | if(filemanager.hasClass('searching')){ 346 | 347 | url = 'Search results: '; 348 | fileList.removeClass('animated'); 349 | 350 | } 351 | else { 352 | 353 | fileList.addClass('animated'); 354 | 355 | breadcrumbsUrls.forEach(function (u, i) { 356 | 357 | var name = u.split('/'); 358 | 359 | if (i !== breadcrumbsUrls.length - 1) { 360 | url += '' + name[name.length-1] + ' / '; 361 | } 362 | else { 363 | url += '' + name[name.length-1] + ''; 364 | } 365 | 366 | }); 367 | 368 | } 369 | 370 | breadcrumbs.text('').append(url); 371 | 372 | 373 | // Show the generated elements 374 | 375 | fileList.animate({'display':'inline-block'}); 376 | 377 | } 378 | 379 | 380 | // This function escapes special html characters in names 381 | 382 | function escapeHTML(text) { 383 | return text.replace(/\&/g,'&').replace(/\/g,'>'); 384 | } 385 | 386 | 387 | // Convert file sizes from bytes to human readable units 388 | 389 | function bytesToSize(bytes) { 390 | var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; 391 | if (bytes == 0) return '0 Bytes'; 392 | var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); 393 | return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i]; 394 | } 395 | 396 | }); 397 | }); 398 | -------------------------------------------------------------------------------- /firmware_mod/www/DCIM/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | DCIM File Browser 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 |
    17 | 18 | 21 | 22 | 23 | 24 |
      25 | 26 |
      27 |
      28 | No files here. 29 |
      30 | 31 |
      32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /firmware_mod/www/cgi-bin/api.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ################################################ 4 | # Created by Krzysztof Szeremeta (KSZERE) # 5 | # kszere@gmail.com | 2018-03-24 | v0.0.5 Beta # 6 | ################################################ 7 | 8 | # START IMPORT FILES 9 | if [ -f /system/sdcard/scripts/func.sh ]; then 10 | source /system/sdcard/scripts/func.sh 11 | else 12 | echo " 13 | { 14 | \"code\": 1234, 15 | \"status\": \"info\", 16 | \"description\": \"Functions file 'func.cgi' not found.\" 17 | } 18 | " 19 | exit 1 20 | fi 21 | 22 | # END IMPORT FILES 23 | 24 | export LD_LIBRARY_PATH=/system/lib 25 | export LD_LIBRARY_PATH=/thirdlib:$LD_LIBRARY_PATH 26 | 27 | 28 | if [ -n "$F_action" ]; then 29 | case "$F_action" in 30 | # Show data from file and system 31 | showlog) 32 | echo "Content-type: text/html; charset=utf-8; Pragma: no-cache; Expires: Wednesday, 27-Dec-95 05:29:10 GMT" 33 | echo "" 34 | echo "

      Contents of all log files

      " 35 | echo "
      "
       36 |       tail /var/log/*
       37 |       echo "
      " 38 | ;; 39 | # System Request 40 | reboot) 41 | getReturn 1234 "info" "Camera will reboot." 42 | /sbin/reboot 43 | ;; 44 | poweroff) 45 | getReturn 1234 "info" "Camera will safely power off." 46 | /sbin/poweroff 47 | ;; 48 | set_hostname) 49 | if [ -n "$F_hostname" ]; then 50 | if [ $(cat $CONFIGPATH/hostname.conf) != "$F_hostname" ]; then 51 | echo "$F_hostname" > $CONFIGPATH/hostname.conf 52 | hostname $F_hostname 53 | if [ $(cat $CONFIGPATH/hostname.conf) = "$F_hostname" ]; then 54 | getReturn 1234 "success" "The hostname has been changed successfully to '$F_hostname'." 55 | else 56 | getReturn 1234 "error" "An error occurred while changing the hostname." 57 | fi 58 | else 59 | getReturn 1234 "info" "The hostname is already set to '$F_hostname', so has not been changed." 60 | fi 61 | else 62 | getReturn 1234 "info" "The 'hostname' parameter is empty, so has not been changed." 63 | fi 64 | ;; 65 | set_timezone) 66 | if [ -n "$F_tz" ]; then 67 | if [ $(cat /etc/TZ) != "$F_tz" ]; then 68 | echo "$F_tz" > /etc/TZ 69 | if [ $(cat /etc/TZ) = "$F_tz" ]; then 70 | $BINPATH/busybox ntpd -q -n -p time.google.com 2>&1 71 | getReturn 1234 "success" "The timezone has been changed successfully to '$F_tz'." 72 | else 73 | getReturn 1234 "error" "An error occurred while changing the timezone." 74 | fi 75 | else 76 | getReturn 1234 "info" "The timezone is already set to '$F_tz', so has not been changed." 77 | fi 78 | else 79 | getReturn 1234 "info" "The 'tz=[value]' parameter is empty, so has not been changed." 80 | fi 81 | ;; 82 | systeminfo) 83 | echo "Content-type: application/json; charset=utf-8; Pragma: no-cache; Expires: Wednesday, 27-Dec-95 05:29:10 GMT" 84 | echo "" 85 | 86 | echo "{ 87 | \"code\": 123, 88 | \"status\": \"info\", 89 | \"description\": \"System informations\", 90 | \"system\": { 91 | \"hostname\": \"$(cat $CONFIGPATH/hostname.conf)\", 92 | \"kernel\": \"$($BINPATH/busybox uname -r)\", 93 | \"uptime\": $(cat /proc/uptime | cut -d. -f1), 94 | \"cpu_avg\": $(cat /proc/loadavg | cut -d " " -f1), 95 | \"datetime\": { 96 | \"date\": \"$(date +'%Y-%m-%d')\", 97 | \"time\": \"$(date +'%T')\" 98 | }, 99 | \"network\": { 100 | \"mac\": \"$(cat /params/config/.product_config | grep MAC | cut -c16-27 | sed 's/\(..\)/\1:/g;s/:$//')\", 101 | \"router\": { 102 | \"name\": \"$(iwgetid -r)\", 103 | \"mac\": \"$(iwgetid -r -a)\", 104 | \"ip\": \"$(ifconfig wlan0 | grep 'inet addr'| cut -d: -f2 | cut -d' ' -f1)\", 105 | \"channel\": $(iwgetid -r -c), 106 | \"freq\": \"$(iwgetid -r -f | cut -de -f1)\", 107 | \"rx\": $(ifconfig wlan0 | grep 'RX bytes' | cut -d: -f2 | cut -d' ' -f1), 108 | \"tx\": $(ifconfig wlan0 | grep 'TX bytes' | cut -d: -f3 | cut -d' ' -f1), 109 | \"signal\": $(cat /proc/net/wireless | tr -s ' ' $'\t' | grep wlan0: | cut -f4 | cut -d. -f1) 110 | } 111 | }, 112 | \"disk_space\": { 113 | \"total\": $(df | tr -s ' ' $'\t' | grep /dev/mmcblk0p1 | cut -f2), 114 | \"used\": $(df | tr -s ' ' $'\t' | grep /dev/mmcblk0p1 | cut -f3), 115 | \"free\": $(df | tr -s ' ' $'\t' | grep /dev/mmcblk0p1 | cut -f4) 116 | }, 117 | \"memory\": { 118 | \"total\": $(cat /proc/meminfo | tr -s ' ' $'\t' | grep MemTotal: | cut -f2), 119 | \"free\": $(cat /proc/meminfo | tr -s ' ' $'\t' | grep MemFree: | cut -f2), 120 | \"buffers\": $(cat /proc/meminfo | tr -s ' ' $'\t' | grep Buffers: | cut -f2), 121 | \"cached\": $(cat /proc/meminfo | tr -s ' ' $'\t' | grep Cached: | cut -f2 | head -1), 122 | \"swap\": { 123 | \"total\": $(cat /proc/meminfo | tr -s ' ' $'\t' | grep SwapTotal: | cut -f2), 124 | \"free\": $(cat /proc/meminfo | tr -s ' ' $'\t' | grep SwapFree: | cut -f2) 125 | } 126 | } 127 | } 128 | }" 129 | ;; 130 | # Control LED and IR 131 | set_led) 132 | if ! [ $F_led ]; then 133 | getReturn 1234 "info" "The 'led' parameter is empty." 134 | exit 1 135 | fi 136 | 137 | case "$F_led" in 138 | blue) 139 | if ! [ -n $F_state ]; then 140 | getReturn 1234 "info" "The 'state' parameter is empty." 141 | exit 1 142 | fi 143 | 144 | if [ $F_state == 0 ]; then 145 | setGpio 39 1 146 | if [ $? -eq 0 ]; then 147 | getReturn 1234 "success" "The blue LED has been changed state successfully to Off." 148 | else 149 | getReturn 1234 "error" "An error occurred while changing the Blue LED state to Off." 150 | fi 151 | elif [ $F_state == 1 ]; then 152 | setGpio 38 1 && setGpio 39 0 153 | if [ $? -eq 0 ]; then 154 | getReturn 1234 "success" "The blue LED has been changed state successfully to On." 155 | else 156 | getReturn 1234 "error" "An error occurred while changing the Blue LED state to On." 157 | fi 158 | elif [ $F_state == 2 ]; then 159 | if [ `cat /sys/class/gpio/gpio38/value` == 1 -a `cat /sys/class/gpio/gpio39/value` == 0 ]; then 160 | setGpio 39 1 161 | if [ $? -eq 0 ]; then 162 | getReturn 1234 "success" "The blue LED has been changed state successfully to Off." 163 | else 164 | getReturn 1234 "error" "An error occurred while changing the Blue LED state to Off." 165 | fi 166 | else 167 | setGpio 38 1 && setGpio 39 0 168 | if [ $? -eq 0 ]; then 169 | getReturn 1234 "success" "The blue LED has been changed state successfully to On." 170 | else 171 | getReturn 1234 "error" "An error occurred while changing the Blue LED state to On." 172 | fi 173 | fi 174 | else 175 | getReturn 1234 "error" "Unsupported LED state '$F_state'." 176 | fi 177 | ;; 178 | yellow) 179 | if ! [ $F_state ]; then 180 | getReturn 1234 "info" "The 'state' parameter is empty." 181 | exit 1 182 | fi 183 | 184 | if [ $F_state == 0 ]; then 185 | setGpio 38 1 186 | if [ $? -eq 0 ]; then 187 | getReturn 1234 "success" "The yellow LED has been changed state successfully to Off." 188 | else 189 | getReturn 1234 "error" "An error occurred while changing the yellow LED state to Off." 190 | fi 191 | elif [ $F_state == 1 ]; then 192 | setGpio 38 0 && setGpio 39 1 193 | if [ $? -eq 0 ]; then 194 | getReturn 1234 "success" "The yellow LED has been changed state successfully to On." 195 | else 196 | getReturn 1234 "error" "An error occurred while changing the yellow LED state to On." 197 | fi 198 | elif [ $F_state == 2 ]; then 199 | if [ `cat /sys/class/gpio/gpio38/value` == 0 -a `cat /sys/class/gpio/gpio39/value` == 1 ]; then 200 | setGpio 38 1 201 | if [ $? -eq 0 ]; then 202 | getReturn 1234 "success" "The yellow LED has been changed state successfully to Off." 203 | else 204 | getReturn 1234 "error" "An error occurred while changing the yellow LED state to Off." 205 | fi 206 | else 207 | setGpio 38 0 && setGpio 39 1 208 | if [ $? -eq 0 ]; then 209 | getReturn 1234 "success" "The yellow LED has been changed state successfully to On." 210 | else 211 | getReturn 1234 "error" "An error occurred while changing the yellow LED state to On." 212 | fi 213 | fi 214 | else 215 | getReturn 1234 "error" "Unsupported LED state '$F_state'." 216 | fi 217 | ;; 218 | ir) 219 | if ! [ $F_state ]; then 220 | getReturn 1234 "info" "The 'state' parameter is empty." 221 | exit 1 222 | fi 223 | 224 | if [ $F_state == 0 ]; then 225 | setGpio 49 1 226 | if [ $? -eq 0 ]; then 227 | getReturn 1234 "success" "The IR LED has been changed state successfully to Off." 228 | else 229 | getReturn 1234 "error" "An error occurred while changing the IR LED state to Off." 230 | fi 231 | elif [ $F_state == 1 ]; then 232 | setGpio 49 0 233 | if [ $? -eq 0 ]; then 234 | getReturn 1234 "success" "The IR LED has been changed state successfully to On." 235 | else 236 | getReturn 1234 "error" "An error occurred while changing the IR LED state to On." 237 | fi 238 | elif [ $F_state == 2 ]; then 239 | if [ `cat /sys/class/gpio/gpio49/value` == 0 ]; then 240 | setGpio 49 1 241 | if [ $? -eq 0 ]; then 242 | getReturn 1234 "success" "The IR LED has been changed state successfully to Off." 243 | else 244 | getReturn 1234 "error" "An error occurred while changing the IR LED state to Off." 245 | fi 246 | else 247 | setGpio 49 0 248 | if [ $? -eq 0 ]; then 249 | getReturn 1234 "success" "The IR LED has been changed state successfully to On." 250 | else 251 | getReturn 1234 "error" "An error occurred while changing the IR LED state to On." 252 | fi 253 | fi 254 | else 255 | getReturn 1234 "error" "Unsupported LED state '$F_state'." 256 | fi 257 | ;; 258 | *) 259 | getReturn 1234 "error" "Unsupported LED '$F_led'." 260 | ;; 261 | esac 262 | ;; 263 | set_ir_cut) 264 | if ! [ $F_state ]; then 265 | getReturn 1234 "info" "The 'state' parameter is empty." 266 | exit 1 267 | fi 268 | 269 | if [ $F_state == 0 ]; then 270 | setGpio 25 1 && setGpio 26 0 271 | if [ $? -eq 0 ]; then 272 | getReturn 1234 "success" "The IR CUT has been changed state successfully to Off." 273 | else 274 | getReturn 1234 "error" "An error occurred while changing the IR CUT state to Off." 275 | fi 276 | elif [ $F_state == 1 ]; then 277 | setGpio 25 0 && setGpio 26 1 278 | if [ $? -eq 0 ]; then 279 | getReturn 1234 "success" "The IR CUT has been changed state successfully to On." 280 | else 281 | getReturn 1234 "error" "An error occurred while changing the IR CUT state to On." 282 | fi 283 | elif [ $F_state == 2 ]; then 284 | if [ `cat /sys/class/gpio/gpio25/value` == 0 -a `cat /sys/class/gpio/gpio26/value` == 1 ]; then 285 | setGpio 25 1 && setGpio 26 0 286 | if [ $? -eq 0 ]; then 287 | getReturn 1234 "success" "The IR CUT has been changed state successfully to Off." 288 | else 289 | getReturn 1234 "error" "An error occurred while changing the IR CUT state to Off." 290 | fi 291 | else 292 | setGpio 25 0 && setGpio 26 1 293 | if [ $? -eq 0 ]; then 294 | getReturn 1234 "success" "The IR CUT has been changed state successfully to On." 295 | else 296 | getReturn 1234 "error" "An error occurred while changing the IR CUT state to On." 297 | fi 298 | fi 299 | else 300 | getReturn 1234 "error" "Unsupported LED state '$F_state'." 301 | fi 302 | ;; 303 | # Control NightVision 304 | set_nightvision) 305 | if ! [ $F_state ]; then 306 | if [ $F_auto ]; then 307 | if [ $F_auto == 0 ]; then 308 | $SDPATH/daemon-scripts/nightvision-detection stop 309 | if [ $? -eq 0 ]; then 310 | getReturn 1234 "syccess" "Daemon Night Vision Detection stopped." 311 | exit 0 312 | else 313 | getReturn 1234 "error" "An error occurred while stopping the Daemon Night Vision Detection." 314 | exit 1 315 | fi 316 | elif [ $F_auto == 1 ]; then 317 | $SDPATH/daemon-scripts/nightvision-detection start 318 | if [ $? -eq 0 ]; then 319 | getReturn 1234 "syccess" "Daemon Night Vision Detection started." 320 | exit 0 321 | else 322 | getReturn 1234 "error" "An error occurred while starting the Daemon Night Vision Detection." 323 | exit 1 324 | fi 325 | else 326 | getReturn 1234 "error" "Unsupported auto state '$F_auto'." 327 | exit 1 328 | fi 329 | else 330 | getReturn 1234 "info" "The 'state' parameter is empty." 331 | exit 1 332 | fi 333 | fi 334 | 335 | if [ $F_state == 0 ]; then 336 | $BINPATH/setconf -k n -v 0 &>/dev/null & 337 | setGpio 25 0 && setGpio 26 1 && setGpio 49 1 338 | if [ $? -eq 0 ]; then 339 | getReturn 1234 "success" "The Night Vision mode has been changed state successfully to Disabled." 340 | else 341 | getReturn 1234 "error" "An error occurred while changing the Night Vision mode state to Disabled." 342 | fi 343 | elif [ $F_state == 1 ]; then 344 | $BINPATH/setconf -k n -v 1 &>/dev/null & 345 | setGpio 25 1 && setGpio 26 0 && setGpio 49 0 346 | if [ $? -eq 0 ]; then 347 | getReturn 1234 "success" "The Night Vision mode has been changed state successfully to Enabled." 348 | else 349 | getReturn 1234 "error" "An error occurred while changing the Night Vision mode state to On." 350 | fi 351 | elif [ $F_state == 2 ]; then 352 | if [ `cat /sys/class/gpio/gpio25/value` == 1 -a `cat /sys/class/gpio/gpio26/value` == 0 -a `cat /sys/class/gpio/gpio49/value` == 0 ]; then 353 | $BINPATH/setconf -k n -v 0 &>/dev/null & 354 | setGpio 25 0 && setGpio 26 1 && setGpio 49 1 355 | if [ $? -eq 0 ]; then 356 | getReturn 1234 "success" "The Night Vision mode has been changed state successfully to Disabled." 357 | else 358 | getReturn 1234 "error" "An error occurred while changing the Night Vision mode state to Disabled." 359 | fi 360 | else 361 | $BINPATH/setconf -k n -v 1 &>/dev/null & 362 | setGpio 25 1 && setGpio 26 0 && setGpio 49 0 363 | if [ $? -eq 0 ]; then 364 | getReturn 1234 "success" "The Night Vision mode has been changed state successfully to Enabled." 365 | else 366 | getReturn 1234 "error" "An error occurred while changing the Night Vision mode state to Enabled." 367 | fi 368 | fi 369 | else 370 | getReturn 1234 "error" "Unsupported Night Vision state '$F_state'." 371 | fi 372 | ;; 373 | # Control Motor PTZ 374 | set_motor) 375 | if [ -n "$F_ns" ]; then 376 | if [ "$F_ns" -le 2600 -a "$F_ns" -ge 0 ]; then 377 | F_ns=$F_ns 378 | else 379 | F_ns=2500 380 | fi 381 | else 382 | F_ns=$CONFIG_MOTOR_NS 383 | fi 384 | 385 | if ! [ -n $F_direction ]; then 386 | getReturn 1234 "info" "The 'direction' parameter is empty." 387 | exit 1 388 | fi 389 | 390 | case "$F_direction" in 391 | stop) 392 | $BINPATH/motor -d s &>/dev/null & 393 | if [ $? -eq 0 ]; then 394 | getReturn 1234 "success" "The motor on the camera has been stopped." 395 | else 396 | getReturn 1234 "error" "An error occurred while stopping the motor." 397 | fi 398 | ;; 399 | left) 400 | $BINPATH/motor -d l -s $F_ns &>/dev/null & 401 | if [ $? -eq 0 ]; then 402 | getReturn 1234 "success" "The motor has been moved to the left for '$F_ns'ns." 403 | else 404 | getReturn 1234 "error" "An error occurred while moved to the left for '$F_ns'ns." 405 | fi 406 | ;; 407 | right) 408 | $BINPATH/motor -d r -s $F_ns &>/dev/null & 409 | if [ $? -eq 0 ]; then 410 | getReturn 1234 "success" "The motor has been moved to the right for '$F_ns'ns." 411 | else 412 | getReturn 1234 "error" "An error occurred while moved to the right for '$F_ns'ns." 413 | fi 414 | ;; 415 | up) 416 | $BINPATH/motor -d u -s $F_ns &>/dev/null & 417 | if [ $? -eq 0 ]; then 418 | getReturn 1234 "success" "The motor has been moved to the up for '$F_ns'ns." 419 | else 420 | getReturn 1234 "error" "An error occurred while moved to the up for '$F_ns'ns." 421 | fi 422 | ;; 423 | down) 424 | $BINPATH/motor -d d -s $F_ns &>/dev/null & 425 | if [ $? -eq 0 ]; then 426 | getReturn 1234 "success" "The motor has been moved to the down for '$F_ns'ns." 427 | else 428 | getReturn 1234 "error" "An error occurred while moved to the down for '$F_ns'ns." 429 | fi 430 | ;; 431 | *) 432 | getReturn 1234 "error" "Unsupported LED '$F_led'." 433 | ;; 434 | esac 435 | ;; 436 | motor_calibrate) 437 | if [ $F_calibrate == "vertical" ]; then 438 | $BINPATH/motor -d v -s 100 &>/dev/null & 439 | if [ $? -eq 0 ]; then 440 | getReturn 1234 "success" "Motor is calibration on vertical." 441 | exit 0 442 | else 443 | getReturn 1234 "error" "An error occurred while calibrating vertical motor." 444 | exit 1 445 | fi 446 | elif [ $F_calibrate == "horizontal" ]; then 447 | $BINPATH/motor -d h -s 100 &>/dev/null & 448 | if [ $? -eq 0 ]; then 449 | getReturn 1234 "success" "Motor is calibration on horizontal." 450 | exit 0 451 | else 452 | getReturn 1234 "error" "An error occurred while calibrating horizontal motor." 453 | exit 1 454 | fi 455 | else 456 | getReturn 1234 "error" "Unsupported motor calibration=''$F_calibrate''." 457 | exit 1 458 | fi 459 | 460 | $BINPATH/motor -d v -s 100 &>/dev/null & 461 | sleep 2 462 | $BINPATH/motor -d h -s 100 &>/dev/null & 463 | if [ $? -eq 0 ]; then 464 | getReturn 1234 "success" "Both motors has been calibrated." 465 | else 466 | getReturn 1234 "error" "An error occurred while calibrating both motors." 467 | fi 468 | ;; 469 | # Control Audio 470 | audio_test) 471 | $BINPATH/ossplay -g 1000 /usr/share/notify/CN/init_ok.wav &>/dev/null & 472 | getReturn 1234 "info" "Started playing test audio." 473 | ;; 474 | audio_record_start) 475 | $BINPATH/busybox nohup $BINPATH/ossrecord $SDPATH/test.wav &>/dev/null & 476 | getReturn 1234 "info" "Audio recording to the \"audio.wav\" file has been started." 477 | ;; 478 | audio_record_stop) 479 | killall ossrecord 480 | getReturn 1234 "success" "The \"ossrecord\" process was killed." 481 | ;; 482 | # Control Video 483 | h264_record_start) 484 | $BINPATH/busybox nohup $BINPATH/h264Snap > $SDPATH/video.h264 &>/dev/null & 485 | ;; 486 | h264_record_stop) 487 | killall h264Snap 488 | getReturn 1234 "success" "The 'ossrecord' process was killed." 489 | ;; 490 | h264_start) 491 | $BINPATH/busybox nohup $BINPATH/v4l2rtspserver -F 10 &>/dev/null & 492 | getReturn 1234 "success" "The h264 RTSP started." 493 | ;; 494 | mjpeg_start) 495 | $BINPATH/busybox nohup $BINPATH/v4l2rtspserver -fMJPG -F 10 &>/dev/null & 496 | getReturn 1234 "success" "The mjpeg RTSP started." 497 | ;; 498 | rtsp_stop) 499 | killall v4l2rtspserver 500 | getReturn 1234 "success" "The 'v4l2rtspserver' process was killed." 501 | ;; 502 | get_snaphot) 503 | if [ $F_raw == 1 ]; then 504 | $BINPATH/getimage > /run/snaphot.jpg 505 | else 506 | if [ `ps | grep v4l2rtspserver | grep -v grep | wc -l` -eq 1 ]; then 507 | PARAMS=" -v 0 -rtsp_transport tcp -y -i rtsp://0.0.0.0:8554/unicast -vframes 1" 508 | if [ -n $F_width -a -n $F_height -a $F_width -eq $F_width -a $F_height -eq $F_height ]; then PARAMS="$PARAMS -s $F_width"x"$F_height"; fi 509 | if [ $F_flip == 1 ]; then PARAMS="$PARAMS -vf transpose=1,transpose=1"; fi 510 | if [ $F_nightvision == 1 ]; then PARAMS="$PARAMS -vf lutyuv=u=128:v=128"; fi 511 | PARAMS="$PARAMS -f image2 /run/snaphot.jpg" 512 | 513 | $BINPATH/busybox nohup $BINPATH/avconv $PARAMS 514 | else 515 | # $BINPATH/getimage > /run/snaphot.jpg 516 | # PARAMS="" 517 | # 518 | # if [ $F_nightvision == 1 ]; then PARAMS="$PARAMS -n"; fi 519 | # if [ $F_flip == 1 ]; then PARAMS="$PARAMS -r"; fi 520 | # if [ -n $F_width -a $F_width -eq $F_width ]; then PARAMS="$PARAMS -W $F_width"; else PARAMS="$PARAMS -W 1920"; fi 521 | # if [ -n $F_height -a $F_height -eq $F_height ]; then PARAMS="$PARAMS -H $F_height"; else PARAMS="$PARAMS -H 1080"; fi 522 | 523 | # $BINPATH/v4l2rtspserver -fMJPG $PARAMS -O /stdout > /run/snaphot.jpg 524 | 525 | $BINPATH/busybox nohup $BINPATH/v4l2rtspserver -fMJPG -F 10 &>/dev/null & 526 | 527 | PARAMS=" -v 0 -rtsp_transport tcp -y -i rtsp://0.0.0.0:8554/unicast -vframes 1" 528 | if [ -n $F_width -a -n $F_height -a $F_width -eq $F_width -a $F_height -eq $F_height ]; then PARAMS="$PARAMS -s $F_width"x"$F_height"; fi 529 | if [ $F_flip == 1 ]; then PARAMS="$PARAMS -vf transpose=1,transpose=1"; fi 530 | if [ $F_nightvision == 1 ]; then PARAMS="$PARAMS -vf lutyuv=u=128:v=128"; fi 531 | PARAMS="$PARAMS -f image2 /run/snaphot.jpg" 532 | 533 | $BINPATH/busybox nohup $BINPATH/avconv $PARAMS 534 | 535 | killall v4l2rtspserver 536 | fi 537 | fi 538 | 539 | if [ -f /run/snaphot.jpg ]; then 540 | if [ $F_json == 1 ]; then 541 | echo "Content-type: application/json; charset=utf-8; Pragma: no-cache; Expires: Wednesday, 27-Dec-95 05:29:10 GMT" 542 | echo "" 543 | echo "{ 544 | \"code\": 123, 545 | \"status\": \"info\", 546 | \"description\": \"Take a snaphot.\", 547 | \"snaphot\": \"`cat /run/snaphot.jpg | $BINPATH/busybox base64 | tr -d '\n'`\" 548 | }" 549 | rm /run/snaphot.jpg 550 | else 551 | echo "Content-type: image/jpg; charset=utf-8; Pragma: no-cache; Expires: Wednesday, 27-Dec-95 05:29:10 GMT" 552 | echo "" 553 | cat /run/snaphot.jpg 554 | rm /run/snaphot.jpg 555 | fi 556 | else 557 | getReturn 1234 "error" "An error occurred while taking snaphot." 558 | fi 559 | ;; 560 | # Other 561 | check_light) 562 | # if [ `dd if=/dev/jz_adc_aux_0 count=10 | sed -e 's/[^\.]//g' | wc -m` -lt 30 ]; then 563 | if [ `dd if=/dev/jz_adc_aux_0 count=20 | sed -e 's/[^\.]//g' | wc -m` -lt 50 ]; then 564 | getReturn 1234 "info" "Light sensor say's Day." 565 | else 566 | getReturn 1234 "info" "Light sensor say's Night." 567 | fi 568 | ;; 569 | xiaomi_start) 570 | getReturn 1234 "info" "Official software will running." 571 | busybox insmod /driver/sinfo.ko 2>&1 572 | busybox rmmod sample_motor 2>&1 573 | $BINPATH/busybox nohup /system/bin/iCamera & &>/dev/null & 574 | ;; 575 | *) 576 | getReturn 1234 "error" "Unsupported command '$F_action'" 577 | ;; 578 | esac 579 | else 580 | echo "Content-type: text/html; charset=utf-8; Pragma: no-cache; Expires: Wednesday, 27-Dec-95 05:29:10 GMT" 581 | echo "" 582 | 583 | echo " 584 | 585 | 586 | Custom Software For Xiaomi Dafang ($VERSION) 587 | 588 | 589 | 590 | 700 | 701 | 702 |
      703 |
      704 |
        705 |
      • 706 |
      • 707 |
      • 708 |
      • 709 |
      • 710 |
      711 |
      712 |
      713 | Custom Software For Xiaomi Dafang 714 |
      715 |
      716 |
      717 |

      API Documentation

      718 |

      Please see API Documentation on GitBook for know what use this API.

      719 |
      720 | 721 |
      722 |

      Manual

      723 |

      Please read Manual on GitBook.

      724 |
      725 | 726 |
      727 |

      Source Code

      728 |

      Available on GitHub.

      729 |

      You can report issue and suggest new function or contribute development.

      730 |
      731 | 732 | 735 | 736 | " 737 | fi 738 | 739 | 740 | exit 0 741 | -------------------------------------------------------------------------------- /firmware_mod/www/cgi-bin/dcim.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ################################################ 4 | # Created by Krzysztof Szeremeta (KSZERE) # 5 | # kszere@gmail.com | 2018-01-31 | v0.0.5 Beta # 6 | ################################################ 7 | 8 | # START IMPORT FILES 9 | if [ -f /system/sdcard/scripts/func.sh ]; then 10 | source /system/sdcard/scripts/func.sh 11 | else 12 | echo "Content-type: application/json; charset=utf-8; Pragma: no-cache; Expires: Wednesday, 27-Dec-95 05:29:10 GMT" 13 | echo "" 14 | echo " 15 | { 16 | \"code\": 1234, 17 | \"status\": \"info\", 18 | \"description\": \"Functions file 'func.cgi' not found.\" 19 | } 20 | " 21 | exit 1 22 | fi 23 | 24 | # END IMPORT FILES 25 | 26 | export LD_LIBRARY_PATH=/system/lib 27 | export LD_LIBRARY_PATH=/thirdlib:$LD_LIBRARY_PATH 28 | 29 | 30 | echo "Content-type: application/json; charset=utf-8; Pragma: no-cache; Expires: Wednesday, 27-Dec-95 05:29:10 GMT" 31 | echo "" 32 | # echo "{ 33 | # \"name\": \"DCIM\", 34 | # \"type\": \"folder\", 35 | # \"path\": \"DCIM\", 36 | # \"items\": [ 37 | # { 38 | # \"name\": \"Snaphots\", 39 | # \"type\": \"folder\", 40 | # \"path\": \"DCIM/Snaphots\", 41 | # \"items\": [] 42 | # }, 43 | # { 44 | # \"name\": \"SoundRecorder\", 45 | # \"type\": \"folder\", 46 | # \"path\": \"DCIM/SoundRecorder\", 47 | # \"items\": [] 48 | # }, 49 | # { 50 | # \"name\": \"VideoRecorder\", 51 | # \"type\": \"folder\", 52 | # \"path\": \"DCIM/VideoRecorder\", 53 | # \"items\": [ 54 | # { 55 | # \"name\": \"2018-03-06_13.36.mov\", 56 | # \"type\": \"file\", 57 | # \"path\": \"DCIM/VideoRecorder/2018-03-06_13.36.mov\", 58 | # \"size\": 40351122 59 | # } 60 | # ] 61 | # } 62 | # ] 63 | # } 64 | # " 65 | 66 | #jq -n "{items: [\"$ARR\"]}" 67 | 68 | #DUMP_DCIM=$(ls -l /system/sdcard/DCIM/) 69 | #ls -lhe /system/sdcard/DCIM/ | tr -s ' ' $'\t' | cut -f11 70 | 71 | 72 | DCIMPATH="/system/sdcard/DCIM" 73 | 74 | 75 | exit 0 76 | -------------------------------------------------------------------------------- /firmware_mod/www/cgi-bin/getfile.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ################################################ 4 | # Created by Krzysztof Szeremeta (KSZERE) # 5 | # kszere@gmail.com | 2018-01-31 | v0.0.5 Beta # 6 | ################################################ 7 | 8 | # START IMPORT FILES 9 | if [ -f /system/sdcard/scripts/func.sh ]; then 10 | source /system/sdcard/scripts/func.sh 11 | else 12 | echo "Content-type: application/json; charset=utf-8; Pragma: no-cache; Expires: Wednesday, 27-Dec-95 05:29:10 GMT" 13 | echo "" 14 | echo " 15 | { 16 | \"code\": 1234, 17 | \"status\": \"info\", 18 | \"description\": \"Functions file 'func.cgi' not found.\" 19 | } 20 | " 21 | exit 1 22 | fi 23 | 24 | # END IMPORT FILES 25 | 26 | export LD_LIBRARY_PATH=/system/lib 27 | export LD_LIBRARY_PATH=/thirdlib:$LD_LIBRARY_PATH 28 | 29 | 30 | if [ -n "$F_path" ]; then 31 | FILEPATH=$(echo $F_path | sed 's/\DCIM\///g' | sed 's/ /\\ /g') 32 | 33 | FILENAME=$($BINPATH/busybox basename $FILEPATH) 34 | FILEPATH="/system/sdcard/DCIM/$FILEPATH" 35 | FILESIZE=$(ls -1l "$FILEPATH" | tr -s ' ' $'\t' | cut -f3) 36 | if [ -f $FILEPATH ]; then 37 | echo "Content-Location: $FILEPATH 38 | Content-Type: application/octet-stream 39 | Content-Disposition: attachment; filename="$FILENAME" 40 | Content-Transfer-Encoding: binary 41 | Content-Length: $FILESIZE 42 | Pragma: private 43 | Cache-Control: private, must-revalidate 44 | Title: "$FILENAME" 45 | Expires: Thu, 1 Jan 1970 00:00:00 GMT" 46 | echo "" 47 | cat $FILEPATH 48 | else 49 | getReturn 1234 "error" "File '$FILEPATH' not found." 50 | fi 51 | else 52 | getReturn 1234 "info" "Param 'path=[value]' is empty." 53 | fi 54 | 55 | exit 0 56 | 57 | # http://192.168.44.142/cgi-bin/getfile.cgi?path=DCIM/VideoRecorder/2018-03-06_13.36.mov 58 | -------------------------------------------------------------------------------- /firmware_mod/www/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/kszere/Custom-Software-For-Xiaomi-Dafang/613f7eddab577937d3cef57ad6328d3ae314b011/firmware_mod/www/favicon.ico -------------------------------------------------------------------------------- /firmware_mod/www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /firmware_mod/www/live.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Live Watch 5 | 6 | 7 | 98 | 99 | 112 | 113 | 114 |
      115 | × 116 | Live View 117 | 118 | 124 | Configuration 125 | 126 | 129 | 130 |
      131 | 132 | 133 | 134 | 137 |
      138 | 139 |
      140 | 141 | 205 | 206 | 207 | --------------------------------------------------------------------------------