admin管理员组文章数量:1287153
I want to determine whether my Android application is being opened directly by the user on the device or through remote access tools such as PhoneLink, AnyDesk, or TeamViewer. However, the solution must not require root access.
Detecting PhoneLink in particular is crucial, as it allows seamless remote control of the device without explicitly notifying the user, unlike traditional screen-sharing apps. Identifying such remote access scenarios is essential for applying security measures and preventing potential misuse.
Is there a reliable way to detect these conditions using Android’s native APIs without root privileges? Has anyone worked on a similar implementation or has suggestions on how to approach this?
I want to determine whether my Android application is being opened directly by the user on the device or through remote access tools such as PhoneLink, AnyDesk, or TeamViewer. However, the solution must not require root access.
Detecting PhoneLink in particular is crucial, as it allows seamless remote control of the device without explicitly notifying the user, unlike traditional screen-sharing apps. Identifying such remote access scenarios is essential for applying security measures and preventing potential misuse.
Is there a reliable way to detect these conditions using Android’s native APIs without root privileges? Has anyone worked on a similar implementation or has suggestions on how to approach this?
Share Improve this question asked Feb 23 at 18:49 juhbertjuhbert 451 silver badge4 bronze badges 1- Use Firebase analytics – Dhruv Sakariya Commented Feb 24 at 6:10
1 Answer
Reset to default 1You could check the packagename of the calling activity, but a full solution exists only with a cooperating calling activity, using one of the following alternatives:
- methods getCallingActivity()/getCallingPackage() work only if calling activity uses startActivityForResult() and not startActivity()
- method getInitialCaller() works from API Level 35, but only if the calling app has called ActivityOptions.setShareIdentityEnabled(true) or the launched activity has the same uid as the calling app or the launched activity is running in a package that is signed with the same key used to sign the platform.
- methods getLaunchedFromPackage()/getLaunchedFromUid() work from API Level 34, but only if the calling app has called ActivityOptions.setShareIdentityEnabled(true) or the launched activity has the same uid as the calling app or the launched activity is running in a package that is signed with the same key used to sign the platform.
本文标签:
版权声明:本文标题:security - How to detect if an Android app is opened by the user or via remote access (PhoneLink, AnyDesk, TeamViewer, etc.) wit 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741306548a2371401.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论