Deleted SystemUI.apk, usb debugging is off with no way to turn it on. Please, help.

Amhyden

Member
Jun 4, 2017
19
1
0
First of all, I don't know if I'm posting this in the right place, so sorry if I'm bothering anyone by doing it. I also apologize for the following wall of text:

Now, My device is an HTC One m8 with stock android 6.0 and sense 7.0 firmware

It's rooted, bootloader unlocked, s-off with TWRP installed

However, it has usb debugging OFF!

I was restoring a backup from the SystemUI.apk from Titanium Backup and it got stuck restoring it for around an hour, so I decided to restart the phone, now, all I'm getting is a black screen with the message "System UI has stopped unexpectedly." and two options: Send report to HTC and Don't send. Whenever I click any of these options, the message disappears and reappears an instant after.

I'd like to know if there's a way to fix this issue, or if there's a way to enable USB debugging via TWRP in order to be able to install(?) the SystemUI.apk again (Which I don't have but keep searching for)

The last option would be to flash the stock rom again, but as far as I can tell, I need the USB debugging to be ON, which is kind of a bummer.

I really, REALLY need some help, I've looked everywhere but can't seem to find a solution for this

Thanks in advance!

TL;DR: Phone stuck in black screen with "System UI has stopped" and USB debugging turned OFF. Help?
 

RealWelder

Senior Member
Sep 17, 2014
692
291
93
Muncie, IN
First of all, I don't know if I'm posting this in the right place, so sorry if I'm bothering anyone by doing it. I also apologize for the following wall of text:

Now, My device is an HTC One m8 with stock android 6.0 and sense 7.0 firmware

It's rooted, bootloader unlocked, s-off with TWRP installed

However, it has usb debugging OFF!

I was restoring a backup from the SystemUI.apk from Titanium Backup and it got stuck restoring it for around an hour, so I decided to restart the phone, now, all I'm getting is a black screen with the message "System UI has stopped unexpectedly." and two options: Send report to HTC and Don't send. Whenever I click any of these options, the message disappears and reappears an instant after.

I'd like to know if there's a way to fix this issue, or if there's a way to enable USB debugging via TWRP in order to be able to install(?) the SystemUI.apk again (Which I don't have but keep searching for)

The last option would be to flash the stock rom again, but as far as I can tell, I need the USB debugging to be ON, which is kind of a bummer.

I really, REALLY need some help, I've looked everywhere but can't seem to find a solution for this

Thanks in advance!

TL;DR: Phone stuck in black screen with "System UI has stopped" and USB debugging turned OFF. Help?
Usually adb will work by default in twrp, you may have to hit mount first and check system if it is not already checked.

You can also use the file manager in twrps advanced menu to copy the SystemUI back into place and chmod it to 0644.

Sent from my XT1609 using Tapatalk
 

Amhyden

Member
Jun 4, 2017
19
1
0
Usually adb will work by default in twrp, you may have to hit mount first and check system if it is not already checked.

You can also use the file manager in twrps advanced menu to copy the SystemUI back into place and chmod it to 0644.

Sent from my XT1609 using Tapatalk
lright, so I go to TWRP, mount system so I can copy the file to my phone? I tried that, but perhaps I didn't do it the right way. What do you mean by "chmod it to 0644"? Sorry, I'm kind of a noob in this whole android experience

And by the way, Do I need to rename the "SystemUI.apk" file to .zip for it to be recognized by TWRP?
 

RealWelder

Senior Member
Sep 17, 2014
692
291
93
Muncie, IN
lright, so I go to TWRP, mount system so I can copy the file to my phone? I tried that, but perhaps I didn't do it the right way. What do you mean by "chmod it to 0644"? Sorry, I'm kind of a noob in this whole android experience

And by the way, Do I need to rename the "SystemUI.apk" file to .zip for it to be recognized by TWRP?
In the file manager in twrp it will recognize it as an apk so no need to rename it. Just copy it to /system/priv-app/ if on 4.4 or /system/priv-app/SystemUI/ if on 5.0+. Then chmod is to change the permissions of the apk. 0644 is rw-r--r--. You can do this with twrps file manager also...after you copy the apk into place.

Sent from my XT1609 using Tapatalk
 

Amhyden

Member
Jun 4, 2017
19
1
0
In the file manager in twrp it will recognize it as an apk so no need to rename it. Just copy it to /system/priv-app/ if on 4.4 or /system/priv-app/SystemUI/ if on 5.0+. Then chmod is to change the permissions of the apk. 0644 is rw-r--r--. You can do this with twrps file manager also...after you copy the apk into place.

Sent from my XT1609 using Tapatalk
You're right it was recognized by TWRP, but I just can't find the /System/priv-app directory. The only folder inside /System is a folder named "bin", is this the right place or am I doing something wrong?
 

RealWelder

Senior Member
Sep 17, 2014
692
291
93
Muncie, IN
You're right it was recognized by TWRP, but I just can't find the /System/priv-app directory. The only folder inside /System is a folder named "bin", is this the right place or am I doing something wrong?
That means the system is not mounted. Go back to home in twrp, press mount, then check system. Then try again.

