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

[FEATURE] Add option to always copy connection data right after wireless ADB is enabled #15

Closed
2 tasks done
clague opened this issue Feb 20, 2024 · 12 comments
Closed
2 tasks done
Labels
feature request Requesting a feature

Comments

@clague
Copy link

clague commented Feb 20, 2024

System information

Describe your setup, so we can understand the cause of the bug better

  • Android version: Android 14
  • Android vendor: One UI
  • Mode: Shizuku
  • WADBS version: 1.1
  • Where did you get the app from: F-Droid
  • Any additional information you would like to share about your system
    • KDE Connect version: 1.29.0 (From F-droid)

Problem description

Describe your problem with as much detail as possible.
You may want to include some specific conditions the problem is occurring because of in your opinion (e.g. the widget is not working, but you are using a custom home screen launcher).
Provide error logs if you are able to get any. You can capture logs using your PC or an app such as MatLog on your Android device.

I have installed KDE Connect, and the KDE Connect integration switch in app is enabled. But when I turn on Wireless Debug using the widget or button in quick setting panel, I don't receive any clipborad sync on my PC and the script don't work too. KDE Connect's clipboard sync function is normal.

  • This issue was not reported before
  • I agree to keep the discussion polite and on point
@clague clague added the bug Something isn't working label Feb 20, 2024
@clague clague changed the title [BUG] KDE Connect integration doesn't seem to work properly [BUG] KDE Connect integration doesn't seem to work properly on shizuku mode Feb 21, 2024
@Smooth-E
Copy link
Owner

Hello. Since you are using Shizuku mode, commands from WADBS are ran with ADB-level privileges. In Shizuku mode, enabling the wireless debugging is done through reflection, therefore is possible. However, to run KDE Connect clipboard sync, WADBS needs to dispatch an intent to a non-exported activity. Which is not allowed with ADB shell privileges. You can check validity of my words by examining the logs of WADBS.

Recently I thougth that maybe it would be nice to maintain a small fork of KDE Connect with this needed activity marked as exported. I will not ask for this to be in upstream KDE Connect, because exporting this activity somewhat creates a security risk.

@Smooth-E Smooth-E closed this as not planned Won't fix, can't repro, duplicate, stale Feb 25, 2024
@clague
Copy link
Author

clague commented Feb 25, 2024

How about just write into the clipboard?

@Smooth-E
Copy link
Owner

And I am doing this. Then I send an intent to KDE Connect so it syncs it. See this function.

@clague
Copy link
Author

clague commented Feb 26, 2024

I mean just copy the text when the root privilege is NOT granted. So I can use KDE Connect's send clipboard button to sync clipboard. By now, I'm just unable to get connection data copied.

@clague
Copy link
Author

clague commented Feb 26, 2024

And I saw some OneUI only features in README, but I just cannot find them. Is something wrong with me or just need someone tell me where them are😂.

@Smooth-E
Copy link
Owner

I mean just copy the text when the root privilege is NOT granted. So I can use KDE Connect's send clipboard button to sync clipboard. By now, I'm just unable to get connection data copied.

Sure, this is valid suggestion to have the data automatically put in your clipboard. Right now you can copy the connection data by tapping on an informative widget on your home screen or by tapping a button inside of QS Tile's Extended menu (One UI only).

@Smooth-E Smooth-E reopened this Feb 26, 2024
@Smooth-E
Copy link
Owner

And I saw some OneUI only features in README, but I just cannot find them. Is something wrong with me or just need someone tell me where them are😂.

The only One UI integration is the Extended view of the QS tile. This was tested on Android 11 based One UI, One UI 2.x, I believe. You can access this view by tapping the text label under the QS tile (same as if you tap "Wi-Fi" label under the Wi-Fi QS Tile and it opens an extended menu with some quick options and a list of networks).

@Smooth-E Smooth-E changed the title [BUG] KDE Connect integration doesn't seem to work properly on shizuku mode [FEATURE] Add option to always copy connection data right after wireless ADB is enabled Feb 26, 2024
@Smooth-E Smooth-E added feature request Requesting a feature and removed bug Something isn't working labels Feb 26, 2024
@clague
Copy link
Author

clague commented Feb 26, 2024

I'm in OneUI 6.0, it seems that I cannot use the QS tile feature. Only the WLAN and Bluetooth tile can be extended. (Maybe I need open a new issue)

Screen_Recording_20240226_144547_WADBS.mp4

@Smooth-E
Copy link
Owner

This integration was implemented through a reverse-engineered API documented by OneUI Project. Looks like Samsung decided to change this in recent versions of OneUI. Does any of the system apps have a tile with an extended view? For example, the Flashlight tile had it for me. It displayed a brightness slider there.

@clague
Copy link
Author

clague commented Feb 26, 2024

Yes it has. And some other system app have extended view too. And it's triggered by holding.

Screen_Recording_20240226_150729_Amaze.mp4

@Smooth-E
Copy link
Owner

Smooth-E commented Feb 26, 2024

Alright. Then they have probably changed the API. Maybe I will spend some time reverse engineering core OneUI apps to see how it works (or ask OneUI Project maintainers to do this 😅). Please, create a new issue for this and include your videos as well as some description. Thanks for reporting in such an informative manner!

Smooth-E added a commit that referenced this issue Mar 12, 2024
…ze it with KDE Connect (requested in #15)

fix(KDE Connect): State on the settings screen that KDE Connect integration requires root.
@Smooth-E
Copy link
Owner

Added the feature. Putting data to the clipboard is now separated from KDE Connect integration. Expect this in the next release (in a month or two).

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

No branches or pull requests

2 participants