When developing @alexander's answer, you can use the following workflow:
cd android
./gradlew assembleDebug
adb install -s <yourdevice> app/build/outputs/apk/yourapk.apk
adb reverse tcp:8081 tcp:8081 Will forward the phone 8081 port to the computer 8081, where the packager listens. If you are deploying over Wi-Fi, have a look at: https://facebook.imtqy.com/react-native/docs/running-on-device-android.html
On another screen, run:
npm start
If you really need it, you can wrap the first fragment in a script that you can parameterize with your phone id.
source
share