Sent from my XT1609 using Tapatalk
 

Amhyden

Member
Jun 4, 2017
19
1
0
That means the system is not mounted. Go back to home in twrp, press mount, then check system. Then try again.

Sent from my XT1609 using Tapatalk
Everything makes sense now, I checked it, copied the apk, changed the ch to 0644 and now I'm rebooting. Let's hope it works!
 

RealWelder

Senior Member
Sep 17, 2014
692
291
93
Muncie, IN
Also, make sure mount read only is not chrcked.


Sent from my XT1609 using Tapatalk

---------- Post added at 06:34 AM ---------- Previous post was at 06:33 AM ----------

Everything makes sense now, I checked it, copied the apk, changed the ch to 0644 and now I'm rebooting. Let's hope it works!
It should. Good luck. If it does, make a fresh backup in TWRP so you can always restore if you have problems in the future.

Sent from my XT1609 using Tapatalk
 

Amhyden

Member
Jun 4, 2017
19
1
0
Everything makes sense now, I checked it, copied the apk, changed the ch to 0644 and now I'm rebooting. Let's hope it works!
Alright so apparently I can now see my apps, but the SystemUI has stopped message is still there reappearing everytime i select an option, and there are no navigation buttons present, I'll try enabling usb debugging and restoring the backup from Titanium Backup to see if it solves the issue
 

RealWelder

Senior Member
Sep 17, 2014
692
291
93
Muncie, IN
Alright so apparently I can now see my apps, but the SystemUI has stopped message is still there reappearing everytime i select an option, and there are no navigation buttons present, I'll try enabling usb debugging and restoring the backup from Titanium Backup to see if it solves the issue
Ok. You may also try clearing cache and dalvik cache in TWRP also...in case there were some residual files left over from the previous version.

Sent from my XT1609 using Tapatalk
 

Amhyden

Member
Jun 4, 2017
19
1
0
Ok. You may also try clearing cache and dalvik cache in TWRP also...in case there were some residual files left over from the previous version.

Sent from my XT1609 using Tapatalk
Will do once I get it working, right now I went to TitaniumBackup and tried to restore my sysui backup, the app installation window came up asking me if i wanted to update my SystemUi app and I accepted, but after a couple of seconds it said "App not installed" i tapped "done" and titaniumbackup is now "Restoring App+Data" which is what it got stuck in the last time I tried... Should I wait a while longer and see what happens or did something go wrong?
 

RealWelder

Senior Member
Sep 17, 2014
692
291
93
Muncie, IN
Will do once I get it working, right now I went to TitaniumBackup and tried to restore my sysui backup, the app installation window came up asking me if i wanted to update my SystemUi app and I accepted, but after a couple of seconds it said "App not installed" i tapped "done" and titaniumbackup is now "Restoring App+Data" which is what it got stuck in the last time I tried... Should I wait a while longer and see what happens or did something go wrong?
Not too sure...I haven't used TitaniumBackup in years. What device and os are we working on?

Sent from my XT1609 using Tapatalk
 

Amhyden

Member
Jun 4, 2017
19
1
0
Not too sure...I haven't used TitaniumBackup in years. What device and os are we working on?

Sent from my XT1609 using Tapatalk
International HTC One M8 with android 6.0, titaniumbackup is still doing the restoration thing :S

I lost my navigation and status bar after messing around with Softkeyz, I swear to God I won't use that thing again :(
 

RealWelder

Senior Member
Sep 17, 2014
692
291
93
Muncie, IN
International HTC One M8 with android 6.0, titaniumbackup is still doing the restoration thing :S

I lost my navigation and status bar after messing around with Softkeyz, I swear to God I won't use that thing again :(
Well, the good thing is you have a phone with firmware and fastboot readily available. If it comes down to it you can always get it back to stock. Hopefully it will work for you though, so you don't have to go through the trouble.

Sent from my XT1609 using Tapatalk
 

Amhyden

Member
Jun 4, 2017
19
1
0
Well, the good thing is you have a phone with firmware and fastboot readily available. If it comes down to it you can always get it back to stock. Hopefully it will work for you though, so you don't have to go through the trouble.

Sent from my XT1609 using Tapatalk
Going back to stock would be the last option... but still, Do you happen to know If I can just use the RUU provided by HTC to just re-flash the stock firmware? Or do I need something else?

(Still stuck restoring)
 

RealWelder

Senior Member
Sep 17, 2014
692
291
93
Muncie, IN
Going back to stock would be the last option... but still, Do you happen to know If I can just use the RUU provided by HTC to just re-flash the stock firmware? Or do I need something else?

(Still stuck restoring)
The RUU should work. You have to be in fastboot usb mode when you run it on your pc.

Sent from my XT1609 using Tapatalk
 

Amhyden

Member
Jun 4, 2017
19
1
0
The RUU should work. You have to be in fastboot usb mode when you run it on your pc.

Sent from my XT1609 using Tapatalk
I tried using another SystemUI file I found but it didn't work... I guess I'm going to just reflash everything with the RUU then. I'm guessing I'll lose root, right?