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.99k stars 3.89k forks source link

Unable to install bootstrap #4077

Closed Velikiycho closed 4 months ago

Velikiycho commented 4 months ago

Problem description

Report Info

User Action: crash report
Sender: TermuxInstaller
Report Timestamp: 2024-08-02 19:37:57.595 UTC

Bootstrap Error

(150) FileUtils Error: The termux files directory not found at path "/data/data/com.termux/files". TERMUX_FILES_DIR: /data/data/com.termux/files

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/data/com.termux: Permission denied
ls: /data/user/0/com.termux: Permission denied
ls: /data/data/com.termux/files: Permission denied
ls: /data/user/0/com.termux/files: Permission denied
ls: /data/user/0/com.termux/files: Permission denied
ls: /data/user/com.termux/files: No such file or directory
ls: /data/data/com.termux/files/usr-staging: Permission denied
ls: /data/data/com.termux/files/usr: Permission denied
ls: /data/data/com.termux/files/home: Permission denied
ls: /data/data/com.termux/files/usr/bin/login: Permission denied
drwxrwx--x 247 system system u:object_r:system_data_file:s0:c512,c768  20K 2024-08-02 21:55 /data/data
drwxrwx--x 247 system system u:object_r:system_data_file:s0:c512,c768  20K 2024-08-02 21:55 /data/user/0

mount info:
4832 4153 252:6 / /data rw,nosuid,nodev,noatime master:34 - ext4 /dev/block/dm-6 rw,seclabel,nodelalloc,nobarrier,noauto_da_alloc,inlinecrypt,resuid=10010,resgid=1065,errors=panic,data=writeback
4833 4832 252:6 /data /data/user/0 rw,nosuid,nodev,noatime master:34 - ext4 /dev/block/dm-6 rw,seclabel,nodelalloc,nobarrier,noauto_da_alloc,inlinecrypt,resuid=10010,resgid=1065,errors=panic,data=writeback

Logcat Dump

