Removing Android 11 Notification Headers: status_bar_notification_section_header.xml - Galaxy S 5 Android Development (Snapdragon)

Hi,
What's a clean way to apply changes made to SystemUI.apk in an Android 11 ROM (and have those changes take effect) that I don't maintain? Direct overwriting is fine, but I need the changes applied/running. I'm fine with breaking things, have root, and have resolved boot breakages via ADB etc. I'm trying to get rid of the annoying notification section headers (Conversation, Silent, etc..) that waste screen real estate. I overwrite the XML file in the APK (status_bar_notification_section_header.xml) with 0 padding, and re-sign that APK with LuckyPatcher (its test key). What's a good way to apply my patched APK so that it works like the original, but with my changes? pm install patched_file.apk isn't perfect - APK is internal. And there's ODEX/VDEX files generated for the original APK (/system_ext/priv-app/SystemUI/ .... SystemUI.apk, oat/arm/*.odex, *.vdex). I had to do a pm grant to reading contacts when I applied a revised SystemUI.apk. Assume I don't have Android Studio and just want to work on the mobile.
What I'm attempting:
packages/SystemUI/res/layout/status_bar_notification_section_header.xml - platform/frameworks/base - Git at Google
status_bar_notification_section_header.xml:
<com.android.systemui.statusbar.notification.stack.SectionHeaderView
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="@dimen/notification_section_header_height"
androidaddingStart="0dp"
androidaddingEnd="0dp"
android:focusable="true"
android:clickable="true"
>

Related

[Q] Lock Screen xml?

Hope this isn't a double post.... I would like to change the lockscreen image to something other than the background of the phone. Maybe through editing the .xml file on the phone? etc. Anyone know of how to do this?
PS... PLEASSEEEEE don't reply with anything about widgetlocker. I know it exists I know it can do this but and I am not trying to nor do I want to use it for various reasons ...
Thanks in Advance.
-Adam
Here your are
had a little trouble with this, but here's a full guide that worked for me "tools used apk manager 4.9"
using the apk manager
1. pull /system/framework/framework-res.apk (option 0)
2. Decompile apk (option 9)
3. add your pic to drawable-mdpi (must be a .png) eg. lockscreen_background.png
4. open the file res\layout\keyguard_screen_tab_unlock.xml with notepad, and find the line
<RelativeLayout android:gravity="center_horizontal" android:id="@id/root" android:background="#70000000" android:layout_width="fill_parent" android:layout_height="fill_parent"
change to
<RelativeLayout android:gravity="center_horizontal" android:id="@id/root" android:background="@drawable/lockscreen_background" android:layout_width="fill_parent" android:layout_height="fill_parent"
5. compile the apk (option 9)
(when recompile do)
5.1. Hit yes to "system app".
5.2. Hit yes to restoring the files:
6. -Open the "keep" folder and delete resources.arsc and res\layout\keyguard_screen_tab_unlock.xml
7. when done rename unsignedframework-res.apk to framework-res.apk and put it back to /system/framework/ again (i did this in recovery)
Done
Awesome... Thanks.. Did you try this on the Droid X?
or can you change the lockscreen background to a dedicated image through ninjamorph? anyone have a quick tut on how to do this with a droid x?

[App] Patched Gmail to allow permission for third party notification widgets

