Catalysis of the reaction: 2,5-diamino-6-hydroxy-4-(5-phosphoribosylamino)-pyrimidine + H2O + H+ = 5-amino-6-(5-phosphoribosylamino)uracil + NH4.
2,5-diamino-6-hydroxy-4-(5-phosphoribosylamino)-pyrimidine 2-aminohydrolase activity