Add Samsung P1 and make a few changes to fix dependencies