0

Currently I'm interested in Bash and also the Android phone I have...

I'm wondering if there is a way to display popup as text input on the android screen and then receive data from that user-submitted input using adb or using a root shell/bash script?

For example, I created a bash script that will display the output Hello $userinput !! When I run this bash script, a dialog will appear entitled What's Your Name? and I can fill it directly without going through the terminal...

Does anyone know how to do it?

*It would be nice if you could also tell it the same way but this is only for normal popup that don't contain any input boxes, but just like regular popup on Android 😃

I'm currently very curious about things like this, I mean bash script, root shell or adb shell command that can interact directly with user using the Android screen.

I'm using an Android 13 and have root access using Magisk, the ROM installed is MIUI 14

1 Answer 1

0

You can use ntfy.sh to send a message over HTTP, by installing the ntfy apk from Fdroid or Google Play on your android device and the ntfy package on your system.

sudo mkdir -p /etc/apt/keyrings

curl -fsSL https://archive.heckel.io/apt/pubkey.txt | sudo gpg --dearmor -o /etc/apt/keyrings/archive.heckel.io.gpg
sudo apt install apt-transport-https
sudo sh -c "echo 'deb [arch=amd64 signed-by=/etc/apt/keyrings/archive.heckel.io.gpg] https://archive.heckel.io/apt debian main' \
 /etc/apt/sources.list.d/archive.heckel.io.list"  
sudo apt update
sudo apt install ntfy
sudo systemctl enable ntfy
sudo systemctl start ntfy

Subscribe to topic on the android app. From the terminal, send a pop-up:

curl -d "Your backup is done" ntfy.sh/mytopic

ntfy: Installation guide.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .