Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Capturing/Intercepting Android Intents during runtime

Is there any way to capture/intercept Intents of application during runtime without modifying Android framework? Modifying Android framework might require too much work. Please help me.

like image 494
user3491319 Avatar asked Oct 14 '14 23:10

user3491319


People also ask

How do intents get intercepted?

Intercept Implicit Intents: Once the malicious app is downloaded, the android device will forward any implicit intents from the target application to the malicious application, allowing the adversary to gaina access to the contents of the intent.

What triggers an intent in android?

Android Intent is the message that is passed between components such as activities, content providers, broadcast receivers, services etc. It is generally used with startActivity() method to invoke activity, broadcast receivers etc.

What is intent setType in android?

setType(String mimeType) input param is represent the MIME type data that u want to get in return from firing intent(here myIntent instance). by using one of following MIME type you can force user to pick option which you desire. Please take a Note here, All MIME types in android are in lowercase.

Is intent deprecated?

The Intent is not deprecated the problem is with your itemClickable. class because it is not recognized. Either you have somehow enabled extra warnings that identify Intent as deprecated or something is really stack at your machine.


1 Answers

To view Intents as they happen, run logcat in a shell and filter it down to just the Intents like this:

adb logcat | fgrep -i intent

(You can also add a filter for just your app's Intents, but that would exclude Intents sent to your app by the system and by other apps.)

This should show Intents such as

I/ActivityManager( 585): Starting activity: Intent { action=android.intent.action...}

To see system-wide Intents, try the Intent Intercept app.

To see all Intents sent to your own classes, then

  • In each BroadcastReceiver, override onReceive(Context context, Intent intent).
  • In each Activity, call getIntent() to get the Intent that started the activity.
  • In each Service, override onStartCommand(Intent intent, int flags, int startId) to get the Intent that started the Service.

For info on all the standard Intent actions, see Intent.

like image 97
Jerry101 Avatar answered Oct 22 '22 05:10

Jerry101