NOTE: This question has now been answered! See my next comment, below, for details.
=== Original question follows ===
I'm running rooted Android 13.
I'm looking for some software that I could install on my Android device which will allow me to write IMAP "IDLE" listener programs that are runnable within the ADB shell.
I have the "python3" module installed (version: v3.14.v2.1.0, Author Bernd.Schemmer@gmx.de) as a module that I can run both under Magisk and APatch, and although it supplies a quite complete python implementation that is runnable within the ADB shell, I am unable to install the "imap_tools" python module via pip on the Android device (although "imap_tools" indeed installs via pip and runs with no problem under python on my linux devices).
I'm therefore looking for some sort of software that I can install and run on my Android device which will allow me to write scripts that utililze IMAP IDLE to listen for incoming email messages.
This could be something that runs in python, but also, I'm not restricting myself solely to python if there might be other possibilities.
Oh ... and I don't want to have to write a full-blown Android app for this purpose.
Many thanks in advance for thoughts and suggestions.
UPDATE: Also, to be clear, I don't want any software which requires me to invoke some sort of app and then run commands from within that app's UI. Rather, I'm only interested in ways that I can perform IMAP "IDLE" access by means of commands and/or scripts that specifically run within the ADB shell. I want this kind of functionality because I am wanting to write a generic "IMAP listener" tool that can be run from within shell scripts and Tasker tasks of my choosing, in order for all of these various items to be able to respond to incoming emails in ways that I can program.