Search Unity

How to run Android app generated from Unity?

Discussion in 'iOS and tvOS' started by aerende, Aug 11, 2010.

  1. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    How do I run a Unity generated game for Android on an Android phone? I've used Unity 3 with the Android plugin to compile my game for Android. I've connected my Android phone to my Mac and I can copy the Android .apk file to my Android phone.

    Is there a certain directory on the Android phone that I should copy the .apk file to so that it will show up on my Android phone and I can run the .apk file from my Android phone?
     
  2. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    OK I got it working:

    1) On the Nexus One enable USB Debugging in Settings->Applications->Development

    2) On the Mac to install the app on the Nexus One, run in a terminal window:

    adb install <Unity_game_name>.apk

    Use the full path to the file "<Unity_game_name>.apk"
     
  3. ciaravoh

    ciaravoh

    Joined:
    Dec 16, 2009
    Posts:
    252
    Hello
    You'll probably find more help in a topic with the name != "iPhone Development" ;-)
     
  4. aerende

    aerende

    Joined:
    Apr 27, 2009
    Posts:
    316
    @ciaravoh:

    True, unfortunately there isn't an Android forum at the moment. Do you have any suggestions of where to post Android questions?
     
  5. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    Support in this case as it should be documented if not, I would file a documentation bug report.

    for coding stuff Scripting would be the place as it covers all platforms, not a specific one
     
  6. dsthilaire

    dsthilaire

    Joined:
    Dec 4, 2009
    Posts:
    17
    I think that
    Code (csharp):
    1. adb -d install <yourapp.apk>
    is better since this should always work. ;)
     
  7. lesfundi

    lesfundi

    Joined:
    Jan 10, 2009
    Posts:
    628
    how do you all get on the beta list of the android version.
    I am very much interested to convert my app to android too :)
     
  8. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    buy unity android pro I would guess
     
  9. Dan Fury

    Dan Fury

    Joined:
    Jul 18, 2010
    Posts:
    158
    You do not need ADB commands to install it, just copy the apk file to your SD Card, download Astro manager, select the file and install.
     
  10. flim

    flim

    Joined:
    Mar 22, 2008
    Posts:
    326
    I have successfully installed the Android SDK. I downloaded the Roll-a-Ball example and build successfully, however my HTC Magic can't install the application.

    Is Android 1.5 not support?
     
  11. Dan Fury

    Dan Fury

    Joined:
    Jul 18, 2010
    Posts:
    158
    No, you need a 2.0 device.
     
  12. flim

    flim

    Joined:
    Mar 22, 2008
    Posts:
    326
    Oh..I need to wait the Nexus One arrive..

    the Roll-a-ball.apk is 5.77MB, is it a bit big or because Unity 3 is sill beta?
     
  13. Dan Fury

    Dan Fury

    Joined:
    Jul 18, 2010
    Posts:
    158
    All tests I made where over 6MB, but I always chose armV7 for OpenGL ES 2.
    At least everything is movable to SD Card on Froyo.