By using the aspect ratio of your phone? If that image is a full screenshot, it is 720x1520, which is an aspect ratio over two, while those two you tested have a ratio of less than two. Of course, if your game field needs to be of a certain size ratio, then black borders are an inevitability on every mobile screen that does not conform to that ratio. For example if your field needs to be twice as tall as it is wide, then every screen that does not use that ratio either has to use black borders, or do an ugly stretch, or the game needs to conform to screen ratio and accept that different phones will have a different gameplay feel because game will be sized differently.