Skip to content

Commit 3a46a76

Browse files
committed
Fix for V2 DFU from Lenovo M10
1 parent 6c1b965 commit 3a46a76

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
@@ -1479,6 +1479,15 @@ private void startDFUFlash() {
14791479
.setKeepBond(true)
14801480
.setForeground(true)
14811481
.setZip( getCachePathAppZip());
1482+
1483+
// https://github.com/microbit-foundation/microbit-android/issues/82
1484+
// ? if ( Build.HARDWARE.equals("ums512_1h10")) {
1485+
if ( Build.MANUFACTURER.toLowerCase().contains("lenovo")
1486+
&& Build.DEVICE.toLowerCase().contains("tb328")) {
1487+
// Tested with Lenovo M10 TB328FU with Android 12 - returns mtu 247, but DFU fails
1488+
starter.disableMtuRequest(); // faster than setMtu(23), which also works
1489+
}
1490+
14821491
final DfuServiceController controller = starter.start(this, DfuService.class);
14831492
} else {
14841493
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {

0 commit comments

Comments
 (0)