[GUIDE] Remove Blocking Mode notification (root/deodexed Samsung ROM required) - Galaxy S III General

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:
Code:
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
Code:
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
Code:
# 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:
Code:
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:
Code:
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:
Code:
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!)

Great work, Does anyvbody have this as a flashable zip??

carrd said:
Great work, Does anyvbody have this as a flashable zip??
Click to expand...
Click to collapse
Hmm, I'm not sure whether simply using the finished SecSettings.apk is a good idea or not. If a ROM has changed it, those changes would be lost.
The alternative might be to have all this done by a script on the phone (in CWM), but I'm not sure whether that's possible or not. Anyone?

exscape said:
Hmm, I'm not sure whether simply using the finished SecSettings.apk is a good idea or not. If a ROM has changed it, those changes would be lost.
The alternative might be to have all this done by a script on the phone (in CWM), but I'm not sure whether that's possible or not. Anyone?
Click to expand...
Click to collapse
Here's a CW Zip. I've built this based on the XXDLIH build one.
The script will backup the original file to /system/app/SecSettings.apk.orig so worse case scenario you just need to rename it using a root explorer (any will do).
Let me know, however like anything you flash with CWM, make a backup FIRST and I'm not to be held responsible for your phone becoming Self Aware or owt.
Also, The guide at the top is basically right, however there's a lot of steps missing, I'll knock something up if anyone wants it to fill in the gaps (setting up the environment for a start etc).
However this 'should' work on all XXDLIH builds (but AFAICT should work on XXDLIB as well)
Here's the link to the file https://www.dropbox.com/s/kov1bdluu0pt8x8/Blocking_Mode_Icon_Remover.zip

i've intalled you mod by cwm in wannamlite 3.9 and every thing went like a charme. i have a few mods intalled and nothing was deleted. thanks a lote really nice job.
Sent from my GT-I9300 using Tapatalk 2

mocas said:
i've intalled you mod by cwm in wannamlite 3.9 and every thing went like a charme. i have a few mods intalled and nothing was deleted. thanks a lote really nice job.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
No probs, anything to help.
Thanks to exscape for the source.

the_ape said:
Also, The guide at the top is basically right, however there's a lot of steps missing, I'll knock something up if anyone wants it to fill in the gaps (setting up the environment for a start etc).
Click to expand...
Click to collapse
Hmm, which environment? All the files (adb, apktool + their dependencies) should be included.
Anyway, thanks for the zip

exscape said:
Hmm, which environment? All the files (adb, apktool + their dependencies) should be included.
Anyway, thanks for the zip
Click to expand...
Click to collapse
You need to pull the various frameworks from the device, and put them in the right place. This is all documented elsewhere on the site, but for quickness sake, here's a down and dirty.
Download the 7Z Below (latest versions of aapt etc from http://forum.xda-developers.com/showthread.php?t=1792937), unpack them somewhere. Make sure Jave JRE is installed.
To pull from device, plug the Phone in then
Goto unpack folder
Let's get the frameworks from the device, so plugin the device, and ADB Devices and make sure you get a deviceID back.
pull_framework.bat
pull_twframework.bat
Now get the frameworks installed
set_framework-res.bat
set_twframework.res.bat
Let's get the APK we want to work with, so....
adb pull /system/app/SecSettings.apk .\apk\SecSettings.apk
OK, file in the right place, so let's get it unpacked to work with.
apktool d apk\SecSettings.apk working\SecSettings
That will take a few minutes, as it's got to sort out the framework dependencies etc, so give it a second or two. It should then look a little like the following
I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\YourUserName\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
Now lets edit the smali for the fix (thanks to exscape for this, so click his thanks button)
notepad .\working\SecSettings\smali\com\android\settings\dormantmode\DormantModeNotiReceiver.smali
<CTRL>-F notificationCreate
Find Next one
change invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationCreate(Landroid/content/ContextV
to
#invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationCreate(Landroid/content/ContextV
and a bit further down
change invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationClear(Landroid/content/ContextV
to
#invoke-virtual {p0, p1}, Lcom/android/settings/dormantmode/DormantModeNotiReceiver;->notificationClear(Landroid/content/ContextV
OK, edit done, save and back to the command prompt
start .\apk
Open the APK in 7-Zip/WinRar/Whatnot
Select the AndroidManifest.xml and the META-INF folder, and extract them to the working folder
We have all our bits, so let's put it back together in a usable APK
First we need to create an unsigned build (without the real manifest and META-INF)
apktool b working\SecSettings built\SecSettings-Unsigned.apk
This will take a while to run, as it's compiling everything it needs, should look a bit like this
: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
Right, now we need a signed version, so copy the manifest XML and META-INF folders to \build\apk in the SecSettings folder.
move .\working\AndroidManifest.xml .\working\SecSettings\build\apk
move .\working\META-INF .\working\SecSettings\build\apk
Let's now compile the nice signed version, this will take moments, as it's just integrating the Manifest with the already compiled stuff.
apktool b working\SecSettings built\SecSettings.apk
And there we are, job done.
Copy to device in any way that you want, easiest is probably
adb push .\built\SecSettings.apk /system/app/SecSettings.apk
Remember that will overwrite the original (but you have a backup in the APK folder remember), just launch settings now on the device and you should be good to go.
Having said that, easier just to flash the zip

Ohh, I forgot the framework step. Sorry about that. I changed step #5 to include it now.
That's all I've done as far as frameworks go, and I've both used the guide myself (before I wrote it ) and tried it once after... So it should work now.

exscape said:
Ohh, I forgot the framework step. Sorry about that. I changed step #5 to include it now.
That's all I've done as far as frameworks go, and I've both used the guide myself (before I wrote it ) and tried it once after... So it should work now.
Click to expand...
Click to collapse
You will deffo need the TW Framework as well, else it wont be able to decompile. If you want to make sure, try
rd /s %userprofile%\apktool
Then try the process you have out, and you should get issues as the twframework is not available

the_ape said:
You will deffo need the TW Framework as well, else it wont be able to decompile.
Click to expand...
Click to collapse
I just deleted the entire \Users\x\apktool folder, re-added framework-res and decompiled the SecSettings APK with no errors. I'm sure I've never used the 'apktool if' command with anything else prior, too. Hmm.

mocas said:
i've intalled you mod by cwm in wannamlite 3.9 and every thing went like a charme. i have a few mods intalled and nothing was deleted. thanks a lote really nice job.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
exscape said:
I just deleted the entire \Users\x\apktool folder, re-added framework-res and decompiled the SecSettings APK with no errors. I'm sure I've never used the 'apktool if' command with anything else prior, too. Hmm.
Click to expand...
Click to collapse
Cool, just making sure, if it works then cracking.
However setting up the fw's that way is the 'correct way' to do them.

hi again, is it possible for u to make a flashable zip with remove blocking mode and smart rotation?
when i install smart rotation i lose blocking mode and vice versa. thanks a lote.
Sent from my GT-I9300 using Tapatalk 2

mocas said:
hi again, is it possible for u to make a flashable zip with remove blocking mode and smart rotation?
when i install smart rotation i lose blocking mode and vice versa. thanks a lote.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
I can certainly have a look, can you post a link to the rotation hack your using please?

Sorted, I'll compile and upload shortly, not a problem.

here is the link, thanks a lot again.
http://forum.xda-developers.com/showthread.php?t=1933519
Sent from my GT-I9300 using Tapatalk 2

mocas said:
here is the link, thanks a lot again.
http://forum.xda-developers.com/showthread.php?t=1933519
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Here we go, https://www.dropbox.com/s/mtycq38lfw3sl4z/Blocking_Mode_Icon_Remover_With_Smart_Rotate-DLIH.zip
Should work just fine, works Fine on mine anyhow.
Let me know if there's issue, and click thanks if you appreciate

thanks a lot, no issues what so ever... every thing went just fine.
Sent from my GT-I9300 using Tapatalk 2

mocas said:
thanks a lot, no issues what so ever... every thing went just fine.
Sent from my GT-I9300 using Tapatalk 2
Click to expand...
Click to collapse
Most welcome

Would this excellent mod work on a Note II, by any chance?

Related

[TOOL/KITCHEN] - Android Builder v.5 (Dead)

This project is no longer being updated. Feel free to use the code.
Android Builder (AB v.5)
kiel123 has joined the AB team!
Thanks to dsixda, Armin Coralic, and cteneyck. I do have permission to reuse their code.
Requirements:
Ubuntu Linux or variant
dsixda's HTC Android Basic Kitchen - http://forum.xda-developers.com/showthread.php?t=633246
In my crazy quest to learn more about Android, I decided to create a companion to dsixda's kitchen that will take some of the drudgery out of downloading and compiling AOSP and the HTC kernel.
Here's what the current menus looks like:
Code:
Select the device that you would like to build for.
1) HTC Droid Eris
a) About Builder
0. Exit
Please enter option number:
and then
Code:
1. Sync AOSP - Cupcake (1.5) repo
2. Sync AOSP - Donut (1.6) repo
3. Sync AOSP - Eclair (2.1) repo
4. Sync AOSP - Froyo (2.2) repo
0. Exit
Please enter option number:
You can follow these two steps, and you will get a freshly compiled, but unsigned ROM in the original_update folder. After running it through the kitchen, it boots up just fine. Of course, most of the hardware doesn't work. That's the part that I am working on now (seriously, I am). I've been working on this for a while, because as I said - this is really about me learning. If I can make a tool that someone finds useful, then great!
Install instructions:
1) download and unzip dsixda's kitchen to whatever directory you want
2) download Android Builder into kitchen's scripts/plugins folder and unzip
3) back out and start the kitchen
4) select 'Run plugin scripts' from Advanced menu and select 'Android Builder'
5) you're there!
NOTE: This will try to install/update all of the packages that it needs, including Java5. Please look at the code so that you know what it's doing. That's just a good general practice with any code that you can actually look at and that you have to run as root...
Future plans:
1) add more kernels (devices)
2) add more vendor trees (goes along with devices)
3) add more repos (CM5, CM6, AOSP Master)
I hope someone finds this useful, and feel free to post useful suggestions/bug reports.
DOWNLOAD - (https://github.com/gnarlyc/android_builder)
CHANGELOG -
v5. - kiel123 re-wrote v.4 as a plugin to dsixda's kitchen with me testing afterward, minor fixes, removed Java6 as no longer needed by kitchen
v.4 - re-wrote to add structure to support more devices in the future
added option for Cupcake, Donut, and Froyo
added .config files that enable touchscreen in kernel by default
v.3 - unreleased build
v.2 - corrected misspellings in code and dialogs
added sudo to launch setup script (Still need to sudo bash first. Sorry.)
v.1 - initial release
Very nice. I have been doing the same. I have used darchstar's post here as the basis of my work. But, I am always glad to look how others are doing things. Thanks for the post.
arockj said:
Very nice. I have been doing the same. I have used darchstar's post here as the basis of my work. But, I am always glad to look how others are doing things. Thanks for the post.
Click to expand...
Click to collapse
Thanks for the thanks! I don't quite get the vendor tree thing, but I just need to look at it again a few times. And, that's where I'm at. It would be really neat to be able create a working AOSP ROM from scratch with minimal manual intervention. It might not be possible, but I haven't found that out yet. (But wait! If you can do it manually, it can be scripted. Right?)
there's typo in your install script
look for line: android_builder*
should be android-builder*
and your install script should use mv command instead of cp to avoid files duplication
EDIT: also you should use sudo command along with ./ab_setup script or include within script as well.
When i ran ./abmenu and i get this message
Code:
Please copy 'menu-kd' to the root of your kitchen folder with 'menu'
menu-kd?.... don't you mean abmenu? turned out it was looking for menu file which i had it renamed to kitchen_menu but I fixed that on my part and all is working well.
Dont let any of my criticism scare you away, I can see there's a lot of potential use for this scripts, great start by the way.
firestrife23 said:
there's typo in your install script
look for line: android_builder*
should be android-builder*
and your install script should use mv command instead of cp to avoid files duplication
EDIT: also you should use sudo command along with ./ab_setup script or include within script as well.
When i ran ./abmenu and i get this message
Code:
Please copy 'menu-kd' to the root of your kitchen folder with 'menu'
menu-kd?.... don't you mean abmenu? turned out it was looking for menu file which i had it renamed to kitchen_menu but I fixed that on my part and all is working well.
Dont let any of my criticism scare you away, I can see there's a lot of potential use for this scripts, great start by the way.
Click to expand...
Click to collapse
I renamed all of the scripts at the last minute and thought that I had them fixed. I'll make the corrections and repost. The goal is to get this thing working well. Your criticism is just more motivation. Thanks!
I'm new to all this but I would love this to work with Froyo source.
Geo411m said:
I'm new to all this but I would love this to work with Froyo source.
Click to expand...
Click to collapse
The current 'internal' build works with Cupcake (1.5), Eclair (2.1), and Froyo (2.2). It's not ready to release though. Give me another week or two. I'm working on proprietary bits now, so that you get a more usable ROM from the start.
Although from your sig, it appears that you don't have an Eris, so you probably don't care much about it's proprietary bits. If you want it to get Froyo instead of Eclair, you can just change 'eclair' to 'froyo' in the script that creates the repo.
I'm with you on Froyo. I have a feeling in a month or two very few people will want to run a pre-Froyo ROM. It's really nice.
rm error on install
i keep getting "rm: cannot remove './bkup': No such file or directory"
the file is there untill i run the ./install script then it disappears and shoots me an error any help would be appriciated
Sjflowerhorn said:
i keep getting "rm: cannot remove './bkup': No such file or directory"
the file is there untill i run the ./install script then it disappears and shoots me an error any help would be appriciated
Click to expand...
Click to collapse
That files was used by me while developing the code. It's not needed. I'll fix the install script for v.5, but if you really want to fix the script now... Just remove the line -
'rm ./bkup'
from the 'install' script
You should still be able to start Android Builder by typing './abmenu', as long as it's in the same folder with the kitchen's menu. The error shouldn't matter.
gnarlyc said:
That files was used by me while developing the code. It's not needed. I'll fix the install script for v.5, but if you really want to fix the script now... Just remove the line -
'rm ./bkup'
from the 'install' script
You should still be able to start Android Builder by typing './abmenu', as long as it's in the same folder with the kitchen's menu. The error shouldn't matter.
Click to expand...
Click to collapse
k thanks i think it worked the same even with the error but got it =)
Sjflowerhorn said:
k thanks i think it worked the same even with the error but got it =)
Click to expand...
Click to collapse
Good deal. Let me know how it goes.
gnarlyc --
Have you thought of making this into a .plugin file that can be placed in the scripts/plugins folder of the HTC Android Kitchen? Then that way you won't need to update your scripts each time I update my kitchen
In my thread I could provide a link to your tool, so that people can add that plugin if they want.
dsixda said:
gnarlyc --
Have you thought of making this into a .plugin file that can be placed in the scripts/plugins folder of the HTC Android Kitchen? Then that way you won't need to update your scripts each time I update my kitchen
In my thread I could provide a link to your tool, so that people can add that plugin if they want.
Click to expand...
Click to collapse
The thought has occurred to me.
Give me a bit. A link in your thread would be great. It might even motivate me to add more devices. Getting stuck on adding Eris proprietary bits has lead me down the road of making a ROM (http://forum.xda-developers.com/showthread.php?t=725447) and documenting the process. I'll get back to Android Builder soon though.
Ok, so...
TO-DO
-------
1) rewrite AB as a plugin to dsixda's HTC Android Kitchen
2) add proprietary bits for Eris
3) add more devices
4) add CM repos
5) add Gingerbread repo
6) add compatibility with more distros
i am getting line 28: update-java-alernatives: command not found?
lord194409 said:
i am getting line 28: update-java-alernatives: command not found?
Click to expand...
Click to collapse
Interesting... I've tested from a freshly installed Ubuntu installation several times. It should install everything you need.
You could try 'update-alternatives --config java' and let me know what it says. You could also look for a file called 'setup_ran' in the root of the Kitchen, and delete it. Start './abmenu' after that and try again.
thanks for answering. Could the problem be that i installed it on cygwin.
lord194409 said:
thanks for answering. Could the problem be that i installed it on cygwin.
Click to expand...
Click to collapse
Yes. Android Builder will not work under cygwin. I don't know that it ever will. That's on the TO-DO list, but it's so far down that it's not on the posted TO-DO list.
I've only tested under Xubuntu 10.04 and minimal Ubuntu 10.04.
If you happen to work it out on cygwin, let me know! I'm sure others would be happy to have the option. Heck, I might even be. I'm mainly using Ubuntu because of AB anyway. (Although, it is kind of growing on me.)
thanks i will look in to it.
Sent from my Eris using XDA App
just wanted to let you know that it didn't work for me. It runs, gives some errors and outputs a update.zip called AOSPbase but the file is only 1.1kb in size.
Geo411m said:
just wanted to let you know that it didn't work for me. It runs, gives some errors and outputs a update.zip called AOSPbase but the file is only 1.1kb in size.
Click to expand...
Click to collapse
make sure you have java5 and java6 jre/jdk installed. it should work then. i had a similar issue the first time through... took it literally 10hours plus, then output was the 1.1k AOSPBase.zip file.
manually installed all java components, and everything worked perfectly then (and took half the time)

