Enable Logcat in CM12 NIGHTLY Galaxy S4 jftlexx - General Questions and Answers

Hi everyone! I'm trying to develop an app with Android Studio but whenever I try to check the logcat logs, nothing appears.
I have a Samsung Galaxy s4 with CyanogenMod Version 12.1-20150623-NIGHTLY-jfltexx installed. Android Studio is actually at version 1.3.2.
When I try to read app log messaes through Android Studio Device Monitor, I get the following error message:
DeviceMonitor: Adb rejected connection to client '11998': closed
When I try to manually launch Logcat from terminal using this command from the platform-tools directory:
adb logcat
I get the following error message:
Unable to open log device 'main'
I tried to find how to enable logging on my smartphone but I'm totally lost and I would really continue to develop my app.
Is anyone aware on how should I enable logging on my CM12?
Thank you so much in advance, I'm desperate
Diego

I have the same, have you found solution?

Related

"adb logcat" on Linux vs. "adb logcat" on XP

I'm awaiting the upgrade like everyone else so I flashed RC29 and have my phone plugged in at home and at work with "adb logcat" running so I can get the file name if I'm one of the lucky first few to get the update.
I noticed an interesting difference that I hope someone has an answer.
At home I have Ubuntu and at work I have XP. On ubuntu logcat keeps streaming new log events from the phone to the terminal but on XP's dos cmd window logcat does not update new log events to the screen.
I'm thinking this might be due to buffering? or USB driver differences?
Is there any way to get windows to behave like Linux (at least from a adb logcat perspective)?
On Windows XP, it does keep streaming log events to the console for me
Do you have the full android SDK installed on XP or just the files for adb?
Dave RL said:
Do you have the full android SDK installed on XP or just the files for adb?
Click to expand...
Click to collapse
I am running the full SDK on VISTA and it is streaming new events.
I have also noticed that, i dont ever get the full log report, The report cuts off in the middle of a lines when command prompt window wont catch no more (i guess), and stops there. i only have the adb file in place (in win dir).
I have tried the other command, "adb status-window" and i get no stream of data at all. I do not know if that is a correct command to use for this but just want to put that out there.
Dave RL said:
Do you have the full android SDK installed on XP or just the files for adb?
Click to expand...
Click to collapse
Full SDK
Ok, I'll try installing the full SDK when I get a chance at work today and see if that makes a difference.
It sounds like it's being caused by this bug:
http://www.telesphoreo.org/pipermail/g1-hackers/2008-December/000191.html
although generally that bug only shows up in Vista. Basically whenever the adb server reads data from the phone faster than the program running on your computer can read it out (e.g. tons of logcat data), the adb server locks up. You can try doing an end-task on adb.exe to kill the server and then running a fixed version like http://lfx.org/~jperry/adb_fixed.rar , or if you don't trust Random Files By Strange People On The Internets, you can try running logcat immediately after the phone reboots (so the log will be very short, not triggering the bug) and then just leaving logcat running while you do testing.
> This is probably being caused by the bug mentioned at
> http://code.google.com/p/android/issues/detail?id=1309
> Since it doesn't look like Google is ever going to fix it, I've compiled
> a binary with that patch applied. Try using the adb binary below (or
> apply the patch from the bug report and recompile) and see if that fixes
> it. Be sure to kill the adb daemon first before trying the fix (the bug
> is in the daemon process, not the client).
>
>
Click to expand...
Click to collapse
I can confirm that this fixed the problem for me. I had to restart the G1 (brute force way to restart the daemon) and use the adb_fixed.exe binary.
Thanks aziwoqpd!

[Q]ADB problem

