三星 j3 无法连接 Ubuntu 18.04.1

三星 j3 无法连接 Ubuntu 18.04.1

我使用 Cordova 安装我开发的 Android 应用程序时遇到了问题。

我认为问题出在 USB 驱动程序上。

cordova-custom-config: Skipping auto-restore of config file backup(s)
cordova-custom-config: Applied custom config from config.xml to /home/erm/git/fmp-pg/fmp-cordova/platforms/android/AndroidManifest.xml
ANDROID_HOME=/home/erm/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
Subproject Path: CordovaLib
The Task.leftShift(Closure) method has been deprecated and is scheduled to be removed in Gradle 5.0. Please use Task.doLast(Action) instead.
    at build_1tho7h87hlfs9n4y2he439ce0.run(/home/erm/git/fmp-pg/fmp-cordova/platforms/android/build.gradle:137)
The JavaCompile.setDependencyCacheDir() method has been deprecated and is scheduled to be removed in Gradle 4.0.
Incremental java compilation is an incubating feature.
The TaskInputs.source(Object) method has been deprecated and is scheduled to be removed in Gradle 4.0. Please use TaskInputs.file(Object).skipWhenEmpty() instead.
:preBuild UP-TO-DATE
:preDebugBuild UP-TO-DATE
:checkDebugManifest
:CordovaLib:preBuild UP-TO-DATE
:CordovaLib:preDebugBuild UP-TO-DATE
:CordovaLib:checkDebugManifest
:CordovaLib:prepareDebugDependencies
:CordovaLib:compileDebugAidl UP-TO-DATE
:CordovaLib:compileDebugNdk UP-TO-DATE
:CordovaLib:compileLint UP-TO-DATE
:CordovaLib:copyDebugLint UP-TO-DATE
:CordovaLib:mergeDebugShaders UP-TO-DATE
:CordovaLib:compileDebugShaders UP-TO-DATE
:CordovaLib:generateDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugAssets UP-TO-DATE
:CordovaLib:mergeDebugProguardFiles UP-TO-DATE
:CordovaLib:packageDebugRenderscript UP-TO-DATE
:CordovaLib:compileDebugRenderscript UP-TO-DATE
:CordovaLib:generateDebugResValues UP-TO-DATE
:CordovaLib:generateDebugResources UP-TO-DATE
:CordovaLib:packageDebugResources UP-TO-DATE
:CordovaLib:processDebugManifest UP-TO-DATE
:CordovaLib:generateDebugBuildConfig UP-TO-DATE
:CordovaLib:processDebugResources UP-TO-DATE
:CordovaLib:generateDebugSources UP-TO-DATE
:CordovaLib:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:CordovaLib:compileDebugJavaWithJavac UP-TO-DATE
:CordovaLib:processDebugJavaRes UP-TO-DATE
:CordovaLib:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:CordovaLib:transformClassesAndResourcesWithSyncLibJarsForDebug UP-TO-DATE
:CordovaLib:mergeDebugJniLibFolders UP-TO-DATE
:CordovaLib:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:CordovaLib:transformNative_libsWithSyncJniLibsForDebug UP-TO-DATE
:CordovaLib:bundleDebug UP-TO-DATE
:prepareOrgApacheCordovaCordovaLib623DebugLibrary UP-TO-DATE
:prepareDebugDependencies
:compileDebugAidl UP-TO-DATE
:compileDebugRenderscript UP-TO-DATE
:generateDebugBuildConfig UP-TO-DATE
:generateDebugResValues UP-TO-DATE
:generateDebugResources UP-TO-DATE
:mergeDebugResources UP-TO-DATE
:processDebugManifest UP-TO-DATE
:processDebugResources UP-TO-DATE
:generateDebugSources UP-TO-DATE
:incrementalDebugJavaCompilationSafeguard UP-TO-DATE
:compileDebugJavaWithJavac UP-TO-DATE
:compileDebugNdk UP-TO-DATE
:compileDebugSources UP-TO-DATE
:mergeDebugShaders UP-TO-DATE
:compileDebugShaders UP-TO-DATE
:generateDebugAssets UP-TO-DATE
:mergeDebugAssets UP-TO-DATE
:transformClassesWithDexForDebug UP-TO-DATE
:mergeDebugJniLibFolders UP-TO-DATE
:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE
:processDebugJavaRes UP-TO-DATE
:transformResourcesWithMergeJavaResForDebug UP-TO-DATE
:validateSigningDebug
:packageDebug UP-TO-DATE
:assembleDebug UP-TO-DATE
:cdvBuildDebug UP-TO-DATE

