[Q] config.gz or /root kernel nowhere to be found - Android Software/Hacking General [Developers Only]

Hi so I'm trying to pull my kernel off of my nook simple touch but I can't figure this out
Apparently /proc/config.gz does not exist. I guess it's output is not enabled in the current kernel.
When I try to "cat /boot/config-$(uname -r) | grep -i ikconfig" I get "cat: can't open '/boot/config-2.6.29-omap1: No such file or directory"
How do I get my current kernel??

Even I am looking for the same. Did you got the solution?
If yes, please let me know. :good:

Related

help, "Process system is not responding" after kernel update

Hi all,
I am trying to rebuild the stock Froyo kernel on my Droid. I found the exact git version used as the stock kernel, and built the kernel with:
Code:
make sholes_defconfig LOCALVERSION=-g68eeef5
To the best of my understanding, that is the configuration file used.
I packaged the kernel with:
Code:
./mkbootimg --kernel omap/arch/arm/boot/zImage --ramdisk boot.img-ramdisk.gz --cmdline "console=ttyS2,115200n8 rw [email protected] init=/init ip=off brdrev=P3A_CDMA mtdparts=omap2-nand.0:[email protected](mbm),[email protected](cdt),[email protected](lbl),[email protected](misc),3584k(boot),4608k(recovery),143744k(system),94848k(cache),268032k(userdata),2m(kpanic)" -o boot.img
Then I flash the kernel image like the following:
Code:
flash_image boot /sdcard/boot.img
However, after the system boots and I get to my desktop I get the error:
Code:
Sorry! Process system is not responding.
I have compared the dmesg of booting the stock kernel and my rebuild of the kernel, found here:
http://www.ece.cmu.edu/~gnychis/diff.html
The one thing I am afraid of is around line 490,491 and some differences there after. Does anyone know what might be missing in my kernel configuration for those? I was pretty positive this was the exact configuration used, but maybe not. Has anyone had a problem like this trying to build a custom ROM?
Thanks!
solved... my boot.img-ramdisk.gz did not properly match. I extracted boot.img from the stock rom and paired my kernel with it.

Tutorial: How to properly post a bug

