Google Play Service如何在沒有用戶互動的情況下在后台安裝應用程序

[英]How does Google Play Service install applications on the background without user interaction


When we use the Google Play Store to install applications, the application will be installed automatically without any Package Installer notification. It does not even require any user interaction when updating applications. It won't do so when we use the F-Droid or others.

當我們使用Google Play商店安裝應用程序時,將自動安裝該應用程序,而不會發送任何軟件包安裝程序通知。更新應用程序時甚至不需要任何用戶交互。當我們使用F-Droid或其他人時,它不會這樣做。

We developers can bypass the Package Installer via running pm install some.apk as shell or root, but personally it seems to be more elegant to achieve this task by calling some Java methods, and Play Store itself may just be running as a normal app or at most system.

我們開發人員可以通過運行pm install some.apk作為shell或root來繞過Package Installer,但是通過調用一些Java方法來實現這個任務似乎更優雅,Play Store本身可能只是作為普通應用程序運行或者在大多數系統。

Therefore I would like to know how this is done. It would be much more better if codes from https://android.googlesource.com/ can be provided as evidences. Thank you.

因此,我想知道這是如何完成的。如果可以提供來自https://android.googlesource.com/的代碼作為證據,那就更好了。謝謝。

1 个解决方案

#1


0  

Only system apps can install packages without interaction. System apps have root-like access rights. Google play is the system application, and is able to install packages in background without confirmation. that's the only reason.

只有系統應用才能安裝包而無需交互。系統應用程序具有類似root的訪問權限。 Google Play是系統應用程序,可以在后台安裝軟件包而無需確認。這是唯一的原因。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2015/05/29/720cb0ce6b0a8f9223e8608ef0ff097a.html



 
粤ICP备14056181号  © 2014-2021 ITdaan.com