feat: initial commit — README, community files, docs, templates

This commit is contained in:
MR CYBER
2026-07-12 18:33:50 -07:00
commit 3a649efcc8
15 changed files with 951 additions and 0 deletions
+104
View File
@@ -0,0 +1,104 @@
# ADB Commands
WSA WebDev can be controlled via ADB broadcasts.
## Broadcast Actions
| Action | Description |
|:-------|:------------|
| `com.wsa.webdav.START` | Start the WebDAV server |
| `com.wsa.webdav.STOP` | Stop the WebDAV server |
| `com.wsa.webdav.RESTART` | Restart the WebDAV server |
| `com.wsa.webdav.STATUS` | Get server status |
| `com.wsa.webdav.HEALTH` | Run health check |
## Usage
### Start Server
```bash
adb shell am broadcast -a com.wsa.webdav.START
```
### Stop Server
```bash
adb shell am broadcast -a com.wsa.webdav.STOP
```
### Restart Server
```bash
adb shell am broadcast -a com.wsa.webdav.RESTART
```
### Check Status
```bash
adb shell am broadcast -a com.wsa.webdav.STATUS
# Check result in /sdcard/Android/data/com.wsa.webdav/files/result.json
adb shell cat /sdcard/Android/data/com.wsa.webdav/files/result.json
```
### Health Check
```bash
adb shell am broadcast -a com.wsa.webdav.HEALTH
```
## Shell Script Control
For root users, a shell script provides additional control:
```bash
# Start
adb shell su -c "sh /data/data/com.wsa.webdav/files/app.sh start"
# Stop
adb shell su -c "sh /data/data/com.wsa.webdav/files/app.sh stop"
# Restart
adb shell su -c "sh /data/data/com.wsa.webdav/files/app.sh restart"
# Status
adb shell su -c "sh /data/data/com.wsa.webdav/files/app.sh status"
# Health
adb shell su -c "sh /data/data/com.wsa.webdav/files/app.sh health"
# Log
adb shell su -c "sh /data/data/com.wsa.webdav/files/app.sh log"
```
## Automation
### Start on Boot
The APK includes a boot receiver that automatically starts the server on device boot.
### Health Monitoring
The server performs health checks every 30 seconds. If the server crashes, it will restart with exponential backoff.
## Troubleshooting
### Broadcast Not Received
1. Ensure the APK is installed
2. Check the package name: `com.wsa.webdav`
3. Verify the server is running
### Status Returns Null
1. Wait a few seconds after starting
2. Check the log file
3. Restart the server
### Server Won't Start
1. Check available ports
2. Verify file permissions
3. Check the Android logcat:
```bash
adb logcat -s WSAWebDAV
```
+59
View File
@@ -0,0 +1,59 @@
# Configuration
WSA WebDev is configured via `config.json`.
## Default Configuration
```json
{
"port": 8088,
"host": "127.0.0.1",
"rootAccess": true,
"anonymousAccess": true,
"maxConnections": 50
}
```
## Configuration Options
| Option | Type | Default | Description |
|:-------|:-----|:--------|:------------|
| `port` | integer | 8088 | Server port |
| `host` | string | "127.0.0.1" | Server host |
| `rootAccess` | boolean | true | Enable root filesystem access |
| `anonymousAccess` | boolean | true | Allow anonymous access |
| `maxConnections` | integer | 50 | Maximum concurrent connections |
## Changing Configuration
### Via Web File Manager
1. Open the web file manager
2. Navigate to `/data/data/com.wsa.webdav/files/`
3. Edit `config.json`
4. Restart the server
### Via ADB
```bash
adb shell "echo '{\"port\": 9090}' > /data/data/com.wsa.webdav/files/config.json"
adb shell am broadcast -a com.wsa.webdav.RESTART
```
## Port Configuration
The default port is 8088. To change it:
1. Update `config.json`
2. Restart the WebDAV server
3. Update the port forward:
```bash
adb forward tcp:NEW_PORT tcp:NEW_PORT
```
## Security Considerations
- The server is designed for local use only
- Do not expose port 8088 to the network without authentication
- Root access provides full filesystem access — use with caution
- Anonymous access allows unauthenticated connections
+84
View File
@@ -0,0 +1,84 @@
# Installation Guide
## Prerequisites
- Windows with WSA installed
- ADB access to WSA
- JDK 17 (for building from source)
- Python 3 (for build script)
## Build from Source
### Windows
```cmd
build.bat
```
### Linux/Mac
```bash
chmod +x build.sh
./build.sh
```
### Direct Build
```bash
python builder/build.py
```
The build script will:
1. Check for JDK 17
2. Download Android SDK if needed
3. Generate Kotlin source files
4. Build the APK using Gradle
## Install APK
### Using ADB
```bash
adb install output/app-release.apk
```
### Using WSA Installer
The WSA WebDev APK is automatically installed by WSA Installer when enabling file sharing.
## Configure
Edit `config.json` to customize server settings:
```json
{
"port": 8088,
"host": "127.0.0.1",
"rootAccess": true,
"anonymousAccess": true,
"maxConnections": 50
}
```
## Start Server
### User Mode
```bash
adb shell am start -n com.wsa.webdav/.MainActivity
```
### Root Mode
```bash
adb shell su -c "sh /data/data/com.wsa.webdav/files/app.sh start"
```
## Access Files
- **Web File Manager:** http://127.0.0.1:8088
- **WebDAV URL:** http://127.0.0.1:8088/files/
## Mount as Windows Drive
WSA Installer can automatically mount the WebDAV share as a Windows drive. See the [WSA Installer documentation](https://github.com/WSA-Installer/wsa-installer/blob/main/docs/webdav.md) for details.
+67
View File
@@ -0,0 +1,67 @@
# Root Access
WSA WebDev supports root filesystem access via Magisk.
## Requirements
- WSA installed
- Magisk installed and configured in WSA
- Root access granted to WSA WebDev
## Setup
### 1. Install Magisk in WSA
Follow the WSA Installer's Play Store installation process, which includes Magisk.
### 2. Grant Root Access
1. Open Magisk app in WSA
2. Go to Superuser tab
3. Grant root access to WSA WebDev
### 3. Enable Root Mode
Start the server in root mode:
```bash
adb shell su -c "sh /data/data/com.wsa.webdav/files/app.sh start"
```
## Root Filesystem Structure
When root access is enabled, the following paths are available:
```
http://127.0.0.1:8088/
files/ # User storage (/storage/emulated/0)
root/ # Root filesystem (/)
data/ # App data
system/ # System files
vendor/ # Vendor files
```
## Security Considerations
- Root access provides full filesystem control
- Be careful when modifying system files
- The server runs as root — any vulnerability could compromise the system
- Consider disabling root access if not needed
## Troubleshooting
### Permission denied
1. Ensure Magisk is installed
2. Check Magisk Superuser tab for permissions
3. Try: `adb shell su -c whoami` — should return "root"
### Root commands fail
1. Check Magisk version (30.6+ recommended)
2. Reinstall Magisk in WSA
3. Check SELinux mode: `adb shell su -c getenforce`
### Cannot access /data/data
This is expected — app data directories have restricted permissions. Use the WebDAV server to access files instead.
+128
View File
@@ -0,0 +1,128 @@
# Troubleshooting
Common issues and solutions for WSA WebDev.
## Build Issues
### Java not found
**Error:** `JAVA_HOME is not set`
**Solution:**
1. Install JDK 17
2. Set JAVA_HOME environment variable
3. Or let the build script auto-install via winget/choco
### Gradle build fails
**Error:** `Could not resolve dependencies`
**Solution:**
1. Delete `.build/` directory
2. Run build script again
3. Check internet connection
### APK not installing
**Error:** `INSTALL_FAILED_ALREADY_EXISTS`
**Solution:**
```bash
adb uninstall com.wsa.webdav
adb install output/app-release.apk
```
## Server Issues
### Server won't start
1. Check if port 8088 is in use:
```bash
netstat -ano | findstr 8088
```
2. Kill the process using the port
3. Restart the server
### Connection refused
1. Ensure WSA is running
2. Check ADB connection: `adb devices`
3. Verify server is running:
```bash
adb shell pidof com.wsa.webdav
```
### Slow performance
1. Use USB instead of WiFi for ADB
2. Reduce max connections in config.json
3. Close other network-intensive applications
## WebDAV Issues
### Windows cannot connect
1. Ensure WebClient service is running:
```cmd
sc start WebDAV
```
2. Check BasicAuthLevel in registry:
```
HKLM\SYSTEM\CurrentControlSet\Services\WebClient\Parameters
BasicAuthLevel = 2
```
3. Restart WebClient service
### Files not showing
1. Check the WebDAV URL path
2. Verify the folder exists in WSA
3. Check server logs
### Upload fails
1. Check available storage in WSA
2. Verify file permissions
3. Check max file size limits
## Root Access Issues
### Permission denied
1. Ensure Magisk is installed
2. Grant root access in Magisk Superuser tab
3. Verify: `adb shell su -c whoami` returns "root"
### SELinux blocking
1. Check SELinux mode: `adb shell su -c getenforce`
2. Set to permissive (temporarily): `adb shell su -c setenforce 0`
## Logging
### View Server Logs
```bash
adb shell su -c "cat /data/data/com.wsa.webdav/files/server.log"
```
### View Android Logcat
```bash
adb logcat -s WSAWebDAV
```
### Health Check
```bash
adb shell am broadcast -a com.wsa.webdav.HEALTH
adb shell cat /sdcard/Android/data/com.wsa.webdav/files/health.json
```
## Getting Help
If your issue isn't covered:
1. Check [GitHub Issues](https://github.com/WSA-Installer/wsa-webdav/issues)
2. Open a new [Bug Report](https://github.com/WSA-Installer/wsa-webdav/issues/new?template=bug_report.yml)
3. Include relevant logs and environment details
+100
View File
@@ -0,0 +1,100 @@
# WebDAV Protocol Reference
WSA WebDev implements the WebDAV (Web Distributed Authoring and Versioning) protocol.
## Supported Methods
| Method | Description |
|:-------|:------------|
| OPTIONS | Get supported methods and features |
| GET | Download a file |
| PUT | Upload a file |
| DELETE | Delete a file or folder |
| MKCOL | Create a folder |
| COPY | Copy a file or folder |
| MOVE | Move/rename a file or folder |
| PROPFIND | Get file/folder properties |
| PROPPATCH | Set file/folder properties |
| LOCK | Lock a file |
| UNLOCK | Unlock a file |
## WebDAV URL Structure
```
http://127.0.0.1:8088/
├── files/ # User storage (/storage/emulated/0)
│ ├── Download/
│ ├── DCIM/
│ └── ...
└── root/ # Root filesystem (root mode only)
├── data/
├── system/
└── ...
```
## Examples
### List Directory (PROPFIND)
```bash
curl -X PROPFIND http://127.0.0.1:8088/files/ \
-H "Depth: 1"
```
### Download File (GET)
```bash
curl http://127.0.0.1:8088/files/Download/document.pdf \
-o document.pdf
```
### Upload File (PUT)
```bash
curl -X PUT http://127.0.0.1:8088/files/Download/newfile.txt \
-d "Hello World"
```
### Create Folder (MKCOL)
```bash
curl -X MKCOL http://127.0.0.1:8088/files/Download/NewFolder
```
### Delete (DELETE)
```bash
curl -X DELETE http://127.0.0.1:8088/files/Download/oldfile.txt
```
### Copy (COPY)
```bash
curl -X COPY http://127.0.0.1:8088/files/Download/source.txt \
-H "Destination: /files/Download/dest.txt"
```
### Move (MOVE)
```bash
curl -X MOVE http://127.0.0.1:8088/files/Download/oldname.txt \
-H "Destination: /files/Download/newname.txt"
```
## Client Compatibility
The WebDAV server is compatible with:
- Windows Explorer (WebClient service)
- macOS Finder
- Cyberduck
- WinSCP
- RaiDrive
- Most WebDAV clients
## Limitations
- No HTTPS support (local use only)
- No authentication (anonymous access)
- No partial content (Range) requests
- Limited LOCK/UNLOCK implementation