Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6801507
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:06:31+00:00 2026-05-26T19:06:31+00:00

Problem 1: I want to redirect the kernel log to other file using my

  • 0

Problem 1:
I want to redirect the kernel log to other file using my app.
How to properly execute this? The code is something like below:

Runtime.getRuntime().exec("dmesg > /data/kernel_log.txt"); 

Problem 2:
I want to clear the kernel log using my app. How to correct the below code;

Runtime.getRuntime().exec("dmesg -c"); 

Note1:
My goal is to get all the log of the kernel(dmesg) from START to LATEST.
Since dmesg has buffer size limitation and I don’t want to rebuild the kernel
just to resize the buffer.

Note2: this is very related to;
android : how to run a shell command from within code

Note3: Currently I am using a device with a ENG mode build, which means this is rooted am I correct?

Logcat Error Message:

11-11 20:18:47.910: E/DmesgGetterService(2885): java.io.IOException: Error running exec(). Command: [dmesg > /data/kernel_log.txt] Working Directory: null Environment: null
...
11-11 20:19:07.920: E/DmesgGetterService(2885): Caused by: java.io.IOException: No such file or directory
...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:06:32+00:00Added an answer on May 26, 2026 at 7:06 pm

    I was able to get the dmesg log in different method. Using the AlarmManager to run a service in the specified interval I fetch the log from the kernel then find the last line I copied from previous run then append the new logs. That’s it!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So here is my problem. I want to redirect name.domain.com/trips/1 to domain.com?username=name&trip=1 using modrewrite.
I want to redirect a url pattern like http://abcd.com/some/sub/directory/var1 to http://abcd.com/some/sub/directory/?search=var1 I've read other
I have a problem with my htaccess file in wordpress. I want to redirect
Hello I want to redirect my Facebook App page to another app page using
I want to redirect the print to a .txt file using Python. I have
My problem is that I want to redirect via JavaScript to a directory above.
I am creating application in facebook using iframe. In that i want to redirect
edit I do not want to redirect pages, specific files etc. I would like
I have problem with url tag. I want to redirect to a function that
I have a regexp problem in my htaccess. I want to redirect all parameters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.