New to the forums? Click here to read the How To guide. -- Developers click here.

Can't find "Device ID" to start development for GearVR

karrtoonkarrtoon Posts: 118
Art3mis
edited December 2014 in Samsung Gear VR
Edit/Update: Reddit user skyworxx has released a neat little tool on the google play store for quickly getting the device ID, here is the link: https://play.google.com/store/apps/details?id=com.skyworxx.gearvrnote4deviceidgrabber after putting your device into dev mode (push build 7 times in about section of phone) and getting the Oculus signature file from https://developer.oculus.com/tools/debug/ you will need to place it in Unity in plugins/android/assets (and may need to create that assets folder) follow posts below for more info. There are a lot of other things you also need like the Android SDK.

Old Post Continued: I went to the link https://developer.oculus.com/tools/debug/ to get the file needed to start exporting demos I am working on to test them. The following is some feedback: This page really needs better instructions. First off it gives no info that on how with the Note 4 you have to hit "build number" 7 times in the about menu for developer mode to activate. (Followed by Up, Up, Down, Down, Left, Right, Left, Right, A, B, Start) JK :) Anyway, All kinds of outdated instructions on Google for that. (30 minutes lost right now)

Now I'm stuck for about an hour and a half already trying to find my Note 4 "Device ID". All it says on the Oculus Automatic Signature page is:

"Assuming that your computer is configured as an Android developer device, open an OS shell and enter: adb devices. You should see a list of attached devices:

List of devices attached
ce0551e7 device

In this example the Device ID is ce0551e7.

Note: For more information on Android debugging and adb please read our Mobile SDK documentation"


Tried the command prompt and got nothing. I just feel like there's no need to make the wording this complicated on this auto signature page, I looked through the documentation and it's pretty much the same instructions. We're talking about getting what's basically like a serial number here, let's not scare people away that want to experiment. There really has to be a better solution to this than me having to Google search "Android developer device" and look up outdated Windows 7 usb drivers that I think might help find the Device ID. I understand the signing process is to preserve the store, or else everyone would just be passing APK's around. But in the future I would like to make a quick build for a few random people to gather feedback before submission. There is no way they are going to go through all of this hassle to get their Device ID. And how many Device ID's can I honestly add to a project anyway to "avoid the Oculus Store" if this process were in fact easier?

I am running windows 8.1, Unity 4.5.5 and feel it shouldn't have to be this difficult to get started. We should try to make the barrier of entry as low as possible so newer devs can play around with ideas in VR. I am also new to Android development (but not PC) so in my opinion these instructions need to be as clear as possible.

How do I get my "Device ID" from the phone.. I am reading it's actually called AndroidID on google? Also how do I get some random playtesters from Reddit to try my demo before submitting to the store for approval? I hope this feedback will be useful.

