Move parts of roots.cpp to libfs_mgr am: 0f339e27bb
am: 6e232ed3ce

Change-Id: I0bee9493d0fe53fe4fd5150b9e81b295eefb4f70