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

Is adbd supposed to work with normal linux kernel? I tried and failed. #147

Open
sprhawk opened this issue Oct 11, 2019 · 14 comments
Open

Comments

@sprhawk
Copy link

sprhawk commented Oct 11, 2019

I'm using warrior branch ( 2.7.1 ), built with Qualcomm snapdragon 845c board (manifests, linux kernel: linux-linaro-qcomlt/5.2-r0) , and put

IMAGE_INSTALL_append = " android-tools"

to install adb daemon, but it doesn't start up, and I see /usr/bin/android-setup-gadget, there is no /system/build.prop , /sys/class/android_usb/* files to operate on

adbd --help will return segmentation fault

@kraj
Copy link
Contributor

kraj commented Oct 11, 2019

this should be a bug, please post any stack traces or debug information that you can collect

@sprhawk
Copy link
Author

sprhawk commented Oct 12, 2019

@kraj I want to know: is it supposed to work on a normal linux build? I know there are multiple partitions on android's system partition, but there are only two ( boot and rootfs ) partitions on normal linux build. Is this the reason adbd cannot work?

But if adbd is supposed to work on a normal linux, I would like to pay more time on finding the reason.

Thanks

@kraj
Copy link
Contributor

kraj commented Oct 12, 2019

@shr-project might have more to add on adb usage on OE, but I think the fact that its crashing is a bug that should be fixed

@shr-project
Copy link
Contributor

It's not supposed to work on a normal linux build.

We (LuneOS) are using android-tools-native to create fastboot images and target android-tools together with Halium which provides necessary support in kernel and rootfs, see meta-android layer for example how to use it.

@kraj
Copy link
Contributor

kraj commented Oct 12, 2019

@shr-project does it make sense then to limit the recipe to built native and nativesdk alone and not for target

@shr-project
Copy link
Contributor

We're using target version as well as mentioned above, limiting it to native(sdk) would force us to add bbappend re-enabling it for target.

@tewarid
Copy link
Contributor

tewarid commented May 5, 2021

I am now able to run adb daemon with systemd on a linux device (rpi zero w) with the following in local.conf

IMAGE_INSTALL_append = " android-tools-adbd"
PREFERRED_PROVIDER_android-tools-conf = "android-tools-conf-configfs"

You'll need to touch /var/usb-debugging-enabled to enable usb debugging, as that is a precondition for systemd to start the service.

I am connecting the rpi zero w to host using USB OTG port, and meta-raspberrypi BSP layer requires the following in local.conf to enable USB gadget/peripheral mode

ENABLE_DWC2_PERIPHERAL = "1"

@sprhawk
Copy link
Author

sprhawk commented May 5, 2021

I am now able to run adb daemon with systemd on a linux device (rpi zero w) with the following in local.conf

IMAGE_INSTALL_append = " android-tools-adbd"
PREFERRED_PROVIDER_android-tools-conf = "android-tools-conf-configfs"

You'll need to touch /var/usb-debugging-enabled to enable usb debugging, as that is a precondition for systemd to start the service.

I am connecting the rpi zero w to host using USB OTG port, and meta-raspberrypi BSP layer requires the following in local.conf to enable USB gadget/peripheral mode

ENABLE_DWC2_PERIPHERAL = "1"

Cool!

@kraj
Copy link
Contributor

kraj commented May 5, 2021

I am now able to run adb daemon with systemd on a linux device (rpi zero w) with the following in local.conf

IMAGE_INSTALL_append = " android-tools-adbd"
PREFERRED_PROVIDER_android-tools-conf = "android-tools-conf-configfs"

You'll need to touch /var/usb-debugging-enabled to enable usb debugging, as that is a precondition for systemd to start the service.

This can be converted into a patch for adb. Are you up for it ?

I am connecting the rpi zero w to host using USB OTG port, and meta-raspberrypi BSP layer requires the following in local.conf to enable USB gadget/peripheral mode

ENABLE_DWC2_PERIPHERAL = "1"

@tewarid
Copy link
Contributor

tewarid commented May 5, 2021

This can be converted into a patch for adb. Are you up for it ?

Sorry - can't look into this at the moment.

@tewarid
Copy link
Contributor

tewarid commented May 5, 2021

This can be converted into a patch for adb. Are you up for it ?

Sorry - can't look into this at the moment.

Was your comment regarding the patch due to this?

You'll need to touch /var/usb-debugging-enabled to enable usb debugging, as that is a precondition for systemd to start the service.

If so, this may not be an issue but a feature - we might want to leave control of whether usb debugging (adbd) is enabled, or not, to the device.

@shr-project
Copy link
Contributor

If so, this may not be an issue but a feature - we might want to leave control of whether usb debugging (adbd) is enabled, or not, to the device.

Agreed, users should enable it only when needed or it could be enabled only for some images (like debug-tweaks IMAGE_FEATURE can be enabled only in some images), we're using ROOTFS_POSTPROCESS_COMMAND to enable it only in "devel" images:
webOS-ports/meta-webos-ports@cca8773

@tewarid
Copy link
Contributor

tewarid commented May 15, 2021

I am unable to get adbd to work with TCLIBC = "musl" because configfs gadget fails to start. I will enable debug logging in dwc2 driver and post additional details later.

@tewarid
Copy link
Contributor

tewarid commented May 19, 2021

I am unable to get adbd to work with TCLIBC = "musl" because configfs gadget fails to start. I will enable debug logging in dwc2 driver and post additional details later.

I've posted the log at https://github.com/tewarid/berry/issues/3#issue-894672636.

halstead pushed a commit that referenced this issue Jul 9, 2021
Added:

core: implement Device.__eq__() (#147)
Changed:

libusb0: implement is_kernel_driver_active() for FreeBSD and DragonFly BSD (#365)
libusb0: implement is_kernel_driver_active() for Mac OS (#374)
Fixed:

setup: prevent installation on unsupported Python versions (PR #364)
control: fix undefined USBError (#372)
tests: fix legacy/hardware tests for Python 3.9 (#373)

Add runtime dependency to resolve errors that occurred when import usb.

Signed-off-by: Zang Ruochen <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Jul 9, 2021
Added:

core: implement Device.__eq__() (openembedded#147)
Changed:

libusb0: implement is_kernel_driver_active() for FreeBSD and DragonFly BSD (openembedded#365)
libusb0: implement is_kernel_driver_active() for Mac OS (openembedded#374)
Fixed:

setup: prevent installation on unsupported Python versions (PR openembedded#364)
control: fix undefined USBError (openembedded#372)
tests: fix legacy/hardware tests for Python 3.9 (openembedded#373)

Add runtime dependency to resolve errors that occurred when import usb.

Signed-off-by: Zang Ruochen <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Jul 9, 2021
Added:

core: implement Device.__eq__() (openembedded#147)
Changed:

libusb0: implement is_kernel_driver_active() for FreeBSD and DragonFly BSD (openembedded#365)
libusb0: implement is_kernel_driver_active() for Mac OS (openembedded#374)
Fixed:

setup: prevent installation on unsupported Python versions (PR openembedded#364)
control: fix undefined USBError (openembedded#372)
tests: fix legacy/hardware tests for Python 3.9 (openembedded#373)

Add runtime dependency to resolve errors that occurred when import usb.

Signed-off-by: Zang Ruochen <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Jul 12, 2021
Added:

core: implement Device.__eq__() (openembedded#147)
Changed:

libusb0: implement is_kernel_driver_active() for FreeBSD and DragonFly BSD (openembedded#365)
libusb0: implement is_kernel_driver_active() for Mac OS (openembedded#374)
Fixed:

setup: prevent installation on unsupported Python versions (PR openembedded#364)
control: fix undefined USBError (openembedded#372)
tests: fix legacy/hardware tests for Python 3.9 (openembedded#373)

Add runtime dependency to resolve errors that occurred when import usb.

Signed-off-by: Zang Ruochen <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
halstead pushed a commit that referenced this issue Jul 13, 2021
Added:

core: implement Device.__eq__() (#147)
Changed:

libusb0: implement is_kernel_driver_active() for FreeBSD and DragonFly BSD (#365)
libusb0: implement is_kernel_driver_active() for Mac OS (#374)
Fixed:

setup: prevent installation on unsupported Python versions (PR #364)
control: fix undefined USBError (#372)
tests: fix legacy/hardware tests for Python 3.9 (#373)

Add runtime dependency to resolve errors that occurred when import usb.

Signed-off-by: Zang Ruochen <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
Signed-off-by: Trevor Gamblin <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Jul 26, 2021
android-tools-adbd service can be enabled in the image using
USB_DEBUGGING_ENABLED = "1" in local.conf.

Signed-off-by: Devendra Tewari <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Jul 26, 2021
Stray newline character causes issues in configfs scripts used in
android-tools-adbd.service.

Signed-off-by: Devendra Tewari <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Jul 26, 2021
Stray newline character causes issues in functionfs setup scripts
used by android-tools-adbd.service.

Signed-off-by: Devendra Tewari <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Jul 26, 2021
Stray newline character causes errors in functionfs setup scripts
used by android-tools-adbd.service, when using musl libc and/or toybox.

Signed-off-by: Devendra Tewari <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Jul 28, 2021
Stray newline character causes errors in functionfs setup scripts
used by android-tools-adbd.service, when using musl libc and/or toybox.

Signed-off-by: Devendra Tewari <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Jul 29, 2021
Stray newline character causes errors in functionfs setup scripts
used by android-tools-adbd.service, when using musl libc and/or toybox.

Signed-off-by: Devendra Tewari <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Aug 5, 2021
android-tools-adbd service can be enabled in the image using
USB_DEBUGGING_ENABLED = "1" in local.conf.

Signed-off-by: Devendra Tewari <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Aug 13, 2021
android-tools-adbd service can be enabled in the image using
USB_DEBUGGING_ENABLED = "1" in local.conf.

Signed-off-by: Devendra Tewari <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Aug 13, 2021
Stray newline character causes errors in functionfs setup scripts
used by android-tools-adbd.service, when using musl libc and/or toybox.

Signed-off-by: Devendra Tewari <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Aug 13, 2021
android-tools-adbd service can be enabled in the image using
USB_DEBUGGING_ENABLED = "1" in local.conf.

Signed-off-by: Devendra Tewari <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Aug 13, 2021
Stray newline character causes errors in functionfs setup scripts
used by android-tools-adbd.service, when using musl libc and/or toybox.

Signed-off-by: Devendra Tewari <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Aug 13, 2021
Stray newline character causes errors in functionfs setup scripts
used by android-tools-adbd.service, when using musl libc and/or toybox.

Signed-off-by: Devendra Tewari <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Aug 13, 2021
android-tools-adbd service can be enabled in the image using
USB_DEBUGGING_ENABLED = "1" in local.conf.

Signed-off-by: Devendra Tewari <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Aug 16, 2021
android-tools-adbd service can be enabled in the image using
USB_DEBUGGING_ENABLED = "1" in local.conf.

Signed-off-by: Devendra Tewari <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Aug 16, 2021
android-tools-adbd service can be enabled in the image using
USB_DEBUGGING_ENABLED = "1" in local.conf.

Signed-off-by: Devendra Tewari <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Aug 17, 2021
android-tools-adbd service can be enabled in the image using
USB_DEBUGGING_ENABLED = "1" in local.conf.

Signed-off-by: Devendra Tewari <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
halstead pushed a commit that referenced this issue Aug 18, 2021
Stray newline character causes errors in functionfs setup scripts
used by android-tools-adbd.service, when using musl libc and/or toybox.

Signed-off-by: Devendra Tewari <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
(cherry picked from commit db5f487)
Signed-off-by: Armin Kuster <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Aug 31, 2021
android-tools-adbd service can be enabled in the image using
USB_DEBUGGING_ENABLED = "1" in local.conf.

Signed-off-by: Devendra Tewari <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Sep 29, 2021
android-tools-adbd service can be enabled in the image using
USB_DEBUGGING_ENABLED = "1" in local.conf.

Signed-off-by: Devendra Tewari <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Mar 14, 2022
- Change branch name master -> main according to upstream repository.
- Update 2.0.15 -> 2.0.16. Changelog:

    1df82b9 Add param traits for CL_DEVICE_SUPPORTED_REGISTER_ALLOCATIONS_ARM (openembedded#165)
    814e7b2 update the C++ bindings code example (openembedded#151)
    6d833a5 Update opencl.hpp: Add CL_DEVICE_BOARD_NAME_AMD (openembedded#160)
    25ad589 Added missing definitions for deprecated prefixes and suffixes for version 2.2 (openembedded#159)
    21a34b0 Test two additional defines and update descriptions in header (openembedded#147)
    ff7318c Fix cl::enqueueMapSVM for cl::vector and cl::pointer (openembedded#145)
    30d4219 Test most of the possible defines (openembedded#140)
    63d9e41 Fix unreasonable error handling in opencl.hpp (openembedded#139)
    0198c41 Add support for cl_khr_integer_dot_product v2 (openembedded#141)
    8df6c8f Transition CI to Github Actions (openembedded#142)

Signed-off-by: Daniel Gomez <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Mar 14, 2022
- Change branch name master -> main according to upstream repository.
- Update 2.0.15 -> 2.0.16. Changelog:

    1df82b9 Add param traits for CL_DEVICE_SUPPORTED_REGISTER_ALLOCATIONS_ARM (openembedded#165)
    814e7b2 update the C++ bindings code example (openembedded#151)
    6d833a5 Update opencl.hpp: Add CL_DEVICE_BOARD_NAME_AMD (openembedded#160)
    25ad589 Added missing definitions for deprecated prefixes and suffixes for version 2.2 (openembedded#159)
    21a34b0 Test two additional defines and update descriptions in header (openembedded#147)
    ff7318c Fix cl::enqueueMapSVM for cl::vector and cl::pointer (openembedded#145)
    30d4219 Test most of the possible defines (openembedded#140)
    63d9e41 Fix unreasonable error handling in opencl.hpp (openembedded#139)
    0198c41 Add support for cl_khr_integer_dot_product v2 (openembedded#141)
    8df6c8f Transition CI to Github Actions (openembedded#142)

Signed-off-by: Daniel Gomez <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Mar 14, 2022
- Change branch name master -> main according to upstream repository.
- Update 2.0.15 -> 2.0.16. Changelog:

    1df82b9 Add param traits for CL_DEVICE_SUPPORTED_REGISTER_ALLOCATIONS_ARM (openembedded#165)
    814e7b2 update the C++ bindings code example (openembedded#151)
    6d833a5 Update opencl.hpp: Add CL_DEVICE_BOARD_NAME_AMD (openembedded#160)
    25ad589 Added missing definitions for deprecated prefixes and suffixes for version 2.2 (openembedded#159)
    21a34b0 Test two additional defines and update descriptions in header (openembedded#147)
    ff7318c Fix cl::enqueueMapSVM for cl::vector and cl::pointer (openembedded#145)
    30d4219 Test most of the possible defines (openembedded#140)
    63d9e41 Fix unreasonable error handling in opencl.hpp (openembedded#139)
    0198c41 Add support for cl_khr_integer_dot_product v2 (openembedded#141)
    8df6c8f Transition CI to Github Actions (openembedded#142)

Signed-off-by: Daniel Gomez <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Aug 15, 2022
Changelog:
===========
* bugfix openembedded#147: Allow for tabs in whitespace before quoted rdata fields.
* bugfix openembedded#149: Add some missing [out] annotations to doxygen parameters.
* Fix build error on Solaris 10 with inet_ntop redeclaration error.
* Fix -U flag with ldns-signzone.
* Enable compile of SVCB and HTTPS support by default.
* bugfix openembedded#179: Free line memory even if zone file parsing fails
* bugfix openembedded#166: Grow buffer when writing chars and fixed size
  strings when converting to presentation format, preventing
  potential assersion errors.
* bugfix openembedded#46: Print network errors when secure tracing.
* EDNS0 Option handling and conversion into presentation format.
* bugfix openembedded#145: ldns-verify-zone should not call occluded records
  glue.

Signed-off-by: Wang Mingyu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Aug 15, 2022
Changelog:
===========
* bugfix openembedded#147: Allow for tabs in whitespace before quoted rdata fields.
* bugfix openembedded#149: Add some missing [out] annotations to doxygen parameters.
* Fix build error on Solaris 10 with inet_ntop redeclaration error.
* Fix -U flag with ldns-signzone.
* Enable compile of SVCB and HTTPS support by default.
* bugfix openembedded#179: Free line memory even if zone file parsing fails
* bugfix openembedded#166: Grow buffer when writing chars and fixed size
  strings when converting to presentation format, preventing
  potential assersion errors.
* bugfix openembedded#46: Print network errors when secure tracing.
* EDNS0 Option handling and conversion into presentation format.
* bugfix openembedded#145: ldns-verify-zone should not call occluded records
  glue.

Signed-off-by: Wang Mingyu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Aug 20, 2022
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Aug 20, 2022
This reverts commit db5f487.

Signed-off-by: Devendra Tewari <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Aug 20, 2022
This reverts commit db5f487.

Signed-off-by: Devendra Tewari <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
tewarid added a commit to tewarid/meta-openembedded that referenced this issue Aug 21, 2022
This reverts commit db5f487.

Increase sleep to 10 seconds otherwise interface is not ready on rpi0w.

Signed-off-by: Devendra Tewari <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Feb 6, 2024
Changelog:
===========
- openembedded#147 fix test which failed due to behavior changes in OpenSSL 3.2
- update PublicSuffix
- add examples for TLS JA3/JA4 fingerprinting to tls_fingerprint/

Signed-off-by: Wang Mingyu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
kraj pushed a commit to YoeDistro/meta-openembedded that referenced this issue Feb 9, 2024
Changelog:
===========
- openembedded#147 fix test which failed due to behavior changes in OpenSSL 3.2
- update PublicSuffix
- add examples for TLS JA3/JA4 fingerprinting to tls_fingerprint/

Signed-off-by: Wang Mingyu <[email protected]>
Signed-off-by: Khem Raj <[email protected]>
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

4 participants