v3.1.1: fix download mirrors, Hermes auto-install Python, AutoGLM Samsung/Android 16 fix
This commit is contained in:
@@ -2051,17 +2051,19 @@
|
||||
|
||||
var d8Test = await shellExec('test -f "' + jarsDir + '/d8.jar"', termState.homeDir, false);
|
||||
if (d8Test.exitCode !== 0) {
|
||||
termPrint('[*] Downloading d8.jar (DEX compiler, ~18MB)...', 'info');
|
||||
termPrint('[*] Extracting d8.jar from APK assets...', 'info');
|
||||
try {
|
||||
var dlResult = await Bootstrap.downloadFile({url: 'https://dl.google.com/android/repository/build-tools_r36-linux.zip', dest: toolsDir + '/build-tools.zip'});
|
||||
termPrint('[*] Extracting d8.jar from build-tools...', 'info');
|
||||
await shellExec('cd "' + toolsDir + '" && unzip -o build-tools.zip "*/lib/d8.jar" 2>&1 && mv */lib/d8.jar jars/d8.jar && rm -rf build-tools.zip android-*', termState.homeDir, false);
|
||||
var d8Extract = await Bootstrap.extractAsset({src: 'jars/d8.jar', dest: jarsDir + '/d8.jar'});
|
||||
termPrint('[OK] d8.jar extracted (' + Math.round(d8Extract.size/1024/1024) + ' MB)', 'success');
|
||||
} catch(e) {
|
||||
termPrint('[!] d8.jar download failed: ' + e.message, 'warning');
|
||||
termPrint('[*] Trying Termux dx package...', 'info');
|
||||
termPrint('[!] d8.jar extract failed: ' + e.message, 'warning');
|
||||
termPrint('[*] Downloading d8.jar (~18MB)...', 'info');
|
||||
try {
|
||||
var dxResult = await Bootstrap.installProot();
|
||||
} catch(e2) {}
|
||||
await Bootstrap.downloadFile({url: 'https://dl.google.com/android/repository/build-tools_r36-linux.zip', dest: toolsDir + '/build-tools.zip'});
|
||||
await shellExec('cd "' + toolsDir + '" && unzip -o build-tools.zip "*/lib/d8.jar" 2>&1 && mv */lib/d8.jar jars/d8.jar && rm -rf build-tools.zip android-*', termState.homeDir, false);
|
||||
} catch(e2) {
|
||||
termPrint('[!] d8.jar download also failed: ' + e2.message, 'err');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user