Closed Bug 1035423 Opened 10 years ago Closed 7 years ago

Add a property which allows adb to always stay enabled

Categories

(Firefox OS Graveyard :: Developer Tools, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: dhylands, Unassigned, Mentored)

References

Details

(Whiteboard: [good first bug][lang=js])

Currently, on user builds, adb is disabled when the screen is locked, and there is a 12 hour timer which disables adb. I've had several developers/users complain of this behaviour, so this bug is to add a property which will override the current behaviour and leave adb on all of the time (as it is in eng/user-debug builds). The property would be called something like persist.adb.always-on and would not be turned on by default (so you'd need to get adb access to the phone initially in order to turn it on). Note: properties which start with 'persist' are persisted across reboots.
Mentor: dhylands
Whiteboard: [good first bug][lang=js]
The check should go here: http://dxr.mozilla.org/mozilla-central/source/b2g/chrome/content/settings.js#383 (just before if.DEBUG after we check if marionette is enabled (search for marionette.defaultPrefs.enabled)
Mentor: dhylands
See Also: → 1037129
Mentor: dhylands
Just a note, but I find the android experience really useable here, when I turn on debugging for the first time I have to unlock my device and click a notification asking me to trust the device the computer is attached to, from then on the 'remote debugging' option in the settings just works. Adding another property seems more confusing than that, do we want to copy behaviour here?
(In reply to Dale Harvey (:daleharvey) from comment #2) > Just a note, but I find the android experience really useable here, when I > turn on debugging for the first time I have to unlock my device and click a > notification asking me to trust the device the computer is attached to, from > then on the 'remote debugging' option in the settings just works. > > Adding another property seems more confusing than that, do we want to copy > behaviour here? See also bug 1032128, which discusses a model very similar to Android's.
See Also: → 1032128
When I wrote this bug up, I wasn't aware of bug 1032128. If we add a "Force adb always on" setting, then I'm perfectly happy to invalidate this bug (but I'll keep it open until such a setting is actually implemented). I originally proposed adding a property, because that's something I can do from the command line in an adb shell. We have no UI for preferences, so they don't really work well. Adding a setting requires UI, and localization, etc, which is why I proposed adding a property. Adding a setting would be the preferred approach.
After looking at this bug, i do seem interested in seeing what I would need to do and where to start?
In order to test this, you'll need to be able to build FirefoxOS. Do you have a supported device? If not, then I think you can use the emulator. https://developer.mozilla.org/en-US/Firefox_OS/Firefox_OS_build_prerequisites I use linux for all of my builds. Apparently, you can build on a Mac, but I don't have one, so I can't help on that front. My build tree for my flame occupies about 55Gb of drive space, so you'll need lots of free drive space. In order to test this properly, you'll need to do what's known as a user build (by default, you'll get eng builds). To create a user build, you need to create a .userconfig file in your B2G directory which has this line: VARIANT=user Make sure you do this before you do your build, otherwise you'll need to wipe out your build and start over. With VARIANT=eng or VARIANT=userdebug builds, adb is always on, which is why you won't be able to test this. The file you'll need to modify is gecko/b2g/chrome/content/devtools/adb.js and put your code in front of the DEBUG statement here: http://dxr.mozilla.org/mozilla-central/source/b2g/chrome/content/devtools/adb.js?from=adb.js#181 Line 188 http://dxr.mozilla.org/mozilla-central/source/b2g/chrome/content/devtools/adb.js?from=adb.js#188 shows how to query a property. Let's make the property be something like: persist.adb.alwayson If the property is set to 1, then you'll want to do: > enableAdb = true; > useDisableAdbTimer = false; I'm supposed to land bug 1035437 which will affect the same file in the same locations. So you'll need to rebase on top of that if I get it landed soon (but it won't be a major change).
Assignee: nobody → petechambers1992
Assignee: petechambers1992 → nobody
I'm really sorry i'm just working on another bug at the moment but will look at this in the near future! :)
Component: General → Developer Tools
I'd like to be assigned to this bug, could someone assign me please.
Assignee: nobody → wjlawson6
Assignee: wjlawson6 → nobody
I want to work in this bug
Hi, I'm interested in working on this bug, can anyone please help me?
(In reply to Anup Kumar from comment #10) > Hi, I'm interested in working on this bug, can anyone please help me? What specifically do you need help with?
Hey, this bug seems interesting and I would like to work on this bug. Can you guide me on which files handle the task related to the issue mentioned? Thanks.
Flags: needinfo?(dhylands)
The files were mentioned in comment #2. Personally, I haven't worked on FirefoxOS in the past year. I took a look at the links provided in comment 2 and that still seems to point to the same file, but I'm no longer sure how you actually go about building firefoxos anymore.
Flags: needinfo?(dhylands)
I'm a student at Seneca college learning open source, and I was hoping to work on this bug for my course. However i am a first timer and might need some help with locating the files
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.