SELinux prevents an android app from reading a serial device file - Android Q&A, Help & Troubleshooting

I use a Galaxy S5 (G900H) with rooted Android 5.0.
I am connecting a serial device to it via USB using cdc-acm driver (compiled in the kernel) and trying to read it from my android application, It works fine on other devices (older and newer).
When connecting the device, the device file /dev/ttyACM0 is created but when trying to read from it I receive an error Permission denied.
When running
Code:
setenforce 0
and setting SELinux to Permissive mode - everything works fine and the app reads the device file successfully.
After connecting the USB in Enforcing mode, the dmesg says:
Code:
cdc_acm 2-1:1.0: usb_probe_interface
cdc_acm 2-1:1.0: usb_probe_interface
cdc_acm 2-1:1.0: This device cannot do calls on its own. It is not a modem.
cdc_acm 2-1:1.0: ttyACM0: USB ACM device
I tried making a new policy using audit2allow but couldn't find any "denied" message to use in order to create an "allow" rule.
Is there any way to use the device file via my app without setting SELinux to permissive? I can edit the kernel and make a new one if needed, but I really prefer not to.
Thanks!

Related

[Q] Has anyone managed to connect their S2 via MTP using Ubuntu?

Has anyone managed to connect their S2 using MTP when running Ubuntu? Obviously I know that it's a very simple tast to just connect via mass storage instead, but I'm interested to know.
I think that Samsung have some weird implementation of MTP because I was able to connect and copy files when I was running CM9 but not on stock ICS. I always get the error message:
Unable to mount SAMSUNG_Android
Error initialising camera: -60: Could not lock the device
Though it does mount and I can see the root of both SDCards, all the folders are empty and I can't copy any files to the cards from the computer as I get a error message reading:
There was an error copying the file into gphoto2://[usb:001,010]/store_00020002.
The same happens whether I try to use MTP or PTP.
I think the problem lies in that libmtp-1.1.3 contains fixes for the S2 but that version isn't included with 11.10 or 12.04
hint
did you find out,
i got mine working by doing below guide,
think the issue is we have our phones in USB Debugging Mode
ubuntuforums.org/archive/index.php/t-1806119.html
Steps:
1. Go to: Settings ➔ Wireless and network ➔ USB utilities.
2. Connect your phone to your PC using a USB cable.
3. Tap Connect storage to PC.
4. Scroll down from the phone notification bar. Click USB Mass Storage and tap "Connect storage from PC". The android robot will turn from green to orange. (Important step!)
5. From your PC, open the folder to view your files.
6. Copy files between your PC and the memory card.
alpike said:
did you find out,
i got mine working by doing below guide,
think the issue is we have our phones in USB Debugging Mode
ubuntuforums.org/archive/index.php/t-1806119.html
Steps:
1. Go to: Settings ➔ Wireless and network ➔ USB utilities.
2. Connect your phone to your PC using a USB cable.
3. Tap Connect storage to PC.
4. Scroll down from the phone notification bar. Click USB Mass Storage and tap "Connect storage from PC". The android robot will turn from green to orange. (Important step!)
5. From your PC, open the folder to view your files.
6. Copy files between your PC and the memory card.
Click to expand...
Click to collapse
That's connecting via USB mass storage, not mtp. But thanks for trying.
Sent from my GT-I9100 using XDA
Very easy
Code:
cd ~
sudo apt-get install mtpfs
sudo mkdir /mtp
sudo chmod 775 /mtp
sudo mtpfs -o allow_other /mtp
For dismount
Code:
sudo umount mtpfs
You need to have your device rules ( Check how to install adb if you dont )
what I have found out that mtpfs is unable to preserve timestamps of the files at least on my install.
gphoto2 backend worked fine on CM9 now wile testing CM10 its a bit buggy, I can get the list of files but I am unable to read or rename them.
Most likelly it will improve as development of CM10 progresses rapidly.
Mounting my Galaxy S3 when connected via USB to my Ubuntu computer
D4rKn3sSyS said:
Very easy
Code:
cd ~
sudo apt-get install mtpfs
sudo mkdir /mtp
sudo chmod 775 /mtp
sudo mtpfs -o allow_other /mtp
For dismount
Code:
sudo umount mtpfs
You need to have your device rules ( Check how to install adb if you dont )
Click to expand...
Click to collapse
I went through the steps above, except the last: How do I install adb? (device rules ?).
While my phone is so connected, the command:
cd /mtp
produces the result
bash: cd: /mtp: Transport endpoint is not connected
Help greatly appreciated.
Thank you,
-- Saul
slubkin said:
I went through the steps above, except the last: How do I install adb? (device rules ?).
While my phone is so connected, the command:
cd /mtp
produces the result
bash: cd: /mtp: Transport endpoint is not connected
Help greatly appreciated.
Thank you,
-- Saul
Click to expand...
Click to collapse
Ubuntu 13.04 is a drastic improvement for MTP support. I have not got around to trying my S II but I successfully managed a family friends Galaxy TAB 2 with MTP with zero manual modifications to Ubuntu. Everything worked perfect plug and play out of the box.
I have also tried old versions to know how bad they were compared to 13.04.
No luck with S2 and Ubuntu 13.04
I'm on Android 4.1.2 and trying to connect via USB to Ubuntu 13.04. Error I get is that my device is not an MTP device, which it's not as its using USB
Issue is that I don't see the mounted android partitions. To make this worse, it works every now and then. Following is the syslog and the outpu of lsusb
-----------------------------------------------------------------------------------------------------------------------------------------------------------------
Aug 26 23:04:00 ml kernel: [134718.425536] usb 1-5: new high-speed USB device number 11 using ehci-pci
Aug 26 23:04:00 ml kernel: [134718.558636] usb 1-5: New USB device found, idVendor=04e8, idProduct=685b
Aug 26 23:04:00 ml kernel: [134718.558647] usb 1-5: New USB device strings: Mfr=2, Product=3, SerialNumber=4
Aug 26 23:04:00 ml kernel: [134718.558655] usb 1-5: Product: SAMSUNG_Android
Aug 26 23:04:00 ml kernel: [134718.558661] usb 1-5: Manufacturer: SAMSUNG
Aug 26 23:04:00 ml kernel: [134718.558666] usb 1-5: SerialNumber: 001964815b817e
Aug 26 23:04:05 ml kernel: [134723.546077] usb 1-5: can't set config #1, error -110
Aug 26 23:04:05 ml mtp-probe: checking bus 1, device 11: "/sys/devices/pci0000:00/0000:00:12.2/usb1/1-5"
Aug 26 23:04:05 ml mtp-probe: bus: 1, device: 11 was not an MTP device
[email protected]:~$ lsusb
Bus 001 Device 011: ID 04e8:685b Samsung Electronics Co., Ltd GT-I9100 Phone [Galaxy S II] (mass storage mode)
Bus 003 Device 002: ID 046d:c52e Logitech, Inc.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

