Q:

How to modify IP & port use react-native Android? 

I used the react-native Android demo project AwesomeProject and within the project I executed:
react-native start

In a second terminal:
react-native run-android

To start webserver and install the Android APK.  The default webserver configuration is localhost:8081, how can I modify the webserver port, and how do I update recording of the IP & Port in Android project. 
Edit: 
I just found out that can modify ip address in Android debug setting, it seems "getDebugServerHost" is a private API, does Facebook provide any API to change ip&port? 

A:

As OP commented on MossP's answer, this can now be achieved using the debug_http_host shared preference (see this issue). 
So, if you wanted to use, say, port 8082, you could add an onCreate method to your MainActivity.java file, which might look something like this:
@Override
protected void onCreate(Bundle state){
    super.onCreate(state);

    SharedPreferences preferences =
        PreferenceManager.getDefaultSharedPreferences(getApplicationContext());
    preferences.edit().putString("debug_http_host", "localhost:8082").apply();
}

Of course not forgetting to import android.content. SharedPreferences, android.os. Bundle, and android.preference. PreferenceManager. 
This would make your app try to access the packager at the desired port instead of 8081. 
Then you'd just make sure to start the packager with --port 8082 (as described here), and you should be all set. 
(Unless you happen to be using Nuclide, which is a whole other story). 
Note that up until React Native 0.46, this would only allow one to run the app successfully, but still didn't make it possible to actually attach a debugger on a non-standard port.  As of React Native 0.46, attaching a debugger should also work. 

A:

Update: See Tomty's answer for the current recommended way to do this in 2019.  
Unfortunately, the port is currently (2015/09/23) hardcoded.  I believe this will be changed in time as it already has an Issue raised from a high level contributor to the project. 
https://github.com/facebook/react-native/issues/2704

