[APP] Easy Replace and/or Restart SystemUI.apk Utility - By Serajr - v2, 20/04/13

RavinduSha

Senior Member
Dec 30, 2012
448
338
93
Kurunegala, Sri Lanka
You´re right bro!!
But in this case, system can´t run properly without status bar service, so immediatly after we kill its pid, system attempts to start it with major priority, see logcat:



First two lines are proccess killed by RestartSystemUI.apk, others ones (red) are the system trying to restart it by itself, all in the same second. So if the SystemUI is delaying to restart, probably the system is with a high load of background data to process just before!! ;)
Thanks bro for the logcat and explanation :)
So that means nothing will change even if we try to start it or not. And we have to wait.
 
  • Like
Reactions: Publiuss and serajr

bsanghani

Member
Nov 24, 2005
16
3
0
it worked for me, but can you please add some delay between it replacing and restarting the phone. I think I saw some message but could not read it. However as I said it worked and I can see the changes which I made to the systemui.apk on the phone now.


Thanks
Bhavin
 

TopperBG

Senior Member
Oct 17, 2012
1,343
477
113
Bulgaria
it worked for me, but can you please add some delay between it replacing and restarting the phone. I think I saw some message but could not read it. However as I said it worked and I can see the changes which I made to the systemui.apk on the phone now.


Thanks
Bhavin
The app not restart the phone, just kill the SystemUI process and OS restarted it again (because it's system process) ?
 
  • Like
Reactions: serajr

agentdr8

Senior Member
Mar 4, 2007
3,639
1,877
253
Cowtown, CA
@serajr

Would you be willing to share your java code to restart SystemUI? I've been trying to add a restart to my xposed mod and it causes SystemUI to crash in a loop, requiring a reboot. Are you using am startservice -n com.android.systemui/.SystemUIService or just a pkill of the pid?

Your app works fine though to restart SystemUI.
 

TopperBG

Senior Member
Oct 17, 2012
1,343
477
113
Bulgaria
@serajr

Would you be willing to share your java code to restart SystemUI? I've been trying to add a restart to my xposed mod and it causes SystemUI to crash in a loop, requiring a reboot. Are you using am startservice -n com.android.systemui/.SystemUIService or just a pkill of the pid?

Your app works fine though to restart SystemUI.
I thought just kill it, because it system process OS restart it again
 

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,011
18,603
263
São Paulo - SP
@serajr

Would you be willing to share your java code to restart SystemUI? I've been trying to add a restart to my xposed mod and it causes SystemUI to crash in a loop, requiring a reboot. Are you using am startservice -n com.android.systemui/.SystemUIService or just a pkill of the pid?

Your app works fine though to restart SystemUI.
Ok bro... no problem!!
Here we go:

PHP:
	private void killPackage(String packageToKill) {
			
		Process su = null;
		
		// get superuser
		try {
			
			su = Runtime.getRuntime().exec("su");
		    
		} catch (IOException e) {
			
		    e.printStackTrace();
		    
		}
		
		// kill given package
		if (su != null ){
			
			try {
				
	            DataOutputStream os = new DataOutputStream(su.getOutputStream()); 
	            os.writeBytes("pkill " + packageToKill + "\n");
	            os.flush();
	            os.writeBytes("exit\n");
	            os.flush();
	            su.waitFor();
	            
	        } catch (IOException e) {
	        	
	            e.printStackTrace();
	            
	        } catch (InterruptedException e) {
	        	
	        	e.printStackTrace();
	            
	        }
		}
    }
So just call it this way:

PHP:
    killPackage("com.android.systemui");


I thought just kill it, because it system process OS restart it again
You´re right bro... Thanks for support!!!!
.
 

devilmaycry2020

Senior Member
Apr 27, 2013
1,373
244
0
hi

didn't work on xperia TX. systemUI.apk file didn't replace.

could you tell me how to add an option restart systemUI to power menu like someone add reboot and recovery?
thanks
 
Last edited:

roofrider

Senior Member
Jul 24, 2011
7,055
905
0
Bangalore, IN
A feature that triggers the notification ticker will be useful, this app kinda didn't fix my issue. :(
I'm playing with statusbar transparency and center clock, there is a black bg image that is used as a background to the ticker (so the notification doesn't overlap the centered clock), but this bg appears and stays on the statusbar every time the statusbar is restarted. Only way to get rid of this is to trigger a notification, that is, a ticker text, like receive a text message notification on the statusbar or something and the statusbar will then be transparent and back to normal again.
Iirc this was made possible by an app called Notification Restart, but it's does not seem to be compatible with CM10 as it does nothing.

OP?

Sry for this blunt explanation i'll post a screenshot tomorrow if needed.
 
Last edited:

serajr

Recognized Developer / Recognized Themer
Apr 21, 2011
5,011
18,603
263
São Paulo - SP
hi

didn't work on xperia TX. systemUI.apk file didn't replace.

could you tell me how to add an option restart systemUI to power menu like someone add reboot and recovery?
thanks
Please screenshot this app
@serajr bro u r legendary ;)
Thanks... ;)

I´m working on a new version that will check for proper system partition type to remont it as r/w, so you´ll be able to replace SystemUI.apk on any platform. Soon...