-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve unsigned firmware update on android #9625
improve unsigned firmware update on android #9625
Conversation
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gwen2018 sounds great.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Improve unsigned firmware update:
Tracked on: DSO-17007, DSO-17550