Changing Default Folders

Since my phone is not rooted can I change the default startup directory and the directory termux downloads packages to that way I can be able to access those folders whenever needed to?
59 Replies
Dyno
Dyno3y ago
Accessing the Termux home directory from a file manager Termux allows accessing it's own home directory by using SAF, which allows applications from accessing files with a global file picker. If your file manager looks something like the first picture, then you don't need extra configurations as you can just click on Termux and access the home directory. If your file manager doesn't look like the first picture, you might need to install Material Files (https://f-droid.org/en/packages/me.zhanghai.android.files) and follow the steps on the second image. https://media.discordapp.net/attachments/954279764187816016/1010039379055607878/image0.png https://media.discordapp.net/attachments/954279764187816016/1010041858333868052/IMG_20220819_112524.png
Cuteness
Cuteness3y ago
^ There are also other file managers that support SAF. I use Fx File Explorer but I don't recall if you need the paid key to use SAF or not. https://play.google.com/store/apps/details?id=nextapp.fx If you want to access the whole of Termux (which I don't fully recommend), make sure you already did termux-setup-storage and then do the following inside of Termux:
cd ~/storage
ln -s /data/data/comm.termux/files/usr termux_usr
cd ~/storage
ln -s /data/data/comm.termux/files/usr termux_usr
Now when you use your preferred file manager, make sure you specify the Termux home directory (you will be able to access usr by going into storage -> termux_usr)
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
Main reason I'm asking is cause I want to use a python script that grabs stuff for me yet I would need to edit a config.toml file to have my login cookies info and so I can set the desired download location
Cuteness
Cuteness3y ago
What, exactly, are you exactly to do?
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
python tool that allows me to download music while using my quobuz account
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
this to be more specific: https://github.com/nathom/streamrip
GitHub
GitHub - nathom/streamrip: A scriptable music downloader for Qobuz,...
A scriptable music downloader for Qobuz, Tidal, SoundCloud, and Deezer - GitHub - nathom/streamrip: A scriptable music downloader for Qobuz, Tidal, SoundCloud, and Deezer
Cuteness
Cuteness3y ago
7. Obligations of the customer [...] The customer expressly undertakes not to make inappropriate and unfair use of his/her account in order to artificially increase the number of streams on a limited number of tracks (either manually or via an automated process). XANDRIE reserves the right to suspend the account of such user.
https://www.qobuz.com/us-en/legal/terms
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
i know about that rule
infu (NEW PFP)
I kinda achieve such bit by bit everywhere with some handy scripts, I think you should be able to move things onto internal storage when needed or smth
Cuteness
Cuteness3y ago
“Offline mode” shall be understood as the functionality allowing to listen in different qualities, without an active internet connection, to the tracks, playlists and albums previously downloaded by the Customer via the Import feature, on any Listening Device using the QOBUZ Applications.
infu (NEW PFP)
youre talking about changing whole prefix though, right?
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
ye
Cuteness
Cuteness3y ago
I think they are wanting to automate the download of music that is being streamed under their account... I don't think that is said to be valid as far as I'm aware.
infu (NEW PFP)
its possible, but is it comfortable and worth the effott? Im not sure Im talking about moving the whole prefix
Cuteness
Cuteness3y ago
Although I, myself, am talking about the fact that I see some parts stating that the user isn't allowed to automate botting under their account.
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
i have this set up on my pc just want to have it set up on my phone also for on the go ripping for my server
No description
infu (NEW PFP)
that can be done without moving prefix like you know theres the downloads folder made by Termux right? you dont even have to use it
Cuteness
Cuteness3y ago
You are violating their legal terms by using 3rd-party tools to download their music.
infu (NEW PFP)
for example, here's my termux-url-opener, so its triggered by sharing links to Termux: https://github.com/INFU-AV/ChaosCode/blob/main/scripts/termux-url-opener
GitHub
ChaosCode/scripts/termux-url-opener at main · INFU-AV/ChaosCode
Organised chaos of dotfiles and handy scripts of Audio-Visual Zealot - ChaosCode/scripts/termux-url-opener at main · INFU-AV/ChaosCode
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
ye but it's having the stuff being stored in /data that needs root access to be able to access the python packages and edit the config.toml file with my account info
infu (NEW PFP)
hmmm
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
unless python packages are stored in a non froot location
infu (NEW PFP)
well in Termux you dont have root unless you like root your phone ... huh wait shouldnt it be opposite?
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
IK
infu (NEW PFP)
like
Cuteness
Cuteness3y ago
Infu, are you really okay with helping them break the legal terms they agreed to?
infu (NEW PFP)
They just wanna download shit on Termux, where's breaking the law? unless I missed it - Im bit sleep deprived and stuff lol
Cuteness
Cuteness3y ago
Qobuz
Qobuz General Conditions of Use and Sale
Qobuz is the world leader in 24-bit Hi-Res downloads, offering more than 90 million tracks for streaming in unequalled sound quality (FLAC 16 Bits / 44.1kHz)
infu (NEW PFP)
wtf is qobuz first time hearing bout it is it like spotify?
Cuteness
Cuteness3y ago
Here states, with legal jargon, that they must use Qobuz's app, or the website itself, and nowhere does it state that 3rd-party apps / botting / etc. is allowed.
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
technically it is illegal but meh. it's like when i rip my blurays to my pc for backup, sure i break the copyright protection added to the disc but i ain't doing any harm to anyone
Cuteness
Cuteness3y ago
If you legally own the physical medium while you have that digital / burnt copy, that is different.
infu (NEW PFP)
Im in a tough place cause Im very "no piracy" person here ( I gotta be, as admin 😩 ) buuuuuut my inner archive/hoarder instinct tells me to help here
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
i still have the account with quobuz so as long as i still have that account
infu (NEW PFP)
so youre just risking your account, hope you know that, blah blah okay so why you need root for you shouldnt need that
Cuteness
Cuteness3y ago
I don't even see anything about downloads in any form that does NOT factor in their own program to use it with.
infu (NEW PFP)
like, Termux doesnt need root access in most cases have you noticed
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
cause i thought the python source i downloaded via the pip3 install streamrip --upgrade command wouldv'e gotten stored in the same root folder the termux packages are downloaded to. and if it is i need to access to be able to edit the config file with my account info
infu (NEW PFP)
compared to your usual WSL, that begs for sudo everytime you sneeze even if it does, you should have perms to edit it
Cuteness
Cuteness3y ago
WSL is different because that is doing the normal Linux stuff.
infu (NEW PFP)
check with the package you downloaded where they store configs usually its somewhere in the home folder but if not, you should be still easily able to edit it no matter where it is only thing you cant fiddle with is Android built-in stuff unless you got actually rooted phone, then its different talk, but you get me
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
Isn't this where most termux stuff gets added to?
No description
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
Can't see termux folder cause non root obviously
infu (NEW PFP)
hmmm can you check it using Termux? cause thats the usual recent Android bullshit, where apps cannot easily access another apps data scoped storage If you wanna edit stuff in Termux, I recommend some Termux app for it like, Im using Emacs myself
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
NGL i'm setting up a bluestack instance with root access to do some digging around. (probably should've done this first before comming here tbh)
infu (NEW PFP)
uhhhh That sounds like fuckton of extra work Checking it up online, looks like your app is looking for config.toml
infu (NEW PFP)
you should be able to access it using this command @AIMW is that what you were looking for?
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
ye thx
infu (NEW PFP)
In Linux there's usually more than one way to do things - Glad you didnt have to redo entire system to get to your solution 👌 that would be waste of time and energy lol
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
no i'm still doing that lol
infu (NEW PFP)
lol why
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
cause am bored anyway lol
infu (NEW PFP)
I thought thats all you wanted oh alrighty cant stop you there Have fun lol
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
oh it is but neede to check some other things from apps that download/store files in the root of the device
infu (NEW PFP)
you can access phone's storage no problem its the apps data its difficult
AnimeIsMyWaifu
AnimeIsMyWaifuOP3y ago
bit a rooting i should be able to see everything anyway
fisher
fisher3y ago
oh ive used this before and had the same issue putting this in config should fix it
[downloads]
# Folder where tracks are downloaded to
folder = "/sdcard/Music"
[downloads]
# Folder where tracks are downloaded to
folder = "/sdcard/Music"

Did you find this page helpful?