Termux Set-Up

by Kgotso Mong

Version 23 (October 27, 2024)

Download (203 downloads)

𝗙𝗼𝗿 𝗳𝗹𝗼𝘄 𝗰𝗿𝗲𝗮𝘁𝗼𝗿𝘀 𝗼𝗻𝗹𝘆
This flow can download and install Termux and any packages your flow requires automatically

Pass a dictionary with the following keys

• 𝗿𝗲𝘁𝘂𝗿𝗻_𝘂𝗿𝗶 (mandatory text) : the flow uri to start once setup is complete. Ensure this is correct or else the flow will loop perpetually

• 𝘂𝗽𝗴𝗿𝗮𝗱𝗲 (boolean) : whether packages should be updated before installing

• 𝗽𝗮𝗰𝗸𝗮𝗴𝗲𝘀 (dictionary where key is the package name in termux and value is the name shown to the user) : the packages to install in termux

• 𝗽𝗶𝗽𝘀 (same as above) : the python packages to install in termux (if you have these remember to include python-pip and openssl in your packages)

• 𝗽𝗿𝗲_𝗽𝗶𝗽𝘀 (same as above) : same as above but will install the latest dev build

• 𝗺𝗮𝗻𝗱𝗮𝘁𝗼𝗿𝘆_𝗽𝗮𝗰𝗸𝗮𝗴𝗲𝘀 (array) : packages that will be pre-selected when the user selects which packages to install

• 𝗶𝗰𝗼𝗻 (text) : relative path of image to show in any notifications created by this flow

• 𝗰𝗵𝗮𝗻𝗻𝗲𝗹𝘀 (dictionary of channel uuids) : channels that will be used by this flow. It should have the following keys & attributes -
1. complete
• make sound
2. error
• make sound
• vibrate
3. notify
• show as pop-up
• silent
4. minimized
• minimized

• 𝗲𝘅𝘁𝗲𝗿𝗻𝗮𝗹_𝗮𝗽𝗽𝘀 (boolean) : whether the termux property 'allow-external-apps' is true

• 𝗽𝗲𝗿𝗺𝗶𝘀𝘀𝗶𝗼𝗻𝘀 (boolean) : whether Termux and Automate have been granted the necessary permissions

• 𝗳𝗹𝗼𝘄_𝘃𝗲𝗿𝘀𝗶𝗼𝗻 (integer) : minimum flow version to use (If this number is greater than the flow version, it will attempt to update itself throwing an error if the server is down or internet access is unavailable)

• 𝘁𝗲𝗿𝗺𝘂𝘅_𝘃𝗲𝗿𝘀𝗶𝗼𝗻 (string) : minimum version of termux to accept/download (This string will be used in a regex match so escape any special chars)

• 𝘂𝗻𝗶𝗻𝘀𝘁𝗮𝗹𝗹 (boolean) : whether to uninstall packages (store the returned packages/pips and pass these converted to a dictionary when uninstalling)

• 𝗽𝗿𝗲𝗿𝗲𝗹𝗲𝗮𝘀𝗲 (boolean) : whether to include prereleases when installing/updating termux

The flow returns a dictionary containing:

𝘀𝘂𝗰𝗰𝗲𝘀𝘀 (boolean) : whether the process was successful (This is the only key that will be consistently returned)

𝗰𝗵𝗮𝗻𝗻𝗲𝗹𝘀 (dictionary) : channel uuids

𝗿𝗲𝗮𝘀𝗼𝗻 (text) : failure message

𝗽𝗮𝗰𝗸𝗮𝗴𝗲𝘀 (array) : installed packages

𝗽𝗶𝗽𝘀 (array) : installed python packages (including pre_pips)

𝘁𝗲𝗿𝗺𝘂𝘅_𝘃𝗲𝗿𝘀𝗶𝗼𝗻 (text) : version of termux that was installed

𝘀𝘁𝗱𝗲𝗿𝗿 : error log from termux

Credit
• 𝗥𝘂𝗱𝘅𝗮𝗶𝗻 - Helped increase download speed (https://llamalab.com/automate/community/flows/42921)
• 𝗞𝗮𝘇 - Bold text in description (https://llamalab.com/automate/community/flows/28197)

### ChangeLog ###
• Fixed non-privelleged apk install
• Improved permissions setup
• Packages are now returned properly

4.5 average rating from 2 reviews

5 stars
1
4 stars
1
3 stars
0
2 stars
0
1 star
0
Reports
0

Rate and review within the app in the Community section.