Android-DFU-Library
Android-DFU-Library copied to clipboard
dfu upgrade failed, throwing an exception
DFU Bootloader version:
- SDK version: 29
- Bonding used: yes
- Library version:1.11.0
Device information:
- Device: Samsung s10
- OS: Android 10
Your question: When upgrading the device, an exception occurred.The location of the exception at SecureDfuImpl.class@onCharacteristicChanged characteristic.mValue : [96,3,3] I can be sure that the installation package is fine and all other devices can be upgraded normally.What to do about it?
thanks.
Logs
2020-07-30 15:44:33.135 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 1---[DFU] DFU service started
2020-07-30 15:44:33.135 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 1---[DFU] Opening file...
2020-07-30 15:44:33.154 30052-30091/com.lb.dev_entry_tool I/.dev_entry_too: Waiting for a blocking GC ProfileSaver
2020-07-30 15:44:33.163 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 5---[DFU] Firmware file opened successfully
2020-07-30 15:44:33.164 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 1---[DFU] Connecting to DFU target...
2020-07-30 15:44:33.164 30052-31422/com.lb.dev_entry_tool I/DfuBaseService: Connecting to the device...
2020-07-30 15:44:33.165 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 0---[DFU] gatt = device.connectGatt(autoConnect = false, TRANSPORT_LE, preferredPhy = LE_1M | LE_2M)
2020-07-30 15:44:33.165 30052-31422/com.lb.dev_entry_tool D/BluetoothAdapter: STATE_ON
2020-07-30 15:44:33.167 30052-31422/com.lb.dev_entry_tool D/BluetoothGatt: connect() - device: E7:8E:80:2C:EA:97, auto: false
2020-07-30 15:44:33.167 30052-31422/com.lb.dev_entry_tool D/BluetoothAdapter: isSecureModeEnabled
2020-07-30 15:44:33.167 30052-30091/com.lb.dev_entry_tool I/.dev_entry_too: WaitForGcToComplete blocked ProfileSaver on Instrumentation for 13.152ms
2020-07-30 15:44:33.167 30052-31422/com.lb.dev_entry_tool D/BluetoothGatt: registerApp()
2020-07-30 15:44:33.168 30052-31422/com.lb.dev_entry_tool D/BluetoothGatt: registerApp() - UUID=0fe1773b-f196-45fd-8c31-e01f3509945c
2020-07-30 15:44:33.170 30052-31414/com.lb.dev_entry_tool D/BluetoothGatt: onClientRegistered() - status=0 clientIf=7
2020-07-30 15:44:33.229 30052-30052/com.lb.dev_entry_tool I/DfuBaseService: Action received: android.bluetooth.device.action.ACL_CONNECTED
2020-07-30 15:44:33.230 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 0---[DFU] [Broadcast] Action received: android.bluetooth.device.action.ACL_CONNECTED
2020-07-30 15:44:33.235 30052-31414/com.lb.dev_entry_tool D/BluetoothGatt: onClientConnectionState() - status=0 clientIf=7 device=E7:8E:80:2C:EA:97
2020-07-30 15:44:33.239 30052-31414/com.lb.dev_entry_tool I/DfuBaseService: Connected to GATT server
2020-07-30 15:44:33.240 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 5---[DFU] Connected to E7:8E:80:2C:EA:97
2020-07-30 15:44:33.240 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 1---[DFU] Discovering services...
2020-07-30 15:44:33.240 30052-31414/com.lb.dev_entry_tool D/BluetoothGatt: discoverServices() - device: E7:8E:80:2C:EA:97
2020-07-30 15:44:33.240 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 0---[DFU] gatt.discoverServices()
2020-07-30 15:44:33.241 30052-31414/com.lb.dev_entry_tool I/DfuBaseService: Attempting to start service discovery... succeed
2020-07-30 15:44:34.016 30052-31414/com.lb.dev_entry_tool D/BluetoothGatt: onConnectionUpdated() - Device=E7:8E:80:2C:EA:97 interval=12 latency=0 timeout=600 status=0
2020-07-30 15:44:34.158 30052-31414/com.lb.dev_entry_tool D/BluetoothGatt: onConnectionUpdated() - Device=E7:8E:80:2C:EA:97 interval=6 latency=0 timeout=500 status=0
2020-07-30 15:44:34.163 30052-31414/com.lb.dev_entry_tool D/BluetoothGatt: onSearchComplete() = Device=E7:8E:80:2C:EA:97 Status=0
2020-07-30 15:44:34.163 30052-31414/com.lb.dev_entry_tool I/DfuBaseService: Services discovered
2020-07-30 15:44:34.164 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 5---[DFU] Services discovered
2020-07-30 15:44:34.168 30052-31422/com.lb.dev_entry_tool W/DfuImpl: Secure DFU bootloader found
2020-07-30 15:44:34.172 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 0---[DFU] wait(1000)
2020-07-30 15:44:34.212 30052-31414/com.lb.dev_entry_tool D/BluetoothGatt: onConnectionUpdated() - Device=E7:8E:80:2C:EA:97 interval=12 latency=0 timeout=600 status=0
2020-07-30 15:44:35.170 30052-31422/com.lb.dev_entry_tool I/DfuImpl: Requesting MTU = 517
2020-07-30 15:44:35.172 30052-31422/com.lb.dev_entry_tool D/BluetoothGatt: configureMTU() - device: E7:8E:80:2C:EA:97 mtu: 517
2020-07-30 15:44:35.172 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 1---[DFU] Requesting new MTU...
2020-07-30 15:44:35.172 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 0---[DFU] gatt.requestMtu(517)
2020-07-30 15:44:35.202 30052-31414/com.lb.dev_entry_tool D/BluetoothGatt: onConfigureMTU() - Device=E7:8E:80:2C:EA:97 mtu=247 status=0
2020-07-30 15:44:35.204 30052-31414/com.lb.dev_entry_tool I/DfuImpl: MTU changed to: 247
2020-07-30 15:44:35.205 30052-31422/com.lb.dev_entry_tool I/DfuImpl: Enabling notifications...
2020-07-30 15:44:35.205 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 5---[DFU] MTU changed to: 247
2020-07-30 15:44:35.207 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 1---[DFU] Enabling notifications for 8ec90001-f315-4f60-9fb8-838830daea50
2020-07-30 15:44:35.209 30052-31422/com.lb.dev_entry_tool D/BluetoothGatt: setCharacteristicNotification() - uuid: 8ec90001-f315-4f60-9fb8-838830daea50 enable: true
2020-07-30 15:44:35.209 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 0---[DFU] gatt.setCharacteristicNotification(8ec90001-f315-4f60-9fb8-838830daea50, true)
2020-07-30 15:44:35.212 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 0---[DFU] gatt.writeDescriptor(00002902-0000-1000-8000-00805f9b34fb, value=0x01-00)
2020-07-30 15:44:35.266 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 5---[DFU] Data written to descr.8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 01-00
2020-07-30 15:44:35.270 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 1---[DFU] Notifications enabled for 8ec90001-f315-4f60-9fb8-838830daea50
2020-07-30 15:44:35.270 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 10---[DFU] Notifications enabled
2020-07-30 15:44:35.270 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 0---[DFU] wait(1000)
2020-07-30 15:44:36.269 30052-31422/com.lb.dev_entry_tool I/DfuImpl: Setting object to Command (Op Code = 6, Type = 1)
2020-07-30 15:44:36.272 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 1---[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
2020-07-30 15:44:36.274 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 0---[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
2020-07-30 15:44:36.316 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 5---[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 06-01
2020-07-30 15:44:36.319 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 5---[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-06-01-00-01-00-00-87-00-00-00-EB-55-7B-C1
2020-07-30 15:44:36.322 30052-31422/com.lb.dev_entry_tool I/DfuImpl: Command object info received (Max size = 256, Offset = 135, CRC = C17B55EB)
2020-07-30 15:44:36.327 30052-31422/com.lb.dev_entry_tool I/DfuImpl: Init packet CRC is the same
2020-07-30 15:44:36.327 30052-31422/com.lb.dev_entry_tool I/DfuImpl: -> Whole Init packet was sent before
2020-07-30 15:44:36.328 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 10---[DFU] Command object info received (Max size = 256, Offset = 135, CRC = C17B55EB)
2020-07-30 15:44:36.328 30052-31422/com.lb.dev_entry_tool I/DfuImpl: Executing init packet (Op Code = 4)
2020-07-30 15:44:36.328 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 10---[DFU] Received CRC match Init packet
2020-07-30 15:44:36.330 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 1---[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
2020-07-30 15:44:36.331 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 0---[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
2020-07-30 15:44:36.360 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 5---[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 04
2020-07-30 15:44:36.362 30052-31422/com.lb.dev_entry_tool I/DfuImpl: Sending the number of packets before notifications (Op Code = 2, Value = 12)
2020-07-30 15:44:36.363 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 5---[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-04-01
2020-07-30 15:44:36.364 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 10---[DFU] Command object executed
2020-07-30 15:44:36.365 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 1---[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
2020-07-30 15:44:36.367 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 0---[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
2020-07-30 15:44:36.405 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 5---[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 02-0C-00
2020-07-30 15:44:36.407 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 5---[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-02-01
2020-07-30 15:44:36.408 30052-31422/com.lb.dev_entry_tool I/DfuImpl: Setting object to Data (Op Code = 6, Type = 2)
2020-07-30 15:44:36.409 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 10---[DFU] Packet Receipt Notif Req (Op Code = 2) sent (Value = 12)
2020-07-30 15:44:36.410 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 1---[DFU] Writing to characteristic 8ec90001-f315-4f60-9fb8-838830daea50
2020-07-30 15:44:36.411 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 0---[DFU] gatt.writeCharacteristic(8ec90001-f315-4f60-9fb8-838830daea50)
2020-07-30 15:44:36.450 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 5---[DFU] Data written to 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 06-02
2020-07-30 15:44:36.454 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 5---[DFU] Notification received from 8ec90001-f315-4f60-9fb8-838830daea50, value (0x): 60-06-01-00-10-00-00-F0-6F-00-00-2C-91-23-9B
2020-07-30 15:44:36.457 30052-31422/com.lb.dev_entry_tool I/DfuImpl: Data object info received (Max size = 4096, Offset = 28656, CRC = 9B23912C)
2020-07-30 15:44:36.462 30052-31422/com.lb.dev_entry_tool I/DfuImpl: 28656 bytes of data sent before, CRC match
2020-07-30 15:44:36.462 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 10---[DFU] Data object info received (Max size = 4096, Offset = 28656, CRC = 9B23912C)
2020-07-30 15:44:36.463 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 10---[DFU] 28656 bytes of data sent before, CRC match
2020-07-30 15:44:36.465 30052-31422/com.lb.dev_entry_tool I/DfuImpl: Uploading firmware...
2020-07-30 15:44:36.470 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 10---[DFU] Resuming uploading firmware...
2020-07-30 15:44:36.470 30052-30052/com.lb.dev_entry_tool E/DfuLogListener: 1---[DFU] Sending firmware to characteristic 8ec90002-f315-4f60-9fb8-838830daea50...
2020-07-30 15:44:36.663 30052-30069/com.lb.dev_entry_tool W/BluetoothGatt: Unhandled exception in callback
java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.Integer.intValue()' on a null object reference
at no.nordicsemi.android.dfu.SecureDfuImpl$SecureBluetoothCallback.onCharacteristicChanged(SecureDfuImpl.java:109)
at no.nordicsemi.android.dfu.DfuBaseService$5.onCharacteristicChanged(DfuBaseService.java:983)
at android.bluetooth.BluetoothGatt$1$8.run(BluetoothGatt.java:503)
at android.bluetooth.BluetoothGatt.runOrQueueCallback(BluetoothGatt.java:860)
at android.bluetooth.BluetoothGatt.access$200(BluetoothGatt.java:45)
at android.bluetooth.BluetoothGatt$1.onNotify(BluetoothGatt.java:497)
at android.bluetooth.IBluetoothGattCallback$Stub.onTransact(IBluetoothGattCallback.java:313)
at android.os.Binder.execTransactInternal(Binder.java:1021)
at android.os.Binder.execTransact(Binder.java:994)