[Android Software/Hacking General [Developers Only]] Fusseldieb:
About Plugins and Scripts

For those who want make their own plugin, here's an advice:

The plugin files

look like

batch files but

they aren't

actually. I in fact do take advantage of the batch interpreter from windows, but this doesn't mean that you can put whatever you want in that file in the order that you want. If you miss one lettercase, it will fail.

For example each file must begin with [SATRPlugin] or [SATRScript] which indentifies if it is a Script or a Plugin.

After that line, you must put the plugin name with [PluginName=Name of the plugin here] and your username with [PluginAuthor=Nickname here]. After that, we begin the plugin with [BeginPlugin] and say to the program, that he should take advantage fro the Batch interpreter after this line.

After that stuff, print a section out with echo [Section]. Each value from your phone, must be within ONE section parameter alone.

Now we display the name of the information we will retrieve with echo Battery Remaining: and in the next line we specify the full command, for example: adb shell cat "/sys/class/power_supply/battery/capacity". The next what's coming is optional, you can determine a Prefix and a Suffix for the information retrieved. You give the Prefix or Suffix like so:

echo [Prefix=Prefix here]
echo [Suffix=Suffix here]

If the value retrieved needs to be converted, you could use:

echo [Add=123]
echo [Subtract=123]
echo [Multiply=123]
echo [Divide=123]

The value displayed with all the parameters given above, will now go through all of these before being displayed. I works best if you only use one.

If you want to show the number graphically, you could add a progressbar to it, with:

echo [EnableBar=100]

which 100 is the maximum of the bar. If the maximum is exceeded, the application may crash, be careful. (I don't know if it crashs, I'm only theoretical supposing it. )

To finish the current section, add another echo [Section] to it. To begin one more information, you

don't

need to put the section tag twice. Just continue normally with the next title.

If you want to finish your script, use [EndPlugin] on the end of the file.

If you made it all correctly, it will load correctly in your tool and displaying all information that you need.

An example is below:

[SATRPlugin]
[PluginName=Battery Monitor for S6]
[PluginAuthor=Fusseldieb]
[BeginPlugin]
echo [Section]
echo Battery Remaining:
adb shell cat "/sys/class/power_supply/battery/capacity"
echo [Suffix=%%]
echo [EnableBar=100]
echo [Section]
echo Battery Technology:
adb shell cat "/sys/class/power_supply/battery/technology"
echo [Section]
echo Time until full:
adb shell cat "/sys/class/power_supply/battery/time_to_full_now"
echo [Divide=3600]
echo [Suffix= Hours]
echo [Section]
[EndPlugin]

If you need assistance, feel free to post here, I will help you. I'm online practically all day with my phone, so don't bother. Post your code here and ask for help ;)

Scripts are almost the same, but without the parameters and sections.

They have a fix header:

[SATRScript]
[ScriptName=Purge Internal SD Card]
[ScriptAuthor=Fusseldieb]
[BeginScript]

After that, it is a normal batch file. So be carefully what you do.

adb rm /mnt/sdcard/ -r

After all the codes you need, you finish the script with:

[ShowOutput]
[EndScript]

If you put [ShowOutput], the tool will show a message box after it's done with all the outputs that this script gave. If you don't want this, just don't write it there.

As you see, adb is written without any paths, that's good so. Just write adb, the tool will add the full path to the file later.

As you see too, that's nearly a normal batch file, so be careful what you download from the database! I check it every day, but be careful. Before downloading, it's recommended scrolling through the Previewer and look for strage codes. You can report these scripts too, just hit the report button and I will see that malicious script imediately. For plugins I say the same: Don't trust everybody! Nicknames are NOT authenticated. There could be another Fusseldieb! Be careful.

Happy pushing & pulling & coding & monitoring with my tool :)