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

Nexus 10 Patch #6

Closed
binkybear opened this issue Aug 12, 2014 · 7 comments
Closed

Nexus 10 Patch #6

binkybear opened this issue Aug 12, 2014 · 7 comments

Comments

@binkybear
Copy link

I'm trying to compile for the Nexus 10 and the patch for 3.4 works mostly fine except:

  •   if (hid_enabled)
    
  •       android_enable_function(dev, conf, "hid");
    

Here is the source file for reference:

https://android.googlesource.com/kernel/exynos.git/+/android-exynos-manta-3.4-kitkat-mr2/drivers/usb/gadget/android.c

I know there isn't a conf in this android.c so I tried replacing with 'name' but it still doesn't seem to want to build. Any help would be much appreciated.

@pelya
Copy link
Owner

pelya commented Aug 12, 2014

I've added Nexus 10 patch - it compiles, but I cannot test it:
https://github.com/pelya/android-keyboard-gadget/blob/master/not-tested/kernel-3.4-nexus10-2012.patch

On Tue, Aug 12, 2014 at 10:33 AM, binkybear notifications@github.com
wrote:

I'm trying to compile for the Nexus 10 and the patch for 3.4 works mostly
fine except:

  • if (hid_enabled)
  • android_enable_function(dev, conf, "hid");

Here is the source file for reference:

https://android.googlesource.com/kernel/exynos.git/+/android-exynos-manta-3.4-kitkat-mr2/drivers/usb/gadget/android.c

I know there isn't a conf in this android.c so I tried replacing with
'name' but it still doesn't seem to want to build. Any help would be much
appreciated.


Reply to this email directly or view it on GitHub
#6.

@binkybear
Copy link
Author

pelya - Thanks for the quick patch and the kernel built/compiled fine. Flashed the kernel and I tried running the usb android app and I only get instructions to build the custom kernel. I added the /dev/hid* in ueventd.rc manually and killed ueventd (so that it restarted) and still nothing.

Tried a dmesg | grep hid but that didn't return anything so I don't have any debugging.

@pelya
Copy link
Owner

pelya commented Aug 13, 2014

If /dev/hidg0 and hidg1 exists, you only need to set appropriate
permissions to them, like world-writable.
The app will try to change permissions on start, using superuser command.
Do you have a proper su command installed, that will work for apps?
On Aug 13, 2014 7:58 AM, "binkybear" notifications@github.com wrote:

pelya - Thanks for the quick patch and the kernel built/compiled fine.
Flashed the kernel and I tried running the usb android app and I only get
instructions to build the custom kernel. I added the /dev/hid* in
ueventd.rc manually and killed ueventd (so that it restarted) and still
nothing.


Reply to this email directly or view it on GitHub
#6 (comment)
.

@binkybear
Copy link
Author

I don't have either hidg0 or hidg2 in /dev. Su works but USB Keyboard is not even asking for root permissions.

@pelya
Copy link
Owner

pelya commented Aug 14, 2014

That means the kernel does not contain the patch - these files should be
created whenever you plug your phone into PC.

I suggest to ask the maintainer of that kernel, maybe he forgot to put it
into some of the versions:

http://forum.xda-developers.com/showthread.php?t=2725023
On Aug 14, 2014 3:25 AM, "binkybear" notifications@github.com wrote:

I don't have either hidg0 or hidg2 in /dev. Su works but USB Keyboard is
not even asking for root permissions.


Reply to this email directly or view it on GitHub
#6 (comment)
.

@binkybear
Copy link
Author

Pelya,

Thanks for all your help. I'm compiling the kernel myself and your patched have worked well when I've built them on the Nexus 7 and Nexus 5. I'm still not sure what the issue is, but I'll keep trying at it. Thanks again for your quick responses and I'll let you know if I ever get it working.

@binkybear
Copy link
Author

Pelya,

I was able to get the keyboard to show up on the n10 by modifying your patch with:

    err = android_enable_function(dev, name);
    if (err)
        pr_err("android_usb: Cannot enable '%s' (%d)",
                           name, err);
    if (!strcmp(name, "hid"))
        hid_enabled = 1;

        /* HID driver always enabled, it's the whole point of this kernel patch */
            android_enable_function(dev, "hid");
}

mutex_unlock(&dev->mutex);

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

2 participants