[Q] Building Android Linux Kernel without usb gadget stack

Hello,
My question is, is it possible to build the linux kernel for an android device without the usb gadget driver built-in? My motivation and what I have tried thus far is listed below.
I am attempting to emulate the behavior of connecting and disconnecting an android phone from a given host. I have looked through many methods to try to emulate this behavior, and the solution I am working on now is:
1. build a kernel WITHOUT support for usb gadget
2. build a kernel module that supports usb gadget
3. put together an application to insmod/rmmod the resulting kernel module
I have done all three parts, and now I am seeing kernel panics. In particular there are two actions that result in kernel panics
1. Plug android device WITHOUT usb gadget support into a host (the enumeration must be causing the panic)
2. insmod and rmmod the kernel module, then insmod it again (kernel module name is android.ko and the resulting kernel log messages that happen just before panic are below)
[ 257.163085] sysfs: cannot create duplicate filename '/devices/platform/omap/musb-omap2430/musb-hdrc/gadget/lun0'
[ 257.163177] Modules linked in: android(+) [last unloaded: android]
I am working with the Samsung Galaxy Nexus. I have verified the kernel building process and the module building process by making a stock kernel and a simple kernel module. So the issue IS particularly with the usb gadget driver module and/or the kernel without built-in android gadget usb.
I have also used a Ellysis USB analyzer to see at what point in enumeration the device is crashing. Unfortunately, enumeration does not even begin without the built-in usb gadget module.
Best,
Ryan

PC hates nook (ohci_hcd error)

I want to fix my bricked Nook (8g), in order to fix it I loaded cwm into a microsd card and my plan was getting adb to work while the Nook is in cwm recovery. The problem here is that my pc (Debian Wheezy) doesn't seem very happy with the tablet and I couldn't get it recognized.
Using Android SDK Manager I got the following in the usb.ini
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x2080
Click to expand...
Click to collapse
worth saying (probably), I also edited /etc/udev/rules.d/51-android.rules as follows:
SUBSYSTEM=="usb", ATTR{idVendor}=="2080", MODE="0666"
SUBSYSTEM=="usb",ATTR{idVendor}=="2080",ATTR{idProduct}=="0004",SYMLINK+="android_adb"
SUBSYSTEM=="usb",ATTR{idVendor}=="2080",ATTR{idProduct}=="0004",SYMLINK+="android_fastboot"
Click to expand...
Click to collapse
When I finished doing that and still didn't work, I looked up what happens when I plug the tablet into the usb port,
[ 9634.796053] usb 2-9: new full-speed USB device number 39 using ohci_hcd
[ 9634.980037] usb 2-9: device descriptor read/64, error -62
[ 9635.268035] usb 2-9: device descriptor read/64, error -62
[ 9635.548038] usb 2-9: new full-speed USB device number 40 using ohci_hcd
[ 9635.732041] usb 2-9: device descriptor read/64, error -62
[ 9636.020041] usb 2-9: device descriptor read/64, error -62
Click to expand...
Click to collapse
so this seems to be the error. Is it possible to fix it? I tried a few things I found (like killing the usb services and start them again) but you can tell it wasn't exactly successful. Is there anything I can try?
You might want to consider the unbrick method described at http://raywaldo.com/2012/06/how-to-un-brick-a-nook-tablet-8gb-or-16gb/.

