Status: ✅ Phase I COMPLETE (9/9 tasks) → Awaiting CP2102 for Phase II
Start Date: November 3, 2025
Current Phase: Phase I complete; Phase II starts when CP2102 arrives
Hardware Access: ✅ Root access available, 🔄 UART access pending CP2102
End Goal: 🛡️ Privacy-Focused Armbian Custom ROM
Replace factory Android firmware (containing spyware, telemetry, and malware) with a privacy-focused custom ROM based on Armbian.
This project ports mainline Linux to the HY300 Android projector using a hardware-first development approach. Live system analysis from the running device drives all decisions, validated against extensive software research.
Hardware-First Philosophy:
- Live hardware analysis = ground truth
- Software research (
research/) = context and patterns - All decisions validated against actual hardware behavior
- Two devices available for safe A/B testing
Research Integration:
- 100+ analysis documents from software-only research phase
- Complete firmware extraction and driver implementation
- All research findings require hardware validation
- See
ai/contexts/research-integration.mdfor procedures
- Started with firmware analysis without hardware
- Made assumptions based on extracted files
- Limited validation capabilities
- FEL mode complications (H713 BROM issues)
- ✅ Root access to running device
- ✅ Full system dump capability
- 🔄 UART serial console access (coming soon)
- ✅ Live hardware validation at every step
- ✅ Proper baseline establishment before modifications
CRITICAL: Two devices available for A/B testing
- ✅ Device A: Primary development and testing
- ✅ Device B: Control device with factory firmware
- ✅ Complete factory backup image exists
- ✅ NO BRICKING TOLERANCE - all changes must be reversible
⚠️ UART recovery required before any risky operations
- ✅ Root shell access via ADB/SSH
- ✅ Full filesystem access (including /system)
- ✅ Live kernel module inspection
- ✅ Direct hardware register access
- ✅ Real-time system monitoring
- ✅ Factory firmware preservation
- ✅ Two devices for A/B testing
- ✅ Complete backup image
- 🔄 UART serial console (bootloader access)
- 🔄 U-Boot environment inspection
- 🔄 Boot process monitoring
- 🔄 Early kernel debug output
- 🔄 Recovery procedures validated
hy300-linux-porting/ # NEW ROOT
├── README.md # This file
├── PROJECT_ROADMAP.md # 8-phase detailed roadmap
├── QUICK_START.md # Getting started guide
│
├── phases/ # Execution phases (hardware-first)
├── tasks/ # Task tracking system
├── hardware-access/ # Hardware procedures and guides
├── agents/ # AI agent guidelines
│
├── ai/ # AI INFRASTRUCTURE
│ ├── contexts/ # Context files (migrated + enhanced)
│ ├── tools/ # Task management tools
│ └── sessions/ # Session logs
│
├── research/ # SOFTWARE ANALYSIS ARCHIVE
│ │ # (Complete sun50iw12p1-research repo)
│ ├── README.md # Research archive overview
│ ├── docs/ # 100+ analysis documents
│ ├── firmware/ # Extracted components
│ ├── drivers/ # Kernel modules (research)
│ ├── tools/ # Analysis utilities
│ └── ai/ # Original AI contexts (archived)
│
├── build/ # Build artifacts
│ ├── u-boot/ # Bootloader builds
│ ├── kernel/ # Kernel builds
│ ├── dtb/ # Device tree blobs
│ └── images/ # Final ROM images
│
├── backup/ # Device backups
│ ├── device-a/ # Primary device
│ └── device-b/ # Test device
│
├── logs/ # Execution logs
└── flake.nix # Development environment
Key Integration Points:
ai/contexts/research-integration.md- How to use research findingsai/contexts/live-system-analysis.md- Hardware data extractionresearch/docs/- Software analysis for contextresearch/drivers/- Driver implementations (need hardware testing)phases/research-validation/RESEARCH_MAPPING.md- Hardware findings validated against UART logs ⭐ NEWphases/RECOVERY_TEMPLATE.md- Standard recovery procedures for all phases ⭐ NEWphases/phase2-uart-access/UART_BOOTLOADER_SAFETY_PROTOCOL.md- Safe SRAM-based bootloader testing ⭐ NEW
Goal: Document complete current state of working Android system
Duration: 2-3 days (COMPLETED)
Prerequisites: Root access (✅ Available)
Safety Level: 🟢 LOW RISK (read-only)
Completed Tasks:
- ✅ Complete system dump and backup
- ✅ Document all running drivers and kernel modules
- ✅ Extract calibration data and hardware configuration
- ✅ Map hardware component addresses and GPIO pins
- ✅ Document boot process via kernel logs
- ✅ Privacy audit: Identify all spyware/telemetry components
- ✅ Device Tree analysis (sun50i-h713-hy300.dtb)
- ✅ Network Configuration Baseline (IP, DNS, firewall baseline)
- ✅ Phase I comprehensive summary + Research validation
Result: ✅ GATE PASSED → Proceed to Phase II when CP2102 arrives
Goal: Build and configure sunxi-tools for FEL mode recovery
Duration: 2-3 days (only if waiting for CP2102)
Prerequisites: Phase I complete (✅)
Safety Level: 🟢 LOW RISK (development environment only, no device access needed yet)
Key Tasks:
- Build sunxi-tools from source for H713 support
- Prepare FEL mode detection and recovery scripts
- Create SRAM loading procedures documentation
- Prepare recovery workflow for Phase II
Note: Only execute if CP2102 UART adapter is delayed. Can be skipped if adapter arrives today.
Status: ⏳ ON STANDBY - will execute as Phase 1b if needed
Goal: Establish serial console access and bootloader inspection
Duration: 1-2 days
Prerequisites: UART hardware connection (🔄 Upcoming)
Safety Level: 🟢 LOW RISK (read-only)
Key Tasks:
- UART pinout identification and connection
- U-Boot environment extraction
- Boot sequence documentation
- Bootloader command testing
- Recovery procedure validation
Goal: Replace factory bootloader with mainline U-Boot
Duration: 3-4 days
Prerequisites: UART access, complete hardware baseline
Safety Level: 🔴 HIGH RISK (bootloader modification)
Key Tasks:
- Mainline U-Boot configuration
- A/B testing on Device B first
- Safe bootloader replacement via UART
- Boot validation with factory kernel
- Emergency recovery procedures
Goal: Boot mainline Linux with minimal hardware support
Duration: 1 week
Prerequisites: Working U-Boot, complete device tree
Safety Level: 🟡 MEDIUM RISK (system boot changes)
Key Tasks:
- Minimal device tree creation from baseline
- Essential driver identification
- First mainline kernel boot
- Serial console validation
Goal: Port essential hardware drivers to mainline kernel
Duration: 2-3 weeks
Prerequisites: Booting mainline kernel, factory driver analysis
Safety Level: 🟢 LOW RISK (driver development)
Key Tasks:
- MIPS co-processor driver (display.bin integration)
- AV1 hardware decoder driver (premium feature)
- Display pipeline and GPU drivers
- Input device drivers (IR, motor, accelerometers)
- AIC8800 WiFi/Bluetooth (community drivers)
Goal: Build privacy-focused Armbian system
Duration: 1-2 weeks
Prerequisites: All essential drivers working
Safety Level: 🟡 MEDIUM RISK (system replacement)
Key Tasks:
- Armbian build system setup (H713/H6 base)
- Driver packaging as DKMS modules
- Board support package creation
- System services implementation
- A/B deployment testing
Goal: Remove all spyware, telemetry, and malware
Duration: 3-4 days
Prerequisites: Armbian booting successfully
Safety Level: 🟢 LOW RISK (software configuration)
Key Tasks:
- Factory firmware privacy audit (from Phase I)
- Spyware component removal verification
- Network privacy configuration (firewall, DNS blocking)
- System hardening (minimal attack surface)
- Offline operation validation
Goal: Comprehensive testing and A/B validation
Duration: 3-4 days
Prerequisites: Privacy hardening complete
Safety Level: 🟢 LOW RISK (testing only)
Key Tasks:
- A/B deployment (both devices)
- Hardware feature validation
- Performance benchmarking
- 24-hour stability testing
- Recovery procedure verification
Source: /docs/ directory - validated against factory DTB files
Details: See CONFIRMED_HARDWARE_FINDINGS.md
- 🎬 Hardware AV1 Decoder - Google-Allwinner collaboration, complete IOCTL interface
- 🖥️ MIPS Co-processor - Display subsystem with display.bin firmware (4KB extracted)
- 🎮 Mali-Midgard GPU - Confirmed (previous "Mali-G31" claims corrected)
- 📡 AIC8800 WiFi/BT - Community drivers identified and documented
- ⚙️ Keystone Motor - 4-phase stepper with limit switch, custom driver created
- 📊 Dual Accelerometers - STK8BA58 / KXTJ3-1057 for auto-keystone
- 💾 eMMC Storage - 8-bit bus, HS200 support
Previous Research: 100+ analysis documents in /docs/ directory
- Complete filesystem backup created
- All kernel modules documented with parameters
- Hardware register map established
- Calibration data extracted and preserved
- Boot process fully documented
- Hardware component inventory complete
- Spyware/telemetry audit complete (10+ threats identified)
- Network configuration baseline documented
- All 9 Phase I tasks completed and validated
- sunxi-tools built for H713 (FEL mode support)
- FEL recovery procedures documented
- UART connection established and tested
- U-Boot bootloader dumped and analyzed
- Boot security documented
- Recovery procedures validated
- Privacy-focused Armbian ROM boots reliably
- All essential hardware functional
- Zero spyware/telemetry verified
- Projector-specific features working
- System performance acceptable
- A/B testing on both devices successful
- Complete documentation maintained
- Recovery procedures validated
Three new comprehensive documents added to support safe development:
📄 File: phases/phase2-uart-access/UART_BOOTLOADER_SAFETY_PROTOCOL.md
Defines safe bootloader testing via SRAM without risking device modification. Includes:
- Why SRAM loading is safer than direct flashing (zero bricking risk)
- Complete U-Boot compilation guide for SRAM execution
- sunxi-fel command examples with detailed explanations
- Bootloader validation checkpoints (safety gates)
- Issue diagnosis and recovery procedures
- UART loading alternative methods
- Device Tree analysis for safety
When to use: Phase II UART validation, Phase III bootloader replacement planning
📄 File: phases/RECOVERY_TEMPLATE.md
Provides reusable recovery procedures for all phases. Includes:
- Failure scenarios per phase with H713-specific recovery
- ADB connection restoration (lost connections)
- Backup corruption detection and retry
- UART communication troubleshooting
- FEL mode recovery (BROM issues)
- Device brick recovery procedures
- A/B testing fallback strategy
- Backup structure and decision trees
When to use: Every phase's "Abort & Recover" section references this
Phase READMEs updated: Phase I and Phase II now include recovery procedures
📄 File: phases/research-validation/RESEARCH_MAPPING.md
Maps 100+ research findings to actual UART evidence. Includes:
- 10 major hardware discoveries validated against real device
- Theory vs. reality comparison for each finding
- Cross-references to research documents and UART logs
- Validation status (✅ Confirmed /
⚠️ Partial / ❌ Contradicted / 🔄 Pending) - Implementation impact analysis for each finding
- Integration guidance for all phases
Validated findings:
- GPIO voltage rails (
⚠️ partial - needs measurement) - MIPS co-processor (✅ confirmed - safe to implement)
- AV1 decoder hardware (✅ confirmed - Phase V ready)
- AIC8800 WiFi/Bluetooth (✅ confirmed - community drivers)
- Display TCON0 (✅ confirmed - driver needed)
- IR remote control (✅ confirmed - simple GPIO driver)
- Motor/PWM control (✅ confirmed - daemon needed)
- Storage eMMC + SPI-NOR (✅ confirmed - safe layout)
- 2GB DDR3 memory (✅ confirmed - no changes needed)
- Thermal sensor (✅ confirmed - mainline support)
When to use: Before implementing any hardware feature, consult this mapping
- Bricking: Multiple backup strategies, UART recovery
- Data Loss: Complete dumps before modifications
- Hardware Damage: Careful voltage/current verification
- Driver Incompatibility: Maintain factory kernel as fallback
- Configuration Loss: Preserve all calibration data
- Boot Failure: UART-based recovery procedures
Using Nix flakes for reproducible development:
# Enter development environment
cd /home/luca/Desktop/sun50iw12p1-research
nix develop
# All cross-compilation tools available
aarch64-unknown-linux-gnu-gcc --version# Check current status
ai/tools/task-manager list
# Start a task
ai/tools/task-manager start <task_id>
# Complete a task
ai/tools/task-manager complete <task_id>
# Get next recommended task
ai/tools/task-manager next- pending - Defined, ready to start
- in_progress - Currently being worked (one at a time)
- completed - Finished with validation
- blocked - Cannot proceed (document blocker)
- Check for in-progress work: Always run
ai/tools/task-manager find-inprogressfirst - Follow task priorities: Use
ai/tools/task-manager nextfor recommendations - Update task status: Mark tasks in-progress and completed properly
- Document findings: Update relevant documentation as work progresses
- Validate at every step: Use hardware access to verify assumptions
- hardware-access-agent: Root access operations, system dumps
- uart-agent: Serial console operations, bootloader interaction
- driver-analysis-agent: Kernel module reverse engineering
- device-tree-agent: DTB creation and validation
- integration-agent: System assembly and testing
- Atomic tasks only: One clear objective per delegation
- Complete context: Include all necessary information in prompt
- Hardware safety: Always include safety protocols
- Validation requirements: Define success criteria clearly
# Verify root access
adb shell su -c "id"
# Check kernel version
adb shell uname -a
# Verify storage space for dumps
adb shell df -h# Start first task
ai/tools/task-manager start 001See hardware-access/hardware-dump-procedures.md for detailed procedures.
- Device tree research:
../sun50i-h713-hy300.dts - Firmware analysis:
../firmware/ - Driver experiments:
../drivers/ - Documentation:
../docs/
- H713 SoC datasheet (when available)
- Allwinner H6 reference (similar architecture)
- Factory kernel sources (if extracted)
- Sunxi community wiki
- Allwinner mainline kernel support
- ARM Trusted Firmware documentation
- Leverage previous research: Use existing analysis as reference, but validate everything with hardware
- Safety first: Always maintain backups and recovery paths
- Document everything: Hardware access is temporary, documentation is permanent
- Iterate quickly: Hardware validation enables rapid iteration
This project builds upon extensive software analysis completed in the research/ directory:
What's in Research:
- 100+ analysis documents (
research/docs/) - Complete firmware extraction (
research/firmware/) - Kernel driver implementations (
research/drivers/) - U-Boot bootloader binary (
research/u-boot-sunxi-with-spl.bin) - Device tree (
research/sun50i-h713-hy300.dts) - VM testing framework (
research/nixos/)
How to Use Research:
- Read context first:
ai/contexts/research-integration.md - Consult research docs for component background
- Extract live hardware data using procedures in
ai/contexts/live-system-analysis.md - Compare and validate research against hardware
- Document findings and update research with hardware truth
Critical Principle: Hardware truth always wins. Research provides context, hardware provides facts.
- Read:
ai/contexts/research-integration.md- Understand hardware-first approach - Review:
PROJECT_ROADMAP.mdfor complete 8-phase breakdown - Start:
ai/tools/task-manager nextto begin Phase I - Execute:
phases/phase1-hardware-baseline/README.mdfor first tasks
Last Updated: November 3, 2025 (Restructuring)
Current Phase: I - Hardware Baseline (Ready to start)
Research Archive: research/ (sun50iw12p1-research integrated)
Next Milestone: Complete live system extraction and research validation