Port tests for register, format images, copied bdm functions

Change-Id: I115731db7edaf362f53baf058ac80e2ec6cf651a
Merge "Port tests for register, format images, copied bdm functions"