BUILD SUCCESSFUL

Total time: 1.049 secs
Built the following apk(s): 
    /home/erm/git/fmp-pg/fmp-cordova/platforms/android/build/outputs/apk/android-debug.apk
ANDROID_HOME=/home/erm/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-8-oracle
No target specified and no devices found, deploying to emulator
(node:3756) UnhandledPromiseRejectionWarning: CordovaError: No emulator images (avds) found.
1. Download desired System Image by running: /home/erm/Android/Sdk/tools/android sdk
2. Create an AVD by running: /home/erm/Android/Sdk/tools/android avd
HINT: For a faster emulator, use an Intel System Image and install the HAXM device driver

    at /home/erm/git/fmp-pg/fmp-cordova/platforms/android/cordova/lib/emulator.js:279:29
    at _fulfilled (/home/erm/git/fmp-pg/fmp-cordova/platforms/android/cordova/node_modules/q/q.js:854:54)
    at self.promiseDispatch.done (/home/erm/git/fmp-pg/fmp-cordova/platforms/android/cordova/node_modules/q/q.js:883:30)
    at Promise.promise.promiseDispatch (/home/erm/git/fmp-pg/fmp-cordova/platforms/android/cordova/node_modules/q/q.js:816:13)
    at /home/erm/git/fmp-pg/fmp-cordova/platforms/android/cordova/node_modules/q/q.js:624:44
    at runSingle (/home/erm/git/fmp-pg/fmp-cordova/platforms/android/cordova/node_modules/q/q.js:137:13)
    at flush (/home/erm/git/fmp-pg/fmp-cordova/platforms/android/cordova/node_modules/q/q.js:125:13)
    at process._tickCallback (internal/process/next_tick.js:112:11)
(node:3756) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:3756) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

当我插入设备时,我看到它显示了一秒钟,然后在我访问时消失:chrome://inspect/#devices

我尝试过不同的 USB 端口和 USB 线。

