Skip to content

improve unsigned firmware update on android - #9625

Merged
ev-mp merged 2 commits into
realsenseai:developmentfrom
gwen2018:unsigned_firmware_update_improvement
Sep 5, 2021
Merged

improve unsigned firmware update on android#9625
ev-mp merged 2 commits into
realsenseai:developmentfrom
gwen2018:unsigned_firmware_update_improvement

Conversation

@gwen2018

Copy link
Copy Markdown
Contributor

Improve unsigned firmware update:

  1. use file browser to pick the firmware file in any accessible directory
  2. error handling

Tracked on: DSO-17007, DSO-17550

@ev-mp
ev-mp requested a review from remibettan August 16, 2021 06:03

@remibettan remibettan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please clarify the questions in my comments

intent.putExtra(getString(R.string.browse_folder), getString(R.string.realsense_folder) + File.separator + "firmware");
startActivityForResult(intent, OPEN_FILE_REQUEST_CODE);
Intent intent = new Intent();
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION | Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please explain why do you need these permissions

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these are permissions for the uri, probably not needed as it's in the same app. removed it.


// firmware file in app local storage, for example,
// /storage/emulated/0/Android/data/com.intel.realsense.camera/files/Download
File downloadDir = getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember that the folder was /storage/emulated/0/Android/data/com.intel.realsense.camera/files/realsense/firmware.
Why do you change it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is temporary working directory for the unsigned fw, use the standard download folder, transparent to the user. avoid mixing with the custom folder that contains the signed firmware.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, in order to test it, the unsigned firmware should be located in /storage/emulated/0/Android/data/com.intel.realsense.camera/files/Download - correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@remibettan no, the unsigned firmware file can be in any accessible folder mounted on the system, then user pick the file through the file browser. The file will be copied to this app local folder and flash to the device. The process is transparent, user do not need to know the location of this folder.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gwen2018 sounds great.

@remibettan remibettan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work!

@ev-mp
ev-mp merged commit 1d5e99d into realsenseai:development Sep 5, 2021
@gwen2018
gwen2018 deleted the unsigned_firmware_update_improvement branch February 4, 2025 05:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants