-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathAndroidTools.cpp
More file actions
319 lines (298 loc) · 8.97 KB
/
AndroidTools.cpp
File metadata and controls
319 lines (298 loc) · 8.97 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
#include<iostream>
//#include<stdlib.h>
#include<string>
#include<windows.h>
#include<conio.h>
using namespace std;
void checkdevice();
void flashrecovery();
void install();
void backup();
void restore();
void sideload();
void rootdevice();
void title();
void home();
void instructions();
void insthome();
void graphics();
void start();
int main()
{
system("cls");
graphics();
instructions();
start();
}
void start()
{
char x;
system("cls");
//system("color 5f");
title();
cout<<"\tMenu:\n\n";
cout<<"\t1.Check Device";
cout<<"\t\t\t2.Install APK\n\n\n";
cout<<"\t3.Flash Recovery";
//cout<<"\t\t4.Backup your Device\n\n";
//cout<<"\t5.Restore your Device";
cout<<"\t\t4.Install Custom Rom\n\n\n";
cout<<"\t5.Root Device";
cout<<"\t\t\t6.Instructions\n\n\n";
cout<<"\t7.RESTART";
cout<<"\t\t\t8.EXIT.\n\n\n";
cout<<"\t\t ->> Choice:";
x=getche();
switch(x)
{
case '1':
checkdevice();
break;
case '2':
install();
break;
case '3':
flashrecovery();
break;
/* case '4':
backup();
break;
case '5':
restore();
break; */
case '4':
sideload();
break;
case '5':
rootdevice();
break;
case '8':
//cout<<"\n\n\n\t\t\t->>Thanks for using my software\n";
home();
//exit(0);
break;
case '6':
instructions();
break;
case '7':
main();
break;
default:
cout<<"Wrong option!!!!!!\n";
start();
}
}
void checkdevice()
{
system("cls");
title();
cout<<"**If you feel it is not working just restart the software**\n\n";
cout<<"::Device Check::\n";
system("adb wait-for-device");
system("adb devices");
home();
}
void install()
{
system("cls");
title();
cout<<"**If you feel it is not working just restart the software**\n";
cout<<"::Install APK::\n";
system("adb wait-for-device");
system("adb devices");
cout<<"Instructions:\n";
cout<<"\n*****->Please Rename the apk to file.apk and place it in the root of this software\n\n";
system("adb install file.apk");
home();
}
void flashrecovery()
{
system("cls");
title();
cout<<"**If you feel it is not working just restart the software**\n";
cout<<"::Flash Recovery::\n";
system("adb wait-for-device");
system("adb devices");
system("adb reboot bootloader");
cout<<"Waiting for device\n";
//system("fastboot wait-for-device");
system("fastboot flash recovery recovery.img");
cout<<"Finished Flashing Recovery\nCredits:Azhar.Syed\n";
cout<<"Now Press the Buttons to goto Recovery\n";
system("fastboot reboot");
home();
}
void backup()
{
system("cls");
title();
cout<<"**If you feel it is not working just restart the software**\n";
cout<<"::Backup Device::\n";
cout<<"Backup will be saved as backup.ab\n";
system("adb wait-for-device");
system("adb devices");
system("adb backup -all");
cout<<"**Backup Success**\n";
home();
}
void restore()
{
system("cls");
title();
cout<<"::Restore Device::\n";
cout<<"Copy the ""backup.ab"" in the root of this directory\n";
system("adb wait-for-device");
system("adb devices");
system("adb restore backup.ab");
cout<<"**Restore Success**\n";
home();
}
void sideload()
{
system("cls");
title();
cout<<"**If you feel it is not working just restart the software**\n\n";
cout<<"**For Flashing CUSTOMS ROMS you need to have already installed TWRP (OR) CWM in your device**\n\n";
cout<<"::Flash Custom Rom::\n";
cout<<"**Copy the custom rom in the root of this directory\n";
cout<<"**Rename it to update.zip\n";
system("adb wait-for-device");
system("adb devices");
system("adb reboot recovery");
cout<<"Select Install zip and then select install zip from sideload\n";
system("adb sideload update.zip");
home();
}
void rootdevice()
{
system("cls");
title();
cout<<"**For ROOTING you device you need to already have installed TWRP (OR) CWM**\n\n";
cout<<"**ROOT DEVICE**\n";
system("adb wait-for-device");
system("adb devices");
system("adb reboot recovery");
cout<<"Use your CUSTOM RECOVERY to ROOT your device\n";
home();
}
void title()
{
//system("color 5f");
cout<<"\t\t\t\t\t\t\t\t\t ANDROID MULTI TOOL \n\n"<<endl;
cout<<"\t\t\t\t\t\t\t Programmer ->> Azhar.Syed :: Email ->> syedazhar9356@gmail.com\n\n"<<endl;
}
void home()
{
char choice;
//system("color 5f");
cout<<"\n\n\t->> Do you want to go to MAIN MENU??\n\n\t->> Press 'Y' or 'y' to Continue or 'N' or 'n' to Exit\n";
cout<<"\n\n\t->> Choice:";
choice=getche();
if(choice=='Y'||choice=='y')
{
start();
}
else
{
if(choice=='N'||choice=='n')
{
cout<<"\t->> \nThanks for using my Software.Contact me if you have any queries.\n\n";
exit(0);
}
else
{
system("cls");
cout<<"->>Wrong Option\n";
title();
home();
}
}
}
void instructions()
{
system("cls");
title();
//system("color 5f");
//system("mode con: cols=175 lines=70");
cout<<"::INSTRUCTIONS::\n\n";
cout<<"**PLEASE READ THEM CAREFULLY**\n\n\n";
cout<<"->>1.Please make sure that you had installed the correct ""ADB DRIVERS"" of your device.\n\n\n";
cout<<"->>2.Enable USB-DEBUGGING in your Device.To enable it open settings->Aboutdevice->click on buildno 8 times and now goto settings and you see a new option Developer Options->click on USB Debugging\n\n\n";
cout<<"->>3.If your doing this for the first time when you select check device in this Software menu a message will be pop up.Just tick and agree on your phone.\n\n\n";
cout<<"->>4.To Install any apk just rename the apk to ""file.apk"" and place it in the root of this software.\n\n\n";
cout<<"->>5.To Flash any Custom recovery (twrp or cwm) just rename it to ""recovery.img"" and place it in the root of this software. \n\n\n";
cout<<"->>6.To ROOT your device,download the root required .zip from Internet and place it in the External or Internal Storage.\n\n\n";
cout<<"->>7.If Custom Rom installation is not working through this software copy the .zip rom to External Storage and the goto custom recovery and select install zip and then select the directory\n\n\n";
cout<<"->>8.Know what are you doing and search in internet if you are not sure what are you doing.\n\n";
cout<<"->>9.Use PDA-NET software present in this package.Contact me if you want some help.\n\n";
insthome();
}
void insthome()
{
char choice;
//system("color 5f");
cout<<"\t->> Do you want to go to MAIN MENU??\n\t->> Press 'Y' or 'y' to Continue or 'N' or 'n' to Exit\n";
cout<<"\t->> Choice:";
choice=getche();
if(choice=='Y'||choice=='y')
{
start();
}
else
{
if(choice=='N'||choice=='n')
{
cout<<"\t->> \n\nThanks for using my Software.Contact me if you have any queries.\n\n";
exit(0);
}
else
{
system("cls");
cout<<"->>Wrong Option\n";
title();
instructions();
}
}
}
void graphics()
{
system("mode con: cols=170 lines=70");
system("cls");
title();
system("color f6");
cout<<"::Graphics Layout::\n\n";
cout<<" 1.Background : White <<-->> Text:Blue.(My Fav)\n\n";
cout<<" 2.Background : Purple <<-->> Text:White.\n\n";
cout<<" 3.Background : Aqua <<-->> Text:Yellow.\n\n";
cout<<" 4.Background : Black <<-->> Text:Green.(Hacker Theme)\n\n";
cout<<" 5.Background : Purple <<-->> Text:Light Yellow.(High Contrast)\n\n";
cout<<" 6.Background : White <<-->> Text:Yellow.(DEFAULT)\n\n";
char choice;
cout<<"\tChoice:";
choice=getch();
switch (choice)
{
case '1':
system("color F1");
break;
case '2':
system("color 5F");
break;
case '3':
system("color B6");
break;
case '4':
system("color 0A");
break;
case '5':
system("color 5E");
break;
case '6':
system("color F6");
break;
default:
system("cls");
cout<<"Wrong Option!!!\n\n";
graphics();
}
}