问题
I am noticing the effects of a caching mechanism between my device & the DAL hosted at https://example.com/.well-known/assetlinks.json and I'm looking to understand how it works, and if it can be bypassed.
The issue is that I'm prototyping changes to the DAL (specifically adding another app, but the change should be irrelevant here for the purpose of the question), and changes aren't visible from the app's perspective. Example:
- I start with this DAL:
[
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"sha256_cert_fingerprints": [
"<redacted>"
],
"namespace": "android_app",
"package_name": "com.my_app"
}
}
]
I install
com.my_app
, verification succeeds.I edit the DAL to be the following (notice the addition of a second app entry):
[
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"sha256_cert_fingerprints": [
"<redacted>"
],
"namespace": "android_app",
"package_name": "com.my_app"
}
},
{
"relation": [
"delegate_permission/common.handle_all_urls"
],
"target": {
"sha256_cert_fingerprints": [
"<redacted>"
],
"namespace": "android_app",
"package_name": "com.my_other_app"
}
}
]
- I install
com.my_other_app
, verification fails. - Wait 24 hours, re-install
com.my_other_app
, verification succeeds.
The same can be observed using the Statement List Tester by Google; it will continue to reflect the specifications of an earlier DAL, for up to 24 hours (and so the issue isn't confined to a particular device/it's not an on-device caching layer that can be cleared).
This leads me to believe Google has a DAL cache that both the Statement List Tester & Android devices use. As I'm prototyping changes to understand undocumented behavior of DALs, having to wait an arbitrary and long amount of time is counter productive.
My question is: is the caching duration known, and can it be bypassed, reset?
来源:https://stackoverflow.com/questions/64915391/can-googles-digital-asset-links-file-caching-mechanism-be-manipulated