$ tail -f /var/log/syslog 
Jan 15 05:11:23 erm76 kernel: [ 4481.473700] usb 3-2: USB disconnect, device number 78
Jan 15 05:11:23 erm76 kernel: [ 4481.745122] usb 3-2: new high-speed USB device number 79 using xhci_hcd
Jan 15 05:11:23 erm76 kernel: [ 4481.873269] usb 3-2: Device not responding to setup address.
Jan 15 05:11:24 erm76 kernel: [ 4482.081207] usb 3-2: Device not responding to setup address.
Jan 15 05:11:24 erm76 kernel: [ 4482.289217] usb 3-2: device not accepting address 79, error -71
Jan 15 05:11:24 erm76 kernel: [ 4482.625163] usb 3-2: new high-speed USB device number 80 using xhci_hcd
Jan 15 05:11:24 erm76 kernel: [ 4482.775455] usb 3-2: New USB device found, idVendor=04e8, idProduct=6860
Jan 15 05:11:24 erm76 kernel: [ 4482.775461] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 15 05:11:24 erm76 kernel: [ 4482.775465] usb 3-2: Product: SAMSUNG_Android
Jan 15 05:11:24 erm76 kernel: [ 4482.775468] usb 3-2: Manufacturer: SAMSUNG
Jan 15 05:11:24 erm76 kernel: [ 4482.775471] usb 3-2: SerialNumber: 42003eefd668b3a1
Jan 15 05:11:24 erm76 kernel: [ 4482.777799] cdc_acm 3-2:1.1: ttyACM0: USB ACM device
Jan 15 05:11:24 erm76 colord[1381]: CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs_SAMSUNG_SAMSUNG_Android
Jan 15 05:11:24 erm76 colord[1381]: CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs__null_
Jan 15 05:11:24 erm76 colord[1381]: message repeated 2 times: [ CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs__null_]
Jan 15 05:11:24 erm76 ModemManager[1184]: <info>  (tty/ttyACM0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
Jan 15 05:11:24 erm76 ModemManager[1184]: <info>  Couldn't check support for device at '/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2': Operation was cancelled
Jan 15 05:11:24 erm76 upowerd[3382]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2
Jan 15 05:11:24 erm76 upowerd[3382]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.1
Jan 15 05:11:24 erm76 upowerd[3382]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
Jan 15 05:11:24 erm76 upowerd[3382]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2
Jan 15 05:11:24 erm76 upowerd[3382]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.1
Jan 15 05:11:24 erm76 upowerd[3382]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
Jan 15 05:11:24 erm76 colord[1381]: CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs_SAMSUNG_SAMSUNG_Android
Jan 15 05:11:24 erm76 colord[1381]: CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs__null_
Jan 15 05:11:24 erm76 colord[1381]: message repeated 2 times: [ CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs__null_]
Jan 15 05:11:24 erm76 upowerd[3382]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2
Jan 15 05:11:24 erm76 upowerd[3382]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.1
Jan 15 05:11:24 erm76 upowerd[3382]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
Jan 15 05:11:25 erm76 kernel: [ 4483.383401] usb 3-2: USB disconnect, device number 80
Jan 15 05:11:25 erm76 ModemManager[1184]: <info>  (tty/ttyACM0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
Jan 15 05:11:25 erm76 ModemManager[1184]: <info>  Couldn't check support for device at '/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2': Operation was cancelled
Jan 15 05:11:25 erm76 upowerd[3382]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2
Jan 15 05:11:25 erm76 upowerd[3382]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.1
Jan 15 05:11:25 erm76 upowerd[3382]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
Jan 15 05:11:26 erm76 kernel: [ 4484.205173] usb 3-2: new high-speed USB device number 81 using xhci_hcd
Jan 15 05:11:26 erm76 kernel: [ 4484.354996] usb 3-2: New USB device found, idVendor=04e8, idProduct=6860
Jan 15 05:11:26 erm76 kernel: [ 4484.355002] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 15 05:11:26 erm76 kernel: [ 4484.355005] usb 3-2: Product: SAMSUNG_Android
Jan 15 05:11:26 erm76 kernel: [ 4484.355008] usb 3-2: Manufacturer: SAMSUNG
Jan 15 05:11:26 erm76 kernel: [ 4484.355011] usb 3-2: SerialNumber: 42003eefd668b3a1
Jan 15 05:11:31 erm76 kernel: [ 4489.409478] cdc_acm 3-2:1.1: ttyACM0: USB ACM device
Jan 15 05:11:46 erm76 kernel: [ 4504.769311] usb 3-2: USB disconnect, device number 81
Jan 15 05:11:47 erm76 kernel: [ 4505.041064] usb 3-2: new high-speed USB device number 82 using xhci_hcd
Jan 15 05:11:47 erm76 kernel: [ 4505.189938] usb 3-2: New USB device found, idVendor=04e8, idProduct=6860
Jan 15 05:11:47 erm76 kernel: [ 4505.189940] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 15 05:11:47 erm76 kernel: [ 4505.189941] usb 3-2: Product: SAMSUNG_Android
Jan 15 05:11:47 erm76 kernel: [ 4505.189942] usb 3-2: Manufacturer: SAMSUNG
Jan 15 05:11:47 erm76 kernel: [ 4505.189943] usb 3-2: SerialNumber: 42003eefd668b3a1
Jan 15 05:11:47 erm76 kernel: [ 4505.190985] cdc_acm 3-2:1.1: ttyACM0: USB ACM device
Jan 15 05:11:47 erm76 colord[1381]: CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs_SAMSUNG_SAMSUNG_Android
Jan 15 05:11:47 erm76 colord[1381]: CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs__null_
Jan 15 05:11:47 erm76 colord[1381]: message repeated 2 times: [ CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs__null_]
Jan 15 05:11:47 erm76 ModemManager[1184]: <info>  (tty/ttyACM0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
Jan 15 05:11:47 erm76 ModemManager[1184]: <info>  Couldn't check support for device at '/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2': Operation was cancelled
Jan 15 05:11:47 erm76 upowerd[3382]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2
Jan 15 05:11:47 erm76 upowerd[3382]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.1
Jan 15 05:11:47 erm76 upowerd[3382]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
Jan 15 05:11:47 erm76 upowerd[3382]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.1
Jan 15 05:11:47 erm76 upowerd[3382]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2
Jan 15 05:11:47 erm76 upowerd[3382]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
Jan 15 05:11:47 erm76 colord[1381]: CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs_SAMSUNG_SAMSUNG_Android
Jan 15 05:11:47 erm76 colord[1381]: CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs__null_
Jan 15 05:11:47 erm76 colord[1381]: message repeated 2 times: [ CdMain: failed to emit DeviceAdded: failed to register object: An object is already exported for the interface org.freedesktop.ColorManager.Device at /org/freedesktop/ColorManager/devices/sysfs__null_]
Jan 15 05:11:47 erm76 upowerd[3382]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2
Jan 15 05:11:47 erm76 upowerd[3382]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.1
Jan 15 05:11:47 erm76 upowerd[3382]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
Jan 15 05:11:47 erm76 upowerd[3382]: unhandled action 'bind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.3
Jan 15 05:11:48 erm76 upowerd[3382]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.3
Jan 15 05:11:48 erm76 kernel: [ 4506.025276] usb usb3-port2: disabled by hub (EMI?), re-enabling...
Jan 15 05:11:48 erm76 kernel: [ 4506.025283] usb 3-2: USB disconnect, device number 82
Jan 15 05:11:48 erm76 ModemManager[1184]: <info>  (tty/ttyACM0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
Jan 15 05:11:48 erm76 ModemManager[1184]: <info>  Couldn't check support for device at '/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2': Operation was cancelled
Jan 15 05:11:48 erm76 upowerd[3382]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.2
Jan 15 05:11:48 erm76 upowerd[3382]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2/3-2:1.1
Jan 15 05:11:48 erm76 upowerd[3382]: unhandled action 'unbind' on /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2
Jan 15 05:11:48 erm76 kernel: [ 4506.369080] usb 3-2: new high-speed USB device number 83 using xhci_hcd
Jan 15 05:11:48 erm76 kernel: [ 4506.518366] usb 3-2: New USB device found, idVendor=04e8, idProduct=6860
Jan 15 05:11:48 erm76 kernel: [ 4506.518370] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 15 05:11:48 erm76 kernel: [ 4506.518373] usb 3-2: Product: SAMSUNG_Android
Jan 15 05:11:48 erm76 kernel: [ 4506.518375] usb 3-2: Manufacturer: SAMSUNG
Jan 15 05:11:48 erm76 kernel: [ 4506.518377] usb 3-2: SerialNumber: 42003eefd668b3a1
Jan 15 05:11:48 erm76 kernel: [ 4506.520728] cdc_acm 3-2:1.1: ttyACM0: USB ACM device
Jan 15 05:11:58 erm76 kernel: [ 4516.806812] usb 3-2: USB disconnect, device number 83
Jan 15 05:11:59 erm76 kernel: [ 4517.077054] usb 3-2: new high-speed USB device number 84 using xhci_hcd
Jan 15 05:12:04 erm76 kernel: [ 4522.517070] usb 3-2: device descriptor read/64, error -110


$ lsusb
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:8008 Intel Corp. 
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 004: ID 1058:25ee Western Digital Technologies, Inc. 
Bus 004 Device 003: ID 05e3:0617 Genesys Logic, Inc. 
Bus 004 Device 002: ID 05e3:0617 Genesys Logic, Inc. 
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 006: ID 5986:055c Acer, Inc 
Bus 003 Device 005: ID 8087:07dc Intel Corp. 
Bus 003 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 004: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 003 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

我尝试复制/lib/udev/rules.d/69-libmtp.rules/etc/udev/rules.d/04e8:6860 然后注释掉它并重新启动。然而这会让内核询问电源线是否坏了。

答案1

事实证明修复很简单。关闭浏览器检查器窗口,一切连接正常。

相关内容