├── README.md ├── sourcecode ├── LsUsb │ ├── LsUsb.cpp │ ├── stdafx.h │ ├── stdafx.cpp │ ├── targetver.h │ └── LsUsb.vcxproj.filters ├── lsdrive │ ├── stdafx.h │ ├── stdafx.cpp │ ├── targetver.h │ ├── lsdrive.vcxproj.filters │ └── lsdrive.cpp ├── lscomUtf8 │ ├── stdafx.cpp │ ├── stdafx.h │ ├── targetver.h │ ├── LsCom.vcxproj.filters │ └── LsComUtf8.cpp ├── lscomQualcom │ ├── stdafx.h │ ├── stdafx.cpp │ ├── targetver.h │ ├── LsCom.vcxproj.filters │ └── LsComQualcom.cpp ├── UsbConnectEvent │ ├── stdafx.h │ ├── stdafx.cpp │ ├── targetver.h │ ├── UsbConnectEvent.cpp │ └── UsbConnectEvent.vcxproj.filters └── 26MobileTool │ ├── 26MobileTool.rc │ ├── image │ ├── Mobile.ico │ └── Button │ │ ├── checl.png │ │ ├── power.png │ │ ├── reboot.png │ │ ├── turnoff.png │ │ ├── Add_folder.png │ │ ├── download.png │ │ ├── left_back.png │ │ ├── left_back_1.png │ │ ├── Add_create_new.png │ │ ├── if_start_71143.png │ │ ├── if_shutdown_71140.png │ │ ├── if_sleep_mode_71142.png │ │ ├── if_shutdown_71140 (1).png │ │ ├── if_button-add_blue_68678.png │ │ ├── if_button-cross_red_69065.png │ │ ├── if_button-power_red_69071.png │ │ ├── if_sleep_mode_71142 (1).png │ │ ├── if_button-check_blue_68680.png │ │ ├── if_sleep_mode_prolonged_71141.png │ │ └── if_exclamation-circle_red_69107.png │ ├── main.cpp │ ├── Form │ ├── MainController.cpp │ ├── MainController.h │ ├── resource.h │ ├── AsusWidget.h │ ├── 26MobileTool.qrc │ ├── CmdWidget.h │ ├── Widget │ │ ├── 26MobileTool.qrc │ │ └── CmdWidget.ui │ ├── EmmcRawWidget.h │ ├── MediatekWidget.h │ ├── AsusWidget.cpp │ ├── TabWidgetBase.cpp │ ├── TabWidgetBase.h │ ├── MainWindow.h │ ├── MediatekWidget.cpp │ ├── EmmcRawWidget.cpp │ ├── QualComWidget.h │ ├── CmdWidget.cpp │ ├── AdbWidget.h │ └── xfstkdldrpluginoptionsinterface.h │ ├── Qualcom │ ├── emmcdl │ │ ├── crc.h │ │ ├── qcversion.h │ │ ├── targetver.h │ │ ├── emmcdl.h │ │ ├── xmlparser.h │ │ ├── serialport.h │ │ ├── firehose.h │ │ ├── crc.cpp │ │ ├── sparse.h │ │ ├── protocol.h │ │ ├── diskwriter.h │ │ ├── partition.h │ │ ├── sahara.h │ │ ├── sparse.cpp │ │ └── ffu.h │ └── fh_loader │ │ ├── fh_comdef.h │ │ └── fh_loader_sha.h │ ├── Class │ ├── MyThread.h │ └── MyThread.cpp │ ├── 26MobileTool.qrc │ ├── Intel │ ├── downloader │ │ ├── template │ │ │ ├── xfstkdldrpluginoptionsinterface.ui │ │ │ ├── xfstkdldrpluginuserinterface.ui │ │ │ ├── xfstkdldrpluginuserinterface.h │ │ │ ├── xfstkdldrpluginoptionsinterface.h │ │ │ ├── xfstkdldrpluginuserinterface.cpp │ │ │ ├── xfstkdldrpluginoptionsinterface.cpp │ │ │ ├── xfstkdldrplugintemplate.h │ │ │ └── xfstkdldrplugintemplate.cpp │ │ ├── XfstkDldrPluginTemplate_global.h │ │ ├── XfstkDldrPluginInterface.h │ │ ├── baytrail │ │ │ ├── xfstkdldrpluginbaytrail.h │ │ │ ├── xfstkdldrthread.h │ │ │ ├── xfstkdldrpluginoptionsinterface.h │ │ │ ├── xfstkdldrpluginbaytrail.cpp │ │ │ └── xfstkdldrpluginuserinterface.h │ │ ├── medfield │ │ │ ├── xfstkdldrpluginmedfield.h │ │ │ ├── xfstkdldrthread.h │ │ │ ├── xfstkdldrpluginmedfield.cpp │ │ │ ├── xfstkdldrpluginoptionsinterface.h │ │ │ └── xfstkdldrpluginuserinterface.h │ │ ├── cloverview │ │ │ ├── xfstkdldrplugincloverview.h │ │ │ ├── xfstkdldrthread.h │ │ │ ├── xfstkdldrplugincloverview.cpp │ │ │ ├── xfstkdldrpluginoptionsinterface.h │ │ │ └── xfstkdldrpluginuserinterface.h │ │ ├── merrifield │ │ │ ├── xfstkdldrpluginmerrifield.h │ │ │ ├── xfstkdldrthread.h │ │ │ ├── xfstkdldrpluginmerrifield.cpp │ │ │ └── xfstkdldrpluginoptionsinterface.h │ │ └── cloverviewplus │ │ │ ├── xfstkdldrplugincloverviewplus.h │ │ │ ├── xfstkdldrplugincloverviewplus.cpp │ │ │ ├── xfstkdldrthread.h │ │ │ ├── xfstkdldrpluginoptionsinterface.h │ │ │ └── xfstkdldrpluginuserinterface.h │ └── xfstk-dldr-api │ │ └── xfstk-dldr-api_global.h │ ├── xfstk-dldr-api │ └── xfstk-dldr-api_global.h │ ├── IntelSettingDialog.h │ └── 26MobileTool.pro ├── .gitattributes ├── AndroidMobileSolution.sln └── .gitignore /README.md: -------------------------------------------------------------------------------- 1 | # AndroidMobileSolution 2 | 3 | Android mobile software repair tool 4 | -------------------------------------------------------------------------------- /sourcecode/LsUsb/LsUsb.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/LsUsb/LsUsb.cpp -------------------------------------------------------------------------------- /sourcecode/LsUsb/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/LsUsb/stdafx.h -------------------------------------------------------------------------------- /sourcecode/LsUsb/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/LsUsb/stdafx.cpp -------------------------------------------------------------------------------- /sourcecode/LsUsb/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/LsUsb/targetver.h -------------------------------------------------------------------------------- /sourcecode/lsdrive/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/lsdrive/stdafx.h -------------------------------------------------------------------------------- /sourcecode/lscomUtf8/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/lscomUtf8/stdafx.cpp -------------------------------------------------------------------------------- /sourcecode/lscomUtf8/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/lscomUtf8/stdafx.h -------------------------------------------------------------------------------- /sourcecode/lsdrive/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/lsdrive/stdafx.cpp -------------------------------------------------------------------------------- /sourcecode/lsdrive/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/lsdrive/targetver.h -------------------------------------------------------------------------------- /sourcecode/lscomQualcom/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/lscomQualcom/stdafx.h -------------------------------------------------------------------------------- /sourcecode/lscomUtf8/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/lscomUtf8/targetver.h -------------------------------------------------------------------------------- /sourcecode/UsbConnectEvent/stdafx.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/UsbConnectEvent/stdafx.h -------------------------------------------------------------------------------- /sourcecode/lscomQualcom/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/lscomQualcom/stdafx.cpp -------------------------------------------------------------------------------- /sourcecode/lscomQualcom/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/lscomQualcom/targetver.h -------------------------------------------------------------------------------- /sourcecode/UsbConnectEvent/stdafx.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/UsbConnectEvent/stdafx.cpp -------------------------------------------------------------------------------- /sourcecode/UsbConnectEvent/targetver.h: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/UsbConnectEvent/targetver.h -------------------------------------------------------------------------------- /sourcecode/26MobileTool/26MobileTool.rc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/26MobileTool.rc -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Mobile.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Mobile.ico -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/checl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/checl.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/power.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/power.png -------------------------------------------------------------------------------- /sourcecode/UsbConnectEvent/UsbConnectEvent.cpp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/UsbConnectEvent/UsbConnectEvent.cpp -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/reboot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/reboot.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/turnoff.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/turnoff.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/Add_folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/Add_folder.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/download.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/left_back.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/left_back.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/left_back_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/left_back_1.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/Add_create_new.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/Add_create_new.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/if_start_71143.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/if_start_71143.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/if_shutdown_71140.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/if_shutdown_71140.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/if_sleep_mode_71142.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/if_sleep_mode_71142.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/if_shutdown_71140 (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/if_shutdown_71140 (1).png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/if_button-add_blue_68678.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/if_button-add_blue_68678.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/if_button-cross_red_69065.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/if_button-cross_red_69065.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/if_button-power_red_69071.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/if_button-power_red_69071.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/if_sleep_mode_71142 (1).png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/if_sleep_mode_71142 (1).png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/if_button-check_blue_68680.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/if_button-check_blue_68680.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/if_sleep_mode_prolonged_71141.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/if_sleep_mode_prolonged_71141.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/image/Button/if_exclamation-circle_red_69107.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/sauantao/AndroidMobileSolution/HEAD/sourcecode/26MobileTool/image/Button/if_exclamation-circle_red_69107.png -------------------------------------------------------------------------------- /sourcecode/26MobileTool/main.cpp: -------------------------------------------------------------------------------- 1 | #include "MainWindow.h" 2 | #include 3 | 4 | int main(int argc, char *argv[]) 5 | { 6 | QApplication a(argc, argv); 7 | MainWindow w; 8 | w.show(); 9 | return a.exec(); 10 | } 11 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/MainController.cpp: -------------------------------------------------------------------------------- 1 | #include "MainController.h" 2 | #include "MainWindow.h" 3 | 4 | 5 | 6 | MainController::MainController(QObject *parent, MainWindow *window) : 7 | QObject(parent),main_window(window) 8 | 9 | { 10 | 11 | } 12 | 13 | 14 | MainController::~MainController() 15 | { 16 | } 17 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/crc.h: -------------------------------------------------------------------------------- 1 | 2 | #include 3 | 4 | #define CRC_16_L_SEED 0xFFFF 5 | extern const unsigned short crc_16_l_table[]; 6 | 7 | #define CRC_16_L_STEP(xx_crc,xx_c) \ 8 | (((xx_crc) >> 8) ^ crc_16_l_table[((xx_crc) ^ (xx_c)) & 0x00ff]) 9 | 10 | unsigned short CalcCRC16(BYTE *buf, int length); -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/qcversion.h: -------------------------------------------------------------------------------- 1 | #define FILEVER 333,039,0,0 2 | #define STRFILEVER "333.039.0.0" 3 | #define STRORIGINALFILENAME "emmcdl.exe" 4 | #define STRCOMPANYNAME "QUALCOMM Incorporated" 5 | #define STRLEGALCOPYRIGHT "Copyright (C) 2012 QUALCOMM Incorporated. All rights reserved." 6 | #define STRPRODUCTNAME "QUALCOMM Windows on Snapdragon" 7 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/targetver.h: -------------------------------------------------------------------------------- 1 | #pragma once 2 | 3 | // Including SDKDDKVer.h defines the highest available Windows platform. 4 | 5 | // If you wish to build your application for a previous Windows platform, include WinSDKVer.h and 6 | // set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. 7 | #include 8 | #define VERSION_MAJOR 2 9 | #define VERSION_MINOR 15 10 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/MainController.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINCONTROLLER_H 2 | #define MAINCONTROLLER_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | class MainWindow; 9 | 10 | 11 | class MainController : public QObject 12 | { 13 | Q_OBJECT 14 | public: 15 | explicit MainController(QObject *parent, MainWindow * window); 16 | ~MainController(); 17 | 18 | private: 19 | MainWindow *main_window; 20 | 21 | }; 22 | #endif // MAINCONTROLLER_H 23 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by emmcdlGui.rc 4 | 5 | // Next default values for new objects 6 | // 7 | #ifdef APSTUDIO_INVOKED 8 | #ifndef APSTUDIO_READONLY_SYMBOLS 9 | #define _APS_NEXT_RESOURCE_VALUE 101 10 | #define _APS_NEXT_COMMAND_VALUE 40001 11 | #define _APS_NEXT_CONTROL_VALUE 1001 12 | #define _APS_NEXT_SYMED_VALUE 101 13 | #endif 14 | #endif 15 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Class/MyThread.h: -------------------------------------------------------------------------------- 1 | #ifndef MYTHREAD_H 2 | #define MYTHREAD_H 3 | 4 | #include 5 | 6 | 7 | 8 | class MyThread : public QThread 9 | { 10 | Q_OBJECT 11 | public: 12 | explicit MyThread(QObject *parent = 0); 13 | void stop(); 14 | 15 | // if Stop = true, the thread will break 16 | // out of the loop, and will be disposed 17 | bool iSStop; 18 | 19 | signals: 20 | // To communicate with Gui Thread 21 | // we need to emit a signal 22 | void valueChanged(int); 23 | void process_changed(int); 24 | 25 | public slots: 26 | protected: 27 | void run(); 28 | 29 | }; 30 | #endif // MYTHREAD_H 31 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/AsusWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef ASUSWIDGET_H 2 | #define ASUSWIDGET_H 3 | 4 | #include "TabWidgetBase.h" 5 | #include 6 | #include 7 | 8 | 9 | 10 | namespace Ui { 11 | class AsusWidget; 12 | } 13 | 14 | class MainWindow; 15 | 16 | class AsusWidget : public TabWidgetBase 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | explicit AsusWidget(QTabWidget *parent, MainWindow* window); 22 | ~AsusWidget(); 23 | 24 | DECLARE_TABWIDGET_VFUNCS() 25 | 26 | 27 | 28 | private: 29 | 30 | Ui::AsusWidget *ui; 31 | 32 | MainWindow* main_window; 33 | 34 | }; 35 | 36 | 37 | #endif // ASUSWIDGET_H 38 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/26MobileTool.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | image/Button/if_button-power_red_69071.png 4 | image/Button/if_button-cross_red_69065.png 5 | image/Button/if_button-check_blue_68680.png 6 | image/Button/checl.png 7 | image/Button/power.png 8 | image/Button/if_start_71143.png 9 | image/Button/reboot.png 10 | image/Button/turnoff.png 11 | image/Button/Add_folder.png 12 | 13 | 14 | image/Button/Add_folder.png 15 | 16 | 17 | image/Mobile.ico 18 | 19 | 20 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/26MobileTool.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | image/Button/if_button-power_red_69071.png 4 | image/Button/if_button-cross_red_69065.png 5 | image/Button/if_button-check_blue_68680.png 6 | image/Button/checl.png 7 | image/Button/power.png 8 | image/Button/if_start_71143.png 9 | image/Button/reboot.png 10 | image/Button/turnoff.png 11 | image/Button/Add_folder.png 12 | 13 | 14 | image/Button/Add_folder.png 15 | 16 | 17 | image/Mobile.ico 18 | 19 | 20 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/CmdWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef CMDWIDGET_H 2 | #define CMDWIDGET_H 3 | 4 | #include 5 | #include "TabWidgetBase.h" 6 | #include 7 | #include 8 | 9 | namespace Ui { 10 | class CmdWidget; 11 | } 12 | class MainWindow; 13 | class CmdWidget : public TabWidgetBase 14 | { 15 | Q_OBJECT 16 | 17 | public: 18 | explicit CmdWidget(QTabWidget *parent, MainWindow* window); 19 | ~CmdWidget(); 20 | 21 | DECLARE_TABWIDGET_VFUNCS() 22 | private: 23 | QProcess *m_process; 24 | Ui::CmdWidget *ui; 25 | MainWindow* main_window_; 26 | public slots: 27 | void setStdout(); 28 | void command(); 29 | void commandLineEdit(); 30 | private slots: 31 | 32 | //void on_pushButton_clicked(); 33 | 34 | }; 35 | 36 | #endif // CMDWIDGET_H 37 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Class/MyThread.cpp: -------------------------------------------------------------------------------- 1 | #include "mythread.h" 2 | #include 3 | 4 | 5 | 6 | 7 | MyThread::MyThread(QObject *parent) : 8 | QThread(parent) 9 | { 10 | } 11 | 12 | // run() will be called when a thread starts 13 | void MyThread::run() 14 | { 15 | for (int i = 0; i <= 100; i++) 16 | { 17 | int process = 0; 18 | // prevent other threads from changing the "Stop" value 19 | qDebug ()<< i << "chao ca nha"; 20 | if (iSStop == true) 21 | { 22 | break; 23 | } 24 | // emit the signal for the count label 25 | process = i * 100 / 99; 26 | emit process_changed(process); 27 | 28 | emit valueChanged(i); 29 | 30 | // slowdown the count change, msec 31 | this->msleep(500); 32 | } 33 | } 34 | void MyThread::stop() 35 | { 36 | iSStop = true; 37 | } 38 | 39 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/Widget/26MobileTool.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | image/Button/if_button-power_red_69071.png 4 | image/Button/if_button-cross_red_69065.png 5 | image/Button/if_button-check_blue_68680.png 6 | image/Button/checl.png 7 | image/Button/power.png 8 | image/Button/if_start_71143.png 9 | image/Button/reboot.png 10 | image/Button/turnoff.png 11 | image/Button/Add_folder.png 12 | 13 | 14 | image/Button/Add_folder.png 15 | 16 | 17 | image/Mobile.ico 18 | 19 | 20 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/EmmcRawWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef EMMCRAW_H 2 | #define EMMCRAW_H 3 | 4 | #include 5 | #include "TabWidgetBase.h" 6 | 7 | namespace Ui { 8 | class EmmcRawWidget; 9 | } 10 | class MainWindow; 11 | class EmmcRawWidget : public TabWidgetBase 12 | { 13 | Q_OBJECT 14 | 15 | public: 16 | enum Column{ 17 | ColumnEnable = 0, 18 | ColumnName, 19 | ColumnReadFlag, 20 | ColumnAddr, 21 | ColumnLength, 22 | ColumnRegion, 23 | ColumnFile 24 | }; 25 | explicit EmmcRawWidget(QTabWidget *parent, MainWindow *window); 26 | ~EmmcRawWidget(); 27 | DECLARE_TABWIDGET_VFUNCS() 28 | int AddItem(); 29 | private slots: 30 | void on_pushButton_7_clicked(); 31 | 32 | private: 33 | Ui::EmmcRawWidget *ui; 34 | MainWindow *main_window_; 35 | }; 36 | 37 | #endif // EMMCRAW_H 38 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/MediatekWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef MEDIATEKWIDGET_H 2 | #define MEDIATEKWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include "TabWidgetBase.h" 10 | 11 | namespace Ui { 12 | 13 | class MediatekWidget; 14 | } 15 | class MainWindow; 16 | class MediatekWidget : public TabWidgetBase 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | explicit MediatekWidget(QTabWidget *parent, MainWindow* window); 22 | 23 | ~MediatekWidget(); 24 | DECLARE_TABWIDGET_VFUNCS() 25 | 26 | private slots: 27 | void on_pushButton_Loadfile_clicked(); 28 | 29 | void on_pushButton_Save_clicked(); 30 | 31 | void on_pushButton_Load_clicked(); 32 | 33 | void on_pushButton_Clear_clicked(); 34 | 35 | private: 36 | 37 | Ui::MediatekWidget* ui; 38 | MainWindow* main_window_; 39 | 40 | }; 41 | #endif // MEDIATEKWIDGET_H 42 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/AsusWidget.cpp: -------------------------------------------------------------------------------- 1 | #include "AsusWidget.h" 2 | #include "ui_AsusWidget.h" 3 | #include 4 | 5 | 6 | AsusWidget::AsusWidget(QTabWidget *parent, MainWindow *window) : 7 | TabWidgetBase(5, tr("&Asus Widget"), parent),ui(new Ui::AsusWidget),main_window(window) 8 | { 9 | ui->setupUi(this); 10 | } 11 | AsusWidget::~AsusWidget() 12 | { 13 | delete ui; 14 | } 15 | void AsusWidget::LockOnUI() 16 | { 17 | //enableControl(false); 18 | } 19 | void AsusWidget::DoFinished() 20 | { 21 | //enableControl(true); 22 | } 23 | void AsusWidget::UpdateUI() 24 | { 25 | ui->retranslateUi(this); 26 | } 27 | void AsusWidget::SetTabLabel(QTabWidget *tab_widget, int index) 28 | { 29 | QString label = "CMD";// LoadQString(LANGUAGE_TAG, IDS_STRING_CLONEDOWNLOAD); 30 | 31 | tab_widget->setTabText(index, label); 32 | } 33 | void AsusWidget::SetShortCut(int, const QString &) 34 | { 35 | 36 | } 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/TabWidgetBase.cpp: -------------------------------------------------------------------------------- 1 | #include "TabWidgetBase.h" 2 | #include 3 | #include 4 | 5 | TabWidgetBase::TabWidgetBase(int index, const QString& name, QTabWidget *parent) : 6 | QTabWidget(parent), 7 | tab_parent(parent), 8 | tab_index(index), 9 | tab_name(name), 10 | tab_visible(false) 11 | { 12 | } 13 | 14 | void TabWidgetBase::Detach() 15 | { 16 | int index = tab_parent->indexOf(this); 17 | if (index != -1) 18 | { 19 | tab_parent->removeTab(index); 20 | } 21 | tab_visible = false; 22 | } 23 | 24 | void TabWidgetBase::Attach() 25 | { 26 | if (tab_parent->indexOf(this) == -1) 27 | { 28 | tab_parent->insertTab(tab_index, this, tab_name); 29 | } 30 | tab_visible = true; 31 | } 32 | 33 | bool TabWidgetBase::IsSelectedTab() 34 | { 35 | int curIndex = tab_parent->currentIndex(); 36 | int tabIndex = tab_parent->indexOf(this); 37 | 38 | return (curIndex == tabIndex); 39 | } 40 | 41 | void TabWidgetBase::SetTabEnabled(bool enable) 42 | { 43 | this->setEnabled(enable); 44 | } -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/TabWidgetBase.h: -------------------------------------------------------------------------------- 1 | #ifndef TABWIDGETBASE_H 2 | #define TABWIDGETBASE_H 3 | #include 4 | 5 | #define DECLARE_TABWIDGET_VFUNCS() \ 6 | virtual void LockOnUI(); \ 7 | virtual void DoFinished(); \ 8 | virtual void UpdateUI(); \ 9 | virtual void SetTabLabel(QTabWidget *, int );\ 10 | virtual void SetShortCut(int , const QString &); 11 | 12 | class TabWidgetBase : public QTabWidget 13 | { 14 | Q_OBJECT 15 | public: 16 | explicit TabWidgetBase(int index, const QString& name, QTabWidget *parent); 17 | virtual ~TabWidgetBase() {} 18 | 19 | virtual void LockOnUI() = 0; 20 | virtual void DoFinished() = 0; 21 | 22 | virtual void UpdateUI() = 0; 23 | virtual void SetTabLabel(QTabWidget *tab_widget, int index) = 0; 24 | 25 | //virtual void SetShortCut(int cmd, const QString &shortcut) = 0; 26 | 27 | void Detach(); 28 | void Attach(); 29 | 30 | bool IsSelectedTab(); 31 | void SetTabEnabled(bool enable); 32 | protected: 33 | QTabWidget * tab_parent; 34 | const int tab_index; 35 | const QString tab_name; 36 | 37 | bool tab_visible; 38 | 39 | signals: 40 | 41 | public slots : 42 | 43 | }; 44 | 45 | #endif // TABWIDGETBASE_H -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/template/xfstkdldrpluginoptionsinterface.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | XfstkDldrPluginOptionsInterface 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | QTabWidget::North 23 | 24 | 25 | 0 26 | 27 | 28 | 29 | Template Options 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/XfstkDldrPluginTemplate_global.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | 19 | #ifndef XFSTKDLDRPLUGINTEMPLATE_GLOBAL_H 20 | #define XFSTKDLDRPLUGINTEMPLATE_GLOBAL_H 21 | 22 | #include 23 | 24 | #if defined(XFSTKDLDRPLUGINTEMPLATE_LIBRARY) 25 | # define XFSTKDLDRPLUGINTEMPLATESHARED_EXPORT Q_DECL_EXPORT 26 | #else 27 | # define XFSTKDLDRPLUGINTEMPLATESHARED_EXPORT Q_DECL_IMPORT 28 | #endif 29 | 30 | #endif // XFSTKDLDRPLUGINTEMPLATE_GLOBAL_H 31 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/template/xfstkdldrpluginuserinterface.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | XfstkDldrPluginUserInterface 4 | 5 | 6 | 7 | 0 8 | 0 9 | 400 10 | 300 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | QTabWidget::South 23 | 24 | 25 | 0 26 | 27 | 28 | 29 | Test 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /sourcecode/LsUsb/LsUsb.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | -------------------------------------------------------------------------------- /sourcecode/lscomUtf8/LsCom.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | -------------------------------------------------------------------------------- /sourcecode/lsdrive/lsdrive.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | -------------------------------------------------------------------------------- /sourcecode/lscomQualcom/LsCom.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | -------------------------------------------------------------------------------- /sourcecode/UsbConnectEvent/UsbConnectEvent.vcxproj.filters: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | {4FC737F1-C7A5-4376-A066-2A32D752A2FF} 6 | cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx 7 | 8 | 9 | {93995380-89BD-4b04-88EB-625FBE52EBFB} 10 | h;hh;hpp;hxx;hm;inl;inc;xsd 11 | 12 | 13 | {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} 14 | rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms 15 | 16 | 17 | 18 | 19 | Header Files 20 | 21 | 22 | Header Files 23 | 24 | 25 | 26 | 27 | Source Files 28 | 29 | 30 | Source Files 31 | 32 | 33 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/emmcdl.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * emmcdl.h 3 | * 4 | * This file has all definitions for command line parameters and structures 5 | * 6 | * Copyright (c) 2007-2011 7 | * Qualcomm Technologies Incorporated. 8 | * All Rights Reserved. 9 | * Qualcomm Confidential and Proprietary 10 | * 11 | *****************************************************************************/ 12 | /*============================================================================= 13 | Edit History 14 | 15 | $Header: //source/qcom/qct/platform/uefi/workspaces/pweber/apps/8x26_emmcdl/emmcdl/main/latest/inc/emmcdl.h#3 $ 16 | $DateTime: 2014/06/11 17:27:14 $ $Author: pweber $ 17 | 18 | when who what, where, why 19 | ------------------------------------------------------------------------------- 20 | 11/28/11 pgw Initial version. 21 | =============================================================================*/ 22 | #pragma once 23 | 24 | #define STREAMING_PROTOCOL 1 25 | #define FIREHOSE_PROTOCOL 2 26 | 27 | enum emmc_cmd_e { 28 | EMMC_CMD_NONE, 29 | EMMC_CMD_LIST, 30 | EMMC_CMD_DUMP, 31 | EMMC_CMD_ERASE, 32 | EMMC_CMD_WRITE, 33 | EMMC_CMD_WIPE, 34 | EMMC_CMD_GPP, 35 | EMMC_CMD_TEST, 36 | EMMC_CMD_WRITE_GPT, 37 | EMMC_CMD_RESET, 38 | EMMC_CMD_FFU, 39 | EMMC_CMD_LOAD_MRPG, 40 | EMMC_CMD_GPT, 41 | EMMC_CMD_SPLIT_FFU, 42 | EMMC_CMD_RAW, 43 | EMMC_CMD_LOAD_FFU, 44 | EMMC_CMD_INFO 45 | }; 46 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/xfstk-dldr-api/xfstk-dldr-api_global.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRAPI_GLOBAL_H 19 | #define XFSTKDLDRAPI_GLOBAL_H 20 | 21 | #if defined XFSTK_OS_WIN 22 | #else 23 | #include 24 | #endif 25 | 26 | #if defined XFSTK_OS_WIN 27 | 28 | #if defined(XFSTKDLDRAPI_LIBRARY) 29 | # define XFSTKDLDRAPISHARED_EXPORT __declspec(dllexport) 30 | #else 31 | # define XFSTKDLDRAPISHARED_EXPORT __declspec(dllimport) 32 | #endif 33 | 34 | #else 35 | 36 | #if defined(XFSTKDLDRAPI_LIBRARY) 37 | # define XFSTKDLDRAPISHARED_EXPORT Q_DECL_EXPORT 38 | #else 39 | # define XFSTKDLDRAPISHARED_EXPORT Q_DECL_IMPORT 40 | #endif 41 | 42 | #endif 43 | 44 | #endif // XFSTKDLDRAPI_GLOBAL_H 45 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/xfstk-dldr-api/xfstk-dldr-api_global.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2014 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRAPI_GLOBAL_H 19 | #define XFSTKDLDRAPI_GLOBAL_H 20 | 21 | #if defined XFSTK_OS_WIN 22 | #else 23 | #include 24 | #endif 25 | 26 | #if defined XFSTK_OS_WIN 27 | 28 | #if defined(XFSTKDLDRAPI_LIBRARY) 29 | # define XFSTKDLDRAPISHARED_EXPORT __declspec(dllexport) 30 | #else 31 | # define XFSTKDLDRAPISHARED_EXPORT __declspec(dllimport) 32 | #endif 33 | 34 | #else 35 | 36 | #if defined(XFSTKDLDRAPI_LIBRARY) 37 | # define XFSTKDLDRAPISHARED_EXPORT Q_DECL_EXPORT 38 | #else 39 | # define XFSTKDLDRAPISHARED_EXPORT Q_DECL_IMPORT 40 | #endif 41 | 42 | #endif 43 | 44 | #endif // XFSTKDLDRAPI_GLOBAL_H 45 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/template/xfstkdldrpluginuserinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINUSERINTERFACE_H 19 | #define XFSTKDLDRPLUGINUSERINTERFACE_H 20 | #include 21 | #include 22 | 23 | namespace Ui { 24 | class XfstkDldrPluginUserInterface; 25 | } 26 | 27 | class XfstkDldrPluginUserInterface : public QWidget { 28 | Q_OBJECT 29 | public: 30 | XfstkDldrPluginUserInterface(QWidget *parent = 0); 31 | ~XfstkDldrPluginUserInterface(); 32 | QTabWidget *GetTabInterface(); 33 | Ui::XfstkDldrPluginUserInterface *ui; 34 | 35 | protected: 36 | void changeEvent(QEvent *e); 37 | 38 | private: 39 | 40 | }; 41 | 42 | #endif // XFSTKDLDRPLUGINUSERINTERFACE_H 43 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/template/xfstkdldrpluginoptionsinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINOPTIONSINTERFACE_H 19 | #define XFSTKDLDRPLUGINOPTIONSINTERFACE_H 20 | #include 21 | #include 22 | 23 | namespace Ui { 24 | class XfstkDldrPluginOptionsInterface; 25 | } 26 | 27 | class XfstkDldrPluginOptionsInterface : public QWidget { 28 | Q_OBJECT 29 | public: 30 | XfstkDldrPluginOptionsInterface(QWidget *parent = 0); 31 | ~XfstkDldrPluginOptionsInterface(); 32 | QTabWidget *GetTabInterface(); 33 | Ui::XfstkDldrPluginOptionsInterface *ui; 34 | 35 | protected: 36 | void changeEvent(QEvent *e); 37 | 38 | private: 39 | 40 | }; 41 | 42 | #endif // XFSTKDLDRPLUGINOPTIONSINTERFACE_H 43 | -------------------------------------------------------------------------------- /sourcecode/lscomQualcom/LsComQualcom.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | 7 | #ifndef ARM 8 | #include "setupapi.h" 9 | #define INITGUID 1 10 | #include "devpkey.h" 11 | #endif //ARM 12 | 13 | int InitDiskList() 14 | { 15 | #ifndef ARM 16 | HDEVINFO hDevInfo = SetupDiGetClassDevs(&GUID_DEVINTERFACE_COMPORT, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT); 17 | DEVPROPTYPE ulPropertyType = DEVPROP_TYPE_STRING; 18 | DWORD dwSize; 19 | #endif //ARM 20 | 21 | //wprintf(_T("Tim kiem tat ca cac thiet bi o che do 9008 ...\n\n")); 22 | cout << "tim kiem tat ca cac thiet bi 9008\n"; 23 | #ifndef ARM 24 | if (hDevInfo != INVALID_HANDLE_VALUE) { 25 | // Successfully got a list of ports 26 | for (int i = 0; ; i++) { 27 | WCHAR szBuffer[512]; 28 | SP_DEVINFO_DATA DeviceInfoData; 29 | DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA); 30 | if (!SetupDiEnumDeviceInfo(hDevInfo, i, &DeviceInfoData) && (GetLastError() == ERROR_NO_MORE_ITEMS)) { 31 | // No more ports 32 | break; 33 | } 34 | // successfully found entry print out the info 35 | if (SetupDiGetDeviceProperty(hDevInfo, &DeviceInfoData, &DEVPKEY_Device_FriendlyName, &ulPropertyType, (BYTE*)szBuffer, sizeof(szBuffer), &dwSize, 0)) { 36 | if ((GetLastError() == ERROR_SUCCESS) && wcsstr(szBuffer, L"QDLoader 9008") != NULL) { 37 | wprintf(szBuffer); 38 | cout << endl; 39 | //cout << szBuffer << endl; 40 | } 41 | } 42 | } 43 | 44 | } 45 | #endif //ARM 46 | return ERROR_SUCCESS; 47 | } 48 | 49 | 50 | int main() 51 | { 52 | InitDiskList(); 53 | system("pause"); 54 | 55 | return 0; 56 | } -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/MainWindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | #include 4 | #include "ui_MainWindow.h" 5 | #include "mythread.h" 6 | #include 7 | #include "xfstkdldrpluginuserinterface.h" 8 | 9 | namespace Ui { 10 | class MainWindow; 11 | } 12 | class MainWindowCallback; 13 | class TabWidgetBase; 14 | class CmdWidget; 15 | class QTabWidget; 16 | class AdbWidget; 17 | class EmmcRawWidget; 18 | class QualComWidget; 19 | class AsusWidget; 20 | class MediatekWidget; 21 | class XfstkDldrPluginUserInterface; 22 | 23 | class MainWindow : public QMainWindow 24 | { 25 | Q_OBJECT 26 | public: 27 | 28 | //MainWindow(QWidget *parent = Q_NULLPTR); 29 | explicit MainWindow(QWidget *parent = 0); 30 | 31 | ~MainWindow(); 32 | 33 | int Tesmain(); 34 | 35 | void CreateWidget(); 36 | 37 | Ui::MainWindow *ui; 38 | 39 | private: 40 | 41 | //MyThread * mythread; 42 | 43 | QualComWidget * qualcom_widget; 44 | 45 | CmdWidget * cmd_widget; 46 | 47 | AdbWidget * adb_widget; 48 | 49 | EmmcRawWidget * emmcraw_widget; 50 | 51 | AsusWidget * asus_widget; 52 | 53 | MediatekWidget * mediatek_widget; 54 | 55 | std::list tab_widgets; 56 | 57 | XfstkDldrPluginUserInterface * intel_widtget; 58 | 59 | protected: 60 | 61 | void closeEvent(QCloseEvent *event); 62 | 63 | signals: 64 | 65 | public slots: 66 | 67 | 68 | private slots: 69 | 70 | 71 | void on_toolButton_OpQualcom_clicked(); 72 | 73 | void on_toolButton_OpMediatek_clicked(); 74 | 75 | void on_toolButton_OpIntel_clicked(); 76 | 77 | void on_toolButton_OpSprd_clicked(); 78 | 79 | void on_toolButton_OpAndroid_clicked(); 80 | }; 81 | #endif // MAINWINDOW_H 82 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/xmlparser.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * xmlparser.h 3 | * 4 | * This file is used to parse xml files and contents 5 | * 6 | * Copyright (c) 2007-2013 7 | * Qualcomm Technologies Incorporated. 8 | * All Rights Reserved. 9 | * Qualcomm Confidential and Proprietary 10 | * 11 | *****************************************************************************/ 12 | /*============================================================================= 13 | Edit History 14 | 15 | $Header: //source/qcom/qct/platform/uefi/workspaces/pweber/apps/8x26_emmcdl/emmcdl/main/latest/inc/xmlparser.h#2 $ 16 | $DateTime: 2014/08/05 11:44:01 $ $Author: pweber $ 17 | 18 | when who what, where, why 19 | ------------------------------------------------------------------------------- 20 | 05/13/13 pgw Initial version. 21 | =============================================================================*/ 22 | 23 | #pragma once 24 | 25 | 26 | #include 27 | #include 28 | 29 | #define MAX_STRING_LEN 512 30 | typedef unsigned __int64 uint64; 31 | 32 | class XMLParser { 33 | public: 34 | XMLParser(); 35 | ~XMLParser(); 36 | int LoadXML(TCHAR * fname); 37 | int ParseXMLString(char *line, char *key, char *value); 38 | int ParseXMLInteger(char *line, char *key, uint64 *value); 39 | char *StringReplace(char *inp, char *find, char *rep); 40 | char *StringSetValue(char *key, char *keyName, char *value); 41 | 42 | private: 43 | char *xmlStart; 44 | char *xmlEnd; 45 | char *keyStart; 46 | char *keyEnd; 47 | 48 | int ParseXMLEvaluate(char *expr, uint64 &value); 49 | 50 | }; 51 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/fh_loader/fh_comdef.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * Common type definitions. 3 | * 4 | * Copyright (c) 2016 Qualcomm Technologies, Inc. 5 | * All Rights Reserved. 6 | * Qualcomm Proprietary 7 | * 8 | *************************************************************************/ 9 | 10 | /*=========================================================================== 11 | 12 | EDIT HISTORY FOR MODULE 13 | 14 | This section contains comments describing changes made to the module. 15 | Notice that changes are listed in reverse chronological order. 16 | 17 | $Header: //components/rel/boot.xf/1.0/QcomPkg/Tools/storage/fh_loader/fh_loader/fh_comdef.h#1 $ 18 | $DateTime: 2016/05/11 00:15:02 $ 19 | $Author: pwbldsvc $ 20 | 21 | when who what, where, why 22 | ---------- --- --------------------------------------------------------- 23 | 2016-01-15 wek Create. 24 | 25 | ===========================================================================*/ 26 | 27 | #ifndef __COMDEF_H__ 28 | #define __COMDEF_H__ 29 | 30 | #include 31 | 32 | typedef int8_t int8; 33 | typedef int16_t int16; 34 | typedef int32_t int32; 35 | typedef int64_t int64; 36 | typedef uint8_t uint8; 37 | typedef uint16_t uint16; 38 | typedef uint32_t uint32; 39 | typedef uint64_t uint64; 40 | typedef int8_t INT8; 41 | typedef int16_t INT16; 42 | typedef int32_t INT32; 43 | typedef int64_t INT64; 44 | typedef uint8_t UINT8; 45 | typedef uint16_t UINT16; 46 | typedef uint32_t UINT32; 47 | typedef uint64_t UINT64; 48 | 49 | #endif /* __COMDEF_H__ */ 50 | -------------------------------------------------------------------------------- /sourcecode/lscomUtf8/LsComUtf8.cpp: -------------------------------------------------------------------------------- 1 | #include "stdafx.h" 2 | #include 3 | #include 4 | 5 | using namespace std; 6 | 7 | #ifndef ARM 8 | #include "setupapi.h" 9 | #define INITGUID 1 10 | #include "devpkey.h" 11 | #endif //ARM 12 | 13 | int InitDiskList() 14 | { 15 | #ifndef ARM 16 | HDEVINFO hDevInfo = SetupDiGetClassDevs(&GUID_DEVINTERFACE_COMPORT, NULL, NULL, DIGCF_DEVICEINTERFACE | DIGCF_PRESENT); 17 | DEVPROPTYPE ulPropertyType = DEVPROP_TYPE_STRING; 18 | DWORD dwSize; 19 | #endif //ARM 20 | 21 | //wprintf(_T("Tim kiem tat ca cac thiet bi o che do 9008 ...\n\n")); 22 | #ifndef ARM 23 | if (hDevInfo != INVALID_HANDLE_VALUE) { 24 | // Successfully got a list of ports 25 | for (int i = 0; ; i++) { 26 | WCHAR szBuffer[512]; 27 | SP_DEVINFO_DATA DeviceInfoData; 28 | DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA); 29 | if (!SetupDiEnumDeviceInfo(hDevInfo, i, &DeviceInfoData) && (GetLastError() == ERROR_NO_MORE_ITEMS)) { 30 | // No more ports 31 | break; 32 | } 33 | // successfully found entry print out the info 34 | if (SetupDiGetDeviceProperty(hDevInfo, &DeviceInfoData, &DEVPKEY_Device_FriendlyName, &ulPropertyType, (BYTE*)szBuffer, sizeof(szBuffer), &dwSize, 0)) { 35 | if ((GetLastError() == ERROR_SUCCESS) && wcsstr(szBuffer, L"QDLoader 9008") != NULL) { 36 | //wprintf(_T(">>")); 37 | wprintf(szBuffer); 38 | //wprintf(_T("\n\n")); 39 | //WCHAR *vcom = wcsstr(szBuffer, L"COM"); 40 | //wprintf(_T("\n")); 41 | //wprintf(_T(">> : (")); 42 | //wprintf(vcom); 43 | //wprintf(_T("\n\n\n\n\n")); 44 | 45 | } 46 | } 47 | } 48 | 49 | } 50 | #endif //ARM 51 | return ERROR_SUCCESS; 52 | } 53 | 54 | 55 | int main() 56 | { 57 | InitDiskList(); 58 | system("pause"); 59 | 60 | return 0; 61 | } -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/template/xfstkdldrpluginuserinterface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #include "xfstkdldrpluginuserinterface.h" 19 | #include "ui_xfstkdldrpluginuserinterface.h" 20 | 21 | XfstkDldrPluginUserInterface::XfstkDldrPluginUserInterface(QWidget *parent) : 22 | QWidget(parent), 23 | ui(new Ui::XfstkDldrPluginUserInterface) 24 | { 25 | ui->setupUi(this); 26 | } 27 | 28 | XfstkDldrPluginUserInterface::~XfstkDldrPluginUserInterface() 29 | { 30 | if(ui) 31 | { 32 | delete ui; 33 | ui = NULL; 34 | } 35 | } 36 | QTabWidget *XfstkDldrPluginUserInterface::GetTabInterface() 37 | { 38 | return this->ui->UserInterface; 39 | } 40 | 41 | void XfstkDldrPluginUserInterface::changeEvent(QEvent *e) 42 | { 43 | QWidget::changeEvent(e); 44 | switch (e->type()) { 45 | case QEvent::LanguageChange: 46 | ui->retranslateUi(this); 47 | break; 48 | default: 49 | break; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/fh_loader/fh_loader_sha.h: -------------------------------------------------------------------------------- 1 | /************************************************************************** 2 | * 3 | * This module contains the software implementation for sha256. 4 | * 5 | * Copyright (c) 2016 Qualcomm Technologies, Inc. 6 | * All Rights Reserved. 7 | * 8 | *************************************************************************/ 9 | 10 | /*=========================================================================== 11 | 12 | EDIT HISTORY FOR MODULE 13 | 14 | This section contains comments describing changes made to the module. 15 | Notice that changes are listed in reverse chronological order. 16 | 17 | $Header: //components/rel/boot.xf/1.0/QcomPkg/Tools/storage/fh_loader/fh_loader/fh_loader_sha.h#1 $ 18 | $DateTime: 2016/05/11 00:15:02 $ 19 | $Author: pwbldsvc $ 20 | 21 | when who what, where, why 22 | ---------- --- --------------------------------------------------------- 23 | 2016-01-14 wek Create. Move SHA functions from security to a new file. 24 | 25 | ===========================================================================*/ 26 | 27 | 28 | #ifndef __DEVICEPROGRAMMER_SHA_H__ 29 | #define __DEVICEPROGRAMMER_SHA_H__ 30 | 31 | #include "fh_comdef.h" 32 | 33 | #define CONTEXT_LEFTOVER_FIELD_SIZE 64 34 | 35 | struct __sechsh_ctx_s 36 | { 37 | uint32 counter[2]; 38 | uint32 iv[16]; // is 64 byte for SHA2-512 39 | uint8 leftover[CONTEXT_LEFTOVER_FIELD_SIZE]; 40 | uint32 leftover_size; 41 | }; 42 | 43 | void sechsharm_sha256_init( struct __sechsh_ctx_s* ); 44 | void sechsharm_sha256_update( struct __sechsh_ctx_s*, uint8*, uint32*, uint8*, uint32 ); 45 | void sechsharm_sha256_final( struct __sechsh_ctx_s*, uint8*, uint32*, uint8* ); 46 | 47 | #endif /* __DEVICEPROGRAMMER_SHA_H__ */ 48 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/template/xfstkdldrpluginoptionsinterface.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #include "xfstkdldrpluginoptionsinterface.h" 19 | #include "ui_xfstkdldrpluginoptionsinterface.h" 20 | 21 | XfstkDldrPluginOptionsInterface::XfstkDldrPluginOptionsInterface(QWidget *parent) : 22 | QWidget(parent), 23 | ui(new Ui::XfstkDldrPluginOptionsInterface) 24 | { 25 | ui->setupUi(this); 26 | } 27 | 28 | XfstkDldrPluginOptionsInterface::~XfstkDldrPluginOptionsInterface() 29 | { 30 | if(ui) 31 | { 32 | delete ui; 33 | ui = NULL; 34 | } 35 | } 36 | 37 | QTabWidget *XfstkDldrPluginOptionsInterface::GetTabInterface() 38 | { 39 | return this->ui->OptionsInterface; 40 | } 41 | 42 | void XfstkDldrPluginOptionsInterface::changeEvent(QEvent *e) 43 | { 44 | QWidget::changeEvent(e); 45 | switch (e->type()) { 46 | case QEvent::LanguageChange: 47 | ui->retranslateUi(this); 48 | break; 49 | default: 50 | break; 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/MediatekWidget.cpp: -------------------------------------------------------------------------------- 1 | #include "MediatekWidget.h" 2 | #include "ui_MediatekWidget.h" 3 | 4 | 5 | 6 | MediatekWidget::MediatekWidget(QTabWidget *parent, MainWindow *window) : 7 | TabWidgetBase(6, tr("&Mediatek Widget"), parent), 8 | ui(new Ui::MediatekWidget), 9 | main_window_(window) 10 | { 11 | ui->setupUi(this); 12 | } 13 | 14 | 15 | MediatekWidget::~MediatekWidget() 16 | { 17 | delete ui; 18 | } 19 | void MediatekWidget::LockOnUI() 20 | { 21 | //enableControl(false); 22 | } 23 | 24 | void MediatekWidget::DoFinished() 25 | { 26 | //enableControl(true); 27 | } 28 | 29 | void MediatekWidget::UpdateUI() 30 | { 31 | ui->retranslateUi(this); 32 | } 33 | 34 | 35 | void MediatekWidget::SetTabLabel(QTabWidget *tab_widget, int index) 36 | { 37 | QString label = "ADB";// LoadQString(LANGUAGE_TAG, IDS_STRING_CLONEDOWNLOAD); 38 | 39 | tab_widget->setTabText(index, label); 40 | } 41 | 42 | void MediatekWidget::SetShortCut(int, const QString &) 43 | { 44 | 45 | } 46 | void MediatekWidget::on_pushButton_Loadfile_clicked() 47 | { 48 | 49 | } 50 | 51 | void MediatekWidget::on_pushButton_Save_clicked() 52 | { 53 | QFile file("d:/aa.txt"); 54 | QTextStream textstream(&file); 55 | if (file.open(QIODevice::ReadOnly)) 56 | { 57 | QString str = ui->textEdit->toPlainText();//textstream.readAll(); 58 | ui->textEdit->setPlainText(str); 59 | file.close(); 60 | } 61 | else 62 | { 63 | QMessageBox::critical(this,QString::fromUtf8("Chú ý"), QString::fromUtf8("Chú ý không mở được file")); 64 | } 65 | } 66 | 67 | void MediatekWidget::on_pushButton_Load_clicked() 68 | { 69 | QFile file("d:/aa.txt"); 70 | QTextStream textstream(&file); 71 | QString str = textstream.readAll(); 72 | ui->textEdit->setPlainText(str); 73 | file.close(); 74 | } 75 | 76 | void MediatekWidget::on_pushButton_Clear_clicked() 77 | { 78 | ui->textEdit->clear(); 79 | } 80 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/serialport.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * serialport.h 3 | * 4 | * This file implements HDLC encoding and serial port interface 5 | * 6 | * Copyright (c) 2007-2011 7 | * Qualcomm Technologies Incorporated. 8 | * All Rights Reserved. 9 | * Qualcomm Confidential and Proprietary 10 | * 11 | *****************************************************************************/ 12 | /*============================================================================= 13 | Edit History 14 | 15 | $Header: //source/qcom/qct/platform/uefi/workspaces/pweber/apps/8x26_emmcdl/emmcdl/main/latest/inc/serialport.h#3 $ 16 | $DateTime: 2014/08/05 11:44:01 $ $Author: pweber $ 17 | 18 | when who what, where, why 19 | ------------------------------------------------------------------------------- 20 | 11/08/11 pgw Initial version. 21 | =============================================================================*/ 22 | #pragma once 23 | 24 | #include 25 | #include 26 | #include "crc.h" 27 | 28 | #define ASYNC_HDLC_FLAG 0x7e 29 | #define ASYNC_HDLC_ESC 0x7d 30 | #define ASYNC_HDLC_ESC_MASK 0x20 31 | #define MAX_PACKET_SIZE 0x20000 32 | 33 | class SerialPort { 34 | public: 35 | SerialPort(); 36 | ~SerialPort(); 37 | int Open(int port); 38 | int EnableBinaryLog(TCHAR *szFileName); 39 | int Close(); 40 | int Write(BYTE *data, DWORD length); 41 | int Read(BYTE *data, DWORD *length); 42 | int Flush(); 43 | int SendSync(BYTE *out_buf, int out_length, BYTE *in_buf, int *in_length); 44 | int SetTimeout(int ms); 45 | private: 46 | int HDLCEncodePacket(BYTE *in_buf, int in_length, BYTE *out_buf, int *out_length); 47 | int HDLCDecodePacket(BYTE *in_buf, int in_length, BYTE *out_buf, int *out_length); 48 | 49 | HANDLE hPort; 50 | BYTE *HDLCBuf; 51 | int to_ms; 52 | 53 | }; 54 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/XfstkDldrPluginInterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGININTERFACE_H 19 | #define XFSTKDLDRPLUGININTERFACE_H 20 | #include 21 | #include 22 | 23 | class XfstkDldrPluginInterface; 24 | 25 | struct XfstkDldrPluginInfo { 26 | QString PluginName; 27 | QString PlatformName; 28 | int PluginTabOrder; 29 | XfstkDldrPluginInterface *PluginInterface; 30 | }; 31 | 32 | class XfstkDldrPluginInterface 33 | { 34 | public: 35 | virtual XfstkDldrPluginInterface* Create() = 0; 36 | virtual QTabWidget *GetUserTabInterface() = 0; 37 | virtual QTabWidget *GetOptionsTabInterface() = 0; 38 | virtual bool InitializeTabInterfaces() = 0; 39 | virtual bool SaveTabInterfaceSettings() = 0; 40 | virtual bool RestoreTabInterfaceSettings() = 0; 41 | virtual XfstkDldrPluginInfo *GetPluginInfo() = 0; 42 | virtual bool Init() = 0; 43 | virtual ~XfstkDldrPluginInterface() {} 44 | }; 45 | 46 | QT_BEGIN_NAMESPACE 47 | Q_DECLARE_INTERFACE(XfstkDldrPluginInterface, 48 | "com.Intel.SCU.XFSTK.Dldr.Plugin/1.0"); 49 | QT_END_NAMESPACE 50 | 51 | #endif // XFSTKDLDRPLUGININTERFACE_H 52 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/baytrail/xfstkdldrpluginbaytrail.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINBAYTRAIL_H 19 | #define XFSTKDLDRPLUGINBAYTRAIL_H 20 | #include "../XfstkDldrPluginTemplate_global.h" 21 | #include "../XfstkDldrPluginInterface.h" 22 | 23 | #include "xfstkdldrpluginuserinterface.h" 24 | #include "xfstkdldrpluginoptionsinterface.h" 25 | 26 | #include 27 | 28 | class XFSTKDLDRPLUGINTEMPLATESHARED_EXPORT XfstkDldrPluginBaytrail : public QObject, public XfstkDldrPluginInterface 29 | { 30 | Q_OBJECT 31 | Q_INTERFACES(XfstkDldrPluginInterface) 32 | 33 | public: 34 | XfstkDldrPluginBaytrail(); 35 | XfstkDldrPluginInfo PluginInfo; 36 | bool Init(); 37 | XfstkDldrPluginInterface* Create(); 38 | QTabWidget *GetUserTabInterface(); 39 | QTabWidget *GetOptionsTabInterface(); 40 | bool InitializeTabInterfaces(); 41 | bool SaveTabInterfaceSettings(); 42 | bool RestoreTabInterfaceSettings(); 43 | XfstkDldrPluginInfo *GetPluginInfo(); 44 | XfstkDldrPluginUserInterface UserTabInterface; 45 | XfstkDldrPluginOptionsInterface OptionsTabInterface; 46 | 47 | }; 48 | 49 | #endif // XFSTKDLDRPLUGINBAYTRAIL_H 50 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/medfield/xfstkdldrpluginmedfield.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINMEDFIELD_H 19 | #define XFSTKDLDRPLUGINMEDFIELD_H 20 | #include "../XfstkDldrPluginTemplate_global.h" 21 | #include "../XfstkDldrPluginInterface.h" 22 | 23 | #include "xfstkdldrpluginuserinterface.h" 24 | #include "xfstkdldrpluginoptionsinterface.h" 25 | 26 | #include 27 | 28 | class XFSTKDLDRPLUGINTEMPLATESHARED_EXPORT XfstkDldrPluginMedfield : public QObject, public XfstkDldrPluginInterface 29 | { 30 | Q_OBJECT 31 | Q_INTERFACES(XfstkDldrPluginInterface) 32 | 33 | public: 34 | XfstkDldrPluginMedfield(); 35 | XfstkDldrPluginInfo PluginInfo; 36 | bool Init(); 37 | XfstkDldrPluginInterface* Create(); 38 | QTabWidget *GetUserTabInterface(); 39 | QTabWidget *GetOptionsTabInterface(); 40 | bool InitializeTabInterfaces(); 41 | bool SaveTabInterfaceSettings(); 42 | bool RestoreTabInterfaceSettings(); 43 | XfstkDldrPluginInfo *GetPluginInfo(); 44 | XfstkDldrPluginUserInterface UserTabInterface; 45 | XfstkDldrPluginOptionsInterface OptionsTabInterface; 46 | 47 | }; 48 | 49 | #endif // XFSTKDLDRPLUGINMEDFIELD_H 50 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/cloverview/xfstkdldrplugincloverview.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINCLOVERVIEW_H 19 | #define XFSTKDLDRPLUGINCLOVERVIEW_H 20 | #include "../XfstkDldrPluginTemplate_global.h" 21 | #include "../XfstkDldrPluginInterface.h" 22 | 23 | #include "xfstkdldrpluginuserinterface.h" 24 | #include "xfstkdldrpluginoptionsinterface.h" 25 | 26 | #include 27 | 28 | class XFSTKDLDRPLUGINTEMPLATESHARED_EXPORT XfstkDldrPluginCloverview : public QObject, public XfstkDldrPluginInterface 29 | { 30 | Q_OBJECT 31 | Q_INTERFACES(XfstkDldrPluginInterface) 32 | 33 | public: 34 | XfstkDldrPluginCloverview(); 35 | XfstkDldrPluginInfo PluginInfo; 36 | bool Init(); 37 | XfstkDldrPluginInterface* Create(); 38 | QTabWidget *GetUserTabInterface(); 39 | QTabWidget *GetOptionsTabInterface(); 40 | bool InitializeTabInterfaces(); 41 | bool SaveTabInterfaceSettings(); 42 | bool RestoreTabInterfaceSettings(); 43 | XfstkDldrPluginInfo *GetPluginInfo(); 44 | XfstkDldrPluginUserInterface UserTabInterface; 45 | XfstkDldrPluginOptionsInterface OptionsTabInterface; 46 | 47 | }; 48 | 49 | #endif // XFSTKDLDRPLUGINCLOVERVIEW_H 50 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/merrifield/xfstkdldrpluginmerrifield.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINMERRIFIELD_H 19 | #define XFSTKDLDRPLUGINMERRIFIELD_H 20 | #include "../XfstkDldrPluginTemplate_global.h" 21 | #include "../XfstkDldrPluginInterface.h" 22 | 23 | #include "xfstkdldrpluginuserinterface.h" 24 | #include "xfstkdldrpluginoptionsinterface.h" 25 | 26 | #include 27 | 28 | class XFSTKDLDRPLUGINTEMPLATESHARED_EXPORT XfstkDldrPluginMerrifield : public QObject, public XfstkDldrPluginInterface 29 | { 30 | Q_OBJECT 31 | Q_INTERFACES(XfstkDldrPluginInterface) 32 | 33 | public: 34 | XfstkDldrPluginMerrifield(); 35 | XfstkDldrPluginInfo PluginInfo; 36 | bool Init(); 37 | XfstkDldrPluginInterface* Create(); 38 | QTabWidget *GetUserTabInterface(); 39 | QTabWidget *GetOptionsTabInterface(); 40 | bool InitializeTabInterfaces(); 41 | bool SaveTabInterfaceSettings(); 42 | bool RestoreTabInterfaceSettings(); 43 | XfstkDldrPluginInfo *GetPluginInfo(); 44 | XfstkDldrPluginUserInterface UserTabInterface; 45 | XfstkDldrPluginOptionsInterface OptionsTabInterface; 46 | 47 | }; 48 | 49 | #endif // XFSTKDLDRPLUGINMERRIFIELD_H 50 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/cloverviewplus/xfstkdldrplugincloverviewplus.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINCLOVERVIEWPLUS_H 19 | #define XFSTKDLDRPLUGINCLOVERVIEWPLUS_H 20 | #include "../XfstkDldrPluginTemplate_global.h" 21 | #include "../XfstkDldrPluginInterface.h" 22 | 23 | #include "xfstkdldrpluginuserinterface.h" 24 | #include "xfstkdldrpluginoptionsinterface.h" 25 | 26 | #include 27 | 28 | class XFSTKDLDRPLUGINTEMPLATESHARED_EXPORT XfstkDldrPluginCloverviewPlus : public QObject, public XfstkDldrPluginInterface 29 | { 30 | Q_OBJECT 31 | Q_INTERFACES(XfstkDldrPluginInterface) 32 | 33 | public: 34 | XfstkDldrPluginCloverviewPlus(); 35 | XfstkDldrPluginInfo PluginInfo; 36 | bool Init(); 37 | XfstkDldrPluginInterface* Create(); 38 | QTabWidget *GetUserTabInterface(); 39 | QTabWidget *GetOptionsTabInterface(); 40 | bool InitializeTabInterfaces(); 41 | bool SaveTabInterfaceSettings(); 42 | bool RestoreTabInterfaceSettings(); 43 | XfstkDldrPluginInfo *GetPluginInfo(); 44 | XfstkDldrPluginUserInterface UserTabInterface; 45 | XfstkDldrPluginOptionsInterface OptionsTabInterface; 46 | 47 | }; 48 | 49 | #endif // XFSTKDLDRPLUGINCLOVERVIEWPLUS_H 50 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/cloverviewplus/xfstkdldrplugincloverviewplus.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "xfstkdldrplugincloverviewplus.h" 3 | 4 | //XfstkDldrPluginCloverviewPlus::XfstkDldrPluginCloverviewPlus() 5 | //{ 6 | // this->PluginInfo.PlatformName = QString("CloverviewPlus"); 7 | // this->PluginInfo.PluginName = QString("CLV+ A0"); 8 | // this->PluginInfo.PluginTabOrder = 3; 9 | // 10 | // this->PluginInfo.PluginInterface = (XfstkDldrPluginInterface *)this; 11 | // QObject::connect(&(this->UserTabInterface),SIGNAL(UserInterfaceChanged(UserInterfaceState*)),&(this->OptionsTabInterface),SLOT(UserInterfaceChanged(UserInterfaceState*))); 12 | // QObject::connect(&(this->OptionsTabInterface),SIGNAL(OptionsInterfaceChanged(OptionsInterfaceState*)),&(this->UserTabInterface),SLOT(OptionsInterfaceChanged(OptionsInterfaceState*))); 13 | //} 14 | 15 | XfstkDldrPluginInterface* XfstkDldrPluginCloverviewPlus::Create() 16 | { 17 | return new XfstkDldrPluginCloverviewPlus(); 18 | } 19 | 20 | QTabWidget *XfstkDldrPluginCloverviewPlus::GetUserTabInterface() 21 | { 22 | return this->UserTabInterface.GetTabInterface(); 23 | } 24 | 25 | QTabWidget *XfstkDldrPluginCloverviewPlus::GetOptionsTabInterface() 26 | { 27 | return this->OptionsTabInterface.GetTabInterface(); 28 | } 29 | 30 | bool XfstkDldrPluginCloverviewPlus::InitializeTabInterfaces() 31 | { 32 | return true; 33 | } 34 | 35 | bool XfstkDldrPluginCloverviewPlus::SaveTabInterfaceSettings() 36 | { 37 | this->UserTabInterface.SaveUserInterfaceStateToDisk(QString("Intel"),QString("CloverviewPlus")); 38 | return true; 39 | } 40 | 41 | bool XfstkDldrPluginCloverviewPlus::RestoreTabInterfaceSettings() 42 | { 43 | this->UserTabInterface.LoadUserInterfaceStateFromDisk(QString("Intel"),QString("CloverviewPlus")); 44 | this->UserTabInterface.RestoreUserInterfaceFromCurrentState(); 45 | return true; 46 | } 47 | 48 | XfstkDldrPluginInfo *XfstkDldrPluginCloverviewPlus::GetPluginInfo() 49 | { 50 | return &(this->PluginInfo); 51 | } 52 | 53 | bool XfstkDldrPluginCloverviewPlus::Init() 54 | { 55 | return true; 56 | } 57 | 58 | //Q_EXPORT_PLUGIN2(XfstkDldrPluginCloverviewPlus, XfstkDldrPluginCloverviewPlus) 59 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/template/xfstkdldrplugintemplate.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINTEMPLATE_H 19 | #define XFSTKDLDRPLUGINTEMPLATE_H 20 | 21 | #if defined XFSTK_OS_WIN 22 | #include "XfstkDldrPluginTemplate_global.h" 23 | #include "XfstkDldrPluginInterface.h" 24 | #else 25 | #include "../XfstkDldrPluginTemplate_global.h" 26 | #include "../XfstkDldrPluginInterface.h" 27 | #endif 28 | 29 | #include "xfstkdldrplugintemplate.h" 30 | #include "xfstkdldrpluginuserinterface.h" 31 | #include "xfstkdldrpluginoptionsinterface.h" 32 | 33 | #include 34 | 35 | class XFSTKDLDRPLUGINTEMPLATESHARED_EXPORT XfstkDldrPluginTemplate : public QObject, public XfstkDldrPluginInterface 36 | { 37 | Q_OBJECT 38 | Q_INTERFACES(XfstkDldrPluginInterface) 39 | 40 | public: 41 | XfstkDldrPluginTemplate(); 42 | XfstkDldrPluginInfo PluginInfo; 43 | bool Init(); 44 | XfstkDldrPluginInterface* Create(); 45 | QTabWidget *GetUserTabInterface(); 46 | QTabWidget *GetOptionsTabInterface(); 47 | bool InitializeTabInterfaces(); 48 | bool SaveTabInterfaceSettings(); 49 | bool RestoreTabInterfaceSettings(); 50 | XfstkDldrPluginInfo *GetPluginInfo(); 51 | XfstkDldrPluginUserInterface UserTabInterface; 52 | XfstkDldrPluginOptionsInterface OptionsTabInterface; 53 | }; 54 | 55 | #endif // XFSTKDLDRPLUGINTEMPLATE_H 56 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/template/xfstkdldrplugintemplate.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #include "xfstkdldrplugintemplate.h" 19 | 20 | XfstkDldrPluginTemplate::XfstkDldrPluginTemplate() 21 | { 22 | this->PluginInfo.PlatformName = QString("Template"); 23 | this->PluginInfo.PluginName = QString("Template"); 24 | this->PluginInfo.PluginInterface = (XfstkDldrPluginInterface *)this; 25 | } 26 | 27 | XfstkDldrPluginInterface* XfstkDldrPluginTemplate::Create() 28 | { 29 | return new XfstkDldrPluginTemplate(); 30 | } 31 | 32 | QTabWidget *XfstkDldrPluginTemplate::GetUserTabInterface() 33 | { 34 | return this->UserTabInterface.GetTabInterface(); 35 | } 36 | 37 | QTabWidget *XfstkDldrPluginTemplate::GetOptionsTabInterface() 38 | { 39 | return this->OptionsTabInterface.GetTabInterface(); 40 | } 41 | 42 | bool XfstkDldrPluginTemplate::InitializeTabInterfaces() 43 | { 44 | return true; 45 | } 46 | 47 | bool XfstkDldrPluginTemplate::SaveTabInterfaceSettings() 48 | { 49 | return true; 50 | } 51 | 52 | bool XfstkDldrPluginTemplate::RestoreTabInterfaceSettings() 53 | { 54 | return true; 55 | } 56 | 57 | XfstkDldrPluginInfo *XfstkDldrPluginTemplate::GetPluginInfo() 58 | { 59 | return &(this->PluginInfo); 60 | } 61 | 62 | bool XfstkDldrPluginTemplate::Init() 63 | { 64 | return true; 65 | } 66 | 67 | Q_EXPORT_PLUGIN2(XfstkDldrPluginTemplate, XfstkDldrPluginTemplate) 68 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/EmmcRawWidget.cpp: -------------------------------------------------------------------------------- 1 | #include "EmmcRawWidget.h" 2 | #include "ui_emmcrawwidget.h" 3 | #include 4 | 5 | EmmcRawWidget::EmmcRawWidget(QTabWidget *parent, MainWindow *window) : 6 | TabWidgetBase(2, tr("&Emmc Raw"),parent), 7 | ui(new Ui::EmmcRawWidget), 8 | main_window_(window) 9 | { 10 | ui->setupUi(this); 11 | } 12 | 13 | EmmcRawWidget::~EmmcRawWidget() 14 | { 15 | delete ui; 16 | } 17 | void EmmcRawWidget::LockOnUI() 18 | { 19 | //enableControl(false); 20 | } 21 | 22 | void EmmcRawWidget::DoFinished() 23 | { 24 | //enableControl(true); 25 | } 26 | 27 | void EmmcRawWidget::UpdateUI() 28 | { 29 | ui->retranslateUi(this); 30 | } 31 | 32 | void EmmcRawWidget::SetTabLabel(QTabWidget *tab_widget, int index) 33 | { 34 | QString label = "EMMCRAW";// LoadQString(LANGUAGE_TAG, IDS_STRING_CLONEDOWNLOAD); 35 | 36 | tab_widget->setTabText(index, label); 37 | } 38 | 39 | void EmmcRawWidget::SetShortCut(int , const QString &) 40 | { 41 | 42 | } 43 | 44 | int EmmcRawWidget::AddItem() 45 | { 46 | unsigned int row = 0; 47 | 48 | while(ui->tableWidget->rowCount()>0) 49 | { 50 | ui->tableWidget->removeRow(0); 51 | } 52 | 53 | for(int i = 0; i< 30 ; i++ ) 54 | { 55 | 56 | QTableWidgetItem *item; 57 | int row =30; 58 | row = ui->tableWidget->rowCount(); 59 | ui->tableWidget->insertRow(row); 60 | item = new QTableWidgetItem("PrimaryGPT"); 61 | 62 | item->setTextAlignment(Qt::AlignVCenter | Qt::AlignHCenter); 63 | ui->tableWidget->setItem(row, ColumnName, item); 64 | item = new QTableWidgetItem("0"); 65 | ui->tableWidget->setItem(row,ColumnReadFlag, item); 66 | item = new QTableWidgetItem("34"); 67 | ui->tableWidget->setItem(row,ColumnAddr, item); 68 | QString cfg_name = QDir::currentPath() + "/PrimaryGPT.bin"; 69 | item = new QTableWidgetItem(cfg_name); 70 | ui->tableWidget->setItem(row,ColumnLength, item); 71 | 72 | QCheckBox *checkbox; 73 | checkbox = (QCheckBox *)ui->tableWidget->cellWidget(row,ColumnEnable); 74 | if(checkbox == NULL) 75 | { 76 | checkbox = new QCheckBox(ui->tableWidget); 77 | ui->tableWidget->setCellWidget(row, ColumnEnable, checkbox); 78 | } 79 | //checkbox->setChecked(false); 80 | checkbox->setChecked(true); 81 | 82 | } 83 | ui->tableWidget->removeRow(row); 84 | return(0); 85 | } 86 | 87 | void EmmcRawWidget::on_pushButton_7_clicked() 88 | { 89 | AddItem(); 90 | } 91 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/QualComWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef QUALCOMWIDGET_H 2 | #define QUALCOMWIDGET_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include "TabWidgetBase.h" 9 | #include "emmcdl.h" 10 | #include "tchar.h" 11 | #include 12 | #include 13 | #include 14 | #include 15 | #include "serialport.h" 16 | #include "sahara.h" 17 | #include "protocol.h" 18 | #include "dload.h" 19 | #include "firehose.h" 20 | #include "targetver.h" 21 | #include "diskwriter.h" 22 | #include "partition.h" 23 | 24 | 25 | 26 | 27 | namespace Ui { 28 | class QualComWidget; 29 | } 30 | class MainWindow; 31 | class QualComWidget : public TabWidgetBase 32 | { 33 | Q_OBJECT 34 | enum LogType { 35 | kLogTypeError = 1, 36 | kLogTypeWarning = 2, 37 | kLogTypeInfo = 3, 38 | kLogTypeDebug = 4 39 | }; 40 | 41 | public: 42 | 43 | explicit QualComWidget(QTabWidget *parent, MainWindow* window); 44 | ~QualComWidget(); 45 | 46 | DECLARE_TABWIDGET_VFUNCS() 47 | 48 | void StringToByte(TCHAR **szSerialData, BYTE *data, int len); 49 | int RawSerialSend(int dnum, TCHAR **szSerialData, int len); 50 | int EraseDisk(uint64 start, uint64 num, int dnum, TCHAR *szPartName); 51 | int DumpDeviceInfo(void); 52 | int LoadFlashProg(TCHAR *mprgFile); 53 | int WipeDisk(int dnum); 54 | int ReadGPT(int dnum); 55 | int WriteGPT(int dnum, TCHAR *szPartName, TCHAR *szBinFile); 56 | int ResetDevice(); 57 | int RawDiskProgram(TCHAR **pFile, TCHAR *oFile, uint64 dnum); 58 | int RawDiskDump(uint64 start, uint64 num, TCHAR *oFile, int dnum, TCHAR *szPartName); 59 | 60 | 61 | public slots: 62 | 63 | int updatePortList(); 64 | int QcupdatePortList(); 65 | void AutoBootUpdateUI(); 66 | void ReadInfoUpdateUI(); 67 | void FlashUpdateUI(); 68 | 69 | 70 | private: 71 | 72 | Ui::QualComWidget* ui; 73 | MainWindow* main_window; 74 | 75 | void log(int type, const char* message); 76 | void log(int type, std::string message); 77 | void log(int type, QString message); 78 | 79 | 80 | 81 | private slots: 82 | 83 | void on_pushButton_Com_Connec_clicked(); 84 | void on_pushButton_Com_Reload_clicked(); 85 | void on_pushButton_BootSelect_clicked(); 86 | void on_pushButton_RomBootFolder_clicked(); 87 | void on_pushButton_RawXmlPatchXml_clicked(); 88 | void on_toolButton_Start_clicked(); 89 | }; 90 | 91 | #endif // QUALCOMWIDGET_H 92 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/IntelSettingDialog.h: -------------------------------------------------------------------------------- 1 | #ifndef DIALOG_H 2 | #define DIALOG_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | 11 | namespace Ui { 12 | class IntelSettingDialog; 13 | } 14 | struct UserInterfaceState; 15 | 16 | struct OptionsInterfaceState { 17 | QString FWDnXPath; 18 | QString IFWIPath; 19 | QString OSDnXPath; 20 | QString OSIPath; 21 | QString SoftfusesPath; 22 | QString GPFlagOverrideValue; 23 | QString LoggingPath; 24 | QString ProvisionCount; 25 | QString DesktopDir; 26 | QString CurrentSearchDir; 27 | QString USBTimeout; 28 | bool EnableGpFlagOverride; 29 | bool EnableLogging; 30 | bool EnableProvisionCount; 31 | bool SoftfuseInclude; 32 | bool SuppressErrors; 33 | }; 34 | 35 | class IntelSettingDialog : public QDialog 36 | { 37 | Q_OBJECT 38 | 39 | public: 40 | 41 | OptionsInterfaceState CurrentState; 42 | OptionsInterfaceState PrevState; 43 | 44 | explicit IntelSettingDialog(QWidget *parent = 0); 45 | ~IntelSettingDialog(); 46 | 47 | //QTabWidget *GetTabInterface(); 48 | QString DetermineCurrentFileSearchPath(QString BinPath); 49 | bool VerifyBinaryFilePath(QString BinPath); 50 | QString LastError; 51 | bool LineEditWA; 52 | void ReportErrors(); 53 | //Ui::XfstkDldrPluginOptionsInterface *ui; 54 | QFileDialog OpenFile; 55 | 56 | signals: 57 | void OptionsInterfaceChanged(OptionsInterfaceState *State); 58 | 59 | public slots: 60 | void UserInterfaceChanged(UserInterfaceState *State); 61 | 62 | protected: 63 | void changeEvent(QEvent *e); 64 | 65 | private: 66 | void on_SoftfusePath_editingFinished(); 67 | 68 | Ui::IntelSettingDialog *ui; 69 | 70 | 71 | private slots: 72 | void on_ResetProvisionCount_clicked(); 73 | void on_RestoreDefaultLogPath_clicked(); 74 | void on_BrowseLoggingPath_clicked(); 75 | void on_LoggingPath_editingFinished(); 76 | void on_BrowseSoftfusePath_clicked(); 77 | void on_SoftfuseInclude_toggled(bool checked); 78 | void on_EnableLogging_toggled(bool checked); 79 | void on_ProvisionCountEnabled_toggled(bool checked); 80 | void on_GPFlagOverrideValue_editingFinished(); 81 | void on_GPFlagOverrideEnable_toggled(bool checked); 82 | void on_ClearAllStoredPaths_clicked(); 83 | void on_ClearOSImagePath_clicked(); 84 | void on_ClearOSDnXPath_clicked(); 85 | void on_ClearIFWIPath_clicked(); 86 | void on_ClearFWDnXPath_clicked(); 87 | void on_UsbTimeoutOption_editingFinished(); 88 | 89 | }; 90 | 91 | #endif // DIALOG_H 92 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/CmdWidget.cpp: -------------------------------------------------------------------------------- 1 | #include "CmdWidget.h" 2 | #include "ui_cmdwidget.h" 3 | #include 4 | 5 | 6 | 7 | CmdWidget::CmdWidget(QTabWidget *parent, MainWindow *window) : 8 | TabWidgetBase(0, tr("&Cmd Widget"), parent), 9 | ui(new Ui::CmdWidget), 10 | main_window_(window) 11 | { 12 | ui->setupUi(this); 13 | m_process = new QProcess(this); 14 | connect(m_process, SIGNAL(readyReadStandardOutput()), this, SLOT(setStdout()) ); 15 | // connect(ui->comboBox, SIGNAL(currentIndexChanged()), this, SLOT(command())); 16 | //connect(ui->comboBox, SIGNAL(currentTextChanged()), this, SLOT(command())); 17 | //connect(ui->comboBox, SIGNAL(editTextChanged()), this, SLOT(command())); 18 | connect(ui->lineEdit, SIGNAL(returnPressed()), this, SLOT(commandLineEdit())); 19 | connect(ui->pushButton_Execute, SIGNAL(clicked()), this, SLOT(command())); 20 | //command(); 21 | } 22 | CmdWidget::~CmdWidget() 23 | { 24 | delete ui; 25 | } 26 | void CmdWidget::LockOnUI() 27 | { 28 | //enableControl(false); 29 | } 30 | 31 | void CmdWidget::DoFinished() 32 | { 33 | //enableControl(true); 34 | } 35 | 36 | void CmdWidget::UpdateUI() 37 | { 38 | ui->retranslateUi(this); 39 | } 40 | 41 | void CmdWidget::SetTabLabel(QTabWidget *tab_widget, int index) 42 | { 43 | QString label = "CMD";// LoadQString(LANGUAGE_TAG, IDS_STRING_CLONEDOWNLOAD); 44 | 45 | tab_widget->setTabText(index, label); 46 | } 47 | 48 | void CmdWidget::SetShortCut(int , const QString &) 49 | { 50 | 51 | } 52 | void CmdWidget::setStdout() 53 | { 54 | if(QSysInfo::productType()=="windows") 55 | { 56 | QTextCodec *codec = QTextCodec::codecForName("IBM 866"); 57 | ui->textEdit->append( codec->toUnicode(m_process->readAllStandardOutput())); 58 | 59 | } 60 | else 61 | ui->textEdit->append( m_process->readAllStandardOutput()); 62 | } 63 | void CmdWidget::command() 64 | { 65 | ui->textEdit->clear(); 66 | QString strCommand; 67 | if(QSysInfo::productType()=="windows") 68 | strCommand = "cmd /C "; 69 | strCommand += ui->comboBox->currentText(); 70 | m_process->start(strCommand); 71 | //ui->textEdit->append(strCommand); 72 | } 73 | void CmdWidget::commandLineEdit() 74 | { 75 | ui->textEdit->clear(); 76 | QString strCommand; 77 | if (QSysInfo::productType() == "windows") 78 | strCommand = "cmd /C "; 79 | strCommand += ui->lineEdit->text(); 80 | m_process->start(strCommand); 81 | //ui->textEdit->append(strCommand); 82 | } 83 | //void CmdWidget::on_pushButton_clicked() 84 | //{ 85 | // command(); 86 | //} 87 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/baytrail/xfstkdldrthread.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRTHREAD_H 19 | #define XFSTKDLDRTHREAD_H 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | class xfstkdldrthreadobj : public QObject 38 | { 39 | Q_OBJECT 40 | public: 41 | unsigned int isDebug; 42 | float time_elapsed; 43 | xfstkstatuspfn physstatuspfn; 44 | int retrycount; 45 | char *fwimage; 46 | int tid; 47 | int numtargets; 48 | bool provisioningok; 49 | explicit xfstkdldrthreadobj(QObject *parent = 0); 50 | void configuredownloader(char *fwimage, int tid, int numtargets, int retrycount); 51 | void go(); 52 | bool bkill; 53 | bool bFwOnly; 54 | bool bLog; 55 | QString LogPath; 56 | 57 | signals: 58 | void StatusUpdate(QString stuff); 59 | void ThreadComplete(bool result); 60 | void TargetsCompletedForThread(int numdone); 61 | public slots: 62 | private: 63 | bool downloadfwthread(char *fwimage); 64 | }; 65 | 66 | class xfstkdldrthread : public QThread 67 | { 68 | Q_OBJECT 69 | public: 70 | explicit xfstkdldrthread(QObject *parent = 0); 71 | ~xfstkdldrthread(); 72 | xfstkdldrthreadobj *obj; 73 | void setobj(xfstkdldrthreadobj *obj); 74 | signals: 75 | void done(); 76 | 77 | public slots: 78 | protected: 79 | void run(); 80 | 81 | private: 82 | QMutex mutex; 83 | QWaitCondition condition; 84 | }; 85 | 86 | #endif // XFSTKDLDRTHREAD_H 87 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/AdbWidget.h: -------------------------------------------------------------------------------- 1 | #ifndef ADBWIDGET_H 2 | #define ADBWIDGET_H 3 | 4 | #include 5 | #include 6 | #include "TabWidgetBase.h" 7 | #include 8 | #include 9 | 10 | 11 | 12 | namespace Ui { 13 | class AdbWidget; 14 | } 15 | class MainWindow; 16 | class AdbWidget : public TabWidgetBase 17 | { 18 | Q_OBJECT 19 | 20 | public: 21 | 22 | explicit AdbWidget(QTabWidget *parent, MainWindow *window); 23 | ~AdbWidget(); 24 | 25 | DECLARE_TABWIDGET_VFUNCS() 26 | 27 | QString sdk; 28 | 29 | private: 30 | QProcess *t_process; 31 | Ui::AdbWidget *ui; 32 | MainWindow* main_window; 33 | QString adb_program; 34 | QString emmcdl_program; 35 | QString folder_program; 36 | /*void UpdateUI(); 37 | void UpdateUI(const QString& text, QColor color = Qt::black);*/ 38 | QProcess *myProcess; 39 | //QLabel * storagePathLabel; 40 | QString program; 41 | QString fileNameTemp; 42 | QString storagePath; 43 | int pattern; 44 | void getStoragePath(); 45 | 46 | 47 | 48 | private slots: 49 | 50 | void flashSPL(); 51 | void flashRecovery(); 52 | void flashRadio(); 53 | void bootIMG(); 54 | void AdbDevices(); 55 | void GpttoRawprogram(); 56 | void on_pushButton_clicked(); 57 | void on_toolButton_2_clicked(); 58 | void on_toolButton_Reboot_clicked(); 59 | void on_toolButton_TurnOff_clicked(); 60 | void on_pushButton_2_clicked(); 61 | void slot_DeviceTestCallback(const QString &msg, QColor color); 62 | 63 | 64 | public slots: 65 | 66 | void AdbsetStdout(); 67 | void Adbcommand(); 68 | void LinkDevices(); 69 | void GetWifiMac(); 70 | void GetEthernetMac(); 71 | void GetModuleName(); 72 | void GetSerialNumber(); 73 | void GetAndroidVersion(); 74 | void GetScreenResolution(); 75 | void GetICType(); 76 | void GetAllInfo(); 77 | void GetAllApkPackageName(); 78 | void SaveLog(); 79 | void PullFile(); 80 | void PushFile(); 81 | void InstallAPK(); 82 | void UninstallAPK(); 83 | void ListWeightCopy(QListWidgetItem*); 84 | void CaptureScreen(); 85 | void Vedio(); 86 | void Restart(); 87 | void NetworkConnect(); 88 | void Recovery(); 89 | void Fastboot(); 90 | void About(); 91 | void GetModel(); 92 | void GetEmmcSize(); 93 | void GetImel1(); 94 | void GetImel2(); 95 | void GetRegion(); 96 | void GetProducCode(); 97 | void GetSwVer(); 98 | void FinishSolute(int); 99 | }; 100 | 101 | #endif // ADBWIDGET_H 102 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/firehose.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * firehose.h 3 | * 4 | * This file implements the streaming download protocol 5 | * 6 | * Copyright (c) 2007-2013 7 | * Qualcomm Technologies Incorporated. 8 | * All Rights Reserved. 9 | * Qualcomm Confidential and Proprietary 10 | * 11 | *****************************************************************************/ 12 | /*============================================================================= 13 | Edit History 14 | 15 | $Header: //source/qcom/qct/platform/uefi/workspaces/pweber/apps/8x26_emmcdl/emmcdl/main/latest/inc/firehose.h#11 $ 16 | $DateTime: 2015/04/01 17:01:45 $ $Author: pweber $ 17 | 18 | when who what, where, why 19 | ------------------------------------------------------------------------------- 20 | 02/06/13 pgw Initial version. 21 | =============================================================================*/ 22 | #pragma once 23 | 24 | #include "serialport.h" 25 | #include "protocol.h" 26 | #include "partition.h" 27 | #include 28 | #include 29 | 30 | #define MAX_RETRY 50 31 | 32 | typedef struct { 33 | BYTE Version; 34 | char MemoryName[8]; 35 | bool SkipWrite; 36 | bool SkipStorageInit; 37 | bool ZLPAwareHost; 38 | int ActivePartition; 39 | int MaxPayloadSizeToTargetInBytes; 40 | } fh_configure_t; 41 | 42 | class Firehose : public Protocol { 43 | public: 44 | Firehose(SerialPort *port, HANDLE hLogFile = NULL); 45 | ~Firehose(); 46 | 47 | int WriteData(BYTE *writeBuffer, __int64 writeOffset, DWORD writeBytes, DWORD *bytesWritten, UINT8 partNum); 48 | int ReadData(BYTE *readBuffer, __int64 readOffset, DWORD readBytes, DWORD *bytesRead, UINT8 partNum); 49 | 50 | int DeviceReset(void); 51 | int FastCopy(HANDLE hRead, __int64 sectorRead, HANDLE hWrite, __int64 sectorWrite, uint64 sectors, UINT8 partNum); 52 | int ProgramPatchEntry(PartitionEntry pe, TCHAR *key); 53 | int ProgramRawCommand(TCHAR *key); 54 | 55 | // Firehose specific operations 56 | int CreateGPP(DWORD dwGPP1, DWORD dwGPP2, DWORD dwGPP3, DWORD dwGPP4); 57 | int SetActivePartition(int prtn_num); 58 | int ConnectToFlashProg(fh_configure_t *cfg); 59 | 60 | protected: 61 | 62 | private: 63 | int ReadData(BYTE *pOutBuf, DWORD uiBufSize, bool bXML); 64 | int ReadStatus(void); 65 | 66 | SerialPort *sport; 67 | uint64 diskSectors; 68 | bool bSectorAddress; 69 | BYTE *m_payload; 70 | BYTE *m_buffer; 71 | BYTE *m_buffer_ptr; 72 | DWORD m_buffer_len; 73 | UINT32 dwMaxPacketSize; 74 | HANDLE hLog; 75 | char *program_pkt; 76 | }; 77 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/crc.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "crc.h" 3 | 4 | /* CRC table for 16 bit CRC, with generator polynomial 0x8408, 5 | ** calculated 8 bits at a time, LSB first. This table is used 6 | ** from a macro in sio.c. 7 | */ 8 | const unsigned short crc_16_l_table[] = { 9 | 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, 10 | 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, 11 | 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, 12 | 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, 13 | 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, 14 | 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, 15 | 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, 16 | 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, 17 | 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, 18 | 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, 19 | 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, 20 | 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, 21 | 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, 22 | 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, 23 | 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, 24 | 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, 25 | 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, 26 | 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, 27 | 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, 28 | 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, 29 | 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, 30 | 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, 31 | 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, 32 | 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, 33 | 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, 34 | 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, 35 | 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, 36 | 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, 37 | 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, 38 | 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, 39 | 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, 40 | 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 41 | }; 42 | 43 | unsigned short CalcCRC16(BYTE *buf, int length) 44 | { 45 | unsigned short crc = CRC_16_L_SEED; 46 | for (int i=0; i < length; i++) { 47 | crc = CRC_16_L_STEP(crc, *buf++); 48 | } 49 | crc ^= CRC_16_L_SEED; 50 | return crc; 51 | } -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/sparse.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * sparse.h 3 | * 4 | * This file has structures and functions for sparse format 5 | * 6 | * Copyright (c) 2007-2015 7 | * Qualcomm Technologies Incorporated. 8 | * All Rights Reserved. 9 | * Qualcomm Confidential and Proprietary 10 | * 11 | *****************************************************************************/ 12 | /*============================================================================= 13 | Edit History 14 | 15 | $Header: //source/qcom/qct/platform/uefi/workspaces/pweber/apps/8x26_emmcdl/emmcdl/main/latest/inc/sparse.h#1 $ 16 | $DateTime: 2015/02/10 11:56:41 $ $Author: pweber $ 17 | 18 | when who what, where, why 19 | ------------------------------------------------------------------------------- 20 | 02/05/15 pgw Initial version. 21 | =============================================================================*/ 22 | #pragma once 23 | #include "protocol.h" 24 | #include 25 | 26 | #define SPARSE_MAGIC 0xED26FF3A 27 | #define SPARSE_RAW_CHUNK 0xCAC1 28 | #define SPARSE_FILL_CHUNK 0xCAC2 29 | #define SPARSE_DONT_CARE 0xCAC3 30 | 31 | // Security Header struct. The first data read in from the FFU. 32 | typedef struct _SPARSE_HEADER 33 | { 34 | UINT32 dwMagic; // 0xed26ff3a 35 | UINT16 wVerMajor; // 0x1 Major version, reject version with higher major version 36 | UINT16 wVerMinor; // 0x0 Minor version, accept version with higher minor version 37 | UINT16 wSparseHeaderSize; // 28 bytes for first revision of the file format 38 | UINT16 wChunkHeaderSize; // 12 bytes for first revision of the file format 39 | UINT32 dwBlockSize; // 4096 block size in bytes must be multiple of 4 40 | UINT32 dwTotalBlocks; // Total blocks in the non-sparse output file 41 | UINT32 dwTotalChunks; // Total chunks in the sparse input image 42 | UINT32 dwImageChecksum; // CRC32 checksum of the original data counting do not care 802.3 polynomial 43 | } SPARSE_HEADER; 44 | 45 | typedef struct _CHUNK_HEADER 46 | { 47 | UINT16 wChunkType; // 0xCAC1 -> raw; 0xCAC2 -> fill; 0xCAC3 -> don't care 48 | UINT16 wReserved; // Reserved should be all 0 49 | UINT32 dwChunkSize; // Number of blocks this chunk takes in output image 50 | UINT32 dwTotalSize; // Number of bytes in input file including chunk header round up to next block size 51 | } CHUNK_HEADER; 52 | 53 | class SparseImage { 54 | public: 55 | int PreLoadImage(TCHAR *szSparseFile); 56 | int ProgramImage(Protocol *pProtocol, __int64 dwOffset); 57 | 58 | SparseImage(); 59 | ~SparseImage(); 60 | 61 | private: 62 | SPARSE_HEADER SparseHeader; 63 | HANDLE hSparseImage; 64 | bool bSparseImage; 65 | 66 | }; -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/baytrail/xfstkdldrpluginoptionsinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINOPTIONSINTERFACE_H 19 | #define XFSTKDLDRPLUGINOPTIONSINTERFACE_H 20 | #include 21 | #include 22 | #include 23 | #include "xfstkdldrpluginuserinterface.h" 24 | namespace Ui { 25 | class XfstkDldrPluginOptionsInterface; 26 | } 27 | struct UserInterfaceState; 28 | 29 | struct OptionsInterfaceState { 30 | QString IFWIPath; 31 | QString LoggingPath; 32 | QString ProvisionCount; 33 | QString DesktopDir; 34 | QString CurrentSearchDir; 35 | bool EnableLogging; 36 | bool EnableProvisionCount; 37 | bool SuppressErrors; 38 | }; 39 | 40 | class XfstkDldrPluginOptionsInterface : public QWidget { 41 | Q_OBJECT 42 | public: 43 | OptionsInterfaceState CurrentState; 44 | OptionsInterfaceState PrevState; 45 | XfstkDldrPluginOptionsInterface(QWidget *parent = 0); 46 | ~XfstkDldrPluginOptionsInterface(); 47 | QTabWidget *GetTabInterface(); 48 | QString DetermineCurrentFileSearchPath(QString BinPath); 49 | bool VerifyBinaryFilePath(QString BinPath); 50 | QString LastError; 51 | bool LineEditWA; 52 | void ReportErrors(); 53 | Ui::XfstkDldrPluginOptionsInterface *ui; 54 | QFileDialog OpenFile; 55 | signals: 56 | void OptionsInterfaceChanged(OptionsInterfaceState *State); 57 | 58 | public slots: 59 | void UserInterfaceChanged(UserInterfaceState *State); 60 | 61 | protected: 62 | void changeEvent(QEvent *e); 63 | 64 | private: 65 | 66 | 67 | private slots: 68 | void on_ResetProvisionCount_clicked(); 69 | void on_RestoreDefaultLogPath_clicked(); 70 | void on_BrowseLoggingPath_clicked(); 71 | void on_LoggingPath_editingFinished(); 72 | void on_EnableLogging_toggled(bool checked); 73 | void on_ProvisionCountEnabled_toggled(bool checked); 74 | void on_ClearAllStoredPaths_clicked(); 75 | }; 76 | 77 | #endif // XFSTKDLDRPLUGINOPTIONSINTERFACE_H 78 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/cloverview/xfstkdldrthread.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRTHREAD_H 19 | #define XFSTKDLDRTHREAD_H 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | class xfstkdldrthreadobj : public QObject 38 | { 39 | Q_OBJECT 40 | public: 41 | unsigned int isDebug; 42 | float time_elapsed; 43 | xfstkstatuspfn physstatuspfn; 44 | int retrycount; 45 | char *fwdnx; 46 | char *fwimage; 47 | char *osdnx; 48 | char* osimage; 49 | char* gpflags; 50 | int tid; 51 | int numtargets; 52 | bool provisioningok; 53 | explicit xfstkdldrthreadobj(QObject *parent = 0); 54 | void configuredownloader(char *fwdnx, char *fwimage, char *osdnx, char* osimage, char* gpflags, int tid, int numtargets, int retrycount); 55 | void go(); 56 | bool bkill; 57 | bool bFwOnly; 58 | bool bOsOnly; 59 | bool bFwOs; 60 | bool bLog; 61 | QString LogPath; 62 | signals: 63 | void StatusUpdate(QString stuff); 64 | void ThreadComplete(bool result); 65 | void TargetsCompletedForThread(int numdone); 66 | public slots: 67 | private: 68 | bool downloadmtfwosthread(char *fwdnx, char *fwimage, char *osdnx, char* osimage, char* gpflags); 69 | }; 70 | 71 | class xfstkdldrthread : public QThread 72 | { 73 | Q_OBJECT 74 | public: 75 | explicit xfstkdldrthread(QObject *parent = 0); 76 | ~xfstkdldrthread(); 77 | xfstkdldrthreadobj *obj; 78 | void setobj(xfstkdldrthreadobj *obj); 79 | signals: 80 | void done(); 81 | 82 | public slots: 83 | protected: 84 | void run(); 85 | 86 | private: 87 | QMutex mutex; 88 | QWaitCondition condition; 89 | }; 90 | 91 | #endif // XFSTKDLDRTHREAD_H 92 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/medfield/xfstkdldrthread.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRTHREAD_H 19 | #define XFSTKDLDRTHREAD_H 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | class xfstkdldrthreadobj : public QObject 38 | { 39 | Q_OBJECT 40 | public: 41 | unsigned int isDebug; 42 | float time_elapsed; 43 | xfstkstatuspfn physstatuspfn; 44 | int retrycount; 45 | char *fwdnx; 46 | char *fwimage; 47 | char *osdnx; 48 | char* osimage; 49 | char* gpflags; 50 | int tid; 51 | int numtargets; 52 | bool provisioningok; 53 | explicit xfstkdldrthreadobj(QObject *parent = 0); 54 | void configuredownloader(char *fwdnx, char *fwimage, char *osdnx, char* osimage, char* gpflags, int tid, int numtargets, int retrycount); 55 | void go(); 56 | bool bkill; 57 | bool bFwOnly; 58 | bool bOsOnly; 59 | bool bFwOs; 60 | bool bLog; 61 | QString LogPath; 62 | bool bMiscDnxEnable; 63 | QString MiscDnXPath; 64 | signals: 65 | void StatusUpdate(QString stuff); 66 | void ThreadComplete(bool result); 67 | void TargetsCompletedForThread(int numdone); 68 | public slots: 69 | private: 70 | bool downloadmtfwosthread(char *fwdnx, char *fwimage, char *osdnx, char* osimage, char* gpflags); 71 | }; 72 | 73 | class xfstkdldrthread : public QThread 74 | { 75 | Q_OBJECT 76 | public: 77 | explicit xfstkdldrthread(QObject *parent = 0); 78 | ~xfstkdldrthread(); 79 | xfstkdldrthreadobj *obj; 80 | void setobj(xfstkdldrthreadobj *obj); 81 | signals: 82 | void done(); 83 | 84 | public slots: 85 | protected: 86 | void run(); 87 | 88 | private: 89 | QMutex mutex; 90 | QWaitCondition condition; 91 | }; 92 | 93 | #endif // XFSTKDLDRTHREAD_H 94 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/merrifield/xfstkdldrthread.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRTHREAD_H 19 | #define XFSTKDLDRTHREAD_H 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | class xfstkdldrthreadobj : public QObject 38 | { 39 | Q_OBJECT 40 | public: 41 | unsigned int isDebug; 42 | float time_elapsed; 43 | xfstkstatuspfn physstatuspfn; 44 | int retrycount; 45 | char *fwdnx; 46 | char *fwimage; 47 | char *osdnx; 48 | char* osimage; 49 | char* gpflags; 50 | int tid; 51 | int numtargets; 52 | bool provisioningok; 53 | explicit xfstkdldrthreadobj(QObject *parent = 0); 54 | void configuredownloader(char *fwdnx, char *fwimage, char *osdnx, char* osimage, char* gpflags, int tid, int numtargets, int retrycount); 55 | void go(); 56 | bool bkill; 57 | bool bFwOnly; 58 | bool bOsOnly; 59 | bool bFwOs; 60 | bool bLog; 61 | QString LogPath; 62 | bool bMiscDnxEnable; 63 | QString MiscDnXPath; 64 | signals: 65 | void StatusUpdate(QString stuff); 66 | void ThreadComplete(bool result); 67 | void TargetsCompletedForThread(int numdone); 68 | public slots: 69 | private: 70 | bool downloadmtfwosthread(char *fwdnx, char *fwimage, char *osdnx, char* osimage, char* gpflags); 71 | }; 72 | 73 | class xfstkdldrthread : public QThread 74 | { 75 | Q_OBJECT 76 | public: 77 | explicit xfstkdldrthread(QObject *parent = 0); 78 | ~xfstkdldrthread(); 79 | xfstkdldrthreadobj *obj; 80 | void setobj(xfstkdldrthreadobj *obj); 81 | signals: 82 | void done(); 83 | 84 | public slots: 85 | protected: 86 | void run(); 87 | 88 | private: 89 | QMutex mutex; 90 | QWaitCondition condition; 91 | }; 92 | 93 | #endif // XFSTKDLDRTHREAD_H 94 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/baytrail/xfstkdldrpluginbaytrail.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #include "xfstkdldrpluginbaytrail.h" 19 | 20 | XfstkDldrPluginBaytrail::XfstkDldrPluginBaytrail() 21 | { 22 | this->PluginInfo.PlatformName = QString("Baytrail"); 23 | this->PluginInfo.PluginName = QString("Baytrail B0"); 24 | this->PluginInfo.PluginTabOrder = 1; 25 | 26 | this->PluginInfo.PluginInterface = (XfstkDldrPluginInterface *)this; 27 | QObject::connect(&(this->UserTabInterface),SIGNAL(UserInterfaceChanged(UserInterfaceState*)),&(this->OptionsTabInterface),SLOT(UserInterfaceChanged(UserInterfaceState*))); 28 | QObject::connect(&(this->OptionsTabInterface),SIGNAL(OptionsInterfaceChanged(OptionsInterfaceState*)),&(this->UserTabInterface),SLOT(OptionsInterfaceChanged(OptionsInterfaceState*))); 29 | } 30 | 31 | XfstkDldrPluginInterface* XfstkDldrPluginBaytrail::Create() 32 | { 33 | return new XfstkDldrPluginBaytrail(); 34 | } 35 | 36 | QTabWidget *XfstkDldrPluginBaytrail::GetUserTabInterface() 37 | { 38 | return this->UserTabInterface.GetTabInterface(); 39 | } 40 | 41 | QTabWidget *XfstkDldrPluginBaytrail::GetOptionsTabInterface() 42 | { 43 | return this->OptionsTabInterface.GetTabInterface(); 44 | } 45 | 46 | bool XfstkDldrPluginBaytrail::InitializeTabInterfaces() 47 | { 48 | return true; 49 | } 50 | 51 | bool XfstkDldrPluginBaytrail::SaveTabInterfaceSettings() 52 | { 53 | this->UserTabInterface.SaveUserInterfaceStateToDisk(QString("Intel"),QString("Baytrail")); 54 | return true; 55 | } 56 | 57 | bool XfstkDldrPluginBaytrail::RestoreTabInterfaceSettings() 58 | { 59 | this->UserTabInterface.LoadUserInterfaceStateFromDisk(QString("Intel"),QString("Baytrail")); 60 | this->UserTabInterface.RestoreUserInterfaceFromCurrentState(); 61 | return true; 62 | } 63 | 64 | XfstkDldrPluginInfo *XfstkDldrPluginBaytrail::GetPluginInfo() 65 | { 66 | return &(this->PluginInfo); 67 | } 68 | 69 | bool XfstkDldrPluginBaytrail::Init() 70 | { 71 | return true; 72 | } 73 | 74 | Q_EXPORT_PLUGIN2(XfstkDldrPluginBaytrail, XfstkDldrPluginBaytrail) 75 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/medfield/xfstkdldrpluginmedfield.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #include "xfstkdldrpluginmedfield.h" 19 | 20 | XfstkDldrPluginMedfield::XfstkDldrPluginMedfield() 21 | { 22 | this->PluginInfo.PlatformName = QString("Medfield"); 23 | this->PluginInfo.PluginName = QString("Medfield B0/C0"); 24 | this->PluginInfo.PluginTabOrder = 0; 25 | this->PluginInfo.PluginInterface = (XfstkDldrPluginInterface *)this; 26 | QObject::connect(&(this->UserTabInterface),SIGNAL(UserInterfaceChanged(UserInterfaceState*)),&(this->OptionsTabInterface),SLOT(UserInterfaceChanged(UserInterfaceState*))); 27 | QObject::connect(&(this->OptionsTabInterface),SIGNAL(OptionsInterfaceChanged(OptionsInterfaceState*)),&(this->UserTabInterface),SLOT(OptionsInterfaceChanged(OptionsInterfaceState*))); 28 | } 29 | 30 | XfstkDldrPluginInterface* XfstkDldrPluginMedfield::Create() 31 | { 32 | return new XfstkDldrPluginMedfield(); 33 | } 34 | 35 | QTabWidget *XfstkDldrPluginMedfield::GetUserTabInterface() 36 | { 37 | return this->UserTabInterface.GetTabInterface(); 38 | } 39 | 40 | QTabWidget *XfstkDldrPluginMedfield::GetOptionsTabInterface() 41 | { 42 | return this->OptionsTabInterface.GetTabInterface(); 43 | } 44 | 45 | bool XfstkDldrPluginMedfield::InitializeTabInterfaces() 46 | { 47 | return true; 48 | } 49 | 50 | bool XfstkDldrPluginMedfield::SaveTabInterfaceSettings() 51 | { 52 | this->UserTabInterface.SaveUserInterfaceStateToDisk(QString("Intel"),QString("Medfield")); 53 | return true; 54 | } 55 | 56 | bool XfstkDldrPluginMedfield::RestoreTabInterfaceSettings() 57 | { 58 | this->UserTabInterface.LoadUserInterfaceStateFromDisk(QString("Intel"),QString("Medfield")); 59 | this->UserTabInterface.RestoreUserInterfaceFromCurrentState(); 60 | return true; 61 | } 62 | 63 | XfstkDldrPluginInfo *XfstkDldrPluginMedfield::GetPluginInfo() 64 | { 65 | return &(this->PluginInfo); 66 | } 67 | 68 | bool XfstkDldrPluginMedfield::Init() 69 | { 70 | return true; 71 | } 72 | 73 | Q_EXPORT_PLUGIN2(XfstkDldrPluginMedfield, XfstkDldrPluginMedfield) 74 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/cloverviewplus/xfstkdldrthread.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRTHREAD_H 19 | #define XFSTKDLDRTHREAD_H 20 | 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include 35 | #include 36 | 37 | class xfstkdldrthreadobj : public QObject 38 | { 39 | Q_OBJECT 40 | public: 41 | unsigned int isDebug; 42 | float time_elapsed; 43 | xfstkstatuspfn physstatuspfn; 44 | int retrycount; 45 | char *fwdnx; 46 | char *fwimage; 47 | char *osdnx; 48 | char* osimage; 49 | char* gpflags; 50 | int tid; 51 | int numtargets; 52 | bool provisioningok; 53 | explicit xfstkdldrthreadobj(QObject *parent = 0); 54 | void configuredownloader(char *fwdnx, char *fwimage, char *osdnx, char* osimage, char* gpflags, int tid, int numtargets, int retrycount); 55 | void go(); 56 | bool bkill; 57 | bool bFwOnly; 58 | bool bOsOnly; 59 | bool bFwOs; 60 | bool bLog; 61 | QString LogPath; 62 | bool bSoftfuseInclude; 63 | QString SoftfusesPath; 64 | signals: 65 | void StatusUpdate(QString stuff); 66 | void ThreadComplete(bool result); 67 | void TargetsCompletedForThread(int numdone); 68 | public slots: 69 | private: 70 | bool downloadmtfwosthread(char *fwdnx, char *fwimage, char *osdnx, char* osimage, char* gpflags); 71 | }; 72 | 73 | class xfstkdldrthread : public QThread 74 | { 75 | Q_OBJECT 76 | public: 77 | explicit xfstkdldrthread(QObject *parent = 0); 78 | ~xfstkdldrthread(); 79 | xfstkdldrthreadobj *obj; 80 | void setobj(xfstkdldrthreadobj *obj); 81 | signals: 82 | void done(); 83 | 84 | public slots: 85 | protected: 86 | void run(); 87 | 88 | private: 89 | QMutex mutex; 90 | QWaitCondition condition; 91 | }; 92 | 93 | #endif // XFSTKDLDRTHREAD_H 94 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/protocol.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * protocol.h 3 | * 4 | * This file implements the streaming download protocol 5 | * 6 | * Copyright (c) 2007-2015 7 | * Qualcomm Technologies Incorporated. 8 | * All Rights Reserved. 9 | * Qualcomm Confidential and Proprietary 10 | * 11 | *****************************************************************************/ 12 | /*============================================================================= 13 | Edit History 14 | 15 | $Header: //source/qcom/qct/platform/uefi/workspaces/pweber/apps/8x26_emmcdl/emmcdl/main/latest/inc/protocol.h#4 $ 16 | $DateTime: 2015/05/07 21:41:17 $ $Author: pweber $ 17 | 18 | when who what, where, why 19 | ------------------------------------------------------------------------------- 20 | 12/09/15 pgw Initial version. 21 | =============================================================================*/ 22 | #pragma once 23 | 24 | #include "partition.h" 25 | #include 26 | 27 | #define MAX_XML_LEN 2048 28 | #define MAX_TRANSFER_SIZE 0x100000 29 | 30 | class Protocol { 31 | public: 32 | //int ConnectToFlashProg(fh_configure_t *cfg); 33 | //int CreateGPP(DWORD dwGPP1, DWORD dwGPP2, DWORD dwGPP3, DWORD dwGPP4); 34 | //int SetActivePartition(int prtn_num); 35 | 36 | Protocol(); 37 | ~Protocol(); 38 | 39 | int DumpDiskContents(uint64 start_sector, uint64 num_sectors, TCHAR *szOutFile, UINT8 partNum, TCHAR *szPartName); 40 | int WipeDiskContents(uint64 start_sector, uint64 num_sectors, TCHAR *szPartName); 41 | 42 | int ReadGPT(bool debug); 43 | int WriteGPT(TCHAR *szPartName, TCHAR *szBinFile); 44 | void EnableVerbose(void); 45 | int GetDiskSectorSize(void); 46 | void SetDiskSectorSize(int size); 47 | uint64 GetNumDiskSectors(void); 48 | HANDLE GetDiskHandle(void); 49 | 50 | virtual int DeviceReset(void) = ERROR_SUCCESS; 51 | virtual int WriteData(BYTE *writeBuffer, __int64 writeOffset, DWORD writeBytes, DWORD *bytesWritten, UINT8 partNum) = ERROR_SUCCESS; 52 | virtual int ReadData(BYTE *readBuffer, __int64 readOffset, DWORD readBytes, DWORD *bytesRead, UINT8 partNum) = ERROR_SUCCESS; 53 | virtual int FastCopy(HANDLE hRead, __int64 sectorRead, HANDLE hWrite, __int64 sectorWrite, uint64 sectors, UINT8 partNum) = ERROR_SUCCESS; 54 | virtual int ProgramRawCommand(TCHAR *key) = ERROR_SUCCESS; 55 | virtual int ProgramPatchEntry(PartitionEntry pe, TCHAR *key) = ERROR_SUCCESS; 56 | 57 | protected: 58 | 59 | int LoadPartitionInfo(TCHAR *szPartName, PartitionEntry *pEntry); 60 | void Log(char *str, ...); 61 | void Log(TCHAR *str, ...); 62 | 63 | gpt_header_t gpt_hdr; 64 | gpt_entry_t *gpt_entries; 65 | uint64 disk_size; 66 | HANDLE hDisk; 67 | BYTE *buffer1; 68 | BYTE *buffer2; 69 | BYTE *bufAlloc1; 70 | BYTE *bufAlloc2; 71 | int DISK_SECTOR_SIZE; 72 | 73 | private: 74 | 75 | bool bVerbose; 76 | 77 | 78 | }; 79 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/cloverview/xfstkdldrplugincloverview.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #include "xfstkdldrplugincloverview.h" 19 | 20 | XfstkDldrPluginCloverview::XfstkDldrPluginCloverview() 21 | { 22 | this->PluginInfo.PlatformName = QString("Cloverview"); 23 | this->PluginInfo.PluginName = QString("Cloverview A0"); 24 | this->PluginInfo.PluginTabOrder = 2; 25 | this->PluginInfo.PluginInterface = (XfstkDldrPluginInterface *)this; 26 | QObject::connect(&(this->UserTabInterface),SIGNAL(UserInterfaceChanged(UserInterfaceState*)),&(this->OptionsTabInterface),SLOT(UserInterfaceChanged(UserInterfaceState*))); 27 | QObject::connect(&(this->OptionsTabInterface),SIGNAL(OptionsInterfaceChanged(OptionsInterfaceState*)),&(this->UserTabInterface),SLOT(OptionsInterfaceChanged(OptionsInterfaceState*))); 28 | } 29 | 30 | XfstkDldrPluginInterface* XfstkDldrPluginCloverview::Create() 31 | { 32 | return new XfstkDldrPluginCloverview(); 33 | } 34 | 35 | QTabWidget *XfstkDldrPluginCloverview::GetUserTabInterface() 36 | { 37 | return this->UserTabInterface.GetTabInterface(); 38 | } 39 | 40 | QTabWidget *XfstkDldrPluginCloverview::GetOptionsTabInterface() 41 | { 42 | return this->OptionsTabInterface.GetTabInterface(); 43 | } 44 | 45 | bool XfstkDldrPluginCloverview::InitializeTabInterfaces() 46 | { 47 | return true; 48 | } 49 | 50 | bool XfstkDldrPluginCloverview::SaveTabInterfaceSettings() 51 | { 52 | this->UserTabInterface.SaveUserInterfaceStateToDisk(QString("Intel"),QString("Cloverview")); 53 | return true; 54 | } 55 | 56 | bool XfstkDldrPluginCloverview::RestoreTabInterfaceSettings() 57 | { 58 | this->UserTabInterface.LoadUserInterfaceStateFromDisk(QString("Intel"),QString("Cloverview")); 59 | this->UserTabInterface.RestoreUserInterfaceFromCurrentState(); 60 | return true; 61 | } 62 | 63 | XfstkDldrPluginInfo *XfstkDldrPluginCloverview::GetPluginInfo() 64 | { 65 | return &(this->PluginInfo); 66 | } 67 | 68 | bool XfstkDldrPluginCloverview::Init() 69 | { 70 | return true; 71 | } 72 | 73 | Q_EXPORT_PLUGIN2(XfstkDldrPluginCloverview, XfstkDldrPluginCloverview) 74 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/merrifield/xfstkdldrpluginmerrifield.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #include "xfstkdldrpluginmerrifield.h" 19 | 20 | XfstkDldrPluginMerrifield::XfstkDldrPluginMerrifield() 21 | { 22 | this->PluginInfo.PlatformName = QString("Merrifield"); 23 | this->PluginInfo.PluginName = QString("Merrifield A0"); 24 | this->PluginInfo.PluginTabOrder = 1; 25 | 26 | this->PluginInfo.PluginInterface = (XfstkDldrPluginInterface *)this; 27 | QObject::connect(&(this->UserTabInterface),SIGNAL(UserInterfaceChanged(UserInterfaceState*)),&(this->OptionsTabInterface),SLOT(UserInterfaceChanged(UserInterfaceState*))); 28 | QObject::connect(&(this->OptionsTabInterface),SIGNAL(OptionsInterfaceChanged(OptionsInterfaceState*)),&(this->UserTabInterface),SLOT(OptionsInterfaceChanged(OptionsInterfaceState*))); 29 | } 30 | 31 | XfstkDldrPluginInterface* XfstkDldrPluginMerrifield::Create() 32 | { 33 | return new XfstkDldrPluginMerrifield(); 34 | } 35 | 36 | QTabWidget *XfstkDldrPluginMerrifield::GetUserTabInterface() 37 | { 38 | return this->UserTabInterface.GetTabInterface(); 39 | } 40 | 41 | QTabWidget *XfstkDldrPluginMerrifield::GetOptionsTabInterface() 42 | { 43 | return this->OptionsTabInterface.GetTabInterface(); 44 | } 45 | 46 | bool XfstkDldrPluginMerrifield::InitializeTabInterfaces() 47 | { 48 | return true; 49 | } 50 | 51 | bool XfstkDldrPluginMerrifield::SaveTabInterfaceSettings() 52 | { 53 | this->UserTabInterface.SaveUserInterfaceStateToDisk(QString("Intel"),QString("Merrifield")); 54 | return true; 55 | } 56 | 57 | bool XfstkDldrPluginMerrifield::RestoreTabInterfaceSettings() 58 | { 59 | this->UserTabInterface.LoadUserInterfaceStateFromDisk(QString("Intel"),QString("Merrifield")); 60 | this->UserTabInterface.RestoreUserInterfaceFromCurrentState(); 61 | return true; 62 | } 63 | 64 | XfstkDldrPluginInfo *XfstkDldrPluginMerrifield::GetPluginInfo() 65 | { 66 | return &(this->PluginInfo); 67 | } 68 | 69 | bool XfstkDldrPluginMerrifield::Init() 70 | { 71 | return true; 72 | } 73 | 74 | Q_EXPORT_PLUGIN2(XfstkDldrPluginMerrifield, XfstkDldrPluginMerrifield) 75 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/cloverview/xfstkdldrpluginoptionsinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINOPTIONSINTERFACE_H 19 | #define XFSTKDLDRPLUGINOPTIONSINTERFACE_H 20 | #include 21 | #include 22 | #include 23 | #include "xfstkdldrpluginuserinterface.h" 24 | namespace Ui { 25 | class XfstkDldrPluginOptionsInterface; 26 | } 27 | struct UserInterfaceState; 28 | 29 | struct OptionsInterfaceState { 30 | QString FWDnXPath; 31 | QString IFWIPath; 32 | QString OSDnXPath; 33 | QString OSIPath; 34 | QString GPFlagOverrideValue; 35 | QString LoggingPath; 36 | QString ProvisionCount; 37 | QString DesktopDir; 38 | QString USBTimeout; 39 | bool EnableGpFlagOverride; 40 | bool EnableLogging; 41 | bool EnableProvisionCount; 42 | }; 43 | 44 | class XfstkDldrPluginOptionsInterface : public QWidget { 45 | Q_OBJECT 46 | public: 47 | OptionsInterfaceState CurrentState; 48 | OptionsInterfaceState PrevState; 49 | XfstkDldrPluginOptionsInterface(QWidget *parent = 0); 50 | ~XfstkDldrPluginOptionsInterface(); 51 | QTabWidget *GetTabInterface(); 52 | Ui::XfstkDldrPluginOptionsInterface *ui; 53 | QFileDialog OpenFile; 54 | signals: 55 | void OptionsInterfaceChanged(OptionsInterfaceState *State); 56 | 57 | public slots: 58 | void UserInterfaceChanged(UserInterfaceState *State); 59 | 60 | protected: 61 | void changeEvent(QEvent *e); 62 | 63 | private slots: 64 | void on_ResetProvisionCount_clicked(); 65 | void on_RestoreDefaultLogPath_clicked(); 66 | void on_BrowseLoggingPath_clicked(); 67 | void on_LoggingPath_editingFinished(); 68 | void on_EnableLogging_toggled(bool checked); 69 | void on_ProvisionCountEnabled_toggled(bool checked); 70 | void on_GPFlagOverrideValue_editingFinished(); 71 | void on_GPFlagOverrideEnable_toggled(bool checked); 72 | void on_ClearAllStoredPaths_clicked(); 73 | void on_ClearOSImagePath_clicked(); 74 | void on_ClearOSDnXPath_clicked(); 75 | void on_ClearIFWIPath_clicked(); 76 | void on_ClearFWDnXPath_clicked(); 77 | void on_UsbTimeoutOption_editingFinished(); 78 | }; 79 | 80 | #endif // XFSTKDLDRPLUGINOPTIONSINTERFACE_H 81 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/diskwriter.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * diskwriter.h 3 | * 4 | * This file defines the interface for the DiskWriter class 5 | * 6 | * Copyright (c) 2007-2011 7 | * Qualcomm Technologies Incorporated. 8 | * All Rights Reserved. 9 | * Qualcomm Confidential and Proprietary 10 | * 11 | *****************************************************************************/ 12 | /*============================================================================= 13 | Edit History 14 | 15 | $Header: //source/qcom/qct/platform/uefi/workspaces/pweber/apps/8x26_emmcdl/emmcdl/main/latest/inc/diskwriter.h#7 $ 16 | $DateTime: 2015/04/29 17:06:00 $ $Author: pweber $ 17 | 18 | when who what, where, why 19 | ------------------------------------------------------------------------------- 20 | 10/10/11 pgw Fix up spacing and add hVolume 21 | 03/21/11 pgw Initial version. 22 | =============================================================================*/ 23 | #pragma once 24 | 25 | #include "partition.h" 26 | #include "protocol.h" 27 | #include 28 | #include 29 | #include 30 | 31 | #define WRITE_TIMEOUT_MS 3000 32 | #define MAX_VOLUMES 26 33 | #define MAX_DISKS 26 34 | 35 | 36 | typedef struct { 37 | __int32 serialnum; 38 | __int32 drivetype; 39 | uint64 volsize; 40 | int disknum; 41 | TCHAR fstype[MAX_PATH+1]; 42 | TCHAR mount[MAX_PATH+1]; 43 | TCHAR rootpath[MAX_PATH+1]; 44 | TCHAR volume[MAX_PATH+1]; 45 | } vol_entry_t; 46 | 47 | typedef struct { 48 | uint64 disksize; 49 | int blocksize; 50 | int disknum; 51 | int volnum[MAX_VOLUMES+1]; 52 | TCHAR diskname[MAX_PATH+1]; 53 | } disk_entry_t; 54 | 55 | class DiskWriter : public Protocol { 56 | public: 57 | int diskcount; 58 | bool bPatchDisk; 59 | 60 | DiskWriter(); 61 | ~DiskWriter(); 62 | 63 | int WriteData(BYTE *writeBuffer, __int64 writeOffset, DWORD writeBytes, DWORD *bytesWritten, UINT8 partNum); 64 | int ReadData(BYTE *readBuffer, __int64 readOffset, DWORD readBytes, DWORD *bytesRead, UINT8 partNum); 65 | 66 | int FastCopy(HANDLE hRead, __int64 sectorRead, HANDLE hWrite, __int64 sectorWrite, uint64 sectors, UINT8 partNum=0); 67 | int OpenDevice(int dn); 68 | int OpenDiskFile(TCHAR *oFile, uint64 sectors); 69 | void CloseDevice(); 70 | int InitDiskList(bool verbose = false); 71 | int DeviceReset(void); 72 | int ProgramPatchEntry(PartitionEntry pe, TCHAR *key); 73 | int ProgramRawCommand(TCHAR *key); 74 | 75 | // Functions for testing purposes 76 | int CorruptionTest(uint64 offset); 77 | int DiskTest(uint64 offset); 78 | int WipeLayout(); 79 | 80 | protected: 81 | 82 | private: 83 | HANDLE hVolume; 84 | int disk_num; 85 | HANDLE hFS; 86 | OVERLAPPED ovl; 87 | disk_entry_t *disks; 88 | vol_entry_t *volumes; 89 | 90 | int GetVolumeInfo(vol_entry_t *vol); 91 | int GetDiskInfo(disk_entry_t *de); 92 | TCHAR *TCharToString(TCHAR *p); 93 | int UnmountVolume(vol_entry_t vol); 94 | int LockDevice(); 95 | int UnlockDevice(); 96 | bool IsDeviceWriteable(); 97 | int GetRawDiskSize(uint64 *ds); 98 | int RawReadTest(uint64 offset); 99 | }; 100 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/xfstkdldrpluginoptionsinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINOPTIONSINTERFACE_H 19 | #define XFSTKDLDRPLUGINOPTIONSINTERFACE_H 20 | #include 21 | #include 22 | #include 23 | #include "AsusWidget.h" 24 | namespace Ui { 25 | class XfstkDldrPluginOptionsInterface; 26 | } 27 | struct UserInterfaceState; 28 | 29 | struct OptionsInterfaceState { 30 | QString FWDnXPath; 31 | QString IFWIPath; 32 | QString OSDnXPath; 33 | QString OSIPath; 34 | QString SoftfusesPath; 35 | QString GPFlagOverrideValue; 36 | QString LoggingPath; 37 | QString ProvisionCount; 38 | QString DesktopDir; 39 | QString CurrentSearchDir; 40 | QString USBTimeout; 41 | bool EnableGpFlagOverride; 42 | bool EnableLogging; 43 | bool EnableProvisionCount; 44 | bool SoftfuseInclude; 45 | bool SuppressErrors; 46 | }; 47 | 48 | class XfstkDldrPluginOptionsInterface : public QWidget { 49 | Q_OBJECT 50 | public: 51 | OptionsInterfaceState CurrentState; 52 | OptionsInterfaceState PrevState; 53 | XfstkDldrPluginOptionsInterface(QWidget *parent = 0); 54 | ~XfstkDldrPluginOptionsInterface(); 55 | QTabWidget *GetTabInterface(); 56 | QString DetermineCurrentFileSearchPath(QString BinPath); 57 | bool VerifyBinaryFilePath(QString BinPath); 58 | QString LastError; 59 | bool LineEditWA; 60 | void ReportErrors(); 61 | Ui::XfstkDldrPluginOptionsInterface *ui; 62 | QFileDialog OpenFile; 63 | signals: 64 | void OptionsInterfaceChanged(OptionsInterfaceState *State); 65 | 66 | public slots: 67 | void UserInterfaceChanged(UserInterfaceState *State); 68 | 69 | protected: 70 | void changeEvent(QEvent *e); 71 | 72 | private: 73 | void on_SoftfusePath_editingFinished(); 74 | 75 | private slots: 76 | void on_ResetProvisionCount_clicked(); 77 | void on_RestoreDefaultLogPath_clicked(); 78 | void on_BrowseLoggingPath_clicked(); 79 | void on_LoggingPath_editingFinished(); 80 | void on_BrowseSoftfusePath_clicked(); 81 | void on_SoftfuseInclude_toggled(bool checked); 82 | void on_EnableLogging_toggled(bool checked); 83 | void on_ProvisionCountEnabled_toggled(bool checked); 84 | void on_GPFlagOverrideValue_editingFinished(); 85 | void on_GPFlagOverrideEnable_toggled(bool checked); 86 | void on_ClearAllStoredPaths_clicked(); 87 | void on_ClearOSImagePath_clicked(); 88 | void on_ClearOSDnXPath_clicked(); 89 | void on_ClearIFWIPath_clicked(); 90 | void on_ClearFWDnXPath_clicked(); 91 | void on_UsbTimeoutOption_editingFinished(); 92 | }; 93 | 94 | #endif // XFSTKDLDRPLUGINOPTIONSINTERFACE_H 95 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/medfield/xfstkdldrpluginoptionsinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINOPTIONSINTERFACE_H 19 | #define XFSTKDLDRPLUGINOPTIONSINTERFACE_H 20 | #include 21 | #include 22 | #include 23 | #include "xfstkdldrpluginuserinterface.h" 24 | namespace Ui { 25 | class XfstkDldrPluginOptionsInterface; 26 | } 27 | struct UserInterfaceState; 28 | 29 | struct OptionsInterfaceState { 30 | QString FWDnXPath; 31 | QString IFWIPath; 32 | QString OSDnXPath; 33 | QString OSIPath; 34 | QString MiscDnXPath; 35 | QString GPFlagOverrideValue; 36 | QString LoggingPath; 37 | QString ProvisionCount; 38 | QString DesktopDir; 39 | QString CurrentSearchDir; 40 | QString USBTimeout; 41 | bool EnableGpFlagOverride; 42 | bool EnableLogging; 43 | bool EnableProvisionCount; 44 | bool MiscDnxEnable; 45 | bool SuppressErrors; 46 | }; 47 | 48 | class XfstkDldrPluginOptionsInterface : public QWidget { 49 | Q_OBJECT 50 | public: 51 | OptionsInterfaceState CurrentState; 52 | OptionsInterfaceState PrevState; 53 | XfstkDldrPluginOptionsInterface(QWidget *parent = 0); 54 | ~XfstkDldrPluginOptionsInterface(); 55 | QTabWidget *GetTabInterface(); 56 | QString DetermineCurrentFileSearchPath(QString BinPath); 57 | bool VerifyBinaryFilePath(QString BinPath); 58 | QString LastError; 59 | bool LineEditWA; 60 | void ReportErrors(); 61 | Ui::XfstkDldrPluginOptionsInterface *ui; 62 | QFileDialog OpenFile; 63 | signals: 64 | void OptionsInterfaceChanged(OptionsInterfaceState *State); 65 | 66 | public slots: 67 | void UserInterfaceChanged(UserInterfaceState *State); 68 | 69 | protected: 70 | void changeEvent(QEvent *e); 71 | 72 | private: 73 | 74 | 75 | private slots: 76 | void on_ResetProvisionCount_clicked(); 77 | void on_RestoreDefaultLogPath_clicked(); 78 | void on_BrowseLoggingPath_clicked(); 79 | void on_LoggingPath_editingFinished(); 80 | void on_MiscDnXPath_editingFinished(); 81 | void on_BrowseMiscDnXPath_clicked(); 82 | void on_MiscDnxEnable_toggled(bool checked); 83 | void on_EnableLogging_toggled(bool checked); 84 | void on_ProvisionCountEnabled_toggled(bool checked); 85 | void on_GPFlagOverrideValue_editingFinished(); 86 | void on_GPFlagOverrideEnable_toggled(bool checked); 87 | void on_ClearAllStoredPaths_clicked(); 88 | void on_ClearOSImagePath_clicked(); 89 | void on_ClearOSDnXPath_clicked(); 90 | void on_ClearIFWIPath_clicked(); 91 | void on_ClearFWDnXPath_clicked(); 92 | void on_UsbTimeoutOption_editingFinished(); 93 | }; 94 | 95 | #endif // XFSTKDLDRPLUGINOPTIONSINTERFACE_H 96 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/merrifield/xfstkdldrpluginoptionsinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINOPTIONSINTERFACE_H 19 | #define XFSTKDLDRPLUGINOPTIONSINTERFACE_H 20 | #include 21 | #include 22 | #include 23 | #include "xfstkdldrpluginuserinterface.h" 24 | namespace Ui { 25 | class XfstkDldrPluginOptionsInterface; 26 | } 27 | struct UserInterfaceState; 28 | 29 | struct OptionsInterfaceState { 30 | QString FWDnXPath; 31 | QString IFWIPath; 32 | QString OSDnXPath; 33 | QString OSIPath; 34 | QString MiscDnXPath; 35 | QString GPFlagOverrideValue; 36 | QString LoggingPath; 37 | QString ProvisionCount; 38 | QString DesktopDir; 39 | QString CurrentSearchDir; 40 | QString USBTimeout; 41 | bool EnableGpFlagOverride; 42 | bool EnableLogging; 43 | bool EnableProvisionCount; 44 | bool MiscDnxEnable; 45 | bool SuppressErrors; 46 | }; 47 | 48 | class XfstkDldrPluginOptionsInterface : public QWidget { 49 | Q_OBJECT 50 | public: 51 | OptionsInterfaceState CurrentState; 52 | OptionsInterfaceState PrevState; 53 | XfstkDldrPluginOptionsInterface(QWidget *parent = 0); 54 | ~XfstkDldrPluginOptionsInterface(); 55 | QTabWidget *GetTabInterface(); 56 | QString DetermineCurrentFileSearchPath(QString BinPath); 57 | bool VerifyBinaryFilePath(QString BinPath); 58 | QString LastError; 59 | bool LineEditWA; 60 | void ReportErrors(); 61 | Ui::XfstkDldrPluginOptionsInterface *ui; 62 | QFileDialog OpenFile; 63 | signals: 64 | void OptionsInterfaceChanged(OptionsInterfaceState *State); 65 | 66 | public slots: 67 | void UserInterfaceChanged(UserInterfaceState *State); 68 | 69 | protected: 70 | void changeEvent(QEvent *e); 71 | 72 | private: 73 | 74 | 75 | private slots: 76 | void on_ResetProvisionCount_clicked(); 77 | void on_RestoreDefaultLogPath_clicked(); 78 | void on_BrowseLoggingPath_clicked(); 79 | void on_LoggingPath_editingFinished(); 80 | void on_MiscDnXPath_editingFinished(); 81 | void on_BrowseMiscDnXPath_clicked(); 82 | void on_MiscDnxEnable_toggled(bool checked); 83 | void on_EnableLogging_toggled(bool checked); 84 | void on_ProvisionCountEnabled_toggled(bool checked); 85 | void on_GPFlagOverrideValue_editingFinished(); 86 | void on_GPFlagOverrideEnable_toggled(bool checked); 87 | void on_ClearAllStoredPaths_clicked(); 88 | void on_ClearOSImagePath_clicked(); 89 | void on_ClearOSDnXPath_clicked(); 90 | void on_ClearIFWIPath_clicked(); 91 | void on_ClearFWDnXPath_clicked(); 92 | void on_UsbTimeoutOption_editingFinished(); 93 | }; 94 | 95 | #endif // XFSTKDLDRPLUGINOPTIONSINTERFACE_H 96 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/cloverviewplus/xfstkdldrpluginoptionsinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINOPTIONSINTERFACE_H 19 | #define XFSTKDLDRPLUGINOPTIONSINTERFACE_H 20 | #include 21 | #include 22 | #include 23 | #include "xfstkdldrpluginuserinterface.h" 24 | namespace Ui { 25 | class XfstkDldrPluginOptionsInterface; 26 | } 27 | struct UserInterfaceState; 28 | 29 | struct OptionsInterfaceState { 30 | QString FWDnXPath; 31 | QString IFWIPath; 32 | QString OSDnXPath; 33 | QString OSIPath; 34 | QString SoftfusesPath; 35 | QString GPFlagOverrideValue; 36 | QString LoggingPath; 37 | QString ProvisionCount; 38 | QString DesktopDir; 39 | QString CurrentSearchDir; 40 | QString USBTimeout; 41 | bool EnableGpFlagOverride; 42 | bool EnableLogging; 43 | bool EnableProvisionCount; 44 | bool SoftfuseInclude; 45 | bool SuppressErrors; 46 | }; 47 | 48 | class XfstkDldrPluginOptionsInterface : public QWidget { 49 | Q_OBJECT 50 | public: 51 | OptionsInterfaceState CurrentState; 52 | OptionsInterfaceState PrevState; 53 | XfstkDldrPluginOptionsInterface(QWidget *parent = 0); 54 | ~XfstkDldrPluginOptionsInterface(); 55 | QTabWidget *GetTabInterface(); 56 | QString DetermineCurrentFileSearchPath(QString BinPath); 57 | bool VerifyBinaryFilePath(QString BinPath); 58 | QString LastError; 59 | bool LineEditWA; 60 | void ReportErrors(); 61 | Ui::XfstkDldrPluginOptionsInterface *ui; 62 | QFileDialog OpenFile; 63 | signals: 64 | void OptionsInterfaceChanged(OptionsInterfaceState *State); 65 | 66 | public slots: 67 | void UserInterfaceChanged(UserInterfaceState *State); 68 | 69 | protected: 70 | void changeEvent(QEvent *e); 71 | 72 | private: 73 | void on_SoftfusePath_editingFinished(); 74 | 75 | private slots: 76 | void on_ResetProvisionCount_clicked(); 77 | void on_RestoreDefaultLogPath_clicked(); 78 | void on_BrowseLoggingPath_clicked(); 79 | void on_LoggingPath_editingFinished(); 80 | void on_BrowseSoftfusePath_clicked(); 81 | void on_SoftfuseInclude_toggled(bool checked); 82 | void on_EnableLogging_toggled(bool checked); 83 | void on_ProvisionCountEnabled_toggled(bool checked); 84 | void on_GPFlagOverrideValue_editingFinished(); 85 | void on_GPFlagOverrideEnable_toggled(bool checked); 86 | void on_ClearAllStoredPaths_clicked(); 87 | void on_ClearOSImagePath_clicked(); 88 | void on_ClearOSDnXPath_clicked(); 89 | void on_ClearIFWIPath_clicked(); 90 | void on_ClearFWDnXPath_clicked(); 91 | void on_UsbTimeoutOption_editingFinished(); 92 | }; 93 | 94 | #endif // XFSTKDLDRPLUGINOPTIONSINTERFACE_H 95 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/26MobileTool.pro: -------------------------------------------------------------------------------- 1 | # ---------------------------------------------------- 2 | # This file is generated by the Qt Visual Studio Tools. 3 | # ------------------------------------------------------ 4 | 5 | TEMPLATE = app 6 | TARGET = 26MobileTool 7 | DESTDIR = ../../../App.publish/builder/26MobileTool/Win32 8 | QT += core gui widgets serialport 9 | CONFIG += release 10 | DEFINES += WIN64 QT_DLL QT_WIDGETS_LIB QT_SERIALPORT_LIB 11 | INCLUDEPATH += ../Intel/downloader \ 12 | ../Intel/downloader/cloverviewplus \ 13 | ../ \ 14 | $(SolutionDir)sourcecode/26MobileTool/Form \ 15 | $(SolutionDir)sourcecode/26MobileTool/Class \ 16 | $(SolutionDir)sourcecode/26MobileTool/Qualcom/emmcdl \ 17 | $(SolutionDir)sourcecode/26MobileTool/xfstk-dldr-api \ 18 | ./GeneratedFiles \ 19 | . \ 20 | ./GeneratedFiles/$(ConfigurationName) 21 | LIBS += -L"$(SolutionDir)sourcecode/26MobileTool/xfstk-dldr-api/Release" \ 22 | -lAdvapi32 \ 23 | -lsetupapi \ 24 | -luuid \ 25 | -lxfstk-dldr-api 26 | DEPENDPATH += . 27 | MOC_DIR += ./GeneratedFiles/$(ConfigurationName) 28 | OBJECTS_DIR += release 29 | UI_DIR += ./GeneratedFiles 30 | RCC_DIR += ./GeneratedFiles 31 | win32:RC_FILE = 26MobileTool.rc 32 | HEADERS += ./Form/resource.h \ 33 | ./Qualcom/emmcdl/crc.h \ 34 | ./Qualcom/emmcdl/diskwriter.h \ 35 | ./Qualcom/emmcdl/dload.h \ 36 | ./Qualcom/emmcdl/emmcdl.h \ 37 | ./Qualcom/emmcdl/ffu.h \ 38 | ./Qualcom/emmcdl/firehose.h \ 39 | ./Qualcom/emmcdl/partition.h \ 40 | ./Qualcom/emmcdl/protocol.h \ 41 | ./Qualcom/emmcdl/qcversion.h \ 42 | ./Qualcom/emmcdl/sahara.h \ 43 | ./Qualcom/emmcdl/serialport.h \ 44 | ./Qualcom/emmcdl/sparse.h \ 45 | ./Qualcom/emmcdl/targetver.h \ 46 | ./Qualcom/emmcdl/xmlparser.h \ 47 | ./Form/MediatekWidget.h \ 48 | ./Class/MyThread.h \ 49 | ./Form/TabWidgetBase.h \ 50 | ./Form/QualComWidget.h \ 51 | ./Form/MainWindowCallback.h \ 52 | ./Form/MainWindow.h \ 53 | ./Form/MainController.h \ 54 | ./Form/EmmcRawWidget.h \ 55 | ./Form/CmdWidget.h \ 56 | ./Form/AsusWidget.h \ 57 | ./Form/AdbWidget.h \ 58 | ./Intel/downloader/cloverviewplus/xfstkdldrpluginuserinterface.h \ 59 | ./Intel/downloader/cloverviewplus/xfstkdldrthread.h 60 | SOURCES += ./Class/MyThread.cpp \ 61 | ./Form/AdbWidget.cpp \ 62 | ./Form/AsusWidget.cpp \ 63 | ./Form/CmdWidget.cpp \ 64 | ./Form/EmmcRawWidget.cpp \ 65 | ./Form/MainController.cpp \ 66 | ./Form/MainWindow.cpp \ 67 | ./Form/MainWindowCallback.cpp \ 68 | ./Form/MediatekWidget.cpp \ 69 | ./Form/QualComWidget.cpp \ 70 | ./Form/TabWidgetBase.cpp \ 71 | ./main.cpp \ 72 | ./Qualcom/emmcdl/crc.cpp \ 73 | ./Qualcom/emmcdl/diskwriter.cpp \ 74 | ./Qualcom/emmcdl/dload.cpp \ 75 | ./Qualcom/emmcdl/emmcdl.cpp \ 76 | ./Qualcom/emmcdl/ffu.cpp \ 77 | ./Qualcom/emmcdl/firehose.cpp \ 78 | ./Qualcom/emmcdl/partition.cpp \ 79 | ./Qualcom/emmcdl/protocol.cpp \ 80 | ./Qualcom/emmcdl/sahara.cpp \ 81 | ./Qualcom/emmcdl/serialport.cpp \ 82 | ./Qualcom/emmcdl/sparse.cpp \ 83 | ./Qualcom/emmcdl/xmlparser.cpp \ 84 | ./Intel/downloader/cloverviewplus/xfstkdldrpluginuserinterface.cpp \ 85 | ./Intel/downloader/cloverviewplus/xfstkdldrthread.cpp 86 | FORMS += ./Form/Widget/AdbWidget.ui \ 87 | ./Form/Widget/AsusWidget.ui \ 88 | ./Form/Widget/CmdWidget.ui \ 89 | ./Form/Widget/EmmcRawWidget.ui \ 90 | ./Form/Widget/MainWindow.ui \ 91 | ./Form/Widget/QualComWidget.ui \ 92 | ./Form/Widget/MediatekWidget.ui \ 93 | ./Intel/downloader/cloverviewplus/xfstkdldrpluginoptionsinterface.ui \ 94 | ./Intel/downloader/cloverviewplus/xfstkdldrpluginuserinterface.ui 95 | RESOURCES += 26MobileTool.qrc 96 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/partition.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * partition.h 3 | * 4 | * This file defines the interface for the Partition class 5 | * 6 | * Copyright (c) 2007-2011 7 | * Qualcomm Technologies Incorporated. 8 | * All Rights Reserved. 9 | * Qualcomm Confidential and Proprietary 10 | * 11 | *****************************************************************************/ 12 | /*============================================================================= 13 | Edit History 14 | 15 | $Header: //source/qcom/qct/platform/uefi/workspaces/pweber/apps/8x26_emmcdl/emmcdl/main/latest/inc/partition.h#5 $ 16 | $DateTime: 2015/04/01 17:01:45 $ $Author: pweber $ 17 | 18 | when who what, where, why 19 | ------------------------------------------------------------------------------- 20 | 03/21/11 pgw Initial version. 21 | =============================================================================*/ 22 | 23 | #pragma once 24 | 25 | 26 | #include 27 | #include "xmlparser.h" 28 | #include 29 | 30 | #define MAX_LIST_SIZE 100 31 | #define MAX_PATH_LEN 256 32 | #define SECTOR_SIZE 512 33 | 34 | typedef unsigned __int64 uint64; 35 | class Protocol; 36 | 37 | enum cmdEnum { 38 | CMD_INVALID = 0, 39 | CMD_PATCH = 1, 40 | CMD_ZEROOUT = 2, 41 | CMD_PROGRAM = 3, 42 | CMD_OPTION = 4, 43 | CMD_PATH = 5, 44 | CMD_READ = 6, 45 | CMD_ERASE = 7, 46 | CMD_NOP = 8 47 | }; 48 | 49 | typedef struct { 50 | char signature[8]; 51 | __int32 revision; 52 | __int32 header_size; 53 | __int32 crc_header; 54 | __int32 reserved; 55 | uint64 current_lba; 56 | uint64 backup_lba; 57 | uint64 first_lba; 58 | uint64 last_lba; 59 | char disk_guid[16]; 60 | uint64 partition_lba; 61 | __int32 num_entries; 62 | __int32 entry_size; 63 | __int32 crc_partition; 64 | char reserved2[420]; 65 | } gpt_header_t; 66 | 67 | typedef struct { 68 | char type_guid[16]; 69 | char unique_guid[16]; 70 | uint64 first_lba; 71 | uint64 last_lba; 72 | uint64 attributes; 73 | TCHAR part_name[36]; 74 | } gpt_entry_t; 75 | 76 | typedef struct { 77 | cmdEnum eCmd; 78 | uint64 start_sector; 79 | uint64 offset; 80 | uint64 num_sectors; 81 | UINT8 physical_partition_number; 82 | uint64 patch_value; 83 | uint64 patch_offset; 84 | uint64 patch_size; 85 | uint64 crc_start; 86 | uint64 crc_size; 87 | TCHAR filename[MAX_PATH]; 88 | } PartitionEntry; 89 | 90 | TCHAR *StringReplace(TCHAR *inp, TCHAR *find, TCHAR *rep); 91 | TCHAR *StringSetValue(TCHAR *key, TCHAR *keyName, TCHAR *value); 92 | 93 | 94 | class Partition { 95 | public: 96 | int num_entries; 97 | 98 | Partition(uint64 ds=0) {num_entries = 0; cur_action = 0; d_sectors = ds;}; 99 | ~Partition() {}; 100 | int PreLoadImage(TCHAR * fname); 101 | int ProgramImage(Protocol *proto); 102 | int ProgramPartitionEntry(Protocol *proto, PartitionEntry pe, TCHAR *key); 103 | 104 | int CloseXML(); 105 | int GetNextXMLKey(TCHAR *keyName, TCHAR **key); 106 | unsigned int CalcCRC32(BYTE *buffer, int len); 107 | int ParseXMLKey(TCHAR *key, PartitionEntry *pe); 108 | 109 | private: 110 | TCHAR *xmlStart; 111 | TCHAR *xmlEnd; 112 | TCHAR *keyStart; 113 | TCHAR *keyEnd; 114 | 115 | int cur_action; 116 | uint64 d_sectors; 117 | 118 | int Reflect(int data, int len); 119 | int ParseXMLOptions(); 120 | int ParsePathList(); 121 | int ParseXMLString(TCHAR *line, TCHAR *key, TCHAR *value); 122 | int ParseXMLInt64(TCHAR *line, TCHAR *key, uint64 &value, PartitionEntry *pe); 123 | int ParseXMLEvaluate(TCHAR *expr, uint64 &value, PartitionEntry *pe); 124 | bool CheckEmptyLine(TCHAR *str); 125 | int Log(char *str,...); 126 | int Log(TCHAR *str,...); 127 | 128 | HANDLE hLog; 129 | }; 130 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/sahara.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * sahara.h 3 | * 4 | * This file implements the streaming download protocol 5 | * 6 | * Copyright (c) 2007-2012 7 | * Qualcomm Technologies Incorporated. 8 | * All Rights Reserved. 9 | * Qualcomm Confidential and Proprietary 10 | * 11 | *****************************************************************************/ 12 | /*============================================================================= 13 | Edit History 14 | 15 | $Header: //source/qcom/qct/platform/uefi/workspaces/pweber/apps/8x26_emmcdl/emmcdl/main/latest/inc/sahara.h#5 $ 16 | $DateTime: 2015/04/29 17:06:00 $ $Author: pweber $ 17 | 18 | when who what, where, why 19 | ------------------------------------------------------------------------------- 20 | 10/30/12 pgw Initial version. 21 | =============================================================================*/ 22 | #pragma once 23 | 24 | #include "serialport.h" 25 | #include 26 | 27 | #define SAHARA_HELLO_REQ 0x1 28 | #define SAHARA_HELLO_RSP 0x2 29 | #define SAHARA_READ_DATA 0x3 30 | #define SAHARA_END_TRANSFER 0x4 31 | #define SAHARA_DONE_REQ 0x5 32 | #define SAHARA_DONE_RSP 0x6 33 | #define SAHARA_RESET_REQ 0x7 34 | #define SAHARA_RESET_RSP 0x8 35 | #define SAHARA_MEMORY_DEBUG 0x9 36 | #define SAHARA_MEMORY_READ 0xA 37 | #define SAHARA_CMD_READY 0xB 38 | #define SAHARA_SWITCH_MODE 0xC 39 | #define SAHARA_EXECUTE_REQ 0xD 40 | #define SAHARA_EXECUTE_RSP 0xE 41 | #define SAHARA_EXECUTE_DATA 0xF 42 | #define SAHARA_64BIT_MEMORY_DEBUG 0x10 43 | #define SAHARA_64BIT_MEMORY_READ 0x11 44 | #define SAHARA_64BIT_MEMORY_READ_DATA 0x12 45 | 46 | #define SAHARA_ERROR_SUCCESS 0x0 47 | 48 | enum boot_sahara_exec_cmd_id 49 | { 50 | SAHARA_EXEC_CMD_NOP = 0x00, 51 | SAHARA_EXEC_CMD_SERIAL_NUM_READ = 0x01, 52 | SAHARA_EXEC_CMD_MSM_HW_ID_READ = 0x02, 53 | SAHARA_EXEC_CMD_OEM_PK_HASH_READ = 0x03, 54 | SAHARA_EXEC_CMD_SWITCH_TO_DMSS_DLOAD = 0x04, 55 | SAHARA_EXEC_CMD_SWITCH_TO_STREAM_DLOAD = 0x05, 56 | SAHARA_EXEC_CMD_READ_DEBUG_DATA = 0x06, 57 | SAHARA_EXEC_CMD_GET_SOFTWARE_VERSION_SBL = 0x07, 58 | 59 | /* place all new commands above this */ 60 | SAHARA_EXEC_CMD_LAST, 61 | SAHARA_EXEC_CMD_MAX = 0x7FFFFFFF 62 | }; 63 | 64 | typedef struct { 65 | DWORD cmd; 66 | DWORD len; 67 | DWORD version; 68 | DWORD version_min; 69 | DWORD max_cmd_len; 70 | DWORD mode; 71 | DWORD res1; DWORD res2; DWORD res3; DWORD res4; DWORD res5; DWORD res6; 72 | } hello_req_t; 73 | 74 | typedef struct { 75 | DWORD cmd; 76 | DWORD len; 77 | } cmd_hdr_t; 78 | 79 | typedef struct { 80 | DWORD id; 81 | DWORD data_offset; 82 | DWORD data_len; 83 | } read_data_t; 84 | 85 | typedef struct { 86 | UINT64 id; 87 | UINT64 data_offset; 88 | UINT64 data_len; 89 | } read_data_64_t; 90 | 91 | typedef struct { 92 | DWORD cmd; 93 | DWORD len; 94 | DWORD client_cmd; 95 | } execute_cmd_t; 96 | 97 | typedef struct { 98 | DWORD cmd; 99 | DWORD len; 100 | DWORD client_cmd; 101 | DWORD data_len; 102 | } execute_rsp_t; 103 | 104 | typedef struct { 105 | DWORD id; 106 | DWORD status; 107 | } image_end_t; 108 | 109 | typedef struct { 110 | DWORD cmd; 111 | DWORD len; 112 | DWORD status; 113 | } done_t; 114 | 115 | typedef struct { 116 | DWORD serial; 117 | DWORD msm_id; 118 | BYTE pk_hash[32]; 119 | DWORD pbl_sw; 120 | } pbl_info_t; 121 | 122 | class Sahara { 123 | public: 124 | Sahara(SerialPort *port,HANDLE hLogFile = NULL); 125 | int DeviceReset(void); 126 | int LoadFlashProg(TCHAR *szFlashPrg); 127 | int ConnectToDevice(bool bReadHello, int mode); 128 | int DumpDeviceInfo(pbl_info_t *pbl_info); 129 | bool CheckDevice(void); 130 | 131 | private: 132 | int ModeSwitch(int mode); 133 | void HexToByte(const char *hex, BYTE *bin, int len); 134 | void Log(char *str,...); 135 | void Log(TCHAR *str,...); 136 | 137 | DWORD HexRunAddress(TCHAR *filename); 138 | DWORD HexDataLength(TCHAR *filename); 139 | int ReadData(int cmd, BYTE *buf, int len); 140 | int PblHack(void); 141 | 142 | SerialPort *sport; 143 | bool bSectorAddress; 144 | HANDLE hLog; 145 | }; 146 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/baytrail/xfstkdldrpluginuserinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINUSERINTERFACE_H 19 | #define XFSTKDLDRPLUGINUSERINTERFACE_H 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include "xfstkdldrthread.h" 28 | #include 29 | #include "xfstkdldrpluginoptionsinterface.h" 30 | namespace Ui { 31 | class XfstkDldrPluginUserInterface; 32 | } 33 | 34 | 35 | struct OptionsInterfaceState; 36 | 37 | struct UserInterfaceState { 38 | QString IFWIBin; 39 | QString DownloadButtonLabel; 40 | QString DownloadStatusDetails; 41 | QString DownloadStatusProgress; 42 | QString DeviceStatusScanning; 43 | QString ProvisionCount; 44 | QString CurrentSearchDir; 45 | QString DesktopDir; 46 | bool SuppressErrors; 47 | bool IsDownloadThreadDone; 48 | int NumberOfAvailableTargets; 49 | int TotalPassingProvisionsForCurrentThread; 50 | int TotalFailingProvisionsForCurrentThread; 51 | int TotalTargetsForCurrentThread; 52 | bool EnableLogging; 53 | QString LoggingPath; 54 | bool EnableProvisionCount; 55 | int NumProvisionCount; 56 | int StatusListLocation; 57 | int StatusListPrevLength; 58 | int StartDownload; 59 | bool ShowDownloadDetails; 60 | }; 61 | 62 | class xfstksleep : public QThread 63 | { 64 | Q_OBJECT 65 | public: 66 | explicit xfstksleep(QObject *parent = 0); 67 | void sleep(unsigned long secs); 68 | void msleep(unsigned long msecs); 69 | void usleep(unsigned long usecs); 70 | signals: 71 | 72 | public slots: 73 | 74 | }; 75 | 76 | class XfstkDldrPluginUserInterface : public QWidget { 77 | Q_OBJECT 78 | public: 79 | void SaveUserInterfaceStateToDisk(QString Vendor, QString ProductPlugin); 80 | void LoadUserInterfaceStateFromDisk(QString Vendor, QString ProductPlugin); 81 | void RestoreUserInterfaceFromCurrentState(); 82 | bool SetCurrentWorkingDirectory(QString WorkingDir); 83 | QString DetermineCurrentFileSearchPath(QString BinPath); 84 | UserInterfaceState CurrentState; 85 | QString LastError; 86 | bool LineEditWA; 87 | void ReportErrors(); 88 | bool ValidateUserInterfaceState(); 89 | bool VerifyBinaryFilePath(QString BinPath); 90 | QFileDialog OpenFile; 91 | XfstkDldrPluginUserInterface(QWidget *parent = 0); 92 | ~XfstkDldrPluginUserInterface(); 93 | QTabWidget *GetTabInterface(); 94 | Ui::XfstkDldrPluginUserInterface *ui; 95 | bool IgnoreIncrementalUIChanges; 96 | QTimer *UsbDetectionTimer; 97 | QTimer *UpdateStatusTimer; 98 | xfstkdldrthread xfstknewthread; 99 | xfstkdldrthreadobj xfstknewthreadobj; 100 | 101 | char *c_str_FWImage; 102 | QByteArray baFWImage; 103 | QString FWImage; 104 | bool bFWOnly; 105 | 106 | signals: 107 | void UserInterfaceChanged(UserInterfaceState *State); 108 | 109 | public slots: 110 | void OptionsInterfaceChanged(OptionsInterfaceState *State); 111 | void UpdateUsbStatus(); 112 | void UpdateUiStatus(); 113 | void ThreadComplete(bool result); 114 | void TargetsCompletedForThread(int numdone); 115 | void DownloaderDone(); 116 | 117 | protected: 118 | void changeEvent(QEvent *e); 119 | 120 | private: 121 | 122 | 123 | private slots: 124 | void on_BeginDownload_clicked(); 125 | void on_IFWIBin_editingFinished(); 126 | void on_BrowseIFWIBin_clicked(); 127 | }; 128 | 129 | #endif // XFSTKDLDRPLUGINUSERINTERFACE_H 130 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Form/Widget/CmdWidget.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | CmdWidget 4 | 5 | 6 | 7 | 0 8 | 0 9 | 870 10 | 549 11 | 12 | 13 | 14 | Form 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | Consolas 24 | 10 25 | 50 26 | false 27 | 28 | 29 | 30 | background-color: rgb(0, 0, 0); 31 | font: 10pt "Consolas"; 32 | color: "white" 33 | 34 | 35 | QFrame::StyledPanel 36 | 37 | 38 | QFrame::Sunken 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 400 57 | 0 58 | 59 | 60 | 61 | 62 | Consolas 63 | 10 64 | 65 | 66 | 67 | true 68 | 69 | 70 | 71 | dir 72 | 73 | 74 | 75 | 76 | adb shell getprop 77 | 78 | 79 | 80 | 81 | adb shell pm list packages 82 | 83 | 84 | 85 | 86 | adb 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 100 103 | 16777215 104 | 105 | 106 | 107 | Execute 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 100 116 | 16777215 117 | 118 | 119 | 120 | Stop 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | -------------------------------------------------------------------------------- /AndroidMobileSolution.sln: -------------------------------------------------------------------------------- 1 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27130.2036 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "26MobileTool", "sourcecode\26MobileTool\26MobileTool.vcxproj", "{B12702AD-ABFB-343A-A199-8E24837244A3}" 7 | EndProject 8 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LsComQualcom", "sourcecode\lscomQualcom\LsCom.vcxproj", "{0297CF11-B1AF-448C-934C-5A1702418714}" 9 | EndProject 10 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LsComUtf8", "sourcecode\lscomUtf8\LsComQualcom.vcxproj", "{01A6AD58-FD2A-4DEF-B7C1-BD84B0F466A4}" 11 | EndProject 12 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lsdrive", "sourcecode\lsdrive\lsdrive.vcxproj", "{D435D49F-EF61-4F06-AA8B-5B5984BDAB66}" 13 | EndProject 14 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "LsUsb", "sourcecode\LsUsb\LsUsb.vcxproj", "{3516D317-89B5-48EA-BFF5-5E2CE1635F72}" 15 | EndProject 16 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "UsbConnectEvent", "sourcecode\UsbConnectEvent\UsbConnectEvent.vcxproj", "{7BC8BC34-A20A-45D6-A386-EA60FAA88A69}" 17 | EndProject 18 | Global 19 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 20 | Debug|x64 = Debug|x64 21 | Debug|x86 = Debug|x86 22 | Release|x64 = Release|x64 23 | Release|x86 = Release|x86 24 | EndGlobalSection 25 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 26 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.ActiveCfg = Debug|Win32 27 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x86.ActiveCfg = Debug|Win32 28 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x86.Build.0 = Debug|Win32 29 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.ActiveCfg = Release|Win32 30 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.ActiveCfg = Release|Win32 31 | {B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.Build.0 = Release|Win32 32 | {0297CF11-B1AF-448C-934C-5A1702418714}.Debug|x64.ActiveCfg = Debug|x64 33 | {0297CF11-B1AF-448C-934C-5A1702418714}.Debug|x64.Build.0 = Debug|x64 34 | {0297CF11-B1AF-448C-934C-5A1702418714}.Debug|x86.ActiveCfg = Debug|Win32 35 | {0297CF11-B1AF-448C-934C-5A1702418714}.Debug|x86.Build.0 = Debug|Win32 36 | {0297CF11-B1AF-448C-934C-5A1702418714}.Release|x64.ActiveCfg = Release|x64 37 | {0297CF11-B1AF-448C-934C-5A1702418714}.Release|x64.Build.0 = Release|x64 38 | {0297CF11-B1AF-448C-934C-5A1702418714}.Release|x86.ActiveCfg = Release|Win32 39 | {0297CF11-B1AF-448C-934C-5A1702418714}.Release|x86.Build.0 = Release|Win32 40 | {01A6AD58-FD2A-4DEF-B7C1-BD84B0F466A4}.Debug|x64.ActiveCfg = Debug|x64 41 | {01A6AD58-FD2A-4DEF-B7C1-BD84B0F466A4}.Debug|x64.Build.0 = Debug|x64 42 | {01A6AD58-FD2A-4DEF-B7C1-BD84B0F466A4}.Debug|x86.ActiveCfg = Debug|Win32 43 | {01A6AD58-FD2A-4DEF-B7C1-BD84B0F466A4}.Debug|x86.Build.0 = Debug|Win32 44 | {01A6AD58-FD2A-4DEF-B7C1-BD84B0F466A4}.Release|x64.ActiveCfg = Release|x64 45 | {01A6AD58-FD2A-4DEF-B7C1-BD84B0F466A4}.Release|x64.Build.0 = Release|x64 46 | {01A6AD58-FD2A-4DEF-B7C1-BD84B0F466A4}.Release|x86.ActiveCfg = Release|Win32 47 | {01A6AD58-FD2A-4DEF-B7C1-BD84B0F466A4}.Release|x86.Build.0 = Release|Win32 48 | {D435D49F-EF61-4F06-AA8B-5B5984BDAB66}.Debug|x64.ActiveCfg = Debug|x64 49 | {D435D49F-EF61-4F06-AA8B-5B5984BDAB66}.Debug|x64.Build.0 = Debug|x64 50 | {D435D49F-EF61-4F06-AA8B-5B5984BDAB66}.Debug|x86.ActiveCfg = Debug|Win32 51 | {D435D49F-EF61-4F06-AA8B-5B5984BDAB66}.Debug|x86.Build.0 = Debug|Win32 52 | {D435D49F-EF61-4F06-AA8B-5B5984BDAB66}.Release|x64.ActiveCfg = Release|x64 53 | {D435D49F-EF61-4F06-AA8B-5B5984BDAB66}.Release|x64.Build.0 = Release|x64 54 | {D435D49F-EF61-4F06-AA8B-5B5984BDAB66}.Release|x86.ActiveCfg = Release|Win32 55 | {D435D49F-EF61-4F06-AA8B-5B5984BDAB66}.Release|x86.Build.0 = Release|Win32 56 | {3516D317-89B5-48EA-BFF5-5E2CE1635F72}.Debug|x64.ActiveCfg = Debug|x64 57 | {3516D317-89B5-48EA-BFF5-5E2CE1635F72}.Debug|x64.Build.0 = Debug|x64 58 | {3516D317-89B5-48EA-BFF5-5E2CE1635F72}.Debug|x86.ActiveCfg = Debug|Win32 59 | {3516D317-89B5-48EA-BFF5-5E2CE1635F72}.Debug|x86.Build.0 = Debug|Win32 60 | {3516D317-89B5-48EA-BFF5-5E2CE1635F72}.Release|x64.ActiveCfg = Release|x64 61 | {3516D317-89B5-48EA-BFF5-5E2CE1635F72}.Release|x64.Build.0 = Release|x64 62 | {3516D317-89B5-48EA-BFF5-5E2CE1635F72}.Release|x86.ActiveCfg = Release|Win32 63 | {3516D317-89B5-48EA-BFF5-5E2CE1635F72}.Release|x86.Build.0 = Release|Win32 64 | {7BC8BC34-A20A-45D6-A386-EA60FAA88A69}.Debug|x64.ActiveCfg = Debug|x64 65 | {7BC8BC34-A20A-45D6-A386-EA60FAA88A69}.Debug|x64.Build.0 = Debug|x64 66 | {7BC8BC34-A20A-45D6-A386-EA60FAA88A69}.Debug|x86.ActiveCfg = Debug|Win32 67 | {7BC8BC34-A20A-45D6-A386-EA60FAA88A69}.Debug|x86.Build.0 = Debug|Win32 68 | {7BC8BC34-A20A-45D6-A386-EA60FAA88A69}.Release|x64.ActiveCfg = Release|x64 69 | {7BC8BC34-A20A-45D6-A386-EA60FAA88A69}.Release|x64.Build.0 = Release|x64 70 | {7BC8BC34-A20A-45D6-A386-EA60FAA88A69}.Release|x86.ActiveCfg = Release|Win32 71 | {7BC8BC34-A20A-45D6-A386-EA60FAA88A69}.Release|x86.Build.0 = Release|Win32 72 | EndGlobalSection 73 | GlobalSection(SolutionProperties) = preSolution 74 | HideSolutionNode = FALSE 75 | EndGlobalSection 76 | GlobalSection(ExtensibilityGlobals) = postSolution 77 | SolutionGuid = {FD7E0F24-C674-4CBF-97BF-DE3DBB000284} 78 | EndGlobalSection 79 | EndGlobal 80 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/cloverviewplus/xfstkdldrpluginuserinterface.h: -------------------------------------------------------------------------------- 1 | #ifndef XFSTKDLDRPLUGINUSERINTERFACE_H 2 | #define XFSTKDLDRPLUGINUSERINTERFACE_H 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "xfstkdldrthread.h" 11 | #include 12 | //#include "xfstkdldrpluginoptionsinterface.h" 13 | #include "TabWidgetBase.h" 14 | #include "IntelSettingDialog.h" 15 | 16 | namespace Ui { 17 | class XfstkDldrPluginUserInterface; 18 | } 19 | class MainWindow; 20 | 21 | struct OptionsInterfaceState; 22 | 23 | struct UserInterfaceState { 24 | QString FWDnXBin; 25 | QString IFWIBin; 26 | QString OSDnXBin; 27 | QString OSImageBin; 28 | QString SoftfusesPath; 29 | QString DownloadButtonLabel; 30 | QString DownloadStatusDetails; 31 | QString DownloadStatusProgress; 32 | QString DeviceStatusScanning; 33 | QString ProvisionCount; 34 | QString CurrentSearchDir; 35 | QString GPFlagOverrideValue; 36 | QString DesktopDir; 37 | QString USBTimeout; 38 | bool EnableGpFlagOverride; 39 | bool SuppressErrors; 40 | bool IsDownloadThreadDone; 41 | int NumberOfAvailableTargets; 42 | int TotalPassingProvisionsForCurrentThread; 43 | int TotalFailingProvisionsForCurrentThread; 44 | int TotalTargetsForCurrentThread; 45 | bool EnableLogging; 46 | QString LoggingPath; 47 | bool EnableProvisionCount; 48 | int NumProvisionCount; 49 | int StatusListLocation; 50 | int StatusListPrevLength; 51 | bool ShowDownloadDetails; 52 | bool SoftfuseInclude; 53 | }; 54 | 55 | class XfstkDldrPluginUserInterface : public TabWidgetBase 56 | { 57 | 58 | Q_OBJECT 59 | 60 | public: 61 | explicit XfstkDldrPluginUserInterface(QTabWidget *parent, MainWindow* window); 62 | ~XfstkDldrPluginUserInterface(); 63 | 64 | DECLARE_TABWIDGET_VFUNCS() 65 | 66 | 67 | void SaveUserInterfaceStateToDisk(QString Vendor, QString ProductPlugin); 68 | void LoadUserInterfaceStateFromDisk(QString Vendor, QString ProductPlugin); 69 | void RestoreUserInterfaceFromCurrentState(); 70 | bool SetCurrentWorkingDirectory(QString WorkingDir); 71 | QString DetermineCurrentFileSearchPath(QString BinPath); 72 | UserInterfaceState CurrentState; 73 | QString LastError; 74 | bool LineEditWA; 75 | void ReportErrors(); 76 | bool ValidateUserInterfaceState(); 77 | bool VerifyBinaryFilePath(QString BinPath); 78 | QFileDialog OpenFile; 79 | QTabWidget *GetTabInterface(); 80 | Ui::XfstkDldrPluginUserInterface *ui; 81 | bool IgnoreIncrementalUIChanges; 82 | QTimer *UsbDetectionTimer; 83 | QTimer *UpdateStatusTimer; 84 | xfstkdldrthread xfstknewthread; 85 | xfstkdldrthreadobj xfstknewthreadobj; 86 | 87 | char *c_str_FWDnX; 88 | char *c_str_FWImage; 89 | char *c_str_OSDnx; 90 | char *c_str_OSImage; 91 | char *c_str_SoftfusePath; 92 | char *c_str_GPFlagsOverride; 93 | 94 | QByteArray baFWDnx; 95 | QByteArray baFWImage; 96 | QByteArray baOSDnx; 97 | QByteArray baOSImage; 98 | QByteArray baSoftfusePath; 99 | QByteArray baGPFlagsOverride; 100 | 101 | QString FWDnX; 102 | QString FWImage; 103 | QString OSDnX; 104 | QString OSImage; 105 | QString SoftfusesPath; 106 | QString GPFlagsOverride; 107 | 108 | bool bFWOnly; 109 | bool bOsOnly; 110 | bool bFwOs; 111 | 112 | unsigned int DetectDevicesTimeRemain; 113 | #ifdef XFSTK_OS_WIN 114 | DevicesCallBack CallbackStruct; 115 | #endif 116 | SoCDevices socDevs; 117 | xfstkdldrapi* dldrapi; 118 | QTimer *UsbCallBackTimer; 119 | bool devDetectWait; 120 | void BeginDownload(); 121 | void emitDownloadbegin(){emit readyForDownload();} 122 | void cancelDetection(); 123 | 124 | signals: 125 | void UserInterfaceChanged(UserInterfaceState *State); 126 | void readyForDownload(); 127 | 128 | public slots: 129 | void OptionsInterfaceChanged(OptionsInterfaceState *State); 130 | void UpdateUsbStatus(); 131 | void UpdateUiStatus(); 132 | void ThreadComplete(bool result); 133 | void TargetsCompletedForThread(int numdone); 134 | void UpdatedeviceDetectStatus(); 135 | protected: 136 | void changeEvent(QEvent *e); 137 | 138 | private: 139 | 140 | //Ui::XfstkDldrPluginUserInterface *ui; 141 | MainWindow* main_window_; 142 | 143 | IntelSettingDialog SettingDialog; 144 | 145 | 146 | private slots: 147 | void on_BeginDownload_clicked(); 148 | void on_OSImageBin_editingFinished(); 149 | void on_OSDnXBin_editingFinished(); 150 | void on_IFWIBin_editingFinished(); 151 | void on_FWDnXBin_editingFinished(); 152 | void on_BrowseOSImageBin_clicked(); 153 | void on_BrowseOSDnXBin_clicked(); 154 | void on_BrowseIFWIBin_clicked(); 155 | void on_BrowseFWDnXBin_clicked(); 156 | void on_pushButton_Setting_clicked(); 157 | }; 158 | class xfstksleep : public QThread 159 | { 160 | Q_OBJECT 161 | public: 162 | explicit xfstksleep(QObject *parent = 0); 163 | void sleep(unsigned long secs); 164 | void msleep(unsigned long msecs); 165 | void usleep(unsigned long usecs); 166 | signals: 167 | 168 | public slots : 169 | 170 | }; 171 | 172 | #endif // XFSTKDLDRPLUGINUSERINTERFACE_H 173 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/sparse.cpp: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * sparse.cpp 3 | * 4 | * This class implements Sparse image support 5 | * 6 | * Copyright (c) 2007-2015 7 | * Qualcomm Technologies Incorporated. 8 | * All Rights Reserved. 9 | * Qualcomm Confidential and Proprietary 10 | * 11 | *****************************************************************************/ 12 | /*============================================================================= 13 | Edit History 14 | 15 | $Header: //source/qcom/qct/platform/uefi/workspaces/pweber/apps/8x26_emmcdl/emmcdl/main/latest/src/sparse.cpp#3 $ 16 | $DateTime: 2015/07/15 15:43:47 $ $Author: pweber $ 17 | 18 | when who what, where, why 19 | ------------------------------------------------------------------------------- 20 | 02/05/15 pgw Initial version. 21 | =============================================================================*/ 22 | 23 | #include "stdio.h" 24 | #include "stdlib.h" 25 | #include "tchar.h" 26 | #include "sparse.h" 27 | #include "windows.h" 28 | #include "string.h" 29 | 30 | // Constructor 31 | SparseImage::SparseImage() 32 | { 33 | bSparseImage = false; 34 | } 35 | 36 | // Destructor 37 | SparseImage::~SparseImage() 38 | { 39 | if (bSparseImage) 40 | { 41 | CloseHandle(hSparseImage); 42 | } 43 | } 44 | 45 | // This will load a sparse image into memory and read headers if it is a sparse image 46 | // RETURN: 47 | // ERROR_SUCCESS - Image and headers we loaded successfully 48 | // 49 | int SparseImage::PreLoadImage(TCHAR *szSparseFile) 50 | { 51 | DWORD dwBytesRead; 52 | hSparseImage = CreateFile(szSparseFile, 53 | GENERIC_READ, 54 | FILE_SHARE_READ, // We only read from here so let others open the file as well 55 | NULL, 56 | OPEN_EXISTING, 57 | FILE_ATTRIBUTE_NORMAL, 58 | NULL); 59 | if (hSparseImage == INVALID_HANDLE_VALUE) return GetLastError(); 60 | 61 | // Load the sparse file header and verify it is valid 62 | if (ReadFile(hSparseImage, &SparseHeader, sizeof(SparseHeader), &dwBytesRead, NULL)) { 63 | // Check the magic number in the sparse header to see if this is a vaild sparse file 64 | if (SparseHeader.dwMagic != SPARSE_MAGIC) { 65 | CloseHandle(hSparseImage); 66 | return ERROR_BAD_FORMAT; 67 | } 68 | } 69 | else { 70 | // Couldn't read the file likely someone else has it open for exclusive access 71 | CloseHandle(hSparseImage); 72 | return ERROR_READ_FAULT; 73 | } 74 | 75 | bSparseImage = true; 76 | return ERROR_SUCCESS; 77 | } 78 | 79 | int SparseImage::ProgramImage(Protocol *pProtocol, __int64 dwOffset) 80 | { 81 | CHUNK_HEADER ChunkHeader; 82 | BYTE *bpDataBuf = NULL; 83 | DWORD dwBytesRead; 84 | DWORD dwBytesOut; 85 | int status = ERROR_SUCCESS; 86 | 87 | // Make sure we have first successfully found a sparse file and headers are loaded okay 88 | if (!bSparseImage) 89 | { 90 | return ERROR_FILE_NOT_FOUND; 91 | } 92 | 93 | // Allocated a buffer 94 | 95 | // Main loop through all block entries in the sparse image 96 | for (UINT32 i=0; i < SparseHeader.dwTotalChunks; i++) { 97 | 98 | // Read chunk header 99 | if (ReadFile(hSparseImage, &ChunkHeader, sizeof(ChunkHeader), &dwBytesRead, NULL)){ 100 | UINT32 dwChunkSize = ChunkHeader.dwChunkSize*SparseHeader.dwBlockSize; 101 | // Allocate a buffer the size of the chunk and read in the data 102 | bpDataBuf = (BYTE *)malloc(dwChunkSize); 103 | if (bpDataBuf == NULL){ 104 | return ERROR_OUTOFMEMORY; 105 | } 106 | if (ChunkHeader.wChunkType == SPARSE_RAW_CHUNK){ 107 | if (ReadFile(hSparseImage, bpDataBuf, dwChunkSize, &dwBytesRead, NULL)) { 108 | // Now we have the data so use whatever protocol we need to write this out 109 | pProtocol->WriteData(bpDataBuf, dwOffset, dwChunkSize, &dwBytesOut,0); 110 | dwOffset += dwChunkSize; 111 | } 112 | else { 113 | status = GetLastError(); 114 | break; 115 | } 116 | } 117 | else if (ChunkHeader.wChunkType == SPARSE_FILL_CHUNK) { 118 | // Fill chunk with data byte given for now just skip over this area 119 | dwOffset += ChunkHeader.dwChunkSize*SparseHeader.dwBlockSize; 120 | } 121 | else if (ChunkHeader.wChunkType == SPARSE_DONT_CARE) { 122 | // Skip the specified number of bytes in the output file 123 | // Fill the buffer with 0 124 | memset(bpDataBuf, 0, dwChunkSize); 125 | pProtocol->WriteData(bpDataBuf, dwOffset, dwChunkSize, &dwBytesOut, 0); 126 | dwOffset += dwChunkSize; 127 | } 128 | else { 129 | // We have no idea what type of chunk this is return a failure and close file 130 | status = ERROR_INVALID_DATA; 131 | break; 132 | } 133 | free(bpDataBuf); 134 | bpDataBuf = NULL; 135 | } 136 | else { 137 | // Failed to read data something is wrong with the file 138 | status = GetLastError(); 139 | break; 140 | } 141 | } 142 | 143 | // If we broke here from an error condition free the bpDataBuf 144 | if( bpDataBuf != NULL) { 145 | free(bpDataBuf); 146 | bpDataBuf = NULL; 147 | } 148 | 149 | // If we failed to load the file close the handle and set sparse image back to false 150 | if (status != ERROR_SUCCESS) { 151 | bSparseImage = false; 152 | CloseHandle(hSparseImage); 153 | } 154 | 155 | return status; 156 | } 157 | 158 | -------------------------------------------------------------------------------- /sourcecode/lsdrive/lsdrive.cpp: -------------------------------------------------------------------------------- 1 | // lsdrive.cpp : Defines the entry point for the console application. 2 | // 3 | #include "stdafx.h" 4 | #include 5 | #include 6 | #include 7 | 8 | #define BUF_SIZE 1024 9 | 10 | int GetDriverInfo(char* pdrive) 11 | { 12 | unsigned int driver_type = 0; 13 | unsigned long volume_serial_nb = 0; 14 | unsigned long maximum_component_length = 0; 15 | unsigned long file_system_flags = 0; 16 | 17 | char file_system_name_buf[BUF_SIZE]; 18 | char drive_name[MAX_PATH]; 19 | char drive_type_str[MAX_PATH]; 20 | 21 | memset(file_system_name_buf, 0, sizeof(file_system_name_buf)); 22 | memset(drive_name, 0, sizeof(drive_name)); 23 | memset(drive_type_str, 0, sizeof(drive_type_str)); 24 | 25 | driver_type = GetDriveType(pdrive); 26 | 27 | //printf("driver_type is %d\n", driver_type); 28 | 29 | switch (driver_type) 30 | { 31 | case DRIVE_UNKNOWN: 32 | sprintf(drive_type_str, "UNKNOWN"); 33 | break; 34 | case DRIVE_NO_ROOT_DIR: 35 | sprintf(drive_type_str, "NO_ROOT_DIR"); 36 | break; 37 | case DRIVE_REMOVABLE: 38 | sprintf(drive_type_str, "REMOVABLE"); 39 | break; 40 | case DRIVE_FIXED: 41 | sprintf(drive_type_str, "FIXED"); 42 | break; 43 | case DRIVE_REMOTE: 44 | sprintf(drive_type_str, "REMOTE"); 45 | break; 46 | case DRIVE_CDROM: 47 | sprintf(drive_type_str, "CDROM"); 48 | break; 49 | case DRIVE_RAMDISK: 50 | sprintf(drive_type_str, "RAMDISK"); 51 | break; 52 | default: 53 | break; 54 | } 55 | 56 | if ((driver_type != DRIVE_CDROM) && 57 | !(GetVolumeInformation( 58 | pdrive, 59 | drive_name, 60 | MAX_PATH, 61 | &volume_serial_nb, 62 | &maximum_component_length, 63 | &file_system_flags, 64 | file_system_name_buf, 65 | BUF_SIZE))) { 66 | return -1; 67 | } 68 | 69 | printf("%3s \t %20s \t %10s \t %8s\n", pdrive, drive_name, file_system_name_buf, drive_type_str); 70 | 71 | return 0; 72 | } 73 | 74 | int main(void) 75 | { 76 | char logic_driver_string[BUF_SIZE]; 77 | char *pdrive; 78 | int ret; 79 | 80 | memset(logic_driver_string, 0, sizeof(logic_driver_string)); 81 | 82 | GetLogicalDriveStrings(BUF_SIZE - 1, logic_driver_string); 83 | pdrive = logic_driver_string; 84 | 85 | //printf("Windows Current DRIVE:\n\n"); 86 | printf("\n DRIVE Ten o dia : FS TYPE\n\n"); 87 | do { 88 | if ((ret = GetDriverInfo(pdrive)) != 0) 89 | printf("\nGet Volume Information Error: %s\n", strerror(ret)); 90 | 91 | pdrive += (strlen(pdrive) + 1); 92 | } while (*pdrive != '\x00'); 93 | system("pause"); 94 | return 0; 95 | } 96 | 97 | #if 0 98 | #include 99 | #include 100 | #include 101 | #define BUF_SIZE 1024 102 | int GetDriverInfo(char* pdrive); 103 | int main(void) 104 | { 105 | char logic_driver_string[BUF_SIZE]; 106 | char *pdrive; 107 | 108 | memset(logic_driver_string, 0, sizeof(logic_driver_string)); 109 | 110 | GetLogicalDriveStrings(BUF_SIZE - 1, logic_driver_string); 111 | pdrive = logic_driver_string; 112 | 113 | do { 114 | if (!GetDriverInfo(pdrive)) 115 | printf("\nGet Volume Information Error:%d", GetLastError()); 116 | 117 | pdrive += (strlen(pdrive) + 1); 118 | } while (*pdrive != '\x00'); 119 | return 0; 120 | } 121 | 122 | int GetDriverInfo(char* pdrive) 123 | { 124 | unsigned int driver_type; 125 | unsigned long volume_serial_nb; 126 | unsigned long maximum_component_length; 127 | unsigned long file_system_flags; 128 | char file_system_name_buf[BUF_SIZE]; 129 | char drive_name[MAX_PATH]; 130 | 131 | printf("\n%s\n", pdrive); 132 | driver_type = GetDriveType(pdrive); 133 | 134 | switch (driver_type) 135 | { 136 | case DRIVE_UNKNOWN: 137 | printf("The driver type cannot be determined!"); 138 | break; 139 | case DRIVE_NO_ROOT_DIR: 140 | printf("The root path is invalid,for example,no volume is mounted at the path"); 141 | break; 142 | case DRIVE_REMOVABLE: 143 | printf("The drive is a type that has removable media,for example:a floppy drive or removable hard disk"); 144 | break; 145 | case DRIVE_FIXED: 146 | printf("The drive is a type that cannot be removed, for example,a fixed hard drive"); 147 | break; 148 | case DRIVE_REMOTE: 149 | printf("This drive is a remote(network) drive"); 150 | break; 151 | case DRIVE_CDROM: 152 | printf("This drive is a CD-ROM drive."); 153 | break; 154 | case DRIVE_RAMDISK: 155 | printf("This drive is a RAM disk"); 156 | break; 157 | default: 158 | break; 159 | } 160 | 161 | if (!(GetVolumeInformation( 162 | pdrive, 163 | drive_name, 164 | MAX_PATH, 165 | &volume_serial_nb, 166 | &maximum_component_length, 167 | &file_system_flags, 168 | file_system_name_buf, 169 | BUF_SIZE))) 170 | { 171 | return FALSE; 172 | 173 | } 174 | 175 | if (0 != strlen(drive_name)) 176 | { 177 | printf("\nDrive Name is %s.\n", drive_name); 178 | } 179 | 180 | printf("\nVolume Serial is %u.", volume_serial_nb); 181 | printf("\nMaximum Component Length is %u.", maximum_component_length); 182 | printf("\nSystem Type is %s.\n", file_system_name_buf); 183 | 184 | if (file_system_flags & FILE_VOLUME_QUOTAS) 185 | { 186 | 187 | printf("The file system supports disk Quotas.\n"); 188 | } 189 | 190 | if (file_system_flags & FILE_SUPPORTS_REPARSE_POINTS) 191 | { 192 | printf("The file system does not support volume mount points.\n"); 193 | 194 | } 195 | 196 | if (file_system_flags & FILE_CASE_SENSITIVE_SEARCH) 197 | { 198 | printf("The file system supports case-sentitive file name.\n"); 199 | } 200 | 201 | printf("...\n"); 202 | 203 | return TRUE; 204 | 205 | } 206 | #endif -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Qualcom/emmcdl/ffu.h: -------------------------------------------------------------------------------- 1 | /***************************************************************************** 2 | * ffu.h 3 | * 4 | * This file has structures and functions for FFU format 5 | * 6 | * Copyright (c) 2007-2012 7 | * Qualcomm Technologies Incorporated. 8 | * All Rights Reserved. 9 | * Qualcomm Confidential and Proprietary 10 | * 11 | *****************************************************************************/ 12 | /*============================================================================= 13 | Edit History 14 | 15 | $Header: //source/qcom/qct/platform/uefi/workspaces/pweber/apps/8x26_emmcdl/emmcdl/main/latest/inc/ffu.h#7 $ 16 | $DateTime: 2015/05/07 21:41:17 $ $Author: pweber $ 17 | 18 | when who what, where, why 19 | ------------------------------------------------------------------------------- 20 | 11/04/12 pgw Initial version. 21 | =============================================================================*/ 22 | #pragma once 23 | #include "partition.h" 24 | #include "serialport.h" 25 | #include "firehose.h" 26 | #include 27 | 28 | // Security Header struct. The first data read in from the FFU. 29 | typedef struct _SECURITY_HEADER 30 | { 31 | UINT32 cbSize; // size of struct, overall 32 | BYTE signature[12]; // "SignedImage " 33 | UINT32 dwChunkSizeInKb; // size of a hashed chunk within the image 34 | UINT32 dwAlgId; // algorithm used to hash 35 | UINT32 dwCatalogSize; // size of catalog to validate 36 | UINT32 dwHashTableSize; // size of hash table 37 | } SECURITY_HEADER; 38 | 39 | // Image Header struct found within Image Header region of FFU 40 | typedef struct _IMAGE_HEADER 41 | { 42 | DWORD cbSize; // sizeof(ImageHeader) 43 | BYTE Signature[12]; // "ImageFlash " 44 | DWORD ManifestLength; // in bytes 45 | DWORD dwChunkSize; // Used only during image generation. 46 | } IMAGE_HEADER; 47 | 48 | // Store Header struct found within Store Header region of FFU 49 | typedef struct _STORE_HEADER 50 | { 51 | UINT32 dwUpdateType; // indicates partial or full flash 52 | UINT16 MajorVersion, MinorVersion; // used to validate struct 53 | UINT16 FullFlashMajorVersion, FullFlashMinorVersion; // FFU version, i.e. the image format 54 | char szPlatformId[192]; // string which indicates what device this FFU is intended to be written to 55 | UINT32 dwBlockSizeInBytes; // size of an image block in bytes the device actual sector size may differ 56 | UINT32 dwWriteDescriptorCount; // number of write descriptors to iterate through 57 | UINT32 dwWriteDescriptorLength; // total size of all the write descriptors, in bytes (included so they can be read out up front and interpreted later) 58 | UINT32 dwValidateDescriptorCount; // number of validation descriptors to check 59 | UINT32 dwValidateDescriptorLength; // total size of all the validation descriptors, in bytes 60 | UINT32 dwInitialTableIndex; // block index in the payload of the initial (invalid) GPT 61 | UINT32 dwInitialTableCount; // count of blocks for the initial GPT, i.e. the GPT spans blockArray[idx..(idx + count -1)] 62 | UINT32 dwFlashOnlyTableIndex; // first block index in the payload of the flash-only GPT (included so safe flashing can be accomplished) 63 | UINT32 dwFlashOnlyTableCount; // count of blocks in the flash-only GPT 64 | UINT32 dwFinalTableIndex; // index in the table of the real GPT 65 | UINT32 dwFinalTableCount; // number of blocks in the real GPT 66 | } STORE_HEADER; 67 | 68 | 69 | enum DISK_ACCESS_METHOD 70 | { 71 | DISK_BEGIN = 0, 72 | DISK_SEQ = 1, 73 | DISK_END = 2 74 | }; 75 | 76 | // Struct used in BLOCK_DATA_ENTRY structs to define where to put data on disk 77 | typedef struct _DISK_LOCATION 78 | { 79 | UINT32 dwDiskAccessMethod; 80 | UINT32 dwBlockIndex; 81 | } DISK_LOCATION; 82 | 83 | typedef struct _BLOCK_DATA_ENTRY 84 | { 85 | UINT32 dwLocationCount; 86 | UINT32 dwBlockCount; 87 | DISK_LOCATION rgDiskLocations[1]; 88 | } BLOCK_DATA_ENTRY; 89 | 90 | class FFUImage { 91 | public: 92 | int PreLoadImage(TCHAR *szFFUPath); 93 | int ProgramImage(Protocol *proto, __int64 dwOffset); 94 | int CloseFFUFile(void); 95 | void SetDiskSectorSize(int size); 96 | int SplitFFUBin(TCHAR *szPartName, TCHAR *szOutputFile); 97 | int FFUToRawProgram(TCHAR *szFFUName, TCHAR *szImagePath); 98 | FFUImage(); 99 | ~FFUImage(); 100 | 101 | private: 102 | void SetOffset(OVERLAPPED* ovlVariable, UINT64 offset); 103 | int CreateRawProgram(TCHAR *szFFUFile, TCHAR *szFileName); 104 | int TerminateRawProgram(TCHAR *szFileName); 105 | int DumpRawProgram(TCHAR *szFFUFile, TCHAR *szRawProgram); 106 | int FFUDumpDisk(Protocol *proto); 107 | int AddEntryToRawProgram(TCHAR *szRawProgram, TCHAR *szFileName, UINT64 ui64FileOffset, __int64 i64StartSector, UINT64 ui64NumSectors); 108 | int ReadGPT(void); 109 | int ParseHeaders(void); 110 | UINT64 GetNextStartingArea(UINT64 chunkSizeInBytes, UINT64 sizeOfArea); 111 | 112 | // Headers found within FFU image 113 | SECURITY_HEADER FFUSecurityHeader; 114 | IMAGE_HEADER FFUImageHeader; 115 | STORE_HEADER FFUStoreHeader; 116 | BYTE* ValidationEntries; 117 | BLOCK_DATA_ENTRY* BlockDataEntries; 118 | UINT64 PayloadDataStart; 119 | 120 | HANDLE hFFU; 121 | OVERLAPPED OvlRead; 122 | OVERLAPPED OvlWrite; 123 | 124 | // GPT Stuff 125 | BYTE GptProtectiveMBR[512]; 126 | gpt_header_t GptHeader; 127 | gpt_entry_t *GptEntries; 128 | int DISK_SECTOR_SIZE; 129 | 130 | }; 131 | 132 | 133 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | 4 | # User-specific files 5 | *.suo 6 | *.user 7 | *.userosscache 8 | *.sln.docstates 9 | 10 | # User-specific files (MonoDevelop/Xamarin Studio) 11 | *.userprefs 12 | 13 | # Build results 14 | [Dd]ebug/ 15 | [Dd]ebugPublic/ 16 | [Rr]elease/ 17 | [Rr]eleases/ 18 | x64/ 19 | x86/ 20 | bld/ 21 | [Bb]in/ 22 | [Oo]bj/ 23 | [Ll]og/ 24 | 25 | # Visual Studio 2015 cache/options directory 26 | .vs/ 27 | # Uncomment if you have tasks that create the project's static files in wwwroot 28 | #wwwroot/ 29 | 30 | # MSTest test Results 31 | [Tt]est[Rr]esult*/ 32 | [Bb]uild[Ll]og.* 33 | 34 | # NUNIT 35 | *.VisualState.xml 36 | TestResult.xml 37 | 38 | # Build Results of an ATL Project 39 | [Dd]ebugPS/ 40 | [Rr]eleasePS/ 41 | dlldata.c 42 | 43 | # DNX 44 | project.lock.json 45 | project.fragment.lock.json 46 | artifacts/ 47 | 48 | *_i.c 49 | *_p.c 50 | *_i.h 51 | *.ilk 52 | *.meta 53 | *.obj 54 | *.pch 55 | *.pdb 56 | *.pgc 57 | *.pgd 58 | *.rsp 59 | *.sbr 60 | *.tlb 61 | *.tli 62 | *.tlh 63 | *.tmp 64 | *.tmp_proj 65 | *.log 66 | *.vspscc 67 | *.vssscc 68 | .builds 69 | *.pidb 70 | *.svclog 71 | *.scc 72 | 73 | # Chutzpah Test files 74 | _Chutzpah* 75 | 76 | # Visual C++ cache files 77 | ipch/ 78 | *.aps 79 | *.ncb 80 | *.opendb 81 | *.opensdf 82 | *.sdf 83 | *.cachefile 84 | *.VC.db 85 | *.VC.VC.opendb 86 | 87 | # Visual Studio profiler 88 | *.psess 89 | *.vsp 90 | *.vspx 91 | *.sap 92 | 93 | # TFS 2012 Local Workspace 94 | $tf/ 95 | 96 | # Guidance Automation Toolkit 97 | *.gpState 98 | 99 | # ReSharper is a .NET coding add-in 100 | _ReSharper*/ 101 | *.[Rr]e[Ss]harper 102 | *.DotSettings.user 103 | 104 | # JustCode is a .NET coding add-in 105 | .JustCode 106 | 107 | # TeamCity is a build add-in 108 | _TeamCity* 109 | 110 | # DotCover is a Code Coverage Tool 111 | *.dotCover 112 | 113 | # NCrunch 114 | _NCrunch_* 115 | .*crunch*.local.xml 116 | nCrunchTemp_* 117 | 118 | # MightyMoose 119 | *.mm.* 120 | AutoTest.Net/ 121 | 122 | # Web workbench (sass) 123 | .sass-cache/ 124 | 125 | # Installshield output folder 126 | [Ee]xpress/ 127 | 128 | # DocProject is a documentation generator add-in 129 | DocProject/buildhelp/ 130 | DocProject/Help/*.HxT 131 | DocProject/Help/*.HxC 132 | DocProject/Help/*.hhc 133 | DocProject/Help/*.hhk 134 | DocProject/Help/*.hhp 135 | DocProject/Help/Html2 136 | DocProject/Help/html 137 | 138 | # Click-Once directory 139 | publish/ 140 | 141 | # Publish Web Output 142 | *.[Pp]ublish.xml 143 | *.azurePubxml 144 | # TODO: Comment the next line if you want to checkin your web deploy settings 145 | # but database connection strings (with potential passwords) will be unencrypted 146 | #*.pubxml 147 | *.publishproj 148 | 149 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 150 | # checkin your Azure Web App publish settings, but sensitive information contained 151 | # in these scripts will be unencrypted 152 | PublishScripts/ 153 | 154 | # NuGet Packages 155 | *.nupkg 156 | # The packages folder can be ignored because of Package Restore 157 | **/packages/* 158 | # except build/, which is used as an MSBuild target. 159 | !**/packages/build/ 160 | # Uncomment if necessary however generally it will be regenerated when needed 161 | #!**/packages/repositories.config 162 | # NuGet v3's project.json files produces more ignoreable files 163 | *.nuget.props 164 | *.nuget.targets 165 | 166 | # Microsoft Azure Build Output 167 | csx/ 168 | *.build.csdef 169 | 170 | # Microsoft Azure Emulator 171 | ecf/ 172 | rcf/ 173 | 174 | # Windows Store app package directories and files 175 | AppPackages/ 176 | BundleArtifacts/ 177 | Package.StoreAssociation.xml 178 | _pkginfo.txt 179 | 180 | # Visual Studio cache files 181 | # files ending in .cache can be ignored 182 | *.[Cc]ache 183 | # but keep track of directories ending in .cache 184 | !*.[Cc]ache/ 185 | 186 | # Others 187 | ClientBin/ 188 | ~$* 189 | *~ 190 | *.dbmdl 191 | *.dbproj.schemaview 192 | *.jfm 193 | *.pfx 194 | *.publishsettings 195 | node_modules/ 196 | orleans.codegen.cs 197 | 198 | # Since there are multiple workflows, uncomment next line to ignore bower_components 199 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 200 | #bower_components/ 201 | 202 | # RIA/Silverlight projects 203 | Generated_Code/ 204 | 205 | # Backup & report files from converting an old project file 206 | # to a newer Visual Studio version. Backup files are not needed, 207 | # because we have git ;-) 208 | _UpgradeReport_Files/ 209 | Backup*/ 210 | UpgradeLog*.XML 211 | UpgradeLog*.htm 212 | 213 | # SQL Server files 214 | *.mdf 215 | *.ldf 216 | 217 | # Business Intelligence projects 218 | *.rdl.data 219 | *.bim.layout 220 | *.bim_*.settings 221 | 222 | # Microsoft Fakes 223 | FakesAssemblies/ 224 | 225 | # GhostDoc plugin setting file 226 | *.GhostDoc.xml 227 | 228 | # Node.js Tools for Visual Studio 229 | .ntvs_analysis.dat 230 | 231 | # Visual Studio 6 build log 232 | *.plg 233 | 234 | # Visual Studio 6 workspace options file 235 | *.opt 236 | 237 | # Visual Studio LightSwitch build output 238 | **/*.HTMLClient/GeneratedArtifacts 239 | **/*.DesktopClient/GeneratedArtifacts 240 | **/*.DesktopClient/ModelManifest.xml 241 | **/*.Server/GeneratedArtifacts 242 | **/*.Server/ModelManifest.xml 243 | _Pvt_Extensions 244 | 245 | # Paket dependency manager 246 | .paket/paket.exe 247 | paket-files/ 248 | 249 | # FAKE - F# Make 250 | .fake/ 251 | 252 | # JetBrains Rider 253 | .idea/ 254 | *.sln.iml 255 | 256 | # CodeRush 257 | .cr/ 258 | 259 | # Python Tools for Visual Studio (PTVS) 260 | __pycache__/ 261 | *.pyc -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/cloverview/xfstkdldrpluginuserinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINUSERINTERFACE_H 19 | #define XFSTKDLDRPLUGINUSERINTERFACE_H 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include "xfstkdldrthread.h" 28 | #include 29 | #include "xfstkdldrpluginoptionsinterface.h" 30 | 31 | namespace Ui { 32 | class XfstkDldrPluginUserInterface; 33 | } 34 | 35 | 36 | struct OptionsInterfaceState; 37 | 38 | struct UserInterfaceState { 39 | QString FWDnXBin; 40 | QString IFWIBin; 41 | QString OSDnXBin; 42 | QString OSImageBin; 43 | QString DownloadButtonLabel; 44 | QString DownloadStatusDetails; 45 | QString DownloadStatusProgress; 46 | QString DeviceStatusScanning; 47 | QString ProvisionCount; 48 | QString CurrentSearchDir; 49 | QString GPFlagOverrideValue; 50 | QString DesktopDir; 51 | QString USBTimeout; 52 | bool EnableGpFlagOverride; 53 | bool SuppressErrors; 54 | bool IsDownloadThreadDone; 55 | int NumberOfAvailableTargets; 56 | int TotalPassingProvisionsForCurrentThread; 57 | int TotalFailingProvisionsForCurrentThread; 58 | int TotalTargetsForCurrentThread; 59 | bool EnableLogging; 60 | QString LoggingPath; 61 | bool EnableProvisionCount; 62 | int NumProvisionCount; 63 | int StatusListLocation; 64 | int StatusListPrevLength; 65 | bool ShowDownloadDetails; 66 | }; 67 | 68 | class xfstksleep : public QThread 69 | { 70 | Q_OBJECT 71 | public: 72 | explicit xfstksleep(QObject *parent = 0); 73 | void sleep(unsigned long secs); 74 | void msleep(unsigned long msecs); 75 | void usleep(unsigned long usecs); 76 | signals: 77 | 78 | public slots: 79 | 80 | }; 81 | 82 | class XfstkDldrPluginUserInterface : public QWidget { 83 | Q_OBJECT 84 | public: 85 | void SaveUserInterfaceStateToDisk(QString Vendor, QString ProductPlugin); 86 | void LoadUserInterfaceStateFromDisk(QString Vendor, QString ProductPlugin); 87 | void RestoreUserInterfaceFromCurrentState(); 88 | bool SetCurrentWorkingDirectory(QString WorkingDir); 89 | QString DetermineCurrentFileSearchPath(QString BinPath); 90 | UserInterfaceState CurrentState; 91 | QString LastError; 92 | bool LineEditWA; 93 | void ReportErrors(); 94 | bool ValidateUserInterfaceState(); 95 | bool VerifyBinaryFilePath(QString BinPath); 96 | QFileDialog OpenFile; 97 | XfstkDldrPluginUserInterface(QWidget *parent = 0); 98 | ~XfstkDldrPluginUserInterface(); 99 | QTabWidget *GetTabInterface(); 100 | Ui::XfstkDldrPluginUserInterface *ui; 101 | bool IgnoreIncrementalUIChanges; 102 | QTimer *UsbDetectionTimer; 103 | QTimer *UpdateStatusTimer; 104 | xfstkdldrthread xfstknewthread; 105 | xfstkdldrthreadobj xfstknewthreadobj; 106 | 107 | char *c_str_FWDnX; 108 | char *c_str_FWImage; 109 | char *c_str_OSDnx; 110 | char *c_str_OSImage; 111 | char *c_str_GPFlagsOverride; 112 | 113 | QByteArray baFWDnx; 114 | QByteArray baFWImage; 115 | QByteArray baOSDnx; 116 | QByteArray baOSImage; 117 | QByteArray baGPFlagsOverride; 118 | 119 | QString FWDnX; 120 | QString FWImage; 121 | QString OSDnX; 122 | QString OSImage; 123 | QString GPFlagsOverride; 124 | 125 | bool bFWOnly; 126 | bool bOsOnly; 127 | bool bFwOs; 128 | 129 | unsigned int DetectDevicesTimeRemain; 130 | #ifdef XFSTK_OS_WIN 131 | DevicesCallBack CallbackStruct; 132 | #endif 133 | SoCDevices socDevs; 134 | xfstkdldrapi* dldrapi; 135 | QTimer *UsbCallBackTimer; 136 | bool devDetectWait; 137 | void BeginDownload(); 138 | void emitDownloadbegin(){emit readyForDownload();} 139 | void cancelDetection(); 140 | 141 | signals: 142 | void UserInterfaceChanged(UserInterfaceState *State); 143 | void readyForDownload(); 144 | 145 | public slots: 146 | void OptionsInterfaceChanged(OptionsInterfaceState *State); 147 | void UpdateUsbStatus(); 148 | void UpdateUiStatus(); 149 | void ThreadComplete(bool result); 150 | void TargetsCompletedForThread(int numdone); 151 | void UpdatedeviceDetectStatus(); 152 | 153 | protected: 154 | void changeEvent(QEvent *e); 155 | 156 | private: 157 | 158 | private slots: 159 | void on_BeginDownload_clicked(); 160 | void on_OSImageBin_editingFinished(); 161 | void on_OSDnXBin_editingFinished(); 162 | void on_IFWIBin_editingFinished(); 163 | void on_FWDnXBin_editingFinished(); 164 | void on_BrowseOSImageBin_clicked(); 165 | void on_BrowseOSDnXBin_clicked(); 166 | void on_BrowseIFWIBin_clicked(); 167 | void on_BrowseFWDnXBin_clicked(); 168 | }; 169 | 170 | #endif // XFSTKDLDRPLUGINUSERINTERFACE_H 171 | -------------------------------------------------------------------------------- /sourcecode/26MobileTool/Intel/downloader/medfield/xfstkdldrpluginuserinterface.h: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (C) 2015 Intel Corporation 3 | 4 | This library is free software; you can redistribute it and/or 5 | modify it under the terms of the GNU Lesser General Public 6 | License as published by the Free Software Foundation; either 7 | version 2.1 of the License, or (at your option) any later version. 8 | 9 | This library is distributed in the hope that it will be useful, 10 | but WITHOUT ANY WARRANTY; without even the implied warranty of 11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 12 | Lesser General Public License for more details. 13 | 14 | You should have received a copy of the GNU Lesser General Public 15 | License along with this library; if not, write to the Free Software 16 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 17 | */ 18 | #ifndef XFSTKDLDRPLUGINUSERINTERFACE_H 19 | #define XFSTKDLDRPLUGINUSERINTERFACE_H 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include "xfstkdldrthread.h" 28 | #include 29 | #include "xfstkdldrpluginoptionsinterface.h" 30 | namespace Ui { 31 | class XfstkDldrPluginUserInterface; 32 | } 33 | 34 | 35 | struct OptionsInterfaceState; 36 | 37 | struct UserInterfaceState { 38 | QString FWDnXBin; 39 | QString IFWIBin; 40 | QString OSDnXBin; 41 | QString OSImageBin; 42 | QString MiscDnXPath; 43 | QString DownloadButtonLabel; 44 | QString DownloadStatusDetails; 45 | QString DownloadStatusProgress; 46 | QString DeviceStatusScanning; 47 | QString ProvisionCount; 48 | QString CurrentSearchDir; 49 | QString GPFlagOverrideValue; 50 | QString DesktopDir; 51 | QString USBTimeout; 52 | bool EnableGpFlagOverride; 53 | bool SuppressErrors; 54 | bool IsDownloadThreadDone; 55 | int NumberOfAvailableTargets; 56 | int TotalPassingProvisionsForCurrentThread; 57 | int TotalFailingProvisionsForCurrentThread; 58 | int TotalTargetsForCurrentThread; 59 | bool EnableLogging; 60 | QString LoggingPath; 61 | bool EnableProvisionCount; 62 | int NumProvisionCount; 63 | int StatusListLocation; 64 | int StatusListPrevLength; 65 | bool ShowDownloadDetails; 66 | bool MiscDnxEnable; 67 | }; 68 | 69 | class xfstksleep : public QThread 70 | { 71 | Q_OBJECT 72 | public: 73 | explicit xfstksleep(QObject *parent = 0); 74 | void sleep(unsigned long secs); 75 | void msleep(unsigned long msecs); 76 | void usleep(unsigned long usecs); 77 | signals: 78 | 79 | public slots: 80 | 81 | }; 82 | 83 | class XfstkDldrPluginUserInterface : public QWidget { 84 | Q_OBJECT 85 | public: 86 | void SaveUserInterfaceStateToDisk(QString Vendor, QString ProductPlugin); 87 | void LoadUserInterfaceStateFromDisk(QString Vendor, QString ProductPlugin); 88 | void RestoreUserInterfaceFromCurrentState(); 89 | bool SetCurrentWorkingDirectory(QString WorkingDir); 90 | QString DetermineCurrentFileSearchPath(QString BinPath); 91 | UserInterfaceState CurrentState; 92 | QString LastError; 93 | bool LineEditWA; 94 | void ReportErrors(); 95 | bool ValidateUserInterfaceState(); 96 | bool VerifyBinaryFilePath(QString BinPath); 97 | QFileDialog OpenFile; 98 | XfstkDldrPluginUserInterface(QWidget *parent = 0); 99 | ~XfstkDldrPluginUserInterface(); 100 | QTabWidget *GetTabInterface(); 101 | Ui::XfstkDldrPluginUserInterface *ui; 102 | bool IgnoreIncrementalUIChanges; 103 | QTimer *UsbDetectionTimer; 104 | QTimer *UpdateStatusTimer; 105 | xfstkdldrthread xfstknewthread; 106 | xfstkdldrthreadobj xfstknewthreadobj; 107 | 108 | char *c_str_FWDnX; 109 | char *c_str_FWImage; 110 | char *c_str_OSDnx; 111 | char *c_str_OSImage; 112 | char *c_str_MiscDnXPath; 113 | char *c_str_GPFlagsOverride; 114 | 115 | QByteArray baFWDnx; 116 | QByteArray baFWImage; 117 | QByteArray baOSDnx; 118 | QByteArray baOSImage; 119 | QByteArray baMiscDnXPath; 120 | QByteArray baGPFlagsOverride; 121 | 122 | QString FWDnX; 123 | QString FWImage; 124 | QString OSDnX; 125 | QString OSImage; 126 | QString MiscDnXPath; 127 | QString GPFlagsOverride; 128 | 129 | bool bFWOnly; 130 | bool bOsOnly; 131 | bool bFwOs; 132 | 133 | unsigned int DetectDevicesTimeRemain; 134 | #ifdef XFSTK_OS_WIN 135 | DevicesCallBack CallbackStruct; 136 | #endif 137 | SoCDevices socDevs; 138 | xfstkdldrapi* dldrapi; 139 | QTimer *UsbCallBackTimer; 140 | bool devDetectWait; 141 | void BeginDownload(); 142 | void emitDownloadbegin(){emit readyForDownload();} 143 | void cancelDetection(); 144 | 145 | signals: 146 | void UserInterfaceChanged(UserInterfaceState *State); 147 | void readyForDownload(); 148 | 149 | public slots: 150 | void OptionsInterfaceChanged(OptionsInterfaceState *State); 151 | void UpdateUsbStatus(); 152 | void UpdateUiStatus(); 153 | void ThreadComplete(bool result); 154 | void TargetsCompletedForThread(int numdone); 155 | void UpdatedeviceDetectStatus(); 156 | 157 | protected: 158 | void changeEvent(QEvent *e); 159 | 160 | private: 161 | 162 | 163 | private slots: 164 | void on_BeginDownload_clicked(); 165 | void on_OSImageBin_editingFinished(); 166 | void on_OSDnXBin_editingFinished(); 167 | void on_IFWIBin_editingFinished(); 168 | void on_FWDnXBin_editingFinished(); 169 | void on_BrowseOSImageBin_clicked(); 170 | void on_BrowseOSDnXBin_clicked(); 171 | void on_BrowseIFWIBin_clicked(); 172 | void on_BrowseFWDnXBin_clicked(); 173 | }; 174 | 175 | #endif // XFSTKDLDRPLUGINUSERINTERFACE_H 176 | --------------------------------------------------------------------------------