Jump to content

Proposal for a hack - Call a java method


nuage6
 Share

Recommended Posts

I want to be able to run a specific java method in an android program (APK).

How can I do it?

------------------

Here is an example where I test TapJoy implementation (and run some code that simulate some points that have been earned.):

Somewhere in the code of an Activity that implements TapjoyEarnedPointsNotifier I have

TapjoyConnect.getTapjoyConnectInstance().setEarnedPointsNotifier(this);

Here is the interface of TapjoyEarnedPointsNotifier
public abstract interface TapjoyEarnedPointsNotifier
{
  public abstract void earnedTapPoints(int paramInt);
}


What I want to do is to simulate a call to earnedTapPoints. As an example I can do it using:
TapjoyConnect.getTapjoyConnectInstance().tapjoyOffers.tapjoyEarnedPointsNotifier.earnedTapPoints(12345);
or by finding all Activities, and running earnedTapPoints in one of these activities.

----------------------

The goal is to test some code. I cannot change the source code as I'm testing the "final version", but I can read the source code.

Link to comment
Share on other sites

  • 1 month later...

I want to be able to run a specific java method in an android program (APK).

How can I do it?

------------------

Here is an example where I test TapJoy implementation (and run some code that simulate some points that have been earned.):

Somewhere in the code of an Activity that implements TapjoyEarnedPointsNotifier I have

TapjoyConnect.getTapjoyConnectInstance().setEarnedPointsNotifier(this);

Here is the interface of TapjoyEarnedPointsNotifier

public abstract interface TapjoyEarnedPointsNotifier

{

public abstract void earnedTapPoints(int paramInt);

}

What I want to do is to simulate a call to earnedTapPoints. As an example I can do it using:

TapjoyConnect.getTapjoyConnectInstance().tapjoyOffers.tapjoyEarnedPointsNotifier.earnedTapPoints(12345);

or by finding all Activities, and running earnedTapPoints in one of these activities.

----------------------

The goal is to test some code. I cannot change the source code as I'm testing the "final version", but I can read the source code.

I tried that and it doesnt work since the hex values vary too much. You have to make a routine to change the value with the real server answer since points are not accepted when it comes to the answer

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.