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?
60 Replies
Dyno
Dyno2y 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
Cuteness2y 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
AnimeIsMyWaifuOP2y 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
Cuteness2y ago
What, exactly, are you exactly to do?
AnimeIsMyWaifu
AnimeIsMyWaifuOP2y ago
python tool that allows me to download music while using my quobuz account
AnimeIsMyWaifu
AnimeIsMyWaifuOP2y 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
Cuteness2y 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
AnimeIsMyWaifuOP2y ago
i know about that rule
Infu
Infu2y ago
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
Cuteness2y 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
Infu2y ago
youre talking about changing whole prefix though, right?
AnimeIsMyWaifu
AnimeIsMyWaifuOP2y ago
ye
Cuteness
Cuteness2y 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
Infu2y ago
its possible, but is it comfortable and worth the effott? Im not sure Im talking about moving the whole prefix
Cuteness
Cuteness2y 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
AnimeIsMyWaifuOP2y 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
Infu2y ago
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
Cuteness2y ago
You are violating their legal terms by using 3rd-party tools to download their music.
Infu
Infu2y ago
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
AnimeIsMyWaifuOP2y 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
Infu2y ago
hmmm
AnimeIsMyWaifu
AnimeIsMyWaifuOP2y ago
unless python packages are stored in a non froot location
Infu
Infu2y ago
well in Termux you dont have root unless you like root your phone ... huh wait shouldnt it be opposite?
AnimeIsMyWaifu
AnimeIsMyWaifuOP2y ago
IK
Infu
Infu2y ago
like
Cuteness
Cuteness2y ago
Infu, are you really okay with helping them break the legal terms they agreed to?
Infu
Infu2y ago
They just wanna download shit on Termux, where's breaking the law? unless I missed it - Im bit sleep deprived and stuff lol
Cuteness
Cuteness2y 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
Infu2y ago
wtf is qobuz first time hearing bout it is it like spotify?
Cuteness
Cuteness2y 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
AnimeIsMyWaifuOP2y 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
Cuteness2y ago
If you legally own the physical medium while you have that digital / burnt copy, that is different.
Infu
Infu2y ago
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
AnimeIsMyWaifuOP2y ago
i still have the account with quobuz so as long as i still have that account
Infu
Infu2y ago
so youre just risking your account, hope you know that, blah blah okay so why you need root for you shouldnt need that
Cuteness
Cuteness2y 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
Infu2y ago
like, Termux doesnt need root access in most cases have you noticed
AnimeIsMyWaifu
AnimeIsMyWaifuOP2y 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
Infu2y ago
compared to your usual WSL, that begs for sudo everytime you sneeze even if it does, you should have perms to edit it
Cuteness
Cuteness2y ago
WSL is different because that is doing the normal Linux stuff.
Infu
Infu2y ago
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
AnimeIsMyWaifuOP2y ago
Isn't this where most termux stuff gets added to?
No description
AnimeIsMyWaifu
AnimeIsMyWaifuOP2y ago
Can't see termux folder cause non root obviously
Infu
Infu2y ago
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
AnimeIsMyWaifuOP2y 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
Infu2y ago
uhhhh That sounds like fuckton of extra work Checking it up online, looks like your app is looking for config.toml
Infu
Infu2y ago
No description
Infu
Infu2y ago
you should be able to access it using this command @AIMW is that what you were looking for?
AnimeIsMyWaifu
AnimeIsMyWaifuOP2y ago
ye thx
Infu
Infu2y ago
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
AnimeIsMyWaifuOP2y ago
no i'm still doing that lol
Infu
Infu2y ago
lol why
AnimeIsMyWaifu
AnimeIsMyWaifuOP2y ago
cause am bored anyway lol
Infu
Infu2y ago
I thought thats all you wanted oh alrighty cant stop you there Have fun lol
AnimeIsMyWaifu
AnimeIsMyWaifuOP2y ago
oh it is but neede to check some other things from apps that download/store files in the root of the device
Infu
Infu2y ago
you can access phone's storage no problem its the apps data its difficult
AnimeIsMyWaifu
AnimeIsMyWaifuOP2y ago
bit a rooting i should be able to see everything anyway
fisher
fisher2y 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"
fisher
fisher2y ago
theres still an archive of my old config if you wanna check it out https://github.com/nathom/streamrip/issues/195
GitHub
[BUG] Video download failed · Issue #195 · nathom/streamrip
Describe the bug this only happens with all tidal videos, meanwhile songs are working fine Command Used rip url https://tidal.com/video/48204106 -vvv Debug Traceback DEBUG:streamrip:Config loaded D...
Want results from more Discord servers?
Add your server