• Introducing XDA Computing: Discussion zones for Hardware, Software, and more!    Check it out!

How to stop and start android to get access to frame-buffer

Search This thread

{ajk}

New member
Sep 24, 2012
3
5
You most likely need root access for this, and it's best to make two scripts.

This also needs to be done via ADB or some kind of script launcher that does not depend on Android to be running.

The idea for these is to allow full unencumbered access to the tablet/phone frame-buffer, so that you can do things like run Xorg directly on the hardware.

I have tested this on ALL my rooted devices via ADB, and it works! :D

:eek: PLEASE NOTE!

The second script will RESTART android even if it is running! Use with care!

I didn't take the time to write the code to check the property to see if android is already running!

Code:
file: /system/xbin/stopandroid
#!/system/bin/sh
setprop ctl.stop media
setprop ctl.stop zygote
sleep 1
setprop ctl.stop bootanim
sleep 1
setprop ctl.stop media
setprop ctl.stop zygote
sleep 1
setprop ctl.stop bootanim
exit 0

file: /system/xbin/restartandroid
#! /system/bin/sh
setprop ctl.stop media
setprop ctl.stop zygote
setprop ctl.stop bootanim
setprop ctl.start bootanim
setprop ctl.start zygote
setprop ctl.start media
exit 0
 
Last edited:

atc3030

Senior Member
Feb 9, 2009
161
132
THANK YOU!!!
But seriously, thank you. I have been working on a project and it has been a pain to do because I have not found an appropriate way to shutdown the android user interface. Thank you
 

Stolz

Senior Member
Apr 16, 2007
61
13
Hong Kong
I know this is an old thread but just in case someone find it usefull I drop this here: There are already two built-in commands for starting/stopping Zygote and all it's relatives:

Code:
stop

To restart all again

Code:
start

It's that easy :)

Besides being more simple, the only difference I see compared with your method is your method keeps surfaceflinger service running and the simpler method keeps mediaserver service running. But both can be handled by "setprop ctl.*" to suit your needs.

I hope it helps
 

Top Liked Posts

  • There are no posts matching your filters.
  • 5
    You most likely need root access for this, and it's best to make two scripts.

    This also needs to be done via ADB or some kind of script launcher that does not depend on Android to be running.

    The idea for these is to allow full unencumbered access to the tablet/phone frame-buffer, so that you can do things like run Xorg directly on the hardware.

    I have tested this on ALL my rooted devices via ADB, and it works! :D

    :eek: PLEASE NOTE!

    The second script will RESTART android even if it is running! Use with care!

    I didn't take the time to write the code to check the property to see if android is already running!

    Code:
    file: /system/xbin/stopandroid
    #!/system/bin/sh
    setprop ctl.stop media
    setprop ctl.stop zygote
    sleep 1
    setprop ctl.stop bootanim
    sleep 1
    setprop ctl.stop media
    setprop ctl.stop zygote
    sleep 1
    setprop ctl.stop bootanim
    exit 0
    
    file: /system/xbin/restartandroid
    #! /system/bin/sh
    setprop ctl.stop media
    setprop ctl.stop zygote
    setprop ctl.stop bootanim
    setprop ctl.start bootanim
    setprop ctl.start zygote
    setprop ctl.start media
    exit 0
    3
    I know this is an old thread but just in case someone find it usefull I drop this here: There are already two built-in commands for starting/stopping Zygote and all it's relatives:

    Code:
    stop

    To restart all again

    Code:
    start

    It's that easy :)

    Besides being more simple, the only difference I see compared with your method is your method keeps surfaceflinger service running and the simpler method keeps mediaserver service running. But both can be handled by "setprop ctl.*" to suit your needs.

    I hope it helps