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 8418109
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:13:46+00:00 2026-06-10T02:13:46+00:00

I know that in the Android boot up sequence, after the Linux kernel boots

  • 0

I know that in the Android boot up sequence, after the Linux kernel boots up, it looks for init.

I replaced init with my custom C application myapp. In myapp, I wait for a user input for 5 seconds. If nothing is received, I want to run the original init, which I renamed as init_original. If I received user input, I wanna go on to do my stuff.

I placed my custom init and init_original in my unpacked ramdisk and cpio-ed and gzip-ed it according to instructions from http://android-dls.com/wiki/index.php?title=HOWTO:_Unpack%2C_Edit%2C_and_Re-Pack_Boot_Images

init_original is successfully called from my program using execve(). However, I get the following output:

[    3.851928] cpuidle: initiated for CPU0.
[    3.857116] cpuidle: initiated for CPU1.
[    3.862579] Freeing init memory: 320K

===============================================================================


Application started
Press enter in 1 second to enter test tool...
1 second is up, starting normal init

[    4.883422] init: /init.rc: 865: ignored duplicate definition of service 'ril-daemon'
[    8.247894] av8100_hdmi av8100_hdmi.3: HDMI display probed
[    9.694915] init: Timed out waiting for /dev/.coldboot_done
[    9.839630] init: cannot find '/system/bin/logwrapper', disabling 'cspsa'
[    9.847137] init: cannot execve('/system/bin/logwrapper'): No such file or directory
[    9.855102] init: /system/bin/logwrapper terminated with status 127.
[    9.869934] init: cannot find '/system/xbin/watchdog-kicker', disabling 'watchdog-kicker'
[    9.887695] init: cannot find '/system/bin/ifconfig', disabling 'shrm-netdev'
[    9.894836] init: cannot find '/system/bin/sh', disabling 'modem'
[    9.907714] init: cannot find '/system/bin/modem-supervisor', disabling 'modem-supervisor'
[    9.916015] init: cannot find '/system/bin/copsdaemon', disabling 'copsd'
[    9.922851] init: cannot find '/system/bin/cn_server', disabling 'cn_server'
[    9.929931] init: cannot find '/system/bin/simd', disabling 'simd'
....

Any idea what’s wrong? Something to do with the way I call init_original, or the way I repacked the ramdisk.img, or something else?

Thanks!

  • 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-06-10T02:13:47+00:00Added an answer on June 10, 2026 at 2:13 am

    Ok I found the answer.

    I did it the other way around, the original init.c is edited to call myapp instead.

    In android’s /system/core/init:init.c, I call myapp after the line

    /* clear the umask */
    umask(0);
    // call program here
    

    If myapp is called before umask(0), the same errors shown aboe happen. I’ve no idea why it works this way though. If anyone can explain to me what umask(0) is doing (setting permissions or something like that I think) I will be grateful.

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

Sidebar

Related Questions

I know that Android doesn't have an Application-level onPause the way an Activity has
As for as I know that android application can be developed in core java
All we know that Android application is highely customizable with respect to support of
I know that you can check if an application is installed, and that Android
I know that Android has a JSON parser baked in but I was wondering
I know that a style can be inherited in android via the parent property
I want to know that how voice recognition in android works? Which library it
I wanted to know that how can we find how much time android device
I want to know that how to follow a page on Twitter using android
I know that eclipse can do this, can Intellij via the new Android support

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.