Asked 6 years ago
28 Dec 2017
Views 1388
angeo

angeo posted

How to run debug application in Android Physcial Device and adb parallelaly


react-native run-android


it always initialize adb emulator but i want to run it with physical device without closing emulator , is that possible ?
sachin

sachin
answered Apr 25 '23 00:00

To run a debug application in an Android physical device and ADB (Android Debug Bridge) at the same time, you can follow these steps:

1.First, ensure that USB debugging is enabled on your Android device. This can typically be done by going to Settings > Developer options and toggling the USB debugging option.

2.Connect your device to your computer via USB cable and open a terminal window or command prompt.

3.Navigate to the directory where your ADB executable file is located and run the command "adb devices" to confirm that your device is recognized by ADB.

4.Open your Android Studio project and build the debug version of your app.

5.Select your connected device as the deployment target in Android Studio by clicking the "Run" button in the toolbar and choosing your device from the list of available options.

6.Once your app is running on your device, you can use ADB commands in the terminal or command prompt to debug your app. For instance, you can use "adb logcat" to view real-time logcat output for your app.

Note that you may need to grant ADB permission to access your device, which you can do by accepting a prompt on your device. Additionally, make sure that your device is not in charge-only mode, as this can prevent ADB from recognizing your device.

By following these steps, you should be able to run and debug your application in an Android physical device and ADB simultaneously.
Post Answer