From 5c024485214ef81112abf29c89c46f14b4459f72 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall Date: Sun, 20 Mar 2016 22:24:05 +0100 Subject: [PATCH] Install 64-bit arm packages on capable devices This will only affect new installations. Existing users wishing to install 64-bit packages can re-install the app completely, or just 'rm -Rf $PREFIX' and exit all sessions, which will cause Termux to re-install all packages at next startup. --- .../java/com/termux/app/TermuxInstaller.java | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/app/src/main/java/com/termux/app/TermuxInstaller.java b/app/src/main/java/com/termux/app/TermuxInstaller.java index 4b763522..bdb07269 100644 --- a/app/src/main/java/com/termux/app/TermuxInstaller.java +++ b/app/src/main/java/com/termux/app/TermuxInstaller.java @@ -176,17 +176,19 @@ final class TermuxInstaller { }.start(); } - /** Get bootstrap zip url for this systems cpu architecture. */ - static URL determineZipUrl() throws MalformedURLException { - String arch = System.getProperty("os.arch"); - if (arch.startsWith("arm") || arch.equals("aarch64")) { - // Handle different arm variants such as armv7l: - arch = "arm"; - } else if (arch.startsWith("x86")) { // "x86" on arcwelder, "x86_64" on 64-bit android. - arch = "i686"; - } - return new URL("https://termux.net/bootstrap/bootstrap-" + arch + ".zip"); - } + /** Get bootstrap zip url for this systems cpu architecture. */ + static URL determineZipUrl() throws MalformedURLException { + String arch = System.getProperty("os.arch"); + if (arch.startsWith("armv8")) { + arch = "aarch64"; + } else if (arch.startsWith("arm")) { + // Handle different arm variants such as armv7l: + arch = "arm"; + } else if (arch.startsWith("x86")) { // "x86" on arcwelder, "x86_64" on 64-bit android. + arch = "i686"; + } + return new URL("https://termux.net/bootstrap/bootstrap-" + arch + ".zip"); + } /** Delete a folder and all its content or throw. */ static void deleteFolder(File fileOrDirectory) {