This is a modified version of Gmail that fixes the database permissions of Gmail so third party notification widgets (such as Missed It!, Go Notification, and Pure Messenger Widget) can determine which emails are read and which emails are unread for a true unread email count.
Code:
diff -ru Gmail.org/AndroidManifest.xml Gmail/AndroidManifest.xml
--- Gmail.org/AndroidManifest.xml 2011-08-02 22:49:48.356157842 +0200
+++ Gmail/AndroidManifest.xml 2011-08-02 22:52:05.603773155 +0200
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest android:versionCode="169" android:versionName="2.3.5" package="com.google.android.gm"
xmlns:android="http://schemas.android.com/apk/res/android">
- <permission android:label="@string/read_perm_label" android:name="com.google.android.gm.permission.READ_GMAIL" android:protectionLevel="signature" android:permissionGroup="android.permission-group.MESSAGES" android:description="@string/read_perm_desc" />
- <permission android:label="@string/write_perm_label" android:name="com.google.android.gm.permission.WRITE_GMAIL" android:protectionLevel="signature" android:permissionGroup="android.permission-group.MESSAGES" android:description="@string/write_perm_desc" />
- <permission android:label="@string/auto_send_perm_label" android:name="com.google.android.gm.permission.AUTO_SEND" android:protectionLevel="signature" android:permissionGroup="android.permission-group.MESSAGES" android:description="@string/auto_send_perm_desc" />
+ <permission android:label="@string/read_perm_label" android:name="com.google.android.gm.permission.READ_GMAIL" android:protectionLevel="normal" android:permissionGroup="android.permission-group.MESSAGES" android:description="@string/read_perm_desc" />
+ <permission android:label="@string/write_perm_label" android:name="com.google.android.gm.permission.WRITE_GMAIL" android:protectionLevel="normal" android:permissionGroup="android.permission-group.MESSAGES" android:description="@string/write_perm_desc" />
+ <permission android:label="@string/auto_send_perm_label" android:name="com.google.android.gm.permission.AUTO_SEND" android:protectionLevel="normal" android:permissionGroup="android.permission-group.MESSAGES" android:description="@string/auto_send_perm_desc" />
<uses-sdk android:minSdkVersion="8" android:targetSdkVersion="8" android:maxSdkVersion="10" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
Requirements:
a) Your device does not come preinstalled with gmail so the original version can be completely uninstalled first before installing the modified version. After uninstalling original version of Gmail, install modified Gmail.apk as normal by running it.
OR
b) If you have root and your device has Gmail preinstalled in /system/app/Gmail.apk, then you have two choices. Either remove /system/app/Gmail.apk and install the modified version of Gmail normally by running the apk (to /data/app/Gmail.apk) OR replace /system/app/Gmail.apk with the modified version of Gmail. It is probably easier to remove Gmail.apk from the system partition and install it as a normal user application in /data/app/. However you want to do it..Gmail will install as a system or data application. To save space, I would not have it installed in both places.
Note: To simplify the installation of Gmail to the system partition for S-ON devices, I have added Gmail in a recovery flashable zip file format. This method requires busybox to be installed on your device. Make sure you uninstall any Gmail updates first, if possible. This method is only recommended if you have Gmail preinstalled to /system/app/Gmail.apk and you want to replace it with the modified version.
Note: After initially replacing or reinstalling Gmail with the modfied version, the notification widget (ie; Go Notification, Missed It!, or Pure Messenger Widget) needs to be reinstalled to regain premissions.
Note: Gmail 2.x is for Gingerbread. Gmail 3.x is for Honeycomb. Gmail 4.x is for ICS (but version 4.0.1 and 4.0.2 are reported working in Honeycomb too). At the time of this writing, ICS and Honeycomb support is limited. AFAIK, Pure Messenger Widget is the only third party notification widget that supports the ICS/Honeycomb Gmail protocol. Hopefully, more third party notification widgets will add support for ICS/Honeycomb in the future.
Updating from previous modified version of Gmail:
If you already have an older modified version of Gmail installed, the newer modified version of Gmail can be installed on top to perform the update. No need to remove the previously installed modified version of Gmail first.
Sources:
The latest versions of Gmail for ICS/Honeycomb are extracted from firmware from: http://www.sammobile.com/firmware/
Process:
1) Download latest Firmware from link above.
2) Extract files (this process requires linux)
a) Unzip or Unrar accordingly with samsung password (usually it is "samfirmware.com")
b) Extract again (tar -xf filename.tar.md5)
c) Extract again the largest file (a file.tar.md5 that is ~900MB) from the previous extraction. The largest file that is extracted contains the necessary system files. The system files can be found in two formats (system.rfs or factoryfs.img).
3) Process for reading system.rfs format (if system.rfs does not exist, skip to step #4)
a) Mount system.rfs using the following commands:
Code:
mkdir ~/tempdir
sudo losetup /dev/loop0 ./system.rfs
sudo mount -t vfat /dev/loop0 ~/tempdir
b) Copy necessary files to a writable location:
Code:
mkdir ~/workspace
cp -a ~/tempdir/system/framework ~/workspace/
cp -a ~/tempdir/system/apps ~/workspace/
c) Unmount and clean up
Code:
sudo umount /dev/loop0
sudo losetup -a
sudo losetup -d /dev/loop0
4) Process for reading factoryfs.img
a) Build ext4_utils from the following post: http://forum.xda-developers.com/showthread.php?t=1081239
b) Convert factoryfs.img to readable format with simg2img utility found in ext4_utils
Code:
simg2img factoryfs.img output.img
c) Mount output.img
Code:
mkdir ~/tempdir; sudo mount -o loop output.img ~/tempdir
d) Copy necessary files to a writable location:
Code:
mkdir ~/workspace
cp -a ~/tempdir/system/framework ~/workspace/
cp -a ~/tempdir/system/apps ~/workspace/
e) Unmount and clean up
Code:
sudo umount /dev/loop0
5) Creating classes.dex from Gmail.odex
a) Copy Gmail.odex into new framework directory from firmware image
Code:
cp ~/workspace/app/Gmail.odex ~/workspace/framework/
cd ~/workspace/framework/
b) Decompile odex file (api-level must be set accordingly) http://code.google.com/p/smali/
Code:
baksmali --api-levl 14 -x Gmail.odex
c) Compile output into classes.dex (api-level must be set accordingly)
Code:
smali --api-level 14 -o classes.dex out
6) Insert classes.dex into Gmail.apk
Code:
cp ~/workspace/app/Gmail.apk ~/workspace/framework/
mv Gmail.apk Gmail.zip
zip Gmail.zip -d META-INF/*
zip -o Gmail.zip classes.dex
mv Gmail.zip Gmail.apk
7) Decompile Gmail.apk with apktool (at the time of this writing it is apktool v1.4.3) http://code.google.com/p/android-apktool/
Code:
apktool d Gmail.apk
8) Edit AndroidManifest.xml (replacing "signature" with "normal"). See patch above for details.
9) Compile modified version of Gmail with apktool.
Code:
apktool b Gmail Gmail.mod.apk
Note: The current released version of apktool (1.4.3) will not be able to compile the resources for the new ICS api. Therefore, you will have to go into the res directory and delete all the resource directories that cause errors within apktool. After you delete those directories, you will see that apktool will also start showing errors in public.xml because resources are now missing. You will have to edit public.xml and delete the lines that show up as errors when compiling with apktool. Once you get the Gmail.mod.apk to build, extract the apk with unzip tool (unzip Gmail.mod.apk) and copy the extracted AndroidManifest.xml (in binary form) into an unaltered Gmail.apk that includes classes.dex. Rename original Gmail.apk to a zip file and insert the modified AndroidManifest.xml, then rename zip back to apk.
10) Sign Gmail with test keys:
Code:
java -jar /usr/local/bin/signapk.jar /usr/local/bin/testkey.x509.pem /usr/local/bin/testkey.pk8 Gmail.apk Gmail.mod-signed.apk
Not working on an HD2 with Android 2.3.2.
Uninstalled all Gmail updates to go back to stock --> mod didn't install.
Updated to gmail 2.3.5 --> mod didn't install.
Deleted the updates and installed Gmail 2.3.4 --> mod didn't install
u sure this can work?
I thought about the same, but gmail surely requires permissions from talk.apk for google connection... which is again signature protected.
I would assume you have to be rooted and use some kind of file manager to force this into place and even then, if as mentioned, you don't have any of the other files patched that are required... not gonna help so much.
Thanks for trying though.
I'm afraid gmail is sort of dead in the water until google decides to back down or provide some reasonable means of interaction for 3rd party applications.
This will only work if:
a) your phone does not come preinstalled with gmail so that it can be removed first before installing the modified version.
b) if you have root and can rename this file to Gmail.apk and copy it to system/app/ (replacing the original).
This fixes the database permissions of Gmail so third party applications can get the email count (such as Missed It! and Go Notification.
Note: After replacing or reinstalling Gmail, the notification widget (ie; Go Notification or Missed It!) needs to be reinstalled to regain premissions.
Fr4gg0r said:
u sure this can work?
I thought about the same, but gmail surely requires permissions from talk.apk for google connection... which is again signature protected.
Click to expand...
Click to collapse
This is unrelated to Talk.apk.
Alright, got it to work.
Updated to 2.3.5 from market from 2.3.4.
FC with "SMS unread count" and "Email Notifier"
Uninstalled these 2 apps.
Deleted gmail.apk from systems/apps (made back up first) with Root Explorer
Renamed modded version from Tsjoklat to gmail.apk and copied to system/apps with Root Explorer and set permissions to rw-rwe-re
Rebooted.
Installed Sms Unread Count and Email Notifier again and it's working. No FC's yet.
Definitely will try this tonight.
This is awesome! Can use the latest Gmail and SMS Unread Count widgets, I can't believe more don't know about this or use it!
another workarround
in order to have widgets working with gmail 2.3.5 you only need to resign the gmail 2.3.5 and widgets.
actions:
- download original gmail 2.3.5 from the android market
- copy the apk to your pc
- resign with apkmanager (you don't need to make any change in manifest.xml)
- uninstall original gmail in your android
- install resigned gmail in your android
make the same actions with your widgets...
works fine with "sms unread notifications", "gmail notifier", etc.
note 1: note that this method prevents other applications to access to your messages
note 2: when the widgets or gmail are updated in market, you need to uninstall resigned app in order to update. next, make the same actions...
Bunecarera said:
Alright, got it to work.
Updated to 2.3.5 from market from 2.3.4.
FC with "SMS unread count" and "Email Notifier"
Uninstalled these 2 apps.
Deleted gmail.apk from systems/apps (made back up first) with Root Explorer
Renamed modded version from Tsjoklat to gmail.apk and copied to system/apps with Root Explorer and set permissions to rw-rwe-re
Rebooted.
Installed Sms Unread Count and Email Notifier again and it's working. No FC's yet.
Click to expand...
Click to collapse
niiice...ive been trying to get this working since the gmail update
Bunecarera said:
Alright, got it to work.
Updated to 2.3.5 from market from 2.3.4.
FC with "SMS unread count" and "Email Notifier"
Uninstalled these 2 apps.
Deleted gmail.apk from systems/apps (made back up first) with Root Explorer
Renamed modded version from Tsjoklat to gmail.apk and copied to system/apps with Root Explorer and set permissions to rw-rwe-re
Rebooted.
Installed Sms Unread Count and Email Notifier again and it's working. No FC's yet.
Click to expand...
Click to collapse
don't need to use the patched version. do you only need to resign the gmail (original)
and resign all your mail based widgets (like "sms unread count", "email notifier", at all)
bartito said:
in order to have widgets working with gmail 2.3.5 you only need to resign the gmail 2.3.5 and widgets.
actions:
- download original gmail 2.3.5 from the android market
- copy the apk to your pc
- resign with apkmanager (you don't need to make any change in manifest.xml)
- uninstall original gmail in your android
- install resigned gmail in your android
make the same actions with your widgets...
works fine with "sms unread notifications", "gmail notifier", etc.
note 1: note that this method prevents other applications to access to your messages
note 2: when the widgets or gmail are updated in market, you need to uninstall resigned app in order to update. next, make the same actions...
Click to expand...
Click to collapse
I can never do things the straight forward simple way. Let's say I've got a 2.3.5 transparent gmail.apk and I want to do the above, will that work? To further complicate things apkmanager always errors out on me, I've been using android-utility on Mac. When I try to sign the apk it wants to know what to use to sign it - test key or private key. I chose test key for the gmail.apk and it installed fine. Tried the same with Launcher Pro and it would not install. Am I overlooking something simple or is this a can of worms?
scorpio333 said:
I can never do things the straight forward simple way. Let's say I've got a 2.3.5 transparent gmail.apk and I want to do the above, will that work? To further complicate things apkmanager always errors out on me, I've been using android-utility on Mac. When I try to sign the apk it wants to know what to use to sign it - test key or private key. I chose test key for the gmail.apk and it installed fine. Tried the same with Launcher Pro and it would not install. Am I overlooking something simple or is this a can of worms?
Click to expand...
Click to collapse
i have tried to resign gmail, sms unread count, gmail notifier and launcherpro with success. i don't have tried to modify the gmail, only resign. sorry, i don't known if is possible.
How do you resign
[email protected] said:
How do you resign
Click to expand...
Click to collapse
use apkmanager (search for it in xda)
Thank you
Thank you. LauncherPro Gmail widget is working again.
Just uninstall Gmail,
install patched one,
re-install LauncherPro.
Done
I use a transparent copy. do I just uninstall it. resign it then install it?
worked for me s5660
No problems here. I used root uninstaller to remove gmail. Did not see gmail.apk in system/app prior to doing this even though gmail was working. Then simply copied and renamed modified gmail file to system/app (not sure if that's needed) and ran it to install. It requested some sort of permission for gmail to read my emails. I then reinstalled the 3rd party application and everything was working. Thanks for the file!
.
@OP
Please use tags, edited your post

[GUIDE](INTERACTIVE) HOW-TO Get Started Themeing/Modding [rev. 8/26/12]

*THIS HOPES TO SERVE AS A SLIPPERY STEPPING STONE FOR THOSE VENTURING INTO THE MODDING SCENE - AND FOR ANYONE TO POST THEIR QUESTIONS, ANSWERS, REQUESTS, AND COMMENTS ABOUT THEMES/MODS*
NOTE: This is still a WIP... I will clean it up, add/remove/replace as I, and others, see fit. Trying to make this a good resource for those wanting to journey into the rabbit hole..
I will try to make this as general as possible, but it is still mostly based off of Windows 7 OS. I will attempt to incorporate Linux (Ubuntu) as I can. Also, I urge other devs and users to please offer your advice or comments on how to make this thread as useful as possible, "I accept opinions, phone numbers, and the fact that not everyone wants smiles and eye contact" (sorry, homage to doseone - couldn't resist) - but PM's or posts are fine...
Finally, I have said it before about Android, and will say it again.. “there is more than one way to skin a cat...” meaning, that there are many, many ways to achieve the same outcome with different methods (but, I’m not sure who would want to skin a cat, and what for… but I guess I don’t even want to know where that phrase came from) - so, PLEASE SEARCH for more information, methods, tricks, and techniques - I can't fit everything under the sun into two posts - plus, I still got a lot to learn myself ...
Tools
Java JDK
Android SDK
7-zip (or similar file manager)
Notepad++ (or similar text editor – do not use windows notepad!)
GIMP (or similar image editor)
Sign+ (or similar zip-signing program)
Getting files from your phone
-Root browser: copy from original file location to sdcard
-adb pull (I will not go into an adb tutorial, but here’s an example):
Code:
adb pull /system/app/SystemUI.apk C:\Pulled
(I have two folders (“Pulled” and “Push”) in the root of my C:\ drive, where I do all my pulling and pushing)
-Take from a cwm backup (nandroid)
-Make a System Dump through adb (this is just something kind of fun, but not so necessary):
Code:
adb shell
su
busybox tar czvf /sdcard/systemdump.tgz /system
exit
exit
adb pull /sdcard/systemdump.tgz
You can delete it from your sdcard once it’s on your computer.
(for a Data Dump, just change the location to /data, and rename the tar file output..)
Edit png/jpeg images
-use 7-zip, winzip, (or stock File Roller on Ubuntu)
-GIMP or Photoshop (work best – but there are many other “tools” out there)
-open the apk (archive) with one of the above mentioned file managers and navigate to the appropriate /res/drawable folder (usually drawable-hdpi, but not only..). And, either copy the files you want to edit directly from there to your desktop or working folder, and make edits and/or drop your replacement files in the appropriate drawable folder in the apk with your file manager. Then move to your system to try it out.
GIMP Notes (it’s what I’m most familiar with, so, Photoshop users use your similar methods):
-Many times the images are in “Indexed” color mode. Go to Image>Mode and change it to RGB mode to avoid editing troubles.
-In GIMP 2.8.0, use the “Export..” feature to save your edited images (in older versions, use “Save as..”), and given quality options, I usually tend to the highest, and all boxes checked.
Decompiling/editing apks
Decompiling apks is necessary to edit .xml files and .9.png files.
See here for more information on the original apktool by brut.all: http://code.google.com/p/android-apktool/ <-- for ICS framework-res.apk, you need to decompile with v1.4.2, and compile with v1.4.3
See here for new version (v1.4.9) of apktool taken over by iBotPeaches: http://forum.xda-developers.com/showthread.php?t=1755243 <-- USE THIS ONE (it works for decompiling AND recompiling framework-res.apk on ICS)
More resources for decompiling/recompiling:
http://forum.xda-developers.com/showthread.php?t=1752201
http://forum.xda-developers.com/showthread.php?t=1466100
Some Tools:
APK Manager/APK Multi-Tool: http://apkmultitool.com/?q=node/5
APK Changer: http://forum.xda-developers.com/showthread.php?t=1189971
Studio Android: http://forum.xda-developers.com/showthread.php?t=1491689
Tickle My Android: http://forum.xda-developers.com/showthread.php?t=1633333
-use apktool alone (see above links for details)
-use an APK editing program (I still mostly use APK Manager v5.0.2 and switch out the apktool files)
-set the proper framework for apktool by placing framework-res.apk, moto-res.apk, blur-res.apk, and SystemUI.apk in the same folder as apktool.jar. Then, open the command prompt or terminal on that folder (need to hold shift and right-click maybe), and type the following, one at a time for each of the four apks listed above, hitting Enter after each entry (note that not all 4 apks are needed for all files, but it doesn’t hurt):
Code:
apktool if framework-res.apk
You should get a “Framework installed to:” message after each, showing you the location to which they were saved. Note on that: In all actuality, you could simply drop a copy of each in the \apktool\framework folder (my path is C:\Users\Owner\apktool\framework\), but rename them as following:
framework-res.apk --> 1.apk
moto-res.apk --> 2.apk
blur-res.apk --> 3.apk
SystemUI.apk --> 127.apk
Re-compiling apks
When compiling system apks, the trick is to save the original signatures (META-INF) folder, the AndroidManifest.xml (unless you are editing that but, that’s a whole different story depending on the apk), and not to compress the resources.arsc file (where all of the /values folders get hidden). Some apk tools do some of the work for you, but here’s few methods (they can be dependent on what was edited):
-after re-compiling your apk, copy your edited and compiled files back over to the original apk to preserve signatures and everything else you did not edit (do this with two 7-zip windows open). For edits to any xml in the /values folders, you need to copy over the resources.arsc also (see next note).
-after editing anything in the values folder, you need to re-insert the resources.arsc without compression. For example, rename your SystemUI.apk to SystemUI.zip, take out the newly compiled resources.arsc with your file manager and then “Add to archive..” that resources.arsc to the SystemUI.zip in “Store” mode (or “No compression”). Then rename the .zip back to .apk, and you should be good to go (you can check the compression directly in the 7-zip window – if the “Size” and “Packed size” values are different, then it’s compressed).
-you can also do it vice-versa, and copy the original META-INF, AndroidManifest.xml, etc., to your edited apk with 7-zip
-if you want to edit the AndroidManifest.xml, depending on the specific apk, be prepared to re-sign nearly all system and framework apps
Edit 9patch (.9.png) images
Do some research on what 9patch images are and how they work, but the most important point is to not disturb the 1-pixel black border around the image, unless you want to redraw it. You must decompile in order to edit 9patch images.
-use GIMP or Photoshop
-use draw9patch included in the android-sdk (fool-proof)
-with GIMP you can select the inner area, leaving the 1-pixel border unselected, and edit colors and such that way
-draw9patch is included in the /tools folder in the Android SDK, it only allows you to edit the 1-pixel border and only draws in #000000 (black) color. It will add one pixel to all sides if you are not careful, so you may need to resize it (down 2 pixels) with GIMP first
Baksmali/smali classes.dex (jar/apk files)
You need to have deodexed files to edit the classes.dex and the smali files within. See here for more info, downloads, and the definition of smali, baksmali, and dalvik: http://code.google.com/p/smali/
-decompiling the apk or jar with apktool will also disassemble (for editing) the smali files
-I used to use this baksmali/smali set with tutor (a good resource): http://forum.xda-developers.com/showthread.php?t=1136625
-or, as I typically do now, just remove the classes.dex from the apk/jar and just baksmali, edit, then smali that into a new-classes.dex. For example, I have a folder called smali_bak on my desktop containing baksmali.jar, smali.jar, and a .txt file with the commands shown below (I’m lazy to type it each time, so I copy and paste) – I put the classes.dex that I wish to edit in that same folder, then open the command prompt on that folder and type the following:
To disassemble (baksmali):
Code:
java -jar baksmali.jar -o classout/ classes.dex
To assemble (smali):
Code:
java -Xmx512M -jar smali.jar classout/ -o new-classes.dex
Then, rename it to classes.dex and drop it in the original apk or jar file with a file manager (no need to worry about compression with the classes.dex, as far as I know)
Deodex and create new odex files
Deodexing is basically the process of converting your .odex files into classes.dex files, and inserting those into the apk/jar - basically. And, re-odexing is the opposite - basically.
See cogeary's excellent guide on deodexing for an excellent guide on deodexing.
-xUltimate v2.4+ works well for deodexing
-see also dsixda's Android Kitchen, and there are many other tools for deodexing..
-See here for manual deodex methods: http://forum.xda-developers.com/showthread.php?t=1208320
-See here for a tool/guide to create a new odex file: http://forum.xda-developers.com/showthread.php?t=1853523
This is the new bootclass path for us (and a bunch of other Motos) to use with ICS (taken from /init.rc, minus the jars that didn't exist in /system/framework):
Code:
/system/framework/core.jar:/system/framework/core-junit.jar:/system/framework/bouncycastle.jar:/system/framework/ext.jar:/system/framework/framework.jar:/system/framework/framework-ext.jar:/system/framework/android.policy.jar:/system/framework/services.jar:/system/framework/apache-xml.jar:/system/framework/filterfw.jar:/system/framework/com.motorola.android.frameworks.jar:/system/framework/com.motorola.android.widget.jar:/system/framework/com.motorola.frameworks.core.addon.jar
Methods to move your modded files to your phone
-Create cwm recovery flash zips: Create a zip package (normal compression is fine) containing the proper folder structure (for example: /system/app/ and put your apk in the /app folder if that’s where it belongs). I have two folders on my desktop: /system and /META-INF, which I re-use basically for any flashable zip that I make (except ROM’s, of course). The /system folder has an /app folder or /framework folder usually, depending on what I was last working on (but it can obviously have different paths and many folders if need be), and in the /META-INF/com/google/android folder is an updater-script, and an update-binary file (just grab those from another update.zip mod package around here for now). The updater-script has the installation (or removal) info – meaning the location, permissions, and so on… After you create a zip package with those items and your modded files, then use a program like Sign+ to sign the package (or don’t but then you will need to toggle signature checks in recovery mode before installing). This will create three new files in the /META-INF folder (two CERT files and a MANIFEST).
-Use adb to push the files (don’t forget to set proper permissions!):
-Use Root Explorer (or similar) to move it (don’t forget to set proper permissions!):
NOTE: When experimenting with system files, please have a backup accessible just in case. Or, as I often do, make two zip packages - one with the modded files, and one with the original files to restore if necessary. And, as always, you are responsible for what you do to your device.
FURTHER READING:
Since I am obviously not the first to put something like this together, here are a few other general themeing guides:
Guide by theimpaler747: http://forum.xda-developers.com/showthread.php?t=916814
Guide by Nottach: http://forum.xda-developers.com/showthread.php?t=1186819
Interactive help thread by jeffsanace: http://forum.xda-developers.com/showthread.php?t=1605509
More (possibly out-dated) tips from Stericson: http://forum.xda-developers.com/showthread.php?p=3175518
See also this theming guide - did not read fully through it, but looks promising.
[HOW-TO] ADB/Change Moto Lockscreen to AOSP
BRIEF GUIDE TO USING ADB:
I will run through some example commands using adb - like pulling files from phone, pushing files to phone, deleting, setting permisisons, etc..
If you have adb set up in your environmental variables or .bashrc, then you can simply open a command prompt on the folder you would like to use adb from (right-click, or hold shift and right-click on the folder). Just always keep in mind your paths and folder structures.. Also, see HERE for more on adb.
Make sure you have adb and your device drivers installed and set up properly, then connect your usb..
Code:
#Terminates the adb server process (can help clear up adb issues):
adb kill-server
#Starts adb (or just use any adb command to start):
adb start-server
#List attached devices
adb devices
#Start logcat (Ctrl+C will terminate the current process)
adb logcat
#To pull files to the folder in your command prompt/terminal path
adb pull /system/framework/framework-res.apk
adb pull /system/etc/paranoid/preferences.conf
adb pull /cache/recovery/last_log
#To push files to our phone we need to first push them to the sdcard (also making a new directory on the sdcard called "newfolder")
adb push framework-res.apk /sdcard/
adb push SystemUI.apk /sdcard/
adb shell mkdir /sdcard/newfolder
adb push dexopt-wrapper /sdcard/newfolder
#To start a remote shell in the attached device and get superuser access
adb shell
su
#The following commands need to be run from shell..
#Mount /system re-writable
mount -o rw,remount -t ext3 /dev/block/system /system
#Copy files from sdcard to system
cp /sdcard/framework-res.apk /system/framework
cp /sdcard/SystemUI.apk /system/app
cp /sdcard/newfolder/dexopt-wrapper /system/bin
#Set proper permissions
chmod 0644 /system/framework/framework-res.apk
chmod 0644 /system/app/SystemUI.apk
chmod 0755 /system/bin/dexopt-wrapper
#Remove dalvik-cache and/or other files (note: on some ROMs, dalvik-cache is in /cache/dalvik-cache)
rm /data/dalvik-cache/[email protected]@[email protected]
rmdir /sdcard/newfolder
#Mount /system read-only (not necessary if rebooting right away)
mount -o ro,remount -t ext3 /dev/block/system /system
#Exit shell
exit
exit
#Reboot the device
adb reboot
Change Moto Lockscreen to stock AOSP (MultiwaveView)
(FYI - In GB it was a simple bools.xml edit to switch the Moto lock off.. and there's probably another way to do this - like by bypassing the zz_moto stuff entirely, but..)
If you have a custom locksceen already, then this probably doesn't apply or has already been done...
-decompile framework-res.apk
-open /res/layout/zz_moto_keyguard_unlock_widget.xml with Notepad++, Geany, or similar text editor
-delete all text there, and replace with this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.internal.widget.multiwaveview.MultiWaveView android:orientation="horizontal" android:id="@id/unlock_widget" android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_alignParentBottom="true" android:targetDescriptions="@array/lockscreen_target_descriptions_with_camera" android:directionDescriptions="@array/lockscreen_direction_descriptions" android:targetDrawables="@array/lockscreen_targets_with_camera" android:handleDrawable="@drawable/ic_lockscreen_handle" android:rightChevronDrawable="@drawable/ic_lockscreen_chevron_right" android:waveDrawable="@drawable/ic_lockscreen_outerring" android:outerRadius="@dimen/multiwaveview_target_placement_radius" android:hitRadius="@dimen/multiwaveview_hit_radius" android:vibrationDuration="20" android:snapMargin="@dimen/multiwaveview_snap_margin" android:feedbackCount="3" android:verticalOffset="0.0dip" android:horizontalOffset="0.0dip"
xmlns:android="http://schemas.android.com/apk/res/android" />
Stopping here and recompiling would give you something like this:
{
"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"
}
The above just changes the "widget" to the aosp multiwaveview and uses resources/drawables that we already have, which Moto decided to overlay with theirs (adding more bulk to the apks/jars)...
To edit the layout (remove/rearrange things in general), you need to edit keyguard_screentab_unlock.xml in the same folder - it's all there - the clock, date, sound toggle, horz. divider, charge (@id/status1) and alarm icons, unlock widget, music controls, etc... just play around with things..
To add the phone and text msg icons to the unlock widget, we need to edit the android.policy.jar and other xmls in framework-res.
More to come on that...
For Honeycomb style ripple lockscren mod, see here: http://forum.xda-developers.com/showpost.php?p=33854556&postcount=70
Change Clock Color in Status Bar (OUTDATED: FOR GB)
(This is a method I came up with myself)
-First, find a color that you want for your status bar clock.
-Now, find the hex code (combination of 6 letters and numbers) for that color --> see HERE, and/or HERE, and the Android Design guide for colors HERE. You may also use programs like GIMP and Photoshop to preview colors by hex code.
*For reference, 000000 is the absence of color (completely black), on the other end is ffffff (full on, all blinding color - completely white). Also, 33b5e5 is for ICS blue, 99cc00 is for android green (used below in the example).
-Decompile SystemUI.apk
-Open /res/layout/status_bar.xml (with a proper text editor like Notepad++)
-Look for the line that I highlighted in blue (from stock 2.3.6):
Code:
<?xml version="1.0" encoding="utf-8"?>
<com.android.systemui.statusbar.StatusBarView android:orientation="vertical" android:background="@drawable/statusbar_background" android:focusable="true" android:descendantFocusability="afterDescendants"
xmlns:android="http://schemas.android.com/apk/res/android">
<LinearLayout android:orientation="horizontal" android:id="@id/icons" android:layout_width="fill_parent" android:layout_height="fill_parent">
<TextView android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:textSize="16.0sp" android:textStyle="bold" android:gravity="left|center" android:id="@id/onsText" android:paddingLeft="6.0px" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" android:maxLength="18" />
<com.android.systemui.statusbar.IconMerger android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/notificationIcons" android:paddingLeft="6.0dip" android:layout_width="0.0dip" android:layout_height="fill_parent" android:layout_weight="1.0" android:layout_alignParentLeft="true" />
<LinearLayout android:gravity="center_vertical" android:orientation="horizontal" android:id="@id/statusIcons" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_alignParentRight="true" />
[COLOR="Blue"]<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" android:gravity="left|center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />[/COLOR]
</LinearLayout>
<LinearLayout android:orientation="horizontal" android:id="@id/ticker" android:paddingLeft="6.0dip" android:animationCache="false" android:layout_width="fill_parent" android:layout_height="fill_parent">
-Add the code android:textColor="#ff33b5e5" to the line that starts with <com.android.systemui.statusbar.Clock as shown highlighted red below (NOTE: Insert your choice of hex code here - the 33b5e5 is just used as an example):
Code:
<com.android.systemui.statusbar.Clock android:textAppearance="@android:style/TextAppearance.StatusBar.Icon" [COLOR="Red"]android:textColor="#ff99cc00"[/COLOR] android:gravity="left|center" android:paddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />
Again, insert your choice of color in the blanks> android:textColor="#ff------"
-Make sure your spaces are uniform and then save the xml.
-Compile the apk, and use your own method for copying signatures (I use APK Manager, it does it for you)
-Move to your phone by your own means... Enjoy! Please don't blame me if you mess something up!
Related:
There are a lot more mods with partial direction in individual posts throughout this thread.. read on, if interested. I will hopefully compose a location list or something for some of these other mods in the near future.. until then, good luck, and godspeed...
HOW-TO Remove Carrier Name from Status Bar
Bools.xml mods list
Very nice! A while ago I figured out a different way to do it, having to do with editing framework-res/res/values/styles.xml and changing a color code in there. But your way is a bit simpler .
Thanks for the guide! It would be awesome if this thread turned into something like this (see the 2nd and 3rd posts).
cogeary said:
Very nice! A while ago I figured out a different way to do it, having to do with editing framework-res/res/values/styles.xml and changing a color code in there. But your way is a bit simpler .
Click to expand...
Click to collapse
I've learned that there are definitely multiple ways to skin a cat, in terms of themeing android - I went the long way with inverting some apks in Romulus (I did not touch the AndroidManifest), and that forced me to learn how to read and understand this "extensible markup language" a bit better - and to correct my text color issues, I learned that you can just add the text colors if you find the right xml...
cogeary said:
Thanks for the guide! It would be awesome if this thread turned into something like this (see the 2nd and 3rd posts).
Click to expand...
Click to collapse
Oh boy, I should've reserved more posts for something like that! I would love to put something comprehensive together like Nottach did, but with ICS coming, I know a few things will change - so, I figure I'm better off waiting and learning that system first..
Not sure why but I couldnt find those exact lines you have in the exampme box. And whats with the crazy symbols? Sorry man...still a lil new as you know at messing with this type of stuff.
sorry the pics are so ****ty. Lo-light, laptops and cameras/phones dont mix well lol. Thanks in advance man.
Sent From MY DROID That DOES! Not YOUR APPLE That DIDN'T!
^
I think you just unzipped, did not decompile SystemUI.apk
DX2Trip said:
Not sure why but I couldnt find those exact lines you have in the exampme box. And whats with the crazy symbols? Sorry man...still a lil new as you know at messing with this type of stuff.
sorry the pics are so ****ty. Lo-light, laptops and cameras/phones dont mix well lol. Thanks in advance man.
Sent From MY DROID That DOES! Not YOUR APPLE That DIDN'T!
Click to expand...
Click to collapse
Did u decompile the apk ?? That's y u probably got the wired symbols
Sent from my MB865 using xda premium
You are going to need to decompile the apk to be able to read those xmls...
I use APK Manager 5.0.2 for Windows - see updated OP.
Then read up on some other threads about the process, also check the carrier name removal post I linked in OP#2... but yea, there is good literature on de/recompiling out there..
P.S. - for me, all of my codes in the op's are botched and have smiley faces on the xda app - I did use code tags..!? Reference them on a computer for easier reading...
Sent from my phone's mind
EDIT: edited.
I updated the heck out of this thread to give some guidance on using APK Manager for decompiling and compiling (at least they way I do it)... hope it helps a few people.
Man...seem to always run into an error. Any thoughts? Don't know why it shows up as status bar right before installing. It does say SystemUI.apk in the folder though...
Sent From My DROID That DOES Not My APPLE That DIDN'T.
Are you getting errors compiling the apk? How are you trying to install the apk on your phone? It looks like some sort of SystemUI is installed from your pic (since you still have a status bar showing)... But, the Status Bar process is the SystemUI.apk. So, I'm a little confused..
I need a bit more info on how you're doing things to try and help you better..
Are you getting errors compiling the apk? How are you trying to install the apk on your phone? It looks like some sort of SystemUI is installed from your pic (since you still have a status bar showing)... But, the Status Bar process is the SystemUI.apk. So, I'm a little confused..
I need a bit more info on how you're doing things to try and help you better..
Click to expand...
Click to collapse
My bad lol, should have explained better. No errors decompiling, editing, compiling or signing. Just trying to install right from the root folder I placed it on in my SD. Don't know if its because it wont install over the OG SystemUI.akp or what. Yeah the OG was still intact while I tried installing the edited one. In fact I tried just moving the edited one into my system apps n it kept forceclosing to the point where I had to reboot and when it started back up I had no status bar at all! lol no worries though, had a nandroid and have still been trying to figure it out...maybe signatures have somthing to do with it. Idk...
heres what it looks like on the SD card. But right when I press it, it turns into status bar...odd.
Sent From My DROID That DOES Not My APPLE That DIDN'T.
I followed the instructions to the letter worked great ur awesome. Got my status bar clock red yea buddy lol
Sent from my MB865 using xda premium
DX2Trip said:
My bad lol, should have explained better. No errors decompiling, editing, compiling or signing. Just trying to install right from the root folder I placed it on in my SD. Don't know if its because it wont install over the OG SystemUI.akp or what. Yeah the OG was still intact while I tried installing the edited one. In fact I tried just moving the edited one into my system apps n it kept forceclosing to the point where I had to reboot and when it started back up I had no status bar at all! lol no worries though, had a nandroid and have still been trying to figure it out...maybe signatures have somthing to do with it. Idk...
Sent From My DROID That DOES Not My APPLE That DIDN'T.
Click to expand...
Click to collapse
I used root explore to move my SystemUI.apk into system/app folder with permission set at rw-r-r override and replace old 1 reboot and should be fine
Sent from my MB865 using xda premium
DX2Trip said:
My bad lol, should have explained better. No errors decompiling, editing, compiling or signing. Just trying to install right from the root folder I placed it on in my SD. Don't know if its because it wont install over the OG SystemUI.akp or what. Yeah the OG was still intact while I tried installing the edited one. In fact I tried just moving the edited one into my system apps n it kept forceclosing to the point where I had to reboot and when it started back up I had no status bar at all! lol no worries though, had a nandroid and have still been trying to figure it out...maybe signatures have somthing to do with it. Idk...
Sent From My DROID That DOES Not My APPLE That DIDN'T.
Click to expand...
Click to collapse
Thank goodness for cwm on boot and fresh backups ..
Well, I can tell you right off the bat that your method of installation is giving you problems. Also, don't sign the SystemUI.apk, you want to retain the original signature.
It is possible to move it on your phone with root explorer, but I know some people are against this method.. but, here it goes anyway..
-First go and check the permissions of (and possibly make a copy of) the file that you want to replace. Go to the file location, mount R/W, and long-press the file and choose permissions - and remember them, or write it down. (Note: All apps and framework in /system are rw-r--r--)
- Next, copy the new file that you want to put on your phone from your sdcard.
- IMPORTANT: Paste it in another system folder besides the final destination and SET the proper PERMISSIONS and rename if necessary to match the file you are replacing (need to mount R/W first). For example, paste your edited SystemUI.apk in the /system folder (NOT directly in the app folder), and change the perms there..
- IMPORTANT: Long-press on the file you are moving and select "MOVE".
- Then paste it in the final destination folder (i.e. /system/app), and select ok to overwrite the existing.
- Don't try to do anything else except reboot. And, it would be nice to wipe dalvik and cache partition while you are rebooting, if you have the chance.
Please, if anyone tries this method, be cautious, use CWM on Boot, and have a fresh backup just in case.. also, I assume no responsibility for your actions.. I have done this multiple times with many different file types and locations..
Sent from my phone's mind
chrisn91 said:
I followed the instructions to the letter worked great ur awesome. Got my status bar clock red yea buddy lol
Sent from my MB865 using xda premium
Click to expand...
Click to collapse
Very cool! Glad to hear it worked for you! You got a screenshot of the red?
Sent from my phone's mind
Yea..
Im reading on how to center my lockscreen clock and changing the color red as well
Sent from my MB865 using xda premium
chrisn91 said:
Yea..
Im reading on how to center my lockscreen clock and changing the color red as well
Sent from my MB865 using xda premium
Click to expand...
Click to collapse
Nice. You make all the edits yourself or is that a custom rom? Either way, lookin good, man.. keep it up!
And, I was also just about to dig into a few things, lockscreen clock color happens to be one of them.. but, I got the old moto lockscreen (which has a centered clock), so I'm thinking those xmls might be in a different place than the new moto lockscreen stuff... we'll see..
Sent from my phone's mind
alteredlikeness said:
Nice. You make all the edits yourself or is that a custom rom? Either way, lookin good, man.. keep it up!
And, I was also just about to dig into a few things, lockscreen clock color happens to be one of them.. but, I got the old moto lockscreen (which has a centered clock), so I'm thinking those xmls might be in a different place than the new moto lockscreen stuff... we'll see..
Sent from my phone's mind
Click to expand...
Click to collapse
Its a little of both. I.did some theming to sv6 with some pngs from other roms although I've learned alot here creating a img from scratch is a hard thing for me to grasp lol. I've tried many times to change the status bar clock but it won't work I would get systemui force closures or no change at all but thanks to ur steps and how to guide I got it
Sent from my MB865 using xda premium
Well I couldn't figure it out for the old native AOSP jog tab lockscreen, but I managed to change the clock and date color on the new Moto sliding door lockscreen... also changed the font style of the clock to DroidSans (which is actually Ubuntu font on Romulus, the default system font - it was Chulho_Neue)..
But, as you can see, I didn't get the "charging" text color. Also didn't look at moving the position yet..
Oh, yea... it's in framework-res.apk/layout/zz_moto_sd_keyguard_screen_tab_unlock.xml - look for the lines with the ids "timeDisplay", "am_pm", and "date"...
But the zz_moto_keyguard_screen_unlock_portrait.xml threw me off, and may have something more to do with this...
I'll try to look into this and post something better 2moro..
Sent from my phone's mind
EDIT: I think I just found it for the native jog tab lock... in a very obvious place: keyguard_screen_tab_unlock.xml (without the zz_moto_sd part, obviously) - this may help to center the zz_moto_sildingdoor lockscreen text as well... get some ideas or lines of code from it, and copy it over to the zz_moto keyguard xml..

[Guide:] The Definitive APK Modding and Theming Thread...

First of all, you don't actually need to be a "developer" as such to be able to theme and you don't need to know or have to learn lots of code either.
Secondly, EVERYTHING you need to know and need to use to modify an .apk is in this 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"
}
The greatest thing about Android is that you can change just about every element of the U.I and it’s really easy to do too. I wrote this guide to share the experience and knowledge I've gained since joining xda to debrand my SonyEricsson XPERIA X10i that was running Gingerbread. In 2017 there are a few different ways you can theme a ROM.
Apktool, which can decompile an .apk allowing you to modify your own .xmls and .9png images, which is what this thread will focus on.
RRO, Xposed essentially overlay themes or mods.
There is a variety of programs that use a GUI to do the work of Apktool for you, some good, some bad but at the end of the day they all ultimately do what you can easily do yourself in a faster, cleaner and more efficient manner in my opinion.
Overlaying doesn't cover every element so falls short of a one stop solution for being able to fully theme a ROM and is a bit more complex and/or restrictive in it's approach.
Tools you're going to need:
Java - Do this first if you don't have it installed already.
Apktool - The main tool for decompiling and recompiling apks.
Notepad++ - An essential program for xml editing!
Photoshop or Gimp - You'll need one of these for image editing.
7-Zip or WinRar - Required for working with apks.
We also need the ADB files from the SDK Platform and a sign.jar but to simplify this as much as possible I've made a zip for you to download which contains Apktool and everything else you need that you haven't got from the list above.
Download APKTool_2.2.4.zip to a location of your choice, preferably the C:\ drive which will give you a folder to work from. To keep the folder updated you can download the updated files from the retrospective thread/sites and simply replace them in the folder.​
This thread will cover the following in an easy to follow and straight forward manner that will have you theming your own apks in no time.
Getting apks from a ROM
Deodexing
.apk De-compiling
.apk Recompiling
.apk Signing
.apk Zipaligning
Pushing Files to your Phone
.9 images
Vector Drawable
.xmls
+More
Quick Tips;
.apk files can be browsed like .zip files so set your zip program as the default for handling apks which will makes things much easier.
If all you want to do is edit images then you don't need to decompile, you can just drag and drop images in to an apk to replace a stock image so long as they have the same file name.
Restoring files if you mess up is easier and quicker with a CWM.zip, especially if you're modifying framework apks! Just because an apk might build with no errors doesn't mean it won't give you any when installed to the Phone.
​
Getting apks from a ROM:
Once your Apktool folder is setup you need to get the apks you want to theme out of a ROM or off of your Phone and there are a couple of ways to do this.
1. The simplest method is to extract your phones whole system from an unofficial update file from xda, whatever format that may be in depends on your device. I extract the whole system with every new update before doing anything because it gives me a backup of stock files which I can also copy and deodex to be themed.
2. Use adb commands to pull files to your computer, to do that we need to open a command prompt window (hold the shift key then right click your mouse in the Apktool folder and select "open command window here").
The command to pull your whole system is...
Code:
[B]adb pull /system/ XC_206[/B]
...you can choose something other than XC_206 as your folder name but it will create that folder in your Apktool folder. Alternatively, you can just download individual folders and the commands to do that are…
Code:
[B]adb pull /system/app/ XC_206 app
adb pull /system/priv-app/ XC_206 priv-app
adb pull /system/framework/ XC_206 framework[/B]
...or to pull individual files...
Code:
[B]adb pull /system/framework/framework-res.apk[/B]
3. Use a root explorer on your phone to copy files to your SD and then to your PC.​
Depending on your method you should now have a ApkTool_2.2.4 folder with another folder named 206_system for example in it. The only folders we need at this point are app, priv-app and framework which we need for the next step.
Deodexing:
“Deodexing is basically repackaging of these APKs in a certain way, such that they are reassembled into classes.dex files. By doing that, all pieces of an application package are put together back in one place, thus eliminating the worry of a modified APK conflicting with some separate odexed parts.” – What Is Odex And Deodex In Android​The tool I use is this - [Tool/Utility] JoelDroid Lollipop Batch Deodexer. To save a lot of time I only deodex the apps I'm going to use because it removes the process of having to mess about with smali and baksmali, plus YOU DON'T NEED TO DEODEX YOUR WHOLE FW!, depending on the apk and/or the mod you want to make you don't even need to deodex.
So now you should have a folder named system full of deodexed apks that are ready for playing with.
Decompiling:
Decompiling is the process of deconstructing an apk which gives us workable source code so to speak and we need to do this to be able to edit xmls in Notepad++ or .9 images in an image editor. As said above if you don't want or need to decompile because you just want to change an image here or there you can just drag and drop your res folder out of the apk, find the image I wanted to replace or modify, drag and drop it back in to the apk and push it back to your phone.
Before proceeding you need to install your framework-res.apk and depending on your FW possibly another apk if there is one in the framework folder, which will put one (or two) apks at C:\Users\your-pc-name\AppData\Local\apktool\framework The two commands to install your apks are...
Code:
[b]apktool if framework-res.apk
apktool if SemcGenericUxpRes.apk[/b]
The command for decompiling always begins the same, apktool d then simply change it for the name of the next apk you want to modify. To decompile the framework-res.apk the command is...
Code:
[B][U]apktool[/U] [U]d[/U][/B] framework-res.apk
...this will create a folder named framework-res and it’s at this stage that you can now begin to modify .9 images and xmls to create the desired look or mod you’re after. In this folder you'll find a couple of folders but the one we want is the res folder. First glance of a decompiled res folder can be overwhelming, 1541 folders in my framework but we only need to focus on a handful and it's generally the same in every apk...
drawable
drawable-xhdpi-v4 (depending on your device)
layout
values
​...you may need to delve into others sometimes but it's very rare that I've had to.
Quick Tip;
Once you've entered a few commands so long as you leave the cmd window open you can quickly scroll back through them using your arrow keys.
Recompiling:
Once you've finished making your mods you need to recompile your apk using the following command...
Code:
[B][U]apktool[/U] [U]b[/U][/B] framework-res
...notice you only use the folder name here. If you get any errors here due to a bad edit apktool will usually tell you, in a roundabout way, you just need to read the code it throws up then retrace your steps, correct any bad edit and try again. If all goes smoothly you'll now have a new folder called dist, which contains your newly modified apk, but you can't use that just yet.
Signing:
To sign stock system .apks we need to extract from the original apk the Android.Manifest.xml and META-INF folder, into the dist folder, then from the new apk extract the resources.arsc also into the dist folder, then drag and drop all three files back into the new apk, but NOTE, it's important that you choose store as the compression method, any other will break the apk, and if you replace a broken framework-res.apk you will BOOTLOOP!. And signing is as simple as that.
For 3rd party apps you can use the following command...
Code:
[B]java -jar signapk.jar testkey.x509.pem testkey.pk8[/B] Chrome.apk ChromeS.apk
...notice the extra "S", the output name has to differ from the input name otherwise it will give an error, if done right it will create a new apk called ChromeS.apk, just remember to rename it back to the original before using it on your Phone.
[TOOL] pySignare - Quickly Sign APKs [Windows]​
Signing For The Play Store
If you plan on Publishing a Theme or any other app/apk to the Play Store then using the above method to sign your apks just wont work because you need to give it an individual signature that is unique to you, thankfully @AndroidGraphix has written a great guide that will show you how, it's a bit more fidgety than the above method but simple enough to follow...
AndroidGraphix said:
What you'll need to sign an APK.
Click to expand...
Click to collapse
- Noobs guide to signing an APK with a Private Key​
Zipaligning:
DISADVANTAGES OF UNALIGNED APKs; Quite understandably, situation would be reserved for unaligned application packages. Resource reading would be slow and memory usage would be on the higher end of the spectrum. It would also depend on how many unaligned applications are present. For example, if less number of applications with an unaligned home application, you’d see slower application launch times. This is the best case scenario. For a worst case scenario, having a number of unaligned applications will result in the system repeatedly starting and killing processes, struggling with lags and huge battery drain. - SOURCE​Move your new signed apk into your APKTool folder, you can overwrite your original if you want, and use the following command...
Code:
[B][U]zipalign -f -v 4[/U][/B] framework-res.apk ZAframework-res.apk
...notice the ZA, zipaligning creates a new apk which has to be named different from the original, but use what you want, it'll need renaming back to the original again before you use it.
Pushing Files to your Phone:
So now we need to transfer your apk back to your Phone, you can do it by copying to your SD, then to your system, change permissions, then copy to the right folder, but that's not only time consuming but highly tedious too, so a simpler method is to use adb using the push command as this allows us to push to the SD Card then install it to the system overwriting the original with the correct permissions too. If you do this with the framework-res or SystemUI apks you will need to reboot but generally all other apps will just refresh with the changes applied. The command to push to the SD Card is...
Code:
[b]adb push SystemUI.apk /sdcard/SystemUI.apk
[/b]​...then we need to mount the system before we can install our modified apk and the commands for that are...
Code:
[b]adb shell
[/b]​
Code:
[b]su
[/b]​The prefix will then change to the $ sign
Code:
[b]mount -o rw,remount /system
[/b]​...then to install your apk...
Code:
[b]dd if=/sdcard/SystemUI.apk of=/system/priv-app/SystemUI/SystemUI.apk
[/b]​If any of that fails you could try an unsecure kernel and/or Chainfires adbd Insecure app. Try the app first but if you still can't mount and push files read this thread - [HOW TO]Make your favorite kernel adbd insecure to run ADB as root on /system and try again.
.9 pngs:
I hope after reading this explanation you're not still left wondering what all the fuss is about as it really is quite simple. I'll use the following two images, btn_default_pressed_holo.9 & status_bar_close_off.9 to illustrate the basic point of the borders...
Decompiled .9pngs:
Recompiled .9pngs:
Those borders control which part of the image is stretched (Left & Top) and where on the image content will be displayed (Right & Bottom). We'll use Draw 9-patch which is for editing the borders of decompiled .9pngs and lets you see how the image, when stretched, will be displayed on the Phone. Notice that the borders are different sizes, well that's because I only want/need a certain part of the image to stretch to get the desired look on the Phone.
...in the image below the left side shows the stretched image and desired effect should look on the Phone and the right side shows how it would look if I had edited the borders incorrectly or used none at all...
You can get away by not using a border but you would need to edit your image to specific dimensions to accommodate for the stretching, for example it might look fine for a simple OK button but it might not look right if you used the same .9png for a screen press which stretches the whole length of the screen, so you're better off just using them to begin with, plus you'll more than likely get errors down the line while decompiling or recompiling your apk.
The use of the border is made even more clear when you add text to an image. For my status_bar_close_off.9 I've filled all four sides of the image (except for an empty pixel in all four corners as that is the max amount of border you can use) as I need it to stretch the image just how I've edited it...
...but if I used the same sized left side border as the btn_default_pressed_holo.9 then this is how it would look on the Phone...
...which is obviously not the look I'm trying to achieve, as the left side border is causing the image to stretch incorrectly.
So that's basically it, depending on the image you're editing you can usually leave the borders alone but if you create one from scratch then you might need to play about with them if your images doesn't look quite right when used on the Phone. Here's a few links that will assist you further, especially the batch editing...
How to edit .9.pngs
[TUTO] Create your 9.png !
[UTILITY][TOOL] 9patchPngSuite [Windows&Linux]
How to draw NinePatch images with Photoshop - .9.PNG
[TOOL][Multi-Platform][.9.png][ALL DPIs] Android Resizer Tool
[Tutorial][Commentary] How To Batch Edit .9PNG/PNG Images
9compiler - batch process for themers android
Vector Drawable:
A VectorDrawable is a vector graphic defined in an XML file as a set of points, lines, and curves along with its associated color information. The major advantage of using a vector drawable is image scalability. It can be scaled without loss of display quality, which means the same file is resized for different screen densities without loss of image quality. This results in smaller APK files and less developer maintenance. You can also use vector images for animation by using multiple XML files instead of multiple images for each display resolution.​- developer.android.com/guide/topics/graphics/vector-drawable-resources
Vector drawables obviously serve a purpose but are a pita imo for themers as they are a lot more difficult to edit and achieve the look you want.
Using my power menu to illustrate the issue, Power off, Restart and Take screenshot icons are vector drawables but the Record screen icon is a png...
...as you can see the Record screen icon is significantly bigger and ruins the look of my power menu, to over come this I have two options.
1. Learn how to edit vector drawables and create a new icon.
2. Replace the vector drawables and use pngs.
The latter to me is preferable because I already have images that I've been using for the last few years and want to continue using, to do so I need to replace the code in the relevant xmls to point at images...
framework-res/drawable/ic_lock_power_off.xml
Vector drawable code...
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:tint="?colorControlNormal" android:height="24.0dip" android:width="24.0dip" android:viewportWidth="24.0" android:viewportHeight="24.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ff000000" android:pathData="M13.0,3.0l-2.0,0.0l0.0,10.0l2.0,0.0L13.0,3.0zm4.83,2.17l-1.42,1.42C17.99,7.86 19.0,9.81 19.0,12.0c0.0,3.87 -3.13,7.0 -7.0,7.0s-7.0,-3.13 -7.0,-7.0c0.0,-2.19 1.01,-4.14 2.58,-5.42L6.17,5.17C4.23,6.82 3.0,9.26 3.0,12.0c0.0,4.97 4.03,9.0 9.0,9.0s9.0,-4.03 9.0,-9.0c0.0,-2.74 -1.23,-5.18 -3.17,-6.83z" />
</vector>
My edited code...
Code:
<?xml version="1.0" encoding="utf-8"?>
<bitmap android:src="@drawable/ic_lock_power_off_alpha"
xmlns:android="http://schemas.android.com/apk/res/android" />
framework-res/drawable/ic_restart.xml
Vector drawable code...
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:tint="?colorControlNormal" android:height="24.0dip" android:width="24.0dip" android:viewportWidth="24.0" android:viewportHeight="24.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#ff000000" android:pathData="M12.0,4.0L12.0,1.0L8.0,5.0l4.0,4.0L12.0,6.0c3.9,0.0 7.0,3.1 7.0,7.0c0.0,3.9 -3.1,7.0 -7.0,7.0l0.0,2.0c5.0,0.0 9.0,-4.0 9.0,-9.0C21.0,8.0 17.0,4.0 12.0,4.0z" />
<path android:fillColor="#ff000000" android:pathData="M5.0,12.9C5.0,11.0 5.8,9.2 7.2,7.9L5.8,6.4C4.0,8.1 3.0,10.5 3.0,12.9c0.0,4.0 2.7,7.6 6.5,8.7l0.5,-1.9C7.1,18.8 5.0,16.1 5.0,12.9z" />
</vector>
My edited code...
Code:
<?xml version="1.0" encoding="utf-8"?>
<bitmap android:src="@drawable/ic_lock_restart"
xmlns:android="http://schemas.android.com/apk/res/android" />
framework-res/drawable/ic_semc_ic_dialog_screenshot.xml
Vector drawable code...
Code:
<?xml version="1.0" encoding="utf-8"?>
<vector android:height="24.0dip" android:width="24.0dip" android:viewportWidth="24.0" android:viewportHeight="24.0"
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#8a000000" android:pathData="M5,5l4,0l0,-2l-4,0l-2,0l0,2l0,4l2,0l0,-4z" />
<path android:fillColor="#8a000000" android:pathData="M19,3l-4,0l0,2l4,0l0,4l2,0l0,-4l0,-2l-2,0z" />
<path android:fillColor="#8a000000" android:pathData="M5,15l-2,0l0,4l0,2l2,0l4,0l0,-2l-4,0l0,-4z" />
<path android:fillColor="#8a000000" android:pathData="M19,19l-4,0l0,2l4,0l2,0l0,-2l0,-4l-2,0l0,4z" />
<path android:fillColor="#8a000000" android:pathData="M16,13l0,-2l-3,0l0,-3l-2,0l0,3l-3,0l0,2l3,0l0,3l2,0l0,-3l3,0z" />
</vector>
My edited code...
Code:
<?xml version="1.0" encoding="utf-8"?>
<bitmap android:src="@drawable/semc_ic_dialog_screenshot"
xmlns:android="http://schemas.android.com/apk/res/android" />
...and the result as you can see here provides a much more unified look...
...and finally my desired end result...
.xmls:
Modifying .xmls is easy and pretty simply to understand, a massive clue in finding the ones you need to edit is the file names. You're not going to find a better guide than the one by Ticklefish so I'll just post a snippet here and you can head over and give the main thread a read and and a thanks.
Ticklefish said:
XML 101 - XML Modding Made Easy!
If you're modding Android, eventually you're going to have to edit some XML.
Want to center the clock in your statusbar? Rearrange the icons in your navbar? Change the layout of your notification screen? Get rid of a carrier label? Change the colour of some text?
Then you need to edit some XML files.
And you might not have any idea how...
Well, don't worry. The purpose of this thread is to show you just easy XML-editing can be. Once you've read it, you'll be one step closer to being an XML expert!
This guide is meant for noobs, experienced modders and everyone in between. Hopefully everybody can learn something..
Here's what this thread has to offer so far:
- Introduction (This Post)
- How To Delete A Line (Yes, Really)
- Some Useful Codes To Know
- How To Change The Colour Of The Status Bar Clock
- How To Put An Invisible Softkey In The Status Bar
- How To Center The Clock In The Status Bar...Part 1
- How To Center The Clock In The Status Bar...Part 2
- Centering The Clock In Xperia KitKat
- android:layout_gravity, android:gravity AND android:layout_weight
- Do NOT Edit "public.xml"!!​I also encourage others to post guides as well:
- How To Remove "am/pm" From The Clock On Pre-4.2 Roms (by @KronicSkillz)
- How To Swap The Notification And Status Bar Icons (by @Anmol0022)
- How To Hide A Centered Status Bar Clock When A Lollipop Device Is Locked (by @S0bes)​
Click to expand...
Click to collapse
Use Linux or a Mac? See the following threads for more information on using apktool on other Operating Systems...
[WIN/LINUX][Decompile/Compile] Quick Mod Tool 4.0 [decompile and compile with speed]
APK Manager for Mac OS X
[Linux][UTILITY][TOOL] APK Multi-Tool
[tutorial] decompiling,recompiling and signing in linux (27-01-2013)
​
The following programs are some of the better programs you can use to automate Apktool for you...
@Diamondbacks - Virtuous Ten Studio
@Ticklefishs - Tickle My Android
@BDFreaks - Advanced ApkTool
@mDroidds - StudioAndroid # Automize everything!
...there are many others but these are a couple of what I've tried, still use or are popular on xda.
Quick Tip; Use VTS to edit certain xmls because it gives you a preview of any hex colour code and has a built in editor too which makes finding and changing colours a breeze.
And that's pretty much it, the only way you're really going to learn is by reading then putting into practice what you've read and picking stuff up along the way. I've posted a few links to different tutorials in the next post that you can use as a reference to theme your own phone, while the versions of Android change the methods and code are pretty consistent but you will have to adapt from time to time, but that's how you learn, refine your skills and become able to pass on your knowledge back to the xda community in the form of guides themes and mods.​
Notable credits and thanks to @iBotPeaches, @Brut.all, @jairomeo, @manup456, @armyranger251, @Stericson, @brandenk, @beagz
ClockworkMod Recovery:
ClockworkMod Recovery zips are used for flashing individual files to whole ROMS and can be a life saver if you push a badly edited apk to your Phone that results in a bootloop. There's also a few programs that can assist you with that too, but if all you're doing is replacing a few files all you really need is a template, then it's just a matter of creating the Phones folder setup in the zip which is simply creating folders: system\app - system\media\audio etc then dragging and dropping your files into it. A basic understanding of the updater script is essential, a ROM.zip will more than likely wipe your Phone whereas a Theme.zip may just replace files but it might delete some also.​
ERRORS encountered in CWM Recovery
[Tool]easy flasher v4 (ur own update.zip)
[Tool][Windows/Linux] Android Flashable Zip Creator
How to edit updater-script and make recovery flashable zips and updates
[TUTORIAL] Making Flashable ZIPs, EDIFY Script, ZIP Signing & Key Creation
[Utility-Tool][DEVandThemers]CWMflashpack.zipCreatorV1{TheCollective}w/EdifyScripting
In the Apktool_2.4.4.zip is my CWM_backup.zip which is set up so you can add your own files to the framework and apps folders in the main system location, but you can easily add other folders to it if you want to add things like fonts, tones or anything else, just remember to add folders within folders if that's where the files you want to include are such as tones, media\audio\alarms for example. When adding files to your zip add them using Normal as the Compression Method and remember to remove any example files I've added otherwise they will be flashed to your phone too.
Links:
The following liks are what I've bookmarked over the years and posted them here for you to use as a reference, some of these may not apply for your device directly but that doesn't mean you can't learn from or adapt them to.
Locating hidden values, random dialogs and hardcodes
Theme Apps To Dark Theme | Theme Whole System | Newbies Here!
Theming 3rd Party Apps
Interactive Phone Modification
Theme Debugger - Test your themes
Rom Porter / System Extractor
9-Patch-Resizer
Android Drawable Resizer Tool
HOW TO THEME SystemUI.apk for TOTALLY newbie!
How to theme Lollipop and Marshmallow ROMs!
Theming Lollipop w/ Picture References
How to theme TW SystemUI
Where to find the colors for making a theme
Create Your Own Themed apk & Become a Themer
Power menu light><dark
Rom Logo In Settings/About
Theming Settings Heavily
Integrating/Adding applications to the settings menu
Quick Panel with Lidroid Toggles & Volume Sliders
Add Quickpanel Button In Statusbar To Switch Layouts
Increase QuickSettings Maximum number
How to add 0.00k/s meter on statusbar ICS/JB
How to add/ Change Clocks to Analog/ Digital with Seconds
Centre clock and icon switch. Update: bottom power control widget!
Xposed:
Advantages:
No need to modify any APKs. This means:
No need to decompile, change things in smali, compile, sign, ...
It will work for odexed and deodexed ROMs.
Your mod is not bound to a specific version of the ROM. Unless there is a major change in the methods called for a certain functionality, your mod will continue to work even when you upgrade your ROM. Many modules work for a wide range of ROMs from different vendors.
Multiple mods can be installed at the same time, even if they modify the same app. So you can use these battery icons and those quick toggles. Even hooking the same method twice is possible. Of course, this only works properly if the mods are not trying to do incompatible things.
Click to expand...
Click to collapse
- Xposed
Porting XTheme themes
CM Theme to XThemeEngine Converter / Porter
Port CM Themes to Xtheme Engine in One Click!
List of APPs & MODs that use XPOSED Module
Xposed Framework/TabletUI (Noob-Friendly)
XThemeEngine beta5 - Theme engine for any rooted phone
ResXploit : Theming your android the easiest way! No decompiling APKs!
hello XperienceD,
first i want to say thank you, finally i can make some modifiaction of my rom, i am managed to get 3-wa-power on my stock rom, show full option in developer setting, change color and icon, etc (still far from my target though).
for now im trying to make my phone running holo dark themes (default is light), at first it looks fine, background change from light to dark, text black to white.
but now i found some color problem, can you help me locate color setting for this :
and for setting color, i want to change text color to holo_blue
for now, i am doing bruteforce, line per line, hope can fix this tonight, but if anyone know the where should i change the color setting, i am more than happy to accept it
thanks,
jacknb1ack
jacknb1ack said:
but now i found some color problem, can you help me locate color setting for this :
Click to expand...
Click to collapse
Check the links above "where to find colors" and "changing system text".
great, i think i've clicked all the link in ur post ... but looks like i've missde some link xD ...
thanks again.
jacknb1ack said:
great, i think i've clicked all the link in ur post ... but looks like i've missde some link xD
Click to expand...
Click to collapse
Did you find it in the end?
nice tutorial
XperienceD said:
Did you find it in the end?
Click to expand...
Click to collapse
yes .. thanks to you and all developers and themer here, i can finish my own customizing rom xD
and lately i've found that its need to resign all system apps to do better in what i want, and here is my last work xD
https://picasaweb.google.com/117267626749690688218/Halo2?authuser=0&feat=directlink
jacknb1ack said:
yes .. thanks to you and all developers and themer here, i can finish my own customizing rom xD
Click to expand...
Click to collapse
Nice 1.
jacknb1ack said:
https://picasaweb.google.com/117267626749690688218/Halo2?authuser=0&feat=directlink
Click to expand...
Click to collapse
Colourful.
Thread updated.
Awesome job on this man!
ssojyeti2 said:
Awesome job on this man!
Click to expand...
Click to collapse
Thank You, just trying to do my bit.
Can we get a linux version?
</end_troll>
thanks for the guide. really appreciated it. sharing knowledge is priceless.
im trying to re compile a APK which i have edited. but always it gives error. even if i de compile it and without touching anyting and try to re compile same result.
apk is a keyboard. i was trying to edit the layout. so is there any other way to do to modify 3rd party apks??
i do without any issue with systemui's framework etc
thanks again
EDIT - is that cos i have installed framework ????
Thank you for the post.
One thing that i have been trying to do is make a theme for "Floating Notifications" i was able to edit the apk and the xml files. everything works great on the phone and everything.
my issue is once if edited an app for theming how do i sign it so i can upload my theme to the playstore?
when i upload it to the dev console it says that my apk is not signed correctly or something like that.
can you please show me how to sign an apk after editing it for the playstore
thank you
That's exactly what i was looking for! Great post mate! Thank you!
Holy [email protected] dude this is monstrous! Thanks for your dedicated work!
Man I have seen tutorials but none as comprehensive as this. I mostly know all of whats here, but you have some invaluable links to all sorts of resources. This would have taken you a long time, I hope XDA members are appreciative!
Jarmezrocks said:
Holy [email protected] dude this is monstrous! Thanks for your dedicated work!
Man I have seen tutorials but none as comprehensive as this. I mostly know all of whats here, but you have some invaluable links to all sorts of resources. This would have taken you a long time, I hope XDA members are appreciative!
Click to expand...
Click to collapse
Thanks for your comments.
Sent from my C6603 using xda premium
Roladriz said:
Can we get a linux version?
Click to expand...
Click to collapse
These links should help...
XperienceD said:
Use Linux or a Mac?
See the following threads for more information on using apktool on other Operating Systems...
APK Manager for Mac OS X
[Linux][UTILITY][TOOL] APK Multi-Tool
[tutorial] decompiling,recompiling and signing in linux (27-01-2013)
How to install and use Apktool with Ubuntu
Click to expand...
Click to collapse
Dilesh Perera said:
EDIT - is that cos i have installed framework ????
Click to expand...
Click to collapse
I don't think it will be, it is either a protected apk or from a brand of Phone that isn't that common would be my guess, but you'd need to list the error logs?
amadovi43 said:
can you please show me how to sign an apk after editing it for the playstore
Click to expand...
Click to collapse
This is the only link I have bookmarked in regards to this - Noobs guide to signing an APK with a Private Key which is the one I used for my IceGreen theme.

[GUIDE] How to Remove the Lockscreen Wallpaper and Notification pulldown Dimming Tint

This is a guide for Android 8.1 and Android P for removing the tint on the lockscreen wallpaper. It has been tested on Pixel, Pixel 2, and Nexus 5X but I would imagine it would work on others as well.
Pull and decompile the SystemUIGoogle.apk, SystemUI.apk, or whatever your SystemUI is named.
Go to the res/values folder and open the bools.xlm with notepad++
Find the below lines of code (these are not all grouped together)
Code:
<bool name="config_showDividersWhenGroupNotificationExpanded">false</bool>
<bool name="config_showGroupNotificationBgWhenExpanded">false</bool>
<bool name="config_showNotificationExpandButtonAtEnd">false</bool>
<bool name="config_status_bar_scrim_behind_use_src">true</bool>
and change them to this:
Code:
<bool name="config_showDividersWhenGroupNotificationExpanded">true</bool>
<bool name="config_showGroupNotificationBgWhenExpanded">true</bool>
<bool name="config_showNotificationExpandButtonAtEnd">true</bool>
<bool name="config_status_bar_scrim_behind_use_src">false</bool>
Next, open super_status_bar.xml located in the res/layout folder.
Add this after each of these 3 codes:
android:background="#00000000"
1.
Code:
android:fitsSystemWindows="true"
2.
Code:
android:id="@id/backdrop_back"
3.
Code:
android:id="@id/status_bar_container"
After this code add android:visibility="invisible"
Code:
android:id="@id/scrim_behind"
Your code might not be exactly the same but find the line that contains android:id="@id/scrim_behind" and you should be good. Save your changes, recompile, and replace your SystemUI.apk with your newly modded one with whatever method works best for you.
I have not found any adverse effects from these changes.
Has anyone tried this on Android Pie?
Augustin79 said:
Has anyone tried this on Android Pie?
Click to expand...
Click to collapse
Yes it still does.
Is this possible to apply on aosp rom?
I tried to decompile the systemui.apk with framework_res.apk and edit it then recompile the apk.
But no luck, after reboot my phone, the phone shows the home page directly without lock screen, status bar. I can't open the status bar or back to my lock screen until I restore the systemui.apk.
Maybe, there is something wrong with decompiling and recompiling. I will try again.
This doesn't work for me.
If I sign SystemUI.apk with my own key, it can't acquire the right permissions (logcat says "this requires android.permission.INTERACT_ACROSS_USERS_FULL") and the keyguard is skipped (boots to home screen).
If I use the META-INF from the original apk, even with the original classes.dex, the phone bootloops and spams logcat with "android.content.res.Resources$NotFoundException: String resource ID #0x0".
Cebtenzzre said:
This doesn't work for me.
If I sign SystemUI.apk with my own key, it can't acquire the right permissions (logcat says "this requires android.permission.INTERACT_ACROSS_USERS_FULL") and the keyguard is skipped (boots to home screen).
If I use the META-INF from the original apk, even with the original classes.dex, the phone bootloops and spams logcat with "android.content.res.Resources$NotFoundException: String resource ID #0x0".
Click to expand...
Click to collapse
I was able to get these changes to work by making a Substratum theme for SystemUI. Ideally this wouldn't also apply to the notifications pulldown, but at least my lock screen finally looks good.
I got it working!
So, I have been trying to modify the value of SCRIM_BEHIND_ALPHA_KEYGUARD in SystemUI, which needs more than just a Substratum theme.
I discovered that with "apksigner verify --print-certs" you can get helpful information about the verification status of an APK.
That command told me that the APK built by apktool was missing some resources. So instead of using that, I made a copy of the original APK and replaced the classes.dex with the one that apktool built.
That at least made the MANIFEST.MF agree with the contents, but the signature did not verify because the APK had been modified.
So, I signed it with the platform key using "apksigner sign --key platform.pk8 --cert platform.x509.pem --v1-signer-name CERT". Then the signature verified, and it had the same certificate digests.
It seems as though my phone only accepts a privileged system app if apksigner cannot disinguish it from one that was officially built and shipped with the ROM, which is probably a good thing.
Now I know to be more careful about A) assuming that apktool works seamlessly, B) replacing the right files in an apk and leaving everything else alone, and C) verifying an APK before putting it on my phone.

Categories

Resources