title: How can I get android id using ADB and within Unity application?
body: <p>I need to get the AndroidID using ADB and inside the unity application check if it's the same device using the AndroidID.</p>
  <p>With this command, using ADB I have the AndroidID:</p>
  <pre><code>adb shell settings get secure android_id
  &gt;&gt; a9822db857e4****
  </code></pre>
  <p>And inside the unity application, I'm using this code:</p>
  <pre><code>AndroidJavaClass clsUnity = new AndroidJavaClass(&quot;com.unity3d.player.UnityPlayer&quot;);
  AndroidJavaObject objActivity = clsUnity.GetStatic&lt;AndroidJavaObject&gt;(&quot;currentActivity&quot;);
  AndroidJavaObject objResolver = objActivity.Call&lt;AndroidJavaObject&gt;(&quot;getContentResolver&quot;);
  AndroidJavaClass clsSecure = new AndroidJavaClass(&quot;android.provider.Settings$Secure&quot;);
  string android_id = clsSecure.CallStatic&lt;string&gt;(&quot;getString&quot;, objResolver, &quot;android_id&quot;);
  &gt;&gt; android_id = 98ff3a034b16****
  </code></pre>
  <p>You may notice that the IDs are different.
  Does anyone have a solution for this?
  How can I get that same identifier using ADB and in unity ?</p>