Speak now
Please Wait Image Converting Into Text...
Embark on a journey of knowledge! Take the quiz and earn valuable credits.
Challenge yourself and boost your learning! Start the quiz now to earn credits.
Unlock your potential! Begin the quiz, answer questions, and accumulate credits along the way.
General Tech Bugs & Fixes 2 years ago
Posted on 16 Aug 2022, this text provides information on Bugs & Fixes related to General Tech. Please note that while accuracy is prioritized, the data presented might not be entirely correct or up-to-date. This information is offered for general knowledge and informational purposes only, and should not be considered as a substitute for professional advice.
Turn Your Knowledge into Earnings.
I'm writing a anti-thief on a clean shell using termux. I turned on the backlight with the volume buttons and I want to send photos of "thief" to myself in correspondence in the social network VKontakte. I listen to pressing the power button when the screen is off and secretly take photo by front and back camera and screenshot. Next I want to send photos in VK using PHP. Since I need to listen to the clicks I use getevent command.
getevent
script -q -c 'getevent /dev/input/event5' /dev/null | while read code; do while read line; do if [ $line -eq 0 ]; then carr=( $code ) code1="${carr[0]}" code2="${carr[1]}" code3="${carr[2]}" if [ $code1 -eq 0001 ]; then if [ $code2 -eq 0074 ]; then if [ $code3 -eq 00000001 ]; then time=$(date +%d.%m.%Y_%H:%M:%S) /data/data/com.termux/files/usr/bin/termux-camera-photo -c 1 /data/data/com.termux/files/usr/bin/q/$time.front.jpg /data/data/com.termux/files/usr/bin/termux-camera-photo -c 0 /data/data/com.termux/files/usr/bin/q/$time.back.jpg screencap -p /data/data/com.termux/files/usr/bin/q/$time.scr.jpg /data/data/com.termux/files/usr/bin/tsu /data/data/com.termux/files/usr/bin/php /data/data/com.termux/files/usr/bin/vkup.php fi fi fi fi done vkup.php echo "contact!"; ?> To run it first I write su Then its script located in /system/bin protect Getting an error CANNOT LINK EXECUTABLE: library "libandroid-glob.so" not found page record for 0xb674008c was not found (block_size=64) If I write sequentially in command line tsu /data/data/com.termux/files/usr/bin/php /data/data/com.termux/files/usr/bin/vkup.php Or su tsu /data/data/com.termux/files/usr/bin/php /data/data/com.termux/files/usr/bin/vkup.php It works. But in the script does not work. I also noticed that when the command tsu changes $ tsu bash-4.4# Probably in a script it is necessary to consider it? Or is the problem in something else? Many thanks!!! REPLY 0 views 0 likes 0 shares Facebook Twitter Linked In WhatsApp
vkup.php
echo "contact!"; ?>
To run it first I write
su
Then its script located in /system/bin
protect
Getting an error
CANNOT LINK EXECUTABLE: library "libandroid-glob.so" not found page record for 0xb674008c was not found (block_size=64)
If I write sequentially in command line
tsu /data/data/com.termux/files/usr/bin/php /data/data/com.termux/files/usr/bin/vkup.php
Or
su tsu /data/data/com.termux/files/usr/bin/php /data/data/com.termux/files/usr/bin/vkup.php
It works. But in the script does not work. I also noticed that when the command tsu changes
tsu
$ tsu bash-4.4#
Probably in a script it is necessary to consider it? Or is the problem in something else? Many thanks!!!
When you run the commands interactively, you're not running tsu, letting it complete, and then running the php command. You're running the php command inside tsu's shell. You need to use the -c option to tsu to tell it what command to run:
php
-c
/data/data/com.termux/files/usr/bin/tsu -c '/data/data/com.termux/files/usr/bin/php /data/data/com.termux/files/usr/bin/vkup.php'
You can see a fuller explanation on this Stack Overflow question. Although end-user shell scripting questions are usually welcomed here, once you start getting to questions that programmers are better able to answer, you're more likely to find help on SO.
No matter what stage you're at in your education or career, TuteeHub will help you reach the next level that you're aiming for. Simply,Choose a subject/topic and get started in self-paced practice sessions to improve your knowledge and scores.
General Tech 9 Answers
General Tech 7 Answers
General Tech 3 Answers
General Tech 2 Answers
Ready to take your education and career to the next level? Register today and join our growing community of learners and professionals.