forked from Legatto2/MotoTool_MTK
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbackendclass.h
More file actions
131 lines (100 loc) · 4.58 KB
/
backendclass.h
File metadata and controls
131 lines (100 loc) · 4.58 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
#ifndef BACKENDCLASS_H
#define BACKENDCLASS_H
#include <QObject>
#include "globalvars.h"
class BackEndClass : public QObject
{
Q_OBJECT
public:
explicit BackEndClass(QObject *parent = nullptr);
signals:
//void tx_ProcessCompleted(bool complt);
//void tx_TextBoxOutput(TOOL_TYPE tool, int idx, QString s, bool isBold, bool newline, QColor color);
void tx_newSerialPortDetected(QList<QSerialPortInfo> sInfo);
//void tx_miscOperations(TOOL_TYPE tool, int idx, int value, QString str);
void tx_ADB_ProcessData(signalStructure sig);
public slots:
void rx_StartRepairing(int idx, bool startStop, TOOL_TYPE tool);
void rx_updateSerialPorts();
void rx_updateADBdevices();
void rx_ADB_OutPutReceived();
void rx_ADB_ErrorReceived();
void rx_timer_SPDTool_elapsed();
void rx_timer_singleShot_elapsed();
private:
signalStructure signal;
QSerialPort *serialport;
QProcess *adbProcess;
QTimer *timer_SPDTool;
QTimer *timer_SingleShot;
int singleShotIndex = 0;
QString spd_commandlineOutPut = "";
QString spd_commandError = "";
QString spd_commandStr = "";
QString powerShellPath = "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe";
QString cmdShellPath = "C:/windows/system32/cmd.exe";
QString m3FolderPath = QString(QDir::currentPath() + "/M3");
QString adbFolderPath = QString(QDir::currentPath() + "/ADB/");
QString ChinoeIMEICMToolFolderPath_Data1 = QString(QDir::currentPath() + "/DATA/DATA1/");
QString ChinoeIMEICMToolFolderPath_Data2 = QString(QDir::currentPath() + "/DATA/DATA2");
QString ChinoeIMEICMToolFolderPath_Data3 = QString(QDir::currentPath() + "/DATA/DATA3");
QString ChinoeIMEICMToolFolderPath_Data4 = QString(QDir::currentPath() + "/DATA/DATA3");
QString fastBootFolderPath = QString(QDir::currentPath() + "/DATA/fastboot");
//1. "E6I"
QString simUnLock_E6I = QString(QDir::currentPath() +"/DATA/DATA1/e6isimlock/fijisc_mexico.att.bin");
//2. "E7I"
QString simUnLock_E7I = QString(QDir::currentPath() +"/DATA/DATA1/E7Isimlock/maltalsc_guatemala.tigo.bin");
//3. "E6s XT2053"
QString simUnLock_E6sXT2053 = QString(QDir::currentPath() +"/DATA/DATA2/e6eSimlock/SIMLock.MTK.Guatemala.Tigo.20191128.SIMLock");
//4. "G8 Power Lite XT2055"
QString simUnLock_G8PowerLite = QString(QDir::currentPath() +"/DATA/DATA2/g8simlock/SIMLock.MTK.Guatemala.Claro.20200720.SIMLock");
//5. "E7 Play XT2095"
QString simUnLock_E7PlayXT2095 = QString(QDir::currentPath() +"/DATA/DATA2/E7simlock/SIMLock.MTK.Guatemala.Tigo.20201014.SIMLock");
//6. "G20"
QString simUnLock_G20 = QString(QDir::currentPath() +"/DATA/DATA3/g20simlock/simlock-attmx_region.bin");
//7. E20 XT2155
QString simUnLock_E20xt2155 = QString(QDir::currentPath() +"/DATA/DATA4/e20xt2155/simlock.bin");
//8. E40 XT2159
QString simUnLock_E40xt2159 = QString(QDir::currentPath() +"/DATA/DATA4/e40xt2159/simlock.bin");
QStringList shellArguments;
bool processStartStop = false;
bool showThisinDebug = false;
bool adb_InfoOnly = false;
bool actualADBcommands = false;
//TOOL_TYPE currentToolType = Tool_MTK;
ADB_Commands currentADB = ADB_Idle;
void getConnectedDevices_andSendThemGUI(QByteArray ba);
bool getServerIMEInumber_updateGlobal();
bool getServerFastBoot_File();
QVector<QString> adbDevicesRaw;
bool adbDeviceDetectedandAuthorized = false;
QString frp_ProdName = "", frp_uniqID = "";
QByteArray frp_PassWord;
bool frp_infoCompleted = false;
int frpInfoIndex = 0;
QString fastBoot_FileName ;
QString frp_DeviceID = "";
void getADB_Model(QByteArray ba);
void getADB_AndroidVersion(QByteArray ba);
void getADB_BuildDate(QByteArray ba);
void getADB_SerialNumber(QByteArray ba);
void getADB_AssignPortCmd(QByteArray ba);
void getADB_Original_imei(QByteArray ba);
void getADB_rebootCommand(QByteArray ba);
void getADB_ChinoeIMEICMTool(QByteArray ba);
void get_ChinoeDirectory1(QByteArray ba);
void get_ChinoeDirectory2(QByteArray ba);
void get_ChinoeDirectory3(QByteArray ba);
void get_FRP_GetServerFile(QByteArray ba);
void get_FRP_PushFile(QByteArray ba);
void get_FRP_FastBootErase(QByteArray ba);
void get_FRP_Fast_Reboot(QByteArray ba);
void getFastBoot_info(QByteArray ba);
void getADB_UnLockSIMTool(QByteArray ba);
bool nowForSecondIMEI = false;
bool fastbootEraseDone = false;
bool fastbootRebootingDone = false;
bool fastBootPushCommandDone = false;
ADB_Commands sendOperationDetailsToServerToReduceCredit();
};
#endif // BACKENDCLASS_H