Closed
Bug 775708
Opened 13 years ago
Closed 13 years ago
A better mechanism of determining if you have root on device
Categories
(Testing :: Mozbase, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla17
People
(Reporter: onecyrenus, Assigned: onecyrenus)
References
Details
Attachments
(1 file)
Current method is to listFiles in /data/data to determine if we have root on the device.
I think we can do this using adb shell "id" command to get the guid / uid of the current user ?
Updated•13 years ago
|
Component: Mochitest → Mozbase
Updated•13 years ago
|
Attachment #643981 -
Attachment is patch: true
Attachment #643981 -
Flags: review?(jmaher)
Comment 1•13 years ago
|
||
The problem with the existing method is that /data/data is empty on B2G, so devicemanager never recognizes that we are running as root.
Comment 2•13 years ago
|
||
Comment on attachment 643981 [details] [diff] [review]
A patch that checks the guid / uid of the current user to determine if they are root on the device
Review of attachment 643981 [details] [diff] [review]:
-----------------------------------------------------------------
::: build/mobile/devicemanagerADB.py
@@ +808,5 @@
> + response = p.stdout.readline()
> + response = response.rstrip()
> + response = response.split(' ')
> + if (response[0].find('uid=0') < 0 or response[1].find('gid=0') < 0):
> + print "NOT running as root ", response[0].find('uid=0')
do we want to raise a DMError here?
Attachment #643981 -
Flags: review?(jmaher) → review+
Comment 3•13 years ago
|
||
posted to try, just in case
Comment 4•13 years ago
|
||
try ate my last submission, tried again: https://tbpl.mozilla.org/?tree=Try&rev=190945a1d0e7
Comment 5•13 years ago
|
||
Try run for 190945a1d0e7 is complete.
Detailed breakdown of the results available here:
https://tbpl.mozilla.org/?tree=Try&rev=190945a1d0e7
Results (out of 29 total builds):
exception: 8
success: 16
warnings: 4
failure: 1
Builds (or logs if builds failed) available at:
http://ftp.mozilla.org/pub/mozilla.org/firefox/try-builds/jgriffin@mozilla.com-190945a1d0e7
Comment 6•13 years ago
|
||
Assignee: nobody → dclarke
Target Milestone: --- → mozilla17
Comment 7•13 years ago
|
||
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•