Comments

  • HomerS66HomerS66 Posts: 1,365
    Brain Burst
    I think you can find the device id in the developer settings on your phone? But those developer settings have to be activated first by going to settings -> about device -> and repeatedly tapping on buildnumber
  • drashdrash Posts: 2,840
    Trinity
    It's been a while since I've set up my system to do this but here are the basic overall steps:

    Step 1. Install ADB (Android Debug Bridge).
    Step 2. Enable USB debugging on your Note 4.
    Step 3. running "adb devices" at the command prompt on your PC while the device is connected via USB should give you the message shown above with the ID.
    TitansOfSpacePlus_CoverArt_VRLandscape5_60p.png
  • karrtoonkarrtoon Posts: 118
    Art3mis
    Thanks Drash, I did that before actually but it said it was "not a recognized command" in command prompt. But I did get the device ID from an "adb.exe" file buried in the computer finally. I found after installing android studio SDK (it was in platform-tools). That ID was nowhere to be found on the phone menus to the commenter above btw.

    So I was getting that adb is an "invalid command" in the command prompt before. (because did not realize it was just a simple exe file) It just sounded so complicated in the instructions, but it was not afterall.

    So I put my newly discovered ID on the Oculus site and it says "You’re not authorized to use this tool at this time. Please try again later." and was freaking out..

    Then I followed these instructions I found on Google and all was okay:

    It's likely that the device is no longer authorized on ADB for whatever reason.

    1. Check if authorized:

    <ANDROID_SDK_HOME>\platform-tools>adb devices
    List of devices attached
    4df798d76f98cf6d unauthorized

    2. Revoke USB Debugging on phone

    If the device is shown as unauthorized, go to the developer options on the phone and click "Revoke USB debugging authorization" (tested with JellyBean & Samsung GalaxyIII).

    3. Restart ADB Server:

    Then restarted adb server

    adb kill-server
    adb start-server

    4. Reconnect the device

    The device will ask if you are agree to connect the computer id. You need to confirm it.

    5. Now Check the device

    It is now authorized!

    adb devices
    <ANDROID_SDK_HOME>\platform-tools>adb devices
    List of devices attached
    4df798d76f98cf6d device



    I still think the instructions need to be more detailed, but I did finally get the automated signature file from Oculus after that. I read somewhere it is a temporary signature, does anyone know how long this file will last?
  • ive checked the phone, my computer, and downloaded the latest SDK

    i cant find this anywhere

    <ANDROID_SDK_HOME>\platform-tools
  • karrtoonkarrtoon Posts: 118
    Art3mis
    SteelClawz wrote:
    ive checked the phone, my computer, and downloaded the latest SDK

    i cant find this anywhere

    <ANDROID_SDK_HOME>\platform-tools

    Hmm, sorry I must have been mistaken with where to get the adb.exe file then. I think I must have had that platform-tools folder on my PC already for some reason. I also see something called "adt bundle" on my pc that has platform-tools and the adb.exe in it. I must have downloaded it in the past for some reason. Maybe you can download that adt bundle somewhere and it will help.

    Edit: Also, for me the platform-tools folder was not in a folder called "ANDROID_SDK_HOME", was in a folder called "sdk" in the adt bundle. If all else fails use the program called "Search Everything" by voidtools (great search program for windows) and search your entire PC for adb.exe then use the command prompt and go there. Then in the command prompt in the folder containing the exe type "adb.exe devices" or simply "adb devices" it will give you the Device ID. Follow instructions above if it says you are "unauthorized" after typing that, because the Oculus signature form will not work until you get rid of that message.
  • thanks, installing a bunch of stuff now
  • ok found it and opened a CMD window and typed adb devices

    list of devices attached
    and under it was nothing


    is there a certain way to do this?

    do i need to reboot after installing all that stuff?

    i did plug in the phone to a usb on the computer and then went to that folder and opened the cmd prompt and all but nothing was displayed
  • arnoudharnoudh Posts: 333
    NerveGear
    After you have run the adb command for the first time since a restart of the PC, you need to unplug the phone, wait a few seconds, plug it back in, and approve the connection on the phone.

    After that run adb again, and your device should show up.
  • HeadTripHeadTrip Posts: 164
    Hiro Protagonist
    I cannot get the file to generate on the website, get an error xml page saying the number doesnt exist. Anyone run into this?
    Thanks
  • karrtoonkarrtoon Posts: 118
    Art3mis
    @headtrip are you entering the device ID that adb.exe gave you?
  • HeadTripHeadTrip Posts: 164
    Hiro Protagonist
    yes, from command line... adb devices... get an 8 digit code. I'm not the only one seeing it, Im hoping its a server issue and not that our phones arent registered somehow.
    thanks
  • HeadTripHeadTrip Posts: 164
    Hiro Protagonist
    Fixed! must have been a server issue... thanks
  • karrtoonkarrtoon Posts: 118
    Art3mis
    So I ran into quite a few more issues after all of this. For those of you struggling with setting up Unity for GearVR development, this video was extremely helpful. https://www.youtube.com/watch?v=QgYwZzHxCOs

    After trying to build a project in Unity it stops in the the middle of compiling with a popup message that says "Select Android SDK root folder" I have the SDK loaded I have found a few folders called "root" in the SDK's "templates" folder. No matter what folder I select it will not allow me to advance. (Have tried them all) Any ideas?

    Edit: I tried going to edit, preferences, external tools, and selecting the Android SDK folder in program files that way. Still did not work. Keeps popping up with window.

    Edit2: Nevermind, I didn't follow the SteelClawz link above to install the rest using the Android SDK manager http://developer.android.com/tools/help/sdk-manager.html After I downloaded everything that the window stopped popping up asking for the android SDK. Now I'm geting "App not installed" when trying to install a Oculus signed APK I created and placed on my phone?

    Edit3: The final problem I had I also got resolved. It was an issue with my project, something not compatible so it wouldn't install the APK orginally. Hope this all helps someone.
  • dougkinnisondougkinnison Posts: 1
    NerveGear
    OK everyone. Simplest path possible. 

    1. Create a new C# script and call it what ever you want. 
    2. Attach it to the Main Camera of your project.
    3. In the Start function of your new script, add the following: " Debug.Log("Device ID: " + SystemInfo.deviceUniqueIdentifier); "
    4. Run your project. 
  • lXg99lXg99 Posts: 7
    NerveGear
    OK everyone. Simplest path possible. 

    1. Create a new C# script and call it what ever you want. 
    2. Attach it to the Main Camera of your project.
    3. In the Start function of your new script, add the following: " Debug.Log("Device ID: " + SystemInfo.deviceUniqueIdentifier); "
    4. Run your project. 

    This would be an awesome way to get the real device_id even from clients phones in another city. But it seems that this deviceUniqueIdentifier is reporting something different than adb devices does. At least on a quick test here.
    Is there a known way to get the same device_id that adb reports via code from Unity?

  • nicolas.bernardnicolas.bernard Posts: 1
    NerveGear

    Is there a known way to get the same device_id that adb reports via code from Unity?

    Hi, the post is quite old now, but, have you found a solution for this ? I have the same issue :)

    Thanks
Sign In or Register to comment.