From 3fb941dced421f8947f9b93455de613969bd1ec0 Mon Sep 17 00:00:00 2001 From: iddoeldor Date: Mon, 18 Mar 2019 20:08:59 +0200 Subject: [PATCH] android IPC --- scripts/WIP_android_ipc.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 scripts/WIP_android_ipc.js diff --git a/scripts/WIP_android_ipc.js b/scripts/WIP_android_ipc.js new file mode 100644 index 0000000..18d9ad0 --- /dev/null +++ b/scripts/WIP_android_ipc.js @@ -0,0 +1,28 @@ +var ContextWrapper = Java.use("android.content.ContextWrapper"); + +ContextWrapper.sendBroadcast.overload("android.content.Intent").implementation = function(intent) { + send(JSON.stringify({ + _intent: intent.toString(), + extras: intent.getExtras() ? intent.getExtras().toString() : 'null', + flags: intent.getFlags().toString() + })); + return this.sendBroadcast.overload("android.content.Intent").apply(this, arguments); +} + +ContextWrapper.sendBroadcast.overload("android.content.Intent", "java.lang.String").implementation = function(intent, receiverPermission) { + send(JSON.stringify({ + + }); + return this.sendBroadcast.overload("android.content.Intent", "java.lang.String").apply(this, arguments); +} + + +ContextWrapper.sendStickyBroadcast.overload("android.content.Intent").implementation = function(intent) { + + return this.sendStickyBroadcast.overload("android.content.Intent").apply(this, arguments); +} + +ContextWrapper.startActivity.overload("android.content.Intent").implementation = function(intent) { + + return this.startActivity.overload("android.content.Intent").apply(this, arguments); +}