title: how to get the advertising id on the China market (e.g. on MIUI and AliOS)
body: <p>I currently have code that gets the device identifier (advertising ID) on Google Play enabled and Kindle devices. Now I'm looking for documentation targeting developers that would explain how to get it on other Android forks (similar to <a href="https://developer.amazon.com/docs/fire-tablets/ft-advertising-id.html" rel="nofollow noreferrer">Amazon's instructions</a>), esp. on Xiaomi and Alibaba phones made for the local Chinese market.</p>
  
  <p>One resource I could find is by <a href="https://support.appsflyer.com/hc/en-us/articles/115004639203-Android-App-Promotion-in-China" rel="nofollow noreferrer">AppsFlyer</a> which is obviously bogus since it states "IMEI and Android ID - Both are necessary for accurate attribution" while the former is disabled since Android 6 (unless you want to prompt the user for a runtime permission) <a href="https://android-developers.googleblog.com/2011/03/identifying-app-installations.html" rel="nofollow noreferrer">besides other problems with it</a> and the latter is <a href="https://android-developers.googleblog.com/2017/04/changes-to-device-identifiers-in.html" rel="nofollow noreferrer">not device unique since Oreo</a>. </p>