Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

termux-telephony-call #197

Open
richardcrbb opened this issue Jan 2, 2025 · 0 comments
Open

termux-telephony-call #197

richardcrbb opened this issue Jan 2, 2025 · 0 comments

Comments

@richardcrbb
Copy link

Problem description
I couldn't make calls and checked the logcat:

01-02 18:13:47.990  3801  3801 E audit   : type=1300 audit(1735859627.983:1879): arch=c00000b7 syscall=48 success=yes exit=0 a0=ffffff9c a1=79f763e280 a2=1 a3=0 items=0 ppid=25452 pid=16810 auid=4294967295 uid=10167 gid=10167 euid=10167 suid=10167 fsuid=10167 egid=10167 sgid=10167 fsgid=10167 tty=pts0 ses=4294967295 comm="bash" exe="/data/data/com.termux/files/usr/bin/bash" subj=u:r:untrusted_app_27:s0:c167,c256,c512,c768 key=(null)
01-02 18:13:49.397 16812 16812 D AndroidRuntime: Calling main entry com.termux.termuxam.Am
01-02 18:13:49.445  4266  4681 D ActivityManager: Received BROADCAST intent 0xd0ef9e4 Key{broadcastIntent pkg=com.termux intent=cmp=com.termux.api/.TermuxApiReceiver flags=0x40000000 u=0} requestCode=0 sent=0 from uid 10167
01-02 18:13:49.481  4266  4681 W ActivityTaskManager: Background activity start [callingPackage: com.termux.api; callingUid: 10167; isCallingUidForeground: false; callingUidHasAnyVisibleWindow: false; callingUidProcState: FOREGROUND_SERVICE; isCallingUidPersistentSystemProcess: false; realCallingUid: 10167; isRealCallingUidForeground: false; realCallingUidHasAnyVisibleWindow: false; realCallingUidProcState: FOREGROUND_SERVICE; isRealCallingUidPersistentSystemProcess: false; originatingPendingIntent: null; isBgStartWhitelisted: false; intent: Intent { act=android.intent.action.CALL dat=tel:xxxxxxxxxx flg=0x10000000 cmp=android/com.android.internal.app.ResolverActivity }; callerApp: ProcessRecord{84cb1e6 13056:com.termux.api/u0a167}]

chatgpt said it was runing in the background and it may be the reason, and that I had to grant permission to access CALL_PHONE then I did:

adb shell pm grant com.termux android.permission.CALL_PHONE
adb shell pm grant com.termux.api android.permission.CALL_PHONE
adb shell pm grant com.termux android.permission.SEND_SMS
adb shell pm grant com.termux.api android.permission.SEND_SMS
adb shell pm grant com.termux android.permission.READ_PHONE_STATE
adb shell pm grant com.termux.api android.permission.READ_PHONE_STATE

checked the permissions and received:

android.permission.CALL_PHONE: granted=true, flags=[ USER_SET|USER_SENSITIVE_WHEN_GRANTED|USER_SENSITIVE_WHEN_DENIED]

Chatgpt said:

USER_SENSITIVE_WHEN_GRANTED and USER_SENSITIVE_WHEN_DENIED: These flags mean that the permission is considered sensitive and that Android recognizes that granting or denying this permission allows the app to perform sensitive actions, like making phone calls. Because of this, Android might show a confirmation dialog or warning to the user when this permission is used.

Android classifies this type of permission as sensitive because an app could make phone calls without direct user intervention. This could lead to unwanted charges or unauthorized activity if a malicious app has access to this permission.

The flags "USER_SENSITIVE_WHEN_GRANTED" and USER_SENSITIVE_WHEN_DENIED indicate that Android may show warning notifications or ask for user confirmation when the permission is being used. This is a security mechanism to protect the user.

Possible restrictions: Even though the permission is granted, system restrictions (such as background execution policies or background activity restrictions in newer versions of Android) may limit Termux's ability to make calls from the background or without user intervention.

If you're experiencing issues, check the app's visibility on screen and Android's background execution policies, as they might be blocking the phone call action from running without user intervention.

So I tried to call with termux app open in the phone screen and finally it made the call.

How could I fix it?, am I doing something wrong?, I want to make calls using my PC speaker and mic, is it possible even?

Thanks for the support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant