termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
36.38k stars 3.82k forks source link

[Bug]: TERMUX BOOTSTARP ERROR IN ANDROID 10 #4252

Open SUNNYYTGMR opened 2 days ago

SUNNYYTGMR commented 2 days ago

Problem description

Termux BOOTSTARP error in my phone INFINIX x680d Earlier I did not face this problem, I reinstalled the app and I am facing this problem PLEASE DO something'

Steps to reproduce the behavior.

Report Info

User Action: crash report
Sender: TermuxInstaller
Report Timestamp: 2024-11-10 12:20:07.085 UTC

Termux Bootstrap Error

(-1) Termux Bootstrap Second Stage Command:
Previous State: `Executing`
Current State: `Failed`

Stdout: -
Stderr: -
Exit Code: -

Error Code: `2`
Error Message:

Failed to execute "(-1) Termux Bootstrap Second Stage Command" app shell command


StackTraces:

java.io.IOException: Cannot run program "/data/data/com.termux/files/usr/etc/termux/bootstrap/termux-bootstrap-second-stage.sh" (in directory "/data/data/com.termux/files/home"): error=13, Permission denied at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050) at java.lang.Runtime.exec(Runtime.java:698) at com.termux.shared.shell.command.runner.app.AppShell.execute(AppShell.java:131) at com.termux.app.TermuxInstaller$1.run(TermuxInstaller.java:231) Caused by: java.io.IOException: error=13, Permission denied at java.lang.UNIXProcess.forkAndExec(Native Method) at java.lang.UNIXProcess.(UNIXProcess.java:133) at java.lang.ProcessImpl.start(ProcessImpl.java:141) at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029) ... 3 more

Termux Files Info

TERMUX_REQUIRED_FILES_DIR_PATH ($PREFIX): /data/data/com.termux/files
ANDROID_ASSIGNED_FILES_DIR_PATH: /data/user/0/com.termux/files

$ echo 'ls info:'
/system/bin/ls -lhdZ '/data/data' '/data/user/0' '/data/data/com.termux' '/data/user/0/com.termux' '/data/data/com.termux/files' '/data/user/0/com.termux/files' '/data/user/0/com.termux/files' '/data/user/com.termux/files' '/data/data/com.termux/files/usr-staging' '/data/data/com.termux/files/usr' '/data/data/com.termux/files/home' '/data/data/com.termux/files/usr/bin/login' 2>&1
echo; echo 'mount info:'
/system/bin/grep -E '( /data )|( /data/data )|( /data/user/[0-9]+ )' /proc/self/mountinfo 2>&1 | /system/bin/grep -v '/data_mirror' 2>&1

ls info:
ls: /data/user/com.termux/files: No such file or directory
ls: /data/data/com.termux/files/usr-staging: No such file or directory
ls: /data/data/com.termux/files/usr: No such file or directory
ls: /data/data/com.termux/files/usr/bin/login: No such file or directory
drwxrwx--x 273 system  system  u:object_r:system_data_file:s0                   24K 2024-11-10 17:41 /data/data
drwx------   6 u0_a997 u0_a997 u:object_r:app_data_file:s0:c229,c259,c512,c768 3.4K 2024-11-10 17:41 /data/data/com.termux
drwxrwx--x   3 u0_a997 u0_a997 u:object_r:app_data_file:s0:c229,c259,c512,c768 3.4K 2024-11-10 17:50 /data/data/com.termux/files
drwx------   2 u0_a997 u0_a997 u:object_r:app_data_file:s0:c229,c259,c512,c768 3.4K 2024-11-10 17:41 /data/data/com.termux/files/home
lrwxrwxrwx   1 root    root    u:object_r:system_data_file:s0                    10 2023-05-25 19:11 /data/user/0 -> /data/data
drwx------   6 u0_a997 u0_a997 u:object_r:app_data_file:s0:c229,c259,c512,c768 3.4K 2024-11-10 17:41 /data/user/0/com.termux
drwxrwx--x   3 u0_a997 u0_a997 u:object_r:app_data_file:s0:c229,c259,c512,c768 3.4K 2024-11-10 17:50 /data/user/0/com.termux/files
drwxrwx--x   3 u0_a997 u0_a997 u:object_r:app_data_file:s0:c229,c259,c512,c768 3.4K 2024-11-10 17:50 /data/user/0/com.termux/files

mount info:
1035 985 259:7 / /data rw,nosuid,nodev,noatime master:22 - f2fs /dev/block/platform/bootdevice/by-name/userdata rw,lazytime,seclabel,background_gc=on,discard,no_heap,user_xattr,inline_xattr,acl,inline_data,inline_dentry,extent_cache,mode=adaptive,active_logs=6,reserve_root=12424,resuid=0,resgid=1065,alloc_mode=default,fsync_mode=posix

Logcat Dump

$ /system/bin/logcat -d -t 3000 2>&1
--------- beginning of main
11-10 17:49:59.220  7940  7940 E com.termux: Not starting debugger since process cannot load the jdwp agent.
11-10 17:49:59.714  7940  7940 I LoadedApk: No resource references to update in package com.transsion.theme.icon
11-10 17:49:59.754  7940  7940 W Termux.SharedProperties: Not loading properties since file is null
11-10 17:49:59.761  7940  7940 I Termux.TermuxApplication: Termux files directory is accessible
11-10 17:49:59.892  7940  7940 W Termux.SharedProperties: Not loading properties since file is null
11-10 17:50:00.126  7940  7940 I SurfaceFactory: [static] sSurfaceFactory = com.mediatek.view.impl.SurfaceFactoryImpl@612a35e
11-10 17:50:00.129  7940  7940 D TouchScreenHelper: --getInstance()
11-10 17:50:00.129  7940  7940 D TouchScreenHelper: --getInstance()  com.transsion.view.TouchScreenHelperImpl
11-10 17:50:00.129  7940  7940 I TouchScreenHelperImpl: constructed in com.termux
11-10 17:50:00.138  7940  7940 D ViewRootImpl[TermuxActivity]: hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
11-10 17:50:00.145  7940  7940 V PhoneWindow: DecorView setVisiblity: visibility = 0, Parent = android.view.ViewRootImpl@4e1976a, this = DecorView@62bf45b[TermuxActivity]
11-10 17:50:00.376  7940  7977 D CCodec  : allocate(c2.android.vorbis.decoder)
11-10 17:50:00.392  7940  7968 I GPUD    : @gpudInitialize: successfully initialized with GL, dbg=0 mmdump_dbg=0 mmpath_dbg=0
11-10 17:50:00.394  7940  7977 I Codec2Client: Available Codec2 services: "software"
11-10 17:50:00.394  7940  7977 I Codec2Client: Creating a Codec2 client to service "software"
11-10 17:50:00.407  7940  7977 I Codec2Client: Client to Codec2 service "software" created
11-10 17:50:00.488  7940  7968 D Surface : Surface::connect(this=0x92bd7000,api=1)
11-10 17:50:00.490  7940  7968 D Surface : Surface::setBufferCount(this=0x92bd7000,bufferCount=3)
11-10 17:50:00.492  7940  7968 D Surface : Surface::allocateBuffers(this=0x92bd7000)
11-10 17:50:00.582  7940  7968 W Gralloc3: mapper 3.x is not supported
11-10 17:50:00.585  7940  7968 E ion     : ioctl c0044901 failed with code -1: Invalid argument
11-10 17:50:00.618  7940  7977 I CCodec  : Created component [c2.android.vorbis.decoder]
11-10 17:50:00.618  7940  7977 D CCodecConfig: read media type: audio/vorbis
11-10 17:50:00.625  7940  7977 D ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.max-count.values
11-10 17:50:00.627  7940  7977 D ReflectedParamUpdater: extent() != 1 for single value type: output.subscribed-indices.values
11-10 17:50:00.627  7940  7940 I Termux.TermuxInstaller: The termux prefix directory "/data/data/com.termux/files/usr" exists but is empty or only contains specific unimportant files.
11-10 17:50:00.627  7940  7977 D ReflectedParamUpdater: extent() != 1 for single value type: input.buffers.allocator-ids.values
11-10 17:50:00.627  7940  7977 D ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.allocator-ids.values
11-10 17:50:00.628  7940  7977 D ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.allocator-ids.values
11-10 17:50:00.628  7940  7977 D ReflectedParamUpdater: extent() != 1 for single value type: output.buffers.pool-ids.values
11-10 17:50:00.628  7940  7977 D ReflectedParamUpdater: extent() != 1 for single value type: algo.buffers.pool-ids.values
11-10 17:50:00.631  7940  7977 I CCodecConfig: query failed after returning 7 values (BAD_INDEX)
11-10 17:50:00.631  7940  7977 D CCodecConfig: c2 config is Dict {
11-10 17:50:00.631  7940  7977 D CCodecConfig:   c2::u32 coded.bitrate.value = 64000
11-10 17:50:00.631  7940  7977 D CCodecConfig:   c2::u32 input.buffers.max-size.value = 32768
11-10 17:50:00.631  7940  7977 D CCodecConfig:   c2::u32 input.delay.value = 0
11-10 17:50:00.631  7940  7977 D CCodecConfig:   string input.media-type.value = "audio/vorbis"
11-10 17:50:00.631  7940  7977 D CCodecConfig:   string output.media-type.value = "audio/raw"
11-10 17:50:00.631  7940  7977 D CCodecConfig:   c2::u32 raw.channel-count.value = 1
11-10 17:50:00.631  7940  7977 D CCodecConfig:   c2::u32 raw.sample-rate.value = 48000
11-10 17:50:00.631  7940  7977 D CCodecConfig: }
11-10 17:50:00.632  7940  7977 D CCodecConfig: no c2 equivalents for durationUs
11-10 17:50:00.632  7940  7977 D CCodecConfig: no c2 equivalents for csd-1
11-10 17:50:00.632  7940  7977 D CCodecConfig: no c2 equivalents for track-id
11-10 17:50:00.632  7940  7977 D CCodecConfig: no c2 equivalents for channel-mask
11-10 17:50:00.633  7940  7977 D CCodecConfig: c2 config is Dict {
11-10 17:50:00.633  7940  7977 D CCodecConfig:   c2::u32 coded.bitrate.value = 64000
11-10 17:50:00.633  7940  7977 D CCodecConfig:   c2::u32 input.buffers.max-size.value = 32768
11-10 17:50:00.633  7940  7977 D CCodecConfig:   c2::u32 input.delay.value = 0
11-10 17:50:00.633  7940  7977 D CCodecConfig:   string input.media-type.value = "audio/vorbis"
11-10 17:50:00.633  7940  7977 D CCodecConfig:   string output.media-type.value = "audio/raw"
11-10 17:50:00.633  7940  7977 D CCodecConfig:   c2::u32 raw.channel-count.value = 1
11-10 17:50:00.633  7940  7977 D CCodecConfig:   c2::u32 raw.sample-rate.value = 44100
11-10 17:50:00.633  7940  7977 D CCodecConfig: }
11-10 17:50:00.634  7940  7977 W Codec2Client: query -- param skipped: index = 1107298332.
11-10 17:50:00.634  7940  7977 D CCodec  : setup formats input: AMessage(what = 0x00000000) = {
11-10 17:50:00.634  7940  7977 D CCodec  :   int32_t channel-count = 1
11-10 17:50:00.634  7940  7977 D CCodec  :   int32_t max-input-size = 32768
11-10 17:50:00.634  7940  7977 D CCodec  :   string mime = "audio/vorbis"
11-10 17:50:00.634  7940  7977 D CCodec  :   int32_t sample-rate = 44100
11-10 17:50:00.634  7940  7977 D CCodec  : } and output: AMessage(what = 0x00000000) = {
11-10 17:50:00.634  7940  7977 D CCodec  :   int32_t channel-count = 1
11-10 17:50:00.634  7940  7977 D CCodec  :   string mime = "audio/raw"
11-10 17:50:00.634  7940  7977 D CCodec  :   int32_t sample-rate = 44100
11-10 17:50:00.634  7940  7977 D CCodec  :   int32_t channel-mask = 1
11-10 17:50:00.634  7940  7977 D CCodec  : }
11-10 17:50:00.635  7940  7977 W Codec2Client: query -- param skipped: index = 1342179345.
11-10 17:50:00.635  7940  7977 W Codec2Client: query -- param skipped: index = 2415921170.
11-10 17:50:00.638  7940  7977 D CCodecBufferChannel: [c2.android.vorbis.decoder#395] Created input block pool with allocatorID 16 => poolID 17 - OK (0)
11-10 17:50:00.641  7940  7977 I CCodecBufferChannel: [c2.android.vorbis.decoder#395] Created output block pool with allocatorID 16 => poolID 352 - OK
11-10 17:50:00.642  7940  7977 D CCodecBufferChannel: [c2.android.vorbis.decoder#395] Configured output block pool ids 352 => OK
11-10 17:50:00.642  7940  7977 E ion     : ioctl c0044901 failed with code -1: Invalid argument
11-10 17:50:00.681  7940  7940 D ViewRootImpl[TermuxActivity]: hardware acceleration = true , fakeHwAccelerated = false, sRendererDisabled = false, forceHwAccelerated = false, sSystemRendererDisabled = false
11-10 17:50:00.686  7940  7940 I Choreographer: Skipped 30 frames!  The application may be doing too much work on its main thread.
11-10 17:50:00.686  7940  7990 I Termux.TermuxInstaller: Installing Termux bootstrap packages.
--------- beginning of system
11-10 17:50:00.687  7940  7980 D ActivityThread: topPackage=com.termux;topClass=.app.TermuxActivity;curtPackagecom.termux
11-10 17:50:00.707  7940  7968 D Surface : Surface::connect(this=0x89006000,api=1)
11-10 17:50:00.709  7940  7968 D Surface : Surface::setBufferCount(this=0x89006000,bufferCount=3)
11-10 17:50:00.709  7940  7968 D Surface : Surface::allocateBuffers(this=0x89006000)
11-10 17:50:00.737  7940  7990 I Termux.TermuxInstaller: Extracting bootstrap zip to prefix staging directory "/data/data/com.termux/files/usr-staging".
11-10 17:50:06.171  7940  7990 I Termux.TermuxInstaller: Moving termux prefix staging to prefix directory.
11-10 17:50:06.173  7940  7990 I Termux.TermuxInstaller: Running Termux bootstrap second stage.
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: Bootstrap Error:
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: ``````
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: (-1) Termux Bootstrap Second Stage Command:
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: Previous State: `Executing`
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: Current State: `Failed`
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: 
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: Stdout: -
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: Stderr: -
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: Exit Code: -
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: 
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: Error Code: `2`
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: Error Message:
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: ```
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: Failed to execute "(-1) Termux Bootstrap Second Stage Command" app shell command
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: ```
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: 
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: StackTraces:
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: ```
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: java.io.IOException: Cannot run program "/data/data/com.termux/files/usr/etc/termux/bootstrap/termux-bootstrap-second-stage.sh" (in directory "/data/data/com.termux/files/home"): error=13, Permission denied
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller:    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1050)
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller:    at java.lang.Runtime.exec(Runtime.java:698)
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller:    at com.termux.shared.shell.command.runner.app.AppShell.execute(AppShell.java:131)
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller:    at com.termux.app.TermuxInstaller$1.run(TermuxInstaller.java:231)
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: Caused by: java.io.IOException: error=13, Permission denied
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller:    at java.lang.UNIXProcess.forkAndExec(Native Method)
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller:    at java.lang.UNIXProcess.<init>(UNIXProcess.java:133)
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller:    at java.lang.ProcessImpl.start(ProcessImpl.java:141)
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller:    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1029)
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller:    ... 3 more
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: 
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: ```
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: 
11-10 17:50:06.684  7940  7990 E Termux.TermuxInstaller: ``````

Termux App Info

APP_NAME: Termux
PACKAGE_NAME: com.termux
VERSION_NAME: 0.119.0-beta.1
VERSION_CODE: 1020
UID: 10997
TARGET_SDK: 28
IS_DEBUGGABLE_BUILD: false
SE_PROCESS_CONTEXT: u:r:untrusted_app:s0:c229,c259,c512,c768
SE_FILE_CONTEXT: u:object_r:app_data_file:s0:c229,c259,c512,c768
SE_INFO: default:targetSdkVersion=10000:complete
TERMUX_APP_PACKAGE_MANAGER: APT
TERMUX_APP_PACKAGE_VARIANT: APT_ANDROID_7
APK_RELEASE: F-Droid
SIGNING_CERTIFICATE_SHA256_DIGEST: 228FB2CFE90831C1499EC3CCAF61E96E8E1CE70766B9474672CE427334D41C42

Termux:API App Info

APP_NAME: Termux:API
PACKAGE_NAME: com.termux.api
VERSION_NAME: 0.50.1
VERSION_CODE: 51
UID: 10997
TARGET_SDK: 28
IS_DEBUGGABLE_BUILD: false
APK_PATH: /mnt/expand/2bba05f2-82a0-486b-b989-d7a349c1acc4/app/com.termux.api-1QUk8jLwHJCmgecsGcMiwg==/base.apk
IS_INSTALLED_ON_EXTERNAL_STORAGE: true
SE_PROCESS_CONTEXT: u:r:untrusted_app:s0:c229,c259,c512,c768
SE_FILE_CONTEXT: u:object_r:app_data_file:s0:c229,c259,c512,c768
SE_INFO: default:targetSdkVersion=10000:complete
FILES_DIR: /mnt/expand/2bba05f2-82a0-486b-b989-d7a349c1acc4/user/0/com.termux.api/files
APK_RELEASE: F-Droid
SIGNING_CERTIFICATE_SHA256_DIGEST: 228FB2CFE90831C1499EC3CCAF61E96E8E1CE70766B9474672CE427334D41C42

Device Info

Software

OS_VERSION: 4.9.190+
SDK_INT: 29
RELEASE: 10
ID: QP1A.190711.020
DISPLAY: X680D-H6116J-Q-AS-220614V490
INCREMENTAL: J-AS-220614V490
SECURITY_PATCH: 2022-06-05
IS_DEBUGGABLE: 0
IS_TREBLE_ENABLED: true
TYPE: user
TAGS: release-keys

Hardware

MANUFACTURER: INFINIX MOBILITY LIMITED
BRAND: Infinix
MODEL: Infinix X680D
PRODUCT: X680D-IN
BOARD: Infinix-X680D
HARDWARE: mt6762
DEVICE: Infinix-X680D
SUPPORTED_ABIS: armeabi-v7a, armeabi

What is the expected behavior?

TERMUX BOOTSTARP ERROR

System information

twaik commented 2 days ago

Install the application to internal memory. Not to sdcard or expanded storage.

agnostic-apollo commented 2 days ago

Yeah, reinstall Termux:API on internal storage, but likely issue will be fixed by restarting phone as wrong security context is being assigned.