diff --git a/app/src/main/assets/ubuntu_setup/support/setup_rootfs.sh b/app/src/main/assets/ubuntu_setup/support/setup_rootfs.sh index a69e55f8f..be25220b8 100644 --- a/app/src/main/assets/ubuntu_setup/support/setup_rootfs.sh +++ b/app/src/main/assets/ubuntu_setup/support/setup_rootfs.sh @@ -4,21 +4,37 @@ # It is assumed that you are root user. # sudo -su - -export backup_dir_path="${APP_ROOT_PATH}/backup" \ +export backup_dir_path="${APP_ROOT_PATH}/ubuntu/backup/temp" \ ;export rootfsTarGz="rootfs.tar.gz" \ ; cd / \ -; sudo apt-get purge \ +; apt-get purge \ --auto-remove -y sudo \ -; tar -cvpzf ${rootfsTarGz} \ - --exclude=/${rootfsTarGz} \ - --exclude=/storage \ +;mkdir -p "${backup_dir_path}" \ +;tar \ + -cvpzf "${backup_dir_path}/${rootfsTarGz}" \ + --exclude=/sys \ + --exclude=/dev \ + --exclude=/proc \ + --exclude=/data \ + --exclude=/mnt \ --exclude=/host-rootfs \ + --exclude=/support \ + --exclude=/etc/mtab \ + --exclude=/storage \ + --exclude=/etc/profile.d/userland_profile.sh \ --one-file-system \ - / \ -; mkdir -p "${backup_dir_path}" \ -; cp -vf ${rootfsTarGz} \ - "${backup_dir_path}/" + / +# \ +# ; mkdir -p "${backup_dir_path}" \ +# ; cp -vf ${rootfsTarGz} \ +# "${backup_dir_path}/" +# tar -cvpzf ${rootfsTarGz} \ +# --exclude=/${rootfsTarGz} \ +# --exclude=/storage \ +# --exclude=/host-rootfs \ +# --one-file-system \ +# / # export rootfsTarGz="rootfs.tar.gz" \ # ; cd / \ diff --git a/app/src/main/java/com/puutaro/commandclick/fragment_lib/terminal_fragment/js_interface/JsUbuntu.kt b/app/src/main/java/com/puutaro/commandclick/fragment_lib/terminal_fragment/js_interface/JsUbuntu.kt index 42dee1a9f..b67e54f1f 100644 --- a/app/src/main/java/com/puutaro/commandclick/fragment_lib/terminal_fragment/js_interface/JsUbuntu.kt +++ b/app/src/main/java/com/puutaro/commandclick/fragment_lib/terminal_fragment/js_interface/JsUbuntu.kt @@ -30,9 +30,23 @@ class JsUbuntu( private val cmdTerminalUrl = "http://127.0.0.1:${UsePort.WEB_SSH_TERM_PORT}" @JavascriptInterface - fun execScript( + fun execScript( executeShellPath:String, tabSepaArgs: String = String(), + ): String { + return execScriptF( + executeShellPath, + tabSepaArgs, + 2000, + ) + } + + + @JavascriptInterface + fun execScriptF( + executeShellPath:String, + tabSepaArgs: String = String(), + timeMilisec: Int, ): String { if ( context == null @@ -50,7 +64,7 @@ class JsUbuntu( return Shell2Http.runCmd( executeShellPath, tabSepaArgs, - 2000, + timeMilisec, ) } diff --git a/app/src/main/java/com/puutaro/commandclick/proccess/ubuntu/UbuntuInfo.kt b/app/src/main/java/com/puutaro/commandclick/proccess/ubuntu/UbuntuInfo.kt index 543cffbda..3bf15e53f 100644 --- a/app/src/main/java/com/puutaro/commandclick/proccess/ubuntu/UbuntuInfo.kt +++ b/app/src/main/java/com/puutaro/commandclick/proccess/ubuntu/UbuntuInfo.kt @@ -6,16 +6,16 @@ import com.puutaro.commandclick.BuildConfig object UbuntuInfo { val user = "cmdclick" + private const val devFalseInRelease = false + private val createImageSwitchOffInRelease = CreateImageSwitch.off.name private val buildConfigDebug = BuildConfig.DEBUG // for development - private const val devFalseInRelease = false val onForDev = if( buildConfigDebug ) false else devFalseInRelease - private val createImageSwitchOffInRelease = CreateImageSwitch.off.name val createImageSwitch = if( buildConfigDebug ) CreateImageSwitch.off.name @@ -32,7 +32,7 @@ object UbuntuInfo { -> "https://partner-images.canonical.com/core/jammy/" + "current/ubuntu-jammy-core-cloudimg-arm64-root.tar.gz" else - -> "https://github.com/puutaro/CommandClick-Linux/releases/download/v1.1.1/rootfs.tar.gz" + -> "https://github.com/puutaro/CommandClick-Linux/releases/download/v1.1.2/rootfs.tar.gz" } }