install termux from F-Droid.
apt update| iptables -F | |
| sysctl -w net.ipv4.ip_forward=1 |
| $ mkdir -p /data/android-workspace && cat > /data/android-workspace/README.md << 'EOF' | |
| # Android Development Environment Setup (Without KVM) | |
| ## Overview | |
| This guide documents how to set up a complete Android development environment on a machine without KVM hardware virtualization support, using Redroid (Remote Android) containerized solution. | |
| **Tested on:** Linux 6.8.0-71-generic, Docker, Android SDK 36.6.11 | |
| ## Prerequisites |
| #!/system/bin/sh | |
| echo "[*] Setting up proot command..." | |
| BASE_DIR="$(pwd)" | |
| USR_DIR="$BASE_DIR/usr" | |
| BIN_DIR="$USR_DIR/bin" | |
| LIB_DIR="$USR_DIR/lib" | |
| mkdir -p "$BIN_DIR" "$LIB_DIR" |
| // Get all users | |
| var url = "http://localhost:8080/api/v1/users"; | |
| var xhr = new XMLHttpRequest() | |
| xhr.open('GET', url, true) | |
| xhr.onload = function () { | |
| var users = JSON.parse(xhr.responseText); | |
| if (xhr.readyState == 4 && xhr.status == "200") { | |
| console.table(users); | |
| } else { | |
| console.error(users); |
| function convertMiliseconds(miliseconds, format) { | |
| var days, hours, minutes, seconds, total_hours, total_minutes, total_seconds; | |
| total_seconds = parseInt(Math.floor(miliseconds / 1000)); | |
| total_minutes = parseInt(Math.floor(total_seconds / 60)); | |
| total_hours = parseInt(Math.floor(total_minutes / 60)); | |
| days = parseInt(Math.floor(total_hours / 24)); | |
| seconds = parseInt(total_seconds % 60); | |
| minutes = parseInt(total_minutes % 60); |
| /*! | |
| * Bootswatch v4.3.1 | |
| * Homepage: https://bootswatch.com | |
| * Copyright 2012-2019 Thomas Park | |
| * Licensed under MIT | |
| * Based on Bootstrap | |
| *//*! | |
| * Bootstrap v4.3.1 (https://getbootstrap.com/) | |
| * Copyright 2011-2019 The Bootstrap Authors | |
| * Copyright 2011-2019 Twitter, Inc. |
| ssss |
| /** | |
| * covert canvas to image | |
| * and save the image file | |
| */ | |
| var Canvas2Image = function() { | |
| // check if support sth. | |
| var $support = function() { | |
| var canvas = document.createElement('canvas'), |