diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..344f3c4 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "tools/rtl_tcp_andro"] + path = tools/rtl_tcp_andro + url = https://github.com/signalwareltd/rtl_tcp_andro-.git diff --git a/BUILDING_MODULES.md b/BUILDING_MODULES.md index a288ffb..7ffe544 100644 --- a/BUILDING_MODULES.md +++ b/BUILDING_MODULES.md @@ -32,6 +32,33 @@ Some features need extra firmware or kernel modules you build yourself. **No kernel modules needed.** All SDR devices on Android use userspace USB libraries. The module handles USB permissions automatically. +**RTL-SDR + HackRF Driver App (rtl_tcp_andro):** + +This module includes the source for the Android RTL-SDR/HackRF driver app +([rtl_tcp_andro](https://github.com/signalwareltd/rtl_tcp_andro-.git)) as a +submodule in `tools/rtl_tcp_andro/`. It implements the rtl_tcp protocol natively +on Android via USB OTG — no root needed for the app itself. + +To build the APK: +```bash +cd tools/rtl_tcp_andro +./gradlew assembleRelease +``` + +The APK will be at `app/build/outputs/apk/release/app-release-unsigned.apk`. +Copy it to `apk/rtl_tcp_andro.apk` and rebuild the module zip — the installer +will auto-install it on the device. + +Or install directly: +```bash +adb install app/build/outputs/apk/release/app-release-unsigned.apk +``` + +The app provides an `iqsrc://` intent that any SDR client app can use to +receive I/Q samples from RTL-SDR, HackRF, or SDRplay hardware. + +Supported hardware: RTL-SDR (all versions), HackRF One, SDRplay RSP + **Setup in Termux:** ```bash diff --git a/build.sh b/build.sh index 6fdbea4..8fa9908 100755 --- a/build.sh +++ b/build.sh @@ -5,14 +5,31 @@ cd "$(dirname "$0")" ZIP="driver-manager-v1.0.0.zip" rm -f "$ZIP" -zip -r9 "$ZIP" \ - module.prop \ - customize.sh \ - post-fs-data.sh \ - service.sh \ - system.prop \ - system/ \ - webroot/ \ +# Include built APK if available +mkdir -p apk +RTL_APK="tools/rtl_tcp_andro/app/build/outputs/apk/release/app-release-unsigned.apk" +if [ -f "$RTL_APK" ]; then + cp "$RTL_APK" apk/rtl_tcp_andro.apk + echo "Including rtl_tcp_andro APK" +fi + +FILES=( + module.prop + customize.sh + post-fs-data.sh + service.sh + system.prop + system/ + webroot/ + BUILDING_MODULES.md +) + +# Include APK dir if it has files +if [ -f "apk/rtl_tcp_andro.apk" ]; then + FILES+=(apk/) +fi + +zip -r9 "$ZIP" "${FILES[@]}" \ -x "*.git*" "build.sh" "tools/*" "README*" echo "Built: $ZIP ($(du -h "$ZIP" | cut -f1))" diff --git a/customize.sh b/customize.sh index 5d7b74b..00792e1 100644 --- a/customize.sh +++ b/customize.sh @@ -46,6 +46,21 @@ echo "24M:1800M" > "$MODPATH/config/spectrum_range" mkdir -p "$MODPATH/modules" mkdir -p "$MODPATH/firmware" +# Install rtl_tcp_andro APK if built +RTL_APK="$MODPATH/apk/rtl_tcp_andro.apk" +if [ -f "$RTL_APK" ]; then + pm install -r "$RTL_APK" 2>/dev/null + if [ $? -eq 0 ]; then + ui_print "- RTL-SDR + HackRF driver app installed" + else + ui_print "! Failed to install RTL-SDR driver app" + ui_print "! Install manually from apk/ directory" + fi +else + ui_print "- RTL-SDR driver app not built yet" + ui_print " Build with: cd tools/rtl_tcp_andro && ./gradlew assembleRelease" +fi + ui_print "- Default config written" ui_print "- Kernel module dir: modules/" ui_print "- Firmware dir: firmware/" diff --git a/driver-manager-v1.0.0.zip b/driver-manager-v1.0.0.zip index c40ece5..719dd1d 100644 Binary files a/driver-manager-v1.0.0.zip and b/driver-manager-v1.0.0.zip differ diff --git a/tools/rtl_tcp_andro b/tools/rtl_tcp_andro new file mode 160000 index 0000000..304dc37 --- /dev/null +++ b/tools/rtl_tcp_andro @@ -0,0 +1 @@ +Subproject commit 304dc37f1cd7a5c3a42ad6b4af497b7f93d96505