mirror of
https://github.com/WSA-Installer/wsa-webdav.git
synced 2026-07-29 11:24:16 -07:00
feat: initial commit — README, community files, docs, templates
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# Default owners for everything in the repo
|
||||
* @gshellmr-code
|
||||
|
||||
# Builder
|
||||
builder/ @gshellmr-code
|
||||
|
||||
# Documentation
|
||||
docs/ @gshellmr-code
|
||||
*.md @gshellmr-code
|
||||
@@ -0,0 +1,5 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: [gshellmr-code]
|
||||
custom:
|
||||
- https://buymeacoffee.com/mrcyberdev
|
||||
@@ -0,0 +1,74 @@
|
||||
name: Bug Report
|
||||
description: Report a bug in WSA WebDev
|
||||
title: "[Bug]: "
|
||||
labels: ["bug", "triage"]
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thank you for reporting a bug!
|
||||
|
||||
- type: dropdown
|
||||
id: component
|
||||
attributes:
|
||||
label: Component
|
||||
options:
|
||||
- WebDAV Server
|
||||
- Web File Manager
|
||||
- ADB Control
|
||||
- Root Access
|
||||
- Build System
|
||||
- Other
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: version
|
||||
attributes:
|
||||
label: WSA WebDev Version
|
||||
placeholder: "e.g., 1.0.0"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: input
|
||||
id: environment
|
||||
attributes:
|
||||
label: Environment
|
||||
placeholder: "e.g., WSA on Windows 11, Android 13, x86_64"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: description
|
||||
attributes:
|
||||
label: Bug Description
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: steps
|
||||
attributes:
|
||||
label: Steps to Reproduce
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: expected
|
||||
attributes:
|
||||
label: Expected Behavior
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant Logs
|
||||
render: shell
|
||||
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Checklist
|
||||
options:
|
||||
- label: I have searched existing issues
|
||||
required: true
|
||||
@@ -0,0 +1,31 @@
|
||||
name: Feature Request
|
||||
description: Suggest a new feature for WSA WebDev
|
||||
title: "[Feature]: "
|
||||
labels: ["enhancement"]
|
||||
body:
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: Problem Statement
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: solution
|
||||
attributes:
|
||||
label: Proposed Solution
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
id: alternatives
|
||||
attributes:
|
||||
label: Alternatives Considered
|
||||
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Checklist
|
||||
options:
|
||||
- label: I have searched existing feature requests
|
||||
required: true
|
||||
@@ -0,0 +1,23 @@
|
||||
## Description
|
||||
|
||||
<!-- What does this PR do? -->
|
||||
|
||||
## Type of Change
|
||||
|
||||
- [ ] Bug fix
|
||||
- [ ] New feature
|
||||
- [ ] Documentation update
|
||||
- [ ] Refactoring
|
||||
|
||||
## Testing
|
||||
|
||||
- [ ] Tested on WSA with root
|
||||
- [ ] Tested on WSA without root
|
||||
- [ ] WebDAV methods tested
|
||||
- [ ] Web file manager tested
|
||||
|
||||
## Checklist
|
||||
|
||||
- [ ] Code follows project style
|
||||
- [ ] Self-review completed
|
||||
- [ ] Documentation updated
|
||||
@@ -0,0 +1,17 @@
|
||||
# Changelog
|
||||
|
||||
All notable changes to WSA WebDev will be documented in this file.
|
||||
|
||||
## [1.0.0] - 2026-07-12
|
||||
|
||||
### Added
|
||||
- Initial release
|
||||
- WebDAV server with full protocol support
|
||||
- Web file manager SPA (dark/light themes)
|
||||
- ADB broadcast control (START, STOP, RESTART, STATUS, HEALTH)
|
||||
- Root filesystem access via Magisk
|
||||
- User storage access
|
||||
- Auto-start boot receiver
|
||||
- Health monitoring (30-second intervals)
|
||||
- Exponential backoff restart on failure
|
||||
- Zero external Kotlin dependencies
|
||||
@@ -0,0 +1,77 @@
|
||||
# Contributing to WSA WebDev
|
||||
|
||||
Thank you for your interest in contributing to WSA WebDev!
|
||||
|
||||
## How to Contribute
|
||||
|
||||
### Reporting Bugs
|
||||
|
||||
1. Check [existing issues](https://github.com/WSA-Installer/wsa-webdav/issues) first
|
||||
2. Open a new issue with:
|
||||
- Clear title and description
|
||||
- Steps to reproduce
|
||||
- Expected vs actual behavior
|
||||
- Device/environment details
|
||||
|
||||
### Suggesting Features
|
||||
|
||||
1. Open a [feature request](https://github.com/WSA-Installer/wsa-webdav/issues/new?template=feature_request.yml)
|
||||
2. Describe the problem and proposed solution
|
||||
|
||||
### Pull Requests
|
||||
|
||||
1. Fork the repository
|
||||
2. Create a feature branch
|
||||
3. Make your changes
|
||||
4. Test on WSA
|
||||
5. Submit a Pull Request
|
||||
|
||||
## Development Setup
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- JDK 17
|
||||
- Python 3
|
||||
- Android SDK (auto-installed by build script)
|
||||
- WSA with ADB access
|
||||
|
||||
### Building
|
||||
|
||||
```bash
|
||||
# Windows
|
||||
build.bat
|
||||
|
||||
# Linux/Mac
|
||||
./build.sh
|
||||
```
|
||||
|
||||
The build script will:
|
||||
1. Check Java installation
|
||||
2. Download Android SDK if needed
|
||||
3. Generate Kotlin source files
|
||||
4. Build the APK
|
||||
|
||||
### Testing
|
||||
|
||||
1. Install the APK: `adb install output/app-release.apk`
|
||||
2. Start the server: `adb shell am start -n com.wsa.webdav/.MainActivity`
|
||||
3. Access the web file manager: `http://127.0.0.1:8088`
|
||||
4. Test WebDAV: `curl -X PROPFIND http://127.0.0.1:8088/files/`
|
||||
|
||||
## Code Style
|
||||
|
||||
### Kotlin
|
||||
|
||||
- Follow Kotlin coding conventions
|
||||
- Use meaningful variable names
|
||||
- Add KDoc comments for public APIs
|
||||
|
||||
### Build Script
|
||||
|
||||
- Python 3 compatible
|
||||
- No external dependencies (stdlib only)
|
||||
- Use `write_bytes()` for file output
|
||||
|
||||
## License
|
||||
|
||||
By contributing, you agree that your contributions will be licensed under the MIT License.
|
||||
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 AT Tech Zone
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,152 @@
|
||||
<div align="center">
|
||||
|
||||
# WSA WebDev
|
||||
|
||||
### Headless Android WebDAV Server for WSA
|
||||
|
||||

|
||||

|
||||

|
||||

|
||||
|
||||
**Access your WSA file system from any browser — with root support, web file manager, and ADB control.**
|
||||
|
||||
Part of the [WSA Installer](https://github.com/WSA-Installer) organization.
|
||||
|
||||
</div>
|
||||
|
||||
---
|
||||
|
||||
## Overview
|
||||
|
||||
WSA WebDev is a headless Android WebDAV server APK for rooted Windows Subsystem for Android (WSA). It provides:
|
||||
|
||||
- **WebDAV Protocol** — Full WebDAV server with all standard methods
|
||||
- **Root Access** — Access the entire Android filesystem via Magisk
|
||||
- **Web File Manager** — Beautiful SPA with dark/light themes
|
||||
- **ADB Control** — Start, stop, and monitor via ADB broadcasts
|
||||
- **Auto-Start** — Boot receiver for automatic startup
|
||||
- **Health Monitoring** — 30-second interval health checks
|
||||
|
||||
## Features
|
||||
|
||||
| Feature | Description |
|
||||
|:--------|:------------|
|
||||
| WebDAV Protocol | OPTIONS, GET, PUT, DELETE, MKCOL, COPY, MOVE, PROPFIND, PROPPATCH, LOCK, UNLOCK |
|
||||
| Root Access | Full filesystem access via `su` (requires Magisk) |
|
||||
| Web File Manager | Grid/list views, drag-drop, hex viewer, terminal, bookmarks |
|
||||
| ADB Commands | START, STOP, RESTART, STATUS, HEALTH |
|
||||
| Auto-Start | Boot receiver for automatic startup |
|
||||
| Health Monitoring | 30-second interval checks with exponential backoff |
|
||||
| Zero Dependencies | Pure Kotlin, no external libraries |
|
||||
|
||||
## Quick Start
|
||||
|
||||
### Prerequisites
|
||||
|
||||
- Windows with WSA installed
|
||||
- Root access (Magisk) — optional, for root mode
|
||||
- JDK 17 (for building)
|
||||
- Python 3 (for build script)
|
||||
|
||||
### Build
|
||||
|
||||
```bash
|
||||
# Windows
|
||||
build.bat
|
||||
|
||||
# Linux/Mac
|
||||
chmod +x build.sh
|
||||
./build.sh
|
||||
```
|
||||
|
||||
### Install
|
||||
|
||||
```bash
|
||||
adb install output/app-release.apk
|
||||
```
|
||||
|
||||
### Start Server
|
||||
|
||||
```bash
|
||||
# User mode
|
||||
adb shell am start -n com.wsa.webdav/.MainActivity
|
||||
|
||||
# Root mode
|
||||
adb shell su -c "sh /data/data/com.wsa.webdav/files/app.sh start"
|
||||
```
|
||||
|
||||
### Access Files
|
||||
|
||||
- **WebDAV:** `http://127.0.0.1:8088/files/`
|
||||
- **Web File Manager:** `http://127.0.0.1:8088`
|
||||
|
||||
## Documentation
|
||||
|
||||
- [Installation Guide](docs/installation.md)
|
||||
- [Configuration](docs/configuration.md)
|
||||
- [WebDAV Protocol](docs/webdav-protocol.md)
|
||||
- [ADB Commands](docs/adb-commands.md)
|
||||
- [Root Access](docs/root-access.md)
|
||||
- [Troubleshooting](docs/troubleshooting.md)
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────┐
|
||||
│ WSA WebDev APK │
|
||||
├─────────────────────────────────────────────────────┤
|
||||
│ │
|
||||
│ ┌─────────────┐ ┌──────────────────┐ │
|
||||
│ │ WebDAV │ │ Web File Manager │ │
|
||||
│ │ Server │◄──►│ (SPA) │ │
|
||||
│ │ (Kotlin) │ └──────────────────┘ │
|
||||
│ └──────┬──────┘ │
|
||||
│ │ │
|
||||
│ ▼ │
|
||||
│ ┌─────────────┐ ┌──────────────────┐ │
|
||||
│ │ Filesystem │ │ Root Manager │ │
|
||||
│ │ Provider │ │ (Magisk su) │ │
|
||||
│ └─────────────┘ └──────────────────┘ │
|
||||
│ │
|
||||
│ ┌─────────────┐ ┌──────────────────┐ │
|
||||
│ │ ADB │ │ Health Monitor │ │
|
||||
│ │ Receiver │ │ (30s interval) │ │
|
||||
│ └─────────────┘ └──────────────────┘ │
|
||||
│ │
|
||||
└─────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## Tech Stack
|
||||
|
||||
| Technology | Purpose |
|
||||
|:-----------|:--------|
|
||||
| Kotlin | Primary language |
|
||||
| Android SDK 34 | Target platform |
|
||||
| WebDAV Protocol | File access |
|
||||
| HTML/CSS/JS | Web file manager SPA |
|
||||
| ADB | Remote control |
|
||||
|
||||
## Supported Environments
|
||||
|
||||
| Environment | Status |
|
||||
|:------------|:-------|
|
||||
| WSA with Magisk (root) |  |
|
||||
| WSA without root |  |
|
||||
| Android 13+ |  |
|
||||
| Android 14+ |  |
|
||||
| x86_64 |  |
|
||||
| ARM64 |  |
|
||||
|
||||
## Contributing
|
||||
|
||||
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the MIT License — see [LICENSE](LICENSE) for details.
|
||||
|
||||
## Acknowledgments
|
||||
|
||||
- Part of the [WSA Installer](https://github.com/WSA-Installer) project
|
||||
- Built by [AT Tech Zone](https://www.youtube.com/@AT_Tech_Zone)
|
||||
@@ -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
|
||||
```
|
||||
@@ -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
|
||||
@@ -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.
|
||||
@@ -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.
|
||||
@@ -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
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user