[Q] Enable CRT Animation, CM10.1? - Nexus 7 Q&A, Help & Troubleshooting

Okay i'm running the latest nigthly of CM10.1 and I decided i wanted to try and get CRT animation going by altering framework-res.apk, i've tried the decompiling tool but constantly got the ECHO errors. But I found a way to decompile it, but the "folder" that everyone says to edit "bools.xml" in is not in the framework-res.apk the framework-res.apk/res/values/bools.xml.
So how exactly can I alter my framework-res.apk to enable the animation.

FreakyFreakGA said:
Okay i'm running the latest nigthly of CM10.1 and I decided i wanted to try and get CRT animation going by altering framework-res.apk, i've tried the decompiling tool but constantly got the ECHO errors. But I found a way to decompile it, but the "folder" that everyone says to edit "bools.xml" in is not in the framework-res.apk the framework-res.apk/res/values/bools.xml.
So how exactly can I alter my framework-res.apk to enable the animation.
Click to expand...
Click to collapse
I'd personally forget all that. I just dug around and found this method in the Samsung forums.
Follow the instructions here to install the Xposed Framework 2.1.1, and reboot.
Code:
http://forum.xda-developers.com/showthread.php?t=1574401
Then install the XposedTweakBox module from here. Reboot, presto!
Code:
http://forum.xda-developers.com/showthread.php?t=1629653
Hope this works for you. No decompiling required at all.

Related

[MOD][CM12.1 AND BASED ROMS]WebViewGoogle for CM Roms

