Why?
[Attachment 64382 - Click to enlarge]
In the New Year Termux found me! Termux - a Terminal Emulator that runs on Android, is for all intents and purposes, a full blown Linux environment that runs sweetly on your Android. It is installed from the F-Droid catalogue of free and open source software. Find it at f-droid.org and install.
In the F-droid app search for Termux - there are a few entries - but download and install 'Termux' - the one that says terminal emulator.
There are several places to get help installing Termux - start looking on reddit.com/r/Termux or https://discord.gg/termux-641256914684084234
To avoid confusion in the description below - phone code looks like this:-
And your PC instructions look like this:-This is written in the terminal emulator screen
First you'll want to set up house in termux:Code:This is typed on your PC
You now have a basic working environment. If youTermux responds with /data/data/com.termux/files/home/ from here I set up a directorypwd
./bin already exists but note:- these are local and different from the system location /data/data/com.termux/files/usr/bin/ - we will later use this location to put some decryption binaries in as they will then be in the PATH and can be called from anywhere within termux.mkdir ~/python
As for getting decryption onto your phone I am assuming you have a working CDM; although you could set up code to call getwvkeys api and get keys from Notaghost's server. [EDIT] Notaghost's server is practically unavailable; the site Admin doesn't appear like new people using the service.[/EDIT]
Getting stuff on your phone is easy. cable connect and set-up permission for file transfer.
'adb push / pull' works for me but you could use your PC file manger to drop what you need to your phone sdcard.
sends the whole directory and sub-folders to your phone. If it works on your PC it will work on your phone.Code:adb push ./WKS-KEYS /sdcard/
From here on we need proper access to your phone from a terminal on your PC so we can work more easily.
On your phone and in termux set up an access password
find out who you are:passwd
will respond with something like u0_a100whoami
start the secure shell daemon on your phone with
From your PCsshd
Now you have a link to your phone it is more easy to configure.Code:ssh -p8022 u0_a100@<phone-IP-address>
NOTE: from now on TYPING IS IN A TERMINAL ON YOUR PC LINKED TO YOUR PHONE
anything you type here will execute on your phone.
brings your cdm etc in to Termux plus any scripts you use to download. They will all work. Maybe you'll need to change file-save locations but simple script editing can be done from your ssh link to your phone using a text editor like nano or vim.mv ~/storage/shared/WKS-KEYS ~/python/
Decryption uses some of Bento4 Tools binaries and they are here https://files.videohelp.com/u/301890/bento4_tools_android.zip
unzip and move to your sdcard. I only moved mp4decrypt as I would not be using any other of Bento4 binaries on my phone. Copy to your phone with adb or file-manager
Once the binary is in the root folder of your SD card
moves it safely to the /usr/bin.mv ~/storage/shared/mp4decrypt /data/data/com.termux/files/usr/bin/
give execute permissions and check it is working:-
chmod +x /data/data/com.termux/files/usr/bin/mp4decrypt
mp4decrypt
[Attachment 64387 - Click to enlarge]
Termux has a simply wonderful facility to accept a shared piece of text or url!! So if I touch a url in my phone's browser window it can be shared to Termux.
In bin I have a file with execute privileges (chmod +x filename) called termux-url-opener - this is special name Termux recognises. Termux shares automatically to this file. When run it calls python/opener.py which is a menu program
which is a menu programCode:#!/bin/bash python ~/python/opener.py
[Attachment 64390 - Click to enlarge]
Now sharing can only pass one argument. Some of my scripts use two or three. No matter; adapt your opening routine to use the first argument but wait for input on the others.
So calling STV (and similar mpd - tg4.ie -uktvplay) I shared the mpd and entered the menu.
The code called by the menu waits for further input. So my progam entry point looks like this and allows a hybrid of command line and input commands.
Getting the mpd is easy. Using Kiwi-browser on your phone, install 'developer-tools' extension if not present already. kiwi browser is an adapted chrome browser so it can run chrome's extensions without the Chrome Police looking over your shoulder.Code:if __name__ == '__main__': from sys import argv if argv and len(argv) > 1: mpdurl = argv[1] try: videoname=argv[2] except: # 2nd arg missing videoname = input("Videoname: ") else: mpdurl = input("Enter the mpd to download: ") videoname = input("\nEnter the filename to save\n.mp4 will be added: ") print(f"{mpdurl} , {videoname}") getVideo(mpdurl, videoname)
In use, start a web page with your target video; select 'developer tools' from the browser menu. It opens another tab; start and stop the video; change tab; select the manifest et voila!
[Attachment 64391 - Click to enlarge]
Sharing an mpd can be a bit of a fiddle. We need the manifest as a url link in kiwi-browser to share.
Click on the manifest and in the pop-up choose Open in new tab (the top item).
[Attachment 64393 - Click to enlarge]
long press to share -
[Attachment 64392 - Click to enlarge]
[Attachment 64394 - Click to enlarge]
Sometimes I will cheat and find an mpd from my PC and get it onto my phone withthat produces a qr code your phone can read and share to termux.Code:qrencode -o qr.png "some video manifest"
[Attachment 64395 - Click to enlarge]
I am quite new to decryption. Living in the UK I was able to use my phone to download lots of UK free-to-air stuff as I was learning python and Termux. That is how I started to use my phone to download. The BBC and some other UK channels have series links. I pass a series url to my phone and it downloads the whole lot.
I save them, on the phone, at ~/storage/downloads/UKTV/ (note the 's' on downloads it differentiates file manager and Termux) The programmes are now visible to my phone file manager.
Termux will run rsync (pkg install rsync)
Then the command from termux
will copy to my satellite DVR (or NAS or wherever) I did play around setting up password free access by sharing public keys between boxes but that is not for here.rsync -tuv ~/storage/downloads/UKTV/*.mp4 angela@192.168.1.25:/hdd/movie/Z-incoming/
So generally I develop and test from my PC and transfer the python scripts to my phone. Any small changes can be made in situ with nano. But bigger stuff comes back to my PC again.
One gotcha I found was downloading DRM stuff with a script which complained it could not find any SSL certificates. I had Adguard on my phone running that sets up a local vpn to intercept traffic. I halted that and all was well.
And a second gotcha: if you have errors in your code and the code is being called by another program - url sharing for example - when the error happens the calling program closes and clears the screen of all the useful error reports. It all happens in a flash - so at the end of your main function put a 'time.sleep(5) to give you a chance to see what is happening. It can be edited up or down to suit your need.
Except errors and omissions that's it folks; that is all I know!
Support our site by donate $5 directly to us Thanks!!!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
Try StreamFab Downloader and download streaming video from Netflix, Amazon!
+ Reply to Thread
Results 1 to 29 of 29
-
Last edited by A_n_g_e_l_a; 17th Nov 2023 at 07:03. Reason: various edits to match more recent Termux version needs
-
As far as I understand, this can be achieved only if the phone will be available, which means that remotely they can not hack anything. I have heard that hackers hack into various data through the phone network, as it is very unprotected, which means that it is only a matter of time before the data is retrieved. I, for example, in order to avoid this incident, use VoIP numbers from https://usechalkboard.com, because they are tied to the Internet network, which would be much harder to hack, or impossible at all.
Last edited by Bvgary; 8th Sep 2022 at 06:57.
-
mv ~/storage/shared/WKS-KEYS ~/python/
for the name of my android mobie root menu,
~/storage/shared/
how can i know my excatly root menu name,
for instant, my oneplus 5t, i use file manager, it names internal storage,
i tried mv ~/storage/internal storage/WKS-KEYS ~/python/, mv ~/storage/internalstorage/WKS-KEYS ~/python/, mv ~/internal storage/WKS-KEYS ~/python/, mv ~/internalstorage/WKS-KEYS ~/python/
none of them work. said No such file or directory.
i already confirm that the folder python folder exist in the layer of /data/data/com.termux/files/home,
i used CD enter the layer.
thank youLast edited by missdgsn; 4th Sep 2022 at 08:36.
-
In Termux
typecd ~/; pwd
Now type
cd /; pwd
Neither have any relevance to the Android system folders. Think of Termux as being an emulator running in its own sandbox with a link to files only on the /sdcard/ of the Android system.
i tried mv ~/storage/internal storage/WKS-KEYS ~/python/, mv ~/storage/internalstorage/WKS-KEYS ~/python/, mv ~/internal storage/WKS-KEYS ~/python/, mv ~/internalstorage/WKS-KEYS ~/python/
Code:mv ~/storage/shared/WKS-KEYS ~/python/
-
I've also heard that connecting a VoIP number can make it difficult to decrypt the phone. Generally, the benefits of these numbers are very strong, as not only can you call another country without any problems, but you can also secure your data by simply linking your account to a VoIP number. I personally use a similar number from https://www.mightycall.com/ and I can say that it is very convenient and not expensive, so I recommend it.
Last edited by pristick; 1st Nov 2022 at 13:41.
-
-
I won't use it but I want to thank Angela for his another wonderful guide.
Beginners must read such guides instead of sending private messages. -
-
-
Ho!
No. Termux is a virtual environment and within that environment Termux behaves as rooted Linux. It does not need the phone rooted.
No they are not scripts written in python but are independent programs that run from the shell (bash), follow instructions above and place them in the system bin folder. Make sure you use program versions compiled for your phone.
Aria2c: It is debatable whether you still need it to multi-thread downloads. yt-dlp now has it's own built in muli-threading - just use -N 8 as a yt-dlp option (8 indicates the maximum threads - any number can be chosen up to 8). But of course - your preference.
The World has turned since the above post was written and I have now discovered N_m3u8DL-RE and shaka-packager can do the downloaded, decrypting and muxing files together in one command.. See Decryption-The-Last-Crusade for details.Last edited by A_n_g_e_l_a; 5th Mar 2023 at 03:56.
-
I don't use android (except the device that so graciously donated its private key) - but this is well done tutorial.
Thanks for your work here. -
-
No it isn't, but its close!! Its missing a hyphen https://wiki.termux.com/wiki/Termux-setup-storage
-
-
-
-
Hi everyone, is this still working now? and I want to install python version 3.9.7 on termux, how to do?
-
-
-
Just to know: there is a way to get keys using an extension like the old Widevine Guesser/Widevine Decryptor in Kiwi Browser without needing to dump a cdm or root the device?
-
yes, available. but not free
and for everyone: please don't ask me about this trough PM. i don't have and i don't share any other info about that -
Similar Threads
-
Fle recovery from android phone that wont boot.
By dafoe in forum Newbie / General discussionsReplies: 0Last Post: 18th Oct 2021, 20:22 -
ANDROID Help Downloading my ’tube Videos using VLC
By MISS CHIEVOUS in forum Video Streaming DownloadingReplies: 1Last Post: 24th Sep 2021, 15:07 -
Delete
By Ertoil in forum Authoring (DVD)Replies: 0Last Post: 3rd Aug 2021, 05:47 -
MKV/H264 to MP3 (or audio format compatible with Android phone)
By alexeliasson in forum AudioReplies: 2Last Post: 10th Feb 2021, 06:35 -
Downloading Videos From Youtube & Similars on Smartphones ( Android OS )
By devilcoelhodog in forum Video Streaming DownloadingReplies: 2Last Post: 7th Jun 2019, 18:19