Skip to content

Commit

Permalink
Release v2.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
meefik committed Nov 4, 2019
1 parent 5e1cc80 commit 1cf6f0b
Show file tree
Hide file tree
Showing 34 changed files with 75 additions and 168 deletions.
16 changes: 16 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,22 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

## [2.5.0] - 2019-11-04
### Added
- Added compatibility with Android 10
- Added support for Docker containers

### Fixed
- Fixed URL of Ubuntu repository
- Fixed Arch Linux deprecations

### Changed
- Updated built-in busybox to v1.31.1

### Removed
- Removed PRoot support
- Removed installing symlink to /system/bin

## [2.4.1] - 2019-10-20
### Added
- Added power trigger
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ The app is available for download in Google Play and GitHub.

## Features

- Supported distributions: Debian, Ubuntu, Kali Linux, Arch Linux, Fedora, CentOS, Slackware, Alpine Linux, other (from rootfs.tar)
- Bootstrap: Alpine, Arch, CentOS, Debian, Fedora, Kali, Slackware, Ubuntu, Docker or from rootfs.tar
- Installation type: image file, directory, disk partition, RAM
- Supported file systems: ext2, ext3, ext4
- Supported architectures: arm, arm64, x86, x86_64, emulation mode (ARM ~ x86)
Expand Down
10 changes: 5 additions & 5 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
apply plugin: 'com.android.application'

android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
compileSdkVersion 29
buildToolsVersion '29.0.2'

