usb connection non functional, after changing data partition

DerTeufel1980

Inactive Recognized Developer
Jul 31, 2011
10,302
27,636
0
hi,

maybe some of you already know, that i am working on a dualboot solution for the note2.
it is almost functional now, but i have no idea anymore, where to search for a solution for the last bug, mentioned in the titel.

the commits in question are this, for cm-10.1:
https://github.com/DerTeufel/androi...mmit/5dc8b0e77cb21562aa41981fdea65fef6945270e

and this, for samsung based roms:
https://github.com/DerTeufel/androi...mmit/a57b6da843d0b6b47071e947008bb5665099163f

both commits are similar to the changes, gokhanmoral has made to his i9300 dualboot initramfs. i could not (edit: fixed typo here, this word was missing before) see anything related (if he had similar issues) in his commits/code

as you can see in the commis, i only have switched the data partition at this point.

basically it's like this:
mounted another partition at /data
created a new data folder at data/media (now mounted in /.secondrom)
bind mount /.secondrom/media/data into the deafult /data partition
create media folder in the new /data
bind mount /.secondrom/media into the new /data/media

everything is working as expected, just connecting to usb fails. phone is going into charging mode, without usb connection notification, usb debugging/adb is also not working.

do i just reboot into primary rom, usb is working again.

could oneone give me a hint, what could be causing this?


edit: the changes don't depend on the kernel used with the initramfs. if you want to try yourself, you should be fine by just applying the changes to your initramfs.

switching between roms is done by:
echo primary > /cache/.secondaryboot
and then reboot
echo secondary > /cache/.secondaryboot
reboot

it is going to be changed by recovery normally, but i need to do some more changes, before pushing it to github
 
Last edited:

DerTeufel1980

Inactive Recognized Developer
Jul 31, 2011
10,302
27,636
0
AW: usb connection non functional, after changing data partition

Just a little update, without any change to the problem.
I thought, maybe mounting the sdcard by using fuse is causing the issue. Well, it is not. I have commented it out, exported storage/sdcard0 as storage, and bind mounted data/media into it.
USB still isn't working after this.

Any other ideas are highly welcome.

Gesendet von meinem GT-N7105 mit Tapatalk 2
 
  • Like
Reactions: zeeshanonlyme

DerTeufel1980

Inactive Recognized Developer
Jul 31, 2011
10,302
27,636
0
after some more testing, i realized, that the device gets recognized by ubuntu, running in a vm. i now can adb to it :)
mounting the sdcards to it, does still not work :(
 
  • Like
Reactions: zeeshanonlyme

DerTeufel1980

Inactive Recognized Developer
Jul 31, 2011
10,302
27,636
0
i am still stuck at the same thing...no one an idea?

today i have realized, that my vm is recgnizing my phone as different devices, if i am using another data partition...if this isnt weird enough, it also tells me, it is a galaxys 2 (i never owned a s2, and never installed drivers for it).

this is, when it is working normally (/data unchangend):
lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 052: ID 04e8:6860 Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II]

this is the same device, same kernel, same rom, 5 minutes later, just mounted the other /data partition:

lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 002: ID 0e0f:0003 VMware, Inc. Virtual Mouse
Bus 002 Device 003: ID 0e0f:0002 VMware, Inc. Virtual USB Hub
Bus 001 Device 058: ID 18d1:d002 Google Inc.
 
  • Like
Reactions: zeeshanonlyme
Our Apps
Get our official app!
The best way to access XDA on your phone
Nav Gestures
Add swipe gestures to any Android
One Handed Mode
Eases uses one hand with your phone