$U_input = InputBox("Custom status bar label - broodROM RC5 -", "Enter your custom label here.")
If $U_input = "" Or $U_input = 1 Then Exit
FileDelete(@ScriptDir & "\tmp\SystemUI\*.*")
FileDelete(@ScriptDir & "\tmp\SystemUINew.apk")
FileDelete(@ScriptDir & "\tmp\SystemUINew\SystemUINew.zip")
FileDelete(@ScriptDir & "\tmp\SystemUINew\res\*.*")
FileDelete(@ScriptDir & "\tmp\SystemUINew\classes.dex")
FileDelete(@ScriptDir & "\tmp\SystemUINew\resources.arsc")
FileDelete(@ScriptDir & "\tmp\SystemUINew.zip")
TrayTip("Custom Status Bar Label", "Decompiling..", 0, 1)
RunWait(@ScriptDir & "\tmp\decompile.bat")
TrayTip("Custom Status Bar Label", "Adjusting Resources..", 0, 1)
FileDelete(@ScriptDir & "\tmp\SystemUI\res\values\strings.xml")
$read = FileRead(@ScriptDir & "\tmp\stringstem.xml")
FileWrite(@ScriptDir & "\tmp\SystemUI\res\values\strings.xml", $read & @CR)
FileWriteLine(@ScriptDir & "\tmp\SystemUI\res\values\strings.xml", @TAB & "<string name=" & Chr(34) & "broodrom" & Chr(34) & ">" & $U_input & "</string>")
FileWriteLine(@ScriptDir & "\tmp\SystemUI\res\values\strings.xml", "</resources>")
TrayTip("Custom Status Bar Label", "Compiling Resources..", 0, 1)
RunWait(@ScriptDir & "\tmp\compile.bat")
FileMove(@ScriptDir & "\tmp\SystemUINew.apk", @ScriptDir & "\tmp\SystemUINew\SystemUINew.zip", 1)
RunWait(@ScriptDir & "\tmp\SystemUINew\extract.bat")
FileDelete(@ScriptDir & "\tmp\SystemUINew\AndroidManifest.xml")
FileCopy(@ScriptDir & "\tmp\SystemUI.apk", @ScriptDir & "\tmp\SystemUINew\SystemUI.zip")
RunWait(@ScriptDir & "\tmp\SystemUINew\addfiles.bat")
Sleep(500)
FileMove(@ScriptDir & "\tmp\SystemUINew\SystemUI.zip", @ScriptDir & "\complete\SystemUI.apk", 1)
Sleep(500)
If FileExists(@ScriptDir & "\complete\SystemUI.apk") Then
#region --- CodeWizard generated code Start ---
;MsgBox features: Title=Yes, Text=Yes, Buttons=OK and Cancel, Icon=Info
If Not IsDeclared("iMsgBoxAnswer") Then Local $iMsgBoxAnswer
$iMsgBoxAnswer = MsgBox(65, "Custom Status Bar Label", "SystemUI.apk has been successfully compiled, do you want to push the file to your device right now? (Make sure you have your phone connected in debugging mode)")
Select
Case $iMsgBoxAnswer = 1 ;OK
Run(@ScriptDir & "\complete\push.bat")
Case $iMsgBoxAnswer = 2 ;Cancel
MsgBox(0, "Custom Status Bar Label", "You can find SystemUI.apk in " & @ScriptDir & "\complete\")
EndSelect
#endregion --- CodeWizard generated code Start ---
Else
MsgBox(0, "Custom Status Bar Label", "Something has gone wrong, please try again!")
EndIf
FileDelete(@ScriptDir & "\tmp\SystemUI\*.*")
FileDelete(@ScriptDir & "\tmp\SystemUINew.apk")
FileDelete(@ScriptDir & "\tmp\SystemUINew\SystemUINew.zip")
FileDelete(@ScriptDir & "\tmp\SystemUINew\res\*.*")
FileDelete(@ScriptDir & "\tmp\SystemUINew\classes.dex")
FileDelete(@ScriptDir & "\tmp\SystemUINew\resources.arsc")
FileDelete(@ScriptDir & "\tmp\SystemUINew.zip")