I want to let Android OS to boot automatically when the charger connected (for HTC Magic) without pressing power button I found this guide:
Complete boot when charging
If your phone only gets one of those ugly battery symbols when a charger is connected to a powered off phone this is because the init process is interrupted by /system/bin/chargemon. That file is a binary ARM program, I replaced it with a simple script containing only a single line: echo skipping chargemon The file was created and installed with the following steps:
echo "echo skipping chargemon" > chargemon.script adb pull /system/bin/chargemon chargemon.backup adb push chargemon.script /sqlite_stmt_journals adb shell $ cd /sqlite_stmt_journals $ su # mount -o remount,rw /dev/block/mtdblock0 /system # cat chargemon.script > /system/bin/chargemon # chmod 755 /system/bin/chargemon # reboot -p
When the command su is given above, it might have to be acknowledged in a dialog on the phone screen. The final command reboot -p shuts down the phone. As the USB cable is still connected it will power on again, and if everything has gone fine the phone will complete its boot process without halting with any battery symbol.
But I can't find "chargemon" in System/bin