Skip to content
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

Devices stuck in preparing, cycling service start #730

Open
therock24 opened this issue Nov 16, 2023 · 11 comments
Open

Devices stuck in preparing, cycling service start #730

therock24 opened this issue Nov 16, 2023 · 11 comments

Comments

@therock24
Copy link

therock24 commented Nov 16, 2023

What is the issue or idea you have?
I have 4 devices plugged in and working fine, stf was able to prepare them.
1 of these devices are always in preparing state and stf log shows cyclic retries indefinetely.

Does it only happen on a specific device? Please run adb devices -l and paste the corresponding row.

  1. cyclic service restart device
    H5517MCA0N7412W device usb:1-7.3 product:full_tb8765ap1_bsp_1g model:T1 device:tb8765ap1_bsp_1g transport_id:6

Please provide the steps to reproduce the issue.
I am just starting stf with this command
stf local --no-cleanup --public-ip 10.x.x.x

What is the expected behavior?
The devices should become ready.

Do you see errors or warnings in the stf local output? If so, please paste them or the full log here.

(1) cyclic service restart device

2023-11-16T00:12:18.946Z INF/device:plugins:service 3011008 [H5517MCA0N7412W] Launching service
2023-11-16T00:12:18.947Z INF/device:plugins:service 3011008 [H5517MCA0N7412W] using 'start-foreground-service' command for API 30
2023-11-16T00:12:19.012Z IMP/device:plugins:service 3011008 [H5517MCA0N7412W] Service relaunched in 67ms
2023-11-16T00:12:19.039Z IMP/device:plugins:service 3011008 [H5517MCA0N7412W] Service connection ended, attempting to relaunch
2023-11-16T00:12:19.040Z INF/device:plugins:service 3011008 [H5517MCA0N7412W] Launching service
2023-11-16T00:12:19.041Z INF/device:plugins:service 3011008 [H5517MCA0N7412W] using 'start-foreground-service' command for API 30
2023-11-16T00:12:19.092Z ERR/device:resources:minicap 3011008 [H5517MCA0N7412W] Missing resources/unknown minicap grabber: -d 0 -i
2023-11-16T00:12:19.093Z INF/device:resources:minicap 3011008 [H5517MCA0N7412W] undefined
2023-11-16T00:12:19.109Z IMP/device:plugins:service 3011008 [H5517MCA0N7412W] Service relaunched in 70ms
2023-11-16T00:12:19.120Z FTL/device 3011008 [H5517MCA0N7412W] Setup had an error Error: /system/bin/sh: undefined: inaccessible or not found

    at /usr/local/lib/node_modules/@devicefarmer/stf/lib/units/device/plugins/util/display.js:43:19
    at tryCatcher (/usr/local/lib/node_modules/@devicefarmer/stf/node_modules/@devicefarmer/adbkit/node_modules/bluebird/js/main/util.js:26:23)
    at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/@devicefarmer/stf/node_modules/@devicefarmer/adbkit/node_modules/bluebird/js/main/promise.js:503:31)
    at Promise._settlePromiseAt (/usr/local/lib/node_modules/@devicefarmer/stf/node_modules/@devicefarmer/adbkit/node_modules/bluebird/js/main/promise.js:577:18)
    at Async._drainQueue (/usr/local/lib/node_modules/@devicefarmer/stf/node_modules/@devicefarmer/adbkit/node_modules/bluebird/js/main/async.js:128:12)
    at Async._drainQueues (/usr/local/lib/node_modules/@devicefarmer/stf/node_modules/@devicefarmer/adbkit/node_modules/bluebird/js/main/async.js:133:10)
    at Immediate.Async.drainQueues [as _onImmediate] (/usr/local/lib/node_modules/@devicefarmer/stf/node_modules/@devicefarmer/adbkit/node_modules/bluebird/js/main/async.js:15:14)
    at processImmediate (internal/timers.js:461:21)
2023-11-16T00:12:19.121Z FTL/util:lifecycle 3011008 [H5517MCA0N7412W] Shutting down due to fatal error
2023-11-16T00:12:19.149Z INF/provider 3007899 [*] Cleaning up device worker "H5517MCA0N7412W"
2023-11-16T00:12:19.150Z ERR/provider 3007899 [*] Device worker "H5517MCA0N7412W" died with code 1
2023-11-16T00:12:19.150Z INF/provider 3007899 [*] Restarting device worker "H5517MCA0N7412W"
2023-11-16T00:12:19.985Z INF/device:support:push 3011030 [H5517MCA0N7412W] Sending output to "tcp://127.0.0.1:7116"
2023-11-16T00:12:19.988Z INF/device 3011030 [H5517MCA0N7412W] Preparing device
2023-11-16T00:12:20.356Z INF/device:support:sub 3011030 [H5517MCA0N7412W] Receiving input from "tcp://127.0.0.1:7114"
2023-11-16T00:12:20.357Z INF/device:support:sub 3011030 [H5517MCA0N7412W] Subscribing to permanent channel "*ALL"
2023-11-16T00:12:20.432Z INF/device:support:properties 3011030 [H5517MCA0N7412W] Loading properties
2023-11-16T00:12:20.510Z INF/device:support:sdk 3011030 [H5517MCA0N7412W] Supports SDK 30
2023-11-16T00:12:20.511Z INF/device:support:abi 3011030 [H5517MCA0N7412W] Supports ABIs armeabi-v7a, armeabi
2023-11-16T00:12:20.899Z INF/device:resources:minicap 3011030 [H5517MCA0N7412W] Installing "/usr/local/lib/node_modules/@devicefarmer/stf/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/armeabi-v7a/bin/minicap" as "/data/local/tmp/minicap"
2023-11-16T00:12:20.901Z INF/device:resources:minicap 3011030 [H5517MCA0N7412W] Installing "/usr/local/lib/node_modules/@devicefarmer/stf/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/armeabi-v7a/lib/android-30/minicap.so" as "/data/local/tmp/minicap.so"
2023-11-16T00:12:20.903Z INF/device:resources:minicap 3011030 [H5517MCA0N7412W] Installing "/usr/local/lib/node_modules/@devicefarmer/stf/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/noarch/minicap.apk" as "/data/local/tmp/minicap.apk"
2023-11-16T00:12:21.245Z INF/device:resources:service 3011030 [H5517MCA0N7412W] Checking whether we need to install STFService
2023-11-16T00:12:21.324Z INF/device:resources:service 3011030 [H5517MCA0N7412W] Running version check
2023-11-16T00:12:22.494Z INF/device:resources:service 3011030 [H5517MCA0N7412W] Installing STFService
2023-11-16T00:12:26.359Z INF/device:resources:service 3011030 [H5517MCA0N7412W] STFService up to date
2023-11-16T00:12:26.361Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] Launching agent
2023-11-16T00:12:27.645Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] Agent says: "Starting minitouch agent"
2023-11-16T00:12:27.684Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] Agent says: "Listening on @stfagent"
2023-11-16T00:12:27.736Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] Launching service
2023-11-16T00:12:27.737Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] using 'start-foreground-service' command for API 30
2023-11-16T00:12:27.739Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] Agent says: "InputClient started"
2023-11-16T00:12:28.043Z INF/device:plugins:display 3011030 [H5517MCA0N7412W] Reading display info
2023-11-16T00:12:28.089Z IMP/device:plugins:service 3011030 [H5517MCA0N7412W] Service connection ended, attempting to relaunch
2023-11-16T00:12:28.090Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] Launching service
2023-11-16T00:12:28.091Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] using 'start-foreground-service' command for API 30
2023-11-16T00:12:28.171Z IMP/device:plugins:service 3011030 [H5517MCA0N7412W] Service relaunched in 83ms
2023-11-16T00:12:28.205Z IMP/device:plugins:service 3011030 [H5517MCA0N7412W] Service connection ended, attempting to relaunch
2023-11-16T00:12:28.206Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] Launching service
2023-11-16T00:12:28.208Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] using 'start-foreground-service' command for API 30
2023-11-16T00:12:28.286Z IMP/device:plugins:service 3011030 [H5517MCA0N7412W] Service relaunched in 81ms
2023-11-16T00:12:28.320Z IMP/device:plugins:service 3011030 [H5517MCA0N7412W] Service connection ended, attempting to relaunch
2023-11-16T00:12:28.322Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] Launching service
2023-11-16T00:12:28.323Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] using 'start-foreground-service' command for API 30
2023-11-16T00:12:28.401Z IMP/device:plugins:service 3011030 [H5517MCA0N7412W] Service relaunched in 81ms
2023-11-16T00:12:28.443Z IMP/device:plugins:service 3011030 [H5517MCA0N7412W] Service connection ended, attempting to relaunch
2023-11-16T00:12:28.444Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] Launching service
2023-11-16T00:12:28.446Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] using 'start-foreground-service' command for API 30
2023-11-16T00:12:28.545Z IMP/device:plugins:service 3011030 [H5517MCA0N7412W] Service relaunched in 102ms
2023-11-16T00:12:28.585Z IMP/device:plugins:service 3011030 [H5517MCA0N7412W] Service connection ended, attempting to relaunch
2023-11-16T00:12:28.586Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] Launching service
2023-11-16T00:12:28.587Z INF/device:plugins:service 3011030 [H5517MCA0N7412W] using 'start-foreground-service' command for API 30
2023-11-16T00:12:28.664Z IMP/device:plugins:service 3011030 [H5517MCA0N7412W] Service relaunched in 79ms
2023-11-16T00:12:28.700Z IMP/device:plugins:service 3011030 [H5517MCA0N7412W] Service connection ended, attempting to relaunch

