Search in sources :

Example 1 with ReplaceCallingPkgHook

use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.

the class TelephonyPatch method onBindHooks.

@Override
protected void onBindHooks() {
    super.onBindHooks();
    //addHook(new ReplaceCallingPkgHook("getDeviceId"));
    addHook(new ReplaceCallingPkgHook("getNeighboringCellInfo"));
    addHook(new ReplaceCallingPkgHook("getAllCellInfo"));
    addHook(new ReplaceCallingPkgHook("getCellLocation"));
    addHook(new ReplaceCallingPkgHook("isOffhook"));
    addHook(new ReplaceLastPkgHook("getLine1NumberForDisplay"));
    addHook(new ReplaceLastPkgHook("isOffhookForSubscriber"));
    addHook(new ReplaceLastPkgHook("isRingingForSubscriber"));
    addHook(new ReplaceCallingPkgHook("call"));
    addHook(new ReplaceCallingPkgHook("isRinging"));
    addHook(new ReplaceCallingPkgHook("isIdle"));
    addHook(new ReplaceLastPkgHook("isIdleForSubscriber"));
    addHook(new ReplaceCallingPkgHook("isRadioOn"));
    addHook(new ReplaceLastPkgHook("isRadioOnForSubscriber"));
    addHook(new ReplaceLastPkgHook("isSimPinEnabled"));
    addHook(new ReplaceLastPkgHook("getCdmaEriIconIndex"));
    addHook(new ReplaceLastPkgHook("getCdmaEriIconIndexForSubscriber"));
    addHook(new ReplaceCallingPkgHook("getCdmaEriIconMode"));
    addHook(new ReplaceLastPkgHook("getCdmaEriIconModeForSubscriber"));
    addHook(new ReplaceCallingPkgHook("getCdmaEriText"));
    addHook(new ReplaceLastPkgHook("getCdmaEriTextForSubscriber"));
    addHook(new ReplaceLastPkgHook("getNetworkTypeForSubscriber"));
    addHook(new ReplaceCallingPkgHook("getDataNetworkType"));
    addHook(new ReplaceLastPkgHook("getDataNetworkTypeForSubscriber"));
    addHook(new ReplaceLastPkgHook("getVoiceNetworkTypeForSubscriber"));
    addHook(new ReplaceCallingPkgHook("getLteOnCdmaMode"));
    addHook(new ReplaceLastPkgHook("getLteOnCdmaModeForSubscriber"));
    addHook(new ReplaceLastPkgHook("getCalculatedPreferredNetworkType"));
    addHook(new ReplaceLastPkgHook("getPcscfAddress"));
    addHook(new ReplaceLastPkgHook("getLine1AlphaTagForDisplay"));
    addHook(new ReplaceCallingPkgHook("getMergedSubscriberIds"));
    addHook(new ReplaceLastPkgHook("getRadioAccessFamily"));
    addHook(new ReplaceCallingPkgHook("isVideoCallingEnabled"));
}
Also used : ReplaceCallingPkgHook(com.lody.virtual.client.hook.base.ReplaceCallingPkgHook) ReplaceLastPkgHook(com.lody.virtual.client.hook.base.ReplaceLastPkgHook)

Example 2 with ReplaceCallingPkgHook

use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.

the class TelephonyRegistryPatch method onBindHooks.

@Override
protected void onBindHooks() {
    super.onBindHooks();
    addHook(new ReplaceCallingPkgHook("listen"));
    addHook(new ReplaceSequencePkgHook("listenForSubscriber", 1));
}
Also used : ReplaceSequencePkgHook(com.lody.virtual.client.hook.base.ReplaceSequencePkgHook) ReplaceCallingPkgHook(com.lody.virtual.client.hook.base.ReplaceCallingPkgHook)

Example 3 with ReplaceCallingPkgHook

use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.

the class UserManagerPatch method onBindHooks.

