rahaaatul / automate-flows

Flows I created for Automate app.
MIT License
6 stars 1 forks source link

Auto ADB over TCPIP + Shizuku: android.system.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused) #8

Closed Xisrr1 closed 1 month ago

Xisrr1 commented 1 month ago

What happened?

I followed the guide, but when I start the flow it just loops and shows this error: android.system.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused).

I've tried the troubleshooting methods, but they didn't work. Automate 1.43.2

Flow

Auto ADB + Shizuku

Android Version

Android 14

Automate Version

1.43.1

Relevant log output

09-08 18:54:22.857 I 3@16: System setting set
09-08 18:54:22.861 I 3@17: Delay
09-08 18:54:23.872 I 3@4: System setting set
09-08 18:54:23.882 I 3@5: Network service discover
09-08 18:54:26.897 I 3@15: Expression true?
09-08 18:54:26.898 I 3@12: Failure catch
09-08 18:54:26.899 I 3@6: ADB protocol set
09-08 18:54:26.972 F 3@6: android.system.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused)
rahaaatul commented 1 month ago
  1. Try Forget privileged service ADB keys in Automate Settings under Privileged & Superuser.
  2. Restart the device.
  3. Pair again.
  4. Run the flow.

[!NOTE] If the above solution does not work. Report issue in Automate's subreddit..

Xisrr1 commented 1 month ago

I'll report back in a few minutes.

Xisrr1 commented 1 month ago
  1. Try Forget privileged service ADB keys in Automate Settings under Privileged & Superuser.
  2. Restart the device.
  3. Pair again.
  4. Run the flow.

This didn't work, I get the same error. What should I report in the subreddit? I am new to Automate.

rahaaatul commented 1 month ago
  1. Try Forget privileged service ADB keys in Automate Settings under Privileged & Superuser.
  2. Restart the device.
  3. Pair again.
  4. Run the flow.

This didn't work, I get the same error.

What should I report in the subreddit? I am new to Automate.

Write the error Shizuku: android.system.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused) on Andorid 14 in your case.

and then link to the flow.

Xisrr1 commented 1 month ago
  • Did you generate a key though?

This? Yes Screenshot_20240908_203347_Automate

  • Do you have shizuku installed?

Yes

rahaaatul commented 1 month ago

can you connect block 15s yes to 7 and 7s ok to 12 and run the flow again?

and share the log here.

rahaaatul commented 1 month ago
  • Did you generate a key though?

This? Yes Screenshot_20240908_203347_Automate

Did you add the generated keychain to keychain alias?

Xisrr1 commented 1 month ago
  • Did you generate a key though?

This? Yes Screenshot_20240908_203347_Automate

Did you add the generated keychain to keychain alias?

Yes

rahaaatul commented 1 month ago

Okay, can you turn off wireless debugging, open shizuku app, stop it from running, and start again. See if 5555 option appears or not.

Xisrr1 commented 1 month ago

can you connect block 15s yes to 7 and 7s ok to 12 and run the flow again?

and share the log here.

`09-08 20:47:24.224 I 5@1: Flow beginning 09-08 20:47:24.230 I 5@10: Wi-Fi network connected? 09-08 20:47:24.284 I 5@4: System setting set 09-08 20:47:24.289 I 5@5: Network service discover 09-08 20:47:27.315 I 5@15: Expression true? 09-08 20:47:27.317 U 5@7:

Name: adb-RZCT921BX0X-QYM51y Host: 192.168.1.141 Port: 34235

09-08 20:47:27.318 I 5@12: Failure catch 09-08 20:47:27.321 I 5@6: ADB protocol set 09-08 20:47:27.550 F 5@6: javax.net.ssl.SSLProtocolException: Read error: ssl=0xb40000798c657798: Failure in SSL library, usually a protocol error error:10000416:SSL routines:OPENSSL_internal:SSLV3_ALERT_CERTIFICATE_UNKNOWN (external/boringssl/src/ssl/tls_record.cc:592 0xb400007a3c6d5ce0:0x00000003)`

Xisrr1 commented 1 month ago

Okay, can you turn off wireless debugging, open shizuku app, stop it from running, and start again.

Done

See if 5555 option appears or not.

Where?

rahaaatul commented 1 month ago

