Language:
Page Info
Tags:
Skill Level:
Engine Version:

2. Set Up Your Android Device

Choose your OS:

Now that Android Works has been installed it is now time to set up your Android device so that it can be used in development. In the following section we will go over all you need to know to set up your Android device so that it can be used to run your UE4 project.

Steps

Choose Your Operating System

Windows

Mac OS

Linux

  1. Connect your Android device to your development PC via USB.

  2. Device driver software may automatically install, but if not, visit Android's OEM USB Drivers page to find driver installation links and additional information.

  3. Open the Settings application on your Android device.

  4. Tap Developer Options to open the Developer Options menu.

    If you do not see this item, you need to enable Developer Options on your device. For more about developer options, visit Android's Using Hardware Devices page.

  5. Scroll down and select About Phone. Depending on your Android device, you may have an About Device, About Tablet, or About Shield option instead.

    Note: This may be in a More section on newer Android versions.

  6. Tap the Build Number 7 times to activate developer mode.

    Enable_Dev_Mode.png

  7. After the first few presses, you will see a message stating You are now # steps away from becoming a developer.

  8. Once developer mode has been activated you will get a success message displayed on the screen similar to the one below.

    Dev_Mode_Active.png

  9. Navigate back to the Settings menu and select Developer Options which should now available.

    Dev_Options_Enabled.png

  10. In the Developer Options menu, enable USB debugging by tapping on it with your finger.

    Enable_USB_Debugging.png

  11. When prompted press the OK button to enable USB debugging.

    Enable_USB_Debugging_Warning.png

  12. You can tell USB Debugging has been enabled as there will be a green checkmark in the checkmark box next to USB debugging.

    USB_Debugging_Enabled.png

  13. Disconnect your Android device from USB and then immediately plug it back in. After the device is recognized by the PC the following message will appear on your Android device asking you if you want to allow this PC to talk to your device. A message box will ask what you'd like to use the USB connection to do. Press the checkmark box that says Always allow this computer and the press the OK button.

    PC_RSA_Fingerprint.png

  14. To verify that your device is set up properly, open a command prompt by pressing the Windows + R keys and typing cmd in the Run window.

    Windows_Run_Command.png

  15. Type adb devices in the command prompt and you should see all devices that are connected to your PC.

    ADB_Devices.png

    If you do not see your device after you input the adb devices command, here are some things you try to enable your PC to see your Android device.

    • If the device is listed but shows unauthorized, that indicates that you need to get the device to ask if you want to authorize the PC.

    • You may need to unplug and reconnect your device to make it show up.

    • It is recommended you check the Always allow checkbox.

    • In some cases, a correctly configured device may not show up if it is connected as a Media Device (MTP) instead of as a Camera (PTP). Select the Camera (PTP) option if your device is not visible at all under adb devices at this point.

  1. Connect your Android device to your Mac via USB.

  2. Open the Settings application on your Android device.

  3. Tap Developer Options to open the Developer Options menu.

    If you do not see this item, you need to enable Developer Options on your device. For more about developer options, visit Android's Using Hardware Devices page.

  4. Scroll down and select About Phone. Depending on your Android device, you may have an About Device, About Tablet, or About Shield option instead.

    Note: This may be in a More section on newer Android versions.

  5. Tap the Build Number 7 times to activate developer mode.

    Enable_Dev_Mode.png

  6. After the first few presses, you will see a message that says, You are now # steps away from becoming a developer.

  7. Once developer mode has been activated you will get a success message displayed on the screen similar to the one below.

    Dev_Mode_Active.png

  8. Navigate back to the Settings menu and select Developer Options which is now available.

    Dev_Options_Enabled.png

  9. In the Developer Options menu, enable USB debugging.

    Enable_USB_Debugging.png

  10. When prompted press the OK button to enable USB debugging.

    Enable_USB_Debugging_Warning.png

  11. You can tell USB Debugging has been enabled as there will be a green checkmark in the checkmark box next to USB debugging.

    USB_Debugging_Enabled.png

  12. Disconnect your Android device from USB and then immediately plug it back in. After the device is recognized by the PC the following message will appear on your Android device asking you if you want to allow this PC to talk to your device. A message box will ask what you'd like to use the USB connection to do. Press the checkmark box that says Always allow this computer and the press the OK button.

    PC_RSA_Fingerprint.png

  13. To verify that your device is set up properly, open the Terminal app from /Applications/Utilties.

    MAC_Terminal_Activate.png

  14. Type ADB devices in the command prompt and you should see all devices that are connected to your Mac.

    MAC_Checking_ADB_Devices.png

If you do not see your device after you input the adb devices command, here are some things you try to enable your PC to see your Android device.

  • If the device is listed but shows unauthorized, that indicates that you need to get the device to ask if you want to authorize the PC.

  • You may need to unplug and reconnect your device to make it show up.

  • It is recommended you check the Always allow checkbox.

  • In some cases, a correctly configured device may not show up if it is connected as a Media Device (MTP) instead of as a Camera (PTP). Select the Camera (PTP) option if your device is not visible at all under adb devices at this point.

  1. Connect the Android device to your Linux computer with a USB cable.

  2. Open the Settings application on your Android device.

    Click for full image.

  3. Tap Developer Options to open the Developer Options menu.

    Click for full image.

    If you don't see this item, you'll need to enable Developer Options on your device. To enable Developer Options, open the Settings application, scroll to the bottom and select About phone. After selecting About phone scroll to the bottom and tap Build number seven (7) times. For additional instructions on how to enable Developer Options on Android devices, visit Android's User Guide .

Enabling USB Debugging

  1. From the Developer Options menu, enable USB debugging.

    Click for full image.

  2. A window should appear, confirming your selection to enable USB debugging. After reading the prompt, go ahead and tap the OK button.

    Click for full image.

    USB debugging is now enabled.
    LinuxAndroid_Step20Note.png

  3. Now, disconnect the Android device from its USB cable, plugging it back in after a few seconds. If you're connecting a device running Android 4.2.2 or higher, the following dialog will appear, asking whether you should accept an RSA key that allows debugging through your Linux computer. Go ahead and select the checkbox next to Always allow from this computer before tapping the OK button.

    Click for full image.

End Result

When completed you will now have an Android based smartphone that is ready for your UE4 project to be deployed to and run on.