We have moved to a new Sailfish OS Forum. Please start new discussions there.
1 | initial version | posted 2015-11-09 15:07:36 +0200 |
I would like to be able just connect jolla via USB to my desktop PC and have all jolla files at hand on PC. Right now it almost works:
But pretty often manual interaction is required as developer mode does not start while the device is locked.
Is it possible to make developer mode start regardless of locked state? It really does not make much sense to add extra protection as SSH connection requires at least providing proper password.
2 | No.2 Revision |
I would like to be able just connect jolla via USB to my desktop PC and have all jolla files at hand on PC. Right now it almost works:
But pretty often manual interaction is required as developer mode does not start while the device is locked.
Is it possible to make developer mode start regardless of locked state? It really does not make much sense to add extra protection as SSH connection requires at least providing proper password.
USB behaviour is controlled by usb_moded
daemon. [According to documentation](https://git.merproject.org/mer-core
When started with -r usb_moded will always enable developer mode (networking) if it can. This is a debug feature and should not be used in production software.
Looks exactly as what I looked for! So how do we force this daemon to run with -r
flag? Service unit file contains following config:
$ grep -FA10 '[Service]' /lib/systemd/system/usb-moded.service
[Service]
Type=notify
TimeoutSec=15
EnvironmentFile=-/var/lib/environment/usb-moded/*.conf
EnvironmentFile=-/run/usb-moded/*.conf
ExecStart=/usr/sbin/usb_moded --systemd --force-syslog $USB_MODED_ARGS
Restart=always
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=basic.target
I decided to create environment file:
$ cat /var/lib/environment/usb-moded/alwaysdevmode.conf
USB_MODED_ARGS=-r
And of course restart daemon with new environment # systemctl daemon-reload && systemctl restart usb-moded.service
And now my Jolla always starts developer USB mode right after attaching to USB port regardless of whether it locked or not. Problem solved :)
3 | No.3 Revision |
I would like to be able just connect jolla via USB to my desktop PC and have all jolla files at hand on PC. Right now it almost works:
But pretty often manual interaction is required as developer mode does not start while the device is locked.
Is it possible to make developer mode start regardless of locked state? It really does not make much sense to add extra protection as SSH connection requires at least providing proper password.
USB behaviour is controlled by usb_moded
daemon. [According to documentation](https://git.merproject.org/mer-coreAccording to documentation
When started with -r usb_moded will always enable developer mode (networking) if it can. This is a debug feature and should not be used in production software.
Looks exactly as what I looked for! So how do we force this daemon to run with -r
flag? Service unit file contains following config:
$ grep -FA10 '[Service]' /lib/systemd/system/usb-moded.service
[Service]
Type=notify
TimeoutSec=15
EnvironmentFile=-/var/lib/environment/usb-moded/*.conf
EnvironmentFile=-/run/usb-moded/*.conf
ExecStart=/usr/sbin/usb_moded --systemd --force-syslog $USB_MODED_ARGS
Restart=always
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=basic.target
I decided to create environment file:
$ cat /var/lib/environment/usb-moded/alwaysdevmode.conf
USB_MODED_ARGS=-r
And of course restart daemon with new environment # systemctl daemon-reload && systemctl restart usb-moded.service
And now my Jolla always starts developer USB mode right after attaching to USB port regardless of whether it locked or not. Problem solved :)
4 | No.4 Revision |
I would like to be able just connect jolla via USB to my desktop PC and have all jolla files at hand on PC. Right now it almost works:
But pretty often manual interaction is required as developer mode does not start while the device is locked.
Is it possible to make developer mode start regardless of locked state? It really does not make much sense to add extra protection as SSH connection requires at least providing proper password.
USB behaviour is controlled by usb_moded
daemon. According to documentation
When started with -r usb_moded will always enable developer mode (networking) if it can. This is a debug feature and should not be used in production software.
Looks exactly as what I looked for! So how do we force this daemon to run with -r
flag? Service unit file contains following config:
$ grep -FA10 '[Service]' /lib/systemd/system/usb-moded.service
[Service]
Type=notify
TimeoutSec=15
EnvironmentFile=-/var/lib/environment/usb-moded/*.conf
EnvironmentFile=-/run/usb-moded/*.conf
ExecStart=/usr/sbin/usb_moded --systemd --force-syslog $USB_MODED_ARGS
Restart=always
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=basic.target
I decided to create environment file:
$ cat /var/lib/environment/usb-moded/alwaysdevmode.conf
USB_MODED_ARGS=-r
And of course restart daemon with new environment # systemctl daemon-reload && systemctl restart usb-moded.service
And now my Jolla always starts developer USB mode right after attaching to USB port regardless of whether it locked or not. Problem solved :)
Update 2017-06-03: Since SailfishOS 2.1.0.11 (Iijoki) me solution no longer works :(
5 | No.5 Revision |
I would like to be able just connect jolla via USB to my desktop PC and have all jolla files at hand on PC. Right now it almost works:
But pretty often manual interaction is required as developer mode does not start while the device is locked.
Is it possible to make developer mode start regardless of locked state? It really does not make much sense to add extra protection as SSH connection requires at least providing proper password.
USB behaviour is controlled by usb_moded
daemon. According to documentation
When started with -r usb_moded will always enable developer mode (networking) if it can. This is a debug feature and should not be used in production software.
Looks exactly as what I looked for! So how do we force this daemon to run with -r
flag? Service unit file contains following config:
$ grep -FA10 '[Service]' /lib/systemd/system/usb-moded.service
[Service]
Type=notify
TimeoutSec=15
EnvironmentFile=-/var/lib/environment/usb-moded/*.conf
EnvironmentFile=-/run/usb-moded/*.conf
ExecStart=/usr/sbin/usb_moded --systemd --force-syslog $USB_MODED_ARGS
Restart=always
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=basic.target
I decided to create environment file:
$ cat /var/lib/environment/usb-moded/alwaysdevmode.conf
USB_MODED_ARGS=-r
And of course restart daemon with new environment # systemctl daemon-reload && systemctl restart usb-moded.service
And now my Jolla always starts developer USB mode right after attaching to USB port regardless of whether it locked or not. Problem solved :)
Update 2017-06-03: Since SailfishOS 2.1.0.11 (Iijoki) me my solution no longer works :(