getsentry / getsentry/sentry-java

isSideLoaded issue tag on Android not working as expected

Đang mở
#1,906 17 bình luận 1 reaction 0 người được giao Xem trên GitHub
Android Errors Improvement
Ngôn ngữ chính
Kotlin
Star
1.4k
Fork
478
Merge trung bình
2 ngày 23 giờ
Pull request đã merge (30 ngày)
67

Mô tả

The `isSideLoaded` tag for Android displays `false` even for sideloaded apps (apps installed directly from the APK):

![image](https://user-images.githubusercontent.com/11064768/153629916-df6aa7ae-9e6d-4461-af43-6819246a1871.png)

Here the `installerStore` tag shows the app was installed by `com.android.packageinstaller`, which is the system app used when installing an APK manually, and yet `isSideLoaded` shows `false`.

@marandaneto identified the Android documentation is misleading here: https://developer.android.com/reference/android/content/pm/PackageManager#getInstallerPackageName(java.lang.String)
It says "Retrieve the package name of the application that installed a package. This identifies which market the package came from."
The first sentence is true, the second is not, since not all installer apps are "markets".

Ultimately I don't think the `isSideLoaded` tag is useful even with this fixed, since it's not really defined what "sideloaded" means. Even when the app is actually installed from a market, there are shady market apps that rehost apps copied from Google Play. And apps installed from them are definitely "installed from a store/market", but the information useful for the app developer is that it was installed from an unofficial source, even though it was not technically "sideloaded" (or was it? where is the line?).

What I would propose as the actual fix:
- Remove the `isSideLoaded` tag: it doesn't provide any information not already visible in the `installerStore` tag
- Rename `installerStore` to `installer`: it's not always a store
- Use the red highlight (as visible in `isSideLoaded: false` on the screenshot) on the `installer` tag, when it doesn't contain one of the reputable stores (Google Play, Samsung Galaxy Store, Amazon Appstore)
- Show the `installer` as `none` when none

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.