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

ADB Root Connection Refused #379

Closed
koushiksarker2001 opened this issue May 14, 2022 · 8 comments
Closed

ADB Root Connection Refused #379

koushiksarker2001 opened this issue May 14, 2022 · 8 comments

Comments

@koushiksarker2001
Copy link

Screenshot from 2022-05-14 07-20-22
Mine is saying connection refused. When i restart my pc then it works. ADB connects. But when i do adb root command to register the device on google to make playstore running then i get an error. **restarting adbd as root timeout expired while waiting for device**
After this I do adb connect ip:port then this happens. Connection Refused.
NB: I have enabled the root adb from developer settings already. I'm on Ubuntu 22.04.

@cniw
Copy link
Contributor

cniw commented Jun 10, 2022

If you just want to get the device id, you can use shell from waydroid command option

  1. run the shell and get the device
    • sudo waydroid shell
    • ANDROID_RUNTIME_ROOT=/apex/com.android.runtime sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";"
    • block and copy the device id
  2. register it on https://www.google.com/android/uncertified/
    • please wait couple minutes to make sure all registration process completed on google server and synced all
  3. restart the waydroid
    • waydroid session stop
    • waydroid show-full-ui

@UlyssesZh
Copy link

+1 for this issue. I'm on Ubuntu 20.04 and also encountered this problem.

@GAP2007
Copy link

GAP2007 commented Jul 27, 2022

+2 for this issue I'm on Arch

@rothn
Copy link

rothn commented Sep 18, 2022

+1

@rothn
Copy link

rothn commented Sep 18, 2022

The workaround @cniw suggests fails with the following SELinux error in logcat:

09-18 14:17:13.822  5574  5574 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-18 14:17:13.822  5574  5574 F DEBUG   : LineageOS Version: '18.1-20220918-GAPPS-waydroid_arm64'
09-18 14:17:13.822  5574  5574 F DEBUG   : Build fingerprint: 'waydroid/lineage_waydroid_arm64/waydroid_arm64:11/RQ3A.211001.001/eng.nroth.20220917.211924:userdebug/test-keys'
09-18 14:17:13.822  5574  5574 F DEBUG   : Revision: '0'
09-18 14:17:13.822  5574  5574 F DEBUG   : ABI: 'arm64'
09-18 14:17:13.826  5574  5574 F DEBUG   : Timestamp: 2022-09-18 14:17:13-0500
09-18 14:17:13.826  5574  5574 F DEBUG   : pid: 5574, tid: 5574, name: adbd  >>> /apex/com.android.adbd/bin/adbd <<<
09-18 14:17:13.826  5574  5574 F DEBUG   : uid: 0
09-18 14:17:13.826  5574  5574 F DEBUG   : signal 6 (SIGABRT), code -1 (SI_QUEUE), fault addr --------
09-18 14:17:13.826  5574  5574 F DEBUG   : Abort message: 'Could not set SELinux context'
09-18 14:17:13.826  5574  5574 F DEBUG   :     x0  0000000000000000  x1  00000000000015c6  x2  0000000000000006  x3  0000ffffc7e2db30
09-18 14:17:13.827  5574  5574 F DEBUG   :     x4  0000000000000000  x5  0000000000000000  x6  0000000000000000  x7  000000000219d6f8
09-18 14:17:13.827  5574  5574 F DEBUG   :     x8  00000000000000f0  x9  3e28f9a3b9b5cd07  x10 0000000000000000  x11 ffffffc0ffffffdf
09-18 14:17:13.827  5574  5574 F DEBUG   :     x12 0000000000000001  x13 000000000000002c  x14 0000000000000007  x15 ffffffffffffffff
09-18 14:17:13.827  5574  5574 F DEBUG   :     x16 0000ffffa1a98948  x17 0000ffffa1a77410  x18 0000ffffa2fde000  x19 00000000000015c6
09-18 14:17:13.827  5574  5574 F DEBUG   :     x20 00000000000015c6  x21 00000000ffffffff  x22 0000ffffa1f0b000  x23 0000ffffa1f0b000
09-18 14:17:13.827  5574  5574 F DEBUG   :     x24 0000aaaac118edbc  x25 0000ffffc7e2dd10  x26 0000000000000000  x27 0000ffffa1a9d7e0
09-18 14:17:13.827  5574  5574 F DEBUG   :     x28 0000000000000000  x29 0000ffffc7e2dbb0
09-18 14:17:13.828  5574  5574 F DEBUG   :     lr  0000ffffa1a29a9c  sp  0000ffffc7e2db10  pc  0000ffffa1a29ac8  pst 0000000000000000
09-18 14:17:13.831  5574  5574 F DEBUG   : 
09-18 14:17:13.831  5574  5574 F DEBUG   : backtrace:
09-18 14:17:13.831  5574  5574 F DEBUG   :       #00 pc 0000000000089ac8  /apex/com.android.runtime/lib64/bionic/libc.so (abort+164) (BuildId: e4cdaa3667d6b3fb35d46671d31909c3)
09-18 14:17:13.832  5574  5574 F DEBUG   :       #01 pc 0000000000105178  /apex/com.android.adbd/bin/adbd (android::base::DefaultAborter(char const*)+12) (BuildId: 02c307e637518e3752727227a9c4b4c1)
09-18 14:17:13.832  5574  5574 F DEBUG   :       #02 pc 00000000001069cc  /apex/com.android.adbd/bin/adbd (android::base::SetAborter(std::__1::function<void (char const*)>&&)::$_3::__invoke(char const*)+76) (BuildId: 02c307e637518e3752727227a9c4b4c1)
09-18 14:17:13.832  5574  5574 F DEBUG   :       #03 pc 0000000000106340  /apex/com.android.adbd/bin/adbd (android::base::LogMessage::~LogMessage()+320) (BuildId: 02c307e637518e3752727227a9c4b4c1)
09-18 14:17:13.832  5574  5574 F DEBUG   :       #04 pc 000000000008b050  /apex/com.android.adbd/bin/adbd (adbd_main(int)+4064) (BuildId: 02c307e637518e3752727227a9c4b4c1)
09-18 14:17:13.832  5574  5574 F DEBUG   :       #05 pc 000000000008b398  /apex/com.android.adbd/bin/adbd (main+332) (BuildId: 02c307e637518e3752727227a9c4b4c1)
09-18 14:17:13.832  5574  5574 F DEBUG   :       #06 pc 000000000008506c  /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108) (BuildId: e4cdaa3667d6b3fb35d46671d31909c3)

@rothn
Copy link

rothn commented Sep 18, 2022

Workaround:

  1. Cat out gservices.db to the local filesystem
sudo waydroid shell << EOF | cat > gservices.db
cat /data/data/com.google.android.gsf/databases/gservices.db
EOF
  1. Then, run the SQL query: sqlite3 gservices.db "select * from main where name = \"android_id\";"

@aleasto
Copy link
Member

aleasto commented Nov 19, 2022

Duplicate of #348

@aleasto aleasto marked this as a duplicate of #348 Nov 19, 2022
@aleasto aleasto closed this as not planned Won't fix, can't repro, duplicate, stale Nov 19, 2022
@valVk
Copy link

valVk commented Apr 8, 2024

If you just want to get the device id, you can use shell from waydroid command option

  1. run the shell and get the device

    • sudo waydroid shell
    • ANDROID_RUNTIME_ROOT=/apex/com.android.runtime sqlite3 /data/data/com.google.android.gsf/databases/gservices.db "select * from main where name = \"android_id\";"
    • block and copy the device id
  2. register it on https://www.google.com/android/uncertified/

    • please wait couple minutes to make sure all registration process completed on google server and synced all
  3. restart the waydroid

    • waydroid session stop
    • waydroid show-full-ui

It would be great if this added to the documentation

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

7 participants