I have written code to download and open the installation screen where if user can allow to install it will get installed, but I required auto installation of app. So if someone have any trick to implement auto installation of local APK file using Android Studio. Please share.
What you are asking is a security risk and wont be allowed by the operating system.
I'm sure there's malware out there that can do it, but those often use exploits that are 'quickly'/eventually patched.
After 3 days of googling I am at my wits end witho no solution to this.
I have written a System app with System privileges (INSTALL_PACKAGE permission) on android. It is a part of a firmware being developed.
Now I want to test it on my device. I am just not able to do it. I have a rooted device with android 4.2.2.
I tried installing an it by copying it on /system/app But its not showing as installed. I am using eclipse debug keys currently. Do i need to sign it with android signature keys?
I tried doing the same with other market apps and was able to install them as System app this way but not my own app.
Pls suggest.
Thanks
I want to add this permission to my Android manifest:
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
But after I paste this permission in my manifest, it tests red underline and says:
permission is only granted to system apps
What can I do?
MODIFY_PHONE_STATE permission is granted to system apps only.
For your information, there are 2 types of Android apps: system & user
User apps are just all your normal app installations through the Google Play Store, Amazon Appstore or sideloading. These go into the /data partition of your Android phone, which is the part of the internal memory made available for user data and apps.
System apps are basically the apps that come pre-installed with your ROM. In a standard Android user environment, the user doesn’t have write access to the /system partition and thus, installing or uninstalling system apps directly isn’t possible.
In order to install an app as a system app on your Android device,
your device must either be rooted or have a custom recovery installed (or both).
That being said, that error is actually wrong because you have a valid code and compilation should work. It would be better if it gave a warning instead. In Eclipse you can easily fix it. Just go to:
Window -> Preferences -> Android -> Lint Error Checking.
Find ProtectedPermission from the list and set the severity to something other than error(info for example). This way your project will still compile.
MODIFY_PHONE_STATE is a system-only permission. System Apps are either pre-installed into a system folder or compiled by a manufacturer using their security certificate.
Hence, if you are trying to do this you are trying to use API which are no longer supported. With Android versions 2.3+ you can monitor incoming calls, but blocking is not allowed (i think from the link you posted thats what you're trying to do).
Android issues if you need to follow: Issue 15022 and Issue 14789
This error appears in SDK 19 onwards, when you change the manifest.
Do Project Clean and Build.
It should clear this error.
just clean your project it will be fine like this :
project > Clean...
There are four types of Permission
Regular
Dangerous
Signed
Signed or System
The first two can be used by Simple Apps Other two can only be used by the app which is build in framework
Because this is the system level permission device developer not grant this so application development tools also warn against this so you have to
Simply Clean project & Rebuild this is it
Find ProtectedPermission from the list in
Window -> Preferences -> Android -> Lint Error Checking.
and set the severity to something other than error(info for example). This way your project will still compile.
I'm creating an appstore for android applications. Whenever an app is installed from my appstore, it should be installed in /data/app/mycompanyname folder and not in any other installation location. I'm doing this for the purpose of administration and control.
So far browsing through web, I came to know that we can change it by specifying in manifest file.
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
android:installLocation="preferExternal"
...>
But using that, we can specify whether we should install in internal storage or external storage. we cannot give exact path for installation using this manifest.
Can anyone help me figure out this..??
Thanks in advance...
Whenever an app is installed from my appstore, it should be installed in /data/app/mycompanyname folder and not in any other installation location.
You do not have that degree of control. Your app will be installed at a path determined by the device manufacturer.
But using that, we can specify whether we should install in internal storage or external storage. we cannot give exact path for installation using this manifest.
Correct.
I have an android app whose manifest file includes android:installLocation="preferExternal" under manifest tag and . Now when I install the app on emulator or phone by transferring through bluetooth or adb the app is getting installed by default on SD card. I am using android 2.2 on phone.
But when I download the same app from android market the app is installing on phone memory and there is no option to move it to SD card!!!
I am wondering whats wrong with the one downloaded from android market!!! Can somebody help me to solve this issue??? I am not able to figure out the reason!!
Have you tried rebuilding your app and re-uploading to the market?