[Cyanogen] Open privacy guard permissions from app - Java for Android App Development

Hi,
i write an app and i need to open the privacy guard (from cyanogenmod) from a specific app-package. The user only musst press on a permission to activate/deactivate this.
Is there a way?
Thanks
Andy

Related

Superuser permission blank

I am new to this whole rooting business so please forgive me. So I just finished rooting my device by putting update.zip into the internal memory and help the power button with the volume button. I then turn the device back on and immediately hit superuser permission app and it is blank. Did I do something wrong? How do I get other root apps on to this device? Thanks
If you have the superuser permission app and your phone is not a brick, then it seems you did evrything correctly. The permissions app is just a list of apps that need superuser permissions to work correctly. So because you have no other root only apps that need super user permissions the list is empty. When you install an app that needs super user permissions it will popup in the middle of the action and ask if "you want to grant permissions to this app" if you trust the app then hit allow. You should get a small confirmation after hitting allow.
Root apps are all over, some are in the market other aren't.
Now go download some root only apps.
I have a few I would recommend in the sticky fyi. ^ is correct, all sounds normal/good to me from what you described.

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] PackageManager not granting permission to INTERACT_ACROSS_USERS_FULL

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

|HELP| IR REMOTE cyanogenmod 13 lg g2 d802

If i have cyanogenmod 13 rom, how can i install a apps that support ir ?
(quick remote , Peel Smart Remote , control-it!)
YuvalHas said:
If i have cyanogenmod 13 rom, how can i install a apps that support ir ?
(quick remote , Peel Smart Remote , control-it!)
Click to expand...
Click to collapse
tadaaaaaaaaa
http://forum.xda-developers.com/lg-g2/themes-apps/port-lg-quickremote-aosp-mm-g2-g3-t3302437
Controlling Cyanogenmod13 (aka LineageOS 13) via TeamViewer
Hi. I've been searching fro a way to control a Cyanogenmod13 device and I finally found it!
My device is SM-N900 Samsung Galaxy Note 3 (ha_3g international).
1. Go to Google play market and install application: QuickSupport (there are QS letters written in the top left corner of the icon).
2. Run the app. After TeamViewer downloads the QS Addon APK, retrieve it from Internal Storage/Android/data/com.teamviewer.host.market/files/Download/TeamViewerQSAddon.apk
Use a file explorer that has root permissions and the ability to change files and folders permissions (I use ES)
3. Create a folder in /system/app/ or /system/priv-app/ named TeamViewerQSAddon with rwx r-x r-x (I used /system/app/).
3.1 To change permissions in ES - long tap --> 3 dots in the lower right corner MORE --> and then Properties (or somth like that Idk 'cause I use russian version) then in the lower part of the Properties window there will be the line: Permissions. Tap Change and mark as follows: Owner: 1,2,3; Group: 1,3; Others: 1,3.
4. Put the APK in that folder and change its permissions to rw- r-- r--
4.1 To change Permission again: long tap, More, Permissions. Tap change permission and mark as follows: Owner: 1,2; Group: 1; Others: 1.
5. Reboot and it must work! Tested on my SM-N900 ha_3g running LineageOS 13.0-20170204-UNOFFICIAL-ha_3g. I guess that Official will do just the same. Good luck pals!

Categories

Resources