Device or resource busy error when pendrive is connected - android

I am working with AOSP-Q. When i connect the pendrive to my android device, i am getting prints like :
[ 2955.285052] read strings
[ 2955.288151] init: processing action (sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1) from (init.usb.configfs.rc:26)
[ 2955.303196] init: Command 'write /config/usb_gadget/g1/UDC ${sys.usb.controller}' action=sys.usb.config=adb && sys.usb.configfs=1 && sys.usb.ffs.ready=1 (init.usb.configfs.rc:29) took 0ms and failed: Unable to write to file '/config/usb_gadget/g1/UDC': Unable to write file contents: Device or resource busy
I somewhere found that enabling the CONFIG_USB_CONFIGFS_F_FS config in the kernel causes that prints, so i disabled that config. Now i am not getting that prints when i connect pendrive but ADB over USB is not working for me. can anyone help me to get rid of that prints without effecting the ADB over USB functionality.

Related

Getting a custom ramdisk to boot on Android

I am working on a "GNU/Linux on Android" type of project that is based on Mikael Q. Kuisma's work here .
I built a tool that downloads a toolchain, compiles the kernel, archives the custom ramdisk, and finally bundles them into a boot image.
Expected result:
Kernel boots.
Ramdisk gets loaded and /init is executed using /sbin/busybox.
Actual result:
Kernel does boot.
The kernel never seems to reach /init, and hangs without panicking.
I've tried adding calls to /sbin/busybox poweroff in the /init script to see if it was actually reaching execution, nothing changed.
I identified a few points that seemed problematic, one being this:
[ 3.880314] Warning: unable to open an initial console.
[ 3.880429] Waiting for root device ... # Might be the problem.
[ 4.882304] lct will vote for sdp current
[ 4.882437] pmi632_charger: smblib_update_usb_type: lct v02 battery charge APSD=SDP PD=0
[ 4.889933] msm-dwc3 7000000.ssusb: DWC3 exited from low power mode
[ 5.520181] of_batterydata_get_best_profile: light_4000mAh found
[ 8.760236] cfg_timer_func enter
[ 8.760267] cfg_work_routine enter
# Nothing appears after this point...
I have included the source code for my build tool with the kernel log buffer in this git repository. You can find the defconfig I used for the kernel build here.
Any help would be appreciated. :)

"port 53: Address already in use" docker error when I run docker compose up command

ERROR: for 515f8b2ecd33_docker-bind_bind_1 Cannot start service bind: b'driver failed programming external connectivity on endpoint docker-bind_bind_1 (bc8836ceccc907c7ad0610e941b533c68f250c56cffcd4646e9171e7a330c9b3): Error starting userland proxy: listen tcp 0.0.0.0:53: bind: address already in use'
Comment out masqdns parts of the docker-compose.yaml file that you should have in virtual environment folder("Home/User/ve").
If the error still persist Please update your docker-compose.yaml file.

Android adb push permission denied

I am trying to edit the handheld_core_hardware.xml in `system/etc/permissions
when i push the file after editing it gives that error
adb: error: failed to copy 'handheld_core_hardware.xml' to '/system/etc/permissions/handheld_core_hardware.xml': remote Permission denied
handheld_core_hardware.xml: 0 files pushed. 0.8 MB/s (4027 bytes in 0.005s)
even that i have changed the file to read-write not read-only
Is your device rooted ? I think in order to manipulate those files you have root permissions.

Unable to boot freshly built CyanogenMod 13

After playing around with the latest build of CM for my device (12.1), I decided to try and build my first ROM. So I got Linux, synced sources for 13, etc. (My device tree is here.)
I had to grapple with a few audio-related build errors before I finally got it to build. (If it makes any difference, all the commits I had to revert were related to PCM audio offloading.)
Now, when I try to boot the ROM, it immediately reboots to recovery without even displaying the boot animation. Looking at /proc/last_kmsg, the problem seems to be about SELinux:
...
[ 4.340084] init: (Initializing SELinux enforcing took 0.51s.)
[ 4.349071] type=1400 audit(1468237723.015:4): avc: denied { fowner } for pid=1 comm="init" capability=3 scontext=u:r:kernel:s0 tcontext=u:r:kernel:s0 tclass=capability permissive=0
[ 4.349387] init: SELinux: Could not set context for /init: Operation not permitted
[ 4.349506] init: restorecon failed: Operation not permitted
[ 4.349699] init: Security failure; rebooting into recovery mode...
[ 4.350353] SysRq : Emergency Remount R/O (triggered by init:1)
[ 4.350581] Emergency Remount complete
[ 4.350889] reboot - triggered with task: init (1:1)
...
I'm not familiar with SELinux apart from the fact that it makes system modifications a lot harder, but from what I've seen, both the device-specific and general init.te files in the Android source allow init to use the fowner capability.
I've tried:
Modifying the sepolicy file by making the init domain permissive
Rebuilding the entire ROM with permissive init; in init.te
Commenting out restorecon /adb_keys and restorecon_recursive /mnt in init.rc
Rebuilding the device kernel with EXTRA_CFLAGS += -DCONFIG_ALWAYS_ENFORCE=true
Searching for a solution on Google - a person on XDA had the exact same problem as me but subsequent posts from him/her did not yield any progress or solutions on the matter
None of them made any difference, so basically, I'm fresh out of ideas.
What am I doing wrong?

Failed to load driver! (wifi rt18192cu usb)

my android device use rtl8192cu usb wifi. I have insmod 8192cu.ko, cfg80211.ko, rfkill.ko.
when i open wifi, the logcat show me:
01-02 00:01:06.660 E/WifiStateMachine( 2297): Failed to load driver!
01-02 00:01:06.660 E/WifiStateMachine( 2297): DriverFailedState
So does anyone know why the driver is loaded but would wrong ?
Beginning an error:
8192cu: Unknown symbol cfg80211_scan_done (err 0)
8192cu: Unknown symbol cfg80211_remain_on_channel_expired (err 0)
8192cu: Unknown symbol cfg80211_new_sta (err 0)
8192cu: Unknown symbol cfg80211_disconnected (err 0)
.......
So i load driver 8192cu.ko, cfg80211.ko and rfkill.ko, but it's also tell me wrong.
I think you had the airplane mode activated.
So, go to the settings/wireless&networks
and ensure that the airplane mode is not activated.
You need to load the kernel modules in the correct order.
Try to load the cfg80211.ko file first, followed by the rfkill and then the 8192cu.ko.

Categories

Resources