Linux Deodex Kitchen

I'm baaaack
Andrizoid's Linux Deodex Kitchen V4
This has been an ongoing project for a while now.
Since all the other deodexers are windows .bat scripts, i decided to make one for those of us on Ubuntu/Mac/etc
Extract to your desktop and check the README file for full instructions and more information.
Changelog
V4
Fixed some of the code, added the optional make-rom.sh which adds the freshly de-odexed files to the original rom and signs it making it ready to flash.
V3
Everything is fully automated, and will deodex the whole rom rather than one file at a time. Smali and Baksmali version updated to 1.2.3
V2
Added setup.sh to make things easier.
V1
Original script.
Love me or hate me, its a great little setup. It can be used with any rom on any device.
Interesting
Sounds interesting. I'll have to play with it this weekend.
I hope the drama is settled down now... I get enough when my wife watches "real housewives"
theres a few issues, it only de-odexes apk WELL for now. for the framework files it gets kind tricky. ill work on it a bit when i get some time.
I've been looking over your source code, I notice few lines could use simple shortcuts, for example
Code:
/home/ken/deodex-kitchen
you can change that to
Code:
~/deodex-kitchen
~ will tell shell to use current user's home directory, just make it more universal for anyone to use. Just my 2 cents.
it even work with cd, cp, mv, mkdir commands, ~ is very handy, and save you from having to type in full path.
firestrife23 said:
I've been looking over your source code, I notice few lines could use simple shortcuts, for example
Code:
/home/ken/deodex-kitchen
you can change that to
Code:
~/deodex-kitchen
~ will tell shell to use current user's home directory, just make it more universal for anyone to use. Just my 2 cents.
it even work with cd, cp, mv, mkdir commands, ~ is very handy, and save you from having to type in full path.
Click to expand...
Click to collapse
ya, a lot of the code could be cleaned up but thats the very basic version. i put it together to help build my rom, i got it working enough to do that and kinda forgot about it. i need to clean it up and put out another verison
too many projects at once haha.
found few bugs with your make-rom.sh script, on last couples of lines starting with rm will fail, because you forgot to add cd to rom-output and your script also left framework-res.apk at root of rom-output folder which should be moved to /system/framework
in your readme file, you forgot to add a step to run setup.sh script before de-odexing apk/jar files.
firestrife23 said:
found few bugs with your make-rom.sh script, on last couples of lines starting with rm will fail, because you forgot to add cd to rom-output and your script also left framework-res.apk at root of rom-output folder which should be moved to /system/framework
in your readme file, you forgot to add a step to run setup.sh script before de-odexing apk/jar files.
Click to expand...
Click to collapse
ya when i used it i made some heavy modifications to it before i got a rom to boot. i need to update this thing but ive got a few other projects im the making.
not enough people seemed interested in this to make it my priority
Andrizoid said:
ya when i used it i made some heavy modifications to it before i got a rom to boot. i need to update this thing but ive got a few other projects im the making.
not enough people seemed interested in this to make it my priority
Click to expand...
Click to collapse
I use Ubuntu, and your script fit the bill and spare me from having to reboot into windoze to use their crappy batch files. Of course your hands is all tied up with other projects, however I'll be watching this tread once you get around to updating this. Just keep bring out the great stuff!
I like people like you that make contribute back to community such as this valuable tools, unlike other developers which pretty much rather keep it to themselves (I won't list their names here, and not trying to start a flame-war) as the rest of first time ROM cooker have to figure it out the hard way.
I've just been pointed to this thread while looking for a way to deodex
the link works still, but the file has been deleted by Rapidshare, "due to inactivity"
Any chance of it being uploaded again please?
lew247 said:
I've just been pointed to this thread while looking for a way to deodex
the link works still, but the file has been deleted by Rapidshare, "due to inactivity"
Any chance of it being uploaded again please?
Click to expand...
Click to collapse
why not just use dsixda's kitchen?
http://forum.xda-developers.com/showthread.php?t=633246
then you'll also have just about everything you need (not just a deodex-er)
plus, don't think you'll get any "support" on this anymore... whereas, with dsixda's kitchen, you'll have LOTS of support for quite a while
firestrife23 said:
I've been looking over your source code, I notice few lines could use simple shortcuts, for example
Code:
/home/ken/deodex-kitchen
you can change that to
Code:
~/deodex-kitchen
~ will tell shell to use current user's home directory, just make it more universal for anyone to use. Just my 2 cents.
it even work with cd, cp, mv, mkdir commands, ~ is very handy, and save you from having to type in full path.
Click to expand...
Click to collapse
Use $HOME instead of ~. ~ doesn't always refer to the home directory.
I can help you with the need to rename $path in the script before it will work are you interested?
Upload to mediafire please.
Trent said:
Upload to mediafire please.
Click to expand...
Click to collapse
Double that. Please do this, since Multiupload has been closed.

Full Charge Popup!? Please help

Can anyone put this in a cw flashable zip or have one already? I need to get rid of the stupid popup that tells me my battery is full. It wakes me up and it seems to keep my alarm clock from going off sometimes!?
1. decompile/de-odex services.jar/odex
2. open "com\android\server\status\StatusBarPolicy.smali" in a text editor
find ".method private showFullChargePopup()V" about line 2779
and remove the entire method all of it from ".method private showFullChargePopup()V"
to .end method
and delete this line at about line 3441
invoke-direct {p0}, Lcom/android/server/status/StatusBarPolicy;->showFullChargePopup()V
3. save, compile and re-odex as necessary
Click to expand...
Click to collapse
What ROM version and theme? The services.jar file changes between roms and themes.
Blackhole 3.0 DL09
Oh my god! If you could also do this for me, or just tell me how or something ( I have no idea what the dedeoxin' does or anything) I would be forever thankful! haha
I have DJ05 Superclean JT rom
Its just an simple apk you can get rid of via root explorer or titanium backup or whatever.
In titanium its called FullBatPopupApp 1.0, I have removed it with no ill effects. The name of the apk in /system/app/ is FullbatPopup.apk
Sent from my SCH-I500 using Tapatalk
1. You need to have java installed for this. You will also need smali/baksmali
2. Open command prompt or linux terminal with your phone plugged in. Also navigate to or create a directory to perform the work in.
3. Once in your working directory, run:
Code:
adb pull /system/framework/services.jar
3a. If your system isn't de-odexed, you may need to pull an odex file as well
4. Take the smali/baksmali files you downloaded earlier and put them in the same directory that your services.jar file is in.
5. Run the following (assumes windows command prompt):
Code:
java -jar baksmali-<version>.jar services.jar
5a. If your system is not deodexed, you will likely need to deodex the system/services.jar for this to work.
6. Open the file required for the edit and make the needed changes.
7. Run the following (again, assuming windows command prompt):
Code:
java -jar smali-<version>.jar out -o classes.dex
8. Replace the classes.dex file within services.jar with the new classes.dex file
9. Push the file to /system/framework with adb, then reboot:
Code:
adb push services.jar /system/framework/services.jar
adb reboot
9a. You may need to remount the /system partition as rw to push the file.
10. On restart, the phone will take longer to boot, but assuming the changes were made properly you should be good.
I left out some information for the "a" steps on purpose. If you cannot do these steps yourself, or find how to do them, you likely shouldn't be doing this on your own. As always, backup your phone/data before trying this, and I am not responsible for any lost data, non-booting phones, or bricked devices. If you are unsure of what you are doing, then don't do it.
n0yd said:
Its just an simple apk you can get rid of via root explorer or titanium backup or whatever.
In titanium its called FullBatPopupApp 1.0, I have removed it with no ill effects. The name of the apk in /system/app/ is FullbatPopup.apk
Sent from my SCH-I500 using Tapatalk
Click to expand...
Click to collapse
Removing that does nothing, already did it and I still get the popup.
Or just find the post with the hidden menu dialer codes and turn it off that way.........
Sent from my SCH-I500 using XDA App
Even the hidden dialer menu does not always work either. Plus I thought the hidden menu was not accessible in DJ05/DL09? Maybe this is with certain roms?
yea I hate that popup. Ive removed the apk also and still it keeps popping up. A fix would be greatly appreciated!!!
The dailer codes worked for me. Using Blackhole 3.0. Just make sure you include the Hidden Menu when building your rom.
Sent from my SCH-I500 using XDA App
imnuts said:
Removing that does nothing, already did it and I still get the popup.
Click to expand...
Click to collapse
Weird, I never noticed. Thanks for letting me know
Sent from my SCH-I500 using Tapatalk
+1 on getting rid of this stupid pop up.
Man I hate that thing.
I posted instructions on how to do it. I'm not going to do the mod for everyone, so do it on your own, or ask the rom builder to include the change in the rom. There are to many roms and themes out there to try and accomplish this for every possible combination.
Hidden menu method would not work for me on dj05.
Changed it to disabled and it still pops up
I just went in with root explorer and mounted system/app as RW, renamed FullBattPopup.apk to FullBattPopup.apk.OLD and it did not get recreated after a reboot. I guess I'll have to wait till a full charge to see if it comes back.
I just used Titanium Backup to freeze FullBatPopupApp.
Will report back after I change my phone....
Sent from my Samsung Fascinate
Pfredd said:
I just used Titanium Backup to freeze FullBatPopupApp.
Will report back after I change my phone....
Sent from my Samsung Fascinate
Click to expand...
Click to collapse
As I figured, freezing didn't remove the popup.
I went ahead and edited the services file, as specified earlier in this post. I followed the procedure provided by imnuts and did the edits as specified in the post by Nimhlan.
It appears to work like a charm. No more Full battery popups!
I would post my edited file, but I suspect it is dependent on what kernel/ROM you are running....
Do you download the smali 1.26.jar & baksmali 1.26 jar or just the baksmali & smali file in the link provided.
ellisz said:
Do you download the smali 1.26.jar & baksmali 1.26 jar or just the baksmali & smali file in the link provided.
Click to expand...
Click to collapse
You need the *.jar files. However, I tried making the edit and I still get the popup.

[TOOL][WIN]DroidShell - Windows Shell Integration for Android Development[02/02/16]

Greetings, and welcome to the home of a little set of utilities I'm calling "DroidShell".
What it is:
DroidShell is my attempt at bridging the gap between the various android utilities used for ROM modification and the Windows explorer system. It is a series of scripts that are automatically associated with .apk, .jar, and .iso files so that they are automatically decompiled on double-click or enter. Additionally, when a file is decompiled, a corresponding .dcp, dcf, or dci (decompiled package, decompiled framework, decompiled image) file is created, which allows for automatic recompiling, as well as optional cleanup, or resigning.
The goal of this project is pretty simple...to have all the tools needed for ROM work in one place, and have them easily accessible without having to have eighty command windows open or to have to go through a chain of commands to create a usable apk/jarfile.
Features:
One-shot setup. Extract the files, run install/installer.bat, and all of the necessary file associations and paths are created.
Batch terminal integration - provides integration for adb, fastboot, apktool, 7zip, zipalign, oat2dex, unpackbootimg, repackbootimg, baksmali and smali in windows command-line interface from path.
Automagic association with common android filetypes for decompilation.
Custom placeholder files - dcp, dcf, and dci - for packages, framework, and image files. Allows for automatic recompiling, and optional signing and cleanup of decompiled files.
Recompiled apks and jars are automatically repacked with modified files while excluding androidmanifest.xml, meaning signatures are unaffected.
For modifications requiring androidmanifest be changed, you can right-click a .dcp file to recompile with signature.
Auto-detection of framework-res file with prompting to install.
Popup dialogue boxes for errors and alerts.
(NEW) Right-click to decompile to java code. This cannot be recompiled, but is great for researching more complex mods. (Can also be invoked by using the command dj filename.apk)
(NEW) Support for sparse image system -> .img conversion.
(NEW) za command for zipaligning apk's.
(NEW)
Download:
https://github.com/d8ahazard/DroidShell/archive/master.zip
Source:
https://github.com/d8ahazard/DroidShell
Instructions...
You need the Java Runtime Environment (RE). Get it here.
Extract to a folder somewhere. Spaces in the path are probably not good. I put it in C:\DroidShell
Browse to the folder. Go into the install folder. Run installer.bat. (Installer needs admin priveleges. It will prompt for them, but in some cases, you may have to automatically run as admin)
Reboot.
You should now have shell integration. APKs, Jars, and .img files will automagically decompile.
It's late, I've been working on this all weekend...but it should be good to go. Please let me know if you have any thoughts.
CHANGELOG:
Code:
02.02.16 - v2.0
Update smali, baksmal to v. 2.1.1.
Add shell script for oat2dex (not implemented in context menus, just avaialable for now)
Update APKTool to latest version
Add dx.jar - for converting java classfiles to .dex (just available for now)
Add ext4 and ext2 tools - For manually unpacking images if needed. These are GUI based, not my work.
Add rimg2sdat - For converting .img to sparse (Not implemented yet)
Update sdat2img to latest version by xspirit, added python to installer as required.
Add zipalign function (Not implemented, can be called via "za filename.apk"
Add decompile to pure Java:
This utilizes a few tools to take apk's and jarfiles and decompile them to as close of an android package as we can get without having the actual source code. While we cannot at this time recompile these into apk's, it is very useful for analysis when trying to implement other mods. Like...really helpful. This one can be accessed by right-clicking a decompileable package and picking "decompile to java".
01.31.15 - v1.8
Added windows progress bar for file copies in system.img extraction.
Fixed some script errors.
01.29.15 - v1.7
Cleaned up installer, added more verbosity.
Better error checking in image extractor.
Add support for .list files, allowing double-click extraction of system.transfer.list and cm12-style image files.
Added custom language files for notepad++, allows syntax highlighting of .smali and logcat files.
01.27.15 -v1.6
Added support for system images. Requires installation of included OSFMount.
Added file associations for common plaintext android files to notepad++ if installed.
Converted several .bat files to .exe, allows for icons, inclusion of required files, and UAC prompting when needed.
01.26.15 - v1.5
Fixed fatfinger in APKtool detection causing error.
01.26.15 - v1.4
Added zipaligning
Added check to make sure apktool is present
Updated test-keys to latest AOSP version
Compiled batches to .exe with required files for AIO-packages
Fixed: Installer not always associating with files correctly.
Thanks a million
Version 1.5 uploaded.
Added Zipaligning
Check to make sure apktool.jar is found in %DROIDROOT% directory.
Updated signing keys.
Switch from .bat to .exe, allows modularization of functions, cleaner.
Modifications to installer to try and fix some issues with file associations.
Fixed issue between 1.4 and v 1.5 where I fatfingered a check.
Hell yes!
digitalhigh said:
Greetings, and welcome to the home of a little set of utilities I'm calling "DroidShell".
What it is:...
Click to expand...
Click to collapse
So many thanks for this! I'm going to use it like hell!
Excellent Job!
I'm bookmarking this, gona read it thuroughly at breakfas
So I'm curious - has anybody had a chance to give this a try yet?
Testing file association stuff is tricky, because Windows likes to keep track of the "user selected" association too. So, I had to add some extra commands to the installer script to clean up everything appropriately first.
Either way, I've ran it on like three different computers "clean" and had it work like a charm on all of them. I'd like to know how it works with WIndows 7 or XP.
I could be doing something wrong (windows is not my OS of choice, I use kubuntu 14.10 as my daily driver, and as such am mostly illiterate in dos/batch, I'm a sh/bash guy), but the installer bombed out (hung up without confirmation of success) on my windows 7 pro install (on a dell latitude e6400, with a dual core core2 @2.8ghz, quattro 160m graphics, 4gb of ddr2 @800mhz, booting off a 120gb Samsung evo ssd. Wouldn't think its relevant, but just in case).
Steps:
First I decompressed the .zip in the root of my C:\ drive, with 7zip (did not change file name, kept as "DroidShell_1.5").
Next I ran the installer script.
I then granted it admin privileges.
It killed my desktop, explorer.exe. I assume this is normal due to the terminal output:
Code:
SUCCESS: The process "explorer.exe" with PID 3260 has been terminated
Then I got:
Code:
file type 'apk_auto_file' not found or no open command associated with it.
Followed by 4 more identical errors, just replace "apk" with dfc, dcp, dci, img.
A bunch of successful operations.
Then:
Code:
ERROR: Invalid syntax.
Type "REG ADD /?" for usage
A bunch of successful operations.
Then:
Code:
ERROR: The system was unable to find the specified registry key or value.
The above output repeats 17 times.
Then 4 more operation success messages and it hangs, with my desktop killed.
Ctrl+alt+del, logout, log in, and I'm back in business. No noticeable increase in disk space, no newly installed programs (as expected).
I read the op, and from my understanding it doesn't require any dependencies? (Apktool, android SDK, android studio, etc). All the necessary dependencies are built in, right? It's a fresh install of windows 7 pro, with all available updates taken.
EDIT:
It worked perfectly regardless of the errors, see my post on page 2.
thisguysayswht said:
I could be doing something wrong (windows is not my OS of choice, I use kubuntu 14.10 as my daily driver, and as such am mostly illiterate in dos/batch, I'm a sh/bash guy), but the installer bombed out on my windows 7 pro install (on a dell latitude e6400, with a dual core core2 @2.8ghz, quattro 160m graphics, 4gb of ddr2 @800mhz, booting off a 120gb Samsung evo ssd. Wouldn't think its relevant, but just in case).
Steps:
First I decompressed the .zip in the root of my C:\ drive, with 7zip (did not change file name, kept as "DroidShell_1.5").
Next I ran the installer script.
I then granted it admin privileges.
It killed my desktop, explorer.exe. I assume this is normal due to the terminal output:
Code:
SUCCESS: The process "explorer.exe" with PID 3260 has been terminated
Then I got:
Code:
file type 'apk_auto_file' not found or no open command associated with it.
Followed by 4 more identical errors, just replace "apk" with dfc, dcp, dci, img.
A bunch of successful operations.
Then:
Code:
ERROR: Invalid syntax.
Type "REG ADD /?" for usage
A bunch of successful operations.
Then:
Code:
ERROR: The system was unable to find the specified registry key or value.
The above output repeats 17 times.
Then 4 more operation success messages and it hangs, with my desktop killed.
Ctrl+alt+del, logout, log in, and I'm back in business. No noticeable increase in disk space, no newly installed programs (as expected).
I read the op, and from my understanding it doesn't require any dependencies? (Apktool, android SDK, android studio, etc). All the necessary dependencies are built in, right? It's a fresh install of windows 7 pro, with all available updates taken.
Click to expand...
Click to collapse
Bombed out is a rough term. The installer is just writing a bunch of registry keys, and deleting some other ones to make sure other associations don't mess it up. So, some registry operations don't always work - there just there to be sure. I've actually worked on cleaning that up in the next iteration I'm cooking.
And yes, there shouldn't be any more size increase past extracting the original zip. All the files used are enclosed. "Installer" is just telling Windows that "droid shell is at location %CD%" and "use app xxx in %CD% to open file XX". A few extras for the right-click context menus and icons...so forth.
So, to know if it is working is really just a matter of finding an apk or .jar and double-clicking it. You should get a terminal window showing the process and a box confirming success or failure, plus a reason why if failure.
The only dependency is the Java Runtime environment, which is the same common necessity as for any other Apktool environment. You can get it here, and I'll throw that link in the OP in a second.
The next iteration of the installer is going to be a lot cleaner, plus be more verbose so you actually know what it's doing. My first thought in putting it out was just to see how well the decompile/recompile stuff worked.
Bombed out is a rough term. The installer is just writing a bunch of registry keys, and deleting some other ones to make sure other associations don't mess it up. So, some registry operations don't always work - there just there to be sure. I've actually worked on cleaning that up in the next iteration I'm cooking.
And yes, there shouldn't be any more size increase past extracting the original zip. All the files used are enclosed. "Installer" is just telling Windows that "droid shell is at location %CD%" and "use app xxx in %CD% to open file XX". A few extras for the right-click context menus and icons...so forth.
So, to know if it is working is really just a matter of finding an apk or .jar and double-clicking it. You should get a terminal window showing the process and a box confirming success or failure, plus a reason why if failure.
The only dependency is the Java Runtime environment, which is the same common necessity as for any other Apktool environment. You can get it here, and I'll throw that link in the OP in a second.
The next iteration of the installer is going to be a lot cleaner, plus be more verbose so you actually know what it's doing. My first thought in putting it out was just to see how well the decompile/recompile stuff worked.
Click to expand...
Click to collapse
I didn't mean to offend with the term "bombed out", it may have been a bit of a rough term. I just meant the script terminated my desktop and hung up.
It actually succeed regardless of the errors, and is working like a charm. I apologize, I should have actually tested it before posting. I shouldn't have assumed that it didn't work based off of the terminal output/behavior.
Also, I would like to say that I greatly appreciate the work that you put into this, and all your other projects here on xda. I'm running your 4.4.4 gpe port for the verizon m8 as my primary rom, and it is by far the most stable port I have ever had the pleasure of flashing.
Attached are screenshots of DroidShell successfully decompiling and recompiling an apk with a simple right click selection on windows 7 pro. Good stuff.
Thanks! tons
Thanks for the work. very useful.
The compiling and decompiling of apk is perfect on Win 7 pro.
From the OP, i also got the impression it would unpack / pack images, so i tried it with a system.img copied to the droidshell directory.
With the command c:\droidshell\unpackimg system.img, I got the error as shown in screenshot
Am I doing something wrong, or is this not supported yet?
arbit12 said:
Thanks for the work. very useful.
The compiling and decompiling of apk is perfect on Win 7 pro.
From the OP, i also got the impression it would unpack / pack images, so i tried it with a system.img copied to the droidshell directory.
With the command c:\droidshell\unpackimg system.img, I got the error as shown in screenshot
Am I doing something wrong, or is this not supported yet?
Click to expand...
Click to collapse
It only works for boot images at the moment. System images are a different beast.
Sent from my HTC6525LVW using XDA Free mobile app
digitalhigh said:
It only works for boot images at the moment. System images are a different beast.
Sent from my HTC6525LVW using XDA Free mobile app
Click to expand...
Click to collapse
Okay. Thanks for the info.
thisguysayswht said:
I didn't mean to offend with the term "bombed out", it may have been a bit of a rough term. I just meant the script terminated my desktop and hung up.
It actually succeed regardless of the errors, and is working like a charm. I apologize, I should have actually tested it before posting. I shouldn't have assumed that it didn't work based off of the terminal output/behavior.
Also, I would like to say that I greatly appreciate the work that you put into this, and all your other projects here on xda. I'm running your 4.4.4 gpe port for the verizon m8 as my primary rom, and it is by far the most stable port I have ever had the pleasure of flashing.
Attached are screenshots of DroidShell successfully decompiling and recompiling an apk with a simple right click selection on windows 7 pro. Good stuff.
Click to expand...
Click to collapse
Oh, no offense taken.
I came at this project, as I do with most, with the mindset of "OOOH, SHINY THING. I MUST SHOW EVERYONE." So, first thought was putting out the app, despite some of the install stuff being a bit dirty.
However, the next iteration is shaping up to be quite lovely. See below.
arbit12 said:
Okay. Thanks for the info.
Click to expand...
Click to collapse
So, it appears that this question has motivated me to try making that function a reality sooner than later.
However, as far as I can see, the *ONLY* application for windows that currently deals with system images right now is Ext2Explore, which is a bit old and doesn't have command-line support.
Fortunately, there's source code for it, so I'm currently downloading Visual Studio and will see if I can add command line functionality, as well as make it launch with UAC prompting.
If I can make this work, my plan is to make one handler for .img files that works like so:
1. Look at the file passed to it and see if it's a boot image. If it is, extract and exit.
2. If it's not a boot image, try to extract it as a system image. If it is, extract and exit.
3. If it's not a boot or system image - pass it to explorer and mount as usual.
I can do # 1 and #3 already...it's just getting #2 to go.
Also, I've added a check in the installer that looks for the installation of notepad++. If it finds it, it will create additional associations for .xml, .prop, conf, config, .smali, and whatever else I can think of that I could possibly need to edit in a ROM.
Then, lastly, with all these additions, I'd like to make the installer a bit more verbose. Give some options so it's not just an all or nothing install, make it prettier, etc.
digitalhigh said:
Oh, no offense taken.
I came at this project, as I do with most, with the mindset of "OOOH, SHINY THING. I MUST SHOW EVERYONE." So, first thought was putting out the app, despite some of the install stuff being a bit dirty.
However, the next iteration is shaping up to be quite lovely. See below.
So, it appears that this question has motivated me to try making that function a reality sooner than later.
However, as far as I can see, the *ONLY* application for windows that currently deals with system images right now is Ext2Explore, which is a bit old and doesn't have command-line support.
Fortunately, there's source code for it, so I'm currently downloading Visual Studio and will see if I can add command line functionality, as well as make it launch with UAC prompting.
If I can make this work, my plan is to make one handler for .img files that works like so:
1. Look at the file passed to it and see if it's a boot image. If it is, extract and exit.
2. If it's not a boot image, try to extract it as a system image. If it is, extract and exit.
3. If it's not a boot or system image - pass it to explorer and mount as usual.
I can do # 1 and #3 already...it's just getting #2 to go.
Also, I've added a check in the installer that looks for the installation of notepad++. If it finds it, it will create additional associations for .xml, .prop, conf, config, .smali, and whatever else I can think of that I could possibly need to edit in a ROM.
Then, lastly, with all these additions, I'd like to make the installer a bit more verbose. Give some options so it's not just an all or nothing install, make it prettier, etc.
Click to expand...
Click to collapse
Captain_Throwback said:
Click to expand...
Click to collapse
Don't get too excited. I've never touched C++ before, and ext2Explore was done in VisualStudio.net and a WYSIWYG editor called QT. I found updated source for the program from 2012 and have gotten it to import into QT, however, it needs MingW and some other dependencies. I'll be lucky if I can even get it to compile again, let alone work, let alone work with added command-line stuff.
However, that's still the goal.
Also, I want to add wget (windows equivalent) stuff to auto grab and install java and notepad++ while we're at it.
So, I think Ext2Explore is more work than it's worth.
OSFMount, on the other hand, just let me mount a system.img as a removable disk with read-write access. I'm going to go down this road...
Good to hear that. Extracting system.img on windows can be a real pain at times - this would be great.

[Guide][How to] Dynamic Nav Bar for Nougat

I don't understand why this isn't a feature of stock Android. They did it with the notification bar, but why not the navigation bar? The main reason for doing this is to prevent the navigation bar from being burned into your screen. There are Xposed modules for Lollipop/Marshmallow that do this exact same thing, making this mod unnecessary on those versions of Android. Since there's no Xposed for Nougat (or if you don't like using Xposed on Lollipop/Marshmallow), doing this mod will make your navigation bar dynamically change color to match your notification bar.
***Please Note***
This isn't perfect. In applications like Google Messenger the navigation bar doesn't change to match the color of the contact you're texting, but it's better than nothing.
Prerequisites:
- Nexus 6 with USB debugging enabled in developer settings
- TWRP
- ADB fully setup and functional
- Text editor (gedit (Linux), NotePad++ (Windows), or whatever you like to use)
- Archive Manager (Linux) or 7Zip (Windows)
- Apktool 2.2.2 (link at the bottom of this post)
- Apktool Windows wrapper script (Windows only)
Step 1: Boot into TWRP
Step 2: Select mount, then select system
Step 3: Connect your Nexus 6 to your computer and fire up a terminal (Linux) or command prompt (Windows)
Step 4: Navigate to the folder containing ADB (platform-tools).
Step 5: Type "adb pull system/framework/framework-res.apk".
Step 6: Type "apktool if framework-res.apk" This installs the framework
Step 7: Type "apktool d framework-res.apk" This decompiles the apk
Step 8: Navigate to res, values, and open styles.xml with your text editor of choice
Step 9: Search for "navigationBar". There will be three instances of it. You only have to change the last two. Change "@colorBlack" to "?colorPrimaryDark" and save your changes
Step 10: Open colors.xml and search for "input_method_navigation_guard". Change "ff000000" to "00000000" and save the file. If you don't change this, the navigation bar will turn black when you open the keyboard
Step 11: Go back to your terminal window/command prompt and type "apktool b framework-res". This recompiles the apk
IF YOU SKIP THE FOLLOWING STEP YOU WILL END UP IN A BOOTLOOP!!!!!!!!!!
Step 12: Delete META-INF and AndroidManifest.xml from the modified framework-res.apk and copy over the ones from your original framework-res.apk
Step 13: Push the modified framework-res.apk to your device with ADB or by boot into recovery, copy it to your phone, and use the TWRP file manager to move it to /system/framework. If you do the TWRP method, be sure to set the permissions to 0644 or your​ phone will not boot.
Step 14: Boot up your Nexus 6 and test it out!
Link to Apktool
Nice tutorial. However, the reasons you're having issues "reusing" an existing modified copy of framework-res.apk are twofold.
1. You're re-signing a system app. Unless things have changed in the four years since I last modified framework-res.apk, system apps are not signed.
2. The apk can also be moved into /system/framework using a file explorer on the device. It simply cannot be done in one shot as the permissions need to be changed prior to the final move into /system/framework.
The framework is Android version dependent, so an Android 5.x framework will not work in Android 6.x or 7.x. However, replacing the framework on multiple copies of the same version of Android is certainly possible. I have to head off to work, but when I have a spare moment upon getting home I'll generate a "reusable" framework, and a flashable zip as well.
Strephon Alkhalikoi said:
Nice tutorial. However, the reasons you're having issues "reusing" an existing modified copy of framework-res.apk are twofold.
1. You're re-signing a system app. Unless things have changed in the four years since I last modified framework-res.apk, system apps are not signed.
2. The apk can also be moved into /system/framework using a file explorer on the device. It simply cannot be done in one shot as the permissions need to be changed prior to the final move into /system/framework.
The framework is Android version dependent, so an Android 5.x framework will not work in Android 6.x or 7.x. However, replacing the framework on multiple copies of the same version of Android is certainly possible. I have to head off to work, but when I have a spare moment upon getting home I'll generate a "reusable" framework, and a flashable zip as well.
Click to expand...
Click to collapse
1. The first time I did this I didn't sign the app and ended up in a bootloop. After researching the issue I came across a post that said signing the app was necessary. Signing it fixed my problem, so I've signed it ever since out of habit. Next time I do this I'll skip signing it and see what happens. If I don't get a bootloop I'll remove it from the guide. It's possible I had a permissions error or something.
2. While moving it with a file explorer is possible, I just prefer ADB, so that's why I used it in my guide.
I realize that they're version dependant. I wasn't trying to use a modified framework-res from Marshmallow on Nougat or anything like that. For example, when I tried reusing one from the November factory image on the December security update, or one from the November image on Pure Nexus, I get a bootloops, so that's why I assumed it necessary to create a new one each time. It's not like this mod is hard or takes a large amount of time, so why not redo it each time just for fun?
Face_Plant said:
It's not like this mod is hard or takes a large amount of time, so why not redo it each time just for fun?
Click to expand...
Click to collapse
Not everyone likes playing around with app mods. When I last did it, it was to enable the network location service on a Coby tablet running Android 4.0.3. That was NOT fun as it involved smali editing. At least this is only an XML edit.
Strephon Alkhalikoi said:
Not everyone likes playing around with app mods. When I last did it, it was to enable the network location service on a Coby tablet running Android 4.0.3. That was NOT fun as it involved smali editing. At least this is only an XML edit.
Click to expand...
Click to collapse
I didn't mean for all mods, just this one. Like you said, it's only simple changes to two XML files.
After getting some practice by doing this a couple of times it only takes a few minutes to complete, depending on the speed of your computer. It takes me about 30 minutes since my Ubuntu machine is an old early 2000's PC that takes about 10 minutes to decompile the app, 10 minutes to sign it, and 10 more to recompile it... I'll be able to knock 10 minutes of that time if what you're saying is correct and signing it is unnecessary.
I'll try it again after class today and remove the signing bit if all goes well [emoji106]
Great write-up, worked well OP!
You can after recompile of the framework-res folder, you can delete the AndroidManifest.xml in the new APK, and copy the AndroidManifest.xml and META-INF folder from the original framework-res.apk into the newly built APK...hopefully that makes sense.
No need to sign. That's what I did and it worked just fine, eliminates a step. I use 7zip to do all of that BTW.
RMarkwald said:
No need to sign. That's what I did and it worked just fine, eliminates a step. I use 7zip to do all of that BTW.
Click to expand...
Click to collapse
Good to hear. Those steps have been removed from the guide.
I wonder why signing it fixed my problem when I did this on Marshmallow earlier this year... I guess I screwed up something else and the second time around when I signed it I didn't screw up whatever I did wrong the first time.
Face_Plant said:
Good to hear. Those steps have been removed from the guide.
I wonder why signing it fixed my problem when I did this on Marshmallow earlier this year... I guess I screwed up something else and the second time around when I signed it I didn't screw up whatever I did wrong the first time.
Click to expand...
Click to collapse
Could depend on the app maybe? Not too sure there. I started wanting to learn modding apks (mainly making color changes, etc) by guides similar to this, the whole "I wonder if I can do that?" thing. Hopefully this will encourage those looking to try something like this that isn't too difficult to do to give it a shot and try it, just remember to have a backup of framework-res.apk handy, always can be adb pushed back via recovery if something goes south.
Thanks again for this OP, so far working great!
Awesome write up!
Not trying to hijack the thread, but for those not comfy making mods, there is "an app for that" Navbar Apps
Simple app that will dynamically change your nav bar color as well as other goodies.
recompiling it fails. i get this error on Ubuntu 16.10 I even tried using sudo
I: Using Apktool 2.2.0-dirty
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:258)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:105)
at brut.androlib.Androlib.readMetaFile(Androlib.java:254)
... 4 more
how do i deal with this?
i see the yml file right in the folder
kidhudi said:
recompiling it fails. i get this error on Ubuntu 16.10 I even tried using sudo
I: Using Apktool 2.2.0-dirty
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:258)
at brut.androlib.Androlib.build(Androlib.java:270)
at brut.androlib.Androlib.build(Androlib.java:263)
at brut.apktool.Main.cmdBuild(Main.java:224)
at brut.apktool.Main.main(Main.java:84)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:105)
at brut.androlib.Androlib.readMetaFile(Androlib.java:254)
... 4 more
how do i deal with this?
i see the yml file right in the folder
Click to expand...
Click to collapse
Is Apktool installed correctly? Have you tried using Apktool 2.2.1? Maybe 2.2.0 isn't compatible for some reason? These are obviously just guesses. I'm no master at reading error logs...
ok i figured that out..
will this technique work on nitrogen version 7.1.1 because the nav bar doesnt change but when i pull the framework-res.apk the xml files are in fact altered.
---------- Post added at 09:13 PM ---------- Previous post was at 08:24 PM ----------
Face_Plant said:
Is Apktool installed correctly? Have you tried using Apktool 2.2.1? Maybe 2.2.0 isn't compatible for some reason? These are obviously just guesses. I'm no master at reading error logs...
Click to expand...
Click to collapse
no the command in the tutorial didnt work. because i was compiling a folder named framework-res and not an apk all i did was remove the .apk from the command supplied and it worked finally
also i dont know if it is an error but the push command has an lsystem for the location to be pushed. that wasnt working either.
thanks for the reply bro
Thanks face_plant. It was working the whole time. I thought I would get the pixel icons lol. My bad
Great tut thanks
kidhudi said:
Thanks face_plant. It was working the while time. I thought I would get the pixel icons lol. My bad
Great tut thanks
Click to expand...
Click to collapse
Pixel buttons are from the Substratum theme I'm using. You can get those too by being on a Nougat ROM that supports Substratum and using Pixel UI theme from the Play Store.
Just a heads up, if you're on 7.1.1 the theme won't work. It needs to be updated to support 7.1.1. Haven't tried it on 7.1, so it may or may not work.

Categories

Resources