-
Notifications
You must be signed in to change notification settings - Fork 3
boot_usb rewrite in python
License
muromec/putusb
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Feautures:
* Interactive and noniteractive mode
* Read data from gen-blob
* Read data from normal LTE2 bootloader
* Send data to gen-blob
* Send direct commands to bootloaders
* Flash using gen-blob
* Qt4 GUI
* Read and write gen-blob configuration
Example of interactive session:
In [1]: import putusb
Find device
In [2]: dev = putusb.MotoUsb()
Query version info using direct command:
In [3]: dev.cmd('RQVN')
('\x02RQVN\x03', 2)
('\x02RSVN\x1egen-blob\x03',)
Out[3]: '\x02RSVN\x1egen-blob\x03'
Query version and serial using api:
In [12]: dev.version()
Out[12]: 'gen-blob'
In [13]: dev.serial()
Out[13]: 'unknown'
Upload data at offset:
In [4]: dev.set(0xa0200000,'testword')
('\x02ADDR\x1eA020000093\x03', 2)
('\x02ACK\x1eADDR,A020000093\x03',)
('\x02BIN\x1e\x00\x08testword\x84\x03', 2)
('\x02ACK\x1eBIN\x03',)
Download data from offset:
In [5]: dev.get(0xa0200000,8)
('\x02RBIN\x1eA020000000085B\x03', 2)
('\x02RBIN\x1etestword|\x03',)
8 8 2686451712
Out[5]: 'testword'
Shutdown phone using direct command:
In [6]: dev.cmd("POWER_DOWN")
('\x02POWER_DOWN\x03', 2)
('',)
Out[6]: ''
Shutdown using api:
In [14]: dev.off()
device dissappeared
Example flash file:
kernel zImage
root rootfs.jffs2
here "kernel" is named flash partition and "zImage" is filename.
file "zImage" should exist in same directory as flash file
About
boot_usb rewrite in python
Resources
License
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published