Revert^2 "Fail adb install on external profile errors."

Revert submission 24993368-revert-24773688-dm-profile-validation-SONEGLGSYT

Reason for revert: Relanding the changes with flags

Reverted changes: /q/submissionid:24993368-revert-24773688-dm-profile-validation-SONEGLGSYT

Bug: 278080573
Change-Id: Ia60b7572ea9c9bafe39c63ec1ed5fe432781e04f
Merged-In: I51f45cfa216b15f6c355bfba6ddc4ca620cdf0ae
(cherry picked from commit e424064f12fb4fe91ba721b1a9f2277a2892c630 with modifications)
7 files changed