question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Device bricked after retry

See original GitHub issue

Since the introduction of “firstRun”, the firmware inputStream is not recreated in case of error and service restarting. We are using the LegacyDFU on our oldest devices with .bin firmware for application update. With the new behaviour, we experimented an error when sending firmware to device with some Samsung smartphones : Response received (Op Code = 3, Status = 6) Device returned error after sending file (error 6): OPERATION FAILED

This is not the problem since the library handles it, closing connection and restarting the service but in the second attempt, the inputStream is not reinitiated.

If the inputStream (AssetInputStream) has been partially read, the .available() that is used to calculate the image size in bytes in the init of the service will return the size of the file minus the bytes already read. The firmware size validation is based on this value, so the transfer is validated with a wrong size and the transmitted file is corrupted resulting in a bricked device.

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:31 (16 by maintainers)

github_iconTop GitHub Comments

1reaction
philips77commented, Oct 22, 2018

Hi, managed to reproduce the issue on our side. Now I have something to test with. Let me come back to you when I find something.

1reaction
philips77commented, Oct 22, 2018

Hello again, sorry for the delay, I was sick. Did you find any solution that makes the first attempt to work? If not (but I’d really like to find the root cause and have it fixed), I’ll revert the 1 sec delay and release 1.8.0 of the library. At least now it doesn’t brick your device.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix a Bricked Android Phone [2022 Updated] - FonePaw
When your Android phone is unresponsive or frozen after flashing a ROM or rooting incorrectly, you are told that the phone is bricked....
Read more >
Ultimate Ways to Fix a Bricked Android Phone - iMobie
Here in the post, some methods are listed to help users who encountered an Android phone was bricked get out of bricked phone...
Read more >
[Info]FIXING A BRICKED PHONE - XDA Forums
A bricked phone means one thing: your phone won't turn on in any way, shape or form, and there's nothing you can do...
Read more >
Are You Sure It's Bricked? How You Can Fix Your Broken ...
Yes: You Can Unbrick iOS Devices!​​ You should start by plugging it into the mains to recharge/maintain the charge. Problems can occur when...
Read more >
How Do I Fix My Bricked Android Phone? - Lifehacker
Dear Lifehacker, Rooting my Android phone went well, but I've tried to flash a custom ROM and now I think I've bricked my...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found