[Galaxy S III General] exscape:
First off, this is my very FIRST publically posted Android mod, and my second one ever - I made the first one earlier today. In other words, I'm new and may make mistakes. :)

These steps work for me, though!

Exactly what this guide does:

When you enable "Blocking mode" in the Samsung JB ROMs, an "ongoing" (and thus unremovable) notification is shown AT ALL TIMES, even if Blocking mode is only active for a certain time period (at night in my case).

This mod will entirely remove that notification. It will not show up even when blocking mode IS in fact blocking calls etc.

IMO the ideal behavior would be to show it during the time it's active, but that would be a much harder mod to make, as you'd need to add new (byte)code.

Now, with that out of the way...

Requirements:

* DEODEXED AND ROOTED Samsung Jelly Bean ROM (I use WanamLite XXDLIH v3.9, google it - I can't post the link)

* 7-zip (google it)

* Galaxy S III - not sure if other models than the i9300 will work, my guess is that they will. I can't test on other phones than my own, though, so you're on your own in that case! Also no idea if Note models will work, I've never used one.

* A Windows computer - unless the tools are available for other platforms.

* Java -- if you can do Start -> Run -> "java" -> OK without an error, you should be fine.

* A bit of patience

As always, this is on your own risk!

Steps to hack:

0) BACK UP YOUR PHONE! My suggestion would be to take a nandroid backup before getting started.

1) Get an apktool that works with JB APKs.

Here's the one I use (assemble the link): mediafire . com / ?ufzdylekbkloffy

(Sorry for doing that, but surely posting guides constitutes making helpful contributions? :))

The ZIP contains two apktool versions, one for decoding and one for building.

Thing is, I'm not 100% sure on where I got the apktool JARs. I think one of them is the unmodified 1.4.2 JAR, and one is modified to work with ICS (and newer) APKs.

I couldn't get EITHER of them to both decode AND build, so I made two separate batch scripts.

I do promise that the thing's safe, but if you don't trust me, you can find them elsewhere - I'm just not sure exactly where. I found them by trial and error.

2) Unpack the tools to a directory, e.g. "apktool" on your desktop. (If you want to follow this guide to the letter, you need to use that folder too.)

3) Start a command prompt - Start -> Run -> enter "cmd" -> click OK

4) Connect your phone via USB, and make sure USB debugging is enabled on it (under Settings -> Developer Options)

5) Enter the following commands, exactly as specified, in order of course:

cd Desktop\apktool
adb pull /system/framework/framework-res.apk
java -jar apktool-BUILD.jar if framework-res.apk
adb pull /system/app/SecSettings.apk
apktool-d SecSettings.apk SecSettings-mod

You should now have a "SecSettings-mod" directory (under Desktop\apktool) with the contents of the APK.

6) Browse to SecSettings-mod\smali\com\android\settings\dormantmode, right-click "DormantModeNotiReceiver.smali" and Open With... -> Notepad (or right-click and "Edit", if that choice exists)

7) Click the Edit menu -> Find..., and search for "notificationCreate" (no quotes). The first hit should be ".method public notificationCreate [... etc]"; click Find Next.

The next hit should be something like

invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationCreate(Landroid/content/Context;)V

8) Comment that line out by adding a # as the very first character, so you end up with

# invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationCreate(Landroid/content/Context;)V

9) A few lines down (10 or so), there's another invoke-virtual, for notificationClear. Comment this out as well, aagin by adding a # as the first character on the line.

When you're done, save and exit.

10) OK, we're getting there. Time to rebuild the modded APK.

Go back to the command prompt (or start a new one, see above).

Run this command:

apktool-b SecSettings-mod SecSettings-new.apk

This may take a LONG while, it takes a bit over 11 minutes for me (nearly all of it to build resources). Be patient! :)

When it's completed, open up both the ORIGINAL .apk and the modded one in separate 7-zip windows. Delete "AndroidManifest.xml" from the modified apk, then select and copy "META-INF" and "AndroidManifest.xml" from the original to the modified APK. Exit 7-zip.

11) Time to get the modded file over to your phone! Run these commands:

adb remount
adb push SecSettings-new.apk /system/app
adb shell

12) You should now have the file on your phone, and have an adb shell open. Almost there!

If you're not root (i.e. if the command line ends with $ rather than #), run "su".

Then:

cd /system/app
mv SecSettings.apk SecSettings.apk.OLD
mv SecSettings-new.apk SecSettings.apk

... and you're finally DONE, if all went well. :)

"exit" the adb shell, and reboot your phone. When it boots up, the notification should be gone, but blocking mode still works.

Let me know if you have problems, and we'll see if I'm qualified to help solve them. ;)

Before

After

(I would show that blocking mode is active, but the toggle was offscreen in the "before" shot, and I don't want to revert to snap a new one!)

I've also modded away the brightness bar + rearranged the quick-setting icons via this guide - the steps are essentially the same as this guide, except you edit SystemUI.apk and change different files (two XML files instead of the .smali).

To get rid of the brightness bar, follow that guide but also look in values/bools.xml where you can change a brightness value and auto-brightness-button to false. (Change both!)