rebuilt kernel - some binaries do not execute anymore

Posted on 2011-10-08
Last Modified: 2013-12-15
Hello experts!

I have rebuilt the kernel (from Debian sources, v2.6.32) to remove all the drivers I don't use. It works fine, but the Android SDK's adb does not start anymore, it says "adb: cannot execute binary file". When I booted the stock Debian kernel back, adb loads just fine. I've attached the config file of my rebuilt kernel.

Question by:zc2
    LVL 13

    Expert Comment

    by:Hugh McCurdy
    Change to the folder with adb.  Might be something like this (except it almost certainly won't have hmccurdy in the path)


    $ ldd  adb

    See if any of the libraries aren't found.  

    You can also type
    $ file adb
    However, I don't think they have a 64bit version.  Mine says 32bits.  Might want to check that and make sure your kernel build is OK with 32 bit binaries.

    LVL 76

    Expert Comment

    The kernel will/should not affect the execution of a program unless the program is trying to attach to an external peripheral that your rebuilt kernel no longer supports/sees.
    i.e. the docking station. You removed the USB related modules/drivers from the kernel.
    You only have one USB module defined for bluetooth while others are not set.

    The path hmccurdy would be correct if the failure you experience occurs following OS Software updates. i.e. updated GLIB, GCC, other libraries to newer versions that include deprecating libraries etc.
    LVL 76

    Expert Comment

    you could use
    strace -f adb
    and see what it is doing when it fails.
    LVL 18

    Author Comment

    Thank you guys for the answers, I will try your suggestiorns later today. Most probably i forgot to enable the 32bit support in my 64 bit kernel. could you please navigate me to the settings in menuconfig, if there any?
    LVL 13

    Accepted Solution

    Yes, I think the 32bit support is likely an issue since replacing the kernel is all that's wrong.

    If that doesn't solve it, could you share both config files?  (I realize you might not have the stock config available but if you do it would help to have it.)
    LVL 76

    Assisted Solution

    CONFIG_X86_32  is the only thing that is not set, while you have others.

    LVL 18

    Author Closing Comment

    Thank you very much, I've recompiled the kernel with IA32 support and now adb launches as it should.
    I still have another minor issue with the new kernel, going to post a separate question.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Introduction Everyone is using a smartphone these days. Contacts, messages, applications, documents, bookmarks, pictures, videos and other stuff which you created and are present only on your device come under the umbrella called “Personal Data”.…
    This is an explanation of a simple data model to help parse a JSON feed
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now