Google 许可服务 - 了解概念

发布于 2024-12-02 13:42:43 字数 402 浏览 0 评论 0原文

我不明白Google的许可服务

场景的概念: 用户 A 在设备 X 上购买应用程序。 然后,用户 A 通过他的另一台设备 Y 访问 Android 市场来安装该应用程序,并且由于他在两台设备上使用相同的帐户,因此他不必第二次付费。

该应用程序发出许可证检查请求,其中包括设备特定数据或安装过程中生成并存储在设备上的随机数据。

据我了解,设备 X 和 Y 上的额外数据会有所不同,因此同一用户和应用程序的许可证检查请求有所不同,但仍被认为是有效的。

那么,在从 Android 市场下载期间,额外的请求数据也会存储在每个用户/应用程序/设备的许可服务器上吗?

用户 A 无法将应用程序从设备 X 复制到设备 Y,许可证检查会失败,因为从 Android 市场安装应用程序时,该设备或安装特定数据仅存储在服务器上?

I don't understand the concept of Google's Licensing Service

Scenario:
user A purchases an app on device X.
User A then accesses the Android market via his other device Y to install the app and he doesn't have to pay a second time since he uses the same account on both devices.

The app makes a license check request which includes either device specific data or random data generated during the installation and stored on the device.

As far as I understand that extra data would be different on device X and Y therefore the license check request is different for the same user and app but still recognized as valid.

So that extra request data is also stored on the licensing server per user/ app/ device during the download from the Android market?

User A cannot copy the app from device X to device Y, the license check would fail since that device or installation specific data is only stored on the server when installing the app from the Android market?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

莫言歌 2024-12-09 13:42:43

某些信息保存在本地。例如:ServerManagedPolicy 将上次响应、有效性时间戳、重试截止时间、最大重试次数和重试次数保存为本地设备数据。

特别是由于“最后响应”存储在本地,因此鼓励您混淆本地数据(否则恶意用户可能会输入自己的本地数据,表明许可证有效),并且 AESObfuscator 类提供为:

使用 AES 加密数据的混淆器。

当您构造 ASObfuscator 时,您需要提供 byte[] salt、String applicationId、String deviceIdPBEKeySpec 的密码基于 applicationIddeviceId(您可以在提供的源代码中看到)。

com.example.android.market.licensing.MainActivity 中的注释表明您可以提供的不仅仅是 Secure.ANDROID_ID 作为 deviceId。您需要确保其安全程度取决于您的判断 - 它可以像在应用程序中硬编码一个值一样简单 (new String(byte[]{(byte) 75, (byte) 12}) + Secure。 ANDROID_ID) 或其他一些加密方案(其讨论可能更适合加密论坛)。

Certain information is saved locally. For example: ServerManagedPolicy saves the last response, validity timestamp, retry until, max retries and retry count as local-device data.

Especially because of the Last Response being stored locally, you are encouraged to obfuscate the local data (otherwise a malaicious user could enter their own local data, indicating the license as valid) and the AESObfuscator class is provided as:

An Obfuscator that uses AES to encrypt data.

When you construct the AESObfuscator, you provide a byte[] salt, String applicationId, String deviceId. The PBEKeySpec's password is based upon the applicationId and deviceId (you can see in the source code provided).

The comment in com.example.android.market.licensing.MainActivity indicates you can provide more than just Secure.ANDROID_ID as the deviceId. How secure you need to make this is up to your discretion - it could be as simple as hardcoding a value in your application (new String(byte[]{(byte) 75, (byte) 12}) + Secure.ANDROID_ID) or some other cryptography scheme (whose discussion may be more appropriate for a cryptography forum).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文