I have an Ethernet SMC 2208 adapter which does not work with shield out of the box. I have my shield updated to lollipop. Upon insertion I can see that the device is recognized by the system in the sense that there are messages in dmesg stating that it is "Procduct SMCSMC2208USB". After that there are some messages mentioning "audit" and "avc: denied". In contrast on my Nexus 5 (also lollipop) the device works correctly, I can see some messages mentioning pegasus driver if I got it correctly. It's a bit hard to provide complete output since I'm running the commands from android terminal and can't easily copy output here. But if that would help I'll grab it somehow.
I was thinking about compiling the module for the device but it not as easy as on regular linux. I found the driver source on that page: "edge-core.com/temp/edm/old_downloads/old_downloads.html" "edge-core.com/temp/edm/old_downloads/dr/DR_SMC2208_LinuxDRV.zip" (because this is my first post I can't insert URLs So I deleted " h t t p : / / w w w ." prefix, sorry for inconvinience)
But I don't know how to compile it for android in general and for my tablet in particular. I would greatly appreciate if someone could compile it for me or point me to steps I need to follow to do it myself.
Thanks in advance for your help
Related
Hi All,
I'm pretty new to Android, but not entirely new to linux and kernel development at all. I was just wondering about two things :
1. Could anybody tell me how to redirect the console messages to be able to see them through usb link (something like serial port console)? Is it possible at all in SNS ?
2. How would one display kernel messages directly on SNS' screen, instead of boot logos ?
Hope somebody keen enough will be able to write me a faq for linux. Thanks
In the same stage as you.
Wondering how can I debug my kernel over USB or print the kernel logs in the phone screen instead of the boot animation.
Any hint guys?
Even though this is contributing to a resurrected post, i will still put in my 2cents.
It is up to the bootloader to boot fb or nonfb, so you would have to hack the bootloader to get nonfb/console output.
Most of the useful stuff is in dmesg anyway, which is part of busybox and usable through terminal emulator.
Sent from my GB Galaxy Tab using Tapatalk.
Hello. That's a vague question :
I have a custom USB device (class 0xff) and I want to communicate with it using my Android phone. I'm on ICS "stock" (original), and official API provides USB functionnalites.
I use a Java and C API to communicate with my device from my computer (libusb), so I though that it could be possible to do the same with my Androphone, and an OTG USB cable.
But my problem : When I plug the device to the Smartphone, it is correctly detected (and powered). Endpoints are correctly listed, and I can retrieve the serial name. But when I call the "claimInterface" function (Android API), it fails. I don't understand why, because the class of my device is unspecified and shouldn't be handled by Android OS or other App.
When I do a diagnostic with the XDA USB Host test software, I get "yes" in line "claimed" (Base API).
I realize that my question is too specific. My hope is to find someone who has already worked on this kind of problem, or who knows the limits of the USB host.
Thanks in advance.
(My phone is not rooted)
EDIT : Rooted. Same problem :/
Hello everybody! Noobing the shoozle out of my:
OnePlus One, model A0001 / 64GB currently with: Android 6.0.1 / Cyanogen OS version: 13.1.2-ZNH2KAS3P0-bacon / CyanogenMod API level: Elderberry(5) (just FYI, not sure if helpful)
Kernel version: 3.4.112-cyanogenmod-g8fbc62e
Unlocked, rooted with BaconRootToolkit/ TWRP ROM, downloaded latest ver -3.0.2-0 via official App, from Play Store
Kali images from: build.nethunter.com/nightly, as offensive-security's kali-nethunter wiki on github says (no external links for noobs, sorry )
apt-get updated, upgraded and dist-upgraded via KALI terminal
The first issue is with the OTG, not powering the USB WiFi adapter properly... with the regular USB-OTG adapter, lsusb WORKS, and returns proper info about 3 different adapters (Alfa Awus036h, TP-link WN725N and WN722N), BUT does not power them. No indicator lights get lit whatsoever 0mA status from lsusb -v
I bought a powered USB-OTG hub, that appears to not charge my phone, when plugged in two different chargers AND a powerbank. Still lsusb -v returns: 100mA current for the hub.
I tried plugging an A4Tech receiver for kbd+mouse, both work fine, with the tplink WN725N plugged in the second USB socket. lsusb shows the hub, the receiver and the WN725N data... Both regular and hub OTG's work fine with mouse+kbd, read and write data to USB Memsticks. Regular OTG transfers files to a computer and charges the phone.
I noticed that when in Android, the WiFi is turned off, ifconfig omits wlan0 and p2p0, that is the phone's main WiFi adapter.
So I thought that manually loading (insmod) the rtl drivers would start the OTG wlan.... Thus coming to the second issue:
The kernel is without LKM support - no modprobe, lsmod returns:
Code:
libkmod: ERROR: ../libkmod/libkmod-module.c: 1655 kmod_module_new_from_loaded: could not open /proc/modules: no such file or directory
Error: could not get list of modules: No such file or directory
When "apt-get install linux-headers-$(uname -r)" is typed, returns:
Code:
E: Unable to locate package 'linux-headers-3.4.112-cyanogenmod-g8fbc62e'
E: Couldn't find any package by glob 'linux-headers-3.4.112-cyanogenmod-g8fbc62e'
E: Couldn't find any package by regex 'linux-headers-3.4.112-cyanogenmod-g8fbc62e'
"apt-cache search linux-headers" returns some options for version linux-headers-4.9.0-kali1-all-armhf (the only armHF, others are armmp)
I cannot find a way to recompile my kernel and enable Loadable Kernel Modules support. Would you say this would be necessary for the external WiFi to work?
Do you know if there is any way out of this mess, as I am really tired fighting a "Our preferred device"-release issues??? Overall I'd love it if I could run external antenna
I am kind of new around.... In forums - in general, so I kindly ask for understanding. If any screenshots/pics/additional info is required - I'll make sure I update this thread. Not sure if I could've posted this thread in XDA assist, so I did it here.
EDIT: everything went fine when I tried third, different USB - WiFi adapter. Works properly. Still no LKMs.
Maybe this question got asked before but I couldn't compile my driver so I will ask.
I got a SM-A700H with Android 6.0.1 and root permissions. And I have a cheap network adapter and I wanna use it for creating AP by getting connection from my device 's WiFi adapter(Wlan0).
What I have:
1) Chroot environment in android
2) Modprobe and USB support(I guess)
3) Toolchain for Cross compiling
4) Kernel 3.10.49
5) A Mediatek MT7601U Wireless Adapter
I tried many things and here is list of what I did and errors I got:
The things that a professional needs to see - Pastebin.com
Pastebin.com is the number one paste tool since 2002. Pastebin is a website where you can store text online for a set period of time.
pastebin.com
(This text was sent to somebody else but now u see it too)
Now can u help me to compile it for my device?(At least make it work in chroot env)
And contact with me in Discord if u can(Due live Q/A)
Thanks in advance
Run adb in Termux without root permissions!This is a launcher for adb which enables debugging of one Android device from another via USB cable. It should work with any USB-C male-to-male cable or the corresponding OTG adapter + cable in case of micro USB.
https://github.com/nohajc/termux-adb
MotivationTermux has had the android-tools package for some time now but it only works properly if you root your device (due to missing filesystem permissions). This is because Android has its own API for accessing USB peripherals which is incompatible with Linux. Termux already exposes this API using the termux-usb utility (part of Termux API) but this is not enough to make programs like adb work out of the box.
Usually you would have to modify any application which accesses USB devices but there's actually another way.
When you start adb using termux-adb, it will use termux-usb in the background for device discovery and then essentially feed the device information into adb by intercepting some libc calls and emulating usb device files as they would appear on any linux machine (bypassing the file permission problem entirely).
At this point the program is in its early stages and therefore highly experimental. I tested it on two Android devices so far and I can't give any guarantees it will work for everyone. But you can try.
That is great work! It works fine in my honor handset!
When will you share the new release with multiple ADB device support?
Appreciate for your fantastic tool !
It's definitely on my TODO list but now I'm also dealing with the fact it doesn't work on some devices.
So, I don't have an exact timeline but I'll keep this thread up to date.
Version 0.2 released today: https://github.com/nohajc/termux-adb/releases/tag/v0.2.0
@Stanton1011 It supports multiple devices now.
Thank you. If you're wanting feedback, there seems to be a lot of lag getting it to connect at first but it does work and once it's connected no issues. The fastboot however has much more lagging and will say simultaneously that commands succeeded and failed (but just seem to fail). But adb works fine on moto g pure running android 11, moto g pure on Android 12, TCL Obama phone type android 12, Samsung a11 android 10.
Thanks for the report. I'm aware of the lag. It's mainly caused by how Termux handles USB access in general but it could be improved if fastboot ran in the background (same as adb).
As for the commands failing, I'll look into it. Which particular fastboot commands you tried?
nohajc said:
Version 0.2 released today: https://github.com/nohajc/termux-adb/releases/tag/v0.2.0
@Stanton1011 It supports multiple devices now.
Click to expand...
Click to collapse
Thank you so much, I will have a try and let you know the result.
The following problem is solved by Pkg upgrade.
I find a error for it ,please help!
CANNOT LINK EXECUTABLE "./termux-adb": cannot locate symbol "_ZN6google8protobuf8internal14ArenaStringPtr3SetIJEEEvRKNSt6__ndk112basic_stringIcNS4_11char_traitsIcEENS4_9allocatorIcEEEEPNS0_5ArenaE" referenced by "/data/data/com.termux/files/home/termux-adb"...
I have a handset with the root permission only for ADB, but Termux(or any android APP) can not obtain the root permission. Could you tell a way to use the adb in termux, I know I can user your github project Termux-adb as what you did before., but I also need a alternative way. I have the root permission of ADB command(by PC). Can I modify some folder permission to achieve the same affect?