[Miui BUG] Logcat not working - Huawei Ideos X5 U8800

Hi!
I am using latest MIUI. I needed today the Logcat, but seems it is disabled.
How can I re-enable it?
Code:
C:\adb>adb logcat
Unable to open log device '/dev/log/main': No such file or directory

Related

[Q] Nothing in ADB LOGCAT?

Hello!
What am I doing wrong?
1. Write "adb logcat".
2. It says "-waiting for device-".
3. I turn on my device.
4. After it have boot-looped like 2 times (this is the error im trying to fix), I press CTRL-C.
And there is no log?
I have also tried "adb logcat > logcat.txt but the logcat.txt is empty. :S
Please help!
"Solved!" .

extract-files.sh permission denied

HI,
This is the first time I am building android from source. I have been following the cyanogen wiki guide and all appears to have gone well until I got to running extract-files.sh. It starts off ok but then gives me what is shown in the screen shot below. I have tried running it with sudo but it makes no difference.
Hi,
Im guessing your ran some initialisation of environment with root as permissions...
try doing a
Code:
sudo su
cd sourcedir/device/vendor/devicename/
./extract-files.sh
It should work. If you're extracting from a folder
Code:
./extract-files.sh path_to_folder
If it still doesnt work delete all the folders in the sourcedir except ".repo". then,
Code:
repo sync
or
repo sync -l #Syncs from local directory doesnt use internet

[HELP] Logcat enable.

Hi,
I've just set up a new handset.
Since changes ive made over night im getting;
- unfortunately, 'app name' has stopped.
I'm trying to generate a logcat, having no joy.
- handset; SGSV
- rom; XTRESTROLITE
- kernel; blaze
I have turned logging on via 'pimp my rom' tweaks.
Upon adb logcat command i get;
- Unable to open log device '/dev/log/main': No such file or directory
So i set about tying to manually ensure logcat is enabled.
First with ADB;
> adb shell
> logcat-enable
Result;
C:\android-sdk\platform-tools>adb shell
[email protected]:/ $ logcat-enable
logcat-enable
/system/bin/sh: logcat-enable: not found
Then via USSD code;
> *#*#2846579#*#*
Result;
Number dialled, no code.
Then i attempted to follow as per these instructions;
http://bitmote.com/index.php?post/2013/02/19/Enabling-Logcat-in-Custom-Android-Roms
I found system set to ro, remounted rw ok.
But ran into a dead end here;
"First you need to locate the logger kernel module...
logger.ko located in...your /system folder...
Try these locations:
/system/lib/modules/logger.ko
/system/modules/logger.ko"
The folder "modules" does not exist in system or lib/system.
Help would be much appreciated.
Cheers.

[Q] How to deploy telephony code changes?

Hi all,
I made a small change to the com.android.server.telecom.CallActivity class (e.g. Log.i("I am here") ). I entered "mm" to build to the project under /packages/services/Telecomm and got an updated apk file in out/target/product/aosp_arm/system/priv-app/Telecom/Telecom.apk . And then I installed the apk by typing "adb install -r /path/to/Telecom.apk". The installer confirmed "success". I rebooted the device and logcat my added log line while making a phone call. However, I saw nothing.
On the other hand, if I do a full build by typing "make -j8" from the root of the repo tree and flash the image zip file using flashall.sh or update.sh, I can see my added log line.
What did I miss? I am sure there must be a way to make changes in the Telecom package w/o a full rebuilt everytime.
Thank you!
jameslhb said:
Hi all,
I made a small change to the com.android.server.telecom.CallActivity class (e.g. Log.i("I am here") ). I entered "mm" to build to the project under /packages/services/Telecomm and got an updated apk file in out/target/product/aosp_arm/system/priv-app/Telecom/Telecom.apk . And then I installed the apk by typing "adb install -r /path/to/Telecom.apk". The installer confirmed "success". I rebooted the device and logcat my added log line while making a phone call. However, I saw nothing.
On the other hand, if I do a full build by typing "make -j8" from the root of the repo tree and flash the image zip file using flashall.sh or update.sh, I can see my added log line.
What did I miss? I am sure there must be a way to make changes in the Telecom package w/o a full rebuilt everytime.
Thank you!
Click to expand...
Click to collapse
Do command "adb root /adb remount / adb pull Telecom.apk /system/priv-app/Telecom" work? I often use the command to update telephony code.
he_arslan said:
Do command "adb root /adb remount / adb pull Telecom.apk /system/priv-app/Telecom" work? I often use the command to update telephony code.
Click to expand...
Click to collapse
I think you meant adb push instead of pull. And yes, I tried adb push followed by killing the telecom process and it worked!! Thank you very much. :good: I am curious why adb install failed, though.

[SOLVED]Stuck in twrp kmsg