WARNING: INSTALL GOOGLE´S ANDROID SYSTEM WEBVIEW FROM THE PLAYSTORE / GAPPS FIRST
https://play.google.com/store/apps/details?id=com.google.android.webview
Do you wan´t to use google´s updatable webview on a cm rom?
well too bad, even if you install and disable the built in webview, the system still dosen´t uses it, so what can we do?
modify a config in the framework called
"config_webViewPackageName" from com.android.webview to com.google.android.webview
you can do this via xposed with http://repo.xposed.info/module/net.typeblog.webview
however xposed for 5.1 is glitchy and will break a lot of optimizations if you are running a based cm run that has those.
so the solution? well flash the zip below, its a modified framework from cm12-13/04/2015 (DD/MM/YY btw)
https://drive.google.com/open?id=0BwduAK2l37OaSUprcG5LejNiS2s&authuser=0
Instructions:
Download zip from the link provided
Flash via recovery
??
profit
this is mine
BTW: I didn´t test on any other device, altought i dont think it will work since our framework contains some hammerhead-specific values
Thank you lord! I was searching for this for so long. This is going to be awesome to me!!
Best Regards,
Jairo.
May I ask how you did it? I decompiled framework-res.apk in Chroma ROM and then I navigated to "\framework-res\res\values" but I didn't find a config.xml file. Isn't this where the modification is done? Am I doing something wrong? @opssemnik
fr3quency said:
May I ask how you did it? I decompiled framework-res.apk in Chroma ROM and then I navigated to "\framework-res\res\values" but I didn't find a config.xml file. Isn't this where the modification is done? Am I doing something wrong? @opssemnik
Click to expand...
Click to collapse
its /res/values/strings.xml
opssemnik said:
its /res/values/strings.xml
Click to expand...
Click to collapse
I found it after decompiling your framework-res.apk and searching from Windows Explorer.
I went into strings.xml and replaced "com.android.webview" with "come.google.android.webview". Then I recompiled and pushed the new framework-res.apk to /system/frameworks(I had some translation errors but it was first time seeing who things). Anyway, the system doesn't boot at all and shows only the bootanimation for 15+ minutes. Could you help me?
I downoaded this folder: http://www.droidviews.com/tutorial-how-to-decompile-and-recomplie-apk-files/ and replaced the apktool inside of it with this one: http://forum.xda-developers.com/showpost.php?p=59436776&postcount=2812
I installed the framework via "apktool if framework-res.apk" just in case.
fr3quency said:
I found it after decompiling your framework-res.apk and searching from Windows Explorer.
I went into strings.xml and replaced "com.android.webview" with "come.google.android.webview". Then I recompiled and pushed the new framework-res.apk to /system/frameworks(I had some translation errors but it was first time seeing who things). Anyway, the system doesn't boot at all and shows only the bootanimation for 15+ minutes. Could you help me?
I downoaded this folder: http://www.droidviews.com/tutorial-how-to-decompile-and-recomplie-apk-files/ and replaced the apktool inside of it with this one: http://forum.xda-developers.com/showpost.php?p=59436776&postcount=2812
I installed the framework via "apktool if framework-res.apk" just in case.
Click to expand...
Click to collapse
after you recompile it, you must put the META-INF folder from the original apk into your new APK,then push it to system/framework and set its permissions to 644 (rw-r-r)
opssemnik said:
after you recompile it, you must put the META-INF folder from the original apk into your new APK,then push it to system/framework and set its permissions to 644 (rw-r-r)
Click to expand...
Click to collapse
It still doesn't boot and stays at bootanimation. I decompiled and recompiled the .apk again and using WinRar i copied the META-INF folder from the original .apk to the new one. Then I rebooted into recovery and typed these commands:
Code:
adb shell
cd system/framework
rm framework-res.apk
adb push framework-res.apk /system/framework (This is the recompiled apk with the META-INF folder)
adb shell chmod 644 /system/framework/framework-res.apk
adb reboot
Edit: I didn't install Google WebView this time.
fr3quency said:
It still doesn't boot and stays at bootanimation. I decompiled and recompiled the .apk again and using WinRar i copied the META-INF folder from the original .apk to the new one. Then I rebooted into recovery and typed these commands:
Code:
adb shell
cd system/framework
rm framework-res.apk
adb push framework-res.apk /system/framework (This is the recompiled apk with the META-INF folder)
adb shell chmod 644 /system/framework/framework-res.apk
adb reboot
Edit: I didn't install Google WebView this time.
Click to expand...
Click to collapse
install it from the playstore before doing this, also are you lastest snapshot apktool ? (its newer than rc4)
opssemnik said:
install it from the playstore before doing this, also are you lastest snapshot apktool ? (its newer than rc4)
Click to expand...
Click to collapse
The apktool I used is newer... I think; it was posted at a later date, thus newer. Could you upload your folder with your apktool that you used if you have enough bandwidth?
Edit: I installed it from the Play Store and pushed the .apk. Is there a way to see if it used Google or AOSP webview?
Will do once i get home
See the user agent or read the config , altought the latter probably will nerd system permissions.
Or you could delete system webview and see if webkit based apps still work
Since framework is updated regularly in cm nightlies, so is there any way to do this on the fly using latest framework files.
Thnx
fr3quency said:
The apktool I used is newer... I think; it was posted at a later date, thus newer. Could you upload your folder with your apktool that you used if you have enough bandwidth?
Edit: I installed it from the Play Store and pushed the .apk. Is there a way to see if it used Google or AOSP webview?
Click to expand...
Click to collapse
did you get it after all? if not i upload my apktool folder
prabhu_91 said:
Since framework is updated regularly in cm nightlies, so is there any way to do this on the fly using latest framework files.
Thnx
Click to expand...
Click to collapse
would require a custom build of cm with it, or a custom apk of the webview or a xposed module(see OP) or apktool / some kind of apk modifying program to be native compiled for android(so it could be ran as an addon.d script on recovery). you could always keep flashing older framework-res, generally cm dosen´t do much to it, but once it does, the mod will need to be updated.
BTW, making for VIVID-20150426v3
opssemnik said:
did you get it after all? if not i upload my apktool folder
Click to expand...
Click to collapse
Yeah I got it working. Thanks for the help!
Sorry ignorance, but what is the function of this file?
i need com.android.webview
could you please upload a com.android.webview flashable zip. i don't want com.google.android.webview, i'm facing major issue with google's updatable webview. i need a aosp webview. plz help me

[Q] Fixing the navbar detection issue

