Every time you join the EstudiantesUN network, the university portal asks you to accept its terms, and sometimes to sign in, before it lets you online. This guide automates that step on Android: the phone joins the network by itself and, about 30 seconds later, you have internet without opening anything.

  • Android 7 or newer
  • About 20 minutes, once
  • Minimal battery use
  • 350 to 400 MB on the phone
  • Free
  • Open source

Every line of code is on this page, explained. Nothing is hidden, nothing is sent to third-party servers, and you can read it all before installing. The only thing that changes from one person to the next is the UNAL username and password.

How it works

Five links in a chain, all inside your phone. Tap any ? to see exactly what each one does.

  1. Android Joins EstudiantesUN by itself
  2. MacroDroid Notices the connection
  3. Termux:Tasker Passes the order to Termux
  4. Termux Runs the script
  5. UNAL portal Lets you online

About 30 seconds from connecting to browsing.

Join EstudiantesUN

Once, on campus · 2 min
  1. Open the Wi-Fi settings and tap EstudiantesUN:

    Settings → Wi-Fi (the exact path varies by brand)

  2. Type the network password:

    RedEstudiantes
  3. Turn on automatic reconnection for this network:

    Open the saved network's details and turn on the automatic option. Depending on the phone it is called Auto reconnect, Auto-connect or Connect automatically.

  4. Recommended: stop the phone from leaving the network while the portal is still pending.

    If your phone has an option that moves to mobile data when the Wi-Fi has no internet (often called automatic switch to mobile data or Wi-Fi assistant), turn it off.

Install the three apps

About 5 min

One source for Termux and Termux:Tasker. Get both from F-Droid (recommended) or both from GitHub, never one from each.

Prefer automatic update notices? Install the F-Droid client and get both apps from there.

Already have Termux from the Play Store? Uninstall it first. It cannot be combined with Termux:Tasker from F-Droid.

  1. From your phone, download Termux and Termux:Tasker with the buttons above.

  2. Open each downloaded APK. Android will ask you to allow Install unknown apps for your browser: allow it, go back and install.

  3. If Play Protect or your brand's own protection warns that the app is unknown, choose Install anyway (or the equivalent option).

  4. Turn Install unknown apps back off for your browser.

  5. Open Termux once and wait until "Installing bootstrap packages…" finishes.

  6. Install MacroDroid from Google Play, open it and finish the welcome screens. No need to pay for Pro.

Why not install Termux from the Play Store?

History. Google Play started requiring apps to target recent Android versions. Since Android 10, those versions forbid an app from running programs downloaded into its own folder, which is exactly how Termux runs its packages (Python, bash…). So the Play version froze and is considered obsolete.

The current Play version (since 2024) is not maintained by the main Termux team. It is a separate branch that works around the restriction, only runs on Android 11 or newer, has features and security fixes reverted and dropped part of the functions for external apps. The Termux team itself says it is installed "at your own risk".

Sources cannot be mixed. Termux and its add-ons must share the same signature, so Termux:Tasker from F-Droid does not work with Termux from Play.

Why are F-Droid and GitHub safe?
  • They are the official sources the Termux project lists on its own page.
  • Termux is open source (GPLv3): anyone can read its code on GitHub.
  • F-Droid builds the app from that public code on its own servers, signs it and publishes the build log, so the APK you download comes from code anyone can audit.
  • F-Droid reports no "anti-features" (trackers, ads or proprietary dependencies) for Termux.
  • The packages you install inside Termux (pkg install …) come from Termux's repositories, and the package manager checks their signatures first.

Permissions and battery

