Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ADBSS.cpp : Ten plik zawiera funkcję „main”. W nim rozpoczyna się i kończy wykonywanie programu.
- //
- #include <pch.h>
- #include <iostream>
- #include <string>
- #include <windows.h>
- #include <tchar.h>
- using namespace std;
- int main(int argc, char** argv) {
- std::string filename;
- filename = "a";
- SetConsoleTitle(_T("*-_ ADB Screenshooter _-*"));
- std::cout << "+---------------------------------+" << endl;
- std::cout << "|ADB Screenshooter [v1.0] |" << endl;
- std::cout << "|Take screenshots from your device|" << endl;
- std::cout << "|with a simple CLI tool. |" << endl;
- std::cout << "+---------------------------------+" << endl;
- cout << "Welcome to ADB Screenshooter." << endl;
- cout << "Please input the filename: (The screenshot will be saved with that name)" << endl;
- cout << "DO NOT INCLUDE ANY SPACES IN THE FILENAME. Use only letters." << endl;
- cin >> filename;
- Sleep(4);
- system("cls");
- SetConsoleTitle(_T("*-_ Taking the screenshot _-*"));
- cout << "Trust your computer now if you haven't before." << endl;
- system("adb shell screencap -p /sdcard/ADBScreenshooter/" + filename.c_str() + ".png");
- Sleep(4);
- system("cls");
- SetConsoleTitle(_T("*-_ Copying to PC! _-*"));
- cout << "The file will now be copied to the location from where you run ADB Screenshooter." << endl;
- system("adb pull /sdcard/" + filename.c_str() + ".png");
- Sleep(4);
- system("cls");
- SetConsoleTitle(_T("*-_ Done! _-*"));
- cout << "Everything is done! Thanks for using ADBSS. Press any key to finish." << endl;
- system("pause>nul");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement