Commit Graph

55 Commits

Author SHA1 Message Date
Bob Badour
f7cf305656 [LSC] Add LOCAL_LICENSE_KINDS to development
Added SPDX-license-identifier-Apache-2.0 to:
  apps/BluetoothDebug/Android.bp
  apps/BuildWidget/Android.bp
  apps/CustomLocale/Android.bp
  apps/DevelopmentSettings/Android.bp
  apps/Fallback/Android.bp
  apps/GestureBuilder/Android.bp
  apps/NinePatchLab/Android.bp
  apps/OBJViewer/Android.bp
  apps/PushApiAuthenticator/Android.bp
  apps/PushApiTestAppOne/Android.bp
  apps/PushApiTestAppTwo/Android.bp
  apps/SdkSetup/Android.bp
  apps/SettingInjectorSample/Android.bp
  apps/WidgetPreview/Android.bp
  apps/launchperf/Android.bp
  cmds/monkey/Android.mk
  gsi/gsi_util/Android.bp
  gsi/repack_super_image/Android.bp
  host/windows/Android.bp
  python-packages/Android.bp
  samples/AccelerometerPlay/Android.bp
  samples/AdaptiveIconSample/Android.bp
  samples/AliasActivity/Android.bp
  samples/AndroidBeamDemo/Android.bp
  samples/AppNavigation/Android.bp
  samples/AutofillKeyboard/Android.bp
  samples/BackupRestore/Android.bp
  samples/BasicGLSurfaceView/Android.bp
  samples/BluetoothChat/Android.bp
  samples/BrokenKeyDerivation/Android.bp
  samples/BrokenKeyDerivation/tests/Android.bp
  samples/BusinessCard/Android.bp
  samples/Compass/Android.bp
  samples/ContactManager/Android.bp
  samples/CubeLiveWallpaper/Android.bp
  samples/DataWiper/Android.bp
  samples/DeviceAdminWhitelistedAccount/Android.bp
  samples/FixedGridLayout/Android.bp
  samples/HeavyWeight/Android.bp
  samples/HelloActivity/Android.bp
  samples/HelloActivity/tests/Android.bp
  samples/HelloEffects/Android.bp
  samples/Home/Android.bp
  samples/HoneycombGallery/Android.bp
  samples/InlineFillService/Android.bp
  samples/JetBoy/Android.bp
  samples/LceDemo/Android.bp
  samples/LunarLander/Android.bp
  samples/LunarLander/tests/Android.bp
  samples/MultiResolution/Android.bp
  samples/MultiWindow/Android.bp
  samples/MySampleRss/Android.bp
  samples/NotePad/Android.bp
  samples/Obb/Android.bp
  samples/RSSReader/Android.bp
  samples/ReceiveShareDemo/Android.bp
  samples/SampleSyncAdapter/Android.bp
  samples/SimpleJNI/Android.bp
  samples/SimpleJNI/jni/Android.bp
  samples/SipDemo/Android.bp
  samples/SkeletonApp/Android.bp
  samples/SkeletonApp/tests/Android.bp
  samples/Snake/Android.bp
  samples/Snake/tests/Android.bp
  samples/SoftKeyboard/Android.bp
  samples/SpellChecker/HelloSpellChecker/Android.bp
  samples/SpellChecker/SampleSpellCheckerService/Android.bp
  samples/StackWidget/Android.bp
  samples/ThemedNavBarKeyboard/Android.bp
  samples/ToyVpn/Android.bp
  samples/TtsEngine/Android.bp
  samples/USB/AdbTest/Android.bp
  samples/USB/MissileLauncher/Android.bp
  samples/UiAutomator/Android.mk
  samples/Vault/Android.bp
  samples/Vault/tests/Android.bp
  samples/VoiceRecognitionService/Android.bp
  samples/VoicemailProviderDemo/Android.bp
  samples/WeatherListWidget/Android.bp
  samples/WiFiDirectDemo/Android.bp
  samples/WiFiDirectServiceDiscovery/Android.bp
  samples/Wiktionary/Android.bp
  samples/WiktionarySimple/Android.bp
  samples/XmlAdapters/Android.bp
  samples/apkcachetest/Android.bp
  samples/training/NsdChat/Android.bp
  scripts/Android.bp
  testrunner/Android.mk
  testrunner/tests/Android_native.mk
  tools/apkcheck/Android.bp
  tools/bugreport/Android.bp
  tools/etc1tool/Android.bp
  tools/idegen/Android.bp
  tools/mkstubs/Android.bp
  tools/rmtypedefs/Android.bp
  vndk/Android.bp
  vndk/tools/Android.bp
  vndk/tools/elfcheck/Android.bp
  vndk/tools/header-checker/Android.bp
  vndk/tools/header-checker/src/repr/protobuf/proto/Android.bp
  vndk/tools/header-checker/tests/integration/ifunc/Android.bp
  vndk/tools/header-checker/tests/integration/version_script_example/Android.bp
  vndk/tools/image-diff-tool/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD
    SPDX-license-identifier-CPL-1.0 SPDX-license-identifier-MIT
    SPDX-license-identifier-Unicode-DFS SPDX-license-identifier-W3C
    legacy_restricted legacy_unencumbered
