use of com.lody.virtual.client.hook.base.ResultStaticHook in project VirtualApp by asLody.
the class PowerManagerPatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
addHook(new ReplaceSequencePkgHook("acquireWakeLock", 2) {
@Override
public Object call(Object who, Method method, Object... args) throws Throwable {
try {
return super.call(who, method, args);
} catch (InvocationTargetException e) {
return onHandleError(e);
}
}
});
addHook(new ReplaceLastPkgHook("acquireWakeLockWithUid") {
@Override
public Object call(Object who, Method method, Object... args) throws Throwable {
try {
return super.call(who, method, args);
} catch (InvocationTargetException e) {
return onHandleError(e);
}
}
});
addHook(new ResultStaticHook("updateWakeLockWorkSource", 0));
}
use of com.lody.virtual.client.hook.base.ResultStaticHook 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));
}
use of com.lody.virtual.client.hook.base.ResultStaticHook in project VirtualApp by asLody.
the class BackupManagerPatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
addHook(new ResultStaticHook("dataChanged", null));
addHook(new ResultStaticHook("clearBackupData", null));
addHook(new ResultStaticHook("agentConnected", null));
addHook(new ResultStaticHook("agentDisconnected", null));
addHook(new ResultStaticHook("restoreAtInstall", null));
addHook(new ResultStaticHook("setBackupEnabled", null));
addHook(new ResultStaticHook("setBackupProvisioned", null));
addHook(new ResultStaticHook("backupNow", null));
addHook(new ResultStaticHook("fullBackup", null));
addHook(new ResultStaticHook("fullTransportBackup", null));
addHook(new ResultStaticHook("fullRestore", null));
addHook(new ResultStaticHook("acknowledgeFullBackupOrRestore", null));
addHook(new ResultStaticHook("getCurrentTransport", null));
addHook(new ResultStaticHook("listAllTransports", new String[0]));
addHook(new ResultStaticHook("selectBackupTransport", null));
addHook(new ResultStaticHook("isBackupEnabled", false));
addHook(new ResultStaticHook("setBackupPassword", true));
addHook(new ResultStaticHook("hasBackupPassword", false));
addHook(new ResultStaticHook("beginRestoreSession", null));
}
use of com.lody.virtual.client.hook.base.ResultStaticHook in project VirtualApp by asLody.
the class PersistentDataBlockServicePatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
addHook(new ResultStaticHook("write", -1));
addHook(new ResultStaticHook("read", new byte[0]));
addHook(new ResultStaticHook("wipe", null));
addHook(new ResultStaticHook("getDataBlockSize", 0));
addHook(new ResultStaticHook("getMaximumDataBlockSize", 0));
addHook(new ResultStaticHook("setOemUnlockEnabled", 0));
addHook(new ResultStaticHook("getOemUnlockEnabled", false));
}
use of com.lody.virtual.client.hook.base.ResultStaticHook in project VirtualApp by asLody.
the class PackageManagerPatch method onBindHooks.
@Override
protected void onBindHooks() {
super.onBindHooks();
addHook(new ResultStaticHook("addPermissionAsync", true));
addHook(new ResultStaticHook("addPermission", true));
}
Aggregations