Hi all!
I have installed android sdk completely following the guide in stickies,in order to be able to capture screens and to try fixing the superuser fc issue..Installation of sdk/adb went fine,the only difference from the original guide is that there wasn't "Android SDK Platform-tools, revision 5" but newer file called "Android SDK Platform-tools, revision 8".
When I run "adb devices" command,it shows my device and that works fine,but I have encountered 2 problems so far.
1)The first one is that when i try to take screenshoot using ddms I get an error saying "01:53:11 E/adb: Failed to get the adb version: Cannot run program "C:\AndroidSDK\platform-tools\adb": CreateProcess error=2, The system cannot find the file specified" in command prompt,and when DalvikDebugMonitor opens,it pops an error saying "Failed to get the adb version: Cannot run program "C:\AndroidSDK\platform-tools\adb : CreateProcess error=2, the system cannot find the file specified".
2)The second problem I've encountered is that when I tried to fix superuser problem I got this : "C:\AndroidSDK\tools>adb push su /system/bin/adb server is out of date. killing...
* daemon started successfully *
failed to copy 'su' to '/system/bin//su': Read-only file system"
Something doesn't work..My phone is connected in charge mode,usb debugging is checked..Im running ARHD 3.6.2,s-offed & rooted.
Thanks!
jafazec said:
Hi all!
I have installed android sdk completely following the guide in stickies,in order to be able to capture screens and to try fixing the superuser fc issue..Installation of sdk/adb went fine,the only difference from the original guide is that there wasn't "Android SDK Platform-tools, revision 5" but newer file called "Android SDK Platform-tools, revision 8".
When I run "adb devices" command,it shows my device and that works fine,but I have encountered 2 problems so far.
1)The first one is that when i try to take screenshoot using ddms I get an error saying "01:53:11 E/adb: Failed to get the adb version: Cannot run program "C:\AndroidSDK\platform-tools\adb": CreateProcess error=2, The system cannot find the file specified" in command prompt,and when DalvikDebugMonitor opens,it pops an error saying "Failed to get the adb version: Cannot run program "C:\AndroidSDK\platform-tools\adb : CreateProcess error=2, the system cannot find the file specified".
2)The second problem I've encountered is that when I tried to fix superuser problem I got this : "C:\AndroidSDK\tools>adb push su /system/bin/adb server is out of date. killing...
* daemon started successfully *
failed to copy 'su' to '/system/bin//su': Read-only file system"
Something doesn't work..My phone is connected in charge mode,usb debugging is checked..Im running ARHD 3.6.2,s-offed & rooted.
Thanks!
Click to expand...
Click to collapse
Hi,
Did you install Android SDK on the root of your C: drive?
Because,that is where the program will look for it.
malybru said:
Hi,
Did you install Android SDK on the root of your C: drive?
Because,that is where the program will look for it.
Click to expand...
Click to collapse
Hi! Yes, I completely followed the guide several times..ALso read every possible similar thread online that could help me but nothing helped..At last, I reinstalled my Win7x64,and everything worked out,but using a different guide,because this one didn't work again.. Instead of installing javax86&x64, I installed JavaSDK..Now,everything is working properly.
However, thanks for trying to help!

How to make dig command running on my Samsung SIII

Hi,
I have enabled root access to my phone and installed "Android Terminal Emulator". But "dig" and "nslookup" commands are not working.
Can you please guide me to how I can make DNS commands running via my smartphone.
thank you.
taqi

[Q] [HELP] Regarding client server app

I am trying to develop a client - server application. I have a few questions regarding the complete dev process. I am using Nexus 7 GPe with android 4.4.2 (not rooted)
Please help me with the following question.
1) How can I take logs without connecting my device to the ADB as android 4.4.2 has a restriction and the logcat applications cannot read the logs because of that?
2) If I connect the device to ADB and try to run my code, I get a permission denied error while reading a file that is stored at "/mnt/shell/emulated/0/Movies", how can I resolve that
3) To use the code on an emulator, I used to re-direct ports. Will I have to do the same while debugging the code on the device? Also, if yes, how can I redir or open ports for TCP/UDP connections through my application on the device.
Thanks in advance

Trying to get monitor mode working with nexmon

I downloaded nexmon from the play store and I can't seem to enable monitor mode, I have the utils and framework installed. I'm using dirty unicorns ROM with Kali on top. I have been looking all over on how to use it. The github says to use adb shell and then enter a command but I'm trying to do mobile pen testing and don't want to be tangled to a PC. Can anyone tell me how its done ?
Have you tried using terminal emulator to run the commands?
wangdaning said:
Have you tried using terminal emulator to run the commands?
Click to expand...
Click to collapse
The correct command is nexutil -m1 right ? I tried both the kali terminal and the android terminal.
Hopefully someone else can come give some advice, I have no clue as I have never ran that set up. I was just thinking the only way to get adb commands without a pc is to use terminal emulator app.
Anyone ?
I too need help with this. From the reading I've done nexmon is supposed to work as a standalone for things like airodump-ng but it doesn't exactly define handshakes and what is happening. It uses the terms becons and frame, I don't understand how these translate and would prefer to enable monitoring on the CMD in Kali.
It seems the problem is that nexmon stores the files in Android bins and Kali CMD doesn't see these as it is a separate machine. How do you merge the files so Kali can recognize that nexmon has a way to monitor the wlan0.
Furthermore how do you get Kali CMD to kill the P2P0 network, it seems as though this might cause a problem once you get it to monitor and try to run airo commands

Categories

Resources