use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.
the class MmsPatch method onBindHooks.
@Override
protected void onBindHooks() {
addHook(new ReplaceSpecPkgHook("sendMessage", 1));
addHook(new ReplaceSpecPkgHook("downloadMessage", 1));
addHook(new ReplaceCallingPkgHook("importTextMessage"));
addHook(new ReplaceCallingPkgHook("importMultimediaMessage"));
addHook(new ReplaceCallingPkgHook("deleteStoredMessage"));
addHook(new ReplaceCallingPkgHook("deleteStoredConversation"));
addHook(new ReplaceCallingPkgHook("updateStoredMessageStatus"));
addHook(new ReplaceCallingPkgHook("archiveStoredConversation"));
addHook(new ReplaceCallingPkgHook("addTextMessageDraft"));
addHook(new ReplaceCallingPkgHook("addMultimediaMessageDraft"));
addHook(new ReplaceSpecPkgHook("sendStoredMessage", 1));
addHook(new ReplaceCallingPkgHook("setAutoPersisting"));
}
use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.
the class PhoneSubInfoPatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
addHook(new ReplaceLastPkgHook("getNaiForSubscriber"));
addHook(new ReplaceLastPkgHook("getImeiForSubscriber"));
addHook(new ReplaceCallingPkgHook("getDeviceSvn"));
addHook(new ReplaceLastPkgHook("getDeviceSvnUsingSubId"));
addHook(new ReplaceCallingPkgHook("getSubscriberId"));
addHook(new ReplaceLastPkgHook("getSubscriberIdForSubscriber"));
addHook(new ReplaceCallingPkgHook("getGroupIdLevel1"));
addHook(new ReplaceLastPkgHook("getGroupIdLevel1ForSubscriber"));
addHook(new ReplaceCallingPkgHook("getLine1Number"));
addHook(new ReplaceLastPkgHook("getLine1NumberForSubscriber"));
addHook(new ReplaceCallingPkgHook("getLine1AlphaTag"));
addHook(new ReplaceLastPkgHook("getLine1AlphaTagForSubscriber"));
addHook(new ReplaceCallingPkgHook("getMsisdn"));
addHook(new ReplaceLastPkgHook("getMsisdnForSubscriber"));
addHook(new ReplaceCallingPkgHook("getVoiceMailNumber"));
addHook(new ReplaceLastPkgHook("getVoiceMailNumberForSubscriber"));
addHook(new ReplaceCallingPkgHook("getVoiceMailAlphaTag"));
addHook(new ReplaceLastPkgHook("getVoiceMailAlphaTagForSubscriber"));
// The following method maybe need to fake
//addHook(new ReplaceCallingPkgHook("getDeviceId"));
addHook(new ReplaceCallingPkgHook("getIccSerialNumber"));
addHook(new ReplaceLastPkgHook("getIccSerialNumberForSubscriber"));
}
use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.
the class ISmsPatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
addHook(new ReplaceSpecPkgHook("getAllMessagesFromIccEfForSubscriber", 1));
addHook(new ReplaceSpecPkgHook("updateMessageOnIccEfForSubscriber", 1));
addHook(new ReplaceSpecPkgHook("copyMessageToIccEfForSubscriber", 1));
addHook(new ReplaceSpecPkgHook("sendDataForSubscriber", 1));
addHook(new ReplaceSpecPkgHook("sendDataForSubscriberWithSelfPermissions", 1));
addHook(new ReplaceSpecPkgHook("sendTextForSubscriber", 1));
addHook(new ReplaceSpecPkgHook("sendTextForSubscriberWithSelfPermissions", 1));
addHook(new ReplaceSpecPkgHook("sendMultipartTextForSubscriber", 1));
addHook(new ReplaceSpecPkgHook("sendStoredText", 1));
addHook(new ReplaceSpecPkgHook("sendStoredMultipartText", 1));
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {
addHook(new ReplaceCallingPkgHook("getAllMessagesFromIccEf"));
addHook(new ReplaceSpecPkgHook("getAllMessagesFromIccEfForSubscriber", 1));
addHook(new ReplaceCallingPkgHook("updateMessageOnIccEf"));
addHook(new ReplaceSpecPkgHook("updateMessageOnIccEfForSubscriber", 1));
addHook(new ReplaceCallingPkgHook("copyMessageToIccEf"));
addHook(new ReplaceSpecPkgHook("copyMessageToIccEfForSubscriber", 1));
addHook(new ReplaceCallingPkgHook("sendData"));
addHook(new ReplaceSpecPkgHook("sendDataForSubscriber", 1));
addHook(new ReplaceCallingPkgHook("sendText"));
addHook(new ReplaceSpecPkgHook("sendTextForSubscriber", 1));
addHook(new ReplaceCallingPkgHook("sendMultipartText"));
addHook(new ReplaceSpecPkgHook("sendMultipartTextForSubscriber", 1));
addHook(new ReplaceSpecPkgHook("sendStoredText", 1));
addHook(new ReplaceSpecPkgHook("sendStoredMultipartText", 1));
} else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
addHook(new ReplaceCallingPkgHook("getAllMessagesFromIccEf"));
addHook(new ReplaceCallingPkgHook("updateMessageOnIccEf"));
addHook(new ReplaceCallingPkgHook("copyMessageToIccEf"));
addHook(new ReplaceCallingPkgHook("sendData"));
addHook(new ReplaceCallingPkgHook("sendText"));
addHook(new ReplaceCallingPkgHook("sendMultipartText"));
}
}
use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.
the class ActivityManagerPatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
if (VirtualCore.get().isVAppProcess()) {
addHook(new ReplaceLastUidHook("checkPermissionWithToken"));
addHook(new isUserRunning());
addHook(new ResultStaticHook("updateConfiguration", 0));
addHook(new ReplaceCallingPkgHook("setAppLockedVerifying"));
addHook(new StaticHook("checkUriPermission") {
@Override
public Object afterCall(Object who, Method method, Object[] args, Object result) throws Throwable {
return PackageManager.PERMISSION_GRANTED;
}
});
addHook(new StaticHook("getRecentTasks") {
@Override
public Object call(Object who, Method method, Object... args) throws Throwable {
Object _infos = method.invoke(who, args);
//noinspection unchecked
List<ActivityManager.RecentTaskInfo> infos = ParceledListSliceCompat.isReturnParceledListSlice(method) ? ParceledListSlice.getList.call(_infos) : (List) _infos;
for (ActivityManager.RecentTaskInfo info : infos) {
AppTaskInfo taskInfo = VActivityManager.get().getTaskInfo(info.id);
if (taskInfo == null) {
continue;
}
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
info.baseActivity = taskInfo.baseActivity;
info.topActivity = taskInfo.topActivity;
}
info.origActivity = taskInfo.baseActivity;
info.baseIntent = taskInfo.baseIntent;
}
return _infos;
}
});
}
}
use of com.lody.virtual.client.hook.base.ReplaceCallingPkgHook in project VirtualApp by asLody.
the class ISubPatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
addHook(new ReplaceCallingPkgHook("getAllSubInfoList"));
addHook(new ReplaceCallingPkgHook("getAllSubInfoCount"));
addHook(new ReplaceLastPkgHook("getActiveSubscriptionInfo"));
addHook(new ReplaceLastPkgHook("getActiveSubscriptionInfoForIccId"));
addHook(new ReplaceLastPkgHook("getActiveSubscriptionInfoForSimSlotIndex"));
addHook(new ReplaceLastPkgHook("getActiveSubscriptionInfoList"));
addHook(new ReplaceLastPkgHook("getActiveSubInfoCount"));
addHook(new ReplaceLastPkgHook("getSubscriptionProperty"));
}
Aggregations