09-08 20:47:27.318 I 5@12: Failure catch 09-08 20:47:27.321 I 5@6: ADB protocol set 09-08 20:47:27.550 F 5@6: javax.net.ssl.SSLProtocolException: Read error: ssl=0xb40000798c657798: Failure in SSL library, usually a protocol error error:10000416:SSL routines:OPENSSL_internal:SSLV3_ALERT_CERTIFICATE_UNKNOWN (external/boringssl/src/ssl/tls_record.cc:592 0xb400007a3c6d5ce0:0x00000003)`

New error, but falls in the same category. Pairing Issue. You need to go to wireless debugging and manually remove automate pairings. and try pairing again from the app.

rahaaatul commented 1 month ago

Okay, can you turn off wireless debugging, open shizuku app, stop it from running, and start again.

Done

See if 5555 option appears or not.

Where?

It'll show something like this in shizuku: Screenshot_2024_0908_235416

Xisrr1 commented 1 month ago

New error, but falls in the same category. Pairing Issue. You need to go to wireless debugging and manually remove automate pairings. and try pairing again from the app.

I did that a few times, no luck. I've seen someone with the same issue recently Here, but I didn't find a solution yet.

Xisrr1 commented 1 month ago

Okay, can you turn off wireless debugging, open shizuku app, stop it from running, and start again.

Done

See if 5555 option appears or not.

Where?

It'll show something like this in shizuku: Screenshot_2024_0908_235416

Looks like this for me. Screenshot_20240908_205752_Shizuku

rahaaatul commented 1 month ago
  1. Open developer options on your phone's settings. 1.1. Revoke USB debugging authorizations.
  2. Go to security settings > encryption & credentials > user credentials 2.1. Delete all credentials created by automate.
  3. Follow the installation wiki again.
  4. Don't start the flow. Go to automate settings. 4.1. Restart Adb in tcp/ip mode.

Report back if it worked or not. If it works, run the flow, it should work.

Xisrr1 commented 1 month ago
  1. Open developer options on your phone's settings. 1.1. Revoke USB debugging authorizations.
  2. Go to security settings > encryption & credentials > user credentials 2.1. Delete all credentials created by automate.
  3. Follow the installation wiki again.
  4. Don't start the flow. Go to automate settings. 4.1. Restart Adb in tcp/ip mode.

Report back if it worked or not. If it works, run the flow, it should work.

With the blocks you told me to change in https://github.com/rahaaatul/automate-flows/issues/8#issuecomment-2336765545?

rahaaatul commented 1 month ago

With the blocks you told me to change in #8 (comment)?

Pair from automate settings, and generate from one of the block.

Xisrr1 commented 1 month ago

Report back if it worked or not. If it works, run the flow, it should work.

What works? The restart ADB?

rahaaatul commented 1 month ago

Report back if it worked or not. If it works, run the flow, it should work.

What works? The restart ADB?

Restart Adb in tcp/ip mode

Xisrr1 commented 1 month ago

4.1. Restart Adb in tcp/ip mode.

This is what I see

https://github.com/user-attachments/assets/abef270c-11cb-42c3-b0fb-f923d5e60a7a

Report back if it worked or not. If it works, run the flow, it should work.

rahaaatul commented 1 month ago

No notifications?

Try starting the flow.

Xisrr1 commented 1 month ago

No notifications?

Try starting the flow.

Same error. Just looping.

Xisrr1 commented 1 month ago

Maybe I debloated a system app that is important for this?

rahaaatul commented 1 month ago

Same error. Just looping.

share the log.

Maybe I debloated a system app that is important for this?

with root? what app?

Xisrr1 commented 1 month ago

share the log.

09-08 21:24:31.139 I 8@1: Flow beginning 09-08 21:24:31.144 I 8@10: Wi-Fi network connected? 09-08 21:24:31.160 I 8@4: System setting set 09-08 21:24:31.170 I 8@5: Network service discover 09-08 21:24:34.196 I 8@15: Expression true? 09-08 21:24:34.205 I 8@12: Failure catch 09-08 21:24:34.213 I 8@6: ADB protocol set 09-08 21:24:34.606 F 8@6: javax.net.ssl.SSLProtocolException: Read error: ssl=0xb40000798c658b18: Failure in SSL library, usually a protocol error error:10000416:SSL routines:OPENSSL_internal:SSLV3_ALERT_CERTIFICATE_UNKNOWN (external/boringssl/src/ssl/tls_record.cc:592 0xb400007a3c69e150:0x00000003) 09-08 21:24:34.623 I 8@16: System setting set 09-08 21:24:34.632 I 8@17: Delay 09-08 21:24:35.642 I 8@4: System setting set 09-08 21:24:35.648 I 8@5: Network service discover 09-08 21:24:38.655 I 8@15: Expression true? 09-08 21:24:38.657 I 8@12: Failure catch 09-08 21:24:38.659 I 8@6: ADB protocol set 09-08 21:24:38.707 F 8@6: android.system.ErrnoException: isConnected failed: ECONNREFUSED (Connection refused)

Maybe I debloated a system app that is important for this?

with root? what app?

I don't have root, with ADB. Inure

rahaaatul commented 1 month ago

Please create a post on the subreddit with this log. For some reason, Automate is failing to pair with your device. Maybe Android 14 is unsupported or something,

I don't have Android 14 device. So I can't help you any further.

Sorry.

Xisrr1 commented 1 month ago

Don't know if it helps, but now I do have a 555 button in Shizuku. (Shizuku is unpaired from the process you told me to do) Screenshot_20240908_213719_Shizuku Screenshot_20240908_213825_Shizuku

rahaaatul commented 1 month ago

great it should work now, you have to connect with 5555

If android 14 gives permission to access /android/data folder for automate to access shizuku folder. it should be a success.

Xisrr1 commented 1 month ago

How do I connect with 555? If I click the 555 button, it will show the second screenshot. If I press the Shizuku start button with Wireless debugging on, it will immediately try to connect from that, without letting me choose 555.

rahaaatul commented 1 month ago

Do you have a PC?

Can you try adb tcpip 5555 via usb?

Xisrr1 commented 1 month ago

Do you have a PC?

Can you try adb tcpip 5555 via usb?

I'll check if i can

Xisrr1 commented 1 month ago

Okay it did work with the PC, I started Shizuku with 5555. What now? The flow still doesn't work if that's what's supposed to happen.

rahaaatul commented 1 month ago

This confirms that the issue is related to wireless debugging. Since Automate is using wireless debugging to set port 5555, it won't function properly. To automate it, you'll need to disconnect those network blocks, but that defeats the purpose of the flow, which is to automate the entire process without human intervention.

You need to figure out why wireless debugging isn't working. Try resetting the device.