mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-12-25 18:15:49 +01:00
Fix PineTime firmware upload for Android 12 target
Now that the target SDK was changed to 31, the `no.nordicsemi.android:dfu` library needs to be updated, as the current version dies on Android 12+. However, the fixed version (1.12.0) also fixed MTU handling: The previous versions ignored the MTU settings completely for legacy DFU. <https://github.com/NordicSemiconductor/Android-DFU-Library/pull/260> And while our `PineTimeJFSupport` code always tried to set MTU to 517, it was ignored. Which was good because PineTime does not support larger MTUs. So that we need to set the correct low MTU now the library really applies it. Note that the current version of the DFU library cannot be used right now, it does not even compile because of androidx dependency mismatch. Fixes #3203
This commit is contained in:
parent
7eee3e16cd
commit
8f5c32fbee
@ -230,7 +230,7 @@ dependencies {
|
||||
implementation 'com.google.android.flexbox:flexbox:3.0.0'
|
||||
implementation "com.google.code.gson:gson:2.8.6"
|
||||
|
||||
implementation "no.nordicsemi.android:dfu:1.11.1"
|
||||
implementation "no.nordicsemi.android:dfu:1.12.0"
|
||||
implementation("com.github.tony19:logback-android:2.0.0") {
|
||||
exclude group: "com.google.android", module: "android"
|
||||
}
|
||||
|
@ -425,7 +425,7 @@ public class PineTimeJFSupport extends AbstractBTLEDeviceSupport implements DfuL
|
||||
.setKeepBond(true)
|
||||
.setForeground(false)
|
||||
.setUnsafeExperimentalButtonlessServiceInSecureDfuEnabled(false)
|
||||
.setMtu(517)
|
||||
.setMtu(23)
|
||||
.setZip(uri);
|
||||
|
||||
controller = starter.start(getContext(), PineTimeDFUService.class);
|
||||
|
Loading…
Reference in New Issue
Block a user