Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
huangzhicong
/
SmartCanteen
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
4dd1e032
authored
Mar 19, 2020
by
pye52
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加daemon打包时自动签名的配置及证书,避免因为daemon没有签名而安装失败
parent
0df97158
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
4 deletions
+33
-4
app/build.gradle
+14
-0
app/src/main/java/com/bgycc/smartcanteen/utils/DangerousUtils.java
+5
-4
daemon/build.gradle
+14
-0
daemon/canteen.jks
+0
-0
No files found.
app/build.gradle
View file @
4dd1e032
...
...
@@ -15,6 +15,20 @@ android {
}
buildConfigField
"int"
,
"DaemonVersion"
,
String
.
valueOf
(
rootProject
.
ext
.
daemon_verson_code
)
}
signingConfigs
{
debug
{
keyAlias
'town'
keyPassword
'maxrocky'
storeFile
file
(
'canteen.jks'
)
storePassword
'maxrocky'
}
release
{
keyAlias
'town'
keyPassword
'maxrocky'
storeFile
file
(
'canteen.jks'
)
storePassword
'maxrocky'
}
}
buildTypes
{
debug
{
minifyEnabled
false
...
...
app/src/main/java/com/bgycc/smartcanteen/utils/DangerousUtils.java
View file @
4dd1e032
...
...
@@ -7,10 +7,10 @@ import android.os.PowerManager;
import
android.telephony.SmsManager
;
import
android.telephony.TelephonyManager
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
androidx.annotation.RequiresPermission
;
import
com.blankj.utilcode.util.LogUtils
;
import
com.blankj.utilcode.util.ShellUtils
;
import
com.blankj.utilcode.util.Utils
;
...
...
@@ -20,6 +20,7 @@ import java.util.List;
import
static
android
.
Manifest
.
permission
.
MODIFY_PHONE_STATE
;
import
static
android
.
Manifest
.
permission
.
SEND_SMS
;
import
static
android
.
content
.
ContentValues
.
TAG
;
/**
* <pre>
...
...
@@ -118,7 +119,7 @@ public class DangerousUtils {
&&
commandResult
.
successMsg
.
toLowerCase
().
contains
(
"success"
))
{
return
true
;
}
else
{
Log
.
e
(
"AppUtils"
,
"installAppSilent successMsg: "
+
commandResult
.
successMsg
+
Log
Utils
.
e
(
TAG
,
"installAppSilent successMsg: "
+
commandResult
.
successMsg
+
", errorMsg: "
+
commandResult
.
errorMsg
);
return
false
;
}
...
...
@@ -174,7 +175,7 @@ public class DangerousUtils {
&&
commandResult
.
successMsg
.
toLowerCase
().
contains
(
"success"
))
{
return
true
;
}
else
{
Log
.
e
(
"AppUtils"
,
"uninstallAppSilent successMsg: "
+
commandResult
.
successMsg
+
Log
Utils
.
e
(
TAG
,
"uninstallAppSilent successMsg: "
+
commandResult
.
successMsg
+
", errorMsg: "
+
commandResult
.
errorMsg
);
return
false
;
}
...
...
@@ -326,7 +327,7 @@ public class DangerousUtils {
setDataEnabledMethod
.
invoke
(
tm
,
enabled
);
return
true
;
}
catch
(
Exception
e
)
{
Log
.
e
(
"NetworkUtils"
,
"setMobileDataEnabled: "
,
e
);
Log
Utils
.
e
(
TAG
,
"setMobileDataEnabled: "
,
e
);
}
return
false
;
}
...
...
daemon/build.gradle
View file @
4dd1e032
...
...
@@ -13,6 +13,20 @@ android {
testInstrumentationRunner
"androidx.test.runner.AndroidJUnitRunner"
}
signingConfigs
{
debug
{
keyAlias
'town'
keyPassword
'maxrocky'
storeFile
file
(
'canteen.jks'
)
storePassword
'maxrocky'
}
release
{
keyAlias
'town'
keyPassword
'maxrocky'
storeFile
file
(
'canteen.jks'
)
storePassword
'maxrocky'
}
}
buildTypes
{
debug
{
minifyEnabled
false
...
...
daemon/canteen.jks
0 → 100644
View file @
4dd1e032
File added
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment