I make application that hide other apps. I succeed to hide and unhide other apps with rooted device. But when i was trying on unrooted device, not succeeded. I also tried with nfs, Device owner but not getting success. Followed these links. tried with manage permission also but not working. Please help me if anyone getting success without rooted device.
Error: root require:
E/hide: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=23999, uid=10263, package uid=10264
followed these links below:
http://www.eoeandroid.com/thread-288229-1-1.html Install / Unistall from shell command in Android
You have to take device owner in order to use the hide/unhide api. You can use this guide to understand about the device owner
Once you have achieved device owner, you can use the following apis: setApplicationHidden.
Related
I'm trying to hide/disable an app using pm hide com.myapp but I'm getting an error Error: java.lang.SecurityException: Neither user 10225 nor current process has android.permission.MANAGE_USERS.
I'm using an unrooted phone could anyone tell me why I can't use pm hide or if there's another command I can use
In case anyone is still looking for an answer to this, disabling OEM bloatware through adb is still possible on Android M+ using pm uninstall. While its true that uninstalling a system app requires root access, you can however uninstall the app for a particular user (yourself or user 0) without any root like this:
pm uninstall --user 0 com.micromax.trendingapps
But be careful and make absolutely sure that its a bloatware you are uninstalling because the above changes are permanent! You may not undo the damage done to a system app without factory resetting your device again.
Android disabled this feature in some security update in android 6
I'm trying to read the MSR information from an android device with userDebug build , and it requires root permission. I have tried adding :process = Runtime.getRuntime().exec("su"); and when i debugged the program ,the variable process is getting initialized with NULL. And I have made some function call to read the MSR value by specifying its path /dev/msr*,and when i run the program the log window shows Permission denied. So is there any way to get into root permission via an app without having a rooted android device?
So is there any way to get into root permission via an app without having a rooted android device?
By definition, no.
process = Runtime.getRuntime().exec("su");
su command is to run the shell commands in Super user mode.
If the device is rooted, this command causes SuperUser to show a dialog, which lets you either Allow or Block it from root access.
So is there any way to get into root permission via an app without
having a rooted android device?
There is no official way to do this. If your app needs SuperUser access, then you can build one click root method like rooting apps and can ask the user to root first.
I want to create an app to turn on/turn off Android developer mode. This will be on a rooted device. What api's do need to call?
I know i am answering it very late but i will surely help other who are searching on this.
To enable developer options programatically :
Settings.Global.putString(this.getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, "1");
To disable :
Settings.Global.putString(this.getContentResolver(), Settings.Global.DEVELOPMENT_SETTINGS_ENABLED, "0");
But to access this Settings.Global... , it requires a permission
android.permission.WRITE_SECURE_SETTINGS
But normally , This permission is only granted to system app
You can also grant this permission to user app using ADB
Since you said your app would be running on a rooted deice , so have access to the shell , so you can grant this permission to your app by running the below shell command
pm grant <your.package.name> android.permission.WRITE_SECURE_SETTINGS
I don't think it is possible. Since it is part of the Settings.Secure.
Secure system settings, containing system preferences that applications can read but are not allowed to write. These are for preferences that the user must explicitly modify through the system UI or specialized APIs for those values, not modified directly by applications.
I am now trying to run the Android CTS 7.0 on Google Nexus 6 (AOS:7).
There is an fail in the item "CtsCarrierApiTestCases"
The error message is:
android.carrierapi.cts.CarrierApiTest#testHasCarrierPrivileges
fail
junit.framework.AssertionFailedError: This test requires a SIM card with carrier privilege rule on it.
We had checked the following Android web page:
https://source.android.com/devices/tech/config/uicc.html#prepare_uicc
According to the above link, we need to add the CarrierPrivileges to the UICC card and this has to be done through the Telephone System provider.
Unfortunately, till now we do not have the contact to our system provider here in Taiwan.
Any chance that we can do this by our won in the lab?
We are thinking to buy a card reader and a blank SIM card, could this be a direction?
Any advice is welcome and thanks in advance.
I had encountered same issue. Some cts tests are only allowed for system priviledged apps or if app has UICC carrier privileges.
In both options are not availabe, as a workaround, /AOSP/platform/packages/services/Telephony/src/com/android/phone/PhoneInterfaceManager.java can be tweaked as shown below to disable permission checking in source code.
After aplying patch, run "mmm platform/packages/services/Telephony/" followed by "adb remount && adb sync" to update system priviledged app /system/priv-app/TeleService/TeleService.apk.
One time device reboot is required afterwards.
private void enforceModifyPermissionOrCarrierPrivilege(int subId) {
+ log("CTS CarrierPrivilege Allowed Patch");
+ return;
int permission = mApp.checkCallingOrSelfPermission(
This question already has answers here:
Disable DeviceAdmin from shell?
(3 answers)
Closed 4 years ago.
I have installed quick heal mobile security on my android device(Micromax Canvas A110) android version 4.1.4. I am trying to uninstall it, but not able to do so. After further googling, I found out that we would have to deactivate it from device administrator menu in settings.
I tried doing it, only to find that the window with options "cancel" and "deactivate" does not go away on clicking the "deactivate" button.
I tried to uninstall the app using the adb uninstall command after finding out the installed packages using: adb shell pm list packages which gave quick heal's package name as com.quickheal.platform.
But adb uninstall com.quickheal.platform command gives Failure
So how do I do it using adb?
I'm afraid there is no way to deactivate the device admin via adb. There has been made a proposal to open the device admin settings for quicker access in this post:
adb shell am start -S "com.android.settings/.Settings\$DeviceAdminSettingsActivity"
... however there is still some interaction needed.
On some devices the device administrator activity is not properly updated after confirmation in the dialog. So try to exit the settings menu completely and check whether it was just an UI issue.
Addition: according to comments below, it is possible to remove the device admin, if android:testOnly="true" or is missing from the AndroidManifest.xml file. Thx for the note!
just execute this code in your app!
DevicePolicyManager mDPM = (DevicePolicyManager) this.getSystemService(Context.DEVICE_POLICY_SERVICE);
mDPM.clearDeviceOwnerApp(getPackage());
This is possible, although it requires a rooted device (su access), and is a little messy. It involves doing a search for the app via its fully qualified name, and manually removing (rm -f) each found entry.
See articulated answer here: https://stackoverflow.com/a/29093349/3063884