$ /system/bin/logcat -d -t 3000 2>&1
--------- beginning of main
08-02 22:37:55.004  9540  9540 I libc    : SetHeapTaggingLevel: tag level set to 0
08-02 22:37:55.100  9540  9540 E com.termux: Not starting debugger since process cannot load the jdwp agent.
08-02 22:37:55.271  9540  9540 W com.termux: JIT profile information will not be recorded: profile file does not exist.
08-02 22:37:55.265  9540  9540 W com.termux: type=1400 audit(0.0:582710): avc: denied { getattr } for path="/data/user/0/com.termux" dev="dm-6" ino=91589 scontext=u:r:untrusted_app_27:s0:c192,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c184,c256,c512,c768 tclass=dir permissive=0 app=com.termux
08-02 22:37:55.265  9540  9540 W com.termux: type=1400 audit(0.0:582711): avc: denied { getattr } for path="/data/user/0/com.termux" dev="dm-6" ino=91589 scontext=u:r:untrusted_app_27:s0:c192,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c184,c256,c512,c768 tclass=dir permissive=0 app=com.termux
08-02 22:37:55.285  9540  9540 W ContextImpl: Failed to ensure /data/user/0/com.termux/cache: mkdir failed: EACCES (Permission denied)
08-02 22:37:55.286  9540  9540 W ContextImpl: Failed to update user.inode_cache: stat failed: EACCES (Permission denied)
08-02 22:37:55.292  9540  9540 W ContextImpl: Failed to ensure /data/user_de/0/com.termux/code_cache: mkdir failed: ENOENT (No such file or directory)
08-02 22:37:55.293  9540  9540 W ContextImpl: Failed to update user.inode_code_cache: stat failed: ENOENT (No such file or directory)
08-02 22:37:55.359  9540  9540 W ContextImpl: Failed to ensure /data/user/0/com.termux/shared_prefs: mkdir failed: EACCES (Permission denied)
08-02 22:37:55.376  9540  9540 W ContextImpl: Failed to ensure /data/user/0/com.termux/shared_prefs: mkdir failed: EACCES (Permission denied)
08-02 22:37:55.405  9540  9563 E QT      : [QT]file does not exist
08-02 22:37:55.415  9540  9540 W ContextImpl: Failed to ensure /data/user/0/com.termux/shared_prefs: mkdir failed: EACCES (Permission denied)
08-02 22:37:55.422  9540  9564 E Termux  : Failed to get file type for file at path "/data/data/com.termux/files/home/crash_log.md": Failed to run Os.lstat() on file at path "/data/data/com.termux/files/home/crash_log.md": lstat failed: EACCES (Permission denied)
08-02 22:37:55.439  9540  9565 W ContextImpl: Failed to ensure /data/user/0/com.termux/cache: mkdir failed: EACCES (Permission denied)
08-02 22:37:55.439  9540  9565 W ContextImpl: Failed to update user.inode_cache: stat failed: EACCES (Permission denied)
08-02 22:37:55.437  9540  9540 W Thread-3: type=1400 audit(0.0:582712): avc: denied { getattr } for path="/data/user/0/com.termux" dev="dm-6" ino=91589 scontext=u:r:untrusted_app_27:s0:c192,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c184,c256,c512,c768 tclass=dir permissive=0 app=com.termux
08-02 22:37:55.442  9540  9540 W Termux:SharedProperties: Not loading properties since file is null
08-02 22:37:55.442  9540  9565 E Termux  : Failed to get file type for file at path "/data/user/0/com.termux/cache/report_activity": Failed to run Os.lstat() on file at path "/data/user/0/com.termux/cache/report_activity": lstat failed: EACCES (Permission denied)
08-02 22:37:55.486  9540  9560 E SharedPreferencesImpl: Couldn't create directory for SharedPreferences file /data/user/0/com.termux/shared_prefs/com.termux_preferences.xml
08-02 22:37:56.040  9540  9540 W ContextImpl: Failed to ensure /data/user/0/com.termux/shared_prefs: mkdir failed: EACCES (Permission denied)
08-02 22:37:56.120  9540  9540 I SurfaceFactory: [static] sSurfaceFactory = com.mediatek.view.impl.SurfaceFactoryImpl@5fa014f
08-02 22:37:56.123  9540  9540 I MsyncFactory: [static] sMsyncFactory = com.mediatek.view.impl.MsyncFactoryImpl@9f2d0dc
08-02 22:37:56.163  9540  9598 I Codec2Client: Available Codec2 services: "default" "software"
08-02 22:37:56.167  9540  9598 I CCodec  : setting up 'default' as default (vendor) store
08-02 22:37:56.180  9540  9540 I PowerHalWrapper: PowerHalWrapper.getInstance 
08-02 22:37:56.181  9540  9598 I CCodec  : Created component [c2.android.vorbis.decoder]
08-02 22:37:56.198  9540  9598 I CCodecConfig: query failed after returning 7 values (BAD_INDEX)
08-02 22:37:56.208  9540  9598 W Codec2Client: query -- param skipped: index = 1107298332.
08-02 22:37:56.209  9540  9598 I CCodecConfig: query failed after returning 7 values (BAD_INDEX)
08-02 22:37:56.210  9540  9598 W Codec2Client: query -- param skipped: index = 1342179345.
08-02 22:37:56.210  9540  9598 W Codec2Client: query -- param skipped: index = 2415921170.
08-02 22:37:56.225  9540  9598 I CCodecBufferChannel: [c2.android.vorbis.decoder#475] Created output block pool with allocatorID 16 => poolID 98 - OK
08-02 22:37:56.227  9540  9598 E ion     : ioctl c0044901 failed with code -1: Invalid argument
08-02 22:37:56.288  9540  9540 I BufferQueueConsumer: [](id:254400000000,api:0,p:-1,c:9540) connect: controlledByApp=false
08-02 22:37:56.293  9540  9540 I BLASTBufferQueue: [ViewRootImpl[TermuxActivity]#0] constructor()
08-02 22:37:56.330  9540  9561 E OpenGLRenderer: EglManager::makeCurrent mED = 0x1, surface = 0x0, mEC = 0x739a7dff30, error = EGL_SUCCESS
08-02 22:37:56.343  9540  9561 I BufferQueueProducer: [ViewRootImpl[TermuxActivity]#0(BLAST Consumer)0](id:254400000000,api:1,p:9540,c:9540) connect: api=1 producerControlledByApp=true
08-02 22:37:56.363  9540  9561 E ion     : ioctl c0044901 failed with code -1: Invalid argument
08-02 22:37:56.366  9540  9617 I hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
08-02 22:37:56.452  9540  9561 E OpenGLRenderer: fbcNotifyFrameComplete error: undefined symbol: fbcNotifyFrameComplete
08-02 22:37:56.452  9540  9561 E OpenGLRenderer: fbcNotifyNoRender error: undefined symbol: fbcNotifyNoRender
08-02 22:37:56.472  9540  9540 W ContextImpl: Failed to ensure /data/user/0/com.termux/files: mkdir failed: EACCES (Permission denied)
08-02 22:37:56.472  9540  9540 E Termux  : Failed to get file type for file at path "/data/data/com.termux/files": Failed to run Os.stat() on file at path "/data/data/com.termux/files": stat failed: EACCES (Permission denied)
08-02 22:37:56.477  9540  9540 E Termux:TermuxInstaller: (150) FileUtils Error: The termux files directory not found at path "/data/data/com.termux/files".
08-02 22:37:56.477  9540  9540 E Termux:TermuxInstaller: TERMUX_FILES_DIR: `/data/data/com.termux/files`
08-02 22:37:56.477  9540  9540 W com.termux: type=1400 audit(0.0:582713): avc: denied { getattr } for path="/data/data/com.termux" dev="dm-6" ino=91589 scontext=u:r:untrusted_app_27:s0:c192,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c184,c256,c512,c768 tclass=dir permissive=0 app=com.termux
08-02 22:37:56.477  9540  9540 W com.termux: type=1400 audit(0.0:582714): avc: denied { getattr } for path="/data/data/com.termux" dev="dm-6" ino=91589 scontext=u:r:untrusted_app_27:s0:c192,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c184,c256,c512,c768 tclass=dir permissive=0 app=com.termux
08-02 22:37:56.479  9540  9540 W ContextImpl: Failed to ensure /data/user/0/com.termux/files: mkdir failed: EACCES (Permission denied)
08-02 22:37:56.689  9633  9633 W ls      : type=1400 audit(0.0:582715): avc: denied { getattr } for path="/data/data/com.termux" dev="dm-6" ino=91589 scontext=u:r:untrusted_app_27:s0:c192,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c184,c256,c512,c768 tclass=dir permissive=0 app=com.termux
08-02 22:37:56.689  9633  9633 W ls      : type=1400 audit(0.0:582716): avc: denied { getattr } for path="/data/user/0/com.termux" dev="dm-6" ino=91589 scontext=u:r:untrusted_app_27:s0:c192,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c184,c256,c512,c768 tclass=dir permissive=0 app=com.termux
08-02 22:37:56.805  9540  9540 W com.termux: type=1400 audit(0.0:582717): avc: denied { getattr } for path="/data/data/com.termux" dev="dm-6" ino=91589 scontext=u:r:untrusted_app_27:s0:c192,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c184,c256,c512,c768 tclass=dir permissive=0 app=com.termux
08-02 22:37:56.805  9540  9540 W com.termux: type=1400 audit(0.0:582718): avc: denied { getattr } for path="/data/data/com.termux" dev="dm-6" ino=91589 scontext=u:r:untrusted_app_27:s0:c192,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c184,c256,c512,c768 tclass=dir permissive=0 app=com.termux

Termux App Info

APP_NAME: Termux
PACKAGE_NAME: com.termux
VERSION_NAME: 0.118.0
VERSION_CODE: 118
TARGET_SDK: 28
IS_DEBUGGABLE_BUILD: false
TERMUX_FILES_DIR: /data/data/com.termux/files
IS_TERMUX_FILES_DIR_ACCESSIBLE: false - (150) FileUtils Error: The termux files directory not found at path "/data/data/com.termux/files".
APK_RELEASE: F-Droid
SIGNING_CERTIFICATE_SHA256_DIGEST: 228FB2CFE90831C1499EC3CCAF61E96E8E1CE70766B9474672CE427334D41C42

Device Info

Software

OS_VERSION: 4.19.191
SDK_INT: 31
RELEASE: 12
ID: SP1A.210812.016
DISPLAY: BV5300_S1_230506
INCREMENTAL: 1683376356
SECURITY_PATCH: 2023-04-05
IS_DEBUGGABLE: 0
IS_TREBLE_ENABLED: true
TYPE: user
TAGS: release-keys

Hardware

MANUFACTURER: Blackview
BRAND: Blackview
MODEL: BV5300
PRODUCT: BV5300_RU
BOARD: te105_dk_dk046_61_s0_ru
HARDWARE: mt6761
DEVICE: BV5300
SUPPORTED_ABIS: arm64-v8a, armeabi-v7a, armeabi

Steps to reproduce the behavior.

I reinstalled Termux and got this error

What is the expected behavior?

No response

System information

agnostic-apollo commented 4 months ago

Duplicate of #3167

W com.termux: type=1400 audit(0.0:582710): avc: denied { getattr } for path="/data/user/0/com.termux" dev="dm-6" ino=91589 scontext=u:r:untrusted_app_27:s0:c192,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c184,c256,c512,c768 tclass=dir permissive=0 app=com.termux