to:
  Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-CPL-1.0
to:
  samples/SearchableDictionary/Android.bp

Added SPDX-license-identifier-Apache-2.0 legacy_unencumbered
to:
  tools/Android.bp

Added SPDX-license-identifier-BSD SPDX-license-identifier-CPL-1.0
    SPDX-license-identifier-MIT SPDX-license-identifier-Unicode-DFS
    SPDX-license-identifier-W3C
to:
  sdk/Android.bp

Added legacy_restricted
to:
  samples/KeyChainDemo/Android.bp
  tools/line_endings/Android.bp
  vndk/tools/definition-tool/datasets/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work
Change-Id: I9847e00fb4278bc083b4debbc751003c995ea45c
2021-02-12 17:13:45 -08:00
Joe Bolinger
63f99de576 Add Glass Enterprise Editions to USB driver.
Bug: 161150854
Test: Rebuild (signed) driver and run fastboot/adb devices to verify on Windows 10
Change-Id: I6e17d6b61f4c194bfc20b7741c66b0906d4ad9c6
2020-08-04 14:53:46 -07:00
Yo Chiang
76b687fa5c Specify import library of DLL prebuilt
Bug: 151744695
Test: TH pre-submit
Change-Id: I27f666fdf8371a4159d14a87d94c5e19bf49d04a
2020-03-19 19:24:19 +08:00
Tao Bao
ad06f1194d Add the product id for recovery (D001).
recovery uses its own product id of D001, for adb/sideload/resuce modes.

Bug: 136716811
Test: Install the (unsigned) driver on Windows 7. `adb devices` shows a
      device under recovery mode (adb/sideload/rescue).
Change-Id: Ie7526644825c400c9e2b3a9daa9fb93ae8ed00b1
2019-07-16 13:00:04 -07:00
Pirama Arumuga Nainar
fd997bc5e0 Add an import library for AdbWinApi
Bug: http://b/110800681

Lld, unlike the MinGW binutils linker, requires import libraries while
linking.  Create one for the prebuilt AdbWinApi.dll.

AdbWinApi.def is a list of Adb* functions in prebuilt/usb/AdbWinApi.dll.

AdbWinApi.lib, which is the one passed to lld when linking, is created
as follows:

// First symlink llvm-ar to llvm-dlltool in Clang prebuilts.
$ prebuilts/clang/host/linux-x86/clang-r353983b/bin/llvm-dlltool \
    -D AdbWinApi.dll -k -m i386 \
    --input-def development/host/windows/prebuilt/usb/AdbWinApi.def \
    --output-lib development/host/windows/prebuilt/usb/AdbWinApi.lib

Import library for AdbWinUsbApi.dll doesn't seem necessary since it's
not directly part of any link command.

Test: The following commands pass (but throw exception without this change):
      $ adb.exe devices
      $ fastboot.exe devices

Change-Id: I10481d43b59adc5464f60bcff7d49ed206c12a5b
2019-04-16 16:18:23 -07:00
Josh Gao
610418d6aa AdbWinApi: switch to Android.bp.
Bug: http://b/71721338
Test: manually ran adb/fastboot on windows
Change-Id: Ia4b63776f7abc7655940a928995be647c28d1b5c
2018-01-08 18:51:52 -08:00
Dan Willemsen
b2fa10bf9c Remove USE_MINGW, whitelist modules for windows
Bug: 23566667
Change-Id: I944f48aea13abef0efa157c82ef7c91a63429eb5
2015-08-28 13:29:35 -07:00
Spencer Low
487b1deae9 AdbWinUsbApi.dll: fix race condition crash in WinUsb.dll
There is a race condition in AdbWinUsbApi.dll where AdbCloseHandle() of an
interface would clobber the WinUsb handles, causing a concurrent
Adb{Read,Write}EndpointSync() to crash.

The fix is to make AdbCloseHandle(endpoint) set a flag to prevent future IOs
from starting up, abort any pending IOs, and wait for the pending IOs to abort.
Adb{Read,Write}EndpointSync() participates in this scheme.

There is still a race condition if the caller calls AdbCloseHandle(interface)
before calling AdbCloseHandle(endpoint). No AOSP code does this and assuming
that this never happens simplifies the fix.

This fix also ignores Adb{Read,Write}EndpointAsync() (the async APIs) since
those APIs are unused by AOSP.

This fix should not affect devices whose vendor supplies Windows USB drivers
that use a 'legacy kernel driver'. This causes AdbWinApi.dll to call a 'legacy
kernel driver' instead of AdbWinUsbApi.dll (which uses WinUsb.dll which uses a
kernel driver included with Windows). The source code for the 'legacy kernel
driver' was deleted from AOSP over 4 years ago, so it is probably deprecated
(I don't know the official status of it). Even so, I wouldn't be surprised if
some modern 3rd party devices were still using the legacy driver or a similar
driver derived from the original source code.

Also in this change:

 - Added a test case to adb_winapi_test that reproduces the race condition and
   verifies the fix.

 - adb_winapi_test misc: more strictly check return values and error codes,
   symbolize some dumped data to make things more readable, disable old test
   code that looked for specific hardware, test AdbGetInterfaceName() the same
   way adb uses it, fix dumping of initial "handshake".

 - Increased AdbWinUsbApi.dll file version info from 2.0.0.0 to 2.0.0.1.

 - Update AdbWinUsbApi.dll in prebuilt tree.

 - Include AdbWinUsbApi.pdb (debugging symbols) so the DLL can be debugged in
   the future (or at least so crash addresses can be manually symbolized).

 - Update AdbWinApi.dll, AdbWinUsbApi.dll, adb_winapi_test.exe build
   environments to WDK 7.1.0, which seems to be the publicly available closest
   version to what built the last version of these files.

   This entailed modifying SOURCES files to use USE_NATIVE_EH=1 instead of
   USER_C_FLAGS=/EHsc, removing /Wp64, manually setting DLL base addresses to
   the old address, using DEBUG_CRTS=1 to pickup the debug ATL for checked
   builds.

 - Update BUILDME.TXT files with up-to-date instructions.

 - For source files that are already majority CRLF, make the whole file CRLF.

 - Update SOURCES to explicitly set Windows Vista as the target. This means
   that future rebuilders don't need to worry as much about their build
   environment.

Bug: https://code.google.com/p/android/issues/detail?id=161890

Change-Id: I30a4e2ff3919929001c2319c4bb80354f7bcfda0
Signed-off-by: Spencer Low <CompareAndSwap@gmail.com>
2015-08-12 14:14:52 -07:00
Dan Albert
28f76a9b1b Make adb_api.h safe to include first.
Change-Id: I0fd2e3c52c69f67d7cd2b24ffcfa764613817b6f
2015-02-24 16:40:45 -08:00
Siva Velusamy
f41962ca29 Android SDK Windows USB driver: Project Tango pid
Change-Id: Id4a366755390338d9b8add35ad2df66eda9f2324
2014-09-10 14:19:42 -07:00
Raphael Moll
700c6fd81d Android USB driver: support 4EE7 (Nexus adb only).
Bug: b/14988808
Change-Id: Ib855f063c949649c059da09483f782d09fbf3d2c
2014-06-06 12:50:21 -07:00
Ying Wang
3bc8fd9e50 Host multilib build.
Bug: 13751317
Change-Id: I05ad98c1f3f55e3288fbcc169311a7685b872fd9
2014-05-20 17:59:48 -07:00
Raphael Moll
260db8ce43 Android SDK Windows USB driver: Glass PID.
Change-Id: Id190e9e83c48bf6b3df08707efdbf154720c3a78
2014-01-29 14:57:49 -08:00
Raphael Moll
4bc66d0f85 SDK: Windows USB driver rev 8.
Fixes for Nexus 7 and generic PIDs.

SDK Bugs: b/6494263, b/9322844

Change-Id: I40ea1d1abdb557dd7c67873ac592cbc2320754d5
2013-07-10 12:38:55 -07:00
Raphael Moll
fbb5fc390a Windows USB Driver for generic, rev 7
Change-Id: Ie646d5709108ffa69d9729cfe6e5674a47e1d4ff
2012-08-28 13:21:49 -07:00
Raphael Moll
c9533ad3cf Windows USB Driver for generic + Q, rev 7.
Change-Id: I6a6bf4b89405ebd51c72685c85a1b894de0e6897
2012-08-27 09:25:24 -07:00
Raphael Moll
7fa6b8dd1b Update SDK Windows USB driver definition.
Change-Id: Ia4ad0453599476eea72fcd90f7c200ec57490d3f
2012-06-22 09:43:25 -07:00
Raphael
fb5178a947 SDK: updating android Windows USB Driver.
This makes it match Change I5508492c.

Change-Id: I191e77e2704efcecf509469f03d60eb395ecad2d
2011-10-27 15:43:22 -07:00
Raphael
327b8aa802 USB driver: update to public rev 4
Change-Id: Icecde3b08876a939db3f170ba9a4b23260df336f
2010-12-06 16:33:25 -08:00
Jean-Baptiste Queru
7fd3f41504 am a279716d: am 0e5e7996: Merge from open-source master
* commit 'a279716dd7610b1702d8302824ca6c2a0326db6a':
  Remove obsolete USB Driver "legacy" sources & files.
2010-12-02 07:57:18 -08:00
Raphael Moll
d0041b0e9c Remove obsolete USB Driver "legacy" sources & files.
Change-Id: I4357c1417e6472395b803b799f43aae18f845be9
2010-12-01 12:51:15 -08:00
Raphael
2dcfe08b48 Merge commit '4e75b80a' into merge
Conflicts:
	host/windows/usb/android_winusb.inf

Change-Id: I64a3be958e85302d0a6213d1c46ff9e7214ef352
2010-11-08 12:51:51 -08:00
Raphael Moll
66980b1877 Fix DOS end-of-lines in winusb INF file.
The file has a mix of unix and DOS-mode end-of-lines.
This CL just fixes the end-of-line to make it a consistent DOS-mode.
There is no change to the actualy content.

Change-Id: I6635ec87907f68e1d34c807f712723804eb0e698
2010-11-05 16:35:01 -07:00
Vladimir Chtchetkine
deef918041 Add Samsung VID/PID to android_winusb.inf fixing bug 2687489
Change-Id: I31baae3400ef8ef04270fd17352ee81cd244d779
2010-05-18 13:45:36 -07:00
Raphael
f3dca555bf Add new N1 PID to Windows USB driver INF.
SDK Bug: 2418399

Change-Id: I76c25a61bc67e07ebf82209c8172dcfe93eff2eb
2010-02-04 11:18:37 -08:00
Xavier Ducrohet
a6181df431 Add Dell Mini5 to the USB driver.
Change-Id: If0758e6dc43541fd2877e7d00ff3abf9d354a299
2010-01-21 17:36:19 -08:00
vchtchetkine
ecef8139de Fixed 2009-12-11 11:38:41 -08:00
Raphael
0c638bb8b0 Add sholes to Windows USB Driver in Eclair.
SDK BUG 2132512

Change-Id: I935c71f2fb689ed8e493e3375ad676f6f66a3f76
2009-10-08 14:33:42 -07:00
vchtchetkine
653de15590 Reformat .inf file for better reading and remove redundancies 2009-08-12 14:18:32 -07:00
Raphael
1620a180c2 BUG 2033924: Add AdbWinUsbApi.dll to prebuilt for Windows SDK 2009-08-11 11:47:30 -07:00
vchtchetkine
78ce46361b Complete AdbWinApi split: submit prebuild binaries.
As the result of the split, now we have two DLLs that deal with USB driver
connection on Windows. AdbWinApi.dll deals with legacy driver and LoadLibrary
AdbWinUsbApi.dll on condition that WINUSB.DLL is installed on user's machine.
When both DLLs must be installed in the same location in SDK.
BUG 2033924
2009-08-10 14:21:51 -07:00
vchtchetkine
fd6f01eb69 Update ignore file to include new ignoring patterns 2009-08-10 13:34:28 -07:00
vchtchetkine
acc6f82643 Split AdbWinApi.dll into two dlls to remove dependency on WINUSB.DLL
Move all WINUSB-dependent functionality into AdbWinUsbApi.dll in order to
enable ADB on condition that WINUSB has not been installed.
In this patch set new file (adb_winusb_api.h) has been added where I moved
typedef that broke the build. Aso, adb_api.cpp and AdbWinApi.cpp were changed
to include that new header file.
BUG 2033924
2009-08-07 11:07:53 -07:00
Raphael
3e44f3b231 Revert "Split AdbWinApi.dll into two dlls to remove dependency on WINUSB.DLL"
which breaks the Windows SDK on Donut.

This reverts commit f855c4e846.
2009-08-06 20:51:11 -07:00
vchtchetkine
f855c4e846 Split AdbWinApi.dll into two dlls to remove dependency on WINUSB.DLL
Move all WINUSB-dependent functionality into AdbWinUsbApi.dll in order to
enable ADB on condition that WINUSB has not been installed.
2009-08-05 17:21:15 -07:00
vchtchetkine
199aeb031d Move legacy driver binaries to the legacy driver directory 2009-07-30 15:05:01 -07:00
vchtchetkine
f5d51ce49f Add .inf file needed for WinUsb framework installation 2009-07-30 11:29:57 -07:00
vchtchetkine
17851887c2 Bump up AdbWinApi.dll version and submit prebuilt AdbWinApi.dll 2009-07-30 08:59:30 -07:00
vchtchetkine
71e765b54c Make changes to enable driver build in new location 2009-07-29 18:00:04 -07:00
vchtchetkine
1db5502159 Copy legacy driver source code as a sample for custom USB drivers
The primary usage for this code is to provide vendors / customers who for some
reasons are not satisfied with WinUsb, with a sample custom driver code that is
compliant with our AdbWinApi.dll. So vendors / customers can build their own
custom USB driver that can be recognized by AdbWinApi, and can be accessible from
adb.exe
2009-07-29 16:25:34 -07:00
vchtchetkine
39164844f1 Add classes encapsulatinglegacy USB API
Added implementation for endpoints and overlapped I/O support for legacy API support.
2009-07-28 13:09:51 -07:00
vchtchetkine
59fc68ba26 Fix SDK build break caused by including legacy support header into main API header
usb_windows.c doesn't build with adb_legacy_api.h included into adb_api.h
Since adb_legacy_api.h is not used anywhere outside AdbWinApi.dll project, the simplest
fix would be to remove its inclusion from adb_api.h
2009-07-28 10:07:09 -07:00
vchtchetkine
8267511c96 Refactor API classes to support both, WinUsb and Legacy API
To support both, WinUsb and Legacy driver APIs we need to abstract classes
that depend on driver API details and then implement two sets of the
actual classes: one for WinUsb, and another for the Legacy drivers, so
we can choose in runtime which objects should be instantiated, depending
on what type of driver we have underneath this API.
2009-07-25 11:14:04 -07:00
vchtchetkine
2be4a90641 Add test application 2009-07-23 15:28:06 -07:00
vchtchetkine
cd693f5739 Add build instructions, ignore list and remove obsolete .sln file 2009-07-23 13:38:37 -07:00
vchtchetkine
d79c237203 Delete files irrelevant for the new driver model
:x
2009-07-23 10:41:24 -07:00
vchtchetkine
dceaaa52ce Refactor ADB API dll to support WinUsb 2009-07-22 13:34:53 -07:00
The Android Open Source Project
243d18eb22 auto import from //branches/cupcake/...@137873 2009-03-11 12:11:54 -07:00
The Android Open Source Project
52d4c30ca5 auto import from //depot/cupcake/@135843 2009-03-03 19:29:09 -08:00
The Android Open Source Project
d4aee0c0ca auto import from //depot/cupcake/@135843 2009-03-03 18:28:16 -08:00