dup fds before closing them

Test: adb install --incremental
BUG: b/147371381
Change-Id: I0cfd94f5ff02a5cf56314fdf653f669d46242f9f
1 file changed