mirror of
https://github.com/fankes/termux-app.git
synced 2025-09-06 02:35:19 +08:00
The crash happens due to android 8.0 background restrictions if TermuxActivity is not in foreground/whitelist and attempts to start TermuxService. With this commit, the app will not crash but will just exit with a toast message. https://developer.android.com/about/versions/oreo/background#services https://cs.android.com/android/platform/superproject/+/android-12.0.0_r4:frameworks/base/services/core/java/com/android/server/am/ActiveServices.java;l=722 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.termux/com.termux.app.TermuxActivity}: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.termux/.app.TermuxService }: app is in background uid UidRecord{533ae62 u0a187 TPSL idle procs:1 seq(0,0,0)} at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2947) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3082) at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78) at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108) at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1832) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:201) at android.app.ActivityThread.main(ActivityThread.java:6821) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:547) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:873) Caused by: java.lang.IllegalStateException: Not allowed to start service Intent { cmp=com.termux/.app.TermuxService }: app is in background uid UidRecord{533ae62 u0a187 TPSL idle procs:1 seq(0,0,0)} at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1587) at android.app.ContextImpl.startService(ContextImpl.java:1542) at android.content.ContextWrapper.startService(ContextWrapper.java:674) at com.termux.app.TermuxActivity.onCreate(TermuxActivity.java:242) at android.app.Activity.performCreate(Activity.java:7224) at android.app.Activity.performCreate(Activity.java:7213) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1272) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2927) ... 11 more Closes #2552
227 lines
11 KiB
XML
227 lines
11 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
|
|
<!DOCTYPE resources [
|
|
<!ENTITY TERMUX_PACKAGE_NAME "com.termux">
|
|
<!ENTITY TERMUX_APP_NAME "Termux">
|
|
<!ENTITY TERMUX_API_APP_NAME "Termux:API">
|
|
<!ENTITY TERMUX_BOOT_APP_NAME "Termux:Boot">
|
|
<!ENTITY TERMUX_FLOAT_APP_NAME "Termux:Float">
|
|
<!ENTITY TERMUX_STYLING_APP_NAME "Termux:Styling">
|
|
<!ENTITY TERMUX_TASKER_APP_NAME "Termux:Tasker">
|
|
<!ENTITY TERMUX_WIDGET_APP_NAME "Termux:Widget">
|
|
]>
|
|
|
|
<resources>
|
|
|
|
<string name="application_name">&TERMUX_APP_NAME;</string>
|
|
<string name="shared_user_label">&TERMUX_APP_NAME; user</string>
|
|
|
|
|
|
|
|
<!-- Termux RUN_COMMAND permission -->
|
|
<string name="permission_run_command_label">Run commands in &TERMUX_APP_NAME; environment</string>
|
|
<string name="permission_run_command_description">execute arbitrary commands within &TERMUX_APP_NAME;
|
|
environment and access files</string>
|
|
|
|
|
|
|
|
<!-- Termux Bootstrap Packages Installation -->
|
|
<string name="bootstrap_installer_body">Installing bootstrap packages…</string>
|
|
<string name="bootstrap_error_title">Unable to install bootstrap</string>
|
|
<string name="bootstrap_error_body">&TERMUX_APP_NAME; was unable to install the bootstrap packages.</string>
|
|
<string name="bootstrap_error_abort">Abort</string>
|
|
<string name="bootstrap_error_try_again">Try again</string>
|
|
<string name="bootstrap_error_not_primary_user_message">&TERMUX_APP_NAME; can only be run as the primary user.
|
|
\nBootstrap binaries compiled for &TERMUX_APP_NAME; have hardcoded $PREFIX path and cannot be installed
|
|
under any path other than %1$s.</string>
|
|
|
|
|
|
|
|
<!-- Terminal Sidebar and Shortcuts -->
|
|
<string name="action_new_session">New session</string>
|
|
<string name="action_new_session_failsafe">Failsafe</string>
|
|
<string name="title_max_terminals_reached">Max terminals reached</string>
|
|
<string name="msg_max_terminals_reached">Close down existing ones before creating new.</string>
|
|
|
|
<string name="title_rename_session">Set session name</string>
|
|
<string name="action_rename_session_confirm">Set</string>
|
|
<string name="title_create_named_session">New named session</string>
|
|
<string name="action_create_named_session_confirm">Create</string>
|
|
|
|
<string name="action_toggle_soft_keyboard">Keyboard</string>
|
|
|
|
<string name="msg_enabling_terminal_toolbar">Enabling Terminal Toolbar</string>
|
|
<string name="msg_disabling_terminal_toolbar">Disabling Terminal Toolbar</string>
|
|
|
|
|
|
|
|
<!-- Terminal Popup -->
|
|
<string name="action_select_url">Select URL</string>
|
|
<string name="title_select_url_dialog">Click URL to copy or long press to open</string>
|
|
<string name="title_select_url_none_found">No URL found in the terminal.</string>
|
|
<string name="msg_select_url_copied_to_clipboard">URL copied to clipboard</string>
|
|
|
|
<string name="action_share_transcript">Share transcript</string>
|
|
<string name="title_share_transcript">Terminal transcript</string>
|
|
<string name="title_share_transcript_with">Send transcript to:</string>
|
|
|
|
<string name="action_autofill_password">Autofill password</string>
|
|
|
|
<string name="action_reset_terminal">Reset</string>
|
|
<string name="msg_terminal_reset">Terminal reset</string>
|
|
|
|
<string name="action_kill_process">Kill process (%d)</string>
|
|
<string name="title_confirm_kill_process">Really kill this session?</string>
|
|
|
|
<string name="action_style_terminal">Style</string>
|
|
<string name="action_toggle_keep_screen_on">Keep screen on</string>
|
|
<string name="action_open_help">Help</string>
|
|
<string name="action_open_settings">Settings</string>
|
|
|
|
<string name="action_report_issue">Report Issue</string>
|
|
<string name="msg_generating_report">Generating Report</string>
|
|
<string name="msg_add_termux_debug_info">Add termux debug info to report?</string>
|
|
|
|
<string name="error_styling_not_installed">The &TERMUX_STYLING_APP_NAME; Plugin App is not installed.</string>
|
|
<string name="action_styling_install">Install</string>
|
|
|
|
|
|
|
|
<!-- Termux Notifications -->
|
|
<string name="notification_action_exit">Exit</string>
|
|
<string name="notification_action_wake_lock">Acquire wakelock</string>
|
|
<string name="notification_action_wake_unlock">Release wakelock</string>
|
|
|
|
|
|
|
|
<!-- TermuxService -->
|
|
<string name="error_display_over_other_apps_permission_not_granted">&TERMUX_APP_NAME; requires
|
|
\"Display over other apps\" permission to start terminal sessions from background on Android >= 10.
|
|
Grants it from Settings -> Apps -> &TERMUX_APP_NAME; -> Advanced</string>
|
|
|
|
|
|
|
|
<!-- Termux RunCommandService -->
|
|
<string name="error_run_command_service_invalid_intent_action">Invalid intent action to RunCommandService: `%1$s`</string>
|
|
<string name="error_run_command_service_mandatory_extra_missing">Mandatory extra missing to RunCommandService: \"%1$s\"</string>
|
|
<string name="error_run_command_service_api_help">Visit %1$s for more info on RUN_COMMAND Intent usage.</string>
|
|
|
|
|
|
|
|
<!-- Termux File Receiver -->
|
|
<string name="title_file_received">Save file in ~/downloads/</string>
|
|
<string name="action_file_received_edit">Edit</string>
|
|
<string name="action_file_received_open_directory">Open directory</string>
|
|
|
|
|
|
|
|
<!-- Miscellaneous -->
|
|
<string name="error_allow_external_apps_ungranted">%1$s requires `allow-external-apps`
|
|
property to be set to `true` in `%2$s` file.</string>
|
|
<string name="error_termux_service_start_failed_general">Failed to start TermuxService. Check logcat for exception message.</string>
|
|
<string name="error_termux_service_start_failed_bg">Failed to start TermuxService while app is in background due to android bg restrictions.</string>
|
|
|
|
|
|
|
|
<!-- Termux Settings -->
|
|
<string name="title_activity_termux_settings">&TERMUX_APP_NAME; Settings</string>
|
|
|
|
<!-- Termux App Preferences -->
|
|
<string name="termux_preferences_title">&TERMUX_APP_NAME;</string>
|
|
<string name="termux_preferences_summary">Preferences for &TERMUX_APP_NAME; app</string>
|
|
|
|
<!-- Debugging Preferences -->
|
|
<string name="termux_debugging_preferences_title">Debugging</string>
|
|
<string name="termux_debugging_preferences_summary">Preferences for debugging</string>
|
|
|
|
<!-- Logging Category -->
|
|
<string name="termux_logging_header">Logging</string>
|
|
|
|
<!-- Log Level -->
|
|
<string name="termux_log_level_title">Log Level</string>
|
|
|
|
<!-- Terminal View Key Logging -->
|
|
<string name="termux_terminal_view_key_logging_enabled_title">Terminal View Key Logging</string>
|
|
<string name="termux_terminal_view_key_logging_enabled_off">Logs will not have entries for terminal view keys. (Default)</string>
|
|
<string name="termux_terminal_view_key_logging_enabled_on">Logcat logs will have entries for terminal view keys.
|
|
These are very verbose and should be disabled under normal circumstances or will cause performance issues.</string>
|
|
|
|
<!-- Plugin Error Notifications -->
|
|
<string name="termux_plugin_error_notifications_enabled_title">Plugin Error Notifications</string>
|
|
<string name="termux_plugin_error_notifications_enabled_off">Disable flashes and notifications for plugin errors.</string>
|
|
<string name="termux_plugin_error_notifications_enabled_on">Show flashes and notifications for plugin errors. (Default)</string>
|
|
|
|
<!-- Crash Report Notifications -->
|
|
<string name="termux_crash_report_notifications_enabled_title">Crash Report Notifications</string>
|
|
<string name="termux_crash_report_notifications_enabled_off">Disable notifications for crash reports.</string>
|
|
<string name="termux_crash_report_notifications_enabled_on">Show notifications for crash reports. (Default)</string>
|
|
|
|
|
|
<!-- Terminal IO Preferences -->
|
|
<string name="termux_terminal_io_preferences_title">Terminal I/O</string>
|
|
<string name="termux_terminal_io_preferences_summary">Preferences for terminal I/O</string>
|
|
|
|
<!-- Keyboard Category -->
|
|
<string name="termux_keyboard_header">Keyboard</string>
|
|
|
|
<!-- Soft Keyboard -->
|
|
<string name="termux_soft_keyboard_enabled_title">Soft Keyboard Enabled</string>
|
|
<string name="termux_soft_keyboard_enabled_off">Soft keyboard will be disabled.</string>
|
|
<string name="termux_soft_keyboard_enabled_on">Soft keyboard will be enabled. (Default)</string>
|
|
|
|
<!-- Soft Keyboard Only If No Hardware-->
|
|
<string name="termux_soft_keyboard_enabled_only_if_no_hardware_title">Soft Keyboard Only If No Hardware</string>
|
|
<string name="termux_soft_keyboard_enabled_only_if_no_hardware_off">Soft keyboard will be enabled even if
|
|
hardware keyboard is connected. (Default)</string>
|
|
<string name="termux_soft_keyboard_enabled_only_if_no_hardware_on">Soft keyboard will be enabled only if
|
|
no hardware keyboard is connected.</string>
|
|
|
|
|
|
<!-- Terminal View Preferences -->
|
|
<string name="termux_terminal_view_preferences_title">Terminal View</string>
|
|
<string name="termux_terminal_view_preferences_summary">Preferences for terminal view</string>
|
|
|
|
<!-- View Category -->
|
|
<string name="termux_terminal_view_view_header">View</string>
|
|
|
|
<!-- Terminal View Margin Adjustment -->
|
|
<string name="termux_terminal_view_terminal_margin_adjustment_title">Terminal Margin Adjustment</string>
|
|
<string name="termux_terminal_view_terminal_margin_adjustment_off">Terminal margin adjustment will be disabled.</string>
|
|
<string name="termux_terminal_view_terminal_margin_adjustment_on">Terminal margin adjustment will be enabled.
|
|
It should be enabled to try to fix the issue where soft keyboard covers part of extra keys/terminal view.
|
|
If it causes screen flickering on your devices, then disable it. (Default)</string>
|
|
|
|
|
|
|
|
<!-- Termux:API App Preferences -->
|
|
<string name="termux_api_preferences_title">&TERMUX_API_APP_NAME;</string>
|
|
<string name="termux_api_preferences_summary">Preferences for &TERMUX_API_APP_NAME; app</string>
|
|
|
|
|
|
|
|
<!-- Termux:Float App Preferences -->
|
|
<string name="termux_float_preferences_title">&TERMUX_FLOAT_APP_NAME;</string>
|
|
<string name="termux_float_preferences_summary">Preferences for &TERMUX_FLOAT_APP_NAME; app</string>
|
|
|
|
|
|
|
|
<!-- Termux:Tasker App Preferences -->
|
|
<string name="termux_tasker_preferences_title">&TERMUX_TASKER_APP_NAME;</string>
|
|
<string name="termux_tasker_preferences_summary">Preferences for &TERMUX_TASKER_APP_NAME; app</string>
|
|
|
|
|
|
|
|
<!-- Termux:Widget App Preferences -->
|
|
<string name="termux_widget_preferences_title">&TERMUX_WIDGET_APP_NAME;</string>
|
|
<string name="termux_widget_preferences_summary">Preferences for &TERMUX_WIDGET_APP_NAME; app</string>
|
|
|
|
|
|
|
|
<!-- About Preference -->
|
|
<string name="about_preference_title">About</string>
|
|
|
|
<!-- Donate Preference -->
|
|
<string name="donate_preference_title">Donate</string>
|
|
|
|
</resources>
|