I wanted to get the kmsg from `/proc/kmsg` so I went to the TWRP File Manager and tried copying this file to my external sd card but it's taking forever to copy. Should I be interrupting this process or should I wait more (already 5 mins). I can't afford to lose data in the internal storage and the data partition.
Device: Moto g4 plus xt1643
ROM: Stock MM 6.0.1 MPJ24.139-63
TWRP: 3.1 by oadam11
MagiskSU v12.0 installed.
Anyone who can help please do so and also guide me how to get the kmsg from the phone without using any app.
EDIT: Interrupted by `adb reboot bootloader` and nothing went wrong. But how do I get the kmsg?
EDIT: doing this in terminal emulator gets the log:
# cat /proc/kmsg > /sdcard/kmsg.txt
tywinlannister7 said:
I wanted to get the kmsg from `/proc/kmsg` so I went to the TWRP File Manager and tried copying this file to my external sd card but it's taking forever to copy. Should I be interrupting this process or should I wait more (already 5 mins). I can't afford to lose data in the internal storage and the data partition.
Device: Moto g4 plus xt1643
ROM: Stock MM 6.0.1 MPJ24.139-63
TWRP: 3.1 by oadam11
MagiskSU v12.0 installed.
Anyone who can help please do so and also guide me how to get the kmsg from the phone without using any app.
EDIT: Interrupted by `adb reboot bootloader` and nothing went wrong. But how do I get the kmsg?
Click to expand...
Click to collapse
Have you tried copying it to internal? Copying to SD has been super funky at times with TWRP.
Same results.
negusp said:
Have you tried copying it to internal? Copying to SD has been super funky at times with TWRP.
Click to expand...
Click to collapse
The process of copying the file never ends. I tried copying to both the external and the internal sd card.
tywinlannister7 said:
But how do I get the kmsg?
Click to expand...
Click to collapse
Use the following command, it creates a kmsg.txt file on your current directory from where you ran cmd:
Code:
adb shell cat /proc/kmsg > kmsg.txt
Or run the following command in any terminal emulator, it'll save it in your sdcard/internal storage:
Code:
cat /proc/kmsg > /sdcard/kmsg.txt
tywinlannister7 said:
The process of copying the file never ends. I tried copying to both the external and the internal sd card.
Click to expand...
Click to collapse
Strange it gets easily copied to both internal & sdcard for me. Tried that on RR
lCrD512 said:
Use the following command, it creates a kmsg.txt file on your current directory from where you ran cmd:
Or run the following command in any terminal emulator, it'll save it in your sdcard/internal storage:
Click to expand...
Click to collapse
The terminal emulator thing worked. ? Thanks.
How to get last_kmsg?
Thanks @tywinlannister7 for this thread. I too wanted to ask some of my doubts regarding logs.
So, I followed some guides on xda & now I know how to get a logcat & dmesg but the problem is with last_kmsg. All the guides I could find gave the same result to use adb shell cat /proc/last_kmsg > lastkmsg.txt but that gives a txt file which simply says No such directories
I got some random reboots on RR, read the op @Silesh.Nair also mentioned to get the last_kmsg but I'm not able to get it.
However the random reboot issue was gone after I clean flashed the latest build but still I'm curious to know if it's possible to get any kind of log for random reboots. Tried on PureNexus too but same No such directory txt
Plz...guide @tywinlannister7 @lCrD512 @negusp or anyone
Nikki Singhania said:
Thanks @tywinlannister7 for this thread. I too wanted to ask some of my doubts regarding logs.
So, I followed some guides on xda & now I know how to get a logcat & dmesg but the problem is with last_kmsg. All the guides I could find gave the same result to use adb shell cat /proc/last_kmsg > lastkmsg.txt but that gives a txt file which simply says No such directories
I got some random reboots on RR, read the op @Silesh.Nair also mentioned to get the last_kmsg but I'm not able to get it.
However the random reboot issue was gone after I clean flashed the latest build but still I'm curious to know if it's possible to get any kind of log for random reboots. Tried on PureNexus too but same No such directory txt
Plz...guide @[email protected]@negusp or anyone
Click to expand...
Click to collapse
I had seen an old XDA TV video where they had explained the procedure. But imo instead of 'last_kmesg' directly doing:
# cat /proc/kmsg > /sdcard/kmsg.txt
in terminal emulator or by
# adb shell cat /proc/kmsg > /sdcard/kmsg.txt
You get the log.
Nikki Singhania said:
Thanks @tywinlannister7 for this thread. I too wanted to ask some of my doubts regarding logs.
So, I followed some guides on xda & now I know how to get a logcat & dmesg but the problem is with last_kmsg. All the guides I could find gave the same result to use adb shell cat /proc/last_kmsg > lastkmsg.txt but that gives a txt file which simply says No such directories
I got some random reboots on RR, read the op @Silesh.Nair also mentioned to get the last_kmsg but I'm not able to get it.
However the random reboot issue was gone after I clean flashed the latest build but still I'm curious to know if it's possible to get any kind of log for random reboots. Tried on PureNexus too but same No such directory txt
Plz...guide @tywinlannister7 @lCrD512 @negusp or anyone
Click to expand...
Click to collapse
tywinlannister7 said:
I had seen an old XDA TV video where they had explained the procedure. But imo instead of 'last_kmesg' directly doing:
# cat /proc/kmsg > /sdcard/kmsg.txt
in terminal emulator or by
# adb shell cat /proc/kmsg > /sdcard/kmsg.txt
You get the log.
Click to expand...
Click to collapse
To view
Code:
adb shell
cat /sys/fs/pstore/console-ramoops-0
cat /sys/fs/pstore/dmesg-ramoops-0
To pull
Code:
adb pull /sys/fs/pstore/console-ramoops-0
adb pull /sys/fs/pstore/dmesg-ramoops-0
Silesh.Nair said:
To view
Code:
adb shell
cat /sys/fs/pstore/console-ramoops-0
cat /sys/fs/pstore/dmesg-ramoops-0
To pull
Code:
adb pull /sys/fs/pstore/console-ramoops-0
adb pull /sys/fs/pstore/dmesg-ramoops-0
Click to expand...
Click to collapse
Thanks this working:highfive: so on android 7.x they changed to this location
Nikki Singhania said:
so on android 7.x they changed to this location
Click to expand...
Click to collapse
This was changed from Android 6.0 Marshmallow & above

Categories

Resources