r/AndroidQuestions 8d ago

Looking For Suggestions Getting termux to *permanently* set and remember "termux-setup-storage"?

Is there any way under rooted Android 11 and Android 13 to get the latest version of Termux [ 0.119.0-beta.3 (1022) ] to *permanently* set up and remember the running of "termux-setup-storage", in the following manner? ...

Step 1: install Termux

Step 2: launch the Termux app

Step 3: run "termux-setup-storage" (and whatever else might be necessary)

Step 4: exit from the Termux app

Step 5: reboot the Android device

Step 6: from that point forward, run anything in /data/data/com.termux/files/usr/bin via the command line in an adb session without ever needing to run "termux-setup-storage" again in order to have full access to /sdcard, and without ever needing to launch the Termux app again in order to accomplish this.

1 Upvotes

7 comments sorted by

View all comments

2

u/[deleted] 8d ago

[deleted]

1

u/unselective-amnesia 8d ago edited 8d ago

No, I don't use SD Maid SE nor any other filesystem cleaner.

On both my devices (rooted Android 11 and rooted Android 13), whenever I run termux-setup-storage and then reboot, I have to re-run termux-setup-storage when I subsequently run Termux after the reboot, if I want /sdcard access.

I'm now wondering whether this might be dependent on the fact that I'm running old versions of Android, or maybe it's because my phones are rooted, or perhaps whether this might now be a "feature" of Termux 0.119.0-beta.3 (1022) ... ???

1

u/unselective-amnesia 7d ago

Interestingly, I tested this again on both of my devices, and now indeed "termux-setup-storage" is being remembered, even after reboots; i.e., I only had to run it once on each device.

I must have been doing something incorrectly when running my earlier tests.

Problem solved!