Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.75 KB | None | 0 0
  1. #include <cstdio>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6. void Installation() {
  7. system("adb shell am start -n com.samsung.android.themestore/.activity.MainActivity");
  8. system("timeout /t 1 /nobreak > NUL");
  9. system("adb shell pm uninstall -k --user 0 com.timmods.WingsFontsTheme");
  10. system("timeout /t 1 /nobreak > NUL");
  11. system("adb install WingsFontsTheme.apk");
  12. system("timeout /t 1 /nobreak > NUL");
  13. system("adb shell am force-stop com.samsung.android.themestore");
  14. system("adb shell am start -n com.samsung.android.themestore/.activity.MainActivity");
  15. system("adb shell am force-stop com.samsung.android.themestore");
  16. system("timeout /t 1 /nobreak > NUL");
  17. system("adb shell am force-stop com.timmods.wingsfonts");
  18. system("adb shell am start -n com.timmods.wingsfonts/.MainActivity");
  19. }
  20. void Choice() {
  21. cout << "1) Refresh device list" << endl;
  22. cout << "2) Install Wings Fonts Theme" << endl;
  23. }
  24.  
  25. int main() {
  26.  
  27. int choice;
  28. bool exit = false;
  29.  
  30. 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;
  31.  
  32. system("adb devices");
  33.  
  34. Choice();
  35. cout << "\nEnter either 1 or 2: ";
  36. cin >> choice;
  37.  
  38.  
  39. while (exit == false) {
  40. switch (choice) {
  41. case 1:
  42. {
  43. cout << endl;
  44. choice = 0;
  45. system("adb devices");
  46. Choice();
  47. cout << "\nEnter either 1 or 2: ";
  48. cin >> choice;
  49. }break;
  50. case 2:
  51. {
  52. cout << endl;
  53. Installation();
  54. exit = true;
  55. }; break;
  56. default:
  57. {
  58. cout << endl;
  59. choice = 0;
  60. cout << "Invalid choice. Try again\n" << endl;
  61. Choice();
  62. cout << "\nEnter either 1 or 2: ";
  63. cin >> choice;
  64.  
  65. } break;
  66. }
  67. }
  68.  
  69.  
  70. cout << "\n\nPress Enter to exit...";
  71. cin.get();
  72. cin.get();
  73. return 0;
  74. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement