improve unsigned firmware update on android - #9625
Conversation
remibettan
left a comment
There was a problem hiding this comment.
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.
Please explain why do you need these permissions
There was a problem hiding this comment.
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.
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.
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.
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.
@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.
Improve unsigned firmware update:
Tracked on: DSO-17007, DSO-17550