Skip to content

V0.4 beta #22

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Following USB gadgets are integrated:
* Keyboard & Mouse (/dev/hidg0, /dev/hidg1)
* FIDO CTAP (/dev/hidg0; for WebAuthn)
* CCID (/dev/ccid_ctrl, /dev/ccid_bulk)
* UVC camera (/dev/video?)

USB Gadget Tool requires root permissions and a Kernel with ConfigFS support.
Currently the app only enables the USB Gadget. For the usage of these device endpoints (e.g. /dev/hidg0) further apps are required (see Use-Cases).
Expand Down
6 changes: 3 additions & 3 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ android {

defaultConfig {
applicationId "net.tjado.usbgadget"
minSdkVersion 26
minSdkVersion 23
targetSdkVersion 29
versionCode 3
versionName "0.3"
versionCode 4
versionName "0.4"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/assets/usbFunctionProfiles/CCID
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

GADGET="keyboard"
GADGET="ccid"
GADGET_PATH="____gadgetPath____"

cd $GADGET_PATH/configs/
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/assets/usbFunctionProfiles/CTAP
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

GADGET="keyboard"
GADGET="ctap"
GADGET_PATH="____gadgetPath____"

cd $GADGET_PATH/configs/
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/assets/usbFunctionProfiles/Mouse
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh

GADGET="keyboard"
GADGET="mouse"
GADGET_PATH="____gadgetPath____"

cd $GADGET_PATH/configs/
Expand Down
33 changes: 33 additions & 0 deletions app/src/main/assets/usbFunctionProfiles/UVC
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/sh

GADGET="camera"
GADGET_PATH="____gadgetPath____"

cd $GADGET_PATH/configs/
CONFIG_PATH="$GADGET_PATH/configs/`ls -1 | head -1`/"
STRINGS_PATH="$GADGET_PATH/strings/0x409/"
FUNCTION_PATH="$GADGET_PATH/functions/uvc.usb0"

mkdir -p $FUNCTION_PATH/control/header/h
cd $FUNCTION_PATH

ln -s control/header/h control/class/fs

mkdir -p $FUNCTION_PATH/streaming/mjpeg/m/720p
cd $FUNCTION_PATH/streaming/mjpeg/m/720p
echo 5000000 > dwFrameInterval
echo 1280 > wWidth
echo 720 > wHeight
echo 29491200 > dwMinBitRate
echo 29491200 > dwMaxBitRate
echo 1843200 > dwMaxVideoFrameBufferSize

mkdir -p $FUNCTION_PATH/streaming/header/h
cd $FUNCTION_PATH/streaming/header/h
ln -s ../../mjpeg/m
cd ../../class/fs
ln -s ../../header/h
cd ../../class/hs
ln -s ../../header/h

ln -s $FUNCTION_PATH $CONFIG_PATH/uvc.usb0
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<string name="gadget_refresh">Refresh</string>
<string name="gadget_add">Add USB Gadget</string>
<string name="info">Information</string>
<string name="info_title">USB Gadget Tool v0.3 beta</string>
<string name="info_title">USB Gadget Tool v0.4 beta</string>
<string name="info_message">
USB Gadget Tool gives you full control over the USB Device services on your phone. For this ConfigFS on the OS Kernel is used.\n\n
By tejado (Tjado Mäcke)\n\n
Expand Down
1 change: 1 addition & 0 deletions fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ Following USB gadgets are integrated:
* Keyboard & Mouse (<code>/dev/hidg0</code>, <code>/dev/hidg1</code>)
* FIDO CTAP (<code>/dev/hidg0</code>; for WebAuthn)
* CCID (<code>/dev/ccid_ctrl</code>, <code>/dev/ccid_bulk</code>)
* UVC camera (<code>/dev/video?</code>)

<i>USB Gadget Tool</i> requires root permissions and a Kernel with ConfigFS support. Currently the app only enables the USB Gadget. For the usage of these device endpoints (e.g. <code>/dev/hidg0</code>) further apps are required.