Skip to content

Instantly share code, notes, and snippets.

View HunterXProgrammer's full-sized avatar
💭
Not available at the moment.

HunterXProgrammer

💭
Not available at the moment.
View GitHub Profile
#!/data/data/com.termux/files/usr/bin/bash
if [ -z "$1" ]
then
echo "No input file specified"
exit 1
fi
echo -ne "\n Checking if Termux has storage permission..."
rm -r ~/storage &>/dev/null
#!/data/data/com.termux/files/usr/bin/bash
am start -a android.settings.REQUEST_IGNORE_BATTERY_OPTIMIZATIONS -d package:com.termux
echo -ne "\n Checking if Termux has storage permission..."
rm -r ~/storage >/dev/null 2>&1
if ! touch /storage/emulated/0/.tmp_check_termux >/dev/null 2>&1
then
echo -e "\nGrant Termux storage permission and run the script again\n"
termux-setup-storage
@HunterXProgrammer
HunterXProgrammer / qr_code_scan_for_mdtest_second_method.md
Last active March 27, 2023 14:56
How to scan qr code for mdtest in problematic versions of Samsung or similar phones.

1) Download and open Termux.

2) Type and enter in Termux -

curl -s -L "https://github.com/HunterXProgrammer/Tasker-mdtest/releases/download/mdtest-V3-assets/qr_code_scan_for_mdtest_second_method.sh" | bash

Now to connect it to WhatsApp -

Type and enter in Termux:- >

case "senddoc":
if len(args) < 3 {
log.Errorf("Usage: senddoc <jid> <document path> <title> [mime-type]")
return
}
recipient, ok := parseJID(args[0])
if !ok {
return
}
data, err := os.ReadFile(args[1])
@HunterXProgrammer
HunterXProgrammer / install_whatsmeow2_termux.sh
Last active March 17, 2023 14:58
A bash script to install whatsmeow2 mdtest into Termux in one line. It'll provide direct integration with Tasker for receiving WhatsApp messages as easy Tasker variables and sending hundreds of messages at once. Check Reddit Tasker for more info - https://www.reddit.com/r/tasker/comments/11a4k49/howto_sendreceive_whatsapp_message_project_v2/
#!/data/data/com.termux/files/usr/bin/bash
echo -ne "\n Checking if Termux has storage permission..."
rm -r ~/storage >/dev/null 2>&1
if ! touch /storage/emulated/0/.tmp_check_termux >/dev/null 2>&1
then
echo -e "\nGrant Termux storage permission and run the script again\n"
termux-setup-storage
exit 1
fi
rm -rf /storage/emulated/0/.tmp_check_termux >/dev/null 2>&1
@HunterXProgrammer
HunterXProgrammer / extension_enable_cli_whatsmeow_main.go
Last active February 8, 2023 00:54
Adds CLI(command-line interface) support for sending text messages/images/videos/pdf/documents via whatsmeow mdtest command in Termux/Tasker. Check this for info - https://www.reddit.com/r/tasker/comments/10wiahq/howto_send_imagesvideospdfdocuments_in_whatsapp/
args := os.Args[1:]
if len(args) > 0 {
handleCmd(strings.ToLower(args[0]), args[1:])
return
}
c := make(chan os.Signal)
@HunterXProgrammer
HunterXProgrammer / install_whatsmeow_termux.sh
Last active February 15, 2023 10:54
A bash script to install whatsmeow mdtest into Termux in one line. Also adds support for sending videos/pdf/documents and vloce messages which is missing.
#!/data/data/com.termux/files/usr/bin/bash
echo -ne "\n Checking if Termux has storage permission..."
rm -r ~/storage >/dev/null 2>&1
if ! touch /storage/emulated/0/.tmp_check_termux >/dev/null 2>&1
then
echo -e "\nGrant Termux storage permission and run the script again\n"
termux-setup-storage
exit 1
fi
rm -rf /storage/emulated/0/.tmp_check_termux >/dev/null 2>&1
@HunterXProgrammer
HunterXProgrammer / extension_media_whatsmeow_main.go
Last active February 15, 2023 10:26
Adds support for sending videos/pdf/documents and voice messages via whatsmeow mdtest command in Termux/Tasker. Check this for info - https://www.reddit.com/r/tasker/comments/10wiahq/howto_send_imagesvideospdfdocuments_in_whatsapp/
case "senddoc":
if len(args) < 3 {
log.Errorf("Usage: senddoc <jid> <document path> <title> [mime-type]")
return
}
recipient, ok := parseJID(args[0])
if !ok {
return
}
data, err := os.ReadFile(args[1])