Please run stf doctor and paste the output here.

2023-11-16T10:05:12.121Z INF/cli:doctor 3023702 [*] OS Arch: x64
2023-11-16T10:05:12.123Z INF/cli:doctor 3023702 [*] OS Platform: linux
2023-11-16T10:05:12.124Z INF/cli:doctor 3023702 [*] OS Platform: 6.2.0-34-generic
2023-11-16T10:05:12.124Z INF/cli:doctor 3023702 [*] Using Node 12.22.9
2023-11-16T10:05:12.143Z INF/cli:doctor 3023702 [*] Using ZeroMQ 4.2.2
2023-11-16T10:05:12.161Z INF/cli:doctor 3023702 [*] Using ProtoBuf 3.12.4
2023-11-16T10:05:12.162Z INF/cli:doctor 3023702 [*] Using GraphicsMagick 1.3.38
2023-11-16T10:05:12.163Z INF/cli:doctor 3023702 [*] Using ADB 1.0.41
2023-11-16T10:05:12.172Z INF/cli:doctor 3023702 [*] Using RethinkDB 2.4.3~0jammy
@therock24 therock24 changed the title Device stuck in preparing, cycling service start Devices stuck in preparing, cycling service start Nov 16, 2023
@denis99999
Copy link

@therock24 ,

  • Is your installed STF repository up to date?
  • Can you upgrade your Node version to 17.9.0 and reinstall STF cleanly ?
  • Disconnect the device, remove manually the STF agent, reconnect the device

Let me knom if it fixes your issue?

@KingRat0011
Copy link

I seem to have the same problem as reported in #692
I've updated node and did a complete npm install, npm rebuild, but it's still the same

xxx $ ./stf --version
3.6.6
xxx $ ./stf doctor
2024-03-01T06:59:28.623Z INF/cli:doctor 5657 [*] OS Arch: x64
2024-03-01T06:59:28.625Z INF/cli:doctor 5657 [*] OS Platform: linux
2024-03-01T06:59:28.625Z INF/cli:doctor 5657 [*] OS Platform: 3.10.0-1160.95.1.el7.x86_64
2024-03-01T06:59:28.625Z INF/cli:doctor 5657 [*] Using Node 17.9.0
2024-03-01T06:59:28.637Z INF/cli:doctor 5657 [*] Using ZeroMQ 4.2.2
2024-03-01T06:59:28.652Z INF/cli:doctor 5657 [*] Using ADB 1.0.31
2024-03-01T06:59:28.654Z INF/cli:doctor 5657 [*] Using GraphicsMagick 1.3.38
2024-03-01T06:59:28.655Z INF/cli:doctor 5657 [*] Using ProtoBuf 3.14.0
2024-03-01T06:59:28.663Z INF/cli:doctor 5657 [*] Using RethinkDB 2.4.2
xxx $ node -v
v17.9.0
xxx $ 

xxx:~ $ adb devices -l
List of devices attached
32221FDHS0000H         device usb:1-1.1.2 product:felix model:Pixel_Fold device:felix transport_id:1

xxx:~ $ adb shell getprop ro.build.version.release
14
xxx:~ $

2024-03-01T07:21:33.662Z INF/device:support:sub 24508 [32221FDHS0000H] Subscribing to permanent channel "*ALL"
2024-03-01T07:21:33.756Z INF/device:support:properties 24508 [32221FDHS0000H] Loading properties
2024-03-01T07:21:33.848Z INF/device:support:sdk 24508 [32221FDHS0000H] Supports SDK 34
2024-03-01T07:21:33.849Z INF/device:support:abi 24508 [32221FDHS0000H] Supports ABIs arm64-v8a
2024-03-01T07:21:34.259Z INF/device:resources:minicap 24508 [32221FDHS0000H] Installing "/usr/lib/node_modules/stf/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/noarch/minicap.apk" as "/data/local/tmp/minicap.apk"
2024-03-01T07:21:34.871Z INF/device:resources:service 24508 [32221FDHS0000H] Checking whether we need to install STFService
2024-03-01T07:21:34.995Z INF/device:resources:service 24508 [32221FDHS0000H] Running version check
2024-03-01T07:21:36.110Z INF/device:resources:service 24508 [32221FDHS0000H] STFService up to date
2024-03-01T07:21:36.111Z INF/device:plugins:service 24508 [32221FDHS0000H] Launching agent
2024-03-01T07:21:36.937Z INF/device:plugins:service 24508 [32221FDHS0000H] Agent says: "Starting minitouch agent"
2024-03-01T07:21:46.721Z FTL/device 24508 [32221FDHS0000H] Setup had an error TimeoutError: operation timed out
    at afterTimeout (/usr/lib/node_modules/stf/node_modules/@devicefarmer/adbkit/node_modules/bluebird/js/main/timers.js:11:15)
    at Timeout.timeoutTimeout [as _onTimeout] (/usr/lib/node_modules/stf/node_modules/@devicefarmer/adbkit/node_modules/bluebird/js/main/timers.js:53:9)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)
2024-03-01T07:21:46.722Z FTL/util:lifecycle 24508 [32221FDHS0000H] Shutting down due to fatal error
2024-03-01T07:21:46.736Z INF/provider 22093 [*] Cleaning up device worker "32221FDHS0000H"
2024-03-01T07:21:46.736Z ERR/provider 22093 [*] Device worker "32221FDHS0000H" died with code 1
2024-03-01T07:21:46.736Z INF/provider 22093 [*] Restarting device worker "32221FDHS0000H"
2024-03-01T07:21:47.450Z INF/device:support:push 24574 [32221FDHS0000H] Sending output to "tcp://127.0.0.1:7116"
2024-03-01T07:21:47.453Z INF/device 24574 [32221FDHS0000H] Preparing device
2024-03-01T07:21:47.744Z INF/device:support:sub 24574 [32221FDHS0000H] Receiving input from "tcp://127.0.0.1:7114"
2024-03-01T07:21:47.745Z INF/device:support:sub 24574 [32221FDHS0000H] Subscribing to permanent channel "*ALL"
2024-03-01T07:21:47.843Z INF/device:support:properties 24574 [32221FDHS0000H] Loading properties
2024-03-01T07:21:47.923Z INF/device:support:sdk 24574 [32221FDHS0000H] Supports SDK 34
2024-03-01T07:21:47.924Z INF/device:support:abi 24574 [32221FDHS0000H] Supports ABIs arm64-v8a
2024-03-01T07:21:48.356Z INF/device:resources:minicap 24574 [32221FDHS0000H] Installing "/usr/lib/node_modules/stf/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/noarch/minicap.apk" as "/data/local/tmp/minicap.apk"
2024-03-01T07:21:48.974Z INF/device:resources:service 24574 [32221FDHS0000H] Checking whether we need to install STFService
2024-03-01T07:21:49.086Z INF/device:resources:service 24574 [32221FDHS0000H] Running version check
2024-03-01T07:21:50.195Z INF/device:resources:service 24574 [32221FDHS0000H] STFService up to date
2024-03-01T07:21:50.196Z INF/device:plugins:service 24574 [32221FDHS0000H] Launching agent
2024-03-01T07:21:51.033Z INF/device:plugins:service 24574 [32221FDHS0000H] Agent says: "Starting minitouch agent"
2024-03-01T07:22:00.818Z FTL/device 24574 [32221FDHS0000H] Setup had an error TimeoutError: operation timed out
    at afterTimeout (/usr/lib/node_modules/stf/node_modules/@devicefarmer/adbkit/node_modules/bluebird/js/main/timers.js:11:15)
    at Timeout.timeoutTimeout [as _onTimeout] (/usr/lib/node_modules/stf/node_modules/@devicefarmer/adbkit/node_modules/bluebird/js/main/timers.js:53:9)
    at listOnTimeout (node:internal/timers:559:17)
    at processTimers (node:internal/timers:502:7)
