目前分類:Android (2)
- Dec 13 Thu 2012 11:47
【Android】Shell Script-自動瀏覽並截圖
- Jun 29 Fri 2012 14:55
【Android】從GTalk取得Android ID
暫時記一下,有空再來整理
While googling around, I've stumbled upon an interesting project - Android Market API. This project is clearly a result of some Android reverse engineering work, still it's hosted on Google Code site. Funny, isn't it? Oh, by the way - the Android Market protocol uses Google's Protocol Buffers with HTTP as a transport layer.
Anyway, to play with the API you need a Google account (obviously), but also a sort of device identifier referred to as "Android ID". Funny enough, this is not the Android ID which can be obtained usingandroid.provider.Settings.Secure class etc., the right ID can be obtained by "dialing" *#*#8255#*#* - look forDevice ID, remove `android-` prefix.
But is there a way to retrieve this ID programmatically? It required a bit of hacking to reveal, but here's the recipe: