olegos2 / mobox

3k stars 135 forks source link

Termux 150 error (not oppen input) #145

Open szerrahim opened 9 months ago

szerrahim commented 9 months ago

I deleted Termux on my phone and reinstalled it. When I tried to open it again, it gave an error and I cannot write code in Termux in any way. I will put screenshots of the error below, please help.

===================================================

Screenshot_20240123-130322~2.png

===================================================

Report Info

User Action: crash report
Sender: TermuxInstaller
Report Timestamp: 2024-01-23 10:02:38.385 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 295 system system u:object_r:system_data_file:s0:c512,c768  20K 2024-01-23 11:09 /data/data
drwxrwx--x 295 system system u:object_r:system_data_file:s0:c512,c768  20K 2024-01-23 11:09 /data/user/0

mount info:
9998 9901 252:6 / /data rw,nosuid,nodev,noatime master:34 - ext4 /dev/block/dm-6 rw,seclabel,noauto_da_alloc,inlinecrypt,resgid=1065,errors=panic
9999 9998 252:6 /data /data/user/0 rw,nosuid,nodev,noatime master:34 - ext4 /dev/block/dm-6 rw,seclabel,noauto_da_alloc,inlinecrypt,resgid=1065,errors=panic

Logcat Dump

$ /system/bin/logcat -d -t 3000 2>&1
--------- beginning of system
01-23 12:45:03.441  6052  6095 D OpenMsyncAppList: loadTunerAppList + 
01-23 12:45:03.458  6052  6095 D OpenMsyncAppList: loadTunerAppList - 
--------- beginning of main
01-23 13:02:38.026  6052  6052 W ContextImpl: Failed to ensure /data/user/0/com.termux/shared_prefs: mkdir failed: EACCES (Permission denied)
01-23 13:02:38.031  6052 12199 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)
01-23 13:02:38.031  6052  6052 W Termux:SharedProperties: Not loading properties since file is null
01-23 13:02:38.031  6052 12200 W ContextImpl: Failed to ensure /data/user/0/com.termux/cache: mkdir failed: EACCES (Permission denied)
01-23 13:02:38.032  6052 12200 W ContextImpl: Failed to update user.inode_cache: stat failed: EACCES (Permission denied)
01-23 13:02:38.028  6052  6052 W Thread-8: type=1400 audit(0.0:9740): avc: denied { getattr } for path="/data/user/0/com.termux" dev="dm-6" ino=3900883 scontext=u:r:untrusted_app_27:s0:c215,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c219,c256,c512,c768 tclass=dir permissive=0 app=com.termux
01-23 13:02:38.036  6052 12200 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)
01-23 13:02:38.076  6052  6052 W ContextImpl: Failed to ensure /data/user/0/com.termux/shared_prefs: mkdir failed: EACCES (Permission denied)
01-23 13:02:38.118  6052  6052 W ContextImpl: Failed to ensure /data/user/0/com.termux/files: mkdir failed: EACCES (Permission denied)
01-23 13:02:38.118  6052  6052 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)
01-23 13:02:38.119  6052  6052 E Termux:TermuxInstaller: (150) FileUtils Error: The termux files directory not found at path "/data/data/com.termux/files".
01-23 13:02:38.119  6052  6052 E Termux:TermuxInstaller: TERMUX_FILES_DIR: `/data/data/com.termux/files`
01-23 13:02:38.120  6052  6052 W ContextImpl: Failed to ensure /data/user/0/com.termux/files: mkdir failed: EACCES (Permission denied)
01-23 13:02:38.116  6052  6052 W com.termux: type=1400 audit(0.0:9741): avc: denied { getattr } for path="/data/data/com.termux" dev="dm-6" ino=3900883 scontext=u:r:untrusted_app_27:s0:c215,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c219,c256,c512,c768 tclass=dir permissive=0 app=com.termux
01-23 13:02:38.116  6052  6052 W com.termux: type=1400 audit(0.0:9742): avc: denied { getattr } for path="/data/data/com.termux" dev="dm-6" ino=3900883 scontext=u:r:untrusted_app_27:s0:c215,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c219,c256,c512,c768 tclass=dir permissive=0 app=com.termux
01-23 13:02:38.123  6052 12202 I CCodec  : setting up 'default' as default (vendor) store
01-23 13:02:38.129  6052 12202 I CCodec  : Created component [c2.android.vorbis.decoder]
01-23 13:02:38.133  6052 12202 I CCodecConfig: query failed after returning 7 values (BAD_INDEX)
01-23 13:02:38.137  6052 12202 W Codec2Client: query -- param skipped: index = 1107298332.
01-23 13:02:38.137  6052 12202 I CCodecConfig: query failed after returning 7 values (BAD_INDEX)
01-23 13:02:38.139  6052 12202 W Codec2Client: query -- param skipped: index = 1342179345.
01-23 13:02:38.139  6052 12202 W Codec2Client: query -- param skipped: index = 2415921170.
01-23 13:02:38.145  6052 12202 I CCodecBufferChannel: [c2.android.vorbis.decoder#950] Created output block pool with allocatorID 16 => poolID 32 - OK
01-23 13:02:38.187  6052 12202 I hw-BpHwBinder: onLastStrongRef automatically unlinking death recipients
01-23 13:02:38.196 12208 12208 W ls      : type=1400 audit(0.0:9743): avc: denied { getattr } for path="/data/data/com.termux" dev="dm-6" ino=3900883 scontext=u:r:untrusted_app_27:s0:c215,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c219,c256,c512,c768 tclass=dir permissive=0 app=com.termux
01-23 13:02:38.200 12208 12208 W ls      : type=1400 audit(0.0:9744): avc: denied { getattr } for path="/data/user/0/com.termux" dev="dm-6" ino=3900883 scontext=u:r:untrusted_app_27:s0:c215,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c219,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: -----------
DISPLAY: ------
INCREMENTAL: ------
SECURITY_PATCH: 2023-12-01
IS_DEBUGGABLE: 0
IS_TREBLE_ENABLED: true
TYPE: user
TAGS: release-keys

Hardware

MANUFACTURER: OMIX
BRAND: OMIX
MODEL: X5
PRODUCT: X5
BOARD: X5
HARDWARE: mt6765
DEVICE: X5
SUPPORTED_ABIS: arm64-v8a, armeabi-v7a, armeabi

GrigoryNot2 commented 9 months ago

Проверь разрешение приложения на доступ к папкам и настройки антивирусов и файрволов. Ругается на отсутствие доступа к папкам

GrigoryNot2 commented 9 months ago

Может быть ещё включен какой нибудь перенос папки приложения на флешку?

szerrahim commented 9 months ago

I found the problem.There is a problem with the /data/user_de/0/com.termux directory, but the Termux app does not create files under it by default. The ownership is also different for the Termux app to access it to investigate, and it requires root for me to list or manually delete the files. There may be some file corruption that prevents deletion. Since you are not rooted, there does not seem to be any other way than resetting to factory settings.

W PackageManager: Adding duplicate app id: 10272 name=com.termux I PackageManager: Permission ownership changed. Updating all permissions. W PackageManager: Failed to create app data for com.termux, but trying to recover: com.android.server.pm.Installer$InstallerException: Failed to prepare /data/data/com.termux W PackageManager: com.android.server.pm.Installer$InstallerException: android.os.ServiceSpecificException: Failed to delete /data/user_de/0/com.termux (code 2) E ArtManagerService: Failed to prepare profile for com.termux:/data/app/~~gcOHDpTa2Cq0PFs_TXn__Q==/com.termux-WNubzRE1U5zo-sPTcCeq1Q==/base.apk 

https://cs.android.com/android/platform/superproject/+/android-14.0.0_r1:frameworks/base/services/core/java/com/android/server/pm/AppDataHelper.java;l=236

https://cs.android.com/android/platform/superproject/+/android-14.0.0_r1:frameworks/base/services/core/java/com/android/server/pm/AppDataHelper.java;l=620

https://cs.android.com/android/platform/superproject/+/android-14.0.0_r1:frameworks/base/services/core/java/com/android/server/pm/DeletePackageHelper.java;l=535

https://cs.android.com/android/platform/superproject/+/android-14.0.0_r1:frameworks/base/services/core/java/com/android/server/pm/Installer.java;l=450

https://cs.android.com/android/platform/superproject/+/android-14.0.0_r1:frameworks/native/cmds/installd/InstalldNativeService.cpp;l=1221