Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Unity Android OS version support?

Discussion in 'Android' started by erica.sampson, Sep 14, 2010.

  1. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    I realize this is probably written somewhere but I couldn't for the life of me find it...

    Anyone know what versions of the android OS will actually play a unity android build?

    I'm going to assume 2.1 and 2.2 but anything lower?

    thanks in advance :)
     
  2. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Only devices with 2.x will be supported.
     
  3. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    Ok sounds good, thanks for the quick response :)
     
  4. sybixsus2

    sybixsus2

    Joined:
    Feb 16, 2009
    Posts:
    943
    So there are no plans for Unity Android to support Gingerbread?
     
  5. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    It should ofcourse have read "2.x _or later_" to cover gingerbread and whatever sweet stuff google will come up with.. :)
     
  6. sybixsus2

    sybixsus2

    Joined:
    Feb 16, 2009
    Posts:
    943
    Ah ok, that's a relief. Thanks for the clarification.
     
  7. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    our programmer was saying that he was getting errors at one point that suggested that unity was building for 2.2. Is there a setting somewhere that needs to be changed in order to build for 2.1 or 2.0?
     
  8. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Unity uses the very latest SDK to take advantage of the features present there (like installing to sdcard etc). This means that the development computer needs to have SDK 2.2 installed, but this does not mean that the app won't work on devices with earlier versions. The new features of Froyo will simply be ignored when run on such a device.
     
  9. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    Alright so then it's simply up to us to make sure we don't use features that are not supported in our lowest target OS?
     
  10. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    I would say its only possible to be using newer features if you inject your own java code using plugins (or access java from a native plugin). And then you would need to put a custom AndroidManifest.xml in the Plugins folder with the correct settings.

    Basically; with "normal" use of Unity you won't run into this problem.
     
  11. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    Did something change with the newest release? because I can't even get a simple scene to install correctly on my device anymore. It either tells me that it,s installed, brings up the splash screen and crashes, or simply won't install.

    are there perhaps settings somewhere I need to adjust?
     
  12. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Not a whole lot except the adding of Device Filter and support for License Verification Library. Please have a look at the release notes for a complete list of changes affecting Android.

    The RC1 one has been tested, and should build a simple scene without hiccups..

    That sounds like more than one bug if thats the case.. What kind of device are you using?

    You can have a look under Player Settings; those are the only setting relevant for Android.
    What does the logcat tell you?
    If you build&run the exact same project in beta7 does it work? If so, please submit a bug report and attach the project.
     
  13. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    I'll have a look at the release notes to see if I notice anything. I believe the beta 7 builds are not working but a few I made from beta 5/6 are.

    I'm thinking, because I trust the unity people would test this kind of simple function, and because no one else seems to be having any issues, it has to be one of 3 things:

    1. I'm simply doing something wrong.

    2. something has changed, potentially in 3.7, that is setting some default setting I need to disable.

    3. my device is a little bit of a special case and isn't playing nicely (iRobot, 2.1 Eclair)

    I'm going to spend some time trying to be absolutely sure I'm not doing anything wrong, and If I don't find a solution in the next day or so I'll send a bug report.

    thanks for the help!
     
  14. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    After google'ing a bit it seems the aPad iRobot is using a RockChip 2808A which is not an ARMv7 compatible processor at all.

    The minimum hardware requirement for Unity Android is currently ARMv7 (or ARMv6 w/ VFP with runtime detection)
     
  15. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    ahhh, that would explain it #3 it is, with maybe just a bit of #1 :).

    Thanks a bunch for the help it's really appreciated. Hopefully this won't be an issue for us.
     
  16. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    ... I wonder why the early ones work?
     
  17. absolutebreeze

    absolutebreeze

    Joined:
    Feb 7, 2009
    Posts:
    490
    I'm just wondering - as a galaxy s owner.... will unity android compile ok for the ARM Cortex A8 1GHz?
     
  18. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    It probably stopped working when we moved the bulk part of our iPhone VFP vector math optimizations to Android (which happened around beta6-7).
     
  19. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    Where might i be able to get my hands on these?
     
  20. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595

    A8 is an ARMv7A class CPU, so no worries. (http://en.wikipedia.org/wiki/ARM_architecture) But we've had isolated crash reports with apps running on Galaxy S (Vibrant) and we're looking into that. Hopefully we will be able to resolve it quickly..
     
  21. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
  22. absolutebreeze

    absolutebreeze

    Joined:
    Feb 7, 2009
    Posts:
    490
    I'm happy to test apps on the galaxy s for you.

    Just shout in my direction :)

    Tony
     
  23. Dreamora

    Dreamora

    Joined:
    Apr 5, 2008
    Posts:
    26,601
    The galaxy s is at the time the only device that has a reasonable GPU for its screen resolution, it uses the successor of what apple has been using the past 18 months, the SGX540 (over the SGX535 used by apple)

    For the android side thats actually pretty uncommon at least up to now cause most use some other gpus as those qualcom brings with their cpus directly etc.

    that being said, that shouldn't make a difference unless the ogl es driver is fu** up
     
  24. dsthilaire

    dsthilaire

    Joined:
    Dec 4, 2009
    Posts:
    17
    Hmm is the java interfacing/plugin stuff is documented anywhere?? Sounds really interesting...!

    Thanks!
     
  25. dsthilaire

    dsthilaire

    Joined:
    Dec 4, 2009
    Posts:
    17
    The answer to my own question lies here:

    http://forum.unity3d.com/viewtopic.php?t=64443

    :)
     
  26. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    Ok so, it's 2 weeks later I have a new 2.1 device with an ARM 11 processor and I still can't get unity to build an app that will successfully install. I'm almost certain that it's because unity is using the updated 2.2 sdk to compile but I can't find a way in either the sdk manager or in unity to force it to only use 2.1.

    Any advice would be greatly appreciated.
     
  27. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    The ARM11 family is not supported; Cortex/ARMv7 is (wikipedia).
     
  28. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    Ok... so no to ARM 9 or ARM 11 but yes to ARM 6 or ARM 7 (but only those two) and all of the Cortex versions? Or only a few of those as well?

    Thanks for the info... Hopefully I'll get my head wrapped around this stuff soon.
     
  29. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    ohhh... wait, I had a look at that wiki link. I think I get it. I was looking at a different diagram that was confusing me a little.

    correct me if I'm wrong.

    unity supports: ARMv7-A, ARMv7-R, ARMv7-ME, ARMv7-M, ARMv6-M,
    which includes: Cortex-A8, Cortex-A9, Cortex-A9 MPCore, Cortex-R4(F), Cortex-M4, Cortex-M3, Cortex-M0, Cortex-M1.

    right? so those are the only ones?...
     
  30. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    Also, if I may ask, why exactly does unity only support the above processors? is there something special about them that unity requires? or is it more to do with performance quality?
     
  31. Wozik

    Wozik

    Joined:
    Apr 10, 2009
    Posts:
    662
    Unity requires Cortex family processors for the best experience. Weaker processors lack fast FPU that is required (mostly for sounds) for the best performance. And also video accelerators in ARMv6-only CPUs are commongly too slow.
     
  32. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    The problem that I'm having is that the application fails to install and if by chance it does, it simply brings up a black screen, waits a second and then bounces back to the device home screen.

    This to me feels less like a simple quality issue and more like it's simply not working. If I was using an old joke of a processor I wouldn't be surprised except from what I can tell the ARM 11 processors aren't that far off of the unity supported ones.

    does unity have a built in mechanism for preventing an application from installing / running if it detects that the processor isn't supported?
     
  33. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    If you set Device Filter to ARMv7-only it won't install on your ARM11, and your app wont be visible to non-ARMv7 (i.e. unsupported devices) in the Android Market. The Device Filter should always be set to ARMv7-only unless there is a specific reason not to (targeting a Tegra-based device / deploy to the Android Emulator).
     
  34. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Please provide logcat output for those two scenarios, if you wish to have it investigated further.
     
  35. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    Ok I see,

    I'm not overly concerned about the market because we aren't developing for the market. we're developing for a specific hardware only and it's looking like the client wants to use an ARM 11 processor. Is there any way at all i could get unity to ignore the device filter so we can at least see what it looks like / show the client something? I tried using the universal / emulator setting but this doesn't work either.

    p.s I really appreciate all of the help on this one :)
     
  36. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    What is the exact specification of that ARM11 cpu?

    Again, copies of the logcat of the different scenarios is the only way to determine the cause of your problems.
     
  37. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    CPU specs:

    Processor : ARMv6-compatible processor rev 6 (v6l)
    BogoMIPS : 499.71
    Features : swp half thumb fastmult vfp edsp java
    CPU architecture: 7
    CPU revision : 6
    Hardware : Telechips TCC89/91/92XX Demo Board

    and I'll send logcat info as soon as I get it working... :)
     
  38. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    ok so we got it working... this is the error I get when It has installed and I try to run it. The app starts, I get a black screen and then it crashes and jumps to the device home screen:

    D/Zygote ( 2819): Process 6717 terminated by signal (4)
    I/ActivityManager( 2835): Process com.BlackCherry.BabyToy (pid 6717) has died.
    I/UsageStats( 2835): Unexpected resume of com.fede.launcher while already resume
    d in com.BlackCherry.BabyToy
    W/InputManagerService( 2835): Window already focused, ignoring focus gain of: co
    m.android.internal.view.IInputMethodClient$Stub$Proxy@44f65358

    I'd be lying if I knew said I what it meant.

    I'm going to keep playing with this and hopefully get a few different scenarios going. I'll post up anything that might be different/helpful.
     
  39. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    I've attached 2 logs. One is the error I get when it fails to install and one is the error I get when it fails to run. It seems to be an issue with the apk not being compiled the way the device wants it to be...
     

    Attached Files:

  40. eriQue

    eriQue

    Unity Technologies

    Joined:
    May 25, 2010
    Posts:
    595
    Those logcats are somewhat incomplete. Please capture the the complete logcat by first clearing the logcat buffer:

    $> adb logcat -c

    then capture everything to a file, like this:

    $> adb logcat > logcat.txt

    then try Build&Run from the editor. After the command has failed, press ctrl-c and upload the logcat.txt as-is. Also, it's not clear to me what the difference is between a failing installation and when the installation is working (as it obviously must have installed something to later crash). Is it randomly failing or are you changing anything?

    But to answer the general question: ARM11 CPUs are not supported, only Cortex/ARMv7 is "guaranteed" to work. Using the Device Filter setting 'Universal/Experimental' you may get it to run, but I doubt it will show an impressive framerate..
     
  41. erica.sampson

    erica.sampson

    Joined:
    Jul 9, 2009
    Posts:
    158
    Right, so up until now I wasn't using the build and run option to test the app, I was building an apk then transferring the file to the device and installing it there through the device options. Sometimes when I tried to install the app, the device would report that it had installed and others it would report that the app had not installed. If it did happen to report a successful install it would fail to run when I attempted to open/launch it.

    That's what I thought, however I can't even get the application to install (using the method i described above) when I use the 'Universal/Experimental' setting.

    BUT :) It will install and run when we use the method you outlined (not sure exactly what the difference is but, oh well). This answers a lot of questions and will give us a nice solid starting point. I realize that our problems before were more than likely related to the processor but I've included the logcat for kicks.

    Thank you so much! I can't tell you how much I appreciate all of your patience with me and this issue.
     

    Attached Files: