I'm not crazy about the way this sets a "private" variable, which is then expected inside `device_root`. This seems to break encapsulation, and also I think it's confusing. I myself was at first confused by the fact that this line sets `self._device_root` and then the next line uses `self.device_root`.

What do you think about making this automatic by putting this code into another path inside the `device_root` method? For example, at [1] there could be another `elif` that checks `is_desktop_b2g` and if we are running on desktop then it sets the `_device_root` accordingly and if needed also sets the `device.storage.overrideRootDir` pref.

Also, +1 to using a temp directory for this.
[1] https://github.com/mozilla-b2g/gaia/pull/19155/files#diff-6d544bbb7c759ffb68f344f348f7740eR433