├── .gitignore ├── README.md ├── droidducky.sh └── hid-gadget-test ├── Android.mk ├── Application.mk ├── hid-gadget-test.c ├── libs └── armeabi │ ├── hid-gadget-test │ └── hid-gadget-test-qwerty └── obj └── local └── armeabi ├── hid-gadget-test └── objs └── hid-gadget-test ├── hid-gadget-test.o └── hid-gadget-test.o.d /.gitignore: -------------------------------------------------------------------------------- 1 | payloads/ 2 | *.layout 3 | layouts/ 4 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # android-ducky 2 | Rubber Ducky with Android 3 | 4 | # Project status 5 | 6 | Well, it worked well in 2015 but I hadn't had any use for it recently, so this has gone untested afterwards. I keep it for future reference, but be careful before using. Do your research, adapt and conquer ;-) 7 | 8 | ...OR, get me some nice PRs and I will merge them. 9 | 10 | # What is this repository for ? 11 | * Android version of the famous Rubber Ducky 12 | * Supports non-US keyboard layouts 13 | 14 | # How do I get setup ? 15 | * Root you android device 16 | * Check this link for device specific procedure : https://github.com/pelya/android-keyboard-gadget 17 | * Basically you will have to flash a new kernel to add HID keyboard support. Be sure to have TWRP or CWM Recovery otherwise the flashing process might not even start. If you don't have TWRP or CWM Recovery, you can simply download the app Rashr. This requires root though. 18 | * You will need a terminal emulator, I recommend that you install Terminal IDE from the Play Store with Hacker's Keyboard (otherwise the app will crash for Android > 4.4). But you can also use JuiceSSH or whatever. 19 | * You will need cool payloads : https://github.com/hak5darren/USB-Rubber-Ducky/wiki/Payloads 20 | * chmod +x hid-gadget-test 21 | * chmod +x droidducky.sh 22 | * Recompile hid.gadget-test.c if you modified it using : ndk-build NDK_PROJECT_PATH=$(pwd) APP_BUILD_SCRIPT=$(pwd)/Android.mk 23 | 24 | # Usage 25 | * bash droidducky.sh payload.txt ch-fr 26 | * The last parameter is optional. Default is US layout, but you can choose other layouts if you add "fr" or "ch-fr" as parameter. 27 | 28 | # Contributions guidelines 29 | * Add support for your country keyboard layout by editing the "convert" function in droidducky.sh 30 | * If a specific key is not available at the moment, you can submit the issue by telling me what the name of key is with its scancode 31 | * Scancodes for HID keyboard can be found here : http://www.hiemalis.org/~keiji/PC/scancode-translate.pdf 32 | 33 | 34 | #Sources 35 | * The original droidducky.sh script is taken from https://github.com/anbud/DroidDucky 36 | * The original hid-gadget-test is taken from https://github.com/pelya/android-keyboard-gadget 37 | -------------------------------------------------------------------------------- /droidducky.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # DroidDucky 4 | # Simple Duckyscript interpreter in Bash. Based on android-keyboard-gadget and hid-gadget-test utility. 5 | # 6 | # Usage: droidducky.sh payload_file.dd 7 | # 8 | # Copyright (C) 2015 - Andrej Budinčević 9 | # 10 | # This program is free software: you can redistribute it and/or modify 11 | # it under the terms of the GNU General Public License as published by 12 | # the Free Software Foundation, either version 3 of the License, or 13 | # (at your option) any later version. 14 | # 15 | # This program is distributed in the hope that it will be useful, 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 | # GNU General Public License for more details. 19 | # You should have received a copy of the GNU General Public License 20 | # along with this program. If not, see . 21 | 22 | defdelay=0 23 | kb="/dev/hidg0 keyboard" 24 | 25 | last_cmd="" 26 | last_string="" 27 | line_num=0 28 | 29 | function convert() 30 | { 31 | local kbcode="" 32 | 33 | if [ "$1" == " " ] 34 | then 35 | kbcode='space' 36 | elif [ "$1" == "!" ] 37 | then 38 | kbcode='left-shift 1' 39 | elif [ "$1" == "." ] 40 | then 41 | kbcode='period' 42 | elif [ "$1" == "\`" ] 43 | then 44 | kbcode='backquote' 45 | elif [ "$1" == "~" ] 46 | then 47 | kbcode='left-shift tilde' 48 | elif [ "$1" == "+" ] 49 | then 50 | kbcode='kp-plus' 51 | elif [ "$1" == "=" ] 52 | then 53 | kbcode='equal' 54 | elif [ "$1" == "_" ] 55 | then 56 | kbcode='left-shift minus' 57 | elif [ "$1" == "-" ] 58 | then 59 | kbcode='minus' 60 | elif [ "$1" == "\"" ] 61 | then 62 | kbcode='left-shift quote' 63 | elif [ "$1" == "'" ] 64 | then 65 | kbcode='quote' 66 | elif [ "$1" == ":" ] 67 | then 68 | kbcode='left-shift semicolon' 69 | elif [ "$1" == ";" ] 70 | then 71 | kbcode='semicolon' 72 | elif [ "$1" == "<" ] 73 | then 74 | kbcode='left-shift comma' 75 | elif [ "$1" == "," ] 76 | then 77 | kbcode='comma' 78 | elif [ "$1" == ">" ] 79 | then 80 | kbcode='left-shift period' 81 | elif [ "$1" == "?" ] 82 | then 83 | kbcode='left-shift slash' 84 | elif [ "$1" == "\\" ] 85 | then 86 | kbcode='backslash' 87 | elif [ "$1" == "|" ] 88 | then 89 | kbcode='left-shift backslash' 90 | elif [ "$1" == "/" ] 91 | then 92 | kbcode='slash' 93 | elif [ "$1" == "{" ] 94 | then 95 | kbcode='left-shift lbracket' 96 | elif [ "$1" == "}" ] 97 | then 98 | kbcode='left-shift rbracket' 99 | elif [ "$1" == "(" ] 100 | then 101 | kbcode='left-shift 9' 102 | elif [ "$1" == ")" ] 103 | then 104 | kbcode='left-shift 0' 105 | elif [ "$1" == "[" ] 106 | then 107 | kbcode='lbracket' 108 | elif [ "$1" == "]" ] 109 | then 110 | kbcode='rbracket' 111 | elif [ "$1" == "#" ] 112 | then 113 | kbcode='left-shift 3' 114 | elif [ "$1" == "@" ] 115 | then 116 | kbcode='left-shift 2' 117 | elif [ "$1" == "$" ] 118 | then 119 | kbcode='left-shift 4' 120 | elif [ "$1" == "%" ] 121 | then 122 | kbcode='left-shift 5' 123 | elif [ "$1" == "^" ] 124 | then 125 | kbcode='left-shift 6' 126 | elif [ "$1" == "&" ] 127 | then 128 | kbcode='left-shift 7' 129 | elif [ "$1" == "*" ] 130 | then 131 | kbcode='kp-multiply' 132 | 133 | else 134 | case $1 in 135 | [[:upper:]]) 136 | tmp=$1 137 | kbcode="left-shift ${tmp,,}" 138 | ;; 139 | *) 140 | kbcode="$1" 141 | ;; 142 | esac 143 | fi 144 | 145 | echo "$kbcode" 146 | } 147 | 148 | # w => z 149 | # ( => 9 150 | # - => ) 151 | # m => . 152 | # . => : 153 | # ) => 0 154 | # a => q 155 | # ' => ù 156 | # : => M 157 | # / => ! 158 | # , => ; 159 | # % => 5 160 | # M => ? 161 | # \ => * 162 | # ; => m 163 | # " => % 164 | 165 | function convert-fr() 166 | { 167 | local kbcode="" 168 | 169 | if [ "$1" == " " ] 170 | then 171 | kbcode='space' 172 | 173 | elif [ "$1" == "!" ] 174 | then 175 | kbcode='slash' 176 | 177 | elif [ "$1" == "." ] 178 | then 179 | kbcode='left-shift comma' 180 | 181 | elif [ "$1" == "\`" ] 182 | then 183 | kbcode='left-alt 7' 184 | 185 | elif [ "$1" == "~" ] 186 | then 187 | kbcode='left-alt 2' 188 | 189 | elif [ "$1" == "+" ] 190 | then 191 | kbcode='kp-plus' 192 | 193 | elif [ "$1" == "=" ] 194 | then 195 | kbcode='equal' 196 | 197 | elif [ "$1" == "_" ] 198 | then 199 | kbcode='8' 200 | 201 | elif [ "$1" == "-" ] 202 | then 203 | kbcode='6' 204 | 205 | elif [ "$1" == "\"" ] 206 | then 207 | kbcode='3' 208 | 209 | elif [ "$1" == "'" ] 210 | then 211 | kbcode='4' 212 | 213 | elif [ "$1" == ":" ] 214 | then 215 | kbcode='period' 216 | 217 | elif [ "$1" == ";" ] 218 | then 219 | kbcode='comma' 220 | 221 | elif [ "$1" == "<" ] 222 | then 223 | kbcode='europe-2' 224 | 225 | elif [ "$1" == "," ] 226 | then 227 | kbcode='m' 228 | 229 | elif [ "$1" == ">" ] 230 | then 231 | kbcode='left-shift europe-2' 232 | 233 | elif [ "$1" == "?" ] 234 | then 235 | kbcode='left-shift m' 236 | 237 | elif [ "$1" == "\\" ] 238 | then 239 | kbcode='right-alt 8' 240 | 241 | elif [ "$1" == "|" ] 242 | then 243 | kbcode='right-alt 6' 244 | 245 | elif [ "$1" == "/" ] 246 | then 247 | kbcode='left-shift period' 248 | 249 | elif [ "$1" == "{" ] 250 | then 251 | kbcode='right-alt 4' 252 | 253 | elif [ "$1" == "}" ] 254 | then 255 | kbcode='right-alt equal' 256 | 257 | elif [ "$1" == "(" ] 258 | then 259 | kbcode='5' 260 | 261 | elif [ "$1" == ")" ] 262 | then 263 | kbcode='minus' 264 | 265 | elif [ "$1" == "[" ] 266 | then 267 | kbcode='right-alt 5' 268 | 269 | elif [ "$1" == "]" ] 270 | then 271 | kbcode='right-alt minus' 272 | 273 | elif [ "$1" == "#" ] 274 | then 275 | kbcode='right-alt 3' 276 | 277 | elif [ "$1" == "@" ] 278 | then 279 | kbcode='right-alt 0' 280 | 281 | elif [ "$1" == "$" ] 282 | then 283 | kbcode='rbracket' 284 | 285 | elif [ "$1" == "%" ] 286 | then 287 | kbcode='left-shift quote' 288 | 289 | elif [ "$1" == "^" ] 290 | then 291 | kbcode='lbracket' 292 | 293 | elif [ "$1" == "&" ] 294 | then 295 | kbcode='1' 296 | 297 | elif [ "$1" == "*" ] 298 | then 299 | kbcode='kp-multiply' 300 | 301 | #letter management (case is important) 302 | else 303 | isUpperCase=false 304 | tmp=$1 305 | case "$1" in 306 | [[:upper:]]) 307 | isUpperCase=true 308 | #convert to lower case 309 | tmp="${tmp,,}" 310 | esac 311 | 312 | if [ "$tmp" == "q" ] 313 | then 314 | tmp='a' 315 | 316 | elif [ "$tmp" == "a" ] 317 | then 318 | tmp='q' 319 | 320 | elif [ "$tmp" == "z" ] 321 | then 322 | tmp='w' 323 | 324 | elif [ "$tmp" == "w" ] 325 | then 326 | tmp='z' 327 | 328 | elif [ "$tmp" == "m" ] 329 | then 330 | tmp='semicolon' 331 | else 332 | tmp=$tmp 333 | fi 334 | 335 | if [ "$isUpperCase" == true ] 336 | then 337 | #restoring the 'caseness' 338 | kbcode="left-shift $tmp" 339 | else 340 | kbcode="$tmp" 341 | fi 342 | fi 343 | 344 | echo "$kbcode" 345 | } 346 | #convert to swiss-french 347 | # ( => ) 348 | # - => ' 349 | # y => z 350 | # ) => = 351 | # ' => à 352 | # : => ö 353 | # / => - 354 | # \ => $ 355 | # ; => é 356 | # " => ä 357 | function convert-ch-fr() 358 | { 359 | local kbcode="" 360 | 361 | if [ "$1" == " " ] 362 | then 363 | kbcode='space' 364 | 365 | elif [ "$1" == "!" ] 366 | then 367 | kbcode='left-shift rbracket' 368 | 369 | elif [ "$1" == "." ] 370 | then 371 | kbcode='period' 372 | 373 | elif [ "$1" == "\`" ] 374 | then 375 | kbcode='backquote' 376 | 377 | elif [ "$1" == "~" ] 378 | then 379 | kbcode='right-alt plus' 380 | 381 | elif [ "$1" == "+" ] 382 | then 383 | kbcode='kp-plus' 384 | 385 | elif [ "$1" == "=" ] 386 | then 387 | kbcode='left-shift 0' 388 | 389 | elif [ "$1" == "_" ] 390 | then 391 | kbcode='left-shift slash' 392 | 393 | elif [ "$1" == "-" ] 394 | then 395 | kbcode='slash' 396 | 397 | elif [ "$1" == "\"" ] 398 | then 399 | kbcode='left-shift 2' 400 | 401 | elif [ "$1" == "'" ] 402 | then 403 | kbcode='minus' 404 | 405 | elif [ "$1" == ":" ] 406 | then 407 | kbcode='left-shift period' 408 | 409 | elif [ "$1" == ";" ] 410 | then 411 | kbcode='left-shift comma' 412 | 413 | elif [ "$1" == "<" ] 414 | then 415 | kbcode='europe-2' 416 | 417 | elif [ "$1" == "," ] 418 | then 419 | kbcode='comma' 420 | 421 | elif [ "$1" == ">" ] 422 | then 423 | kbcode='left-shift europe-2' 424 | 425 | elif [ "$1" == "?" ] 426 | then 427 | kbcode='left-shift minus' 428 | 429 | elif [ "$1" == "\\" ] 430 | then 431 | kbcode='right-alt europe-2' 432 | 433 | elif [ "$1" == "|" ] 434 | then 435 | kbcode='right-alt 7' 436 | 437 | elif [ "$1" == "/" ] 438 | then 439 | kbcode='left-shift 7' 440 | 441 | elif [ "$1" == "{" ] 442 | then 443 | kbcode='right-alt semicolon' 444 | 445 | elif [ "$1" == "}" ] 446 | then 447 | kbcode='right-alt quote' 448 | 449 | elif [ "$1" == "(" ] 450 | then 451 | kbcode='left-shift 8' 452 | 453 | elif [ "$1" == ")" ] 454 | then 455 | kbcode='left-shift 9' 456 | 457 | elif [ "$1" == "[" ] 458 | then 459 | kbcode='right-atl lbracket' 460 | 461 | elif [ "$1" == "]" ] 462 | then 463 | kbcode='right-alt rbracket' 464 | 465 | elif [ "$1" == "#" ] 466 | then 467 | kbcode='alt-right 3' 468 | 469 | elif [ "$1" == "@" ] 470 | then 471 | kbcode='alt-right 2' 472 | 473 | elif [ "$1" == "$" ] 474 | then 475 | kbcode='quote' 476 | 477 | elif [ "$1" == "%" ] 478 | then 479 | kbcode='left-shift 5' 480 | 481 | elif [ "$1" == "^" ] 482 | then 483 | kbcode='equal' 484 | 485 | elif [ "$1" == "&" ] 486 | then 487 | kbcode='left-shift 6' 488 | 489 | elif [ "$1" == "*" ] 490 | then 491 | kbcode='kp-multiply' 492 | 493 | elif [ "$1" == "z" ] 494 | then 495 | kbcode='y' 496 | 497 | elif [ "$1" == "y" ] 498 | then 499 | kbcode='z' 500 | 501 | #letter management (case is important) 502 | else 503 | isUpperCase=false 504 | tmp=$1 505 | case "$1" in 506 | [[:upper:]]) 507 | isUpperCase=true 508 | #convert the character to lower case 509 | tmp="${tmp,,}" 510 | esac 511 | 512 | if [ "$tmp" == "z" ] 513 | then 514 | tmp='y' 515 | 516 | elif [ "$tmp" == "y" ] 517 | then 518 | tmp='z' 519 | 520 | else 521 | tmp=$tmp 522 | fi 523 | 524 | if [ "$isUpperCase" == true ] 525 | then 526 | #restoring the 'caseness' 527 | kbcode="left-shift $tmp" 528 | else 529 | kbcode="$tmp" 530 | fi 531 | fi 532 | 533 | echo "$kbcode" 534 | } 535 | 536 | while IFS='' read -r line || [[ -n "$line" ]]; do 537 | ((line_num++)) 538 | read -r cmd info <<< "$line" 539 | if [ "$cmd" == "STRING" ] 540 | then 541 | last_string="$info" 542 | last_cmd="$cmd" 543 | 544 | for (( i=0; i<${#info}; i++ )); do 545 | 546 | #add keyboard layout commandlines parameters here 547 | if [ "$2" == "ch-fr" ] 548 | then 549 | kbcode=$(convert-ch-fr "${info:$i:1}") 550 | 551 | elif [ "$2" == "fr" ] 552 | then kbcode=$(convert-fr "${info:$i:1}") 553 | 554 | else 555 | kbcode=$(convert "${info:$i:1}") 556 | fi 557 | 558 | if [ "$kbcode" != "" ] 559 | then 560 | echo "$kbcode" | ./hid-gadget-test $kb > /dev/null 561 | fi 562 | done 563 | elif [ "$cmd" == "ENTER" ] 564 | then 565 | last_cmd="enter" 566 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 567 | 568 | elif [ "$cmd" == "DELAY" ] 569 | then 570 | last_cmd="UNS" 571 | ((info = info*1000)) 572 | usleep $info 573 | 574 | elif [ "$cmd" == "WINDOWS" -o "$cmd" == "GUI" ] 575 | then 576 | last_cmd="left-meta ${info,,}" 577 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 578 | 579 | elif [ "$cmd" == "MENU" -o "$cmd" == "APP" ] 580 | then 581 | last_cmd="menu" 582 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 583 | 584 | elif [ "$cmd" == "DOWNARROW" -o "$cmd" == "DOWN" ] 585 | then 586 | last_cmd="down" 587 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 588 | 589 | elif [ "$cmd" == "LEFTARROW" -o "$cmd" == "LEFT" ] 590 | then 591 | last_cmd="left" 592 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 593 | 594 | elif [ "$cmd" == "RIGHTARROW" -o "$cmd" == "RIGHT" ] 595 | then 596 | last_cmd="right" 597 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 598 | 599 | elif [ "$cmd" == "UPARROW" -o "$cmd" == "UP" ] 600 | then 601 | last_cmd="up" 602 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 603 | 604 | elif [ "$cmd" == "DEFAULT_DELAY" -o "$cmd" == "DEFAULTDELAY" ] 605 | then 606 | last_cmd="UNS" 607 | ((defdelay = info*1000)) 608 | 609 | elif [ "$cmd" == "BREAK" -o "$cmd" == "PAUSE" ] 610 | then 611 | last_cmd="pause" 612 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 613 | 614 | elif [ "$cmd" == "ESC" -o "$cmd" == "ESCAPE" ] 615 | then 616 | last_cmd="escape" 617 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 618 | 619 | elif [ "$cmd" == "PRINTSCREEN" ] 620 | then 621 | last_cmd="print" 622 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 623 | 624 | elif [ "$cmd" == "CAPSLOCK" -o "$cmd" == "DELETE" -o "$cmd" == "END" -o "$cmd" == "HOME" -o "$cmd" == "INSERT" -o "$cmd" == "NUMLOCK" -o "$cmd" == "PAGEUP" -o "$cmd" == "PAGEDOWN" -o "$cmd" == "SCROLLLOCK" -o "$cmd" == "SPACE" -o "$cmd" == "TAB" \ 625 | -o "$cmd" == "F1" -o "$cmd" == "F2" -o "$cmd" == "F3" -o "$cmd" == "F4" -o "$cmd" == "F5" -o "$cmd" == "F6" -o "$cmd" == "F7" -o "$cmd" == "F8" -o "$cmd" == "F9" -o "$cmd" == "F10" -o "$cmd" == "F11" -o "$cmd" == "F12" ] 626 | then 627 | last_cmd="${cmd,,}" 628 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 629 | 630 | elif [ "$cmd" == "REM" ] 631 | then 632 | echo "$info" 633 | 634 | elif [ "$cmd" == "SHIFT" ] 635 | then 636 | if [ "$info" == "DELETE" -o "$info" == "END" -o "$info" == "HOME" -o "$info" == "INSERT" -o "$info" == "PAGEUP" -o "$info" == "PAGEDOWN" -o "$info" == "SPACE" -o "$info" == "TAB" ] 637 | then 638 | last_cmd="left-shift ${info,,}" 639 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 640 | 641 | elif [ "$info" == *"WINDOWS"* -o "$info" == *"GUI"* ] 642 | then 643 | read -r gui char <<< "$info" 644 | last_cmd="left-shift left-meta ${char,,}" 645 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 646 | 647 | elif [ "$info" == "DOWNARROW" -o "$info" == "DOWN" ] 648 | then 649 | last_cmd="left-shift down" 650 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 651 | 652 | elif [ "$info" == "LEFTARROW" -o "$info" == "LEFT" ] 653 | then 654 | last_cmd="left-shift left" 655 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 656 | 657 | elif [ "$info" == "RIGHTARROW" -o "$info" == "RIGHT" ] 658 | then 659 | last_cmd="left-shift right" 660 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 661 | 662 | elif [ "$info" == "UPARROW" -o "$info" == "UP" ] 663 | then 664 | last_cmd="left-shift up" 665 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 666 | 667 | else 668 | echo "($line_num) Parse error: Disallowed $cmd $info" 669 | fi 670 | 671 | elif [ "$cmd" == "CONTROL" -o "$cmd" == "CTRL" ] 672 | then 673 | if [ "$info" == "BREAK" -o "$info" == "PAUSE" ] 674 | then 675 | last_cmd="left-ctrl pause" 676 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 677 | 678 | elif [ "$info" == "F1" -o "$info" == "F2" -o "$info" == "F3" -o "$info" == "F4" -o "$info" == "F5" -o "$info" == "F6" -o "$info" == "F7" -o "$info" == "F8" -o "$info" == "F9" -o "$info" == "F10" -o "$info" == "F11" -o "$info" == "F12" ] 679 | then 680 | last_cmd="left-ctrl ${cmd,,}" 681 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 682 | 683 | elif [ "$info" == "ESC" -o "$info" == "ESCAPE" ] 684 | then 685 | last_cmd="left-ctrl escape" 686 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 687 | 688 | elif [ "$info" == "" ] 689 | then 690 | last_cmd="left-ctrl" 691 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 692 | 693 | else 694 | last_cmd="left-ctrl ${info,,}" 695 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 696 | fi 697 | 698 | elif [ "$cmd" == "ALT" ] 699 | then 700 | if [ "$info" == "END" -o "$info" == "SPACE" -o "$info" == "TAB" \ 701 | -o "$info" == "F1" -o "$info" == "F2" -o "$info" == "F3" -o "$info" == "F4" -o "$info" == "F5" -o "$info" == "F6" -o "$info" == "F7" -o "$info" == "F8" -o "$info" == "F9" -o "$info" == "F10" -o "$info" == "F11" -o "$info" == "F12" ] 702 | then 703 | last_cmd="left-alt ${info,,}" 704 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 705 | 706 | elif [ "$info" == "ESC" -o "$info" == "ESCAPE" ] 707 | then 708 | last_cmd="left-alt escape" 709 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 710 | 711 | elif [ "$info" == "" ] 712 | then 713 | last_cmd="left-alt" 714 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 715 | 716 | else 717 | last_cmd="left-alt ${info,,}" 718 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 719 | fi 720 | 721 | elif [ "$cmd" == "ALT-SHIFT" ] 722 | then 723 | last_cmd="left-shift left-alt" 724 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 725 | 726 | elif [ "$cmd" == "CTRL-ALT" ] 727 | then 728 | if [ "$info" == "BREAK" -o "$info" == "PAUSE" ] 729 | then 730 | last_cmd="left-ctrl left-alt pause" 731 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 732 | 733 | elif [ "$info" == "END" -o "$info" == "SPACE" -o "$info" == "TAB" -o "$info" == "DELETE" -o "$info" == "F1" -o "$info" == "F2" -o "$info" == "F3" -o "$info" == "F4" -o "$info" == "F5" -o "$info" == "F6" -o "$info" == "F7" -o "$info" == "F8" -o "$info" == "F9" -o "$info" == "F10" -o "$info" == "F11" -o "$info" == "F12" ] 734 | then 735 | last_cmd="left-ctrl left-alt ${cmd,,}" 736 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 737 | 738 | elif [ "$info" == "ESC" -o "$info" == "ESCAPE" ] 739 | then 740 | last_cmd="left-ctrl left-alt escape" 741 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 742 | 743 | elif [ "$info" == "" ] 744 | then 745 | last_cmd="left-ctrl left-alt" 746 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 747 | 748 | else 749 | last_cmd="left-ctrl left-alt ${info,,}" 750 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 751 | fi 752 | 753 | elif [ "$cmd" == "CTRL-SHIFT" ] 754 | then 755 | if [ "$info" == "BREAK" -o "$info" == "PAUSE" ] 756 | then 757 | last_cmd="left-ctrl left-shift pause" 758 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 759 | 760 | elif [ "$info" == "END" -o "$info" == "SPACE" -o "$info" == "TAB" -o "$info" == "DELETE" -o "$info" == "F1" -o "$info" == "F2" -o "$info" == "F3" -o "$info" == "F4" -o "$info" == "F5" -o "$info" == "F6" -o "$info" == "F7" -o "$info" == "F8" -o "$info" == "F9" -o "$info" == "F10" -o "$info" == "F11" -o "$info" == "F12" ] 761 | then 762 | last_cmd="left-ctrl left-shift ${cmd,,}" 763 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 764 | 765 | elif [ "$info" == "ESC" -o "$info" == "ESCAPE" ] 766 | then 767 | last_cmd="left-ctrl left-shift escape" 768 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 769 | 770 | elif [ "$info" == "" ] 771 | then 772 | last_cmd="left-ctrl left-shift" 773 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 774 | 775 | else 776 | last_cmd="left-ctrl left-shift ${info,,}" 777 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 778 | fi 779 | 780 | elif [ "$cmd" == "REPEAT" ] 781 | then 782 | if [ "$last_cmd" == "UNS" -o "$last_cmd" == "" ] 783 | then 784 | echo "($line_num) Parse error: Using REPEAT with DELAY, DEFAULTDELAY or BLANK is not allowed." 785 | else 786 | for (( i=0; i<$info; i++ )); do 787 | if [ "$last_cmd" == "STRING" ] 788 | then 789 | for (( j=0; j<${#last_string}; j++ )); do 790 | kbcode=$(convert "${last_string:$j:1}") 791 | 792 | if [ "$kbcode" != "" ] 793 | then 794 | echo "$kbcode" | ./hid-gadget-test $kb > /dev/null 795 | fi 796 | done 797 | else 798 | echo "$last_cmd" | ./hid-gadget-test $kb > /dev/null 799 | fi 800 | usleep $defdelay 801 | done 802 | fi 803 | 804 | elif [ "$cmd" != "" ] 805 | then 806 | echo "($line_num) Parse error: Unexpected $cmd." 807 | fi 808 | 809 | usleep $defdelay 810 | done < "$1" 811 | -------------------------------------------------------------------------------- /hid-gadget-test/Android.mk: -------------------------------------------------------------------------------- 1 | LOCAL_PATH:= $(call my-dir) 2 | 3 | include $(CLEAR_VARS) 4 | 5 | LOCAL_MODULE := hid-gadget-test 6 | 7 | LOCAL_SRC_FILES := hid-gadget-test.c 8 | 9 | LOCAL_CFLAGS += -fPIE 10 | LOCAL_LDFLAGS += -fPIE -pie 11 | 12 | include $(BUILD_EXECUTABLE) 13 | -------------------------------------------------------------------------------- /hid-gadget-test/Application.mk: -------------------------------------------------------------------------------- 1 | APP_PLATFORM := android-14 2 | APP_ABI := armeabi x86 mips 3 | -------------------------------------------------------------------------------- /hid-gadget-test/hid-gadget-test.c: -------------------------------------------------------------------------------- 1 | /* hid_gadget_test */ 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | #define BUF_LEN 512 14 | 15 | struct options { 16 | const char *opt; 17 | unsigned char val; 18 | }; 19 | 20 | static struct options kmod[] = { 21 | {.opt = "left-ctrl", .val = 0x01}, 22 | {.opt = "right-ctrl", .val = 0x10}, 23 | {.opt = "left-shift", .val = 0x02}, 24 | {.opt = "right-shift", .val = 0x20}, 25 | {.opt = "left-alt", .val = 0x04}, 26 | {.opt = "right-alt", .val = 0x40}, 27 | {.opt = "left-meta", .val = 0x08}, 28 | {.opt = "right-meta", .val = 0x80}, 29 | {.opt = NULL} 30 | }; 31 | 32 | static struct options kval[] = { 33 | {.opt = "a", .val = 0x04}, 34 | {.opt = "b", .val = 0x05}, 35 | {.opt = "c", .val = 0x06}, 36 | {.opt = "d", .val = 0x07}, 37 | {.opt = "e", .val = 0x08}, 38 | {.opt = "f", .val = 0x09}, 39 | {.opt = "g", .val = 0x0a}, 40 | {.opt = "h", .val = 0x0b}, 41 | {.opt = "i", .val = 0x0c}, 42 | {.opt = "j", .val = 0x0d}, 43 | {.opt = "k", .val = 0x0e}, 44 | {.opt = "l", .val = 0x0f}, 45 | {.opt = "m", .val = 0x10}, 46 | {.opt = "n", .val = 0x11}, 47 | {.opt = "o", .val = 0x12}, 48 | {.opt = "p", .val = 0x13}, 49 | {.opt = "q", .val = 0x14}, 50 | {.opt = "r", .val = 0x15}, 51 | {.opt = "s", .val = 0x16}, 52 | {.opt = "t", .val = 0x17}, 53 | {.opt = "u", .val = 0x18}, 54 | {.opt = "v", .val = 0x19}, 55 | {.opt = "w", .val = 0x1a}, 56 | {.opt = "x", .val = 0x1b}, 57 | {.opt = "y", .val = 0x1c}, 58 | {.opt = "z", .val = 0x1d}, 59 | {.opt = "1", .val = 0x1e}, 60 | {.opt = "2", .val = 0x1f}, 61 | {.opt = "3", .val = 0x20}, 62 | {.opt = "4", .val = 0x21}, 63 | {.opt = "5", .val = 0x22}, 64 | {.opt = "6", .val = 0x23}, 65 | {.opt = "7", .val = 0x24}, 66 | {.opt = "8", .val = 0x25}, 67 | {.opt = "9", .val = 0x26}, 68 | {.opt = "0", .val = 0x27}, 69 | {.opt = "return", .val = 0x28}, 70 | {.opt = "enter", .val = 0x28}, 71 | {.opt = "esc", .val = 0x29}, 72 | {.opt = "escape", .val = 0x29}, 73 | {.opt = "bckspc", .val = 0x2a}, 74 | {.opt = "backspace", .val = 0x2a}, 75 | {.opt = "tab", .val = 0x2b}, 76 | {.opt = "space", .val = 0x2c}, 77 | {.opt = "minus", .val = 0x2d}, 78 | {.opt = "dash", .val = 0x2d}, 79 | {.opt = "equals", .val = 0x2e}, 80 | {.opt = "equal", .val = 0x2e}, 81 | {.opt = "lbracket", .val = 0x2f}, 82 | {.opt = "rbracket", .val = 0x30}, 83 | {.opt = "backslash", .val = 0x31}, 84 | {.opt = "hash", .val = 0x32}, 85 | {.opt = "number", .val = 0x32}, 86 | {.opt = "semicolon", .val = 0x33}, 87 | {.opt = "quote", .val = 0x34}, 88 | {.opt = "backquote", .val = 0x35}, 89 | {.opt = "tilde", .val = 0x35}, 90 | {.opt = "comma", .val = 0x36}, 91 | {.opt = "period", .val = 0x37}, 92 | {.opt = "stop", .val = 0x37}, 93 | {.opt = "slash", .val = 0x38}, 94 | {.opt = "caps-lock", .val = 0x39}, 95 | {.opt = "capslock", .val = 0x39}, 96 | {.opt = "f1", .val = 0x3a}, 97 | {.opt = "f2", .val = 0x3b}, 98 | {.opt = "f3", .val = 0x3c}, 99 | {.opt = "f4", .val = 0x3d}, 100 | {.opt = "f5", .val = 0x3e}, 101 | {.opt = "f6", .val = 0x3f}, 102 | {.opt = "f7", .val = 0x40}, 103 | {.opt = "f8", .val = 0x41}, 104 | {.opt = "f9", .val = 0x42}, 105 | {.opt = "f10", .val = 0x43}, 106 | {.opt = "f11", .val = 0x44}, 107 | {.opt = "f12", .val = 0x45}, 108 | {.opt = "print", .val = 0x46}, 109 | {.opt = "scroll-lock", .val = 0x47}, 110 | {.opt = "scrolllock", .val = 0x47}, 111 | {.opt = "pause", .val = 0x48}, 112 | {.opt = "insert", .val = 0x49}, 113 | {.opt = "home", .val = 0x4a}, 114 | {.opt = "pageup", .val = 0x4b}, 115 | {.opt = "pgup", .val = 0x4b}, 116 | {.opt = "del", .val = 0x4c}, 117 | {.opt = "delete", .val = 0x4c}, 118 | {.opt = "end", .val = 0x4d}, 119 | {.opt = "pagedown", .val = 0x4e}, 120 | {.opt = "pgdown", .val = 0x4e}, 121 | {.opt = "right", .val = 0x4f}, 122 | {.opt = "left", .val = 0x50}, 123 | {.opt = "down", .val = 0x51}, 124 | {.opt = "up", .val = 0x52}, 125 | {.opt = "num-lock", .val = 0x53}, 126 | {.opt = "numlock", .val = 0x53}, 127 | {.opt = "kp-divide", .val = 0x54}, 128 | {.opt = "kp-multiply", .val = 0x55}, 129 | {.opt = "kp-minus", .val = 0x56}, 130 | {.opt = "kp-plus", .val = 0x57}, 131 | {.opt = "kp-enter", .val = 0x58}, 132 | {.opt = "kp-return", .val = 0x58}, 133 | {.opt = "kp-1", .val = 0x59}, 134 | {.opt = "kp-2", .val = 0x5a}, 135 | {.opt = "kp-3", .val = 0x5b}, 136 | {.opt = "kp-4", .val = 0x5c}, 137 | {.opt = "kp-5", .val = 0x5d}, 138 | {.opt = "kp-6", .val = 0x5e}, 139 | {.opt = "kp-7", .val = 0x5f}, 140 | {.opt = "kp-8", .val = 0x60}, 141 | {.opt = "kp-9", .val = 0x61}, 142 | {.opt = "kp-0", .val = 0x62}, 143 | {.opt = "kp-period", .val = 0x63}, 144 | {.opt = "kp-stop", .val = 0x63}, 145 | {.opt = "application", .val = 0x65}, 146 | {.opt = "power", .val = 0x66}, 147 | {.opt = "kp-equals", .val = 0x67}, 148 | {.opt = "kp-equal", .val = 0x67}, 149 | {.opt = "f13", .val = 0x68}, 150 | {.opt = "f14", .val = 0x69}, 151 | {.opt = "f15", .val = 0x6a}, 152 | {.opt = "f16", .val = 0x6b}, 153 | {.opt = "f17", .val = 0x6c}, 154 | {.opt = "f18", .val = 0x6d}, 155 | {.opt = "f19", .val = 0x6e}, 156 | {.opt = "f20", .val = 0x6f}, 157 | {.opt = "f21", .val = 0x70}, 158 | {.opt = "f22", .val = 0x71}, 159 | {.opt = "f23", .val = 0x72}, 160 | {.opt = "f24", .val = 0x73}, 161 | {.opt = "execute", .val = 0x74}, 162 | {.opt = "help", .val = 0x75}, 163 | {.opt = "menu", .val = 0x76}, 164 | {.opt = "select", .val = 0x77}, 165 | {.opt = "cancel", .val = 0x78}, 166 | {.opt = "redo", .val = 0x79}, 167 | {.opt = "undo", .val = 0x7a}, 168 | {.opt = "cut", .val = 0x7b}, 169 | {.opt = "copy", .val = 0x7c}, 170 | {.opt = "paste", .val = 0x7d}, 171 | {.opt = "find", .val = 0x7e}, 172 | {.opt = "mute", .val = 0x7f}, 173 | {.opt = "volume-up", .val = 0x80}, // These are multimedia keys, they will not work on standard keyboard, they need a different USB descriptor 174 | {.opt = "volume-down", .val = 0x81}, 175 | {.opt = "europe-2", .val = 0x64}, //for non-us keyboard, this key is between left-shift and y/z 176 | {.opt = NULL} 177 | }; 178 | 179 | int keyboard_fill_report(char report[8], char buf[BUF_LEN], int *hold) 180 | { 181 | char *tok = strtok(buf, " "); 182 | int key = 0; 183 | int i = 0; 184 | 185 | for (; tok != NULL; tok = strtok(NULL, " ")) { 186 | 187 | if (strncmp(tok, "--", 2) == 0) 188 | tok += 2; 189 | 190 | if (strcmp(tok, "quit") == 0) 191 | return -1; 192 | 193 | if (strcmp(tok, "hold") == 0) { 194 | *hold = 1; 195 | continue; 196 | } 197 | 198 | if (key < 6) { 199 | for (i = 0; kval[i].opt != NULL; i++) 200 | if (strcmp(tok, kval[i].opt) == 0) { 201 | report[2 + key++] = kval[i].val; 202 | break; 203 | } 204 | if (kval[i].opt != NULL) 205 | continue; 206 | } 207 | 208 | for (i = 0; kmod[i].opt != NULL; i++) 209 | if (strcmp(tok, kmod[i].opt) == 0) { 210 | report[0] = report[0] | kmod[i].val; 211 | break; 212 | } 213 | if (kmod[i].opt != NULL) 214 | continue; 215 | 216 | if (key < 6) 217 | fprintf(stderr, "unknown option: %s\n", tok); 218 | } 219 | return 8; 220 | } 221 | 222 | static struct options mmod[] = { 223 | {.opt = "--b1", .val = 0x01}, 224 | {.opt = "--b2", .val = 0x02}, 225 | {.opt = "--b3", .val = 0x04}, 226 | {.opt = NULL} 227 | }; 228 | 229 | int mouse_fill_report(char report[8], char buf[BUF_LEN], int *hold) 230 | { 231 | char *tok = strtok(buf, " "); 232 | int mvt = 0; 233 | int i = 0; 234 | for (; tok != NULL; tok = strtok(NULL, " ")) { 235 | 236 | if (strcmp(tok, "--quit") == 0) 237 | return -1; 238 | 239 | if (strcmp(tok, "--hold") == 0) { 240 | *hold = 1; 241 | continue; 242 | } 243 | 244 | for (i = 0; mmod[i].opt != NULL; i++) 245 | if (strcmp(tok, mmod[i].opt) == 0) { 246 | report[0] = report[0] | mmod[i].val; 247 | break; 248 | } 249 | if (mmod[i].opt != NULL) 250 | continue; 251 | 252 | if (!(tok[0] == '-' && tok[1] == '-') && mvt < 2) { 253 | errno = 0; 254 | report[1 + mvt++] = (char)strtol(tok, NULL, 0); 255 | if (errno != 0) { 256 | fprintf(stderr, "Bad value:'%s'\n", tok); 257 | report[1 + mvt--] = 0; 258 | } 259 | continue; 260 | } 261 | 262 | fprintf(stderr, "unknown option: %s\n", tok); 263 | } 264 | return 3; 265 | } 266 | 267 | static struct options jmod[] = { 268 | {.opt = "--b1", .val = 0x10}, 269 | {.opt = "--b2", .val = 0x20}, 270 | {.opt = "--b3", .val = 0x40}, 271 | {.opt = "--b4", .val = 0x80}, 272 | {.opt = "--hat1", .val = 0x00}, 273 | {.opt = "--hat2", .val = 0x01}, 274 | {.opt = "--hat3", .val = 0x02}, 275 | {.opt = "--hat4", .val = 0x03}, 276 | {.opt = "--hatneutral", .val = 0x04}, 277 | {.opt = NULL} 278 | }; 279 | 280 | int joystick_fill_report(char report[8], char buf[BUF_LEN], int *hold) 281 | { 282 | char *tok = strtok(buf, " "); 283 | int mvt = 0; 284 | int i = 0; 285 | 286 | *hold = 1; 287 | 288 | /* set default hat position: neutral */ 289 | report[3] = 0x04; 290 | 291 | for (; tok != NULL; tok = strtok(NULL, " ")) { 292 | 293 | if (strcmp(tok, "--quit") == 0) 294 | return -1; 295 | 296 | for (i = 0; jmod[i].opt != NULL; i++) 297 | if (strcmp(tok, jmod[i].opt) == 0) { 298 | report[3] = (report[3] & 0xF0) | jmod[i].val; 299 | break; 300 | } 301 | if (jmod[i].opt != NULL) 302 | continue; 303 | 304 | if (!(tok[0] == '-' && tok[1] == '-') && mvt < 3) { 305 | errno = 0; 306 | report[mvt++] = (char)strtol(tok, NULL, 0); 307 | if (errno != 0) { 308 | fprintf(stderr, "Bad value:'%s'\n", tok); 309 | report[mvt--] = 0; 310 | } 311 | continue; 312 | } 313 | 314 | fprintf(stderr, "unknown option: %s\n", tok); 315 | } 316 | return 4; 317 | } 318 | 319 | void print_options(char c) 320 | { 321 | int i = 0; 322 | 323 | if (c == 'k') { 324 | printf(" keyboard options:\n" 325 | " hold\n"); 326 | for (i = 0; kmod[i].opt != NULL; i++) 327 | printf("\t\t%s\n", kmod[i].opt); 328 | printf("\n keyboard values:\n" 329 | " [a-z] or [0-9] or\n"); 330 | for (i = 0; kval[i].opt != NULL; i++) 331 | printf("\t\t%-8s%s", kval[i].opt, i % 2 ? "\n" : ""); 332 | printf("\n"); 333 | } else if (c == 'm') { 334 | printf(" mouse options:\n" 335 | " --hold\n"); 336 | for (i = 0; mmod[i].opt != NULL; i++) 337 | printf("\t\t%s\n", mmod[i].opt); 338 | printf("\n mouse values:\n" 339 | " Two signed numbers\n\n"); 340 | } else { 341 | printf(" joystick options:\n"); 342 | for (i = 0; jmod[i].opt != NULL; i++) 343 | printf("\t\t%s\n", jmod[i].opt); 344 | printf("\n joystick values:\n" 345 | " three signed numbers\n" 346 | "--quit to close\n"); 347 | } 348 | } 349 | 350 | int main(int argc, const char *argv[]) 351 | { 352 | const char *filename = NULL; 353 | int fd = 0; 354 | char buf[BUF_LEN]; 355 | int cmd_len; 356 | char report[8]; 357 | int to_send = 8; 358 | int hold = 0; 359 | fd_set rfds; 360 | int retval, i; 361 | 362 | if (argc < 3) { 363 | fprintf(stderr, "Usage: %s devname mouse|keyboard|joystick\n", 364 | argv[0]); 365 | 366 | print_options('k'); 367 | print_options('m'); 368 | print_options('j'); 369 | 370 | return 1; 371 | } 372 | 373 | if (argv[2][0] != 'k' && argv[2][0] != 'm' && argv[2][0] != 'j') 374 | return 2; 375 | 376 | filename = argv[1]; 377 | 378 | if ((fd = open(filename, O_RDWR, 0666)) == -1) { 379 | perror(filename); 380 | return 3; 381 | } 382 | 383 | while (42) { 384 | 385 | FD_ZERO(&rfds); 386 | FD_SET(STDIN_FILENO, &rfds); 387 | FD_SET(fd, &rfds); 388 | 389 | retval = select(fd + 1, &rfds, NULL, NULL, NULL); 390 | if (retval == -1 && errno == EINTR) 391 | continue; 392 | if (retval < 0) { 393 | perror("select()"); 394 | return 4; 395 | } 396 | 397 | if (FD_ISSET(fd, &rfds)) { 398 | cmd_len = read(fd, buf, BUF_LEN - 1); 399 | printf("recv report:"); 400 | for (i = 0; i < cmd_len; i++) 401 | printf(" %02x", buf[i]); 402 | printf("\n"); 403 | } 404 | 405 | if (FD_ISSET(STDIN_FILENO, &rfds)) { 406 | memset(report, 0x0, sizeof(report)); 407 | cmd_len = read(STDIN_FILENO, buf, BUF_LEN - 1); 408 | 409 | if (cmd_len == 0) 410 | break; 411 | 412 | buf[cmd_len - 1] = '\0'; 413 | hold = 0; 414 | 415 | memset(report, 0x0, sizeof(report)); 416 | if (argv[2][0] == 'k') 417 | to_send = keyboard_fill_report(report, buf, &hold); 418 | else if (argv[2][0] == 'm') 419 | to_send = mouse_fill_report(report, buf, &hold); 420 | else 421 | to_send = joystick_fill_report(report, buf, &hold); 422 | 423 | if (to_send == -1) 424 | break; 425 | 426 | if (write(fd, report, to_send) != to_send) { 427 | perror(filename); 428 | return 5; 429 | } 430 | if (!hold) { 431 | memset(report, 0x0, sizeof(report)); 432 | if (write(fd, report, to_send) != to_send) { 433 | perror(filename); 434 | return 6; 435 | } 436 | } 437 | } 438 | } 439 | 440 | close(fd); 441 | return 0; 442 | } 443 | -------------------------------------------------------------------------------- /hid-gadget-test/libs/armeabi/hid-gadget-test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plowsec/android-ducky/e29639a7694e5d048d30266a4804920d53ed6d6e/hid-gadget-test/libs/armeabi/hid-gadget-test -------------------------------------------------------------------------------- /hid-gadget-test/libs/armeabi/hid-gadget-test-qwerty: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plowsec/android-ducky/e29639a7694e5d048d30266a4804920d53ed6d6e/hid-gadget-test/libs/armeabi/hid-gadget-test-qwerty -------------------------------------------------------------------------------- /hid-gadget-test/obj/local/armeabi/hid-gadget-test: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plowsec/android-ducky/e29639a7694e5d048d30266a4804920d53ed6d6e/hid-gadget-test/obj/local/armeabi/hid-gadget-test -------------------------------------------------------------------------------- /hid-gadget-test/obj/local/armeabi/objs/hid-gadget-test/hid-gadget-test.o: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/plowsec/android-ducky/e29639a7694e5d048d30266a4804920d53ed6d6e/hid-gadget-test/obj/local/armeabi/objs/hid-gadget-test/hid-gadget-test.o -------------------------------------------------------------------------------- /hid-gadget-test/obj/local/armeabi/objs/hid-gadget-test/hid-gadget-test.o.d: -------------------------------------------------------------------------------- 1 | /home/vladimir/dev/public/hid/obj/local/armeabi/objs/hid-gadget-test/hid-gadget-test.o: \ 2 | /home/vladimir/dev/public/hid/hid-gadget-test.c \ 3 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/pthread.h \ 4 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/time.h \ 5 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/cdefs.h \ 6 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/cdefs_elf.h \ 7 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/android/api-level.h \ 8 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/time.h \ 9 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/types.h \ 10 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/stdint.h \ 11 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/_types.h \ 12 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/machine/_types.h \ 13 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/_wchar_limits.h \ 14 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/posix_types.h \ 15 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/stddef.h \ 16 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/compiler.h \ 17 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/posix_types.h \ 18 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/types.h \ 19 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/types.h \ 20 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/machine/kernel.h \ 21 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/sysmacros.h \ 22 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/time.h \ 23 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/siginfo.h \ 24 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm-generic/siginfo.h \ 25 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/signal.h \ 26 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/limits.h \ 27 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/limits.h \ 28 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/limits.h \ 29 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/machine/internal_types.h \ 30 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/machine/limits.h \ 31 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/syslimits.h \ 32 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/page.h \ 33 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/string.h \ 34 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/malloc.h \ 35 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/signal.h \ 36 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm-generic/signal.h \ 37 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/ucontext.h \ 38 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/user.h \ 39 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/sigcontext.h \ 40 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sched.h \ 41 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/stdio.h \ 42 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/ctype.h \ 43 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/fcntl.h \ 44 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/fcntl.h \ 45 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/fcntl.h \ 46 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm-generic/fcntl.h \ 47 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/unistd.h \ 48 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/select.h \ 49 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/sysconf.h \ 50 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/capability.h \ 51 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/pathconf.h \ 52 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/errno.h \ 53 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/errno.h \ 54 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/errno.h \ 55 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm-generic/errno.h \ 56 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm-generic/errno-base.h \ 57 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/stdlib.h \ 58 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/alloca.h \ 59 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/strings.h \ 60 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/memory.h 61 | 62 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/pthread.h: 63 | 64 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/time.h: 65 | 66 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/cdefs.h: 67 | 68 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/cdefs_elf.h: 69 | 70 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/android/api-level.h: 71 | 72 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/time.h: 73 | 74 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/types.h: 75 | 76 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/stdint.h: 77 | 78 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/_types.h: 79 | 80 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/machine/_types.h: 81 | 82 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/_wchar_limits.h: 83 | 84 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/posix_types.h: 85 | 86 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/stddef.h: 87 | 88 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/compiler.h: 89 | 90 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/posix_types.h: 91 | 92 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/types.h: 93 | 94 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/types.h: 95 | 96 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/machine/kernel.h: 97 | 98 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/sysmacros.h: 99 | 100 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/time.h: 101 | 102 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/siginfo.h: 103 | 104 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm-generic/siginfo.h: 105 | 106 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/signal.h: 107 | 108 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/limits.h: 109 | 110 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/limits.h: 111 | 112 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/limits.h: 113 | 114 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/machine/internal_types.h: 115 | 116 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/machine/limits.h: 117 | 118 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/syslimits.h: 119 | 120 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/page.h: 121 | 122 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/string.h: 123 | 124 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/malloc.h: 125 | 126 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/signal.h: 127 | 128 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm-generic/signal.h: 129 | 130 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/ucontext.h: 131 | 132 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/user.h: 133 | 134 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/sigcontext.h: 135 | 136 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sched.h: 137 | 138 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/stdio.h: 139 | 140 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/ctype.h: 141 | 142 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/fcntl.h: 143 | 144 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/fcntl.h: 145 | 146 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/fcntl.h: 147 | 148 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm-generic/fcntl.h: 149 | 150 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/unistd.h: 151 | 152 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/select.h: 153 | 154 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/sys/sysconf.h: 155 | 156 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/capability.h: 157 | 158 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/pathconf.h: 159 | 160 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/errno.h: 161 | 162 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/linux/errno.h: 163 | 164 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm/errno.h: 165 | 166 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm-generic/errno.h: 167 | 168 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/asm-generic/errno-base.h: 169 | 170 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/stdlib.h: 171 | 172 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/alloca.h: 173 | 174 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/strings.h: 175 | 176 | /opt/android-ndk/platforms/android-3/arch-arm/usr/include/memory.h: 177 | --------------------------------------------------------------------------------