这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@AntonSamokat
Copy link

@AntonSamokat AntonSamokat commented Mar 3, 2024

For details see:
https://stackoverflow.com/a/19856267/1455694
https://stackoverflow.com/a/63250729/1455694
https://www.reddit.com/r/tasker/comments/d7whyj/android_10_and_auto_starting_apps/
https://stackoverflow.com/q/64642362/1455694

Not sure about real need for:
android:enabled="true"
android:exported="true"
in app/src/main/AndroidManifest.xml

Related pull request for termux-boot:
termux-boot is not working on Xiaomi Redmi 7A on Android 10
termux/termux-boot#195

Copy link

@rpla14024 rpla14024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good

<service
android:name=".app.TermuxService"
android:exported="false" />
android:exported="true"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enabling export of a service, activity, receiver, provider allows other apps to call them without any permission. This will allow any random app to run commands in termux without user permission, and even with root if termux has root permissions, i.e you are creating a privilege escalation vulnerability.

android:name=".app.TermuxService"
android:exported="false" />
android:exported="true"
android:enabled="true" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

public void onCreate(Bundle savedInstanceState) {
Logger.logDebug(LOG_TAG, "onCreate");

// For details see:
Copy link
Member

@agnostic-apollo agnostic-apollo Mar 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TermuxService requests the permission if its required to start foreground terminal session from background. Permissions must not be requested unless needed.

// For android >= 10, apps require Display over other apps permission to start foreground activities

FileReceiverActivity.updateFileReceiverActivityComponentsState(this);

try {
Intent serviceIntent;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is one issue that has already been solved locally and fix will be available in next version.

@agnostic-apollo
Copy link
Member

There were various issues with why termux-boot did not work properly and it will not be used from next termux release as boot logic has been rewritten into termux-app itself.

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

Successfully merging this pull request may close these issues.

3 participants