defaultConfig {
applicationId 'ru.meefik.linuxdeploy'
minSdkVersion 15
targetSdkVersion 28
versionCode 252
versionName "2.4.1"
targetSdkVersion 29
versionCode 253
versionName "2.5.0"
}
buildTypes {
release {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,9 @@
android:name=".App"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/DarkTheme"
android:supportsRtl="true"
android:requestLegacyExternalStorage="true"
android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning">
<activity
Expand Down
Binary file modified app/src/main/assets/bin/arm/busybox
Binary file not shown.
Binary file removed app/src/main/assets/bin/arm/proot
Binary file not shown.
Binary file removed app/src/main/assets/bin/arm_64/busybox
Binary file not shown.
Binary file removed app/src/main/assets/bin/arm_64/proot
Binary file not shown.
Binary file modified app/src/main/assets/bin/x86/busybox
Binary file not shown.
Binary file removed app/src/main/assets/bin/x86/proot
Binary file not shown.
Binary file removed app/src/main/assets/bin/x86_64/proot
Binary file not shown.
43 changes: 1 addition & 42 deletions app/src/main/java/ru/meefik/linuxdeploy/EnvUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -386,10 +386,6 @@ static boolean updateEnv(final Context c) {
// update profile.conf
if (!PrefStore.getPropertiesConfFile(c).exists()) PrefStore.dumpProperties(c);

if (PrefStore.isCliSymlink(c)) {
if (!EnvUtils.makeSymlink(c)) return false;
}

// update version
if (!setVersion(c)) return false;

Expand Down Expand Up @@ -424,38 +420,6 @@ private static boolean makeMainScript(Context c) {
return result;
}

/**
* Make symlink on linuxdeploy script in /system/bin
*
* @param c context
* @return true if success
*/
private static boolean makeSymlink(Context c) {
List<String> params = new ArrayList<>();
params.add("{ rm -f /system/bin/linuxdeploy; ln -s "
+ PrefStore.getBinDir(c)
+ "/linuxdeploy /system/bin/linuxdeploy; } 2>/dev/null || "
+ "{ mount -o rw,remount /system; rm -f /system/bin/linuxdeploy; ln -s "
+ PrefStore.getBinDir(c)
+ "/linuxdeploy /system/bin/linuxdeploy; mount -o ro,remount /system; }");
return exec(c, "su", params);
}

/**
* Remove symlink on linuxdeploy script from /system/bin
*
* @param c context
* @return true if success
*/
private static boolean removeSymlink(Context c) {
List<String> params = new ArrayList<>();
params.add("if [ -e /system/bin/linuxdeploy ]; then "
+ "rm -f /system/bin/linuxdeploy 2>/dev/null || "
+ "{ mount -o rw,remount /system; rm -f /system/bin/linuxdeploy; mount -o ro,remount /system; };"
+ "fi");
return exec(c, "su", params);
}

/**
* Remove operating environment
*
Expand All @@ -466,10 +430,6 @@ static boolean removeEnv(Context c) {
// stop services
execServices(c, new String[]{"telnetd", "httpd"}, "stop");

// remove symlink
File ldSymlink = new File("/system/bin/linuxdeploy");
if (ldSymlink.exists()) removeSymlink(c);

// clean env directory
File envDir = new File(PrefStore.getEnvDir(c));
cleanDirectory(envDir);
Expand All @@ -495,8 +455,7 @@ public static boolean cli(Context c, String cmd, String args) {
params.add("printf '>>> " + cmd + "\n'");
params.add(PrefStore.getBinDir(c) + "/linuxdeploy " + opts + cmd + args);
params.add("printf '<<< " + cmd + "\n'");
String shell = PrefStore.isRootRequired(c) ? "su" : "sh";
return exec(c, shell, params);
return exec(c, "su", params);
}

/**
Expand Down
29 changes: 7 additions & 22 deletions app/src/main/java/ru/meefik/linuxdeploy/PrefStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import android.content.Intent;
import android.content.res.Configuration;
import android.graphics.Point;
import android.os.Environment;
import android.text.TextUtils;
import android.view.Display;
import android.view.WindowManager;
Expand Down Expand Up @@ -155,15 +156,6 @@ static String getPropertiesSharedName() {
return PropertiesStore.name;
}

/**
* Check root is required for current profile
*
* @return true if required
*/
static boolean isRootRequired(Context c) {
return PROPERTIES.get(c, "method").equals("chroot");
}

/**
* Get language code
*
Expand Down Expand Up @@ -302,9 +294,12 @@ static Boolean isLogger(Context c) {
* @return path
*/
static String getLogFile(Context c) {
String logfile = SETTINGS.get(c, "logfile");
if (!logfile.contains("/")) logfile = getEnvDir(c) + "/" + logfile;
return logfile;
String logFile = SETTINGS.get(c, "logfile");
if (!logFile.contains("/")) {
String storageDir = Environment.getExternalStorageDirectory().getAbsolutePath();
logFile = storageDir + "/" + logFile;
}
return logFile;
}

/**
Expand Down Expand Up @@ -449,16 +444,6 @@ static void setRepositoryUrl(Context c, String url) {
SETTINGS.set(c, "repository_url", url);
}

/**
* CLI symlink is enabled
*
* @param c context
* @return true if enabled
*/
static Boolean isCliSymlink(Context c) {
return SETTINGS.get(c, "is_cli").equals("true");
}

/**
* Telnet is enabled
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceGroup;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;
import android.view.MenuItem;

Expand All @@ -20,10 +19,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
PrefStore.setLocale(this);

getSupportActionBar().setDisplayHomeAsUpEnabled(true);

PreferenceManager prefMgr = getPreferenceManager();
prefMgr.setSharedPreferencesName(PrefStore.getPropertiesSharedName());
getPreferenceManager().setSharedPreferencesName(PrefStore.getPropertiesSharedName());

// Restore from conf file if open from main activity
if (getIntent().getBooleanExtra("restore", false)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class PropertiesStore extends ParamUtils {

public static final String name = "properties_conf";
private static final String[] params = {"method", "distrib", "arch", "suite", "source_path",
private static final String[] params = {"distrib", "arch", "suite", "source_path",
"target_type", "target_path", "disk_size", "fs_type", "user_name", "user_password",
"privileged_users", "locale", "dns", "net_trigger", "power_trigger", "init", "init_path", "init_level",
"init_user", "init_async", "ssh_port", "ssh_args", "pulse_host", "pulse_port", "graphics",
Expand Down
9 changes: 6 additions & 3 deletions app/src/main/java/ru/meefik/linuxdeploy/SettingsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
import android.preference.ListPreference;
import android.preference.Preference;
import android.preference.PreferenceGroup;
import android.preference.PreferenceManager;
import android.preference.PreferenceScreen;

import androidx.appcompat.app.AlertDialog;
Expand All @@ -28,8 +27,7 @@ protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
PrefStore.setLocale(this);

PreferenceManager prefMgr = getPreferenceManager();
prefMgr.setSharedPreferencesName(PrefStore.getSettingsSharedName());
getPreferenceManager().setSharedPreferencesName(PrefStore.getSettingsSharedName());

// Restore from conf file
PrefStore.restoreSettings(this);
Expand Down Expand Up @@ -151,6 +149,11 @@ private void setSummary(Preference pref, boolean init) {
editPref.setText(PrefStore.getHttpConf(this));
pref.setSummary(editPref.getText());
}

if (editPref.getKey().equals("logfile") && !init) {
editPref.setText(PrefStore.getLogFile(this));
pref.setSummary(editPref.getText());
}
}

if (pref instanceof ListPreference) {
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
<string name="summary_debug_mode_preference">Sehe die Debugging Information</string>
<string name="summary_disk_size_preference">Automatische Berechnung</string>
<string name="summary_gui_properties_preference">Ändern der Einstellungen für das Grafik-Subsystem</string>
<string name="summary_is_cli_preference">Set up a command line interface</string>
<string name="title_x11_display_preference">Bildschirm</string>
<string name="title_x11_host_preference">X Server Addrese</string>
<string name="title_x11_sdl_preference">XServer XSDL</string>
Expand Down Expand Up @@ -114,15 +113,13 @@
<string name="title_mounts_editor_preference">Mount Punkte</string>
<string name="title_ssh_port_preference">Port</string>
<string name="title_ssh_properties_preference">SSH Einstellungen</string>
<string name="title_is_cli_preference">Aktivieren CLI</string>
<string name="title_arch_preference">Architekture</string>
<string name="title_dns_preference">DNS Server</string>
<string name="title_source_path_preference">Quellpfad</string>
<string name="summary_x11_sdl_preference">Automatically open XServer XSDL</string>
<string name="summary_trace_mode_preference">Aktiviere Trance-Modus</string>
<string name="summary_ssh_properties_preference">SSH Server Einstellungen ändern</string>
<string name="summary_is_ssh_preference">Erlauben das der SSH Server hochfährt</string>
<string name="summary_nettrack_preference"></string>
<string name="summary_mounts_editor_preference">Bearbeite die Mountliste</string>
<string name="summary_dns_preference">Automatische Erkennung</string>
<string name="summary_is_mounts_preference">Erlaube das mount der Android resources</string>
Expand Down
3 changes: 0 additions & 3 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,10 @@
<string name="title_mounts_editor_preference">Puntos de montaje</string>
<string name="title_ssh_port_preference">Puerto</string>
<string name="title_ssh_properties_preference">Configuración SSH</string>
<string name="title_is_cli_preference">Habilitar CLI</string>
<string name="title_arch_preference">Arquitectura</string>
<string name="title_dns_preference">Servidor DNS</string>
<string name="title_source_path_preference">Ruta de origen</string>
<string name="summary_x11_sdl_preference">Abrir automáticamente XServer XSDL</string>
<string name="summary_is_cli_preference">Set up a command line interface</string>
<string name="summary_trace_mode_preference">Habilitar modo seguimiento</string>
<string name="summary_ssh_properties_preference">Cambiar la configuración del servidor SSH</string>
<string name="summary_is_ssh_preference">Permitir ejecutar servidor SSH</string>
Expand All @@ -134,7 +132,6 @@
<string name="dialog_title_user_name_preference">Nombre usuario</string>
<string name="dialog_title_user_password_preference">Contraseña de usuario</string>
<string name="dialog_title_target_path_preference">Ruta instalación</string>
<string name="dialog_title_ssh_options_preference"></string>
<string name="dialog_title_ssh_port_preference">SSH: puerto</string>
<string name="dialog_title_fs_type_preference">Sistema de archivo</string>
<string name="dialog_title_graphics_preference">Gráficos subsistema</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,10 @@
<string name="title_mounts_editor_preference">Points de montage</string>
<string name="title_ssh_port_preference">Port</string>
<string name="title_ssh_properties_preference">Paramètres SSH</string>
<string name="title_is_cli_preference">Activer CLI</string>
<string name="title_arch_preference">Architecture</string>
<string name="title_dns_preference">Serveur DNS</string>
<string name="title_source_path_preference">Chemin source</string>
<string name="summary_x11_sdl_preference">Ouvrir automatiquement XServer XSDL</string>
<string name="summary_is_cli_preference">Set up a command line interface</string>
<string name="summary_trace_mode_preference">Active le mode de suivi</string>
<string name="summary_ssh_properties_preference">Changer les paramètres du serveur SSH</string>
<string name="summary_is_ssh_preference">Autoriser le démarrage du serveur SSH</string>
Expand Down
6 changes: 0 additions & 6 deletions app/src/main/res/values-in/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@
<string name="title_server_url_preference">"URL server"</string>
<string name="dialog_title_server_url_preference">"URL server"</string>

<string name="title_is_cli_preference">"Aktifkan CLI"</string>
<string name="summary_is_cli_preference">"Siapkan antarmuka baris perintah"</string>

<string name="title_installenv_preference">"Perbarui ENV"</string>
<string name="summary_installenv_preference">"Perbarui lingkungan pengoperasian"</string>
<string name="message_installenv_confirm_dialog">"Update lingkungan operasi?"</string>
Expand Down Expand Up @@ -143,9 +140,6 @@
<string name="title_export_dialog">"Ekspor"</string>

<string name="bootstrap_preferences">"BOOTSTRAP"</string>
<!-- METHOD -->
<string name="title_method_preference">"Metode kontainerisasi"</string>
<string name="dialog_title_method_preference">"Metode kontainerisasi"</string>
<!-- DISTRIB -->
<string name="title_distrib_preference">"Distribusi"</string>
<string name="dialog_title_distrib_preference">"Distribusi"</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,10 @@
<string name="title_mounts_editor_preference">Punti di montaggio</string>
<string name="title_ssh_port_preference">Porta</string>
<string name="title_ssh_properties_preference">Impostazioni SSH</string>
<string name="title_is_cli_preference">Permettere CLI</string>
<string name="title_arch_preference">Architettura</string>
<string name="title_dns_preference">Server DNS</string>
<string name="title_source_path_preference">Percorso di origine</string>
<string name="summary_x11_sdl_preference">Aprire automaticamente XServer XSDL</string>
<string name="summary_is_cli_preference">Set up a command line interface</string>
<string name="summary_trace_mode_preference">Abilità modalità di tracciamento</string>
<string name="summary_ssh_properties_preference">Modifica impostazioni server SSH</string>
<string name="summary_is_ssh_preference">Permetti l\'avvio del server SSH</string>
Expand Down
6 changes: 0 additions & 6 deletions app/src/main/res/values-ko/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,6 @@
<string name="title_server_url_preference">서버 URL</string>
<string name="dialog_title_server_url_preference">서버 URL</string>

<string name="title_is_cli_preference">CLI 활성화</string>
<string name="summary_is_cli_preference">명령 줄 인터페이스를 설정합니다.</string>

<string name="title_installenv_preference">ENV 업데이트</string>
<string name="summary_installenv_preference">운영체제 환경 업데이트</string>
<string name="message_installenv_confirm_dialog">운영체제 환경을 업데이트 하시겠습니까?</string>
Expand Down Expand Up @@ -137,9 +134,6 @@
<string name="title_export_dialog">내보내기</string>

<string name="bootstrap_preferences">부트스트랩</string>
<!-- METHOD -->
<string name="title_method_preference">컨테이너화 방식</string>
<string name="dialog_title_method_preference">컨테이너화 방식</string>
<!-- DISTRIB -->
<string name="title_distrib_preference">배포</string>
<string name="dialog_title_distrib_preference">배포</string>
Expand Down
2 changes: 0 additions & 2 deletions app/src/main/res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@
<string name="env_preferences">Środowisko operacyjne</string>
<string name="title_path_preference">Katalog BusyBox</string>
<string name="dialog_title_path_preference">PATH</string>
<string name="title_is_cli_preference">Włącz CLI</string>
<string name="summary_is_cli_preference">Ustaw interfejs wiersza poleceń</string>
<string name="title_installenv_preference">Zaktualizuj ENV</string>
<string name="summary_installenv_preference">Zaktualizuj środowisko operacyjne</string>
<string name="message_installenv_confirm_dialog">Zaktualizować środowisko operacyjne?</string>
Expand Down
4 changes: 1 addition & 3 deletions app/src/main/res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@
<string name="summary_timestamp_preference">Mostrar timestamp</string>
<string name="title_appicon_preference">Mostrar ícone</string>
<string name="summary_appicon_preference">Mostrar ícone na barra de notificação</string>
<string name="title_autostart_preference">Inicio automático</string>
<string name="title_autostart_preference">Início automático</string>
<string name="summary_autostart_preference">Executar automaticamente o GNU/Linux ao iniciar o Android</string>
<string name="env_preferences">Ambiente de operação</string>
<string name="title_path_preference">Diretório do BusyBox</string>
<string name="dialog_title_path_preference">Diretório do BusyBox</string>
<string name="title_is_cli_preference">Usar CLI</string>
<string name="summary_is_cli_preference">Configurar a interface de linha de comando</string>
<string name="title_installenv_preference">Atualizar ENV</string>
<string name="summary_installenv_preference">Atualizar ambiente de operação</string>
<string name="message_installenv_confirm_dialog">Atualizar ambiente de operação?</string>
Expand Down
Loading

0 comments on commit 1cf6f0b

Please sign in to comment.