Connecting to i5500 using adb and fastboot on Linux

I am trying to resurrect my old Samsung Galaxy i5500. A couple of years ago I tried installing some custom rom but failed and bricked the phone. The boot process halts at the Samsung logo (the very first logo to appear.)
Putting the phone into recovery mode (using the volume down button + center button + power button) works, at least i presume that it works - the logo with the android shoveling dirt and the word "Downloading..." beneath it appears - but neither adb nor fastboot can see the device.
My troubleshooting so far:
Code:
[email protected]:~# dmesg
...
[823736.755555] usb 2-1.1: new high-speed USB device number 6 using ehci-pci
[823736.851772] usb 2-1.1: unable to get BOS descriptor
[823736.857819] usb 2-1.1: New USB device found, idVendor=04e8, idProduct=6601
[823736.857829] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[823736.857835] usb 2-1.1: Product: MSM7x27
[823736.857839] usb 2-1.1: Manufacturer: Sasmsung
[823739.903177] cdc_acm 2-1.1:2.0: ttyACM0: USB ACM device
[823739.903553] usbcore: registered new interface driver cdc_acm
[823739.903557] cdc_acm: USB Abstract Control Model driver for USB modems and ISDN adapters
[823761.102222] cdc_acm 2-1.1:2.0: failed to set dtr/rts
[email protected]:~# lsusb
...
Bus 002 Device 011: ID 04e8:6601 Samsung Electronics Co., Ltd Mobile Phone
...
[email protected]:~# adb devices
List of devices attached
[email protected]:~# fastboot devices
[email protected]:~#
I am running Lubuntu 12.04 on my laptop.
What do I need to do to be able to connect to the phone using adb and fastboot?
Thanks!
The "recovery mode" that you mentioned, is actually download mode and it's used to flash packages with Odin.
Use it to flash a custom recovery and then use that to flash a custom ROM. Format /system and /data as ext4 before flashing the ROM.
Sent from my LG G2 Mini using XDA Labs

