https://github.com/daedalus/tbc
The Brain Collector: Find ML model weights inside Android
https://github.com/daedalus/tbc
adb ai android artificial-intelligence coreml gguf hdf5 keras machine-learning ml model-weights onnx protobuf pytorch tensorflow tflite
Last synced: 3 months ago
JSON representation
The Brain Collector: Find ML model weights inside Android
- Host: GitHub
- URL: https://github.com/daedalus/tbc
- Owner: daedalus
- Created: 2025-03-11T20:49:38.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-03-17T17:17:50.000Z (over 1 year ago)
- Last Synced: 2025-03-17T18:27:29.207Z (over 1 year ago)
- Topics: adb, ai, android, artificial-intelligence, coreml, gguf, hdf5, keras, machine-learning, ml, model-weights, onnx, protobuf, pytorch, tensorflow, tflite
- Language: Python
- Homepage:
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# The Brain Collector
> A tool to scan Android devices for ML model weight files via ADB.
[](https://pypi.org/project/thebraincollector/)
[](https://pypi.org/project/thebraincollector/)
[](https://codecov.io/gh/dclavijo/TBC)
[](https://github.com/astral-sh/ruff)
## Install
```bash
pip install thebraincollector
```
## Usage
```python
from tbc import find_ml_models, get_device_info
# Get device information
info = get_device_info()
print(f"Device: {info['model']}")
# Find ML models on connected device
models = find_ml_models()
```
## CLI
```bash
tbc --help
tbc --file /path/to/file
tbc --local-dir /path/to/dir
tbc --export-csv results.csv --cleanup
```
## API
### `get_device_info() -> dict`
Returns device serial number, model, and manufacturer.
### `find_ml_models() -> set`
Searches connected Android device for ML model files.
### `scan_files(files: list[str], local: bool = False) -> None`
Scans files for ML model or APK extensions.
### `human_readable_size(size_bytes: int) -> str`
Converts bytes to human-readable format.
### `calculate_md5(file_path: str) -> str | None`
Calculates MD5 hash of a file.
## Development
```bash
git clone https://github.com/dclavijo/TBC.git
cd TBC
pip install -e ".[test]"
# run tests
pytest
# format
ruff format src/ tests/
# lint
ruff check src/ tests/
# type check
mypy src/
```
## License
MIT License - see LICENSE file for details.