2024-03-01T07:22:00.819Z FTL/util:lifecycle 24574 [32221FDHS0000H] Shutting down due to fatal error
2024-03-01T07:22:00.834Z INF/provider 22093 [*] Cleaning up device worker "32221FDHS0000H"
2024-03-01T07:22:00.834Z ERR/provider 22093 [*] Device worker "32221FDHS0000H" died with code 1
2024-03-01T07:22:00.835Z INF/provider 22093 [*] Restarting device worker "32221FDHS0000H"
2024-03-01T07:22:01.544Z INF/device:support:push 24633 [32221FDHS0000H] Sending output to "tcp://127.0.0.1:7116"
2024-03-01T07:22:01.547Z INF/device 24633 [32221FDHS0000H] Preparing device
2024-03-01T07:22:01.866Z INF/device:support:sub 24633 [32221FDHS0000H] Receiving input from "tcp://127.0.0.1:7114"
2024-03-01T07:22:01.867Z INF/device:support:sub 24633 [32221FDHS0000H] Subscribing to permanent channel "*ALL"
2024-03-01T07:22:01.966Z INF/device:support:properties 24633 [32221FDHS0000H] Loading properties
2024-03-01T07:22:02.056Z INF/device:support:sdk 24633 [32221FDHS0000H] Supports SDK 34
2024-03-01T07:22:02.057Z INF/device:support:abi 24633 [32221FDHS0000H] Supports ABIs arm64-v8a
2024-03-01T07:22:02.457Z INF/device:resources:minicap 24633 [32221FDHS0000H] Installing "/usr/lib/node_modules/stf/node_modules/@devicefarmer/minicap-prebuilt/prebuilt/noarch/minicap.apk" as "/data/local/tmp/minicap.apk"
2024-03-01T07:22:03.071Z INF/device:resources:service 24633 [32221FDHS0000H] Checking whether we need to install STFService
2024-03-01T07:22:03.195Z INF/device:resources:service 24633 [32221FDHS0000H] Running version check
2024-03-01T07:22:04.333Z INF/device:resources:service 24633 [32221FDHS0000H] STFService up to date
2024-03-01T07:22:04.334Z INF/device:plugins:service 24633 [32221FDHS0000H] Launching agent
^C

ls -ltr /usr/lib/node_modules/stf/vendor/STFService
total 1352
-rw-rw-r--. 1 xxx xxx    6192 Mar  1 00:57 wire.proto
-rw-rw-r--. 1 xxx xxx 1372211 Mar  1 00:57 STFService.apk
xxx $ date
Fri Mar  1 01:24:50 CST 2024
xxx $ 

@KingRat0011
Copy link

@denis99999 it seems to be only the Google devices, for example I have a Samsung Galaxy on Android 14 that works fine

xxx:~ $ adb devices -l
List of devices attached                                                                      
R3CXXX0P2YKW            **device usb:1-1.1.3 product:a35xsq model:SM_A356U device:a35x**           
                                                                                              
xxx:~ $ lsusb
Bus 001 Device 062: ID 04e8:6860 Samsung Electronics Co., Ltd Galaxy series, misc. (MTP mode) 
Bus 001 Device 005: ID 0424:7800 Standard Microsystems Corp.                                  
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub                      
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub                      
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub                                
xxx:~ $ adb shell getprop ro.build.version.release
14                                                                                            
xxx:~ $

The 3 devices that does not work are Google devices, the amazing thing about them is that lsusb reports them as Samsung devices!, I did play with the udev rules, but it still says Samsung

xxx:~ $ lsusb
Bus 001 Device 004: ID 04e8:6862 Samsung Electronics Co., Ltd 
Bus 001 Device 005: ID 0424:7800 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
xxx:~ $ adb devices -l
List of devices attached
320SXXXXS0000H         **device usb:1-1.1.2 product:felix model:Pixel_Fold device:felix transport_id:1**
xxx:~ $ adb shell getprop ro.build.version.release
14
xxx:~ $

xxx:~ $ lsusb
Bus 001 Device 120: ID 04e8:6862 Samsung Electronics Co., Ltd 
Bus 001 Device 004: ID 0424:7800 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
xxx:~ $ adb devices -l
List of devices attached
3516XXXXX0005S         **device usb:1-1.1.3 product:shiba model:Pixel_8 device:shiba**