There are a couple of people whose navigation bar on their N4 isn't working. I'm talking about this.
Found a github repository which contains the fix (credits to gkraynov) for all stock releases: https://github.com/gkraynov/nexus-4-navfix
I've recently installed this ROM, which has a different build number (LMY48G), so this solution would not work for me, because stock 5.1.1 has LMY47V.
The fix (source): https://android-review.googlesource...droid/systemui/statusbar/policy/DeadZone.java
My steps were:
1.) Decompiled the SystemUI.apk with apktool (to get to the smali file):
Code:
java -jar apktool.jar d SystemUI.apk
Here's the decompiled source in a zip file.
2.) Decompiled the same apk with http://www.decompileandroid.com/ to get the java source
3.) Compared the source of the fix with corresponding smali and java file, like in this image.
4.) Recompiled with:
Code:
java -jar apktool.jar b SystemUI
5.) Pushed the apk back to the phone:
- set root access for adb and apps on phone under developer settings
- adb root
- adb remount
- adb push SystemUI.apk /system/priv-app/SystemUI.apk
After that I rebooted the phone, which didn't display the navbar anymore, so I've must have made a mistake somewhere.
Can someone, please, take a look and tell me, what I did wrong? I have zero experience with this.
You can share files you edit?
You didn't set perms right. Reboot to recovery and fix permissions or just change the permissions to
RW-R--R--
I also want to wear a custom rom , but the nav bar I do not work , if you can help ?
chmod?
Can anyone compile this source with android 6.0 marshmallow
Sent from my Nexus 4 using Tapatalk
I tried, I've tried to edit Deadzon.java but I am confused as to restore the file to dex for compile into apk again
I did the same thing using TMA to decompile and to update and got the same issue.
No more NAVBAR.
Any clue?
It appears that the code edit it`s not correct.
Using another tool http://bytecodeviewer.com/ to reverse engineer it appears wrong.
I am also newbie at this.
Can someone help?
same here
I have encountered the same issue with my N4.
To fix it, I tried a stock reset. Did not work.
Than I granted myself root access, installed CyanogenMod, which then allowed me to use the "pie"-Navigation, which works great.
I also found out, because of the full screen option etc., that the area of the screen of the broken navigation bar should be working, as it appears to work in different apps in landscape-mode.
So... My problem is now that I can't try out the patch you writing about because now I am using CM13, not the Stock Version which the fixes are referring to.
I am really new to all this ROM stuff (all I know about it is from this very day) - So, is there a way of applying this way of fixing the navigation bar to CM13?
Thank you.
Sackhaar said:
I have encountered the same issue with my N4.
To fix it, I tried a stock reset. Did not work.
Than I granted myself root access, installed CyanogenMod, which then allowed me to use the "pie"-Navigation, which works great.
I also found out, because of the full screen option etc., that the area of the screen of the broken navigation bar should be working, as it appears to work in different apps in landscape-mode.
So... My problem is now that I can't try out the patch you writing about because now I am using CM13, not the Stock Version which the fixes are referring to.
I am really new to all this ROM stuff (all I know about it is from this very day) - So, is there a way of applying this way of fixing the navigation bar to CM13?
Thank you.
Click to expand...
Click to collapse
I am facing the same issue.
But I am trying to create the patch for Paranoid Rom. If I suceed I think the same concept can be use for any other rom.
Hi all..
does anyone want to help me to update this patch for Lineage OS??
https://github.com/gkraynov/nexus-4-navfix

[Q] Hacking odexed SystemUI.apk to remove the S-Finder notification toolbar

tl;dr: I tried to hack the SystemUI.apk file to get rid of the s-finder notification bar, I needed to deodex the apk to do this. I did that (first time ever), but then I didn't know what to do with the .odex.art.xz file, so I removed the whole arm/ folder from the SystemUI directory, and just left my modified SystemUI.apk file in there. After clearing the cache and dalvik, the SystemUI app kept crashing and I had to restore from backup. What do I do with the arm directory, and is that even the problem, or should I not even try to do this?​
I have a sprint Galaxy S4 (jfltespr; SPH-L720) that I just upgraded to lollipop via the regular system update, now have Android 5.0.1, baseband L720VPUGOD2, kernel 3.4.0. My phone is rooted with BusyBox installed. I used to use CyanogenMod (for a long time), but the stability was low for me, particularly when travelling internationally and changing SIMs: I would frequently lose GPS completely (see http://forum.xda-developers.com/galaxy-s4-sprint/help/gps-cyanogen-mod-install-t3009245/), requiring me to flash the stock ROM again. So I reverted to stock, and used xposed. Unfortunately, following the upgrade to 5.0.1, xposed now requires flashing a zip and is in super-alpha, and so I am nervous about using it. The only thing I really want a custom ROM or xposed for is to get rid of bloat. I have managed with just Titanium to get rid of the most annoying apps, but I am still stuck with that stupid 'S-Finder'/'Quick Connect' bar. I can get rid of it by switching my device name to jfltevzr or jflteatt in build.prop, but then I lose other features, such as the ability to change to the GSM network.
So, I tried to hack the SystemUI apk according to the instructions here and here. Essentially my plan was: download SystemUI.apk, edit the PhoneStarusBar.smali, and profit.
I have never done this before, so I rapidly ran into the issue that I needed to deodex the apk. I followed this guide and everything seemed to go smoothly, except that the PhoneStatuBar.smali file had different code from the tutorial. In the tutorial I had to change
Code:
if-nez v8, ;cond_0
to
Code:
if-nex v8, :cond_5
but in my file it seemed that the syntax was similar, but the labels were different, so I ended up changing
Code:
if-nez v8, ;cond_15
to
Code:
if-nex v8, :cond_c0
I created the classes.dex file and packaged it into the apk with the command
Code:
7za u -tzip SemcVideo.apk classes.dex
However, I was confused about what to do with the new apk. In my system, the original apk lives in /system/priv-app/SystemUI/SystemUI.apk, and next to the apk is an arm directory with an odex.xz file (which I deodexed) and an art.odex.xz file that I have no idea what to do with. Since I didn't know what to do, I just deleted the whole arm directory, put the modified (deodexed) SystemUI.apk file in /system/priv-app/SystemUI/, cleared the cache and dalvik cache, and rebooted. After about 20 minutes of rebuilding the cache for all of my apps, the phone started, but it had the dreaded 'SystemUI is not responding, do you want to restart it' message. I ended up having to restore a backup and wipe the cache again.
So, my question is: what do I do with that arm directory? Is that what broke it, or is the problem that I just screwed up the PhoneStatusBar.smali file? I don't really know what I am doing as I don't know java that well, but I would like to get this to work.
Alternatively, do you guys think that maybe the Google Play Edition ROM might be more stable that CyanogenMod, or that I should just try to flash to xposed alpha even though it is so 'unstable'? It looks to me like the GPE ROM might be more stable than CM, but I have no idea. I know that it hasn't been patched for StageFright yet, even though CM has.
Finally, I should specify that I am not an Android hacker, I have a full time job in science research and I volunteer a lot. My top priority for my phone is stability and reliability, and I don't want to spend too many hours on this. Secondary concerns for me are not having to deal with all of Samsung's bloatware and increasing my battery life.
Thanks in advance for all of your help, and apologies if I am posting in the wrong place.
MikeDacre said:
tl;dr: I tried to hack the SystemUI.apk file to get rid of the s-finder notification bar, I needed to deodex the apk to do this. I did that (first time ever), but then I didn't know what to do with the .odex.art.xz file, so I removed the whole arm/ folder from the SystemUI directory, and just left my modified SystemUI.apk file in there. After clearing the cache and dalvik, the SystemUI app kept crashing and I had to restore from backup. What do I do with the arm directory, and is that even the problem, or should I not even try to do this?​
I have a sprint Galaxy S4 (jfltespr; SPH-L720) that I just upgraded to lollipop via the regular system update, now have Android 5.0.1, baseband L720VPUGOD2, kernel 3.4.0. My phone is rooted with BusyBox installed. I used to use CyanogenMod (for a long time), but the stability was low for me, particularly when travelling internationally and changing SIMs: I would frequently lose GPS completely (see http://forum.xda-developers.com/galaxy-s4-sprint/help/gps-cyanogen-mod-install-t3009245/), requiring me to flash the stock ROM again. So I reverted to stock, and used xposed. Unfortunately, following the upgrade to 5.0.1, xposed now requires flashing a zip and is in super-alpha, and so I am nervous about using it. The only thing I really want a custom ROM or xposed for is to get rid of bloat. I have managed with just Titanium to get rid of the most annoying apps, but I am still stuck with that stupid 'S-Finder'/'Quick Connect' bar. I can get rid of it by switching my device name to jfltevzr or jflteatt in build.prop, but then I lose other features, such as the ability to change to the GSM network.
So, I tried to hack the SystemUI apk according to the instructions here and here. Essentially my plan was: download SystemUI.apk, edit the PhoneStarusBar.smali, and profit.
I have never done this before, so I rapidly ran into the issue that I needed to deodex the apk. I followed this guide and everything seemed to go smoothly, except that the PhoneStatuBar.smali file had different code from the tutorial. In the tutorial I had to change
Code:
if-nez v8, ;cond_0
to
Code:
if-nex v8, :cond_5
but in my file it seemed that the syntax was similar, but the labels were different, so I ended up changing
Code:
if-nez v8, ;cond_15
to
Code:
if-nex v8, :cond_c0
I created the classes.dex file and packaged it into the apk with the command
Code:
7za u -tzip SemcVideo.apk classes.dex
However, I was confused about what to do with the new apk. In my system, the original apk lives in /system/priv-app/SystemUI/SystemUI.apk, and next to the apk is an arm directory with an odex.xz file (which I deodexed) and an art.odex.xz file that I have no idea what to do with. Since I didn't know what to do, I just deleted the whole arm directory, put the modified (deodexed) SystemUI.apk file in /system/priv-app/SystemUI/, cleared the cache and dalvik cache, and rebooted. After about 20 minutes of rebuilding the cache for all of my apps, the phone started, but it had the dreaded 'SystemUI is not responding, do you want to restart it' message. I ended up having to restore a backup and wipe the cache again.
So, my question is: what do I do with that arm directory? Is that what broke it, or is the problem that I just screwed up the PhoneStatusBar.smali file? I don't really know what I am doing as I don't know java that well, but I would like to get this to work.
Alternatively, do you guys think that maybe the Google Play Edition ROM might be more stable that CyanogenMod, or that I should just try to flash to xposed alpha even though it is so 'unstable'? It looks to me like the GPE ROM might be more stable than CM, but I have no idea. I know that it hasn't been patched for StageFright yet, even though CM has.
Finally, I should specify that I am not an Android hacker, I have a full time job in science research and I volunteer a lot. My top priority for my phone is stability and reliability, and I don't want to spend too many hours on this. Secondary concerns for me are not having to deal with all of Samsung's bloatware and increasing my battery life.
Thanks in advance for all of your help, and apologies if I am posting in the wrong place.
Click to expand...
Click to collapse
Just go into res/values/dimens.xml once you have it decompiled and change every line with SFinder or QuickConnect to "0.0dip" using Notepad++ then recompile the apk and remove the SF and QC apks... It's a lot easier that way. Xposed works fine but you have to use the Samsung specific one. There is a link in my Wicked X thread.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
bilgerryan said:
Just go into res/values/dimens.xml once you have it decompiled and change every line with SFinder or QuickConnect to "0.0dip" using Notepad++ then recompile the apk and remove the SF and QC apks... It's a lot easier that way. Xposed works fine but you have to use the Samsung specific one. There is a link in my Wicked X thread.
Click to expand...
Click to collapse
Thanks so much bilgerryan, I am doing that now. I have another dumb question: what is the best way to copy back the new apk? Is it fine for me to use adb to do it from the recovery? I would just delete the original (after backing up) and then copy my modified version in.
Also, (sorry for the multi-post), do I need to wipe both the Cache and the Dalvik Cache partitions after making the switch?
MikeDacre said:
Thanks so much bilgerryan, I am doing that now. I have another dumb question: what is the best way to copy back the new apk? Is it fine for me to use adb to do it from the recovery? I would just delete the original (after backing up) and then copy my modified version in.
Click to expand...
Click to collapse
You have to set permissions to 0644 after you copy it over.. I use root browser. Long press on the file, press Permissions and then make it look like the screenshot. Or you can just use my ROM (second screenshot), it is already removed plus a bunch of other fun stuff... Wicked X v10.6 in Android Development section.
bilgerryan said:
You have to set permissions to 0644 after you copy it over.. I use root browser. Long press on the file, press Permissions and then make it look like the screenshot. Or you can just use my ROM (second screenshot), it is already removed plus a bunch of other fun stuff... Wicked X v10.6 in Android Development section.
Click to expand...
Click to collapse
Great, thanks. I will give your ROM a try in the future, but right now I want to figure out how to do this I just tried it copying back my modified apk and wiping the cache and dalvik, but after it booted, there was no systemui
I just changed the permissions to 644 now, they were 777 before, so that may have been the problem.
Do I need to wipe the cache and dalvik every time? It takes a really long time to boot after that.
Thanks again!
MikeDacre said:
Great, thanks. I will give your ROM a try in the future, but right now I want to figure out how to do this I just tried it copying back my modified apk and wiping the cache and dalvik, but after it booted, there was no systemui
I just changed the permissions to 644 now, they were 777 before, so that may have been the problem.
Do I need to wipe the cache and dalvik every time? It takes a really long time to boot after that.
Thanks again!
Click to expand...
Click to collapse
No, you only need to do that when completely removing a system app. A record is enough. I haven't worked with odex in a long time, I can't remember if there is anything extra you need to do.
bilgerryan said:
No, you only need to do that when completely removing a system app. A record is enough. I haven't worked with odex in a long time, I can't remember if there is anything extra you need to do.
Click to expand...
Click to collapse
OK, unfortunately after making the changes, there is no SystemUI; all I have is my launcher (SmartLauncher) with a black background and no notification bar. After restarting I have the same issue. By putting back the old SystemUI.apk I fix the problem.
Here is what I tried:
Copy the SystemUI.apk file from /system/priv-app/SystemUI/SystemUI.apk
Copy the frameworks from /system/frameworks/twframework-res.apk and /system/framework/framework-res.apk
Install all frameworks:
Code:
apktool if framework-res.apk
apktool if twframework-res.apk
apktool if SystemUI.apk
Decompile the apk:
Code:
apktool d SystemUI.apk
Edit res/values/dimens.xml with vim. Here is the patch of my edits:
Code:
--- /tmp/vqMxlsi/3 2015-08-19 18:23:07.346653666 -0700
+++ /tmp/vqMxlsi/4 2015-08-19 18:23:07.369986999 -0700
@@ -832,8 +832,8 @@
<dimen name="finder_connect_button_padding_top">11.0dip</dimen>
<dimen name="finder_connect_button_height">35.0dip</dimen>
<dimen name="finder_connect_layout_height">57.0dip</dimen>
- <dimen name="tw_quick_panel_sfinder_qconnect_button_text_size">16.0dip</dimen>
- <dimen name="tw_quick_panel_sfinder_qconnect_drawable_padding">5.0dip</dimen>
+ <dimen name="tw_quick_panel_sfinder_qconnect_button_text_size">0.0dip</dimen>
+ <dimen name="tw_quick_panel_sfinder_qconnect_drawable_padding">0.0dip</dimen>
<dimen name="notificatoin_big_picture_height">176.0dip</dimen>
<dimen name="rssi_battery_gap">3.0dip</dimen>
<dimen name="battery_icon_width">10.0dip</dimen>
Recompile the apk:
Code:
apktool b SystemUI
Zipalign the apk:
Code:
zipalign -v 4 SystemUI/dist/SystemUI.apk final/SystemUI.apk
Copy the new apk to my external sd
Connect with adb and do the following:
Code:
mount -o remount,rw /system
cd /system/priv-app/SystemUI
cp SystemUI.apk /storage/extSdCard/Backup/SystemUI.apk
rm SystemUI.apk
cp /storage/extSdCare/SystemUI.apk .
chmod 644 SystemUI.apk
reboot
Is there something else I am missing? It seems that after my edits, SystemUI.apk just doesn't launch at all. There isn't even an error message. But all I changed are those two lines. The problem is the same with or without the zipalign step. Doing essentially the same procedure above to restore the old SystemUI.apk brings everything back to normal, so I don't think it is a permissions issue. Wiping the cache and dalvik and restarting makes no difference, I have the same problem. Restarting a couple of times also does not resolve the problem.
Any ideas?
MikeDacre said:
OK, unfortunately after making the changes, there is no SystemUI; all I have is my launcher (SmartLauncher) with a black background and no notification bar. After restarting I have the same issue. By putting back the old SystemUI.apk I fix the problem.
Here is what I tried:
Copy the SystemUI.apk file from /system/priv-app/SystemUI/SystemUI.apk
Copy the frameworks from /system/frameworks/twframework-res.apk and /system/framework/framework-res.apk
Install all frameworks:
Code:
apktool if framework-res.apk
apktool if twframework-res.apk
apktool if SystemUI.apk
Decompile the apk:
Code:
apktool d SystemUI.apk
Edit res/values/dimens.xml with vim. Here is the patch of my edits:
Code:
--- /tmp/vqMxlsi/3 2015-08-19 18:23:07.346653666 -0700
+++ /tmp/vqMxlsi/4 2015-08-19 18:23:07.369986999 -0700
@@ -832,8 +832,8 @@
<dimen name="finder_connect_button_padding_top">11.0dip</dimen>
<dimen name="finder_connect_button_height">35.0dip</dimen>
<dimen name="finder_connect_layout_height">57.0dip</dimen>
- <dimen name="tw_quick_panel_sfinder_qconnect_button_text_size">16.0dip</dimen>
- <dimen name="tw_quick_panel_sfinder_qconnect_drawable_padding">5.0dip</dimen>
+ <dimen name="tw_quick_panel_sfinder_qconnect_button_text_size">0.0dip</dimen>
+ <dimen name="tw_quick_panel_sfinder_qconnect_drawable_padding">0.0dip</dimen>
<dimen name="notificatoin_big_picture_height">176.0dip</dimen>
<dimen name="rssi_battery_gap">3.0dip</dimen>
<dimen name="battery_icon_width">10.0dip</dimen>
Recompile the apk:
Code:
apktool b SystemUI
Zipalign the apk:
Code:
zipalign -v 4 SystemUI/dist/SystemUI.apk final/SystemUI.apk
Copy the new apk to my external sd
Connect with adb and do the following:
Code:
mount -o remount,rw /system
cd /system/priv-app/SystemUI
cp SystemUI.apk /storage/extSdCard/Backup/SystemUI.apk
rm SystemUI.apk
cp /storage/extSdCare/SystemUI.apk .
chmod 644 SystemUI.apk
reboot
Is there something else I am missing? It seems that after my edits, SystemUI.apk just doesn't launch at all. There isn't even an error message. But all I changed are those two lines. The problem is the same with or without the zipalign step. Doing essentially the same procedure above to restore the old SystemUI.apk brings everything back to normal, so I don't think it is a permissions issue. Wiping the cache and dalvik and restarting makes no difference, I have the same problem. Restarting a couple of times also does not resolve the problem.
Any ideas?
Click to expand...
Click to collapse
It's because it's odexed. That is why almost every ROM you see is deodexed except stock ROMs.
bilgerryan said:
It's because it's odexed. That is why almost every ROM you see is deodexed except stock ROMs.
Click to expand...
Click to collapse
Do you think it is possible for me to deodex it? I did that before after editing the smali as described above, but I didn't know what to do with the arm/ directory and so I just deleted it, and that didn't work (Got a SystemUI has crashed message).
MikeDacre said:
Do you think it is possible for me to deodex it? I did that before after editing the smali as described above, but I didn't know what to do with the arm/ directory and so I just deleted it, and that didn't work (Got a SystemUI has crashed message).
Click to expand...
Click to collapse
You would have to deodex the entire ROM.
bilgerryan said:
You would have to deodex the entire ROM.
Click to expand...
Click to collapse
Ah! I understand. Sorry for all of these super basic beginner questions. OK, so I am thinking about deodexing the system ROM now, I realize that I could just install an already made custom ROM, but I would like to try this.
As this is my first time trying this, could you clarify if this will work:
Download this tool: http://androidforums.com/threads/tool-linux-batch-lollipop-deodex-v1-9-8-9-15.931146/
Copy /system/app, /system/priv-app, and /system/framework to my computer
Run the 'deodex_lollipop' tool
Create a very simple flashable zip using the sample here: http://www.droidviews.com/create-flashable-zips-cwmtwrp-recovery/ with the contents of the deodexed /system folder I just created
Flash that in TWRP
Then make the edits I mentioned above to the SystemUI.apk
Will that work? Or is it likely to be very difficult?
If it does work, are there downsides to doing it? Not getting future updates, running slower, etc, or should it be basically the same as before except with the s-finder toolbar gone?
Thanks so much for all of your help, this is really great. :good:
MikeDacre said:
Ah! I understand. Sorry for all of these super basic beginner questions. OK, so I am thinking about deodexing the system ROM now, I realize that I could just install an already made custom ROM, but I would like to try this.
As this is my first time trying this, could you clarify if this will work:
Download this tool: http://androidforums.com/threads/tool-linux-batch-lollipop-deodex-v1-9-8-9-15.931146/
Copy /system/app, /system/priv-app, and /system/framework to my computer
Run the 'deodex_lollipop' tool
Create a very simple flashable zip using the sample here: http://www.droidviews.com/create-flashable-zips-cwmtwrp-recovery/ with the contents of the deodexed /system folder I just created
Flash that in TWRP
Then make the edits I mentioned above to the SystemUI.apk
Will that work? Or is it likely to be very difficult?
If it does work, are there downsides to doing it? Not getting future updates, running slower, etc, or should it be basically the same as before except with the s-finder toolbar gone?
Thanks so much for all of your help, this is really great. :good:
Click to expand...
Click to collapse
It should work but line with everything on here requires a lot of trial and error. If it sounds like something you want to try then go ahead.

[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.

Anyone successfully modded framework-res.apk ( Oreo ) ?

Anyone tried Modding framework-res.apk ( Oreo ) ? I have tried a few methods with apktool and was able to compile back to apk. But booting it with ended up in bootloop.
If anyone has successfully done this, try compiling one with enabling navigation bar in bools.xml and see if it gives persistent on screen buttons. ( I know there is a magisk module that does enable nav bar - but it often disappears after reboots. So not a good solution. )
mahfoozceecy said:
Anyone tried Modding framework-res.apk ( Oreo ) ? I have tried a few methods with apktool and was able to compile back to apk. But booting it with ended up in bootloop.
If anyone has successfully done this, try compiling one with enabling navigation bar in bools.xml and see if it gives persistent on screen buttons. ( I know there is a magisk module that does enable nav bar - but it often disappears after reboots. So not a good solution. )
Click to expand...
Click to collapse
which version of apktool did you use (pc or mobile)? you dont need to sign the apk. just extract meta-inf from the original apk and install/push it to the modded one. hth
mahfoozceecy said:
Anyone tried Modding framework-res.apk ( Oreo ) ? I have tried a few methods with apktool and was able to compile back to apk. But booting it with ended up in bootloop.
If anyone has successfully done this, try compiling one with enabling navigation bar in bools.xml and see if it gives persistent on screen buttons. ( I know there is a magisk module that does enable nav bar - but it often disappears after reboots. So not a good solution. )
Click to expand...
Click to collapse
Since you are modding system I assume you don't care about breaking safetynet. If it is so why dont you put
Code:
qemu.hw.mainkeys=0
in your build.prop.
This gives you persistant Nav Bar which you can further customize to your heart's content with Xposed.
---------- Post added at 09:06 AM ---------- Previous post was at 09:04 AM ----------
mahfoozceecy said:
Anyone tried Modding framework-res.apk ( Oreo ) ? I have tried a few methods with apktool and was able to compile back to apk. But booting it with ended up in bootloop.
If anyone has successfully done this, try compiling one with enabling navigation bar in bools.xml and see if it gives persistent on screen buttons. ( I know there is a magisk module that does enable nav bar - but it often disappears after reboots. So not a good solution. )
Click to expand...
Click to collapse
Since you are modding system I assume you don't care about breaking safetynet. If it is so why dont you put
Code:
qemu.hw.mainkeys=0
in your build.prop.
This gives you persistant Nav Bar which you can further customize to your heart's content with Xposed.
I am a bit rusty due to my break from xda, but IIRC you need to deodex for customization.
mahfoozceecy said:
Anyone tried Modding framework-res.apk ( Oreo ) ? I have tried a few methods with apktool and was able to compile back to apk. But booting it with ended up in bootloop.
If anyone has successfully done this, try compiling one with enabling navigation bar in bools.xml and see if it gives persistent on screen buttons. ( I know there is a magisk module that does enable nav bar - but it often disappears after reboots. So not a good solution. )
Click to expand...
Click to collapse
You can compile your changes as an overlay and put it in /vendor/overlay/

Categories

Resources