Skip to content

Use apk name and version when bluetoothing

Before sending apks via bluetooth, write them to the files directory with a nice name, i.e. "F-Droid-0.103.1.apk" instead of "base.apk" like it was in previous versions, or "install-[random].apk" like it is in !511 (merged).

NOTE: This change may not be worth it, due to the following which I require feedback on:

I can see a situation when two files are written to the temp files location from different repositories. That is, if you start bluetoothing "F-Droid-0.103.1.apk" from the F-Droid repo, then halfway through, you start bluetoothing "F-Droid-0.103.1.apk" from a fictitious nightly repo, it will overwrite the first one. Also, if you install "F-Droid-0.103.1.apk" from the F-Droid repo, and then try to bluetooth the same version from a nightly repo, then it will have the same problem (both bluetoothing and installing via PM use the same logic to make the .apk file readable).

Given this, is it worth implementing this? I think it is, because:

  • It is not a security risk, just a usability problem. You will only ever get a corrupt file which fails to install, not a malicious file.
  • It is only for the situation when two different repos provide the same apk with the same version name.

Thoughts?

Merge request reports