Fix Samsung p1 build issues