java - 如何从 adb 获取 GSF(谷歌服务框架)ID?

标签 java android adb

我发现它可以通过 java 完成

Uri URI = Uri.parse("content://com.google.android.gsf.gservices"); 

Play 商店中的许多应用程序都可以做到这一点。但是,有没有办法通过adb获取到gsf id?

我试过:

content query --uri content://settings/secure/android_id #to get the android id
content query --uri content://settings/secure/ #to see the list of dictionaries but gsf id not in there
content query --uri content://com.google.android.gsf.gservice #doesn't return a value, and this should be where the java code in the app get the value from, already granted superuser for the shell.

最佳答案

$ adb root


$ adb shell 'sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";"'

这可能有帮助, 将手机连接到您的 PC,并启用 USB 调试器。然后在PC的adb文件夹下打开powershell或者cmd,输入提供的命令..

关于java - 如何从 adb 获取 GSF(谷歌服务框架)ID?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48830406/

相关文章:

java - 从java中的列表创建列表

android - 在 AsyncTask 中获取 IndexOutOfBoundException

java - 是否可以在两个 Android 设备之间直接将数据传输给同一网络中的其他用户?

java - HttpRequestHandlerServlet 中的 Spring 请求范围不起作用

java - 如何使用MyBatis调用Oracle数据库序列号?

java - Spring Data Repository 保存未返回具有更新审核字段的实例

安卓 : Align image on top right hand corner of button

android - 无法使用 “adb reverse”连接到开发服务器:spawnSync adb ENOENT

ubuntu - 构建时运行 android react native maps 失败

android - ADB 在 Mac OS X Mavericks 上找不到 Nexus 7