xxx:~ $ adb shell getprop ro.build.version.release
14
xxx:~ $

xxx:~ $ lsusb
Bus 001 Device 007: ID 04e8:6862 Samsung Electronics Co., Ltd 
Bus 001 Device 005: ID 0424:7800 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
xxx:~ $ adb devices -l
List of devices attached
242XXXXX000C6         **device usb:1-1.1.3 product:panther model:Pixel_7 device:panther**

xxx:~ $ adb shell getprop ro.build.version.release
14
xxx:~ $ dmesg | grep -i "usb 1-1.1.3"
[  722.686695] usb 1-1.1.3: USB disconnect, device number 6
[  740.644528] usb 1-1.1.3: new high-speed USB device number 7 using dwc_otg
[  740.776669] usb 1-1.1.3: New USB device found, idVendor=04e8, idProduct=6862, bcdDevice= 5.10
[  740.776691] usb 1-1.1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  740.776706] usb 1-1.1.3: Product: Pixel 7
[  740.776721] usb 1-1.1.3: Manufacturer: Google
[  740.776736] usb 1-1.1.3: SerialNumber: 242XXXXX000C6         
xxx:~ $

xxx:~ $ cat /etc/udev/rules.d/51-android.rules 
# Google
# idVendor=04e8, idProduct=6862
SUBSYSTEM=="usb", ATTR{idVendor}=="04e8", ATTR{idProduct}=="6862", MODE="0666", GROUP="plugdev"
xxx:~ $ 

Please let me know if you need more information

@denis99999
Copy link

@KingRat0011 ; on my side Google devices work fine in Android 14, try to upgrade your ADB binary to a recent version, it seems to be very old as well as your OS, what is it ? Also, to ensure your Google device is well supported by the latest STF version, make a test with the official docker image of STF!

@KingRat0011
Copy link

@denis99999 I've tried in the past to follow the docker deployment https://github.com/DeviceFarmer/stf/blob/master/doc/DEPLOYMENT.md, but failed, are there any step by step deployment guides that you are aware off for Ubuntu maybe?. I'm not understanding the deployment, for example the statement "You have two static IPs available for the main communication bridges (or "triproxies"), or are able to figure out an alternate method. In this example we'll use devside.stf.example.org and appside.stf.example.org as easy to remember addresses." where are these 2 IPs, on the main STF server? on the Rethink DB server and lots of other questions....

@denis99999
Copy link

@KingRat0011 , you have just to download the docker image and launch it properly in local mode (i.e stf local ..), you can do the same with ADB and rethinkdb, managing them through a docker-compose file, there are a lot of examples on the net.

@KingRat0011
Copy link

Hi @denis99999
My main problem is that each device is connected to a Raspberry PI 4, the RPI4 then talks to the main server, if I try and do the docker container on the RPI for adb, I get this.

pi@controller:~ $ sudo docker compose up
[+] Running 2/1
 ✔ Container adb                                                                                                                                    Recreated                                                                          0.4s 
 ! adb The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm/v8) and no specific platform was requested                                                                                    0.0s 
Attaching to adb
adb  | exec /sbin/tini: exec format error
adb exited with code 0
pi@controller:~ $ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 12 (bookworm)"
NAME="Raspbian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@controller:~ $ cat compose.yml 
services:
  adb:
    container_name: adb
    image: devicefarmer/adb:latest
    restart: unless-stopped
    volumes: 
      - "/dev/bus/usb:/dev/bus/usb"
    privileged: true
pi@controller:~ $ 

The adb docker container, was it build for RPI's?

I can build the normal adb on the RPI, would I be able to use that?

@denis99999
Copy link

@KingRat0011 , if you are using a Raspberry Pi I recommend you to install the android-tools-adb package rather than build ADB for this architecture, and therefore use it at OS level rather than at Docker one.
Note that DeviceFarmer/STF project builds docker images for x86_64 architecture only, so if your target is another architecture as ARM one, either you have to build your own images or you have to use existing ones as for example those of the remotedevicetool organization on Docker Hub

@KingRat0011
Copy link

Thanks @denis99999 , I'll try the stf, rethinkdb docker on the main server and use the adb build from the RPi, hope this will work..

@denis99999
Copy link

@KingRat0011 , you have also to run STF on the Pi, at least a device provider service!

@KingRat0011
Copy link

Yep that will be the challenge as I cannot use the standard docker images on the RPi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants