Getting variables to python script?
Moderator: Martin
Getting variables to python script?
How could I get Automagic to send variables to python script and vice versa?
Possible=ISeeAWay, Impossible=IDontSeeNow, ImpossibleButImportant=WeNeedToFindAWay
Re: Getting variables to python script?
There is no action to run the python script. But we have the action to execute bash script (terminal emulator command). So, most likely you have to convert the script into automagic scripting. I am currently also studying the EFE exploit POC.py and converting it to Automagic scripting.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Getting variables to python script?
Umn, sounds good. Could you give quick example/tutorial as to how it could specifically be done?
Possible=ISeeAWay, Impossible=IDontSeeNow, ImpossibleButImportant=WeNeedToFindAWay
Re: Getting variables to python script?
It is just some different syntax. For example at the python we have
Then in Automagic, it will become
It is just like switching from learning new language and syntax. But of course there are limitation and things you can or can't do in Automagic
Code: Select all
if package != '':
data = '{ "command":' + cmd + ', "appPackageName":' + package + ' }'
else:
data = '{ "command":' + cmd + ' }'
Code: Select all
if(package != '')
data = '{ "command":' + cmd + ', "appPackageName":' + package + ' }'
else
data = '{ "command":' + cmd + ' }'
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Re: Getting variables to python script?
Cheers! By the way, just found this: https://www.reddit.com/r/tasker/comment ... l4a_tasks/
That plugin there, which Automagic can most likely use too, sounds rather promising.
That plugin there, which Automagic can most likely use too, sounds rather promising.
Possible=ISeeAWay, Impossible=IDontSeeNow, ImpossibleButImportant=WeNeedToFindAWay
Re: Getting variables to python script?
Oh, I don't know that it exists. Running a python script probably only to save some time from converting it. There are limits you can do with running python in plugin, the environment is most likely sandboxed only for those script only. But yeah, it can be done, that's more important.
BTW, I stop converting the python now, as the dev has patched out the app. So seems I am too late to exploit this to scare them to uninstall the shady app.
BTW, I stop converting the python now, as the dev has patched out the app. So seems I am too late to exploit this to scare them to uninstall the shady app.

Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.