Skip to content
Commit d044dba5 authored by Josh Gao's avatar Josh Gao
Browse files

Set permissions on adb key file after write.

We're using AtomicFile to atomically update the key file, but that does
so by creating a new file with 0600 permissions, and then moving it into
place, which results in adbd not being able to read the file when not
root. Manually set the permissions after we write to the file to prevent
this.

Also, while we're at it, delete the explicit creation of the file, since
FileOutputStream does so automatically.

Bug: http://b/132774621
Test: manual
Change-Id: I286b90adfdc591c5e7d7e417ef06be287d77261e
parent 9a7f304d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment