Open
Bug 1504259
Opened 6 years ago
Updated 2 years ago
Trying to use mozregression with Fennec results in "Permission denied" error
Categories
(Testing :: mozregression, enhancement)
Tracking
(Not tracked)
NEW
People
(Reporter: botond, Unassigned)
Details
Attachments
(2 files)
As originally mentioned in bug 1495596 comment 21, I am unable to get mozregression to work with Fennec. When it gets to the step where it tries to install the apk, it fails with a "Permission denied" error.
More details to forthcome.
Reporter | ||
Comment 1•6 years ago
|
||
Reporter | ||
Comment 2•6 years ago
|
||
Reporter | ||
Comment 3•6 years ago
|
||
> What model of device?
Sony Xperia Z3C.
> Whether it is rooted?
Yes (at least, |adb root| works, I assume that means the device is rooted).
> Was there a fennec build already on the device before you run mozregression?
Yes.
> The output (stdout/stderr) from mozregression? (Please use an attachment)
Attached.
> The output of logcat when you run mozregression? (Please use an attachment)
Attached.
Comment 4•6 years ago
|
||
It looks from stdout that we are trying to copy the apk to /data/local, then installing from there.
Is there any reason we can't just install the apk directly from the command line? IIRC adb doesn't require that the file be present on the device and is happy to both copy and install in one step.
Comment 5•6 years ago
|
||
It looks like what they do for "legacy" installs: <https://android.googlesource.com/platform/system/core/+/master/adb/client/adb_install.cpp>
I would adb shell to the device and make sure the /data/local/tmp directory exists and is world writable. If you can push a file to it I would think it was ok. I would also make sure that if there is any other apk there that it is not owned by root or just remove it altogether.
That device is 4 years old. What version of android is it running and where did it come from sony|google|aosp|...?
Reporter | ||
Comment 6•6 years ago
|
||
(In reply to Bob Clary [:bc:] from comment #5)
> I would adb shell to the device and make sure the /data/local/tmp directory
> exists and is world writable.
It did exist, but it was not world writable:
shell@D5803:/data $ ls -ald /data/local/tmp
drwxrwx--x shell shell 2018-11-02 15:15 tmp
I made it world writable:
shell@D5803:/data $ chmod o+w /data/local/tmp
shell@D5803:/data $ ls -ald /data/local/tmp
drwxrwx-wx shell shell 2018-11-02 15:15 tmp
and that seems to have fixed the problem!
Comment 7•6 years ago
|
||
I say we are done here then. WFM? I don't feel that we should be mucking around with /data/local/tmp automatically. Too many devices and too many opportunities for failures.
Reporter | ||
Comment 8•6 years ago
|
||
(In reply to Bob Clary [:bc:] from comment #7)
> I don't feel that we should be mucking around with /data/local/tmp automatically.
Agreed. However, perhaps there could be an FAQ item / documentation somewhere suggesting this resolution for this error?
Reporter | ||
Comment 9•6 years ago
|
||
Somehow, the permissions on the /data/local/tmp directory on my phone got reset, so it's no longer world-writable! I had to repeat the command from comment 6 to make it world-writable again.
I've no idea how it got changed back (I certainly didn't change it back manually). Any suggestions on how I could discover that?
Comment 10•6 years ago
|
||
Perhaps mozregression or adb had something to do with it or perhaps your Android version is doing it somehow. Apart from checking on it after running mozregression, collecting logcat etc and keeping track of updates of your phone, I'm not sure how we could catch the culprit.
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•