About 3 min
  1. Allow MacroDroid to run commands in Termux: open Settings → Apps → MacroDroid → Permissions and allow Run commands in Termux environment. It is usually at the end of the list, under Additional permissions or Other permissions depending on the brand.

    MacroDroid may also ask for it by itself when you add the Termux action.

  2. Location for MacroDroid: Settings → Apps → MacroDroid → Permissions → Location → Allow all the time.

    Keep the phone's location turned on.

  3. Remove battery limits for MacroDroid, Termux and Termux:Tasker:

    Settings → Apps → [app] → Battery and choose Unrestricted (or Don't optimize).

Install the scripts in Termux

5 to 10 min
  1. Download the three files to your phone. They land in Downloads:

    Read the code first
  2. Open Termux and give it access to storage (first time only):

    termux-setup-storage

    Accept the permission. If it asks Do you want to continue? (y/n), type y and press Enter.

  3. Run the installer:

    bash ~/storage/downloads/instalar.sh
  4. It does the rest on its own, in six stages:

    1. [1/6] Updates Termux's packages. The first time it can take several minutes.
    2. [2/6] Installs Python and pip, without extras.
    3. [3/6] Installs the requests library.
    4. [4/6] Copies unal_wifi_login.py to Termux's home folder and unal.sh to ~/.termux/tasker/.
    5. [5/6] Asks for your UNAL username and password. Username without @unal.edu.co (for example jperez); if you add the domain, the installer removes it. The password does not show while you type; that is normal.
    6. [6/6] Checks that everything is in place.
  5. It should finish with:

    [6/6] Verificando...
      requests: OK
      script: OK
    -rwx------ 1 u0_a… u0_a… 219 … /data/data/com.termux/files/home/.termux/tasker/unal.sh
    
    Listo. Configura la macro en MacroDroid con el ejecutable: unal.sh
    Registro de cada conexión: cat ~/unal_wifi.log

Did the browser rename a file (for example unal-1.sh or unal (1).sh)? No problem: the installer always picks the most recent one.

Create the macro in MacroDroid

About 3 min
  1. Open MacroDroid → Add Macro and name it Auto WiFi UNAL.

  2. Trigger (what starts it): tap + in Triggers → Connectivity → Wifi State Change → Connected to network and pick EstudiantesUN (or type the exact name, capitals included).

  3. Action (what it does): tap + in Actions, search Termux with the magnifier and fill it in like this:

    Executable
    unal.sh
    Arguments Empty
    Working directory Empty
    Stdin Empty
    Execute in a terminal session Off
    Wait for result On
  4. Constraints: none.

  5. Save the macro ✓ and check that it is enabled.

In MacroDroid's System log (☰ → System log) you will see something like:

Connected to network (EstudiantesUN)  Auto WiFi UNAL
Invoking Macro: Auto WiFi UNAL
Termux (unal.sh Working Directory × Stdin × ... Wait For Result ✓)
Don't see the Termux action?

Update MacroDroid from Google Play and search again. Also check that Termux:Tasker is installed and that you opened Termux once.

Using Tasker instead of MacroDroid?

Create a profile State → Net → Wifi Connected with SSID EstudiantesUN. For its task add Plugin → Termux:Tasker, open its configuration and write unal.sh as the executable, without a terminal session. Grant Tasker the "Run commands in Termux environment" permission (step 3, point 1).

Tasker · Google Play

Test it

At home, then on campus

At home

Check that the installation is right. Run this in Termux:

bash ~/.termux/tasker/unal.sh

Expected answer:

2026-10-14 19:02:16 ---- inicio ----
2026-10-14 19:02:16 Tráfico forzado por wlan0.
2026-10-14 19:02:16 Ya hay internet; no hay nada que hacer.

On campus

  1. Connect to EstudiantesUN, or let the phone do it, and do not open the portal.
  2. Wait about 30 seconds and try browsing.
  3. To see what happened, open Termux and run:

    cat ~/unal_wifi.log

If everything went well:

2026-10-14 07:41:03 ---- inicio ----
2026-10-14 07:41:03 Tráfico forzado por wlan0.
2026-10-14 07:41:03 Intento 1: portal detectado -> https://porta.unal.edu.co:1003/fgtauth
2026-10-14 07:41:04 Paso 1: aceptando los términos (answer=1).
2026-10-14 07:41:04 Paso 1: respuesta HTTP 200
2026-10-14 07:41:06 Conectado al WiFi de la UNAL.

If the portal also asks for your account, an extra line appears: Paso 2: enviando usuario y contraseña.

The script writes its messages in Spanish, as you will see them in Termux.

Not working? Look up the message from your log in Troubleshooting.

The files

The same code that runs on your phone, without comments. Download it, read it here block by block, or check its SHA-256 fingerprint.

instalar.sh 1710 bytes

Prepares Termux: installs what is needed, copies the scripts and saves your credentials. Used once.

Ends up in: Downloads, where it runs from

SHA-256 e50397f301c965b166d6578e995356ceb88479351b3093afd359135347694a25
Download
unal.sh 219 bytes

What MacroDroid runs. Loads your credentials and starts the Python program.

Ends up in: ~/.termux/tasker/unal.sh

SHA-256 c76b855c7dfc09335136e55e8b3c3ddf549733cd2d30633882a2e79a4c70efbe
Download
unal_wifi_login.py 6836 bytes

The program that finds the portal and gets you through it.

Ends up in: ~/unal_wifi_login.py

SHA-256 84a31e1112e1d6833b6c2b8a93661eb70cf72c0a936f9fa87aa32f428855a791
Download
Your browser may ask for permission to download several files.

Check them in Termux:

sha256sum ~/storage/downloads/instalar.sh ~/storage/downloads/unal.sh ~/storage/downloads/unal_wifi_login.py

Troubleshooting

The first step is always to read the log:

tail -n 30 ~/unal_wifi.log

Installation

"App not installed" / "Package appears to be invalid" / INSTALL_FAILED_SHARED_USER_INCOMPATIBLE

CauseTermux and Termux:Tasker come from different sources (for example, one from Play and the other from F-Droid).

FixUninstall both and install them again from F-Droid.

Android blocks the APK installation

CauseThe permission to install unknown apps is missing, or a protection on the phone stops apps that do not come from its store (Play Protect or your brand's own, such as Samsung's Auto Blocker or Xiaomi's security scan).

FixGrant the permission to your browser (on Android 7, Unknown sources) and, if needed, pause that protection for a moment; install, then set everything back as it was.

cp: cannot stat '…/storage/downloads/…': No such file or directory

CauseThe file is not downloaded yet, the browser saved it under another name (for example unal_wifi_login-1.py or unal_wifi_login (1).py), or it saved it to another folder, such as the SD card.

FixCheck the names with this command; the installer already handles renamed files on its own. If the files do not show up, move them to Downloads with the file manager, or use the "No browser" tab of step 4.

ls ~/storage/downloads/ | grep unal
Permission denied when entering ~/storage

CauseTermux has no storage permission.

FixRun this and accept. If you denied it before, turn it on in Settings → Apps → Termux → Permissions: it is called Storage or, on recent versions, Files and media.

termux-setup-storage
pkg update fails with repository or "mirror" errors

CauseThe chosen mirror server is not responding.

FixRun this, choose another mirror (for example the "All mirrors" group) and try again.

termux-change-repo
error: externally-managed-environment while installing requests

CauseRecent pip versions protect the system's Python.

FixInstall it with this flag. The installer already tries it automatically; in Termux it only affects Termux, not Android.

pip install --break-system-packages requests
ModuleNotFoundError: No module named 'requests' / python: command not found

CausePython or requests did not get installed.

FixInstall them again:

pkg install --no-install-recommends python python-pip && pip install requests
curl: command not found / CANNOT LINK EXECUTABLE

CauseTermux's packages are out of date, which is common right after installing it.

FixUpdate everything (press Enter if it asks about configuration files) and install curl:

pkg upgrade && pkg install curl
$'\r': command not found / syntax error near unexpected token

CauseThe script went through a Windows computer and picked up Windows line endings.

FixDownload it again directly on the phone, from this page or with the "No browser" tab of step 4.

MacroDroid

The macro does not fire (nothing in MacroDroid's log)

CauseAndroid is not telling MacroDroid the network name, or MacroDroid is not running.

FixCheck that the macro is enabled; that location is on and MacroDroid has location permission (Allow all the time on Android 10 or newer); that the trigger name is exactly EstudiantesUN; that MacroDroid has no battery restrictions; and, on the free version, that you do not have more than 5 macros enabled.

The macro fires, but nothing new appears in ~/unal_wifi.log

CauseMost likely the "Run commands in Termux environment" permission is missing, or unal.sh is not in ~/.termux/tasker/.

FixCheck the permission (step 3) and run this command: unal.sh must appear with permissions -rwx------. Open Termux at least once after installing it, and in MacroDroid write only unal.sh, with no path.

ls -l ~/.termux/tasker/
MacroDroid shows a "Termux:Tasker" or "plugin not found" error

CauseTermux:Tasker is missing, or it comes from a different source than Termux.

FixInstall Termux:Tasker from the same source as Termux and restart the phone.

The log

No se pudo forzar wlan0 (…)

CauseThe phone does not allow tying connections to the interface, or the Wi-Fi interface has another name.

FixQuick fix: turn off mobile data when you arrive on campus. Advanced: find the Wi-Fi interface name (it usually starts with wlan) and add it to ~/.unal_credenciales as export UNAL_IFACE=name.

Ya hay internet; no hay nada que hacer. (but you have no internet)

CauseThe traffic went out through mobile data.

FixCheck that Tráfico forzado por wlan0. appears just before. If it does not, look at the error above it.

Intento N: la red aún no responde (in every attempt)

CauseThe phone did not have an IP address yet, or the signal is very weak.

FixMove closer to an access point, then disconnect and reconnect the Wi-Fi so the macro fires again.

Se detiene: el portal rechazó el usuario o la contraseña

CauseThe portal did not accept the saved credentials.

FixFix them with this command. Username without @unal.edu.co (jperez, not jperez@unal.edu.co); also check capitals and extra spaces in the password. Save with Ctrl+O and Enter, exit with Ctrl+X.

nano ~/.unal_credenciales
Se detiene: el portal pide usuario y contraseña pero no están configurados

CauseThe file ~/.unal_credenciales does not exist or is empty.

FixRun the installer again, or create the file by hand (step 4, "Manual" tab).

Se detiene: el portal no pertenece a unal.edu.co / el formulario apunta fuera de unal.edu.co

CauseThe network sent you to a page that is not the university's. It may be a fake network with the same name, or the UNAL changed its portal.

FixDo not send any data. If you are sure you are on the real network, run this and check which address it redirects to.

bash ~/.termux/tasker/unal.sh --debug
Aviso: no se pudo verificar el certificado del portal

CauseThe program could not confirm that the portal is genuine and went on anyway; many captive portals use certificates that cannot be validated.

FixIf it appears on the real network, leave it as it is: the unal.edu.co check is still active. See Security and privacy.

Se detiene: certificado del portal no verificable y UNAL_TLS_ESTRICTO=1

CauseStrict mode is on and the certificate could not be verified: it may be a fake network, or the portal changed its certificate.

FixDo not send data. If you are sure the network is real and the warning keeps appearing, remove the export UNAL_TLS_ESTRICTO=1 line from ~/.unal_credenciales.

Se envió el formulario pero aún no hay internet. (again and again)

CauseThe portal probably changed its fields.

FixRun this. The pages are saved to ~/unal_portal_1.html, ~/unal_portal_2.html…; review them or share them, without your credentials, to adjust the script.

bash ~/.termux/tasker/unal.sh --debug
No se logró conectar. (with no other clear error)

CauseWeak signal, or the network itself is failing.

FixDisconnect and reconnect the Wi-Fi and check the log again. Try opening the portal by hand once in the browser: if it fails that way too, the problem is the network, not the script.

Security and privacy

What could go wrong, and how this guide prevents it.

Installing APKs outside the Play Store

Why it existsAndroid asks you to allow installing unknown apps (on Android 8 or newer, for the browser; on Android 7, for the whole phone); while it is on, any downloaded APK could be installed.

How it is reducedDownload only from the official links in step 2 and turn the permission off when you are done.

Termux can run any command

Why it existsIt is a Linux terminal: it runs whatever you type.

How it is reducedOnly run the commands in this guide; each one is explained in its ?. Do not paste commands from sources you do not know.

Other apps could run scripts in Termux

Why it existsTermux:Tasker lets apps with "Run commands in Termux environment" start scripts.

How it is reducedOnly MacroDroid gets that permission, and allow-external-apps stays off, so only the scripts in ~/.termux/tasker/ can run.

MacroDroid is very powerful

Why it existsDepending on the macros you create, it can ask for broad permissions (accessibility, notifications…).

How it is reducedThis macro only needs location and running commands in Termux. Do not grant permissions this guide does not ask for.

Your UNAL credentials stay on the phone

Why it existsThe portal sometimes asks for them, and automating it means saving them.

How it is reducedThey live in ~/.unal_credenciales, inside Termux's private folder, with permissions 600. No other app can read it on a phone without root, and they never end up in Downloads or in the scripts.

A fake network with the same name

Why it existsThe EstudiantesUN password is public, so anyone could set up a network with the same name.

How it is reducedThe script only sends data to unal.edu.co addresses, verifies the portal's HTTPS certificate and warns in the log if it cannot. You can also turn on strict mode (below).

What is stored on the phone

FileContentsWho can read it
File~/.unal_credenciales ContentsYour UNAL username and password Who can read itOnly Termux (permissions 600, the app's private folder)
File~/.termux/tasker/unal.sh ContentsThe launcher (no credentials) Who can read itOnly Termux
File~/unal_wifi_login.py ContentsThe program (no credentials) Who can read itOnly Termux
File~/unal_wifi.log ContentsDate, time and steps of each connection. It never stores your password. Who can read itOnly Termux
File~/unal_portal_N.html ContentsOnly with --debug: the portal's HTML Who can read itOnly Termux

~ is Termux's private folder (/data/data/com.termux/files/home). Other apps cannot read it on a phone without root.

Where it connects

AddressWhat forData sent
Addresshttp://connectivitycheck.gstatic.com/generate_204 What forChecking for internet. Android uses the same address for that. Data sentNone (empty request).
Addresshttp://neverssl.com/ What forA simple unencrypted page the portal intercepts to redirect you. Data sentNone (empty request).
Addresshttps://porta.unal.edu.co:1003/… What forThe university portal. Data sentThe acceptance of the terms (answer=1) and, only if the portal asks, your username and password.

No analytics, telemetry or servers of my own. Your credentials are only sent to addresses ending in unal.edu.co.

Strict certificate mode

The program first connects to the portal verifying its HTTPS certificate, like a browser. If it cannot, it leaves an Aviso in the log and goes on without verifying, because many captive portals use certificates that cannot be validated.

If on campus your log does not show that warning, the certificate is valid and you can turn on strict mode, so the program refuses to go on if one day it cannot verify it (on a fake network, for example):

echo 'export UNAL_TLS_ESTRICTO=1' >> ~/.unal_credenciales

If the warning does appear on the real network, keep the normal mode: the unal.edu.co check is still active.

General advice: since the EstudiantesUN password is public, do not reuse your UNAL password on other services. That way, even if it ever leaked, the damage would stay limited.

Useful commands

For Termux, once everything is installed.

  • cat ~/unal_wifi.log

    Shows the whole log of every connection.

  • tail -n 20 ~/unal_wifi.log

    Only the last 20 lines (-n 20), handy when the log is long.

  • bash ~/.termux/tasker/unal.sh

    Runs by hand the same file MacroDroid runs, to test it.

  • bash ~/.termux/tasker/unal.sh --debug

    The same, but it also saves each portal page to ~/unal_portal_N.html to diagnose changes.

  • nano ~/.unal_credenciales

    Opens your credentials to fix them. Save with Ctrl+O and Enter, exit with Ctrl+X.

  • ls -l ~/.termux/tasker/

    Checks that unal.sh is where it should be (-l shows permissions, size and date).

  • ls ~/storage/downloads/ | grep unal

    Lists Downloads filtered to "unal", to see what names your downloads got.

  • pkg clean

    Deletes the cache of packages that are already installed (up to about 30 MB). It does not affect anything that is working.

Advanced options

Add them as export NAME=value lines in ~/.unal_credenciales:

VariableDefaultWhat for
VariableUNAL_USER / UNAL_PASS Default(set by the installer) What forUNAL username (without @unal.edu.co) and password.
VariableUNAL_IFACE Defaultwlan0 What forName of the Wi-Fi interface. Only change it if the log says it could not force wlan0.
VariableUNAL_DOMINIO Defaultunal.edu.co What forThe only domain the program sends data to.
VariableUNAL_TLS_ESTRICTO Default(empty) What forIf it is 1, the program refuses to go on when it cannot verify the portal's HTTPS certificate.

Uninstall everything

In Termux:

rm -f ~/.termux/tasker/unal.sh ~/unal_wifi_login.py ~/.unal_credenciales ~/unal_wifi.log ~/unal_portal_*.html

If you used the "No browser" tab, also remove its folder:

rm -rf ~/autowifiunal
  1. Delete the Auto WiFi UNAL macro in MacroDroid.
  2. If you no longer need them, uninstall MacroDroid, Termux:Tasker and Termux from Settings → Apps. Uninstalling Termux also erases everything inside it.
  3. Delete instalar.sh, unal.sh and unal_wifi_login.py from Downloads.

Sources

Tested on the EstudiantesUN network in October 2026 (with a Samsung Galaxy); the steps work on any Android 7 or newer, and menu names change by brand. Not an official tool of the Universidad Nacional de Colombia.