Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adb: Add missing scripts and service for adb mode
To get a working adb mode, we need to add the functionfs mounting, as just starting adbd is not enough anymore. Signed-off-by: Philippe De Swert <philippedeswert@gmail.com>
- Loading branch information
1 parent
efe0512
commit caccfdc
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
set -e | ||
mkdir -p /dev/usb-ffs | ||
chmod 0770 /dev/usb-ffs | ||
chown shell:shell /dev/usb-ffs | ||
mkdir -p /dev/usb-ffs/adb | ||
chmod 0770 /dev/usb-ffs/adb | ||
chown shell:shell /dev/usb-ffs/adb | ||
/bin/mount -t functionfs adb /dev/usb-ffs/adb -o uid=shell,gid=shell | ||
exit 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# Copyright (C) 2013 Jolla Oy | ||
# | ||
# Prepare functionfs for adbd | ||
|
||
[Unit] | ||
Description=functionfs setup for adbd | ||
Before=adbd.service | ||
PartOf=adbd.service | ||
|
||
[Service] | ||
Type=notify | ||
RemainAfterExit=yes | ||
ExecStart=/usr/sbin/adbd-functionfs.sh | ||
ExecStop=/bin/umount adb | ||
|
||
[Install] | ||
WantedBy=graphical.target |