Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
c9a79bfe
Commit
c9a79bfe
authored
Nov 07, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #48 from jeffallen/no-run-as
Avoid use of run-as
parents
45408d3e
c8c2d23f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
13 deletions
+2
-13
device.dart
packages/flutter_tools/lib/src/device.dart
+2
-13
No files found.
packages/flutter_tools/lib/src/device.dart
View file @
c9a79bfe
...
...
@@ -688,16 +688,8 @@ class AndroidDevice extends Device {
return
false
;
}
String
_getDeviceDataPath
(
ApplicationPackage
app
)
{
return
'/data/data/
${app.id}
'
;
}
String
_getDeviceSha1Path
(
ApplicationPackage
app
)
{
return
'
${_getDeviceDataPath(app)}
/
${app.name}
.sha1'
;
}
String
_getDeviceBundlePath
(
ApplicationPackage
app
)
{
return
'
${_getDeviceDataPath(app)}
/dev.flx'
;
return
'/data/local/tmp/sky.
${app.id}
.sha1'
;
}
String
_getDeviceApkSha1
(
ApplicationPackage
app
)
{
...
...
@@ -743,7 +735,6 @@ class AndroidDevice extends Device {
print
(
'Installing
${app.name}
on device.'
);
runCheckedSync
(
adbCommandForDevice
([
'install'
,
'-r'
,
app
.
localPath
]));
runCheckedSync
(
adbCommandForDevice
([
'shell'
,
'run-as'
,
app
.
id
,
'chmod'
,
'777'
,
_getDeviceDataPath
(
app
)]));
runCheckedSync
(
adbCommandForDevice
([
'shell'
,
'echo'
,
'-n'
,
_getSourceSha1
(
app
),
'>'
,
_getDeviceSha1Path
(
app
)]));
return
true
;
}
...
...
@@ -764,13 +755,11 @@ class AndroidDevice extends Device {
_forwardObservatoryPort
();
String
deviceTmpPath
=
'/data/local/tmp/dev.flx'
;
String
deviceBundlePath
=
_getDeviceBundlePath
(
apk
);
runCheckedSync
(
adbCommandForDevice
([
'push'
,
bundlePath
,
deviceTmpPath
]));
runCheckedSync
(
adbCommandForDevice
([
'shell'
,
'mv'
,
deviceTmpPath
,
deviceBundlePath
]));
List
<
String
>
cmd
=
adbCommandForDevice
([
'shell'
,
'am'
,
'start'
,
'-a'
,
'android.intent.action.RUN'
,
'-d'
,
device
Bundle
Path
,
'-d'
,
device
Tmp
Path
,
]);
if
(
checked
)
cmd
.
addAll
([
'--ez'
,
'enable-checked-mode'
,
'true'
]);
...
...
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