How do you know you can trust that the app you wish to install will not contain malicious code?
Consider where you are downloading the application from.
Take the Google Play Store for example: Considering that GPS has been plagued with malware, (
how do you know that an app installed from GPS is safe?
Here we can see the value is of using reputation as a metric:
Much like a lender uses an individual's credit score before assuming the risk of lending them money, end user reviews of an app too can help gauge many factors regarding an application, including assessing its inherent safety on your device (not to mention mited to if ads will be present snd if so, how many/frequent).
Google Play Store utilizes this by allowing end users to provide their feedback of facts and opinions of an application through a text based data entry which is then added to an archive ( or 'database' so to speak) of user reviews that is not only accessible to other end users but uses a 5 Star scoring system to display a mefian score, ultimately reflecting the average opinion of the end user in regards to an application (available on a 'per application' basis.)
While reputation is helpful it does not rule out the possibility of harboringbmalicious code or preventing its execution. This is exactly why applications hosting services such as F-Droid and professional developers as seen on XDA only trust applications that offer 100% transparency. How do they do this?
An application that offers its source code to be accessible publically, when found to be malicious, (whether to be built from and or for review etc,)isn't going to last very ling without being flagged by the FOSS community and thus shut down /stopped. ..which is one of many benefits to supporting open source projects, and one of the reasons I continue to trust application repositories like F-Droid, The Gaurdian Project and Arora Store, (so much so that I have installed and continue to use the F-Droid app and the Aurora Store app.)
In conclusion, you can trust the indtallation of an application whose source code is publically available to be reviewed and has a positive reputation from the community that installs and utilizes it.