@Override
protected void onBindHooks() {
    super.onBindHooks();
    addHook(new ReplaceCallingPkgHook("setApplicationRestrictions"));
    addHook(new ReplaceCallingPkgHook("getApplicationRestrictions"));
    addHook(new ReplaceCallingPkgHook("getApplicationRestrictionsForUser"));
    addHook(new ResultStaticHook("getProfileParent", null));
    addHook(new ResultStaticHook("getUserIcon", null));
    addHook(new ResultStaticHook("getUserInfo", null));
    addHook(new ResultStaticHook("getDefaultGuestRestrictions", null));
    addHook(new ResultStaticHook("setDefaultGuestRestrictions", null));
    addHook(new ResultStaticHook("removeRestrictions", null));
    addHook(new ResultStaticHook("getUsers", Collections.EMPTY_LIST));
    addHook(new ResultStaticHook("createUser", null));
    addHook(new ResultStaticHook("createProfileForUser", null));
    addHook(new ResultStaticHook("getProfiles", Collections.EMPTY_LIST));
}
Also used : ReplaceCallingPkgHook(com.lody.virtual.client.hook.base.ReplaceCallingPkgHook) ResultStaticHook(com.lody.virtual.client.hook.base.ResultStaticHook)

Example 4 with ReplaceCallingPkgHook

use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.

the class VibratorPatch method onBindHooks.

@Override
protected void onBindHooks() {
    //Samsung
    addHook(new ReplaceCallingPkgHook("vibrateMagnitude") {

        @Override
        public boolean beforeCall(Object who, Method method, Object... args) {
            if (args[0] instanceof Integer) {
                args[0] = getRealUid();
            }
            return super.beforeCall(who, method, args);
        }
    });
    //Samsung
    addHook(new ReplaceCallingPkgHook("vibratePatternMagnitude") {

        @Override
        public boolean beforeCall(Object who, Method method, Object... args) {
            if (args[0] instanceof Integer) {
                args[0] = getRealUid();
            }
            return super.beforeCall(who, method, args);
        }
    });
    addHook(new ReplaceCallingPkgHook("vibrate") {

        @Override
        public boolean beforeCall(Object who, Method method, Object... args) {
            if (args[0] instanceof Integer) {
                args[0] = getRealUid();
            }
            return super.beforeCall(who, method, args);
        }
    });
    addHook(new ReplaceCallingPkgHook("vibratePattern") {

        @Override
        public boolean beforeCall(Object who, Method method, Object... args) {
            if (args[0] instanceof Integer) {
                args[0] = getRealUid();
            }
            return super.beforeCall(who, method, args);
        }
    });
}
Also used : ReplaceCallingPkgHook(com.lody.virtual.client.hook.base.ReplaceCallingPkgHook) Method(java.lang.reflect.Method)

Example 5 with ReplaceCallingPkgHook

use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.

the class GraphicsStatsPatch method onBindHooks.

@Override
protected void onBindHooks() {
    super.onBindHooks();
    addHook(new ReplaceCallingPkgHook("requestBufferForProcess"));
}
Also used : ReplaceCallingPkgHook(com.lody.virtual.client.hook.base.ReplaceCallingPkgHook)

Aggregations

ReplaceCallingPkgHook (com.lody.virtual.client.hook.base.ReplaceCallingPkgHook)12 ReplaceLastPkgHook (com.lody.virtual.client.hook.base.ReplaceLastPkgHook)3 ReplaceSpecPkgHook (com.lody.virtual.client.hook.base.ReplaceSpecPkgHook)2 ResultStaticHook (com.lody.virtual.client.hook.base.ResultStaticHook)2 StaticHook (com.lody.virtual.client.hook.base.StaticHook)2 Method (java.lang.reflect.Method)2 ActivityManager (android.app.ActivityManager)1 ReplaceLastUidHook (com.lody.virtual.client.hook.base.ReplaceLastUidHook)1 ReplaceSequencePkgHook (com.lody.virtual.client.hook.base.ReplaceSequencePkgHook)1 VActivityManager (com.lody.virtual.client.ipc.VActivityManager)1 AppTaskInfo (com.lody.virtual.remote.AppTaskInfo)1 List (java.util.List)1 IActivityManager (mirror.android.app.IActivityManager)1