diff --git a/AndroidManifest.xml b/AndroidManifest.xml index fa55a6e7..ec15ee63 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="191" + android:versionName="1.5.6" > "${CHROOT_DIR}/etc/apt/apt.conf.d/00no-drop-privs" ;; archlinux) if [ "${platform}" = "intel" ] diff --git a/assets/all/share/debootstrap/scripts/moto b/assets/all/share/debootstrap/scripts/kali-rolling similarity index 100% rename from assets/all/share/debootstrap/scripts/moto rename to assets/all/share/debootstrap/scripts/kali-rolling diff --git a/res/values-de/arrays.xml b/res/values-de/arrays.xml index 330191f6..f025640e 100644 --- a/res/values-de/arrays.xml +++ b/res/values-de/arrays.xml @@ -10,6 +10,7 @@ Partition Verzeichnis RAM + Auto Auto diff --git a/res/values-es/arrays.xml b/res/values-es/arrays.xml index ba3b448d..2a63eec5 100644 --- a/res/values-es/arrays.xml +++ b/res/values-es/arrays.xml @@ -10,6 +10,7 @@ Partición Directorio RAM + Auto Auto diff --git a/res/values-fr/arrays.xml b/res/values-fr/arrays.xml index dee0b929..7951ac9d 100644 --- a/res/values-fr/arrays.xml +++ b/res/values-fr/arrays.xml @@ -10,6 +10,7 @@ Partition Répertoire RAM + Automatique Automatique diff --git a/res/values-it/arrays.xml b/res/values-it/arrays.xml index 0ea86bde..5c987918 100644 --- a/res/values-it/arrays.xml +++ b/res/values-it/arrays.xml @@ -10,6 +10,7 @@ Partizione Direttorio RAM + Auto Auto diff --git a/res/values-ko/arrays.xml b/res/values-ko/arrays.xml index a1d12e29..634defd9 100644 --- a/res/values-ko/arrays.xml +++ b/res/values-ko/arrays.xml @@ -10,6 +10,7 @@ Partition Directory RAM + Auto Auto diff --git a/res/values-pl/arrays.xml b/res/values-pl/arrays.xml index 881b919b..6e939005 100644 --- a/res/values-pl/arrays.xml +++ b/res/values-pl/arrays.xml @@ -10,6 +10,7 @@ Partycja Katalog RAM + Automatyczny Automatyczny diff --git a/res/values-pt/arrays.xml b/res/values-pt/arrays.xml index ac1a37ef..e9131acf 100644 --- a/res/values-pt/arrays.xml +++ b/res/values-pt/arrays.xml @@ -10,6 +10,7 @@ Partição Diretório RAM + Automático Automático diff --git a/res/values-ru/arrays.xml b/res/values-ru/arrays.xml index c2a25d22..7a23ec92 100644 --- a/res/values-ru/arrays.xml +++ b/res/values-ru/arrays.xml @@ -10,6 +10,7 @@ Раздел Директория Оперативная память + Автоопределение Автоопределение diff --git a/res/values-sk/arrays.xml b/res/values-sk/arrays.xml index 8e7baa14..09eeff91 100644 --- a/res/values-sk/arrays.xml +++ b/res/values-sk/arrays.xml @@ -10,6 +10,7 @@ Na oddiel Adresár Do pamäte RAM + Automatický Automatický diff --git a/res/values-vi/arrays.xml b/res/values-vi/arrays.xml index 3df2ea70..0137268c 100644 --- a/res/values-vi/arrays.xml +++ b/res/values-vi/arrays.xml @@ -10,6 +10,7 @@ Phân vùng Thư mục RAM + Tự động Tự động diff --git a/res/values-zh/arrays.xml b/res/values-zh/arrays.xml index 6f027f79..1361db9a 100644 --- a/res/values-zh/arrays.xml +++ b/res/values-zh/arrays.xml @@ -10,6 +10,7 @@ 分区 目录 RAM + 自动 自动 diff --git a/res/values/arrays.xml b/res/values/arrays.xml index 5583f650..030f6827 100644 --- a/res/values/arrays.xml +++ b/res/values/arrays.xml @@ -42,12 +42,14 @@ partition directory ram + auto File Partition Directory RAM + Auto auto @@ -286,7 +288,6 @@ stable testing unstable - squeeze wheezy jessie stretch @@ -345,8 +346,8 @@ - moto sana + kali-rolling armel diff --git a/res/values/preferences.xml b/res/values/preferences.xml index 575426af..ad34111d 100644 --- a/res/values/preferences.xml +++ b/res/values/preferences.xml @@ -17,7 +17,7 @@ false false false - ${EXTERNAL_STORAGE}/linuxdeploy.log + ${EXTERNAL_STORAGE}/linuxdeploy_${TIMESTAMP}.log debian @string/debian_suite diff --git a/src/ru/meefik/linuxdeploy/ExecScript.java b/src/ru/meefik/linuxdeploy/ExecScript.java index 63ddec00..b3c7c837 100644 --- a/src/ru/meefik/linuxdeploy/ExecScript.java +++ b/src/ru/meefik/linuxdeploy/ExecScript.java @@ -10,6 +10,7 @@ public class ExecScript extends Thread { public ExecScript(Context c, String arg) { this.c = c; this.arg = arg; + Logger.setLogFile(c); } @Override diff --git a/src/ru/meefik/linuxdeploy/Logger.java b/src/ru/meefik/linuxdeploy/Logger.java index a213f8bf..750f5f22 100644 --- a/src/ru/meefik/linuxdeploy/Logger.java +++ b/src/ru/meefik/linuxdeploy/Logger.java @@ -1,7 +1,5 @@ package ru.meefik.linuxdeploy; -import android.content.Context; - import java.io.BufferedReader; import java.io.FileOutputStream; import java.io.IOException; @@ -13,11 +11,14 @@ import java.util.List; import java.util.Locale; +import android.content.Context; + public class Logger { private static volatile List protocol = new ArrayList<>(); private static boolean fragment = false; - + private static String logFile; + /** * Generate timestamp * @@ -78,8 +79,9 @@ private static synchronized void appendMessage(final Context c, private static void saveToFile(Context c, String msg) { byte[] data = msg.getBytes(); FileOutputStream fos = null; + if (logFile == null) logFile = PrefStore.getLogFile(c); try { - fos = new FileOutputStream(PrefStore.getLogFile(c), true); + fos = new FileOutputStream(logFile, true); fos.write(data); fos.flush(); } catch (Exception e) { @@ -94,6 +96,16 @@ private static void saveToFile(Context c, String msg) { } } } + + /** + * Set log filename + * + * @param c context + */ + public static void setLogFile(Context c) { + long timestamp = System.currentTimeMillis() / 1000; + logFile = PrefStore.getLogFile(c).replace("${TIMESTAMP}", String.valueOf(timestamp)); + } /** * Clear protocol diff --git a/src/ru/meefik/linuxdeploy/PrefStore.java b/src/ru/meefik/linuxdeploy/PrefStore.java index dddc6582..429ad016 100644 --- a/src/ru/meefik/linuxdeploy/PrefStore.java +++ b/src/ru/meefik/linuxdeploy/PrefStore.java @@ -97,7 +97,7 @@ public static String getStorage() { public static String getEnvDir(Context c) { return c.getFilesDir().getAbsolutePath(); } - + /** * Get language code * diff --git a/src/ru/meefik/linuxdeploy/PropertiesActivity.java b/src/ru/meefik/linuxdeploy/PropertiesActivity.java index 663be6f0..1f20bac3 100644 --- a/src/ru/meefik/linuxdeploy/PropertiesActivity.java +++ b/src/ru/meefik/linuxdeploy/PropertiesActivity.java @@ -407,10 +407,14 @@ private void setSummary(Preference pref, boolean init) { disksize.setEnabled(true); fstype.setEnabled(false); break; + case "directory": + if (init) { + diskimage.setText(PrefStore.getValues(this, R.string.targetpath_directory)); + } + disksize.setEnabled(false); + fstype.setEnabled(false); + break; default: - if (init) { - diskimage.setText(PrefStore.getValues(this, R.string.targetpath_directory)); - } disksize.setEnabled(false); fstype.setEnabled(false); }