Skip to content

Commit 7a30d66

Browse files
committed
Fix for V2 DFU from Lenovo M10
1 parent fdfe6ce commit 7a30d66

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/src/main/java/com/samsung/microbit/ui/activity/ProjectActivity.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1474,6 +1474,15 @@ private void startDFUFlash() {
14741474
.setKeepBond(true)
14751475
.setForeground(true)
14761476
.setZip( getCachePathAppZip());
1477+
1478+
// https://github.com/microbit-foundation/microbit-android/issues/82
1479+
// ? if ( Build.HARDWARE.equals("ums512_1h10")) {
1480+
if ( Build.MANUFACTURER.toLowerCase().contains("lenovo")
1481+
&& Build.DEVICE.toLowerCase().contains("tb328")) {
1482+
// Tested with Lenovo M10 TB328FU with Android 12 - returns mtu 247, but DFU fails
1483+
starter.disableMtuRequest(); // faster than setMtu(23), which also works
1484+
}
1485+
14771486
final DfuServiceController controller = starter.start(this, DfuService.class);
14781487
} else {
14791488
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {

0 commit comments

Comments
 (0)