@echo off
::Script source: https://github.com/sim0n00ps/L3-Dumping
echo.
echo.
echo ####################################################
echo # #
echo # KeyDive script #
echo # Widevine L3 Extractor for Android #
echo # #
echo # #
echo # PHONE MUST BE ROOTED TO WORK. #
echo # #
echo ####################################################
echo.
echo.
set /P c=Do you want to install requirements.txt[Y/N]?
if /I "%c%" EQU "Y" goto :install_python_requirements
if /I "%c%" EQU "N" goto :keydive
:install_python_requirements
echo.
echo #################################
echo # #
echo # Installing requirements.txt #
echo # #
echo #################################
echo.
echo A new window will open for requirements.txt in 5 sec. Once everything installs, you can close the window.
timeout /t 5 > nul
start cmd /k pip install -r requirements.txt
pause
:KeyDive
::Frida Server initialization
echo.
echo.
echo ###########################
echo # #
echo # Starting Frida Server #
echo # #
echo ###########################
echo.
echo.
set adb_path="YOUR PATH TO adb.exe HERE"
set frida_server_name=YOUR FRIDA SERVER VERSION HERE
cd /d "C:\platform-tools"
%adb_path% push %frida_server_name% /sdcard
echo su > commands.txt
echo mv /sdcard/%frida_server_name% /data/local/tmp >> commands.txt
echo chmod +x /data/local/tmp/%frida_server_name% >> commands.txt
echo /data/local/tmp/%frida_server_name% >> commands.txt
%adb_path% shell < commands.txt
del commands.txt
::KeyDive start
echo.
echo.
echo ####################
echo # #
echo # KeyDive #
echo # #
echo ####################
echo.
echo.
set "folder_path=YOUR PATH HERE"
set "python_script=keydive.py"
cd /d "%folder_path%"
python "%python_script%"
pause
endlocal