[ KERNEL ] [ NetHunter ] CYPHER v3.0

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Supports Android 7.0 to 8.1
Recommended for all WiFi tools to work is Android v7.1.2. Installation steps is described further below.
FEATURES:
Features from @flar2 kernel which this is built on.
All credits to him for hosting awesome kernel sources.
* Easy installation and setup with Aroma installer
* Wake Gestures (sweep2wake and doubletap2wake)
* Sweep2sleep
* Overclock or underclock CPU
* Advanced color control (RGB, Saturation, Value, Contrast, Hue)
* Sound control (headphones, speaker and mic)
* Backlight dimmer option
* High Brightness Mode option
* Option to disable touchboost
* NTFS r/w and exFAT support
* Option to disable fsync
* Adjustable vibration
* MultiROM support
* WireGuard support
* Does not force encryption
* Does not modify system partition
* Compatible with systemless root and Android Pay
Added by me on top:
* Big collection of wireless drivers & firmware
* Big collection of ethernet USB, USB hubs and general USB adapters of various kinds.
* rtl8812au drivers from https://github.com/aircrack-ng/rtl8812au
* rtl8188eus drivers from https://github.com/aircrack-ng/rtl8188eus (added but not working yet)
* "linux-firmware" built in
* CD-ROM patch
* USB HID support
* WIFI injection patches for several adapters
* Nexmon support with both monitor mode & frame injection via internal adapter
* SELINUX patched
* USB OTG (w/ACA) is supported
* linux-stable patches merged inside
* wireless-tools (iw, iwconfig, ifconfig etc) is bulilt into Android /system (packing them in a new release in a few days)
[ TODO / W.I.P ]
* Add a bunch of compiled binaries
* Change to anykernel3 installer
* Merge more from linux-stable
* See if we may fix the Android 8.1 issue
[ Images / Media ]
Running wifite2 through SSH with JuiceSSH
Running airodump-ng using the external AWUS036ACH. - Hijacker packs aircrack-ng suite, reaver wps and mdk3 but also has a cracking & scripting option.
A few of my tools, for me WiFi and MITM is important.
[ Installation ]
We recommend you start from scratch and setup the device, full restore to fresh v7.1.2 is recommended,
even though this kernel supports Android 8.1 too, some of the tools can't right now unfortunately.
1. Find the original, stock firmware over here and choose the latest 7.1.2 (N2G48C, Aug 2017)
2. Press & hold VOLUME DOWN [ - ] and POWER to reboot to bootloader
3. Flash the stock firmware with "flash-all.bat" on Windows or "flash-all.sh" for Linux users
4. Boot into stock and ENABLE developer setting (the menu you get after SPAMMING 5-7 times on the "Build Number" in "Settings" and "About Phone"
-- here you may use the phone to download the kernel zip for flashing afterwards. or use "adb sideload" later on.
5. With ADB enabled, reboot to BOOTLOADER
6. Get TWRP recovery from over here and flash it with "fastboot flash recovery twrp-3.3.1-0-angler.img"
7. VOLUME UP or DOWN and choose "Recovery Mode"
8. In recovery mode
9. Either flash the kernel zip (if you downloaded in the phone before reboot), or go to "Advanced" and use "ADB Sideload"
10. If you ended up with "ADB Sideload" open Terminal or "Minimal ADB" prompt (Windows) and flash the kernel with "adb sideload < file.zip >
11. After flashing the kernel, you also would need root. We suggest using Magisk root which you may find over here
And flash the latest stable release. Same method as earlier.
12. Open "Magisk Manager" and search for "busybox" -- Install it and reboot again in order to activate it.
13. Start installing apps, e.g Hijacker official link
--- Nexmon and it's tools ain't a bad choice either, the WiFi SoC is BCM4358 and supported. Grab it over here
14. A Terminal would also be useful here, grap it from NetHunter repo right about here
15. The NetHunter App should also be in place. Direkt link
16. zANTI from Zimperium is loaded with nmap with NSE scripts/plugins and is pretty nifty one. grab it right here!
17. cSploit is available right here (it's getting outdated, but a few things work).
[ Downloads ]
https://github.com/kimocoder/android_static_tools/raw/master/nethunter_angler.zip
[ SOURCE ]
http://github.com/kimocoder/android_kernel_nexus6p
The recommended toolchain for this kernel sources is gcc-linaro-5.4.1-2017.05-x86_64_aarch64-linux-gnu
[ Tools ]
wifite2 - https://www.github.com/kimocoder/wifite2 (newly added to Kali / NetHunter repos)
Hijacker - https://github.com/chrisk44/Hijacker
aircrack-ng - https://aircrack-ng.org
Nexmon - https://github.com/seemoo-lab/nexmon
Magisk - https://github.com/topjohnwu/Magisk
NetHunter - https://gitlab.com/kalilinux/nethunter
zANTI - https://www.zimperium.com/
cSploit - http://wwwcsploit.org
[ Social Media ]
Follow me on Twitter
[ Credits ]
@flar2
@binkybear
@jcadduono
@aircrack-ng
@nathanchance @nexmon
@chrisk44
@NetHunter
@Re4son
kriswebdev at GitHub
kimocoder said:
[...]
Big collection of wireless drivers & firmware
* Big collection of ethernet USB, USB hubs and general USB adapters of various kinds.
* rtl8812au drivers from https://github.com/aircrack-ng/rtl8812au
[...]
Click to expand...
Click to collapse
Hi master!
First of all, thank you very much for this nice work!!
Downloading asap (the href of the URL seems broken. One need to copy paste the url)
Off-topic:
it seems that you have got a lot of knowledge when it comes to android and wifi drivers, maybe you are the one, who could help me:
I would like to add a wifi-driver for "Broadcom BCM94352Z" into "android-x86 9.0-rc1".
On Linux one would update/install "bcmwl-kernel-source" to get the card running.
On Android-x86 I can scan for wifis via terminal.
But I cant neither connect via terminal nor scan via the UI.
Any help would be AMAZING.
please install video, I do not understand English, a video can guide .. ???
@kimocoder
As per instructions, did I completely start from scratch, but wasn't sure where the chroot has to be installed..I copied the latest kalifs over to the SDcard and extracted it from there.. A direct download via the Nethunter.apk wasn't possible.
After I rebooted the Nh terminal is showing the kali chroot, but JuiceSSH via localhost (Snippet 'su -c bootkali_login').
The phone shows the wlan adapter with the according chipset via 'lusb', but cannot be set into Monitor mode with airmon-ng.
Best regards
Could you specify and/or correct the link to the kernel source, please.
As I wrote before, didn't I have much success in getting a external Wlan adapter to work.
After testing the kernel, I am unable to get the phone back to stock.
At startup I got constantly bootloop.Even after flashing the latest 7.12 and 8.1 factory rom and trying various things, like erasing/formatting the various partitions , trying to boot into TWRP..
I flashed the last 8.1 release last(before testing several times the latest 7.1 release and several times the 7.12 version, which is mentioned in OP, tried to boot into Twrp after successful flashing, Bootloader is unlocked and fastboot menu working.
It seems that userdata is creating some issues.
Help would be appreciated.
:>
PS
What for a wlan adapter are you using?
I have followed your instructions to a T but have had a few issues / questions. I've had very little issues getting nethunter (minux nexmon/hijacker) on several other devices.
Nexmon seems to be working but is there a way to keep the firmware and libraries installed permanently? I could not put them into the default /su/xbin and /su/lib, I got error messages so I put them into /system/xbin and /system/lib but it's not persistent.
Using the version of the nethunter app, a chroot can not be downloaded.
I have used the HiJacker that you posted and the latest beta from the Official git project and it keeps freezing the phone. Not sure what settings may need to be changed but no collection with it works.
When I plug an exfat and ntfs drive into the phone it wants to format the drive and if I don't it's can't mount the drive.
Hello download link not working
Hey there,
i ve got a few Questions. I ve spend a lot of time to test the Nexus 6p with different Setups and Android Versions and finally i decided to go with the latest los 14.1.
Your nexmon and Hijacker port are working with the internal wlan Adapter even in 5GHz.
But Default your nexmon installs the Tools and Firmware non persistent, this must done on every reboot. But thats very ok.
But, i am currently on nethunter 2020.1, on the Default kernel my tplink tl-wn822n (rtl8192cu i think) works out of the box.
With your kernel my tplink does not work because perhaps there is no modul Auto loading. I can insmod the rtl8812au for this device i have too, but when i try the 8192 for the tplink this does not work.
And also with your kernel the 8812au Adapter works but when wifite is running an atack the device reboots. Sooo, Long Story short:
Thanks for your hard work and perhaps there will be an update for this kernel.
P.S.: here is the correct link for the Tools
https://github.com/kimocoder/android_static_tools
Nick_Speed said:
But Default your nexmon installs the Tools and Firmware non persistent, this must done on every reboot. But thats very ok
Click to expand...
Click to collapse
Load the Nexmon app from the Nethunter store, because this seems to be a installation path issue.
Even with my antique Samsung Galaxy S2, which hits you with dozens of other problems and even the stupid addonsu has problems with the root recognition within Nexmon.
Hit the button by app start just again and everything, should the install not being screwed up beforehand, are patched firmware, utils etc.. in my experience detected.
But, i am currently on nethunter 2020.1, on the Default kernel my tplink tl-wn822n (rtl8192cu i think) works out of the box.
Click to expand...
Click to collapse
I assume that you meant the "working" setup..
These 2 kernel are for total differrent distributions and shouldn't be used in tandem; mkay..
With your kernel my tplink does not work
Click to expand...
Click to collapse
The adapter resp supported bands and this particular driver is quite old and like I wrote before, not a guarantee that it works in kimocoder's kernel beside; because one in another setup of you did work.That other kernel is LOS based for example, this one stock.
I read a couple months ago, that the RTL8192cu, apart the age, still unstable and buggy is/can be..but the driver is in the kernel..no clue, bud.
because perhaps there is no modul Auto loading. I can insmod the rtl8812au for this device i have too, but when i try the 8192 for the tplink this does not work.
Click to expand...
Click to collapse
Unfortunately did the device age finally caught up shortly after the first installation "try outs", so I didn't have time to try one of my nics with the Realtek RTL8812AU driver.
Your TP-Link should be detected without 'insmod', I am fairly certain.
Did you use iw-tools or airmon-ng for the 8812au?
If you look over kimocoder's repo, you see the regarding driver at 2 or 3 place.
Scroll down and look the commands up, if you have no experience with iw.
I am sure that kimocoder will get back if, he has the time.I am thinking of buying a new one, so let's hope he has time in the foreseeable future to get the kinks out.. ;E
@kimocoder It will spare many user from eventual screwing up their devices in regard to the install from a fairly newer stock release to an older..just look in the Nexus's sub-forum.
Battery issue is not that fantastic whatever, but this is not that safe, man. :/
Would it be possible, as long as the Oreo support is not in dry sheets, to use a stock like custom rom? Pure Nexus comes into my head should be the same, but without the eventuality of messing with the stock files (no idea)..?
thx for your Reply :good:
UsPdSr said:
Load the Nexmon app from the Nethunter store, because this seems to be a installation path issue.
Click to expand...
Click to collapse
Nope, from the store nexmon doesnt start at all, the app forced to close.
UsPdSr said:
These 2 kernel are for total differrent distributions and shouldn't be used in tandem; mkay..
The adapter resp supported bands and this particular driver is quite old and like I wrote before, not a guarantee that it works in kimocoder's kernel beside; because one in another setup of you did work.That other kernel is LOS based for example, this one stock.
I read a couple months ago, that the RTL8192cu, apart the age, still unstable and buggy is/can be..but the driver is in the kernel..no clue, bud.
Click to expand...
Click to collapse
Thats a Point i thougth you got me, of Course i am not on stock like kimocoder wrote in his Installation steps, and so his kernel does not work well with LOS.
So i went to stock and setuped everything and...
the behavior is the same.
Here is some Output from dmesg with his kernel on stock:
For the tplink:
[ 696.723240] hub 2-0:1.0: 1 port detected
[ 697.039016] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 697.056824] usb 1-1: New USB device found, idVendor=0bda, idProduct=8178
[ 697.056884] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 697.056910] usb 1-1: Product: USB WLAN
[ 697.056934] usb 1-1: Manufacturer: Realtek
[ 697.056957] usb 1-1: SerialNumber: 00e04c000001
For the CLS (with 88XX):
[ 833.598100] xHCI xhci_add_endpoint called for root hub
[ 833.598119] xHCI xhci_check_bandwidth called for root hub
[ 833.599024] hub 2-0:1.0: USB hub found
[ 833.599077] hub 2-0:1.0: 1 port detected
[ 833.911239] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 833.926677] usb 1-1: New USB device found, idVendor=0bda, idProduct=8812
[ 833.926737] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 833.926764] usb 1-1: Product: 802.11n NIC
[ 833.926788] usb 1-1: Manufacturer: Realtek
[ 833.926811] usb 1-1: SerialNumber: 123456
And no module is loading.
After insmod 88XX.ko the wlan1 interface appears, i ve read on GitHub About the steps with iw and monitor mode and did this, but...
With wifite the device reboots on this step: PMKID CAPTURE: Waiting for PMKID (29s) (After unplugging the Adapter the devices reboots also...)
So i installed nethunter 2020.1 with the Default kernel on stock and when i Plugin my tplink dmesg says this:
[ 213.223653] xHCI xhci_add_endpoint called for root hub
[ 213.223663] xHCI xhci_check_bandwidth called for root hub
[ 213.224293] hub 1-0:1.0: USB hub found
[ 213.224329] hub 1-0:1.0: 1 port detected
[ 213.224536] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 213.224554] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 213.224615] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[ 213.224624] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 213.224631] usb usb2: Product: xHCI Host Controller
[ 213.224638] usb usb2: Manufacturer: Linux 3.10.73-nethunter-angler-1.1 xhci-hcd
[ 213.224644] usb usb2: SerialNumber: xhci-hcd.0.auto
[ 213.225498] xHCI xhci_add_endpoint called for root hub
[ 213.225508] xHCI xhci_check_bandwidth called for root hub
[ 213.225990] hub 2-0:1.0: USB hub found
[ 213.226022] hub 2-0:1.0: 1 port detected
[ 213.537162] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 213.551861] usb 1-1: New USB device found, idVendor=0bda, idProduct=8178
[ 213.551890] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 213.551898] usb 1-1: Product: USB WLAN
[ 213.551906] usb 1-1: Manufacturer: Realtek
[ 213.551913] usb 1-1: SerialNumber: 00e04c000001
[ 213.558318] rtl8192cu: Chip version 0x11
[ 213.615218] rtl8192cu: MAC address: c4:6e:1f:25:f5:4a
[ 213.615251] rtl8192cu: Board Type 0
[ 213.615398] rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1
[ 213.615657] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[ 213.640232] ieee80211 phy1: Selected rate control algorithm 'rtl_rc'
[ 213.643063] rtlwifi: wireless switch is on
[ 213.742373] SELinux: initialized (dev fuse, type fuse), uses mountpoint labeling
without insmod or something else. So...
I will wait what time will bring. I Count on this devices because its performant and the internal Adapter works even in 5Ghz with the Tools.
And sorry for my bad english, its not my native language.
@Nick_Speed
No need to apologise for possible language difficulties, mate.
The dmesg output reminds me of old ones with this device, which showed similar problems.
So it seems that we have to wait for the graciousness that kimocoder or somebody else will look into this.
I thought of building one in the meantime, but I have build only one kernel for android so far, so I consider myself therefore definitely still a beginner.
From what I read is the integration of the capabilities of Nexmon important..I had quite problems to build a kernel for the hammerhead.
Contrary to some opinions is it not that easy to build a kernel with Kali's main functions for Nexus devices.
I will definitely think about it and look over my schedule, but I couldn't accomplish it in the next week(s).Especially with the integration of Nexmon.
Let's hope that the dev comes around, right. :/
I forgot to ask what do you meant with the 2020.1 builds of Nethunter?
How did you install the chroot?
You thought to wipe and format everything, before starting over, right?
UsPdSr said:
I forgot to ask what do you meant with the 2020.1 builds of Nethunter?
How did you install the chroot?
Click to expand...
Click to collapse
I mean the release of kali nethunter 2020.1. It is a flashable zip for twrp. It includes everythink you Need. Nethunter App, Store, chroot, kernel. Ist the official one from the official site.
UsPdSr said:
You thought to wipe and format everything, before starting over, right?
Click to expand...
Click to collapse
Of Course. Always. And for stock i use the factory Image from Google. This means fastboot and flashall with the -w (wipe) Option.[/QUOTE]
Nick_Speed said:
I mean the release of kali nethunter 2020.1. It is a flashable zip for twrp. It includes everythink you Need. Nethunter App, Store, chroot, kernel. Ist the official one from the official site.
Click to expand...
Click to collapse
Yeah, sure.
I was talking about the chroot-installation with this kernel here?
Of Course. Always. And for stock i use the factory Image from Google. This means fastboot and flashall with the -w (wipe) Option.
Click to expand...
Click to collapse
Alright.
For the future: it's always better to wipe the former installation via Twrp and if you flash a stock image, don't use those crappy scripts from Google.
First is it inherently better to use fastboot/adb one command at a time and the '-w' in the flashall-script can by our BLOD-prone devices cause a bootloop, if the restart goes wrong.
Do u have any good links that r working to download the kernel
fowler82 said:
Do u have any good links that r working to download the kernel
Click to expand...
Click to collapse
Yeah, there seems to be some mess with the bbc code.
Here you go
->
https://github.com/kimocoder/android_static_tools/blob/master/nethunter_angler.zip
The rest of the apps and some pics from kimocoder can be found here
->
https://github.com/kimocoder/android_static_tools
Nick_Speed said:
thx for your Reply :good:
Nope, from the store nexmon doesnt start at all, the app forced to close.
Thats a Point i thougth you got me, of Course i am not on stock like kimocoder wrote in his Installation steps, and so his kernel does not work well with LOS.
So i went to stock and setuped everything and...
the behavior is the same.
Here is some Output from dmesg with his kernel on stock:
For the tplink:
[ 696.723240] hub 2-0:1.0: 1 port detected
[ 697.039016] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 697.056824] usb 1-1: New USB device found, idVendor=0bda, idProduct=8178
[ 697.056884] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 697.056910] usb 1-1: Product: USB WLAN
[ 697.056934] usb 1-1: Manufacturer: Realtek
[ 697.056957] usb 1-1: SerialNumber: 00e04c000001
For the CLS (with 88XX):
[ 833.598100] xHCI xhci_add_endpoint called for root hub
[ 833.598119] xHCI xhci_check_bandwidth called for root hub
[ 833.599024] hub 2-0:1.0: USB hub found
[ 833.599077] hub 2-0:1.0: 1 port detected
[ 833.911239] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 833.926677] usb 1-1: New USB device found, idVendor=0bda, idProduct=8812
[ 833.926737] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 833.926764] usb 1-1: Product: 802.11n NIC
[ 833.926788] usb 1-1: Manufacturer: Realtek
[ 833.926811] usb 1-1: SerialNumber: 123456
And no module is loading.
After insmod 88XX.ko the wlan1 interface appears, i ve read on GitHub About the steps with iw and monitor mode and did this, but...
With wifite the device reboots on this step: PMKID CAPTURE: Waiting for PMKID (29s) (After unplugging the Adapter the devices reboots also...)
So i installed nethunter 2020.1 with the Default kernel on stock and when i Plugin my tplink dmesg says this:
[ 213.223653] xHCI xhci_add_endpoint called for root hub
[ 213.223663] xHCI xhci_check_bandwidth called for root hub
[ 213.224293] hub 1-0:1.0: USB hub found
[ 213.224329] hub 1-0:1.0: 1 port detected
[ 213.224536] xhci-hcd xhci-hcd.0.auto: xHCI Host Controller
[ 213.224554] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 213.224615] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
[ 213.224624] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 213.224631] usb usb2: Product: xHCI Host Controller
[ 213.224638] usb usb2: Manufacturer: Linux 3.10.73-nethunter-angler-1.1 xhci-hcd
[ 213.224644] usb usb2: SerialNumber: xhci-hcd.0.auto
[ 213.225498] xHCI xhci_add_endpoint called for root hub
[ 213.225508] xHCI xhci_check_bandwidth called for root hub
[ 213.225990] hub 2-0:1.0: USB hub found
[ 213.226022] hub 2-0:1.0: 1 port detected
[ 213.537162] usb 1-1: new high-speed USB device number 2 using xhci-hcd
[ 213.551861] usb 1-1: New USB device found, idVendor=0bda, idProduct=8178
[ 213.551890] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 213.551898] usb 1-1: Product: USB WLAN
[ 213.551906] usb 1-1: Manufacturer: Realtek
[ 213.551913] usb 1-1: SerialNumber: 00e04c000001
[ 213.558318] rtl8192cu: Chip version 0x11
[ 213.615218] rtl8192cu: MAC address: c4:6e:1f:25:f5:4a
[ 213.615251] rtl8192cu: Board Type 0
[ 213.615398] rtlwifi: rx_max_size 15360, rx_urb_num 8, in_ep 1
[ 213.615657] rtl8192cu: Loading firmware rtlwifi/rtl8192cufw_TMSC.bin
[ 213.640232] ieee80211 phy1: Selected rate control algorithm 'rtl_rc'
[ 213.643063] rtlwifi: wireless switch is on
[ 213.742373] SELinux: initialized (dev fuse, type fuse), uses mountpoint labeling
without insmod or something else. So...
I will wait what time will bring. I Count on this devices because its performant and the internal Adapter works even in 5Ghz with the Tools.
And sorry for my bad english, its not my native language.
Click to expand...
Click to collapse
@Nick_Speed were you able to get around the device reboots on your setup? I have the same issue, and it's driving me mad!
SharkCage said:
@Nick_Speed were you able to get around the device reboots on your setup? I have the same issue, and it's driving me mad!
Click to expand...
Click to collapse
Nope, and unfortunately there arent any updates...
I tried so far an one plus 2 and a nexus 6 because they are supported and recommned but they lack of internal wlan mon support.
So the best devices so far is imo the nexus 6p with Android 7 and the stock nethunter kernel for external non 5Ghz Adapters and internal wlan mon support (with patched firmware).
Nick_Speed said:
Nope, and unfortunately there arent any updates...
I tried so far an one plus 2 and a nexus 6 because they are supported and recommned but they lack of internal wlan mon support.
So the best devices so far is imo the nexus 6p with Android 7 and the stock nethunter kernel for external non 5Ghz Adapters and internal wlan mon support (with patched firmware).
Click to expand...
Click to collapse
Thanks for the quick reply. Hopefully @kimocoder stops in for suggestions.
Nick_Speed said:
Nope, and unfortunately there arent any updates...
I tried so far an one plus 2 and a nexus 6 because they are supported and recommned but they lack of internal wlan mon support.
So the best devices so far is imo the nexus 6p with Android 7 and the stock nethunter kernel for external non 5Ghz Adapters and internal wlan mon support (with patched firmware).
Click to expand...
Click to collapse
You can use the Nougat Nethunter kernel for the N6p with LineageOS(RR, Omnirom, DU etc.) and Stock, or customized Stock images like PureNexus as well.
I haven't give up.Even after 25 kernel sources for Oreo, am I still developing.
Unfortunately did it seem, that the Nethunter team overwhelmed with more "recent" devices are and the Nexus not a OnePlus 7t Pro is. :E
I think it's great, beside the sucky OnePlus fondling have they achieved remarkable innovations, not only the kernel for the 800 Euro Gaming PC aka 7xy.
Like Nick_Speed said, is the internal monitor mode including the screen size, USB-C and foremost the very affordable price (I bought my second one a month ago and paid 90 Euro in great condition.Accu-health is very good and so far no issues.
I recommend commercial reseller.They ensure , at least in my case, three month guarantee and are very selective in their buying.
For now would I choose the stable kernel for 7.1-7.1.2, with with the Ternux setup(not my cup of tea - Termux=bah.Why not Terminus, JuiceSSH or something less trashy? ), or the new Nethunter UI(installer).
The optimal choice is to self build one with the python installer. In addition pick some of the features of the tools from this thread.Nexnon,Hijacker,Zanti, Wiggle and a couple you have to look up for yourself.
It sucks that we can't use devices with AC capabilities,but maybe another dev or myself come around to make this happen.
The problem is that Nexus development really sucks in regard of the modules at least.
I had more success with the Nvidia Shield K1, which was practically claimed as dead.
Many heaps
PS
It's quite difficult to get your hand on a Nano adapter with RTL8811/12/14 chipset.I compiled the current kernel with said driver, but no luck.
I have still the DU repo in my m head.Maybe I get the driver to load.
The patch from a team member didn't work.
Just some nice props^

Categories

Resources