First Pixel 6a Unbrick Tool with USB Endpoint Analysis
This enhanced version of tensor-usbdl incorporates USB endpoint analysis from keyholes.txt to enable direct bulk transfer communication with GS101 (Pixel 6/6a/6 Pro) devices in emergency download mode.
- USB Bulk Transfer (New): Direct endpoint communication using analyzed endpoints
- Serial DNW (Original): CDC-ACM serial communication fallback
Based on keyholes.txt USB capture analysis:
Endpoint 0x02 (OUT) - Bulk transfer, 512 bytes
Endpoint 0x81 (IN) - Bulk transfer, 512 bytes
Endpoint 0x83 (IN) - Interrupt transfer, 10 bytes
Interface 1 (CDC Data) - Configuration 1, Alt Setting 0
- Primary: Google Pixel 6a (bluejay) - GS101 chip
- Compatible: Pixel 6 (oriole), Pixel 6 Pro (raven) - GS101 chip
- VID:PID: 18D1:4F00 (Google emergency download mode)
- Windows 10/11
- Go 1.19+
- USB drivers for Google devices
- GS101 bootloader images
cd tensor-usbdl
build_gs101.batThis creates:
tensor-usbdl-gs101.exe(Release build)tensor-usbdl-gs101-debug.exe(Debug build)
tensor-usbdl-gs101.exe detectScans for both USB and serial GS101 devices.
tensor-usbdl-gs101.exe testTests USB endpoints communication (based on keyholes.txt analysis).
Auto Mode (Recommended):
tensor-usbdl-gs101.exe flash pbl.imgTries USB first, falls back to serial if needed.
Force USB Mode:
tensor-usbdl-gs101.exe flash pbl.img usbUses direct USB bulk transfer only.
Force Serial Mode:
tensor-usbdl-gs101.exe flash pbl.img serialUses original DNW serial communication only.
Located in ../gs101/ directory:
pbl.img - Primary bootloader (first stage)
bl1.img - Bootloader stage 1
bl2.img - Bootloader stage 2
bl31.img - ARM Trusted Firmware (EL3)
abl.img - Android bootloader
tzsw.img - TrustZone secure world
ldfw.img - Low-level firmware
gsa.img - Google Security Assistant
- pbl.img (Primary bootloader - critical first)
- bl1.img, bl2.img (Secondary bootloaders)
- bl31.img (ARM Trusted Firmware)
- tzsw.img (TrustZone)
- abl.img (Android bootloader)
-
Enter Emergency Download Mode:
- Power off device completely
- Hold Volume Down + Power for 10+ seconds
- Connect USB cable while holding buttons
- Device should appear as 18D1:4F00
-
Detect Device:
tensor-usbdl-gs101.exe detect
-
Test Communication:
tensor-usbdl-gs101.exe test
-
Flash Primary Bootloader:
tensor-usbdl-gs101.exe flash ../gs101/pbl.img usb
-
Flash Remaining Bootloaders (in order):
tensor-usbdl-gs101.exe flash ../gs101/bl1.img usb tensor-usbdl-gs101.exe flash ../gs101/bl2.img usb tensor-usbdl-gs101.exe flash ../gs101/bl31.img usb tensor-usbdl-gs101.exe flash ../gs101/tzsw.img usb tensor-usbdl-gs101.exe flash ../gs101/abl.img usb
-
Reboot Device:
- Device should now boot to fastboot mode
- Use
fastboot devicesto verify - Flash factory images if needed
The endpoint configuration was reverse-engineered from keyholes.txt USB traffic capture:
Configuration Descriptor:
bNumInterfaces: 2
Interface 0: CDC Communication Class
Interface 1: CDC Data Class
Endpoint 0x02: OUT, Bulk, 512 bytes β Main data output
Endpoint 0x81: IN, Bulk, 512 bytes β Main data input
Endpoint 0x83: IN, Interrupt, 10 bytes β Status/control
- USB Enumeration: Device presents as CDC composite device
- Interface Claim: Claim Interface 1 (data interface)
- Bulk Transfer: Send bootloader data in 512-byte chunks via EP 0x02
- Status Read: Monitor EP 0x81 for responses/acknowledgments
- Interrupt Monitor: EP 0x83 for device status (optional)
- USB Timeout: 5-second timeout for transfers
- Retry Logic: Auto-fallback from USB to serial mode
- Chunk Verification: Per-chunk error checking
- Device State: Connection monitoring and recovery
Device Not Found (18D1:4F00):
- Ensure device is in emergency download mode
- Try different USB cable/port
- Check Windows Device Manager for driver issues
USB Transfer Failed:
- Switch to serial mode:
tensor-usbdl-gs101.exe flash pbl.img serial - Check for USB 3.0 compatibility issues
- Try USB 2.0 port
Permission Denied:
- Run as Administrator
- Check antivirus software blocking USB access
- Verify USB drivers are installed
Use debug build for verbose output:
tensor-usbdl-gs101-debug.exe testmain.go - CLI interface and main logic
gs101_usb.go - USB bulk transfer implementation
devices.go - Device discovery (original)
dnw.go - Serial DNW communication (original)
command.go - Command protocol (original)
message.go - Message handling (original)
github.com/google/gousb- USB device communicationgo.bug.st/serial- Serial communicationgithub.com/JoshuaDoes/crunchio- Data buffering
- Keyholes Analysis: USB endpoint reverse engineering
- Original tensor-usbdl: JoshuaDoes
- GS101 Integration: Enhanced for Pixel 6a unbrick
- Endpoint Discovery: Based on real USB traffic capture
π― GOAL: First successful Pixel 6a unbrick using direct USB endpoint communication!