diff --git a/QtAdb/QtAdb.pro b/QtAdb/QtAdb.pro
index 46ee531..9a275f6 100644
--- a/QtAdb/QtAdb.pro
+++ b/QtAdb/QtAdb.pro
@@ -19,7 +19,13 @@ SOURCES += \
pagemaker.cpp \
sonPages/activator/sp_activator.cpp \
sonPages/advanced/sp_customize_cmd.cpp \
+ sonPages/apps/sp_features.cpp \
sonPages/apps/sp_installer.cpp \
+ sonPages/apps/sp_libraries.cpp \
+ sonPages/apps/sp_packages.cpp \
+ sonPages/apps/sp_permissiongroups.cpp \
+ sonPages/apps/sp_permissions.cpp \
+ sonPages/apps/tp_packageprofile.cpp \
sonPages/devControl/btnemulator.cpp \
sonPages/devControl/sp_devcontrol_power.cpp \
sonPages/devInfo/sp_dpichanger.cpp \
@@ -44,7 +50,13 @@ HEADERS += \
pagemaker.h \
sonPages/activator/sp_activator.h \
sonPages/advanced/sp_customize_cmd.h \
+ sonPages/apps/sp_features.h \
sonPages/apps/sp_installer.h \
+ sonPages/apps/sp_libraries.h \
+ sonPages/apps/sp_packages.h \
+ sonPages/apps/sp_permissiongroups.h \
+ sonPages/apps/sp_permissions.h \
+ sonPages/apps/tp_packageprofile.h \
sonPages/devControl/btnemulator.h \
sonPages/devControl/sp_devcontrol_power.h \
sonPages/devInfo/sp_dpichanger.h \
@@ -66,7 +78,13 @@ FORMS += \
pagelistitem.ui \
sonPages/activator/sp_activator.ui \
sonPages/advanced/sp_customize_cmd.ui \
+ sonPages/apps/sp_features.ui \
sonPages/apps/sp_installer.ui \
+ sonPages/apps/sp_libraries.ui \
+ sonPages/apps/sp_packages.ui \
+ sonPages/apps/sp_permissiongroups.ui \
+ sonPages/apps/sp_permissions.ui \
+ sonPages/apps/tp_packageprofile.ui \
sonPages/devControl/btnemulator.ui \
sonPages/devControl/sp_devcontrol_power.ui \
sonPages/devInfo/sp_dpichanger.ui \
diff --git a/QtAdb/about.ui b/QtAdb/about.ui
index e2dcf1d..53e7878 100644
--- a/QtAdb/about.ui
+++ b/QtAdb/about.ui
@@ -35,9 +35,7 @@
-
- MiSans Medium
-
+
border-radius: 4px;
@@ -114,7 +112,7 @@ QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
- 测试版本:beta-v0.2
+ 测试版本:beta-v0.4
diff --git a/QtAdb/animationwidget.cpp b/QtAdb/animationwidget.cpp
index 7143e5e..62701e6 100644
--- a/QtAdb/animationwidget.cpp
+++ b/QtAdb/animationwidget.cpp
@@ -11,8 +11,8 @@ animationWidget::animationWidget(QWidget *p)
void animationWidget::playLoadAnimation()
{
animation->setDuration(750);
- animation->setEndValue(QRect(301, 111, this->width(),this->height()));
- animation->setStartValue(QRect(301 + 50, 111, this->width(),this->height()));
+ animation->setEndValue(QRect(301, 117, this->width(),this->height()));
+ animation->setStartValue(QRect(301 + 50, 117, this->width(),this->height()));
animation->setEasingCurve(QEasingCurve::OutQuart);
diff --git a/QtAdb/basepage.ui b/QtAdb/basepage.ui
index 47eb60b..c804fe9 100644
--- a/QtAdb/basepage.ui
+++ b/QtAdb/basepage.ui
@@ -27,7 +27,7 @@
0
- 11
+ 0
-
diff --git a/QtAdb/ico.qrc b/QtAdb/ico.qrc
index 22d32d1..6bbb4db 100644
--- a/QtAdb/ico.qrc
+++ b/QtAdb/ico.qrc
@@ -71,6 +71,7 @@
image/ico/about/wechat.svg
image/ico/logo.svg
image/ico/code-s-slash-line.svg
+ image/ico/share-box-line.svg
image/test/back.png
diff --git a/QtAdb/image/ico/share-box-line.svg b/QtAdb/image/ico/share-box-line.svg
new file mode 100644
index 0000000..299773b
--- /dev/null
+++ b/QtAdb/image/ico/share-box-line.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/QtAdb/mainwindow.cpp b/QtAdb/mainwindow.cpp
index 52fdbe1..92d33ee 100644
--- a/QtAdb/mainwindow.cpp
+++ b/QtAdb/mainwindow.cpp
@@ -76,18 +76,34 @@ void MainWindow::refreshDevList() //方法:刷新设备列
devList.clear(); //清空设备列表
devList = explainer->getDevList_windows(process->run("adb devices -l")); //重新赋值
+ QList off; //未响应设备索引
+
/*将设备信息传入 List l ,并将l的值显示在combobox中*/
QStringList l;
l.clear();
for (int i = 0 ; i < devList.size() ; i++ )
{
- QString devItem =devList[i].state + " " + explainer->get_words_after(devList[i].device_product, ":") + " " + explainer->get_words_after(devList[i].model, ":");
+ QString devItem = devList[i].state + " " + explainer->get_words_after(devList[i].model, ":") + " " + devList[i].addr;
l.append(devItem);
+ if(devList[i].state == "[未响应]")
+ {
+ off.append(i);
+ /*
+ QVariant v(0);
+ ui->comboBox->setItemData(i, v, Qt::UserRole - 1);
+ */
+ }
}
ui->comboBox->addItems(l);
+ for(int i = 0; i < off.count();i++)
+ {
+ QVariant v(0);
+ ui->comboBox->setItemData(off[i], v, Qt::UserRole - 1);
+ }
+
if(devList.isEmpty())
{
current_device = -1; //重设当前设备
@@ -132,12 +148,12 @@ void MainWindow::setCurrentDevice(int index) //槽:改变所选设备
//initBasePage(0);
if(ui->indexList->currentRow() == 0)
{
- qDebug() << "initBasePage";
+ //qDebug() << "initBasePage";
initBasePage(0);
}
else
{
- qDebug() << "setCurrentRow";
+ //qDebug() << "setCurrentRow";
ui->indexList->setCurrentRow(0);
}
@@ -149,7 +165,8 @@ void MainWindow::initBasePage(int key) //槽:生成basePages
{
while(key != -1)
{
- this->setEnabled(false);
+ //this->setEnabled(false);
+ this->lock();
if(currentPage != NULL) //销毁上一个basePage
{
@@ -160,6 +177,7 @@ void MainWindow::initBasePage(int key) //槽:生成basePages
}
currentPage = new basePage(this);
+ connect(currentPage,SIGNAL(animationEnd()),this,SLOT(slot_taiChi()));
if(devList.isEmpty())
{
@@ -176,8 +194,11 @@ void MainWindow::initBasePage(int key) //槽:生成basePages
currentPage->playLoadAnimation();
//currentPage->repaint();
+ taiChiTimer = new QTimer(this);
+ connect(taiChiTimer, SIGNAL(timeout()), this, SLOT(slot_taiChi()));
+ taiChiTimer->setSingleShot(true);
+ taiChiTimer->start(750);
- this->setEnabled(true);
break;
}
}
@@ -206,7 +227,7 @@ void MainWindow::addIndexItems() //方法:初始化向index
addItemToIndex(activator);
indexListItem *apps = new indexListItem(this->ui->indexList);
- apps->setText("应用");
+ apps->setText("软件包管理器");
apps->setPic("image:url(:/ico/image/ico/google-play-line.svg);background-color:rgba(255,255,255,0);");
addItemToIndex(apps);
@@ -468,3 +489,27 @@ void MainWindow::on_WSABtn_clicked() //槽:连接WSA
msgBox->addButton(" ✓ ", QMessageBox::AcceptRole);
msgBox->show();
}
+
+void MainWindow::slot_taiChi()
+{
+ //qDebug() <<"taiChi -" << taiChi;
+ /*
+ if(taiChi)
+ {
+ this->resize(this->geometry().width() + 5,this->geometry().height());
+ }
+ else
+ {
+ this->resize(this->geometry().width() - 5,this->geometry().height());
+ }*/
+ taiChi = !taiChi;
+ currentPage->repaint();
+ delete taiChiTimer;
+ taiChiTimer = NULL;
+
+ if(ui->comboBox->currentIndex() != -1)
+ {
+ this->unlock();
+ }
+ //this->setEnabled(true);
+}
diff --git a/QtAdb/mainwindow.h b/QtAdb/mainwindow.h
index 8bab7c7..4e03ebf 100644
--- a/QtAdb/mainwindow.h
+++ b/QtAdb/mainwindow.h
@@ -8,6 +8,7 @@
#include
#include
#include
+#include
#include "adbprocess.h"
#include "textexplainer.h"
#include "indexlistitem.h"
@@ -69,6 +70,7 @@ private slots:
void connectWIFIDev();
void on_WSABtn_clicked();
+ void slot_taiChi();
private:
Ui::MainWindow *ui;
@@ -77,6 +79,9 @@ private:
void addIndexItems();
void setStyles();
+ bool taiChi = true;
+ QTimer *taiChiTimer;
+
basePage * currentPage;
animationWidget * tmpPage;
about * WCMPage2;
diff --git a/QtAdb/mainwindow.ui b/QtAdb/mainwindow.ui
index 1c0552e..4fbff42 100644
--- a/QtAdb/mainwindow.ui
+++ b/QtAdb/mainwindow.ui
@@ -29,7 +29,7 @@
- 11
+ 0
-
diff --git a/QtAdb/pagelistitem.cpp b/QtAdb/pagelistitem.cpp
index 5208d11..8899379 100644
--- a/QtAdb/pagelistitem.cpp
+++ b/QtAdb/pagelistitem.cpp
@@ -9,7 +9,7 @@ pageListItem::pageListItem(QWidget *parent) :
ui->enableLight->setVisible(false);
ui->widget->setStyleSheet("QWidget{background-color:transparent; border-radius:4px; border-color:gray;border:0px;}");
- ui->pic->setStyleSheet("QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}");
+ ui->pic->setStyleSheet("QPushButton{background-color:rgba(255,255,255,0.7);border-radius:4px;border:0px;}");
setStyles();
}
@@ -56,7 +56,9 @@ void pageListItem::on_copyButton_clicked()
void pageListItem::setSelectable()
{
- ui->enableLight->setVisible(true);
+ //ui->enableLight->setVisible(true);
+ //shadowEffect_icon->setColor(Qt::green);
+ ui->pic->setStyleSheet("QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}");
}
void pageListItem::slot_setText(QString t, QString p)
@@ -87,7 +89,7 @@ void pageListItem::setStyles()
graphicsOpacityEffect->setOpacity(1.0);
ui->pic->setGraphicsEffect(graphicsOpacityEffect);
- QGraphicsDropShadowEffect *shadowEffect_icon = new QGraphicsDropShadowEffect(this);
+ shadowEffect_icon = new QGraphicsDropShadowEffect(this);
shadowEffect_icon->setOffset(0,0);
shadowEffect_icon->setColor(Qt::gray);
shadowEffect_icon->setBlurRadius(5);
diff --git a/QtAdb/pagelistitem.h b/QtAdb/pagelistitem.h
index d45a768..e10b7ee 100644
--- a/QtAdb/pagelistitem.h
+++ b/QtAdb/pagelistitem.h
@@ -39,6 +39,8 @@ private slots:
private:
Ui::pageListItem *ui;
+ QGraphicsDropShadowEffect *shadowEffect_icon;
+
public slots:
void slot_setText(QString t, QString p);
void slot_setText_title(QString t);
diff --git a/QtAdb/pagemaker.cpp b/QtAdb/pagemaker.cpp
index c27e667..a85ae63 100644
--- a/QtAdb/pagemaker.cpp
+++ b/QtAdb/pagemaker.cpp
@@ -301,7 +301,7 @@ basePage* pageMaker::createPage_apps(QWidget *parent, device dev)
apps->isBasePage = true;
//activatorPage *activator = new activatorPage(parent);
apps->whoYouAre("apps");
- int val[20] = {1};
+ int val[20] = {1,2,3,4,5,6};
apps->setEnableValue(val);
apps->setDev(dev);
@@ -311,6 +311,36 @@ basePage* pageMaker::createPage_apps(QWidget *parent, device dev)
installer->setSelectable();
apps->addItemsToList(installer);
+ pageListItem *permissionGroups = new pageListItem(apps);
+ permissionGroups->setText("已知权限组","adb shell pm list permission-groups");
+ permissionGroups->setPic(":/ico/image/ico/about/information-line.svg");
+ permissionGroups->setSelectable();
+ apps->addItemsToList(permissionGroups);
+
+ pageListItem *permissions = new pageListItem(apps);
+ permissions->setText("已知权限","adb shell pm list permissions");
+ permissions->setPic(":/ico/image/ico/about/information-line.svg");
+ permissions->setSelectable();
+ apps->addItemsToList(permissions);
+
+ pageListItem *packages = new pageListItem(apps);
+ packages->setText("软件包","adb shell pm list packages");
+ packages->setPic(":/ico/image/ico/android-line.svg");
+ packages->setSelectable();
+ apps->addItemsToList(packages);
+
+ pageListItem *features = new pageListItem(apps);
+ features->setText("系统功能","adb shell pm list features");
+ features->setPic(":/ico/image/ico/tools-line.svg");
+ features->setSelectable();
+ apps->addItemsToList(features);
+
+ pageListItem *libraries = new pageListItem(apps);
+ libraries->setText("库","adb shell pm list libraries");
+ libraries->setPic(":/ico/image/ico/btnEmulator/menu-line.svg");
+ libraries->setSelectable();
+ apps->addItemsToList(libraries);
+
return apps;
}
diff --git a/QtAdb/sonPages/apps/sp_features.cpp b/QtAdb/sonPages/apps/sp_features.cpp
new file mode 100644
index 0000000..6451e98
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_features.cpp
@@ -0,0 +1,82 @@
+#include "sp_features.h"
+#include "ui_sp_features.h"
+
+sp_features::sp_features(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::sp_features)
+{
+ ui->setupUi(this);
+ setParent(parent);
+
+ ui->progressBar->hide();
+ ui->listView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+
+ thread = new adbThread();
+ connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
+
+
+ connect(thread,SIGNAL(signal_output(QString)),this,SLOT(refresh_tableView(QString)));
+
+ QGraphicsDropShadowEffect *shadowEffect_back_to_basePage = new QGraphicsDropShadowEffect(this);
+ QGraphicsDropShadowEffect *shadowEffect_refreshBtn = new QGraphicsDropShadowEffect(this);
+
+ shadowEffect_back_to_basePage->setOffset(0,0);
+ shadowEffect_back_to_basePage->setColor(Qt::gray);
+ shadowEffect_back_to_basePage->setBlurRadius(5);
+
+ shadowEffect_refreshBtn->setOffset(0,0);
+ shadowEffect_refreshBtn->setColor(Qt::gray);
+ shadowEffect_refreshBtn->setBlurRadius(5);
+
+ ui->back_to_basePage->setGraphicsEffect(shadowEffect_back_to_basePage);
+ ui->refreshBtn->setGraphicsEffect(shadowEffect_refreshBtn);
+
+}
+
+sp_features::~sp_features()
+{
+ delete ui;
+}
+
+void sp_features::on_refreshBtn_clicked()
+{
+ thread->initThread("adb shell pm list features",dev,"#PERMISSIONGROUPS#");
+ ui->progressBar->setVisible(true);
+ thread->start();
+}
+
+void sp_features::refresh_tableView(QString s)
+{
+ QStandardItemModel* emptyModel = new QStandardItemModel(this);
+ ui->listView->setModel(emptyModel);
+ //thread->exit();
+ //qDebug() << "before";
+ QStringList permissionList = explainer->explainPermissionGroups(s);
+ //qDebug() << "after";
+ QStandardItemModel* model = new QStandardItemModel(this);
+ if(!permissionList.isEmpty())
+ {
+ for(int i = 0; i < permissionList.count(); i++)
+ {
+ QStringList tmpList;
+ tmpList = permissionList[i].split(":");
+ //qDebug() << "permissionList.count() = " << permissionList.count() <<"\nbefore index out of range: \n i = " << i << "\n permissionList[i] = "<< permissionList[i];
+ if(tmpList.count() >= 2)
+ {
+ model->setItem(i,0,new QStandardItem(tmpList[1]));
+ }
+ }
+ ui->listView->setModel(model);
+ this->update();
+ }
+ ui->progressBar->setVisible(false);
+ delete emptyModel;
+}
+
+void sp_features::setDev(device device)
+{
+ qDebug() << "setDev.DEVICE" << device.model;
+ dev = device;
+ qDebug() << "setDev.DEV" << dev.model;
+ on_refreshBtn_clicked();
+}
diff --git a/QtAdb/sonPages/apps/sp_features.h b/QtAdb/sonPages/apps/sp_features.h
new file mode 100644
index 0000000..1f15140
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_features.h
@@ -0,0 +1,37 @@
+#ifndef SP_FEATURES_H
+#define SP_FEATURES_H
+
+#include
+#include
+#include
+//#include
+#include "../../threads/adbthread.h"
+
+namespace Ui {
+class sp_features;
+}
+
+class sp_features : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit sp_features(QWidget *parent = nullptr);
+ ~sp_features();
+
+ device dev;
+ void setDev(device dev);
+
+private slots:
+ void on_refreshBtn_clicked();
+
+public slots:
+ void refresh_tableView(QString);
+
+private:
+ Ui::sp_features *ui;
+ adbThread *thread;
+ textExplainer *explainer;
+};
+
+#endif // SP_FEATURES_H
diff --git a/QtAdb/sonPages/apps/sp_features.ui b/QtAdb/sonPages/apps/sp_features.ui
new file mode 100644
index 0000000..72fde9c
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_features.ui
@@ -0,0 +1,223 @@
+
+
+ sp_features
+
+
+
+ 0
+ 0
+ 488
+ 394
+
+
+
+ Form
+
+
+
-
+
+
+ border-radius: 4px;
+background-color: rgba(255, 255, 255, 0);
+border:0px solid #BDBDBD;
+
+
+
+ 11
+
+
+ 11
+
+
-
+
+
+ 14
+
+
-
+
+
+ 14
+
+
-
+
+
+
+ 40
+ 40
+
+
+
+
+ 40
+ 40
+
+
+
+ border-radius: 4px;
+border:0px solid #BDBDBD;
+image: url(:/ico/image/ico/tools-line.svg);
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 50
+
+
+
+
+ 16777215
+ 50
+
+
+
+
+ 18
+ true
+
+
+
+ border-radius: 4px;
+border:0px solid #BDBDBD;
+
+
+ 系统功能
+
+
+
+
+
+ -
+
+
+ QProgressBar{
+ font:9pt;
+ border-radius:4px;
+ text-align:center;
+ /*border:1px solid #E8EDF2;*/
+ border:0px solid #E8EDF2;
+ background-color: qlineargradient(x1:0,y1:1,x1:1,y1:0,stop:0 #11998e, stop:1 #38ef7d);
+}
+QProgressBar:chunk{
+ border-radius:4px;
+ background-color:rgba(255,255,255,0.2);
+}
+
+
+
+ 0
+
+
+ -1
+
+
+ true
+
+
+
+ -
+
+
+ true
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 30
+ 30
+
+
+
+
+ 30
+ 30
+
+
+
+ QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
+QPushButton:hover{background-color:rgba(255,255,255,0.7);}
+QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
+
+
+
+
+
+
+ :/ico/image/ico/arrow-left-line.svg:/ico/image/ico/arrow-left-line.svg
+
+
+
+ 18
+ 18
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 30
+
+
+
+
+ 16777215
+ 30
+
+
+
+ QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
+QPushButton:hover{background-color:rgba(255,255,255,0.7);}
+QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
+
+
+
+
+
+
+ :/ico/image/ico/refresh-line.svg:/ico/image/ico/refresh-line.svg
+
+
+
+ 18
+ 18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QtAdb/sonPages/apps/sp_libraries.cpp b/QtAdb/sonPages/apps/sp_libraries.cpp
new file mode 100644
index 0000000..a7d53b2
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_libraries.cpp
@@ -0,0 +1,79 @@
+#include "sp_libraries.h"
+#include "ui_sp_libraries.h"
+
+sp_libraries::sp_libraries(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::sp_libraries)
+{
+ ui->setupUi(this);
+ setParent(parent);
+
+ ui->progressBar->hide();
+ ui->listView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+
+ thread = new adbThread();
+ connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
+
+ connect(thread,SIGNAL(signal_output(QString)),this,SLOT(refresh_tableView(QString)));
+
+ QGraphicsDropShadowEffect *shadowEffect_back_to_basePage = new QGraphicsDropShadowEffect(this);
+ QGraphicsDropShadowEffect *shadowEffect_refreshBtn = new QGraphicsDropShadowEffect(this);
+
+ shadowEffect_back_to_basePage->setOffset(0,0);
+ shadowEffect_back_to_basePage->setColor(Qt::gray);
+ shadowEffect_back_to_basePage->setBlurRadius(5);
+
+ shadowEffect_refreshBtn->setOffset(0,0);
+ shadowEffect_refreshBtn->setColor(Qt::gray);
+ shadowEffect_refreshBtn->setBlurRadius(5);
+
+ ui->back_to_basePage->setGraphicsEffect(shadowEffect_back_to_basePage);
+ ui->refreshBtn->setGraphicsEffect(shadowEffect_refreshBtn);
+
+}
+
+sp_libraries::~sp_libraries()
+{
+ delete ui;
+}
+
+void sp_libraries::on_refreshBtn_clicked()
+{
+ thread->initThread("adb shell pm list features",dev,"#PERMISSIONGROUPS#");
+ ui->progressBar->setVisible(true);
+ thread->start();
+}
+
+void sp_libraries::refresh_tableView(QString s)
+{
+ QStandardItemModel* emptyModel = new QStandardItemModel(this);
+ ui->listView->setModel(emptyModel);
+ //thread->exit();
+ //qDebug() << "before";
+ QStringList permissionList = explainer->explainPermissionGroups(s);
+ //qDebug() << "after";
+ QStandardItemModel* model = new QStandardItemModel(this);
+ if(!permissionList.isEmpty())
+ {
+ for(int i = 0; i < permissionList.count(); i++)
+ {
+ QStringList tmpList;
+ tmpList = permissionList[i].split(":");
+ //qDebug() << "permissionList.count() = " << permissionList.count() <<"\nbefore index out of range: \n i = " << i << "\n permissionList[i] = "<< permissionList[i];
+ if(tmpList.count() >= 2)
+ {
+ model->setItem(i,0,new QStandardItem(tmpList[1]));
+ }
+ }
+ ui->listView->setModel(model);
+ this->update();
+ }
+ ui->progressBar->setVisible(false);
+ delete emptyModel;
+}
+
+void sp_libraries::setDev(device device)
+{
+ dev = device;
+ on_refreshBtn_clicked();
+}
diff --git a/QtAdb/sonPages/apps/sp_libraries.h b/QtAdb/sonPages/apps/sp_libraries.h
new file mode 100644
index 0000000..bacd459
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_libraries.h
@@ -0,0 +1,39 @@
+#ifndef SP_LIBRARIES_H
+#define SP_LIBRARIES_H
+
+#include
+#include
+#include
+//#include
+#include "../../threads/adbthread.h"
+
+namespace Ui {
+class sp_libraries;
+}
+
+class sp_libraries : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit sp_libraries(QWidget *parent = nullptr);
+ ~sp_libraries();
+
+ device dev;
+ void setDev(device dev);
+
+private slots:
+ void on_refreshBtn_clicked();
+
+public slots:
+ void refresh_tableView(QString);
+
+
+private:
+ Ui::sp_libraries *ui;
+ adbThread *thread;
+ textExplainer *explainer;
+
+};
+
+#endif // SP_LIBRARIES_H
diff --git a/QtAdb/sonPages/apps/sp_libraries.ui b/QtAdb/sonPages/apps/sp_libraries.ui
new file mode 100644
index 0000000..6e99018
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_libraries.ui
@@ -0,0 +1,223 @@
+
+
+ sp_libraries
+
+
+
+ 0
+ 0
+ 556
+ 382
+
+
+
+ Form
+
+
+ -
+
+
+ border-radius: 4px;
+background-color: rgba(255, 255, 255, 0);
+border:0px solid #BDBDBD;
+
+
+
+ 11
+
+
+ 11
+
+
-
+
+
+ 14
+
+
-
+
+
+ 14
+
+
-
+
+
+
+ 40
+ 40
+
+
+
+
+ 40
+ 40
+
+
+
+ border-radius: 4px;
+border:0px solid #BDBDBD;
+image: url(:/ico/image/ico/btnEmulator/menu-line.svg);
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 50
+
+
+
+
+ 16777215
+ 50
+
+
+
+
+ 18
+ true
+
+
+
+ border-radius: 4px;
+border:0px solid #BDBDBD;
+
+
+ 库
+
+
+
+
+
+ -
+
+
+ QProgressBar{
+ font:9pt;
+ border-radius:4px;
+ text-align:center;
+ /*border:1px solid #E8EDF2;*/
+ border:0px solid #E8EDF2;
+ background-color: qlineargradient(x1:0,y1:1,x1:1,y1:0,stop:0 #11998e, stop:1 #38ef7d);
+}
+QProgressBar:chunk{
+ border-radius:4px;
+ background-color:rgba(255,255,255,0.2);
+}
+
+
+
+ 0
+
+
+ -1
+
+
+ true
+
+
+
+ -
+
+
+ true
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 30
+ 30
+
+
+
+
+ 30
+ 30
+
+
+
+ QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
+QPushButton:hover{background-color:rgba(255,255,255,0.7);}
+QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
+
+
+
+
+
+
+ :/ico/image/ico/arrow-left-line.svg:/ico/image/ico/arrow-left-line.svg
+
+
+
+ 18
+ 18
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 30
+
+
+
+
+ 16777215
+ 30
+
+
+
+ QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
+QPushButton:hover{background-color:rgba(255,255,255,0.7);}
+QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
+
+
+
+
+
+
+ :/ico/image/ico/refresh-line.svg:/ico/image/ico/refresh-line.svg
+
+
+
+ 18
+ 18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QtAdb/sonPages/apps/sp_packages.cpp b/QtAdb/sonPages/apps/sp_packages.cpp
new file mode 100644
index 0000000..b03ae0d
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_packages.cpp
@@ -0,0 +1,125 @@
+#include "sp_packages.h"
+#include "ui_sp_packages.h"
+
+sp_packages::sp_packages(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::sp_packages)
+{
+ ui->setupUi(this);
+
+ pa = parent;
+
+ ui->progressBar->hide();
+ ui->listView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+
+ thread = new adbThread();
+ connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
+
+
+ connect(thread,SIGNAL(signal_output(QString)),this,SLOT(refresh_tableView(QString)));
+ connect(ui->checkBox_d,SIGNAL(clicked()),this,SLOT(setArgs()));
+ connect(ui->checkBox_e,SIGNAL(clicked()),this,SLOT(setArgs()));
+ connect(ui->checkBox_s,SIGNAL(clicked()),this,SLOT(setArgs()));
+ connect(ui->checkBox_3,SIGNAL(clicked()),this,SLOT(setArgs()));
+
+ QGraphicsDropShadowEffect *shadowEffect_back_to_basePage = new QGraphicsDropShadowEffect(this);
+ QGraphicsDropShadowEffect *shadowEffect_refreshBtn = new QGraphicsDropShadowEffect(this);
+
+ shadowEffect_back_to_basePage->setOffset(0,0);
+ shadowEffect_back_to_basePage->setColor(Qt::gray);
+ shadowEffect_back_to_basePage->setBlurRadius(5);
+
+ shadowEffect_refreshBtn->setOffset(0,0);
+ shadowEffect_refreshBtn->setColor(Qt::gray);
+ shadowEffect_refreshBtn->setBlurRadius(5);
+
+ ui->back_to_basePage->setGraphicsEffect(shadowEffect_back_to_basePage);
+ ui->refreshBtn->setGraphicsEffect(shadowEffect_refreshBtn);
+
+}
+
+sp_packages::~sp_packages()
+{
+ delete ui;
+}
+
+void sp_packages::setDev(device device)
+{
+ dev = device;
+ on_refreshBtn_clicked();
+}
+
+void sp_packages::on_refreshBtn_clicked()
+{
+ QString cmd = "adb shell pm list packages";
+ //setArgs();
+ thread->initThread(cmd.append(arg) , dev, "#PERMISSIONGROUPS#");
+ ui->progressBar->setVisible(true);
+ thread->start();
+ arg.clear();
+}
+
+void sp_packages::refresh_tableView(QString s)
+{
+ QStandardItemModel* emptyModel = new QStandardItemModel(this);
+ ui->listView->setModel(emptyModel);
+ //thread->exit();
+ //qDebug() << "before";
+ QStringList packagesList = explainer->explainPermissionGroups(s);
+ //qDebug() << "after";
+ QStandardItemModel* model = new QStandardItemModel(this);
+
+ if(!packagesList.isEmpty())
+ {
+ for(int i = 0; i < packagesList.count(); i++)
+ {
+ //qDebug() << "permissionList.count() = " << packagesList.count() <<"\nbefore index out of range: \n i = " << i << "\n permissionList[i] = "<< packagesList[i];
+ QStringList tempList;
+ tempList = packagesList[i].simplified().split(":");
+
+ if(tempList.count() >= 2)
+ {
+ model->setItem(i,0,new QStandardItem(tempList[1]));
+ }
+ }
+ ui->listView->setStyleSheet("QListView::item{height:24px;}");
+ ui->listView->setModel(model);
+ this->update();
+ }
+
+ ui->progressBar->setVisible(false);
+ delete emptyModel;
+}
+
+void sp_packages::on_listView_clicked(const QModelIndex &index)
+{
+ QString name = ui->listView->model()->data(index).toString();
+ tp_packageProfile * profilePage = new tp_packageProfile(NULL,name);
+ profilePage->setDevice(dev);
+ connect(profilePage,SIGNAL(packageChanged()),this,SLOT(on_refreshBtn_clicked()));
+ profilePage->show();
+}
+
+void sp_packages::setArgs()
+{
+ if(ui->checkBox_e->isChecked())
+ {
+ arg.append(" -e");
+ }
+
+ if(ui->checkBox_d->isChecked())
+ {
+ arg.append(" -d");
+ }
+
+ if(ui->checkBox_s->isChecked())
+ {
+ arg.append(" -s");
+ }
+
+ if(ui->checkBox_3->isChecked())
+ {
+ arg.append(" -3");
+ }
+ on_refreshBtn_clicked();
+}
diff --git a/QtAdb/sonPages/apps/sp_packages.h b/QtAdb/sonPages/apps/sp_packages.h
new file mode 100644
index 0000000..01c32d9
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_packages.h
@@ -0,0 +1,53 @@
+#ifndef SP_PACKAGES_H
+#define SP_PACKAGES_H
+
+#include
+#include
+#include
+#include
+#include "adbprocess.h"
+#include
+#include "../../threads/adbthread.h"
+#include "tp_packageprofile.h"
+/*
+struct package
+{
+ QString package_name;
+};*/
+
+namespace Ui {
+class sp_packages;
+}
+
+class sp_packages : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit sp_packages(QWidget *parent = nullptr);
+ ~sp_packages();
+
+ device dev;
+ void setDev(device dev);
+
+ QWidget *pa;
+
+ QString current_package = "";
+
+private slots:
+ void on_refreshBtn_clicked();
+
+ void on_listView_clicked(const QModelIndex &index);
+ void setArgs();
+
+public slots:
+ void refresh_tableView(QString);
+
+private:
+ Ui::sp_packages *ui;
+ adbThread *thread;
+ textExplainer *explainer;
+
+ QString arg = "";
+};
+#endif // SP_PACKAGES_H
diff --git a/QtAdb/sonPages/apps/sp_packages.ui b/QtAdb/sonPages/apps/sp_packages.ui
new file mode 100644
index 0000000..2b5fda3
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_packages.ui
@@ -0,0 +1,254 @@
+
+
+ sp_packages
+
+
+
+ 0
+ 0
+ 592
+ 557
+
+
+
+ Form
+
+
+ -
+
+
+ border-radius: 4px;
+background-color: rgba(255, 255, 255, 0);
+border:0px solid #BDBDBD;
+
+
+
+ 11
+
+
+ 11
+
+
-
+
+
+ 14
+
+
-
+
+
+ 14
+
+
-
+
+
+
+ 40
+ 40
+
+
+
+
+ 40
+ 40
+
+
+
+ border-radius: 4px;
+border:0px solid #BDBDBD;
+image: url(:/ico/image/ico/android-line.svg);
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 50
+
+
+
+
+ 16777215
+ 50
+
+
+
+
+ 18
+ true
+
+
+
+ border-radius: 4px;
+border:0px solid #BDBDBD;
+
+
+ 应用
+
+
+
+
+
+ -
+
+
+ QProgressBar{
+ font:9pt;
+ border-radius:4px;
+ text-align:center;
+ /*border:1px solid #E8EDF2;*/
+ border:0px solid #E8EDF2;
+ background-color: qlineargradient(x1:0,y1:1,x1:1,y1:0,stop:0 #11998e, stop:1 #38ef7d);
+}
+QProgressBar:chunk{
+ border-radius:4px;
+ background-color:rgba(255,255,255,0.2);
+}
+
+
+
+ 0
+
+
+ -1
+
+
+ true
+
+
+
+ -
+
+
+
+ MiSans Medium
+
+
+
+
+ -
+
+
-
+
+
+ 仅显示已停用
+
+
+
+ -
+
+
+ 仅显示已启用
+
+
+
+ -
+
+
+ 第三方
+
+
+
+ -
+
+
+ 系统
+
+
+
+
+
+ -
+
+
-
+
+
+
+ 30
+ 30
+
+
+
+
+ 30
+ 30
+
+
+
+ QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
+QPushButton:hover{background-color:rgba(255,255,255,0.7);}
+QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
+
+
+
+
+
+
+ :/ico/image/ico/arrow-left-line.svg:/ico/image/ico/arrow-left-line.svg
+
+
+
+ 18
+ 18
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 30
+
+
+
+
+ 16777215
+ 30
+
+
+
+ QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
+QPushButton:hover{background-color:rgba(255,255,255,0.7);}
+QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
+
+
+
+
+
+
+ :/ico/image/ico/refresh-line.svg:/ico/image/ico/refresh-line.svg
+
+
+
+ 18
+ 18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QtAdb/sonPages/apps/sp_permissiongroups.cpp b/QtAdb/sonPages/apps/sp_permissiongroups.cpp
new file mode 100644
index 0000000..60d347f
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_permissiongroups.cpp
@@ -0,0 +1,73 @@
+#include "sp_permissiongroups.h"
+#include "ui_sp_permissiongroups.h"
+
+sp_permissionGroups::sp_permissionGroups(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::sp_permissionGroups)
+{
+ ui->setupUi(this);
+ setParent(parent);
+
+ ui->progressBar->hide();
+ ui->listView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+
+ thread = new adbThread();
+ connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
+
+ connect(thread,SIGNAL(signal_output(QString)),this,SLOT(refresh_tableView(QString)));
+
+ QGraphicsDropShadowEffect *shadowEffect_back_to_basePage = new QGraphicsDropShadowEffect(this);
+ QGraphicsDropShadowEffect *shadowEffect_refreshBtn = new QGraphicsDropShadowEffect(this);
+
+ shadowEffect_back_to_basePage->setOffset(0,0);
+ shadowEffect_back_to_basePage->setColor(Qt::gray);
+ shadowEffect_back_to_basePage->setBlurRadius(5);
+
+ shadowEffect_refreshBtn->setOffset(0,0);
+ shadowEffect_refreshBtn->setColor(Qt::gray);
+ shadowEffect_refreshBtn->setBlurRadius(5);
+
+ ui->back_to_basePage->setGraphicsEffect(shadowEffect_back_to_basePage);
+ ui->refreshBtn->setGraphicsEffect(shadowEffect_refreshBtn);
+}
+
+sp_permissionGroups::~sp_permissionGroups()
+{
+ delete ui;
+}
+
+void sp_permissionGroups::on_refreshBtn_clicked()
+{
+ thread->initThread("adb shell pm list permission-groups",dev,"#PERMISSIONGROUPS#");
+ ui->progressBar->setVisible(true);
+ thread->start();
+}
+
+void sp_permissionGroups::refresh_tableView(QString s)
+{
+ QStandardItemModel* emptyModel = new QStandardItemModel(this);
+ ui->listView->setModel(emptyModel);
+ //thread->exit();
+ //qDebug() << "before";
+ QStringList permissionList = explainer->explainPermissionGroups(s);
+ //qDebug() << "after";
+ QStandardItemModel* model = new QStandardItemModel(this);
+ if(!permissionList.isEmpty())
+ {
+ for(int i = 0; i < permissionList.count(); i++)
+ {
+ //qDebug() << "permissionList.count() = " << permissionList.count() <<"\nbefore index out of range: \n i = " << i << "\n permissionList[i] = "<< permissionList[i];
+ model->setItem(i,0,new QStandardItem(permissionList[i]));
+ }
+ ui->listView->setModel(model);
+ this->update();
+ }
+ ui->progressBar->setVisible(false);
+ delete emptyModel;
+}
+
+void sp_permissionGroups::setDev(device device)
+{
+ dev = device;
+ on_refreshBtn_clicked();
+}
diff --git a/QtAdb/sonPages/apps/sp_permissiongroups.h b/QtAdb/sonPages/apps/sp_permissiongroups.h
new file mode 100644
index 0000000..203461f
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_permissiongroups.h
@@ -0,0 +1,37 @@
+#ifndef SP_PERMISSIONGROUPS_H
+#define SP_PERMISSIONGROUPS_H
+
+#include
+#include
+#include
+//#include
+#include "../../threads/adbthread.h"
+
+namespace Ui {
+class sp_permissionGroups;
+}
+
+class sp_permissionGroups : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit sp_permissionGroups(QWidget *parent = nullptr);
+ ~sp_permissionGroups();
+
+ device dev;
+ void setDev(device dev);
+
+private slots:
+ void on_refreshBtn_clicked();
+
+public slots:
+ void refresh_tableView(QString);
+
+private:
+ Ui::sp_permissionGroups *ui;
+ adbThread *thread;
+ textExplainer *explainer;
+};
+
+#endif // SP_PERMISSIONGROUPS_H
diff --git a/QtAdb/sonPages/apps/sp_permissiongroups.ui b/QtAdb/sonPages/apps/sp_permissiongroups.ui
new file mode 100644
index 0000000..e727c89
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_permissiongroups.ui
@@ -0,0 +1,225 @@
+
+
+ sp_permissionGroups
+
+
+
+ 0
+ 0
+ 635
+ 534
+
+
+
+ Form
+
+
+ -
+
+
+ border-radius: 4px;
+background-color: rgba(255, 255, 255, 0);
+border:0px solid #BDBDBD;
+
+
+
+ 11
+
+
+ 11
+
+
-
+
+
+ 14
+
+
-
+
+
+ 14
+
+
-
+
+
+
+ 40
+ 40
+
+
+
+
+ 40
+ 40
+
+
+
+ border-radius: 4px;
+border:0px solid #BDBDBD;
+image: url(:/ico/image/ico/about/information-line.svg);
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 50
+
+
+
+
+ 16777215
+ 50
+
+
+
+
+ 18
+ true
+
+
+
+ border-radius: 4px;
+border:0px solid #BDBDBD;
+
+
+ 已知权限组
+
+
+
+
+
+ -
+
+
+ QProgressBar{
+ font:9pt;
+ border-radius:4px;
+ text-align:center;
+ /*border:1px solid #E8EDF2;*/
+ border:0px solid #E8EDF2;
+ background-color: qlineargradient(x1:0,y1:1,x1:1,y1:0,stop:0 #11998e, stop:1 #38ef7d);
+}
+QProgressBar:chunk{
+ border-radius:4px;
+ background-color:rgba(255,255,255,0.2);
+}
+
+
+
+ 0
+
+
+ -1
+
+
+ true
+
+
+
+ -
+
+
+ true
+
+
+
+ MiSans Medium
+
+
+
+
+ -
+
+
-
+
+
+
+ 30
+ 30
+
+
+
+
+ 30
+ 30
+
+
+
+ QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
+QPushButton:hover{background-color:rgba(255,255,255,0.7);}
+QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
+
+
+
+
+
+
+ :/ico/image/ico/arrow-left-line.svg:/ico/image/ico/arrow-left-line.svg
+
+
+
+ 18
+ 18
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 30
+
+
+
+
+ 16777215
+ 30
+
+
+
+ QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
+QPushButton:hover{background-color:rgba(255,255,255,0.7);}
+QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
+
+
+
+
+
+
+ :/ico/image/ico/refresh-line.svg:/ico/image/ico/refresh-line.svg
+
+
+
+ 18
+ 18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QtAdb/sonPages/apps/sp_permissions.cpp b/QtAdb/sonPages/apps/sp_permissions.cpp
new file mode 100644
index 0000000..da00784
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_permissions.cpp
@@ -0,0 +1,381 @@
+#include "sp_permissions.h"
+#include "ui_sp_permissions.h"
+
+sp_permissions::sp_permissions(QWidget *parent) :
+ QWidget(parent),
+ ui(new Ui::sp_permissions)
+{
+ ui->setupUi(this);
+ pa = parent;
+
+ ui->progressBar->hide();
+ ui->tableView->setEditTriggers(QAbstractItemView::NoEditTriggers);
+
+ thread = new adbThread();
+ connect(this->ui->back_to_basePage,SIGNAL(clicked()),parent,SLOT(slot_destroySonPage()));
+
+
+ connect(thread,SIGNAL(signal_output(QString)),this,SLOT(refresh_tableView(QString)));
+
+ QGraphicsDropShadowEffect *shadowEffect_back_to_basePage = new QGraphicsDropShadowEffect(this);
+ QGraphicsDropShadowEffect *shadowEffect_refreshBtn = new QGraphicsDropShadowEffect(this);
+ QGraphicsDropShadowEffect *shadowEffect_settingsBtn = new QGraphicsDropShadowEffect(this);
+ QGraphicsDropShadowEffect *shadowEffect_openBtn = new QGraphicsDropShadowEffect(this);
+
+ shadowEffect_back_to_basePage->setOffset(0,0);
+ shadowEffect_back_to_basePage->setColor(Qt::gray);
+ shadowEffect_back_to_basePage->setBlurRadius(5);
+
+ shadowEffect_refreshBtn->setOffset(0,0);
+ shadowEffect_refreshBtn->setColor(Qt::gray);
+ shadowEffect_refreshBtn->setBlurRadius(5);
+
+ shadowEffect_settingsBtn->setOffset(0,0);
+ shadowEffect_settingsBtn->setColor(Qt::green);
+ shadowEffect_settingsBtn->setBlurRadius(5);
+
+ shadowEffect_openBtn->setOffset(0,0);
+ shadowEffect_openBtn->setColor(Qt::gray);
+ shadowEffect_openBtn->setBlurRadius(5);
+
+
+ ui->back_to_basePage->setGraphicsEffect(shadowEffect_back_to_basePage);
+ ui->refreshBtn->setGraphicsEffect(shadowEffect_refreshBtn);
+ ui->back_to_basePage_2->setGraphicsEffect(shadowEffect_settingsBtn);
+ ui->open_another_window->setGraphicsEffect(shadowEffect_openBtn);
+
+}
+
+sp_permissions::~sp_permissions()
+{
+ delete ui;
+}
+
+void sp_permissions::on_back_to_basePage_2_clicked()
+{
+ arg = "";
+ arg_g = false;
+ arg_f = false;
+ arg_s = false;
+ arg_d = false;
+ arg_u = false;
+ settings = new QDialog();
+ group = new QButtonGroup(settings);
+
+ btn_g = new QRadioButton();
+ btn_f = new QRadioButton();
+ btn_s = new QRadioButton();
+ btn_d = new QRadioButton();
+ btn_u = new QRadioButton();
+ closeBtn = new QPushButton();
+
+ btn_g->setText("【高级】按组进行整理");
+ btn_f->setText("【高级】输出所有信息");
+ btn_s->setText("简短摘要(推荐)");
+ btn_d->setText("仅列出危险权限");
+ btn_u->setText("仅列出用户将看到的权限");
+ closeBtn->setText("确定");
+
+ btn_g->autoExclusive();
+ btn_f->autoExclusive();
+ btn_s->autoExclusive();
+ btn_d->autoExclusive();
+ btn_u->autoExclusive();
+
+ QVBoxLayout *layout = new QVBoxLayout();
+
+ settings->setLayout(layout);
+ group->addButton(btn_g);
+ group->addButton(btn_f);
+ group->addButton(btn_s);
+ group->addButton(btn_d);
+ group->addButton(btn_u);
+ layout->addWidget(btn_g);
+ layout->addWidget(btn_f);
+ layout->addWidget(btn_s);
+ layout->addWidget(btn_d);
+ layout->addWidget(btn_u);
+ layout->addWidget(closeBtn);
+ settings->setStyleSheet("background-color:white;border:0px solid white;border-radius:4px;");
+
+ connect(btn_g, SIGNAL(clicked()), this,SLOT(setArg()));
+ connect(btn_f, SIGNAL(clicked()), this,SLOT(setArg()));
+ connect(btn_s, SIGNAL(clicked()), this,SLOT(setArg()));
+ connect(btn_d, SIGNAL(clicked()), this,SLOT(setArg()));
+ connect(btn_u, SIGNAL(clicked()), this,SLOT(setArg()));
+
+ connect(closeBtn, SIGNAL(clicked()), this,SLOT(setArg()));
+ connect(closeBtn, SIGNAL(clicked()), settings,SLOT(close()));
+ connect(closeBtn, SIGNAL(clicked()), this,SLOT(on_refreshBtn_clicked()));
+
+ settings->setWindowTitle("选项");
+ settings->move(ui->back_to_basePage_2->geometry().x(),ui->back_to_basePage_2->geometry().y());
+ settings->exec();
+}
+
+void sp_permissions::setArg()
+{
+ //qDebug() << "\narg_g = " << arg_g << "arg_f = " << arg_f << "arg_s = " << arg_s << "arg_d = " << arg_d << "arg_u = " << arg_u;
+ if(btn_g->isChecked())
+ {
+ //qDebug() << "g";
+ arg = "-g";
+ arg_g = true;
+ arg_f = false;
+ arg_s = false;
+ arg_d = false;
+ arg_u = false;
+ }
+ else if(btn_f->isChecked())
+ {
+ //qDebug() << "f";
+ arg = "-f";
+ arg_g = false;
+ arg_f = true;
+ arg_s = false;
+ arg_d = false;
+ arg_u = false;
+ }
+ else if(btn_s->isChecked())
+ {
+ //qDebug() << "s";
+ arg = "-s";
+ arg_g = false;
+ arg_f = false;
+ arg_s = true;
+ arg_d = false;
+ arg_u = false;
+ }
+ else if(btn_d->isChecked())
+ {
+ //qDebug() << "d";
+ arg = "-d";
+ arg_g = false;
+ arg_f = false;
+ arg_s = false;
+ arg_d = true;
+ arg_u = false;
+ }
+ else if(btn_u->isChecked())
+ {
+ //qDebug() << "u";
+ arg = "-u";
+ arg_g = false;
+ arg_f = false;
+ arg_s = false;
+ arg_d = false;
+ arg_u = true;
+ }
+ else
+ {
+ //qDebug() << "g";
+ arg = "";
+ arg_g = false;
+ arg_f = false;
+ arg_s = false;
+ arg_d = false;
+ arg_u = false;
+ }
+
+ //qDebug() << "clicked,arg = " << arg;
+}
+
+void sp_permissions::setDev(device device)
+{
+ dev = device;
+ on_refreshBtn_clicked();
+}
+
+void sp_permissions::on_refreshBtn_clicked()
+{
+ QString cmd = "adb shell pm list permissions";
+ thread->initThread(cmd.append(" ").append(arg) , dev, "#PERMISSIONGROUPS#");
+ ui->progressBar->setVisible(true);
+ thread->start();
+}
+
+void sp_permissions::refresh_tableView(QString s)
+{
+ if(arg_g)
+ {
+ //arg = "-g";
+ //qDebug() << "**************#01# formating data*****************";
+ //qDebug() << "arg = " << arg;
+ //qDebug() << "###################### s = \n" << s;
+ QStandardItemModel* emptyModel = new QStandardItemModel(this);
+ ui->tableView->setModel(emptyModel);
+ QStringList groupList = s.split("group:");
+ //qDebug() << "###################### groupList = \n" << groupList;
+ QList groups;
+
+
+
+ //qDebug() << "###################### split####################";
+ for(int i = 0 , j = i; i < groupList.count(); i++)
+ {
+ QStringList tmpList;
+ tmpList = groupList[i].split("\n");
+ groups.append(tmpList);
+ j++;
+ }
+
+ //qDebug() << "###################### groups = \n" << groups;
+
+ //qDebug() << "**************#02# adding title*****************";
+ QStandardItemModel* model = new QStandardItemModel(this);
+
+ if(!groupList.isEmpty())
+ {
+ for(int i = 1; i < groups.count();i++)
+ {
+ //qDebug() << "**************header data***************** =" << groups[i][0];
+ model->setColumnCount(groups.count());
+ model->setHeaderData(i-1,Qt::Horizontal, groups[i][0]);
+
+ for(int j = 1; j< groups[i].count();j++)
+ {
+ model->setItem(j-1,i-1,new QStandardItem(groups[i][j].simplified().simplified()));
+ }
+ }
+
+ ui->tableView->horizontalHeader()->setDefaultSectionSize(150);
+ ui->tableView->setModel(model);
+ current_model = model;
+
+ this->update();
+ }
+
+ ui->progressBar->setVisible(false);
+ delete emptyModel;
+ }
+ else if(arg_f)
+ {
+ //arg = "-g";
+ //qDebug() << "**************#01# formating data*****************";
+ //qDebug() << "arg = " << arg;
+ //qDebug() << "###################### s = \n" << s;
+ QStandardItemModel* emptyModel = new QStandardItemModel(this);
+ ui->tableView->setModel(emptyModel);
+ QStringList groupList = s.split("+");
+ //qDebug() << "###################### groupList = \n" << groupList;
+ QList groups;
+
+
+
+ //qDebug() << "###################### split####################";
+ for(int i = 0 , j = i; i < groupList.count(); i++)
+ {
+ QStringList tmpList;
+ tmpList = groupList[i].split("\n");
+ groups.append(tmpList);
+ j++;
+ }
+
+ //qDebug() << "###################### groups = \n" << groups;
+
+ //qDebug() << "**************#02# adding title*****************";
+ QStandardItemModel* model = new QStandardItemModel(this);
+
+ if(!groupList.isEmpty())
+ {
+ model->setColumnCount(5);
+ model->setHeaderData(0,Qt::Horizontal, "permission");
+ model->setHeaderData(1,Qt::Horizontal, "package");
+ model->setHeaderData(2,Qt::Horizontal, "label");
+ model->setHeaderData(3,Qt::Horizontal, "description");
+ model->setHeaderData(4,Qt::Horizontal, "protectionLevel");
+
+ for(int i = 1; i < groups.count();i++)
+ {
+ //qDebug() << "**************header data***************** =" << groups[i][0];
+
+ for(int j = 0; j< groups[i].count() && j <= 5;j++)
+ {
+ QStringList tempList;
+ tempList = groups[i][j].simplified().simplified().split(":");
+ //qDebug() << "********************" << tempList << tempList.count();;
+
+ if(tempList.count() >= 2)
+ {
+ //qDebug() << "来做死";
+ model->setItem(i-1,j,new QStandardItem(tempList[1]));
+ }
+ }
+ }
+
+ ui->tableView->horizontalHeader()->setDefaultSectionSize(150);
+ ui->tableView->setModel(model);
+ current_model = model;
+
+ this->update();
+ }
+
+ ui->progressBar->setVisible(false);
+ delete emptyModel;
+ //arg = "-f";
+ }
+ else if(arg_s)
+ {
+ //arg = "-s";
+ generalMode(s);
+ }
+ else if(arg_d)
+ {
+ generalMode(s);
+ }
+ else if(arg_u)
+ {
+ //arg = "-u";
+ generalMode(s);
+ }
+ else
+ {
+ //arg = "";
+ generalMode(s);
+ }
+}
+
+void sp_permissions::on_open_another_window_clicked()
+{
+ QWidget *wgt = new QWidget();
+ QVBoxLayout *layout = new QVBoxLayout();
+ QTableView *view = new QTableView();
+ view->setModel(current_model);
+ wgt->setLayout(layout);
+ layout->addWidget(view);
+ wgt ->showMaximized();
+}
+
+void sp_permissions::generalMode(QString s)
+{
+ QStandardItemModel* emptyModel = new QStandardItemModel(this);
+ ui->tableView->setModel(emptyModel);
+ QStringList permissionList = s.split("\n");
+ QStandardItemModel* model = new QStandardItemModel(this);
+
+ if(!permissionList.isEmpty())
+ {
+ model->setHeaderData(0,Qt::Horizontal, permissionList[0]);
+ for(int i = 2,j = i; i < permissionList.count();i++)
+ {
+ //qDebug() << "IT IS:" << permissionList[i];
+ if(permissionList[i] == "" || permissionList[i] == "\r")
+ {
+ //qDebug() << "1";
+ }
+ else
+ {
+ //qDebug() << "2";
+ model->setItem(j-2,0,new QStandardItem(permissionList[i].simplified().simplified()));
+ j++;
+ }
+ }
+ ui->tableView->horizontalHeader()->setDefaultSectionSize(pa->geometry().width() - 200);
+ ui->tableView->setModel(model);
+ current_model = model;
+ this->update();
+ }
+
+ ui->progressBar->setVisible(false);
+ delete emptyModel;
+}
diff --git a/QtAdb/sonPages/apps/sp_permissions.h b/QtAdb/sonPages/apps/sp_permissions.h
new file mode 100644
index 0000000..5a63a73
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_permissions.h
@@ -0,0 +1,66 @@
+#ifndef SP_PERMISSIONS_H
+#define SP_PERMISSIONS_H
+
+#include
+#include
+#include
+#include
+#include
+#include
+#include "../../textexplainer.h"
+#include "../../threads/adbthread.h"
+
+namespace Ui {
+class sp_permissions;
+}
+
+class sp_permissions : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit sp_permissions(QWidget *parent = nullptr);
+ ~sp_permissions();
+
+ device dev;
+ void setDev(device dev);
+ QWidget *pa;
+
+private slots:
+ void on_back_to_basePage_2_clicked();
+ void setArg();
+
+ void on_refreshBtn_clicked();
+
+ void on_open_another_window_clicked();
+
+public slots:
+ void refresh_tableView(QString);
+
+private:
+ Ui::sp_permissions *ui;
+ QString arg = "";
+
+ QStandardItemModel* current_model;
+ adbThread *thread;
+ textExplainer *explainer;
+
+ bool arg_g = false;
+ bool arg_f = false;
+ bool arg_s = false;
+ bool arg_d = false;
+ bool arg_u = false;
+
+ QDialog *settings;
+ QButtonGroup *group;
+ QRadioButton *btn_g;
+ QRadioButton *btn_f;
+ QRadioButton *btn_s;
+ QRadioButton *btn_d;
+ QRadioButton *btn_u;
+ QPushButton *closeBtn;
+
+ void generalMode(QString s);
+};
+
+#endif // SP_PERMISSIONS_H
diff --git a/QtAdb/sonPages/apps/sp_permissions.ui b/QtAdb/sonPages/apps/sp_permissions.ui
new file mode 100644
index 0000000..b1d1fe8
--- /dev/null
+++ b/QtAdb/sonPages/apps/sp_permissions.ui
@@ -0,0 +1,291 @@
+
+
+ sp_permissions
+
+
+
+ 0
+ 0
+ 648
+ 534
+
+
+
+ Form
+
+
+ -
+
+
+ border-radius: 4px;
+background-color: rgba(255, 255, 255, 0);
+border:0px solid #BDBDBD;
+
+
+
+ 11
+
+
+ 11
+
+
-
+
+
+ 14
+
+
-
+
+
+ 14
+
+
-
+
+
+
+ 40
+ 40
+
+
+
+
+ 40
+ 40
+
+
+
+ border-radius: 4px;
+border:0px solid #BDBDBD;
+image: url(:/ico/image/ico/about/information-line.svg);
+
+
+
+
+
+
+ -
+
+
+
+ 0
+ 50
+
+
+
+
+ 16777215
+ 50
+
+
+
+
+ MiSans Medium
+ 18
+ true
+
+
+
+ border-radius: 4px;
+border:0px solid #BDBDBD;
+
+
+ 权限
+
+
+
+ -
+
+
+
+ 30
+ 30
+
+
+
+
+ 50
+ 50
+
+
+
+ QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
+QPushButton:hover{background-color:rgba(255,255,255,0.7);}
+QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
+
+
+
+
+
+
+ :/ico/image/ico/share-box-line.svg:/ico/image/ico/share-box-line.svg
+
+
+
+ 18
+ 18
+
+
+
+
+
+
+ -
+
+
+ QProgressBar{
+ font:9pt;
+ border-radius:4px;
+ text-align:center;
+ /*border:1px solid #E8EDF2;*/
+ border:0px solid #E8EDF2;
+ background-color: qlineargradient(x1:0,y1:1,x1:1,y1:0,stop:0 #11998e, stop:1 #38ef7d);
+}
+QProgressBar:chunk{
+ border-radius:4px;
+ background-color:rgba(255,255,255,0.2);
+}
+
+
+
+ 0
+
+
+ -1
+
+
+ true
+
+
+
+ -
+
+
+
+ MiSans Medium
+
+
+
+
+ -
+
+
-
+
+
+
+ 30
+ 30
+
+
+
+
+ 30
+ 30
+
+
+
+ QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
+QPushButton:hover{background-color:rgba(255,255,255,0.7);}
+QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
+
+
+
+
+
+
+ :/ico/image/ico/arrow-left-line.svg:/ico/image/ico/arrow-left-line.svg
+
+
+
+ 18
+ 18
+
+
+
+
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 30
+ 30
+
+
+
+
+ 16777215
+ 30
+
+
+
+ QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
+QPushButton:hover{background-color:rgba(255,255,255,0.7);}
+QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
+
+
+
+
+
+
+ :/ico/image/ico/refresh-line.svg:/ico/image/ico/refresh-line.svg
+
+
+
+ 18
+ 18
+
+
+
+
+ -
+
+
+
+ 30
+ 30
+
+
+
+
+ 30
+ 30
+
+
+
+ QPushButton{background-color:rgba(255,255,255,0.9);border-radius:4px;border:0px;}
+QPushButton:hover{background-color:rgba(255,255,255,0.7);}
+QPushButton:pressed{background-color:rgba(255,255,255,0.6);}
+
+
+
+
+
+
+ :/ico/image/ico/btnEmulator/settings-line.svg:/ico/image/ico/btnEmulator/settings-line.svg
+
+
+
+ 18
+ 18
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QtAdb/sonPages/apps/tp_packageprofile.cpp b/QtAdb/sonPages/apps/tp_packageprofile.cpp
new file mode 100644
index 0000000..4f8510d
--- /dev/null
+++ b/QtAdb/sonPages/apps/tp_packageprofile.cpp
@@ -0,0 +1,94 @@
+#include "tp_packageprofile.h"
+#include "ui_tp_packageprofile.h"
+
+tp_packageProfile::tp_packageProfile(QWidget *parent ,QString packageName) :
+ QWidget(parent),
+ ui(new Ui::tp_packageProfile)
+{
+ ui->setupUi(this);
+
+ this->setWindowTitle("软件包 ' "+packageName+" '");
+ name = packageName;
+ explainer = new textExplainer();
+ process = new adbProcess();
+
+ thread_file = new adbThread();
+
+
+ thread_installer = new adbThread();
+
+ ui->lineEdit_name->setText(name);
+ ui->lineEdit_name->isReadOnly();
+ ui->lineEdit_installer->isReadOnly();
+ ui->lineEdit_path->isReadOnly();
+}
+
+tp_packageProfile::~tp_packageProfile()
+{
+ delete ui;
+}
+
+void tp_packageProfile::set_file(QString s)
+{
+ ui->lineEdit_path->setText(explainer->get_words_after(s,"package:"));
+}
+
+void tp_packageProfile::set_installer(QString s)
+{
+ ui->lineEdit_installer->setText(explainer->get_words_after(s,"installer="));
+}
+
+void tp_packageProfile::on_uninstall_clicked()
+{
+ QString cmd = "adb shell pm uninstall ";
+ cmd.append(name);
+ process->run(cmd,dev);
+
+ emit packageChanged();
+ this->close();
+}
+
+
+void tp_packageProfile::on_clear_clicked()
+{
+ QString cmd = "adb shell pm clear ";
+ cmd.append(name);
+ process->run(cmd,dev);
+}
+
+
+void tp_packageProfile::on_enable_clicked()
+{
+ QString cmd = "adb shell pm enable ";
+ cmd.append(name);
+ process->run(cmd,dev);
+
+ emit packageChanged();
+}
+
+
+void tp_packageProfile::on_disable_clicked()
+{
+ QString cmd = "adb shell pm disable ";
+ cmd.append(name);
+ process->run(cmd,dev);
+
+ emit packageChanged();
+}
+
+void tp_packageProfile::setDevice(device d)
+{
+ dev = d;
+
+ QString command_file = "adb shell pm list packages -f ";
+ command_file.append(name);
+ thread_file->initThread(command_file , dev);
+ connect(thread_file,SIGNAL(signal_output(QString)),this,SLOT(set_file(QString)));
+ thread_file->start();
+
+ QString command_installer = "adb shell pm list packages -i ";
+ command_installer.append(name);
+ thread_installer->initThread(command_installer , dev);
+ connect(thread_installer,SIGNAL(signal_output(QString)),this,SLOT(set_installer(QString)));
+ thread_installer->start();
+}
diff --git a/QtAdb/sonPages/apps/tp_packageprofile.h b/QtAdb/sonPages/apps/tp_packageprofile.h
new file mode 100644
index 0000000..64ff360
--- /dev/null
+++ b/QtAdb/sonPages/apps/tp_packageprofile.h
@@ -0,0 +1,49 @@
+#ifndef TP_PACKAGEPROFILE_H
+#define TP_PACKAGEPROFILE_H
+
+#include
+#include "../../textexplainer.h"
+#include "../../adbprocess.h"
+#include "../../threads/adbthread.h"
+
+namespace Ui {
+class tp_packageProfile;
+}
+
+class tp_packageProfile : public QWidget
+{
+ Q_OBJECT
+
+public:
+ explicit tp_packageProfile(QWidget *parent = nullptr, QString packageName = "");
+ ~tp_packageProfile();
+
+ QString name = "";
+ device dev;
+ void setDevice(device d);
+
+private:
+ Ui::tp_packageProfile *ui;
+
+ adbThread * thread_file;
+ adbThread * thread_installer;
+ adbThread * thread_btn;
+ adbProcess * process;
+ textExplainer *explainer;
+signals:
+ void packageChanged();
+ /*
+ void lock();
+ void unlock();*/
+public slots:
+ void set_file(QString);
+ void set_installer(QString);
+
+private slots:
+ void on_uninstall_clicked();
+ void on_clear_clicked();
+ void on_enable_clicked();
+ void on_disable_clicked();
+};
+
+#endif // TP_PACKAGEPROFILE_H
diff --git a/QtAdb/sonPages/apps/tp_packageprofile.ui b/QtAdb/sonPages/apps/tp_packageprofile.ui
new file mode 100644
index 0000000..8921979
--- /dev/null
+++ b/QtAdb/sonPages/apps/tp_packageprofile.ui
@@ -0,0 +1,182 @@
+
+
+ tp_packageProfile
+
+
+
+ 0
+ 0
+ 767
+ 206
+
+
+
+
+ MiSans Medium
+
+
+
+ Form
+
+
+ -
+
+
+ 5
+
+
-
+
+
-
+
+
-
+
+
+
+ MiSans Medium
+
+
+
+ 包名
+
+
+
+ -
+
+
+
+ MiSans Medium
+
+
+
+ 关联文件
+
+
+
+ -
+
+
+
+ MiSans Medium
+
+
+
+ 安装者
+
+
+
+
+
+ -
+
+
-
+
+
+
+ MiSans Medium
+
+
+
+ false
+
+
+ true
+
+
+
+ -
+
+
+
+ MiSans Medium
+
+
+
+ false
+
+
+ true
+
+
+
+ -
+
+
+
+ MiSans Medium
+
+
+
+ false
+
+
+ true
+
+
+
+
+
+
+
+ -
+
+
-
+
+
+
+ MiSans Medium
+
+
+
+ 卸载
+
+
+
+ -
+
+
+
+ MiSans Medium
+
+
+
+ 清除所有数据
+
+
+
+
+
+ -
+
+
-
+
+
+
+ MiSans Medium
+
+
+
+ 启用
+
+
+
+ -
+
+
+
+ MiSans Medium
+
+
+
+ 停用
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/QtAdb/sonPages/sonpagemanager.cpp b/QtAdb/sonPages/sonpagemanager.cpp
index e56a736..8b9a616 100644
--- a/QtAdb/sonPages/sonpagemanager.cpp
+++ b/QtAdb/sonPages/sonpagemanager.cpp
@@ -201,7 +201,7 @@ sp_activator* sonPageManager::createSonPageFor_activator(QWidget *parent, int ke
return NULL;
}
-sp_installer* sonPageManager::createSonPageFor_apps(QWidget *parent, int key, device dev)
+QWidget* sonPageManager::createSonPageFor_apps(QWidget *parent, int key, device dev)
{
switch(key +1)
{
@@ -210,6 +210,37 @@ sp_installer* sonPageManager::createSonPageFor_apps(QWidget *parent, int key, de
sp_installer *page = new sp_installer(parent);
page->setDev(dev);
return page;
+ }
+ case 2:
+ {
+ sp_permissionGroups *page = new sp_permissionGroups(parent);
+ page->setDev(dev);
+ return page;
+ }
+ case 3:
+ {
+ sp_permissions *page = new sp_permissions(parent);
+ page->setDev(dev);
+ return page;
+ }
+ case 4:
+ {
+ sp_packages *page = new sp_packages(parent);
+ page->setDev(dev);
+ return page;
+ }
+ case 5:
+ {
+ qDebug() << "SPM.DEV = " << dev.model;
+ sp_features *page = new sp_features(parent);
+ page->setDev(dev);
+ return page;
+ }
+ case 6:
+ {
+ sp_libraries *page = new sp_libraries(parent);
+ page->setDev(dev);
+ return page;
}
break;
}
diff --git a/QtAdb/sonPages/sonpagemanager.h b/QtAdb/sonPages/sonpagemanager.h
index ec199a9..5ec4a65 100644
--- a/QtAdb/sonPages/sonpagemanager.h
+++ b/QtAdb/sonPages/sonpagemanager.h
@@ -7,6 +7,11 @@
#include "devInfo/sp_dpichanger.h"
#include "activator/sp_activator.h"
#include "apps/sp_installer.h"
+#include "apps/sp_permissiongroups.h"
+#include "apps/sp_permissions.h"
+#include "apps/sp_packages.h"
+#include "apps/sp_features.h"
+#include "apps/sp_libraries.h"
#include "devControl/sp_devcontrol_power.h"
#include "devControl/btnemulator.h"
#include "recovery/sp_recovery.h"
@@ -29,7 +34,7 @@ private:
sp_dpiChanger* createSonPageFor_devInfo(QWidget *parent, int key, device dev);
sp_activator* createSonPageFor_activator(QWidget *parent, int key, device dev);
- sp_installer* createSonPageFor_apps(QWidget *parent, int key, device dev);
+ QWidget* createSonPageFor_apps(QWidget *parent, int key, device dev);
QWidget* createSonPageFor_devControl(QWidget *parent, int key, device dev);
QWidget* createSonPageFor_recovery(QWidget *parent, int key, device dev);
QWidget* createSonPageFor_advanced(QWidget *parent, int key, device dev);
diff --git a/QtAdb/textexplainer.cpp b/QtAdb/textexplainer.cpp
index 9840869..c162ef3 100644
--- a/QtAdb/textexplainer.cpp
+++ b/QtAdb/textexplainer.cpp
@@ -72,7 +72,8 @@ QList textExplainer::getDevList_windows(QString tmpStr)
{
tmpList[i] = tmpList[i].simplified();
- if (tmpList[i] == "")
+ //qDebug() << "tmplist[" << i << "] =" << tmpList[i];
+ if (tmpList[i] == "" || tmpList[i] == "\r")
{
continue;
}
@@ -83,13 +84,26 @@ QList textExplainer::getDevList_windows(QString tmpStr)
dev.addr = tmp[0];
dev.state = setState(tmp[1]);
- dev.device_product = tmp[2];
- dev.model = tmp[3];
- dev.device_debug = tmp[4];
- dev.transport_id = tmp[5];
- devList.append(dev);
+ //qDebug() << dev.state;
+ //qDebug() << "*tmplist[" << i << "] =" << tmpList[i];
+ if(dev.state == "[未响应]")
+ {
+ dev.transport_id = tmp[2];
+ devList.append(dev);
+ continue;
+ }
+ else
+ {
+ dev.device_product = tmp[2];
+ dev.model = tmp[3];
+ dev.device_debug = tmp[4];
+ dev.transport_id = tmp[5];
+ devList.append(dev);
+ }
+ //qDebug() << "**tmplist[" << i << "] =" << tmpList[i];
}
return devList;
+ //qDebug() << "get dev list success!";
}
QString textExplainer::get_words_after(QString str , QString key)
@@ -261,3 +275,17 @@ void textExplainer::slot_explain_cpu_output(QString s)
emit textExplained(str);
}
*/
+
+QStringList textExplainer::explainPermissionGroups(QString s)
+{
+ QStringList list;
+ list = s.split("\n");
+ /*
+ for(int i = 0; i<=list.count(); i--)
+ {
+ qDebug() << "/+*********\nlist.count() = " << list.count() <<"\nbefore index out of range: \n i = " << i << "\n list[i] = "<< list[i] << "\n ***************+/";
+ QString tmpStr = get_words_after(list[i],"permission group:");
+ list[i] = tmpStr;
+ }*/
+ return list;
+}
diff --git a/QtAdb/textexplainer.h b/QtAdb/textexplainer.h
index 3564f79..6918b05 100644
--- a/QtAdb/textexplainer.h
+++ b/QtAdb/textexplainer.h
@@ -31,14 +31,18 @@ public:
bool explainError(QString err);
bool explainOutput(QString op, bool thread);
+
QMessageBox *msgBox;
bool thread = false;
+ QStringList explainPermissionGroups(QString s);
+
private:
QString setState(QString state);
signals:
void textExplained(QString);
+ void permissionGroupsExplained(QStringList);
public slots:
void slot_get_words_after(QString s, QString k);
diff --git a/QtAdb/threads/adbthread.cpp b/QtAdb/threads/adbthread.cpp
index 6446b1c..3ee4956 100644
--- a/QtAdb/threads/adbthread.cpp
+++ b/QtAdb/threads/adbthread.cpp
@@ -2,7 +2,7 @@
adbThread::adbThread(QObject* parent)
{
-
+ setParent(parent);
}
void adbThread::initThread(QString cmd, device d)
@@ -14,8 +14,10 @@ void adbThread::initThread(QString cmd, device d)
void adbThread::initThread(QString cmd, device d, QString key)
{
+ qDebug() << "d = " << d.model <run(command, dev);
+ emit signal_output(output);
+ exit();
+ }
+
else if(explainKey == "#INSTALL#")
{
connect(process,SIGNAL(outputGet(QString)),this,SLOT(result(QString)));
diff --git a/README.md b/README.md
index 37b61ad..1f4139f 100644
--- a/README.md
+++ b/README.md
@@ -52,10 +52,21 @@ Android 系统的可玩性在 adb 的加成下变得更加的丰富,由此涌
- 媒体控制:播放音乐、停止播放、上一曲、继续、暂停、下一曲
- 其他指令:亮度 - 、亮度 + 、系统休眠、点亮屏幕、挂断电话
- 拉起系统应用:设置、通讯录、拨号、浏览器、音乐、日历、计算器
+
- 命令行:
- 运行自定义的 adb 命令
- 直接在 adb 环境中打开命令行窗口
+
+### 📦软件包管理器:
+ - 安装应用
+ - 列出已知的权限、权限组
+ - 列出软件包
+ - 卸载、停用、启用、清除数据
+ - 获取软件包包名、安装者、关联文件等信息
+
+ - 列出系统的所有功能
+ - 列出当前设备支持的所有库
### 💣不稳定功能
@@ -67,7 +78,7 @@ Android 系统的可玩性在 adb 的加成下变得更加的丰富,由此涌
> *由于个人学业紧迫(**确实**考不上研了),饼中的内容添加将十分缓慢,可能在过年后,甚至再多一年后才能开始全力开发,请见谅!*
-- 完整的软件包管理器
+- ~~完整的软件包管理器~~
- 跨平台
- 完善网站
- 文件管理(~~都连上电脑了,为什么不直接用电脑的文件管理~~)