[Q] PackageManager not granting permission to INTERACT_ACROSS_USERS_FULL - Galaxy Note 3 Q&A, Help & Troubleshooting

I am modifying a app in smali. Using the second code snippet I am trying to add data to logcat. When I first tried the app forced closed. I looked at logcat and I got a SecurityException to add the permission "INTERACT_ACROSS_USERS_FULL" I added that permission to the manifest. I tried again and still got FC'd. This time however I noticed that PackageManager was not granting permission to these permissions. Something to do about not being signed with special platform keys? My device is rooted. That's not a problem because when I am done I will remove this code from my app thus making it a non-root app again.
Any help?

Looks like I fixed it on my own. Had to add permissions and move the app to /system/app and run it with uid -2

Related

How to sign system apps

Does anyone have a working example of signing a system app like Phone.apk? I've found 2 certificates on my GT, one from Samsung and one from VZW, but neither seem to work. When I try to install the app, I receive a certificate invalid error -- invalid CERT.SF. Does anyone know exactly which certificate to use to sign system apps?
Thanks
Sent from my SCH-I800 using XDA App
You will need private key to sign, not certificate.
Sent from my GT-P1000 using XDA App
I did sign it with my private key and it didn't work. Hence the question about system apps and how to sign them so that they are usuable on a device. Isn't it possible to make changes to a system app, install it on a device to test it, and not need the private key used by Google or, in this case, Verizon Wireless (because they are using a modified Phone.apk along with 2 other non-Google apk's to control dialing)? Or, does every system app have to be reinstalled if one changes, because of the data sharing flag set in AndroidManifest.xml?
Sent from my SCH-I800 using XDA App
What did you try signing it with?
have you tried One Click APK Signer or APK Manager?
I've never heard of those apps. I'll definitely be checking them out. Thanks for heads up. But, will this allow me to change out a system app that shares data with other apps without an issue with the manifest signing problem?
Sent from my SCH-I800 using XDA App
You will need to sign the whole /system folder as well as the whole /framework folder
This will resign all files in order for it to work correctly.
This basically changes the private key to you.
How do you sign the entire folder?
Sent from my SCH-I800 using XDA App
How to sign Android app with system signature?
Hi !
I’m writing an user app, it should be possible to set some system settings (device without root), e.g. SystemTime/SystemDate. I've added some necessary permissions in my manifest, like:
Code:
...
android:sharedUserId="android.uid.system"
...
<uses-permission android:name="android.permission.SET_TIME" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
if i try:
Code:
setCurrentTimeMillis (long millis)
i get from logcat:
Code:
Not granting permission android.permission.SET_TIME to package com.example.hellodatepicker (protectionLevel=3 flags=0x8446)
Unable to open alarm driver: Permission denied.
it seems that my app has to be signed with sys/platform key. but how to do that? did anyone already do this? I'm glad to see/hear some info about your experience getting this issue fixed.
Thank you in advance.

[Q] Run app as system app

Hi all -
Apologies if this is a stupid question. I'm trying to create an app that has the protected 2 level DEVICE_POWER permission. Is this possible without having a full-blown Custom ROM?
Things that I have tried:
1) Move apk from data/app to system/app [in packages.xml the app is then classified as system="true" but isn't allowed to get the permission]
2) In packages.xml, manually hack the certs line to be the same as a system app that does have the DEVICE_POWER permission
3) try to hack the file in /system/etc/permissions to add another gid to DEVICE_POWER or the uid of the app that I'm running
4) tried to re-sign the framework-res.apk and the other other system apk's with the same cert with the AOSP platform key [although google does seem to sign some apps with that key, B&N seems to have done the "right" thing and not signed everything with the platform key]. Just gets caught in a bootloop
In the devicemanager.db under /data/data/com.android.providers.settings/databases, in the registry table, it does show the hash of the system's private key ... wasn't sure if I could do anything with that though.
Someone created a custom screensaver that puts the cover of the book you're reading as screensaver and modified the Settings.apk to do so. I don't quite get how he was able to do that and still have the signature remain intact?
Thanks for the help!
AFAIK you have to build a custom ROM to do this.
Yeah I think so too, apps wanting that permission need to be signed with the platform key afaik.

[Q] "Runtime" Object Permissions

I've been toying around with the "Runtime" object in java for an app I'm building.
With this object, you can execute various commands on the phone's shell. My question is, is there any way to modify the permissions of the Runtime object? So, does adding additional permissions to the manifest modify what Runtime can do? Does anything else modify what it can do?
Highbrow said:
I've been toying around with the "Runtime" object in java for an app I'm building.
With this object, you can execute various commands on the phone's shell. My question is, is there any way to modify the permissions of the Runtime object? So, does adding additional permissions to the manifest modify what Runtime can do? Does anything else modify what it can do?
Click to expand...
Click to collapse
It runs in the process of your app. So it should have the same permissions which your app has.

How to Broadcast SMS_RECEIVED?

Hello,
I am working on an app that mimics Voice+ but uses Xposed instead of having to run CyanogenMod.
I am stuck at the point where I need to broadcast a android.provider.Telephony.SMS_RECEIVED intent to spoof an incoming SMS when a Google Voice message comes in. The BROADCAST_SMS permission is not being given to my app, even when it is put in /system/app.
Code:
Not granting permission android.permission.BROADCAST_SMS to package com.runnirr.xvoiceplus (protectionLevel=2 flags=0x88be47)
My understanding is that since I am using an official stock, I cannot get that permission since the app is signed with a different key. I am hoping there is some way around this using root or Xposed.
I am open to suggestions. I
EDIT:
I found the solution to my problem by using Xposed to grant my app permission at start up. I copied how GracityBox does it.
https://github.com/GravityBox/Gravi...ceco/kitkat/gravitybox/PermissionGranter.java

Overlay permission

I wanted to install an FPS counter on my shield TV but it doesn't have overlay permission. Anyone know of a way to bypass it somehow?
Edit the apks manifest XML ( various apk editors can do this ) to lower the required Android SDK version. And the permission is imposed upon install, instead of upon running.
That's how i do it anyways.

Categories

Resources