adbd: fix spurious failure to create dirs when pushing.

When pushing to a path, we first try to ensure the directory path
exists and has the permissions expected by fs_config. Due to a change
that changed the fs_config check from a blacklist to a whitelist, we
started doing this for /data (which doesn't begin with /data/), and the
UID/GID for that path was accidentally being reused for following path
segments that didn't exist, leading to a failed attempt to chown
/data/local/tmp/foo to be owned by system.

Issue: FP2P-391
Bug: http://b/110953234
Test: python test_device.py
Change-Id: Ie798eec48bcf54aea40f6d90cc03bb2170280ee8
Merged-In: Ie798eec48bcf54aea40f6d90cc03bb2170280ee8
(cherry picked from commit 4c0078d67a552c63b439b2398e17e9cdaf6b7067)
(cherry picked from commit cfe89277d9c7a996d888ab75afa1945e3e86f0b1)
2 files changed