SimonMarquis / Android-SecretCodes

Secret Codes is an Open Source application that allows you to browse through hidden codes of your Android phone.
http://simonmarquis.github.io/Android-SecretCodes/
Apache License 2.0
302 stars 101 forks source link

Problem with Android Oreo version #20

Open Kush19 opened 6 years ago

Kush19 commented 6 years ago

I'm running the app on Pixel which is running on Android Oreo, App doesn't list any secret codes but some codes like ##225## is run on dialer app the codes run fine. Is there an issue with the app which runs on Oreo devices??

SimonMarquis commented 6 years ago

Please add a logcat trace of the app running on your device.

Kush19 commented 6 years ago

Here is the logcat trace pixel.txt

SimonMarquis commented 6 years ago

I don't see the application starting from this logcat. Maybe try to add a log to this line to see if the Crawler is detecting the apps correctly: https://github.com/SimonMarquis/Android-SecretCodes/blob/f8b7211025e08754608bb80612e4fc9f1f4da0f1/app/src/main/java/fr/simon/marquis/secretcodes/Crawler.java#L47

SimonMarquis commented 6 years ago

It seems that the XML file parsed by the crawler ins't complete (missing the intent-filters).

SimonMarquis commented 6 years ago

I might want to use a third party library to crawl AndroidManifest files such as APKParser.

Kush19 commented 6 years ago

But the problem is with only Pixel devices running on Oreo, other devices which are running on Oreo display the list of codes available but on clicking them throws an error as Permission Denial: not allowed to send broadcast android.provider.Telephony.SECRET_CODE from pid=7666, uid=10097

SimonMarquis commented 6 years ago

Yeah, but I don't know why the parsing is no longer working.

The issue with secret codes that are not working from the app (what you describe on your last coment) is already known but can't be fixed. Some OS are blocking such broadcasts to be sent:

Permission Denial: not allowed to send broadcast android.provider.Telephony.SECRET_CODE from pid=17950, uid=10256
java.lang.SecurityException: Permission Denial: not allowed to send broadcast android.provider.Telephony.SECRET_CODE from pid=17950, uid=10256
   at android.os.Parcel.readException(Parcel.java:2004)
   at android.os.Parcel.readException(Parcel.java:1950)
   at android.app.IActivityManager$Stub$Proxy.broadcastIntent(IActivityManager.java:4491)
   at android.app.ContextImpl.sendBroadcast(ContextImpl.java:970)
   at android.content.ContextWrapper.sendBroadcast(ContextWrapper.java:437)
   at fr.simon.marquis.secretcodes.MainActivity.itemClicked(MainActivity.java:109)
   at fr.simon.marquis.secretcodes.SecretCodeAdapter$1.onClick(SecretCodeAdapter.java:67)
   at android.view.View.performClick(View.java:6294)
   at android.view.View$PerformClick.run(View.java:24770)
   at android.os.Handler.handleCallback(Handler.java:790)
   at android.os.Handler.dispatchMessage(Handler.java:99)
   at android.os.Looper.loop(Looper.java:164)
   at android.app.ActivityThread.main(ActivityThread.java:6494)
   at java.lang.reflect.Method.invoke(Native Method)
   at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
jacobabrahamb4 commented 6 years ago

((TelephonyManager)context.getSystemService(Context.TELEPHONY_SERVICE)) .sendDialerSpecialCode(code);

SimonMarquis commented 6 years ago

I don't think this will work since this API call requires to have carrier privileges or to be the default dialer app.

https://android.googlesource.com/platform/cts/+/master/tests/tests/telephony/src/android/telephony/cts/TelephonyManagerTest.java#554

net91 commented 5 years ago

Dear SimonMarquis, I had same issue with Oreo device, is there any fix for this? BRs


2019-03-15 18:17:24.415 1702-1797/system_process W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.provider.Telephony.SECRET_CODE dat=android_secret_code://4636 flg=0x10 } to com.android.settings/.TestingSettingsBroadcastReceiver 2019-03-15 18:17:24.415 1702-1797/system_process W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.provider.Telephony.SECRET_CODE dat=android_secret_code://4636 flg=0x10 } to com.google.android.dialer/com.android.voicemail.VoicemailSecretCodeReceiver 2019-03-15 18:17:24.416 1702-1797/system_process W/BroadcastQueue: Background execution not allowed: receiving Intent { act=android.provider.Telephony.SECRET_CODE dat=android_secret_code://4636 flg=0x10 } to com.google.android.dialer/com.android.incallui.answer.impl.hint.PawSecretCodeListener