Alright guys, I was on an irc channel when I considered posting this since it's rather important. There has been a lot of disappointing posts all over the forum with people complaining about bugs, while not providing any kind of information for the developers aside from "X doesn't work" or "I get random reboots".
Well, without the proper knowledge, how are we going to fix it? We don't know what kernel you may be running, what version number you're on, or any information that the system spits out to let you know there's an error. So, I decided to start this thread, to hopefully teach newbies how to give us (developers) proper knowledge when complaining about issues.
This thread will have 3 sections, Logcat (App / system debug log.), Dmesg (active kernel output) and last_ksmg (Typically if you get a random reboot or something of that sort {this is the same as dmesg except it gets the info from the last shutdown [like a kernel panic]})
Section 1: Logcat
This log should almost always be included just because it provides more info than just saying something doesn't work. It will essentially tell you which apps are crashing and why and it also gives output of what they're doing. (Your system is running through apps, the dialer, wireless radio's, etc are all ran through apps.) so, if something is general, like a system force close, please just include a logcat.
How to get a logcat:
Well, this is REALLY simple, all you need to do is just get adb up and running (google how to do that, I don't feel like writing a 'how to use adb' tutorial for everyone's phone.) and then type
Code:
adb logcat
then you just right click, select, and paste to the thread. It's really that simple!
Section 2: Dmesg
This is getting into issues such as wifi not working, sleep of death, etc. Basically, things that make us go "OH F***" when we use our devices. Note: You will need adb access for this to work, same as logcat.
What this will do is get us live kernel output so we can know things like "What driver is the kernel loading {or not loading for that matter}" and similar things. This is linux, so kernel output is important if a hardware aspect isn't working right.
How to get a dmesg:
This is simple as well, no matter what operating system you're on (mac, windows, linux) just type
Code:
adb shell dmesg > dmesg.txt
and then it will have written the output to a .txt file in your current directory. Either paste the contents to the thread, or attach it to your post.
You can also get the dmesg by using terminal emulator. Instead though, you dont type adb shell, you need to also include it to somewhere you will be able to save it. Like /sdcard so, the command goes
Code:
dmesg > /sdcard/dmesg.txt
Just get it off your sdcard and get the contents to the developer!
Section 3: last_kmsg
Ok, the last thing is last_kmsg. When android kernels crash, they right to last_kmsg so then you can find out what's going on. This is usually for issues such as random reboots and other various kernel panic symptoms. A kernel panic happens when the kernel tries to do something it can't. It doesn't mean wrong permissions, it could just have errored out on something and died which can cause a few things. Anyway, developers REALLY need this if debugging a kernel because it gives us a viable way to see WHAT it's trying to do instead of trying to guess what it is trying to do
How to get a last_kmsg:
This is super simple and the same on all phones no matter what, what you need is adb up and running (or terminal emulator) and either in adb shell, or terminal emulator just type
Code:
cat /proc/last_kmsg > /sdcard/last_kmsg.txt
or you can do
Code:
adb shell cat /proc/last_kmsg > kmsg.txt
and that will write it to your current working directory from cmd.
Hopefully, this way we developers can have our lives be a little bit easier and you can learn more about android.
I'm glad to have written this and devs, feel free to link to this guide as a "bug reporting FAQ"
HALP! I BRICKD MY FONE!!1!
I JAILBROKED IT LAST NIGHT AND NOW I NO GET SIGNEL!! PLASE HALP!!!1
but on a more serious note, good tut
Thanks dude!!! I was looking for some kind of guide. Only thing I still don't understand is when are we supposed to give dmesg and when do we give the logcat? I understand the last_kmsg is for kernel panics and random reboots, but the rest two are still ambiguous to me... Could you please explain the other two in a simpler way with an easy example for each?... Sorry.. I'm a noob... but am trying to learn these things..
There also is this app called 'Bootlog Uptime' that tries to auto-detect a crash and subsequently exports the log to sdcard.
When I get in to cmd in bootloader mode and type adb shell cat /proc/last_kmsg > kmsg.txt, I get a message Error: Device not found. I checked the ADB drivers, the are loading well. Am I doing something wrong?
If you're in boot loader mode, that's not adb.
Sent from my Full Android on Crespo4G using xda premium
anshumandash said:
When I get in to cmd in bootloader mode and type adb shell cat /proc/last_kmsg > kmsg.txt, I get a message Error: Device not found. I checked the ADB drivers, the are loading well. Am I doing something wrong?
Click to expand...
Click to collapse
You need to boot into the ROM, then grab the logs.
Sent from my GT-I9100 using xda app-developers app
Thank you for this
Sent from my Nexus 4 using Xparent BlueTapatalk 2
Can someone help me please.
I am from the HTC One S (Ville C2) community. I am testing a new kernel by one of the devs who doesnt have the phone. Now after installing the new kernel the phone is on bootloop. I need to extract the last_kmsg. the only way I can get out of the boot loop to do anything is by pressing the power button and simulate battery out. This it seems erases the last_kmsg cuz when I enter recovery to get it. It either says no such file or sometimes ends up showing me the recovery kernels last_kmsg. I am at a total loss as to how I the last_kmsg file.
There is also no way to install a working boot image as the kernel uses a zip to install files on the phone so we must use recovery to restore to previous state. This leads to the original condition. I tried looking for a solution but cant find it anywhere.
I tried the above method (via the Terminal Emulator) for finding the last_kmsg (my phone had just rebooted) and it says "/system/bin/sh: cat: /proc/last_kmsg: No such file or directory"
And Indeed, there is no last_kmsg file in my proc folder. Is there something I have to do to create it in the first place?
Thanks!
piyush_soni said:
I tried the above method (via the Terminal Emulator) for finding the last_kmsg (my phone had just rebooted) and it says "/system/bin/sh: cat: /proc/last_kmsg: No such file or directory"
And Indeed, there is no last_kmsg file in my proc folder. Is there something I have to do to create it in the first place?
Thanks!
Click to expand...
Click to collapse
I have the same problem.
Nexus 7-16 GB, PA 3.00, faux kernel 16 ultimate
Just solved the last kmsg problem. Instead of making the terminal do the job and getting "there is no such directory", just go above one level from sdcard and find proc folder. There will be a file named last_kmsg.
Hope it helps someone
Nexus 7-16 GB, PA 3.00, faux kernel 16 ultimate
---------- Post added at 10:13 AM ---------- Previous post was at 10:08 AM ----------
piyush_soni said:
I tried the above method (via the Terminal Emulator) for finding the last_kmsg (my phone had just rebooted) and it says "/system/bin/sh: cat: /proc/last_kmsg: No such file or directory"
And Indeed, there is no last_kmsg file in my proc folder. Is there something I have to do to create it in the first place?
Thanks!
Click to expand...
Click to collapse
Wait a few minutes it will be there
Nexus 7-16 GB, PA 3.00, faux kernel 16 ultimate
Kaiyes said:
Just solved the last kmsg problem. Instead of making the terminal do the job and getting "there is no such directory", just go above one level from sdcard and find proc folder. There will be a file named last_kmsg.
Click to expand...
Click to collapse
Kaiyes said:
Wait a few minutes it will be there
Click to expand...
Click to collapse
Nope. It's still not there for me ... I have a file called kmsg, but not last_kmsg.
Good stuff!
I'm on JB 4.3, Galaxy Note 2 and I've Flash Davil Kernel.
Two Bugs for me:
1) when the Phone, in switch off, is charging... the LED will not light. No Red Light (when in charging), nor Green one, when it has reached the 100%.
2) When Phone is connect to PC it isn't recognized by the PC in any way. To transfer files I have to use some app via Wi-Fi.
Are Two knows Bugs? Thanks in advance.
Hey glowerita I have this same problem minus the devil kernel. I don't think devil works with the FTW rom
Sent from my SPH-L900 using Tapatalk
Aquarius169 said:
Hey glowerita I have this same problem minus the devil kernel. I don't think devil works with the FTW rom
Sent from my SPH-L900 using Tapatalk
Click to expand...
Click to collapse
Hi! About PC recognize I've done so and now it's ok.
With Terminal emulator digit;
su
Press Enter.
Now digit; setprop persist.sys.usb.config mtp,adb
Enter, exit and reboot device and PC. [emoji1]
About led light... have you same problem like me?
Inviato dal mio GT-I9100 utilizzando Tapatalk
Take a look at
https://play.google.com/store/apps/details?id=com.bassel.andylog
... [email protected]
dmesg kmsg not permitted
Here's the dmesg.txt file when issuing C:\platform-tools>adb shell dmesg > dmesg.txt
"klogctl: Operation not permitted"
So I tried:
"C:\platform-tools>adb shell
←7←[r←[999;999H←[[email protected]:/ $ su
su
←7←[r←[999;999H←[[email protected]:/ # dmesg > dmesg.txt
dmesg > dmesg.txt
sh: can't create dmesg.txt: Read-only file system"
Results of issuing "C:\platform-tools>cat /proc/last_kmsg > /sdcard/last_kmsg.txt
The system cannot find the path specified.
C:\platform-tools>adb shell cat /proc/last_kmsg > kmsg.txt
/system/bin/sh: cat: /proc/last_kmsg: Operation not permitted"
Same results running terminal on phone also.
-Running PecanCM's CM11 Beta10 on LG L5 e610-
So neat and simple. Thanks for clarifying that.

[q] loop devices

how i am know if my tablet "loop devices" support
or how i am kae him to suport loop devices
Code:
cd /sdcard/wherever/
cp /proc/config.gz ./
gunzip ./config.gz
cat ./config | grep LOOP
"LOOP" must be in all caps, or it won't work.
thanks
EndlessDissent said:
Code:
cd /sdcard/wherever/
cp /proc/config.gz ./
gunzip ./config.gz
cat ./config | grep LOOP
"LOOP" must be in all caps, or it won't work.
Click to expand...
Click to collapse
thanks bat you say
Code:
cd /sdcard/wherever/
bat what it is
Code:
wherever
what i am need put there
or how i am loop my device
mihael1996 said:
thanks bat you say
Code:
cd /sdcard/wherever/
bat what it is
Code:
wherever
what i am need put there
or how i am loop my device
Click to expand...
Click to collapse
It means to just cd wherever you like. It doesn't matter where you unzip the file. Just do it in whatever folder you want. All those commands do is copy the kernel configuration to whichever folder you're in, unzip it, search for the loop device configuration options, and print it to the screen.
EndlessDissent said:
It means to just cd wherever you like. It doesn't matter where you unzip the file. Just do it in whatever folder you want. All those commands do is copy the kernel configuration to whichever folder you're in, unzip it, search for the loop device configuration options, and print it to the screen.
Click to expand...
Click to collapse
realy thank you
can you say to me from where downlode this zip file ?
from here it ok ? http://forum.xda-developers.com/showthread.php?t=2246062
and do you have a skype ?
mihael1996 said:
realy thank you
can you say to me from where downlode this zip file ?
from here it ok ? http://forum.xda-developers.com/showthread.php?t=2246062
and do you have a skype ?
Click to expand...
Click to collapse
You're not supposed to download anything. You just use the commands I posted to copy and read your current kernel config. It's all on the tablet already. You just need to type the commands.
If you want to know if that kernel supports loop devices, you could flash it before running the commands I posted. Or, just ask in the thread.
No, I don't have Skype. I hate Microsoft and everything they touch.
where i am put this commands ?
Terminal Emulator

OTA failing. ro.build.fingerprint doesn't match /etc/build.prop

Hi Gang.. I'm stumped.
I'm running stock COS 13.1 and for ages I've been unable to get OTA updates. I tend to wait for and flash the full tar when it comes out. I'd really like to get OTA working. I used to use TWRP and be rooted, but I'd like to keep NFC Payments, so have moved back to stock.
When I run the OTA update, I get a build fingerprint error. It reports my fingerprint as containing "A0001:4.4.2/KVT49L" (obviously I've had this problem for a while!)
/system/build.prop has the correct fingerprint.
ro.build.fingerprint=oneplus/bacon/A0001:6.0.1/MHC19Q/ZNH2KAS254:user/release-keys
I've rooted again and went into adb shell to try and find where 4.4.2/KVT49L is being set. I've done a grep on all files and can't find the string (except in logs, as expected)! Anyone have an idea how it's being set?
[email protected]:/ # find / -maxdepth 10 -type f -exec grep -l KVT49L {} \; 2>/dev/null
/storage/emulated/0/TWRP/BACKUPS/e1125860/2016-08-16--00-45-03_MHC19Q/recovery.log
/mnt/runtime/write/emulated/0/TWRP/BACKUPS/e1125860/2016-08-16--00-45-03_MHC19Q/recovery.log
/mnt/runtime/read/emulated/0/TWRP/BACKUPS/e1125860/2016-08-16--00-45-03_MHC19Q/recovery.log
/mnt/runtime/default/emulated/0/TWRP/BACKUPS/e1125860/2016-08-16--00-45-03_MHC19Q/recovery.log
/cache/recovery/last_log.4
/cache/recovery/last_log
Click to expand...
Click to collapse

Help in building Lineage OS source for bacon in MAC OS

Hi everyone,
I've successfully built the Lineage Rom from Source. However after I flash the zip file from TWRP, the phone doesn't pass the Oneplus logo on the Bootloader, and the ROM doesn't start loading.
I asked for help on Lineage IRC and they suggested that I would use the OnePlus Binaries from TheMuppets. I did that and after a rebuild, the result was the same.
The fun part is that if I flash another Kernel (Bofella, for example) after I flash the Rom ZIP file, the ROM starts successfully.
Can you please guide me in the right direction?
Thanks a lot
It might be a kernel related problem
Hi,
After a discussion in the Lineage IRC, apparently the problem could be in the stat command, which is used while building the kernel. (check here the error from the logs: pastebin.com/0wsVy5zr)
Do you know the script that is responsible for calling that command? By the way, this is probably happening because I'm building on OSX.
Thanks
@idprophecy ,see if you can help this guy.
It might be kernel related problem as @nathsagar96 stated. I have no experience with mac, but from what I know stat differs in there (in its commands). It must be GNU stat, not other like BSD. Therefore be sure you have GNU stat installed (I think it is possible via homebrew and especially it is related to coreutils package). Also sorry If I am wrong. I haven't been mac user and I have never regarded this, but try to do this, it makes sense. We'll see.
No problems on Linux
idprophecy said:
It might be kernel related problem as @nathsagar96 stated. I have no experience with mac, but from what I know stat differs in there (in its commands). It must be GNU stat, not other like BSD. Therefore be sure you have GNU stat installed (I think it is possible via homebrew and especially it is related to coreutils package). Also sorry If I am wrong. I haven't been mac user and I have never regarded this, but try to do this, it makes sense. We'll see.
Click to expand...
Click to collapse
Hum, I searched and it seems that there is the GNU stat for Mac, but the name changes to gstat. This means that I'll have to change the scripts, so probably I'll prefer to use the "mac version" of
Code:
stat -c
, which should be
Code:
stat -f %z
I'll try it and let you know
Hi Guys,
Just to let you know. I changed the file of the oneplus kernel, in scripts/Makefile.lib:
from:
Code:
...
for F in $1; do
fsize=$$(stat -c "%s" $$F);
dec_size=$$(expr $$dec_size + $$fsize);
done;
...
To:
Code:
...
for F in $1; do \
fsize=$$(stat -f %z $$F); \
dec_size=$$(expr $$dec_size + $$fsize); \
done;
...
And then it compiled correctly and the rom started with no problems

Categories

Resources