Ah, understood! thank you for your attention!
I was thinking about some possibilities like this using adb, but I thought I was doing something wrong.
As for my script, I'm doing EXACTLY what is in this tutorial that you sent me the link, but i'm having some troubles.
My script (the same as the link) was moved to /data/init.d/ successfully, but when I restart the system it doesn't even create the /gpio5/ directory in /sys/class/gpio/. I think it might be a permissions issue, but my attempts haven't worked.
Furthermore, I would also like to know how to read the value of a digital port.