[Q] hacking my way into sniffing intents between apps

Search This thread

ztrange

Member
Jan 15, 2011
17
2
Hi.

I'm experimenting to write a personal app to help me get to know more songs. I want to catch the spotify intent that indicates when the track changes and use the data on my app.

I have been investigating how to do it and tried multiple lines of code like this (iF.addAction("com.android.music.metachanged"); ), but no luck yet. Everybody (stackoverflow) says there is no way to get that info. But the fact is that there is one app that is able to catch that info: musiXmatch. It is able to detect when the track on the spotify free radio changes and deliver the corresponding lyric.

So, I tried decompiling both the musicXmatch and spotify apks using apktool but wasn't able to find the way the apps comunicate with one another. I have yet to get deeper on smali but by what I see this far, the answer isn't there.

So, the next thing I was thinking I'd try was to make an AOSP rom with some extra logging habilities so that i can listen to the communication between the apps (namely, the broadcastreceiver).

My question: ¿Is there such an aosp distro? One that has extra sniffing/logging capabilities. Also, Anyone has an extra idea on how to accomplish my goal, or maybe some reason for which it will be impossible for me to do it (like for example the intent from spotify being explicit).

Thank you very much in advance for your time.
 
Last edited:

ztrange

Member
Jan 15, 2011
17
2
I solved it. I got the intent.

In case anyone wonders how I did it, here it is:

  • Rooted my phone (I have a Nexus 4 which lost root with one OTA update and never bothered to recover it)
  • Installed CydiaSubstrate. A wonderful piece of software by @saurik that allows you to literally modify any java or native C/C++ class during runtime seamlessly. It also does lots of other stuff I don't really understand.
  • Had to put SELinux to permissive on KitKat because it is on enforced by default since 4.3, in order for the Substrate to work
  • Got IntroSpy from git and wrote a Custom Hook for IntentReceiver startActivity() method
  • Enabled IntroSpy for musicXmatch app and it dumped all the app's intents to logcat
 

gloscherrybomb

Senior Member
Nov 8, 2010
265
159
I solved it. I got the intent.

In case anyone wonders how I did it, here it is:

  • Rooted my phone (I have a Nexus 4 which lost root with one OTA update and never bothered to recover it)
  • Installed CydiaSubstrate. A wonderful piece of software by @saurik that allows you to literally modify any java or native C/C++ class during runtime seamlessly. It also does lots of other stuff I don't really understand.
  • Had to put SELinux to permissive on KitKat because it is on enforced by default since 4.3, in order for the Substrate to work
  • Got IntroSpy from git and wrote a Custom Hook for IntentReceiver startActivity() method
  • Enabled IntroSpy for musicXmatch app and it dumped all the app's intents to logcat

Thanks, are you going to share said intents? ;)
 

Top Liked Posts

  • There are no posts matching your filters.
  • 2
    I solved it. I got the intent.

    In case anyone wonders how I did it, here it is:

    • Rooted my phone (I have a Nexus 4 which lost root with one OTA update and never bothered to recover it)
    • Installed CydiaSubstrate. A wonderful piece of software by @saurik that allows you to literally modify any java or native C/C++ class during runtime seamlessly. It also does lots of other stuff I don't really understand.
    • Had to put SELinux to permissive on KitKat because it is on enforced by default since 4.3, in order for the Substrate to work
    • Got IntroSpy from git and wrote a Custom Hook for IntentReceiver startActivity() method
    • Enabled IntroSpy for musicXmatch app and it dumped all the app's intents to logcat