When i try to test my Gear VR build, it just opens the oculus store

You should create an “assets” folder and copy the osig files for the devices you want to enable in the UE4 installation. When building the app, the UE4 editor will automatically copy the files to the device.

On mac, for example, the folder would be:

/Users/Shared/Epic\ Games/UE_4.15/Engine/Build/Android/Java/assets