Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- #include <iostream>
- using namespace std;
- void Installation() {
- system("adb shell am start -n com.samsung.android.themestore/.activity.MainActivity");
- system("timeout /t 1 /nobreak > NUL");
- system("adb shell pm uninstall -k --user 0 com.timmods.WingsFontsTheme");
- system("timeout /t 1 /nobreak > NUL");
- system("adb install WingsFontsTheme.apk");
- system("timeout /t 1 /nobreak > NUL");
- system("adb shell am force-stop com.samsung.android.themestore");
- system("adb shell am start -n com.samsung.android.themestore/.activity.MainActivity");
- system("adb shell am force-stop com.samsung.android.themestore");
- system("timeout /t 1 /nobreak > NUL");
- system("adb shell am force-stop com.timmods.wingsfonts");
- system("adb shell am start -n com.timmods.wingsfonts/.MainActivity");
- }
- void Choice() {
- cout << "1) Refresh device list" << endl;
- cout << "2) Install Wings Fonts Theme" << endl;
- }
- int main() {
- int choice;
- bool exit = false;
- cout << "If your device doesn't show up in the list and you start installation anyway, you will get a lot of errors\n\n" << endl;
- system("adb devices");
- Choice();
- cout << "\nEnter either 1 or 2: ";
- cin >> choice;
- while (exit == false) {
- switch (choice) {
- case 1:
- {
- cout << endl;
- choice = 0;
- system("adb devices");
- Choice();
- cout << "\nEnter either 1 or 2: ";
- cin >> choice;
- }break;
- case 2:
- {
- cout << endl;
- Installation();
- exit = true;
- }; break;
- default:
- {
- cout << endl;
- choice = 0;
- cout << "Invalid choice. Try again\n" << endl;
- Choice();
- cout << "\nEnter either 1 or 2: ";
- cin >> choice;
- } break;
- }
- }
- cout << "\n\nPress Enter to exit...";
- cin.get();
- cin.get();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement