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

Missing information to configure ADB and WiFi #5

Open
depau opened this issue Jul 31, 2014 · 17 comments
Open

Missing information to configure ADB and WiFi #5

depau opened this issue Jul 31, 2014 · 17 comments

Comments

@depau
Copy link
Contributor

depau commented Jul 31, 2014

There is a section in the readme about configuring ADB. However it doesn't say where to get adbd (the Android segfaults).

RNDIS doesn't work either, as (I think) it requires ADBD. (not sure about this though)

The wifi procedure creates a broken symlink that is supposed to enable a .service in systemd, but the .service file is not provided, nor included in Arch.

Info to configure the bluetooth is also needed.

@crondog
Copy link
Owner

crondog commented Aug 1, 2014

Hmm i dont really use adb @willcast put that in. I only use the g_serial device

@depau
Copy link
Contributor Author

depau commented Aug 1, 2014

I'm really liking the serial console but adb would be nice as it can send entire directories without tar-ing them.

On August 1, 2014 7:42:30 AM CEST, crondog [email protected] wrote:

Hmm i dont really use adb @willcast put that in. I only use the
g_serial device


Reply to this email directly or view it on GitHub:
#5 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@crondog
Copy link
Owner

crondog commented Aug 1, 2014

If you want adb you will need to enable it in the kernel. CONFIG_USB_G_ANDROID

@depau
Copy link
Contributor Author

depau commented Aug 1, 2014

Is it compatible with the serial console? Can I have both?

On August 1, 2014 9:49:07 AM CEST, crondog [email protected] wrote:

If you want adb you will need to enable it in the kernel.
CONFIG_USB_G_ANDROID


Reply to this email directly or view it on GitHub:
#5 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@crondog
Copy link
Owner

crondog commented Aug 1, 2014

When you have CONFIG_USB_G_ANDROID you change the sysfs to enable serial...i think

@depau
Copy link
Contributor Author

depau commented Aug 1, 2014

I guess I'll be good with either one of them working...

On August 1, 2014 10:02:17 AM CEST, crondog [email protected] wrote:

When you have CONFIG_USB_G_ANDROID you change the sysfs to enable
serial...i think


Reply to this email directly or view it on GitHub:
#5 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@depau
Copy link
Contributor Author

depau commented Aug 1, 2014

If both CONFIG_USB_G_ANDROID and CONFIG_USB_G_SERIAL are enabled, neither of them works (make exits earlier). If I ignore the error they just don't work. I haven't tried, however, to enable them through sysfs.
I'm building it again with serial on, no ADB and no SELinux (it drives me nuts, I can't turn it off on Arch)

@willcast
Copy link
Contributor

willcast commented Aug 1, 2014

Okay, my fault. Here is a shell script to set up the USB functions.

#!/bin/sh  
echo 0          > /sys/class/android_usb/android0/enable
echo "adb,rndis"    > /sys/class/android_usb/android0/functions
echo 1          > /sys/class/android_usb/android0/enable
chmod 0666 /dev/android_adb

RNDIS doesn't need the ADB daemon running.

I'm not sure why the ADB daemon needs android_adb to be world writable, since it runs as root, but it will fail without it. If you're having trouble with your adb binary, I have a known working one I can pull-request in.

For serial, replace "adb,rndis" with "adb,acm,rndis". I've never tried that, so I can't say that all three at the same time will function as intended.

Sorry about this.

@depau
Copy link
Contributor Author

depau commented Aug 1, 2014

Well, now I have another problem. I can't chroot to it any more, for some reason, nor with Multirom, nor with the script through android.
The image is perfect and totally mountable, both from android and from the PC. However after I mount it and I chroot into it (chroot $_chroot /usr/bin/env, /sbin/init when booting into it) it says "chroot: can't execute '/usr/bin/env': No such file or directory", but it's there! I mean, I added an "exit" after the failing chroot, so that I could inspect the environment, and the chroot is totally mounted with /usr/bin/env present in the right spot, executable.
All of this has been happening since I pushed by mistake the newly built kernel to the chroot when it wasn't mounted, forgot about it and then mounted it (it failed, of course, because it wasn't empty). But now it is empty so what's wrong with it??
The kernel works, I don't know if it gets booted off the chroot's image or the image in multirom/roms/rom/boot/vmlinuz, but then it can't chroot into the image and it panics because init dies...

Anyway, @willcast, do I need to build it with CONFIG_USB_G_ANDROID=y before doing this?

@willcast
Copy link
Contributor

willcast commented Aug 1, 2014

Yes, you do.

Look for the chroot under recovery. I think multirom does more than just permissions trickery to hide other ROMs under Android, because I remember not being able to chroot into Arch after I moved it from /data/local/arch into the multirom directory. Try moving it outside of /data/media and making a symlink.

@depau
Copy link
Contributor Author

depau commented Aug 1, 2014

Aside from the fact that I'd like to know what magic trick is involved in the disappearance of the MultiROM directory, that surprises me because I didn't think it would do anything to /data/media. And the fact is that it just worked until a few hours ago!
And it doesn't work either way, with chroot or MultiROM, which is weird because I'd expect it to work _at least_with MultiROM. It's not selinux either because I set it to permissive on android.

Anyway I'll try to put it back to data then symlink it to MultiROM.

For adb: so does it also mean I have to disable config_USB_g_serial?

On August 1, 2014 11:55:54 PM CEST, Will Castro [email protected] wrote:

Yes, you do.

Look for the chroot under recovery. I think multirom does more than
just permissions trickery to hide other ROMs under Android, because I
remember not being able to chroot into Arch after I moved it from
/data/local/arch into the multirom directory. Try moving it outside of
/data/media and making a symlink.


Reply to this email directly or view it on GitHub:
#5 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@depau
Copy link
Contributor Author

depau commented Aug 1, 2014

Anyway still not chrooting...

On August 1, 2014 11:55:54 PM CEST, Will Castro [email protected] wrote:

Yes, you do.

Look for the chroot under recovery. I think multirom does more than
just permissions trickery to hide other ROMs under Android, because I
remember not being able to chroot into Arch after I moved it from
/data/local/arch into the multirom directory. Try moving it outside of
/data/media and making a symlink.


Reply to this email directly or view it on GitHub:
#5 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@willcast
Copy link
Contributor

willcast commented Aug 1, 2014

Yes, if you look in the aosp kernel source for g_android, I believe it
includes the serial/acm gadget driver as if it's a header. Huge kludge, but
it does work.
I think the black magic involves cascading bind mounts, but I'm not 100
percent sure.

On Fri, Aug 1, 2014 at 3:02 PM, Davide Depau [email protected]
wrote:

Aside from the fact that I'd like to know what magic trick is involved in
the disappearance of the MultiROM directory, that surprises me because I
didn't think it would do anything to /data/media. And the fact is that it
just worked until a few hours ago!
And it doesn't work either way, with chroot or MultiROM, which is weird
because I'd expect it to work _at least_with MultiROM. It's not selinux
either because I set it to permissive on android.

Anyway I'll try to put it back to data then symlink it to MultiROM.

For adb: so does it also mean I have to disable config_USB_g_serial?

On August 1, 2014 11:55:54 PM CEST, Will Castro [email protected]
wrote:

Yes, you do.

Look for the chroot under recovery. I think multirom does more than
just permissions trickery to hide other ROMs under Android, because I
remember not being able to chroot into Arch after I moved it from
/data/local/arch into the multirom directory. Try moving it outside of
/data/media and making a symlink.


Reply to this email directly or view it on GitHub:
#5 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

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

@depau
Copy link
Contributor Author

depau commented Aug 1, 2014

OK and what do you think about the chroot? If only busybox gave more detailed info...

On August 2, 2014 12:23:42 AM CEST, Will Castro [email protected] wrote:

Yes, if you look in the aosp kernel source for g_android, I believe it
includes the serial/acm gadget driver as if it's a header. Huge kludge,
but
it does work.
I think the black magic involves cascading bind mounts, but I'm not 100
percent sure.

On Fri, Aug 1, 2014 at 3:02 PM, Davide Depau [email protected]
wrote:

Aside from the fact that I'd like to know what magic trick is
involved in
the disappearance of the MultiROM directory, that surprises me
because I
didn't think it would do anything to /data/media. And the fact is
that it
just worked until a few hours ago!
And it doesn't work either way, with chroot or MultiROM, which is
weird
because I'd expect it to work _at least_with MultiROM. It's not
selinux
either because I set it to permissive on android.

Anyway I'll try to put it back to data then symlink it to MultiROM.

For adb: so does it also mean I have to disable config_USB_g_serial?

On August 1, 2014 11:55:54 PM CEST, Will Castro
[email protected]
wrote:

Yes, you do.

Look for the chroot under recovery. I think multirom does more than
just permissions trickery to hide other ROMs under Android, because
I
remember not being able to chroot into Arch after I moved it from
/data/local/arch into the multirom directory. Try moving it outside
of
/data/media and making a symlink.


Reply to this email directly or view it on GitHub:
#5 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

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


Reply to this email directly or view it on GitHub:
#5 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@willcast
Copy link
Contributor

willcast commented Aug 1, 2014

I don't know, honestly. Maybe there's a missing shared library or dynamic linker, and that's where the "no such file" error is coming from?

@depau
Copy link
Contributor Author

depau commented Aug 1, 2014

It makes sense... That makes me think of one thing... /lib... Let me check it... Hopefully tar didn't delete everything else when I extracted that tarball...

On August 2, 2014 12:30:24 AM CEST, Will Castro [email protected] wrote:

I don't know, honestly. Maybe there's a missing shared library or
dynamic linker, and that's where the "no such file" error is coming
from?


Reply to this email directly or view it on GitHub:
#5 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

@depau
Copy link
Contributor Author

depau commented Aug 2, 2014

It sounded too weird to me that tar overwrote everything. It just overwrote a symlink. I restored it, now most of the stuff works, I'm just going to reinstall some packages that still give that error. Then I'll try adb.

Anyway I installed the modules but now when modprobing wlan I get something like "cannot insert module: permission denied", I don't understand why. Later I'll post the exact error and the kernel log when I turn the computer on.

On August 2, 2014 12:30:24 AM CEST, Will Castro [email protected] wrote:

I don't know, honestly. Maybe there's a missing shared library or
dynamic linker, and that's where the "no such file" error is coming
from?


Reply to this email directly or view it on GitHub:
#5 (comment)

Sent from my Android device with K-9 Mail. Please excuse my brevity.

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

3 participants