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

STFService repeatedly prompts for installation on Xiaomi 11 Lite 5G #742

Open
jbfenris opened this issue Dec 19, 2023 · 8 comments
Open

Comments

@jbfenris
Copy link

What is the issue or idea you have?
Issue to install STFservice on Xiaomi device. The permission to install STFService is always requested despite the "remember" check box is set at the first installation.

Does it only happen on a specific device? Please run adb devices -l and paste the corresponding row.
Xiaomi 11 Lite 5G
SDK 31

adb devices -l
List of devices attached
f143c361               device product:renoir_eea model:M2101K9G device:renoir transport_id:5
fdfae2c                unauthorized transport_id:6

**Logs

2023-12-19T14:20:42.994Z INF/provider 12000 [*] Restarting device worker "f143c361"
2023-12-19T14:20:43.856Z INF/device:support:push 6964 [f143c361] Sending output to "tcp://127.0.0.1:7116"
2023-12-19T14:20:43.861Z INF/device 6964 [f143c361] Preparing device
2023-12-19T14:20:44.392Z INF/device:support:sub 6964 [f143c361] Receiving input from "tcp://127.0.0.1:7114"
2023-12-19T14:20:44.404Z INF/device:support:sub 6964 [f143c361] Subscribing to permanent channel "*ALL"
2023-12-19T14:20:44.470Z INF/device:support:properties 6964 [f143c361] Loading properties
2023-12-19T14:20:44.521Z INF/device:support:sdk 6964 [f143c361] Supports SDK 31
2023-12-19T14:20:44.522Z INF/device:support:abi 6964 [f143c361] Supports ABIs arm64-v8a, armeabi-v7a, armeabi
2023-12-19T14:20:44.777Z INF/device:resources:minicap 6964 [f143c361] Installing "C:\Users\user\AppData\Roaming\npm\node_modules\@devicefarmer\stf\node_modules\@devicefarmer\minicap-prebuilt\prebuilt\noarch\minicap.apk" as "/data/local/tmp/minicap.apk"
2023-12-19T14:20:44.984Z INF/device:resources:service 6964 [f143c361] Checking whether we need to install STFService
2023-12-19T14:20:45.075Z INF/device:resources:service 6964 [f143c361] Installing STFService
2023-12-19T14:20:57.826Z FTL/device 6964 [f143c361] Setup had an error Error: /data/local/tmp/STFService.apk could not be installed [INSTALL_FAILED_USER_RESTRICTED: Install canceled by user]
    at C:\Users\user\AppData\Roaming\npm\node_modules\@devicefarmer\stf\node_modules\@devicefarmer\adbkit\lib\adb\command\host-transport\install.js:28:23
    at process.processImmediate (node:internal/timers:478:21)
2023-12-19T14:20:57.828Z FTL/util:lifecycle 6964 [f143c361] Shutting down due to fatal error
2023-12-19T14:20:57.838Z INF/provider 12000 [*] Cleaning up device worker "f143c361"
2023-12-19T14:20:57.839Z ERR/provider 12000 [*] Device worker "f143c361" died with code 1

Please provide the steps to reproduce the issue.
All the time, when I start and run stf.
The phone prompts for manual confirmation to install STFService each time

Please run stf doctor and paste the output here.

2023-12-19T14:33:34.274Z INF/cli:doctor 3160 [*] OS Arch: x64
2023-12-19T14:33:34.277Z INF/cli:doctor 3160 [*] OS Platform: win32
2023-12-19T14:33:34.278Z WRN/cli:doctor 3160 [*] STF has never been tested on Windows. Contributions are welcome!
2023-12-19T14:33:34.278Z INF/cli:doctor 3160 [*] OS Platform: 10.0.19045
2023-12-19T14:33:34.278Z INF/cli:doctor 3160 [*] Using Node 20.10.0
2023-12-19T14:33:34.358Z INF/cli:doctor 3160 [*] Using ZeroMQ 4.2.2
2023-12-19T14:33:34.531Z INF/cli:doctor 3160 [*] Using GraphicsMagick 1.3.42
2023-12-19T14:33:34.532Z INF/cli:doctor 3160 [*] Using RethinkDB 2.3.6-windows
2023-12-19T14:33:34.535Z ERR/cli:doctor 3160 [*] RethinkDB is currently 2.3.6-windows but needs to be >= 2.2
2023-12-19T14:33:34.575Z INF/cli:doctor 3160 [*] Using ProtoBuf 25.1
2023-12-19T14:33:34.577Z ERR/cli:doctor 3160 [*] ProtoBuf is currently 25.1 but needs to be >= 3
2023-12-19T14:33:34.619Z INF/cli:doctor 3160 [*] Using ADB 1.0.41
@denis99999
Copy link

@jbhfenris , you are meeting a permission issue on your XIAOMI phone, I met such issue in the past, for now I have no XIAOMI phone with me, but here from memory how I solved the problem: create a XIAOMI account with a SIM card inserted in order to be able to activate some developer options, something like that: "install apk via USB" and "USB debug (security options)" and "disable ADB authorization timeout".

@only1God
Copy link

only1God commented Dec 21, 2023

I have faced the same issue and what you are suggesting will not fix it.
The this is that Xiaomi has their security service that check for that. @jbhfenris try poking around that application and see if you can disable it.
In any way this is not an STF issue IMO...

@denis99999
Copy link

@only1God , for me it has been fixed like that but perhaps I forgot some actions, moreover I believe the OS was XIAOMI 12 or 13, so @jbhfenris try to upgrade your phone, and yes of course I confirm it is not an STF issue.

@jbfenris
Copy link
Author

I've followed the recommended actions:

  • update to Mi 14 (latest version)
  • allow install via USB
  • disable ADB authorization timeout
  • uncheck application checking via USB
    But when I unplug or reboot the mobile, the following popup appears
    20231221_143645

even if I check the box "remember my choice" before clicking "install"
I also uninstall STFService App but the result is the same.

@denis99999
Copy link

denis99999 commented Dec 21, 2023

@jbhfenris , as I said you have also to enable "USB debug (security options)" and create a XIAOMI account with a SIM card inserted

@denis99999
Copy link

@jbhfenris , I got a XIAOMI 13 MIUI 14.0.12 and it works fine following my instructions

@jbfenris
Copy link
Author

@denis99999, for me USB debug (security settings) is ON
image

@denis99999
Copy link

denis99999 commented Dec 21, 2023

@jbhfenris , sorry I don't know what is your problem with this phone, try this:

  1. disconnect the phone from the PC
  2. manually remove the STF agent on the phone
  3. disable "install via USB" and "USB debugging (security settings)" options
  4. enable "install via USB" and "USB debugging (security settings)" options accepting ALL
  5. connect the phone to the PC

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