Offline File Transfer System using Dynamic QR Codes
---
- Overview
- Key Features
- System Architecture
- Workflow
- QRStream Protocol
- Python Sender
- Android Receiver
- Runtime Execution
- Screenshots
- Performance
- Installation
- Project Structure
- Technologies Used
- Author
- Acknowledgements
- License
QRStream is an offline cross-platform file transfer system that transfers any file from a desktop computer to an Android device using dynamic QR codes.
Unlike conventional transfer methods, QRStream requires no Internet connection, Wi-Fi, Bluetooth, USB data transfer, or cloud service. The sender continuously displays QR codes containing encoded file packets, while the Android application scans, validates, reconstructs, and stores the original file.
- Offline File Transfer
- Dynamic QR Streaming
- Cross Platform Communication
- Python Sender
- Android Receiver
- CameraX Integration
- Google ML Kit QR Detection
- Custom Binary Protocol
- START / DATA / END Packets
- CRC32 Integrity Verification
- Base64 Packet Encoding
- Chunk-based File Transmission
- Duplicate Chunk Removal
- Ordered Reconstruction
- Metadata Transmission
- UUID Transfer Sessions
- Progress Monitoring
- Missing Chunk Detection
- Automatic File Saving
- Modular Architecture
Input File
│
▼
File Reader
│
▼
Chunk Splitter
│
▼
Packet Builder
│
▼
Serializer
│
▼
Base64 Encoder
│
▼
QR Generator
│
▼
OpenCV Display
═══════════════════════
Android Camera
│
▼
ML Kit Scanner
│
▼
Packet Parser
│
▼
Receiver Core
│
▼
File Reconstruction
│
▼
Downloads/QRStream
- Read selected file.
- Split file into fixed-size chunks.
- Build START, DATA and END packets.
- Serialize packet into binary.
- Encode binary using Base64.
- Generate QR using Segno.
- Display QR frames through OpenCV.
- CameraX captures QR frames.
- ML Kit decodes QR payload.
- PacketParser reconstructs protocol packet.
- ReceiverCore validates CRC32 and stores unique chunks.
- Missing chunks are detected.
- FileWriter reconstructs and stores the original file.
+----------------------------------------------------------------+
| MAGIC | VERSION | TYPE | UUID | CHUNK | TOTAL | SIZE | CRC32 |
+----------------------------------------------------------------+
| PAYLOAD |
+----------------------------------------------------------------+
Packet Types
- START : File metadata
- DATA : Binary file chunks
- END : Transfer completion
The Python sender handles complete transmission.
Core responsibilities:
- Read file
- Split file
- Build packets
- Serialize protocol
- Generate QR codes
- Display QR stream
- Control transmission timing
The Android application continuously scans QR codes and reconstructs the transmitted file.
Core responsibilities:
- Camera capture
- QR detection
- Base64 decoding
- Packet parsing
- CRC verification
- Duplicate filtering
- Chunk reconstruction
- File saving
- Progress monitoring
File
│
▼
Read
│
▼
Split
│
▼
Packet
│
▼
Serialize
│
▼
Base64
│
▼
QR Generation
│
▼
Display
══════════════════════
Android Camera
│
▼
Decode
│
▼
Packet Parser
│
▼
Receiver Core
│
▼
Reconstruct
│
▼
Downloads/QRStream
| Parameter | Value |
|---|---|
| Chunk Size | 700 Bytes |
| QR Encoding | Base64 |
| QR Generator | Segno |
| Error Correction | Medium (M) |
| QR Detection | Google ML Kit |
| Camera Framework | CameraX |
| Integrity Verification | CRC32 |
| Communication | Offline |
| File Reconstruction | Ordered Chunk Assembly |
| Output Location | Download/QRStream |
git clone https://github.com/wSubham/QR_Stream.git
cd QR_Streampython -m venv venvWindows
venv\Scripts\activateInstall requirements
pip install -r requirements.txtRun
python -m sender.appOpen receiver_android in Android Studio.
Build the APK
Install it on your Android device
Grant Camera Permission
Start scanning QR codes
QR_Stream
│
├── assets/
│
├── docs/
│
├── output/
│
├── received/
│
├── samples/
│
├── sender/
│ ├── app.py
│ ├── config.py
│ ├── file_reader.py
│ ├── file_splitter.py
│ ├── packet_builder.py
│ ├── serializer.py
│ ├── qr_generator.py
│ ├── qr_display.py
│ ├── transmission_engine.py
│ ├── session.py
│ └── protocol.py
│
├── receiver_android/
│ ├── app/
│ ├── gradle/
│ ├── build.gradle
│ └── settings.gradle
│
├── requirements.txt
├── README.md
├── LICENSE
└── .gitignore
Desktop
- Python
- OpenCV
- Segno
- NumPy
- Pillow
Android
- Kotlin
- Jetpack Compose
- CameraX
- Google ML Kit
Protocol
- Base64
- CRC32
- UUID
- Binary Serialization
Subham Das
This project makes use of the following open-source technologies and libraries:
- OpenCV
- Google ML Kit
- CameraX
- Jetpack Compose
- Segno
- NumPy
- Pillow
Their excellent work made the development of QRStream possible.
This project is released under the MIT License.






