How to Broadcast SMS_RECEIVED? - Java for Android App Development

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

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] 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

How come I can't get AdBlock to work properly?

I am rooted and unlocked using the latest B29 update, US model. Most other root apps work fine, titanium, root explorer, etc. But when i try to add AdBlock it says failed to create host files, and something about creata sym link, but can't create it. Any ideas why this wont work? Thank you in advance
You need to disable Emmc write protection after root.. Search the forum they have given the commands to disable it thru terminal or adb
Sent from my ZTE A2017U using Tapatalk
adb shell reboot disemmcwp
Would write protection cause that error? I never had errors like that before disabling WP, just that the changes wouldn't stick.
Small Suggestion. Buy a Raspberry Pi 3 for $35. Install Pi-Hole as a DNS Server. . Configure the Raspberry Pi-Hole as the DNS on your router. Your entire Network devices are protected from Ads. Simple low cost solution to protect all devices in one shot.
Sent from my ZTE A2017U using Tapatalk
I am having the same problem, but I have tried reboot disemmcwp. SuperSu shows it has granted Adaway root, Adaway gives me the message "Either the su binary could not be found or you did not allow root permission for Adaway...."
I have reinstalled the app several times and deleted Adaway storage.
Is it possible I have BusyBox installed in the wrong location?
PS I am on Cyanogen
Kama45 said:
I am having the same problem, but I have tried reboot disemmcwp. SuperSu shows it has granted Adaway root, Adaway gives me the message "Either the su binary could not be found or you did not allow root permission for Adaway...."
I have reinstalled the app several times and deleted Adaway storage.
Is it possible I have BusyBox installed in the wrong location?
PS I am on Cyanogen
Click to expand...
Click to collapse
If you're on CM, you don't need to use SuperSU.
Settings > Developer Options > Root Access

How do I re-enable some of the debloated apks

Mainly the amazon prime video app and the music one since I bought a prime membership. I can't install from the play store (Error code 910). I can't enable from adb (c:\adb>adb shell pm enable com.amazon.avod
Error: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=7334, uid=2000, package uid=32052). I can't install from adb (c:\adb>adb shell pm install com.amazon.avod
pkg: com.amazon.avod
Failure [INSTALL_FAILED_INVALID_URI]). This is an unrooted hd 8 2016 6th generation and I believe I initially debloated it using one of the available automated tools. The app is listed as not installed for this user in the "Manage All Applications" screen. I feel like I'm missing something in regards to specific user information in my enable command as I don't think I could have unintentionally uninstalled it without root. Any help would be greatly appreciated.
Didn't mean to post this in general. My bad
Sent from my ONEPLUS A6013 using Tapatalk
Reset to factory.
You are uninstall the system package using 'pm uninstall -k --user 0 <package_name>'.
You can't re-install/re-enable it.
Recommend method:
pm hide/unhide <package_name>
https://forum.xda-developers.com/hd8-hd10/general/a-t3820744
bluesnaketree said:
Mainly the amazon prime video app and the music one since I bought a prime membership. I can't install from the play store (Error code 910). I can't enable from adb (c:\adb>adb shell pm enable com.amazon.avod
Error: java.lang.SecurityException: Permission Denial: attempt to change component state from pid=7334, uid=2000, package uid=32052). I can't install from adb (c:\adb>adb shell pm install com.amazon.avod
pkg: com.amazon.avod
Failure [INSTALL_FAILED_INVALID_URI]). This is an unrooted hd 8 2016 6th generation and I believe I initially debloated it using one of the available automated tools. The app is listed as not installed for this user in the "Manage All Applications" screen. I feel like I'm missing something in regards to specific user information in my enable command as I don't think I could have unintentionally uninstalled it without root. Any help would be greatly appreciated.
Click to expand...
Click to collapse
If your apps are hidden, by applying the method in the thread that erono gives you the link, you can unhid them. If the link to the Facebook app is not valid, tell me, I have a backup of it.
If your apps are disabled/uninstalled you have to reinstall them. Your command is not correct, you have omitted the apk extension at the end of the app name and this is better to copy the app to the device (eg, to /sdcard/) and then install it from the device via adb ( adb shell pm install /sdcard/com.amazon.avod.apk ) or via your file explorer app. Do you have a backup of the apks? If not I can pull them from my device (same as yours) and give you a link.
0mr1 said:
If your apps are hidden, by applying the method in the thread that erono gives you the link, you can unhid them. If the link to the Facebook app is not valid, tell me, I have a backup of it.
If your apps are disabled/uninstalled you have to reinstall them. Your command is not correct, you have omitted the apk extension at the end of the app name and this is better to copy the app to the device (eg, to /sdcard/) and then install it from the device via adb ( adb shell pm install /sdcard/com.amazon.avod.apk ) or via your file explorer app. Do you have a backup of the apks? If not I can pull them from my device (same as yours) and give you a link.
Click to expand...
Click to collapse
Sorry 0mr1, I know this thread has gone a bit stale... but I deleted and uninstalled my com.amazon.avod and need to reinstall it to get Prime Video working again. Can you extract that apk you were offering to bluesnaketree?
klister said:
Sorry 0mr1, I know this thread has gone a bit stale... but I deleted and uninstalled my com.amazon.avod and need to reinstall it to get Prime Video working again. Can you extract that apk you were offering to bluesnaketree?
Click to expand...
Click to collapse
No problem man, here it is.

how to isntall system app

Hello, I am developing an app and inside the app I need to access the voice call as one of the features. For that I need system privileges so my app is marked as system app in my manifest. I tried installing my app on emulator as system app and it worked there. the guide I used told me to sign the apk with platform key.
now I want to test the app on physical device but I am having trouble installing the app. i've spent last couple day to get my phone rooted and make adb work on redmi note 7. I am able to push the apk to sysytem/app but after reboot the app is not present on my phone. I figured maybe I need to use a different signing key in order to make It work with Xiaomi but I couldn't find any information on how to sign my apk. is the problem indeed because of the signing or do I need to do something else? if the problem is signing where can I find the keys? Can anyone help me out with this problem?
Mixplorer with root?
joke19 said:
Mixplorer with root?
Click to expand...
Click to collapse
I am using rooted adb and shell. the app is already pushed in system/app folder but it is not getting installed. tried priv-app folder as well same thing.

Categories

Resources