Question

I wonder if something like this is possible:

  1. Application AA uses Androids class MediaPlayer to play some songs to STREAM_MUSIC
  2. Application BB changes/replaces some methods in Androids class MediaPlayer via standard Java-reflection methods
  3. The MediaPlayer-instance of application AA uses the by application BB replaced methods

I'm sure in a simple java-application this could work (once, I replaced some methods in an external library via reflection).

But I'm not sure if that would work in Android. I think the apps are separated from each other and can just communicate via notifications, because this would be a very large security leak.

My intention is to find a way to grab audio from other apps and I'm searching & trying since almost 1 year now.

Kind regards & thanks in advance!

Was it helpful?

Solution

I wonder if something like this is possible

Fortunately, no. While processes share the initial class definitions, any app that somehow modifies those definitions will transparently work on a new private copy (Linux copy-on-write).

My intention is to find a way to grab audio from other apps

Fortunately, that is not possible, for obvious privacy and security reasons.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top