[GUIDE] How to change clock color - XPERIA X10 Themes and Apps

This is just a guide, you will have to make some batch files to do all the stuff because it is too much stuff just to write it on console.
Guide:
1º Pull framework and apps
2º Deodex framework (all .jar files in framework folder that have an .odex file)
- get classes.dex and insert it in respective .jar file
3º change color (described below)
4º Deodex apps (all .apk files that have an .odex file)
- get classes.dex and insert it in respective .apk file
5º push the new .jar files and delete the old .odex files
6º push the new .apk files and delete the old .odex files
7º use dexopt-wrapper to odex all new .jar files (the deoxpt-wraper is somewhere in the xda forum)
8º use dexopt-wrapper to odex all new .apk files (sometimes the phone restarts during this step)
it's done.
But you must delete all classes.dex, because its not need after odex.
And another thing you must do, is zipalign all .jar and .apk (i didn't do this)
e.g. of deodex a file:
Code:
@java -jar "\Program Files\AndroidSDK\tools\baksmali.jar" -x core.odex -o core-out
@java -Xmx512M -jar "\Program Files\AndroidSDK\tools\smali.jar" core-out -o classes.dex
second e.g. (some files have dependencies like this one)
Code:
@java -jar "\Program Files\AndroidSDK\tools\baksmali.jar" -c :semc_emailif.odex -x semc_contentmanagerif.odex -o semc_contentmanagerif-out
@java -Xmx512M -jar "\Program Files\AndroidSDK\tools\smali.jar" semc_contentmanagerif-out -o classes.dex
to change the color:
get folder of services.odex with baksmali, modify \com\android\server\status\StatusBarIcon.smali
it isn't the same line of normal method to non-odex roms
lines:
Code:
.line 53
const v6, -0x33FFFFFF [U][B]<- 33 is transparency, and FFFFFF is black (i think its the inverse of normal RGB) [/B][/U]
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V
deoxpt-wrapper
e.g. of usage:
Code:
@adb shell dexopt-wrapper /system/framework/core.jar /system/framework/core.odex
i already made this some months ago, and i dont remember everything (i was waiting for 2.1 to release this)
but i think its everything... if i remember something i will post next week, and if i have time, i will make a nice tutorial, but just next week.
REMEMBER: MAKE A BACKUP BEFORE! AND I'M NOT RESPONSIBLE FOR ANYTHING THAT YOU DO WITH YOUR PHONE
PS: sorry for my f*cking bad english

Thank you for this guide.

If you remove the - in front of the number for colour then you can use a regular HTML colour code.

I can not find
Code:
.line 53
const v6, -0x33FFFFFF <- 33 is transparency, and FFFFFF is black (i think its the inverse of normal RGB)
invoke-virtual {v4, v6}, Landroid/widget/TextView;->setTextColor(I)V

Related

[HOW To][MOD] THE HOW TO THREAD, Turning a stock leak to CWM flashable added![4/19/]

I have seen this question a hundred times, and for some reason everyone who did the Official ATT update to gingerbread thought they were getting this fancy CRT, or as one user said, Old tv like animation. That is not the case. This does not come factory with any stock infuse rom that i am aware of.
But it is one of the most simple mods to do on your own.Here is the guide.
Tools you will need.
Java JRE(if you dont already)
Android SDK
adb installed
Apktool, apkmanager(either is good)
7zip or winrar archiver
A text editor(I recommend notepad++)
Step 1 : First we have to decompile the framework-res.apk located in system/framework of the rom of your choice. Pull framework-res.apk and place in folder with apktool(if using apkmanager place in "place apk here for modding folder").
Open command prompt and type cd path/to/apktool, or type cd and drag apktool folder into command window and hit enter, this will put you in the path.
Next type
Code:
apktool if framework-res.apk
This will install the proper framework files for the resources to decompile or recompile.
Once finished type
Code:
apktool d framework-res.apk ./out
this will decompile the framework, should look like this
Code:
I: Loading resouirce tables...
I: Loaded.
I: Decoding file-resources...
I: Done.
I: Copying assests and libs...
If using apkmanager choose option 9 to decompile.
Step 2: Now we make our simple edit to enable the CRT off animation.
In your newly created out folder in apktool(or projects folder in apkmanager), open res/values and scroll to the "bools.xml" and open with text editor.
look for
Code:
<bool name="config_animateScreenLights">true</bool>
and change to
Code:
<bool name="config_animateScreenLights">false</bool>
save and close.
Step 3: Recompile framework. In command promt for apktool type
Code:
apktool b -f -d out
or
Code:
apktool b out
either works.
With apkmanager choose option 11.
Once recompiled, you should have two new folders in your out folder called "build" and "dist". since we made no image edits we will not mess with the dist folder.
Open your build folder and copy the resources.arsc into your ORIGINAL framework-res.apk. Just open framework-res with 7zip or winrar and drop it in.
In apkmanger you will have a keep folder, go into that folder when prompted and delete the resources.arsc folder and continue.
Done!
Push framework with adb by navigating to android sdk platform tools folder, plug in your phone with USB debugging checked and type
Code:
adb remount rw
adb push framework-res.apk /system/framework/framework-res.apk
adb reboot
Once booted up make sure in settings/display/animations that all animations are shown.
Now you have CRT off animation! Enjoy!
EXTENDED POWER MENUJ​
OK, HERE'S THE MOD YOU'VE BEEN WAITING FOR! HOPE YOU HAVE YOUR GAME FACE ON!
TOOLS NEEDED:
THE SAME AS MOD ABOVE
1: First we have to decompile the framework-res.apk to add the resources to the framework, using the apktool of your choice.
Once decompiled go to res/values/strings.xml and scroll all the way to the bottom and add these strings before "resources"
Code:
<string name="reboot">Reboot"</string>
<string name="reboot_recovery">Recovery</string>
<string name="reboot_download">Download<string>
Save and close
Now would be the time to add your png images to res/drawable-hdpi, make sure they are named "ic_lock_reboot, and so on..
Next open the public.xml also in res/values and add the resource id's for our new menu options. scroll to the last line of "<public type="string" name" and add these resource id's.
Code:
<public type="string" name="reboot" id="0x010404ac" />
<public type="string" name="reboot_recovery" id="0x010404ad" />
<public type="string" name="reboot_download" id="0x010404ae" />
then scroll to the last line of "<public type="drawable" name" and add these resource id's
Code:
<public type="drawable" name="ic_lock_reboot" id="0x010803dc" />
<public type="drawable" name="ic_lock_recovery" id="0x010803dd" />
<puiblic type="drawable" name="ic_lock_download" id="0x010803db" />
Recompile framework.
-----------------------------------------------------------------------------
Here"s the fun part.
Using apktool or baksmali, decompile framework.jar and go to smali/com/android/internal/app/shutdownthread.smali and open with notepad++
Add this to line 29 right above ".field private static mReboot:Z
Code:
.field public static mReboot:I
then, search for ".line 660" and change this
Code:
if-eqz p0, :cond_0
to
Code:
if-eqz p0, :cond_3
Now scroll to line 820 and add this code
Code:
sget v1, Lcom/android/internal/app/ShutdownThread;->mReboot:I
const/4 v2, 0x1
if-eq v1, v2, :cond_0
const/4 v2, 0x2
if-eq v1, v2, :cond_1
const/4 v2, 0x3
if-eq v1, v2, :cond_2
.line 686
invoke-static {}, Landroid/os/Power;->shutdown()V
.line 687
return-void
:cond_0
const-string/jumbo v4, "now"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
:cond_1
const-string/jumbo v4, "recovery"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
:cond_2
const-string v4, "download"
invoke-static {v4}, Landroid/os/Power;->reboot(Ljava/lang/String;)V
return-void
the last line of this code "return void" should end at line 859.
then on line 877 change this
Code:
:cond_0
to
Code:
:cond_3
save and close
Recompile framework.jar
-----------------------------------------------------------------------------
Now, decompile android.policy.jar and go to smali/com/android/internal/policy/impl/GlobalActions.smali and open with text editor. Scroll to line 412 and change this
Code:
const/4 v10, 0x4
to
Code:
const/4 v10, 0x7
Then on line 458 change this
Code:
const/4 v0, 0x3
to
Code:
const/4 v0, 0x6
Then on line 482 add this code
Code:
aput-object v2, v0, v1
const/4 v1, 0x3
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$7;
const v3, 0x10803db
const v4, 0x10404ac
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$7;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
const/4 v1, 0x4
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$8;
const v3, 0x10803dc
const v4, 0x10404ad
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$8;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
aput-object v2, v0, v1
const/4 v1, 0x5
new-instance v2, Lcom/android/internal/policy/impl/GlobalActions$9;
const v3, 0x10803dd
const v4, 0x10404ae
invoke-direct {v2, p0, v3, v4}, Lcom/android/internal/policy/impl/GlobalActions$9;-><init>(Lcom/android/internal/policy/impl/GlobalActions;II)V
Now, copy GlobalActions$3.smali and rename it to GlobalActions$7.smali and change GlobalActions$3" to GlobalActions$7"(should be three changes) then delete lines 50 to 54 and add this code to line 50
Code:
const/4 v1, 0x0
const/4 p0, 0x1
sput p0, Lcom/android/internal/app/ShutdownThread;->mReboot:I
save and close.
Then copy GlobalActions$3.smali and rename it to GlobalActions$8.smali and change GlobalActions$3" to $8 three times also. Then delete lines 50 to 54 and add this to line 50
Code:
const/4 v1, 0x0
const/4 p0, 0x2
sput p0, Lcom/android/internal/app/ShutdownThread;->mReboot:I
save and close.
Now copy GlobalActions$3.smali and rename to GlobalActions$9.smali and change the three GlobalActions$3" to $9. Then delete lines 50 to 54 and add this code to line 50
Code:
const/4 v1, 0x0
const/4 p0, 0x3
sput p0, Lcom/android/internal/app/ShutdownThread;->mReboot:I
save and close.
Done!! Recompile android.policy.jar and test framework-res.apk, framework.jar and android.policy jar on phone.
This should work on all GB roms for the Infuse. For those following the guide on the vibrant forum, it will not work on our device. It is different, this is the updated epm coding for our Infuse
WHILE EDITING SMALI, MAKE SURE ALL MARGINS ARE ALIGNED PERFECTLY!
Enjoy!
Attatched extended pngs
CONVERSION OF STOCK TAR.MD5 LEAK TO CWM FLASHABLE FOR NEW AND UPCOMING DEVELOPERS​
Now, i have been wanting to do this for quite sometime, and this can also be accomplished by researching and googling, but here you will have everything you need to build your OWN rom from scratch from a stock samsung tar.md5 leak. Also, I do not mind new developers using my stock rooted bases to build a rom, we all have to start somewhere, but wouldn't you like to say "Hey, i made this, and its all mine"? Well in this how to, i will provide you with the knowlege to do so, and the links to the tools you will need. Some of the tools you will need have already been outlinrd in the other How To's above, if you have followed or read them, but i will outline them again here to be clear.
Tools:
7zip or winrar archiver
notepad++ or text editor of your choice
dsixda kitchen(i dont use this anymore, but i did when i started and its simple to use for building and deodexing your rom)From Here
MagicISO which can be downloaded for free From Here
First:
Download one of the stock leaks, either from here or from samsung. It will come in a .rar file format.
Next go to a place on your pc where you want to create a folder for your new rom and create a folder for your new rom and name it(eg....Zeus Rom).
Then, open the new rom folder and create two new folders called "system" and "updates". Then close. We will come back here later.
Then in the same area of you new rom folder create a new folder called UCLB3 or whatever firmware you are working with. This is where we will extract the factoryfs, ect...
Second:
Now, go to where you downloaded the stock .rar file and open it with 7zip or winrar. Inside you should now see another .rar file. Double click to decompress and show the contents. You should now see a folder with the rom name(ie...SGH-I997_I997UCLB3_UC_ATT) open folder and you should see two files now, (I997UCLB3-Homebinary.tar.md5, and SS_DL.dll) you will not need the second file for what we are doing.
Now, double click the Homebinary.md5.tar file to decompress and show contents. You should now see(cache.rfs, zimage, modem.bin, factoryfs.rfs, boot.bin, Sbl.bin) For what we are doing we will only need the factoryfs.rfs, cache.rfs, modem.bin. Now click Extract and extract to the folder you made next to your new rom. It will probably ask for a password, and the password is "sampro.pl".
Third:
Open magicISO and in the top left-hand corner click file, then open, then navigate to the file where we just extracted the contents of the md5.tar. at the bottom where it says "files of type", click on it and choose all files so it will show everything you extracted to the folder.
Now double click on factoryfs.rfs and you should now see the contents of the file show up in the left hand box of magicISO. At the top of the files right click on "NO NAME" and click extract. Navigate to the new rom/system folder you created and extract. Once finished, you will now see your system as you normally see it when you open a rom.zip. You should now see, "app, bin, cameradata, etc, firmware, fonts, framework, lib, media, modules, tts, usr, xbin, build.prop, and default.prop".
Fourth:
Repeat the same process for cache.rfs and extract to the same folder, except we will delete this folder when we get what we need. Now you should see a new folder in the system folder called recovery. Move it outside the system folder anywhere, or during extraction you can extract outside the system folder, whatever is easiest.
Inside this folder you should see two files, "command, and sec_csc.zip". Open the sec_csc.zip to show its contents.You should now see the META-INF folder and system folder. Take the META-INF folder and move it to the rom folder with the "system and updates folder".
Next open the system folder of the sec_csc.zip you have open to show its contents. You should see, "csc, etc, media, CSCFiles.txt, CSCVersion.txt, SW_Configuration.txt". Move the "csc" folder and the three CSC.txt files to your system folder. From the sec_csc.zip file, open the etc folder and move that one file to your new rom/system/etc folder.
Next from the sec_csc.zip file, open media/audio, and move the "effects" folder to your new rom/system/media/audio folder. Then open the ringtones folder and move the ringtones.ogg's to your new rom/system/media/audio/ringtones folder.
Take the bootsamsungloop.qmg file and move to rour new rom/system/media folder.
Now if you extracted the cache.rfs into the new rom/system folder, you can delete it now, as we have what we need from it in our new rom.
Fifth:
Now go to where you extracted the md5.tar file and move the modem.bin to your new rom/updates folder. If you want to use the stock zimage you can put it in the updates folder but probably wont keep root. I suggest finding a rooted kernel for your device and placing the zimage and redbend_ua in the updates folder.
Now in the META-INF folder the updater script will not work due to the signature verification will fail. You will have to either write a new one, or grab one from a stock cwm flashable from your device and use it, or write your own using a guide.
Sixth:
Now with 7zip or winrar, compress your new rom folder into a zip file.
Download dsixda android kitchen and follow the instructions to set up and turn your rom zip into a cwm flashable zip!
Enjoy!
Next week the how to for the extended power menu...
Should be stickied and title maybe changed to simple android mods
Sent from my Samsung Infuse
not gonna happen... its good here for all to view..
These will definitely come in handy for new upcoming rom developers.
Sent from my SAMSUNG-SGH-I997 using xda premium
Nice dman!this will come in handy for pur future modders here you should add some more tweaks or how to regarding moddings
sent from an awesome infuse4g
Yep... this will be the mod thread... will try and post new ones every week
sent from my baby girls rom
Thread has been stickied, this will be the how to thread for the Infuse, all how to questions and requests here..
Sick... Let the mods begin. I LOVE that you are sharing your knowledge so that everyone can learn and at their own pace. I have a feeling that this might be the begin to a lot of lightly nodded stock GB roms... Which is great. Thanks D. Maybe this will keep the dev questions in Zeus down a bit.... Though... I kinda doubt it..
Sent from my SAMSUNG-SGH-I997 using Tapatalk
How do you do the CRT ON animation?
Thanks dman! Love your work. I'd like to make a respectful suggestion. It may be a good idea to set up a post to use as an index for this thread before we get too deep into it. Maybe even move the content of the op and use that one. You're doing a good thing and thanks again.
Chaning bootanimation
Question here on chaning the boot animation....
If I just replace the png files with others in the sanim zip folder, will that work to change the boot animations?
I don't think that will work to change bootanimation... its more complicated than that.... I will get a how to up on that also, as soon as I can
Sent from my SGH-I997 using xda premium
Thanks dman! I was going to attempt to do this through uot with the framework-res.apk & twframework-res.apk from Zeus & ICS theme, but I will wait and be patient for the how-to on this. I searched through the forums on bootanimation topics, but there really isn’t any how-to. Thanks again in advance!
Extended power menu added to OP! Have fun guys!!!
dman3285 said:
Extended power menu added to OP! Have fun guys!!!
Click to expand...
Click to collapse
BEAUTIFUL!
Sent from my SAMSUNG-SGH-I997 using Tapatalk
great tutorial, thanks dman!!
Anytime
Sent from my SAMSUNG-SGH-I997 using xda premium
Im gonna try the crt off later on a different rom since zeus already has it and if i feel comfortable enought after that ill try the extended power menu
Quick question can you do the crt animation off on other phones? My cousin is jealous of that feature and he has the optimus v so im wondering if this mod is at all posible with his phone and if your tutorial for the infuse will work on his phone (dont want to brick his phone cause as far as i know his phone is actually brickable)
Sent from my SAMSUNG-SGH-I997 using XDA App
Yes... it should be a similar mod for both... but.. if you don't feel comfortable you can send me the framework-res.apk and I can mod it for you and send it back
Sent from my SAMSUNG-SGH-I997 using xda premium

[Launcher] Trebuchet for stock android 4.1-4.2 ROMs and later

I want post simple guidance how to port Trebuchet launcher from CM10.2 for our stock and customs ROMs based on android 4.1-4.2​How to:
1.Download installation zip for custom recovery from the link below
http://www.androidfilehost.com/?fid=23060877490001603
2.Open archive and unpack Trebuchet.apk from /system/app/ folder
3.Decomplie Trebuchet.apk
4.Navigate to \Trebuchet.apk\smali\com\cyanogenmod\trebuchet\preference\NumberPickerPreference.smali and find line 223
Code:
const v6, 0x1020310
5.Decomplie your framework-res.apk
6.Navigate to \framework-res.apk\res\values\public.xml and find line
Code:
<public type="id" name="numberpicker_input" id="0x01020310" />
your id 0x01020310 will be different from my one.
7.Use your id from name="numberpicker_input" and replace in NumberPickerPreference.smali in code
Code:
const v6, 0x1020310
remember ignore 0 after 0x
8.Complie your modified apk and replace with my one in flashable archive you downloaded before
9.Flash in custom reovery or just put in system/app on your device with 644 rights.
After installation press menu button when you are on app drawer or homescreen and choose your trebuchet settings.
artur0588 said:
I want post simple guidance how to port Trebuchet launcher from CM10.2 for our stock and customs ROMs based on android 4.1-4.2​How to:
1.Download installation zip for custom recovery from the link below
http://www.androidfilehost.com/?fid=23060877490001603
2.Open archive and unpack Trebuchet.apk from /system/app/ folder
3.Decomplie Trebuchet.apk
4.Navigate to \Trebuchet.apk\smali\com\cyanogenmod\trebuchet\preference\NumberPickerPreference.smali and find line 223
Code:
const v6, 0x1020310
5.Decomplie your framework-res.apk
6.Navigate to \framework-res.apk\res\values\public.xml and find line
Code:
<public type="id" name="numberpicker_input" id="0x01020310" />
your id 0x01020310 will be different from my one.
7.Use your id from name="numberpicker_input" and replace in NumberPickerPreference.smali in code
Code:
const v6, 0x1020310
remember ignore 0 after 0x
8.Complie your modified apk and replace with my one in flashable archive you downloaded before
9.Flash in custom reovery or just put in system/app on your device with 644 rights.
After installation press menu button when you are on app drawer or homescreen and choose your trebuchet settings.
Click to expand...
Click to collapse
not bad.. not bad at all...
artur0588 said:
I want post simple guidance how to port Trebuchet launcher from CM10.2 for our stock and customs ROMs based on android 4.1-4.2​How to:
1.Download installation zip for custom recovery from the link below
http://www.androidfilehost.com/?fid=23060877490001603
2.Open archive and unpack Trebuchet.apk from /system/app/ folder
3.Decomplie Trebuchet.apk
4.Navigate to \Trebuchet.apk\smali\com\cyanogenmod\trebuchet\preference\NumberPickerPreference.smali and find line 223
Code:
const v6, 0x1020310
5.Decomplie your framework-res.apk
6.Navigate to \framework-res.apk\res\values\public.xml and find line
Code:
<public type="id" name="numberpicker_input" id="0x01020310" />
your id 0x01020310 will be different from my one.
7.Use your id from name="numberpicker_input" and replace in NumberPickerPreference.smali in code
Code:
const v6, 0x1020310
remember ignore 0 after 0x
8.Complie your modified apk and replace with my one in flashable archive you downloaded before
9.Flash in custom reovery or just put in system/app on your device with 644 rights.
After installation press menu button when you are on app drawer or homescreen and choose your trebuchet settings.
Click to expand...
Click to collapse
I get an error while decomplieing, but my id is the same.
This is amazing! THANKS!!!

Fix for "Show disabled apps" bug in Galaxy Note 3 (KitKat) TouchWiz Launcher

Fix for "Show disabled apps" bug in Galaxy Note 3 (KitKat) TouchWiz Launcher
Hi,
This mod is for fixing the TW Launcher bug present in Galaxy Note 3 (N9005) 4.4.2 Kitkat. (Present Only in Latest Kitkat firmware like UGNG1,UGNH1,UGNI4)
Bug description: Suppose you have disabled some apps, but you can't see or enable them from App drawer (TW Launcher), because Show disabled apps options will be grayed out as soon as you disable any App from Settings or from (TW Launcher) App drawer. And Show disabled apps will be available if you haven't disabled any apps. In short, Show disabled apps is behaving in opposite way.
My Note 3 details:
Variant: SM-N9005,
ROM: Stock odexed ROM-rooted,
Firmware: N9005XXUGNG1,
Region: BTU.​
This guide will explain in detail on How to fix it. and I hope it might be useful for somebody.
Their might be other ways to implement it. but I am writing the steps which I have followed.
You Need:
1. Windows PC.
2. JRE installed.
3. Download the required tools from here. You can get the latest aapt.exe here, apktool.jar here, baksmali.jar and smali.jar files here
So here is the step by step guide on how to do it.
1. Copy framework folder (/system/framework) from your phone to C:\apktool\system\framework folder of your PC, and SecLauncher4.apk, SecLauncher4.odex files from your phone (/system/priv-app) to C:\apktool folder of your PC.
2. baksmali the SecLauncher4.odex present in C:\apktool folder using the command
Code:
[/B][B][COLOR="Red"]java -jar baksmali.jar -d C:\apktool\system\framework -x SecLauncher4.odex[/COLOR][/B]
Click to expand...
Click to collapse
-d path of directory where framework files are placed.​-x target .odex file (in our case it's SecLauncher4.odex)​3. Once command is completed, you will see a folder named out in C:\apktool.
4. Navigate to C:\apktool\out\com\android\launcher2, and search for the file MenuAppModel.smali.
5. Open the file and search for .method isDisableAppListEmpty.
Code:
[/B][B]
.method isDisableAppListEmpty()Z
.locals 1
.prologue
.line 711
iget-object v0, p0, Lcom/android/launcher2/MenuAppModel;->mAppDiabledItems:Ljava/util/Map;
if-nez v0, :cond_0
.line 712
invoke-virtual {p0}, Lcom/android/launcher2/MenuAppModel;->getDisabledAppList()Ljava/util/List;
.line 714
:cond_0
iget-object v0, p0, Lcom/android/launcher2/MenuAppModel;->mAppDiabledItems:Ljava/util/Map;
invoke-interface {v0}, Ljava/util/Map;->isEmpty()Z
move-result v0
if-eqz v0, :cond_1
.line 715
[COLOR="Red"] const/4 v0, [COLOR="Blue"]0x1[/COLOR][/COLOR]
.line 717
:goto_0
return v0
:cond_1
[COLOR="red"] const/4 v0, [COLOR="blue"]0x0[/COLOR][/COLOR]
goto :goto_0
.end method
[/B]
Click to expand...
Click to collapse
6. Change the red line to, as shown below for fixing the Show Disabled apps bug in Launcher.
Code:
[/B][B]
.line 714
:cond_0
iget-object v0, p0, Lcom/android/launcher2/MenuAppModel;->mAppDiabledItems:Ljava/util/Map;
invoke-interface {v0}, Ljava/util/Map;->isEmpty()Z
move-result v0
if-eqz v0, :cond_1
.line 715
[COLOR="Red"] const/4 v0, [COLOR="Blue"]0x0[/COLOR][/COLOR]
.line 717
:goto_0
return v0
:cond_1
[COLOR="red"] const/4 v0, [COLOR="blue"]0x1[/COLOR][/COLOR]
goto :goto_0
.end method
[/B]
Click to expand...
Click to collapse
7. Once changes are done, smali the out folder present in C:\apktool using the command
Code:
[/B][B][COLOR="Red"]java -jar smali.jar -o classes.dex out[/COLOR][/B]
Click to expand...
Click to collapse
-o the name of newly created .dex file.​out is the folder name.​8. Once you see the classes.dex file in the folder, then push this .dex file into SecLauncher4.apk file using the command
Code:
[/B][B][COLOR="Red"]aapt add SecLauncher4.apk classes.dex[/COLOR][/B]
Click to expand...
Click to collapse
9. After the command in Step 8, Size of apk file should increase, Now Zipalign the apk using the command.
Code:
[/B][B][COLOR="Red"]zipalign -fv 4 SecLauncher4.apk SecLauncher4_new.apk[/COLOR][/B]
Click to expand...
Click to collapse
10. Now you will see a new apk file named "SecLauncher4_new.apk", Copy the SecLauncher4_new.apk to your phone and rename it to SecLauncher4.apk, This is deodexed .apk file, and you can directly push this apk into your phone path /system/priv-app using RootExplorer and set the permission to rw-r--r--, and delete the SecLauncher4.odex file from the priv-app folder.
Restart the phone, and you should be able to disable and enable the unwanted apps from Touch Wiz Launcher.
11. If you want to create the SecLauncher4.odex file from the SecLauncher4.apk file then their are few more steps, which involves Terminal Emulator, but this apk will work fine. Please delete or remove the SecLauncher4.odex file from the system/priv-app folder and keep only SecLauncher4.apk, because this apk is deodexed and working fine for me.
Here are the steps to Create .odex from .apk file:
a. Copy the modified .apk file to Phone Internal Storage, for example: /storage/emulated/0/app/SecLauncher4.apk and download dexopt-wrapper from here.​b. Unzip dexopt-wrapper.zip and Copy dexopt-wrapper file to system/bin folder of your Phone using Root Explorer and set the permission to 0755 or rwxr-xr-x.​c. After Setting the correct permission, Download and install Terminal Emulator, and open it.​d. Type the following commands as shown below to generate .odex from .apk file
Code:
[/B][B]
[COLOR="Red"]su[/COLOR]
[/B]
Click to expand...
Click to collapse
su - This is to grand super user permission.​
Code:
[/B][B]
[COLOR="red"]dexopt-wrapper /storage/0/emulated/app/SecLauncher4.apk /storage/0/emulated/app/SecLauncher4.odex[/COLOR]
[/B]
Click to expand...
Click to collapse
​
dexopt-wrapper path-of-apk path-of-newly-created-odex - Once this command is executed, you should see a success message on Terminal Emulator.​e. Now you will find a modified .odex file in /storage/0/emulated/app/ . Replace the original .odex with the modified file. Take a back up of Original .odex file​
For enabling Ripple ink effect with fingers or without S-pen, check out here...
For enabling Particle Effect or Lens Flare Effect on LockScreen please check out here
Hit THANKS button, If I helped You.​
Thanks for your tip/mod
Tested and working
Rajada said:
Thanks for your tip/mod
Tested and working
Click to expand...
Click to collapse
Thanks.
What's your firmware version?
amk19 said:
Thanks.
What's your firmware version?
Click to expand...
Click to collapse
N9005XXUFNF4. (Changelist 1 955 971)
i am using a modified seclauncher4 but was interested in doing the disabled apps modification. Although i am using the same rom as in you, i have deleted the seclaucher4.odex file when i replaced the original seclakucher4 with modified seclauncher4
Can you please advise, how do i do the modification now . do i have to generate the odex file first before i do anything
swagatsourav said:
i am using a modified seclauncher4 but was interested in doing the disabled apps modification. Although i am using the same rom as in you, i have deleted the seclaucher4.odex file when i replaced the original seclakucher4 with modified seclauncher4
Can you please advise, how do i do the modification now . do i have to generate the odex file first before i do anything
Click to expand...
Click to collapse
Hi,
You can modify it even without creating .odex file.
Just decompile it and then you'll see a folder named smali inside the decompiled apk folder, make the required changes and recompile it again.

[Tutorial] How to Deodex Lollipop System Files - One by One

Hey guys,
I write this tutorial to help guys deodex individual apps and not all apps or not to do batch deodex.
There are few good tools to Batch Deodex Roms but I found one by one tutorial which was not properly framed...
Though the credits goes to the creator of the tool.
I dont take any credits for that tool and here I just write up a tutorail on how to do it.
Step by Step Tutorial:
- First of all download this zip file of the tools required for the process - Link
- Now, extract the files of the zip to any folder.
- Head over to the directory you extracted the tools. It will contain many files such as baksmali, smali, 7zip etc..
- Now press Shift+Right Click and select Open Command Window Here.
- Now just copy the apk and the .odex.art.xz and odex.xz files in that directory.
- Now in command prompt type the following commands.
Note: Replace * With the name of the apk. (If you dont get it see the Post #2 for eg)
Code:
7za x *.odex.xz
Code:
oat2dex.bat *.odex
Code:
oat2dex.bat *.odex temp.dex
Code:
java -jar baksmali-2.0.3.jar -a 21 -x temp.dex -o deodex
Code:
java -jar smali-2.0.3.jar -a 21 deodex -o classes.dex
Code:
7za u -tzip *.apk classes.dex
Now, the apk you initially coppied is now dexoded. Now you can use that apk the way you want
See post #2 for example
Reserved
Example:
Say I want to Deodex SystemUI for any lollipop rom.
Then, I would do the following
Code:
7za x SystemUI.odex.xz
Code:
oat2dex.bat SystemUI.odex
Code:
oat2dex.bat SystemUI.odex temp.dex
Code:
java -jar baksmali-2.0.3.jar -a 21 -x temp.dex -o deodex
Code:
java -jar smali-2.0.3.jar -a 21 deodex -o classes.dex
Code:
7za u -tzip SystemUI.apk classes.dex
The apk is now deodexed successfully. Enjoy!
hey mate, any chance you can upload a few small .apk files and matching .odex.xz files?
ive got a few test to run for a tool i made but cant because i dont have any android 5.0 devices

Lollipop APK deodexing [commandline][scripts]

Lollipop deodexing
Deodexing apk's on lollipop is almost as simple as API < 21 and only invoves two extra steps.
The workflow for the new deodex process is as follows below. The <arch> is the architecture for the apk being deodexed.
oat2dex boot system/framework/<arch>/boot.oat
oat2dex <path/to/app/<arch>/app.odex> system/framework/<arch>/odex
baksmali as normal
smali as normal
The actual behind-the-scenes info
ART changes things with its 'Ahead of Time Compiling'. Android creates a boot.oat on boot containing the classpath jars that apks
link against for functionality. Before these the .odex for the classpath was compatible with baksmali/smali, but due to changes with
ART vs Dalvik this is no longer the case now. The classpath needs to extracted from the boot.oat. The resulting dex/ and odex/ are then
used to create a bootclasspath that can be used to create a baksmali/smali compatible odex, by essentially deoptimizing it. Once
the compatible odex is created, baksmali and smali can be used like normal - even allowing smali edits to exisiting APKs.
A working (manual) example
To get started you will need to pull the framework directory off the device.
Code:
mkdir framework
cd framework
adb pull system/framework
The next step is to pull the app's folder from system/app or system/priv-app.
For this example I will be using SecSettings2.apk from a Samsung Galaxy S6.
Code:
mkdir SecSettings2
cd SecSettings2
adb pull /system/priv-app/SecSettings2
The next step is to determine the architecture of the apk to be deodexed. This is done checking whether the directory that the
apk's folder contents were extracted to contains an arm or arm64 folder (32-bit or 64-bit, respectively).
The SecSettings2.apk is 64-bit as its folder contains an arm64 folder.
Once the architecture is determined, the next step is to extract the classpath from boot.oat. Replace arm64 with arm below
if your app is only 32-bit.
Code:
oat2dex boot framework/arm64/boot.oat
This will extract the classpath from the boot.oat and place the dex and odex into separate directories in framework/<arch>.
Now the classpath can be used to create a compatible odex that baksmali and smali is compatible with. Note that the result odex
will have a .dex extension. This is NOT to be placed into the apk as the app will NOT work.
Code:
oat2dex SecSettings2/arm64/SecSettings2.odex framework/arm64/odex
We now have a odex (labled SecSettings2.dex in SecSettings2/) that is compatible with baksmali and smali.
To baksmali the odex:
Code:
baksmali -a 21 -x SecSettings2.dex -d framework -o smali/SecSettings2
To deodex the smali into a dex:
Code:
smali smali/SecSettings2
The last command outputs a classes.dex that is going to go into the apk.
Code:
zip -gjq SecSettings2 classes.dex
Now we need to remove the arm or arm64 folder from the apk's location on the device.
Code:
adb shell su -c 'mount -o remount,rw /system'
adb shell su -c 'rm -rf system/priv-app/SecSettings2/arm64'
Now we simply need to push the apk to the device, fix permissions, and reboot.
Code:
adb push SecSettings2.apk /data/local/tmp/
adb shell su -c 'dd if=/data/local/tmp/SecSettings2.apk of=/system/priv-app/SecSettings2/SecSettings2.apk'
adb shell su -c 'chmod 644 /system/priv-app/SecSettings2/SecSettings2.apk'
adb reboot (You may need to wipe data depending on the app being deodexed)
That's it. Happy modding
But I have made it easy for ya.....
deodex-app makes it stupid simple to deodex an apk from the device by running one command
Code:
./deodex-app SecSettings2.apk
That's it. The script will determine the apk's location in system, check if it's already deodexed, pull the neccessary
files to perform the deodexing, and will push the apk back to the device and reboot.
/lazydev
Huge credits to @JesusFreke for baksmali and smali, and credit to @svadev for the updated oat2dex

Categories

Resources