[HELP] Bootloop making transparent notification background - Desire Q&A, Help & Troubleshooting

Hello,
I have been reading up and followed some instructions to make a transparent notification background.
I used ADB to pull framework-res.apk and services.jar from my phone (running MCR R9) and replaced the status_bar_background.png in the framework-res.apk (I didn't extract, just dragged the replacement png in to the "zip") and then I followed the following instructions to edit the services.jar:
It's not really hard to do it on your own:
First download smali.jar and baksmali.jar from here http://code.google.com/p/smali/
Open the services.jar file for example with winzip, 7z, winRar, or whatever.
Unzip the classes.dex file to your sdk/tools/ folder and place the baksmali and smali file there too. After that open a new commandbox an run following line:
java -jar baksmali.jar -o out/ classes.dex
You'll have a new folder now called "out". Browse to "out/com/android/server/status" and open the file called StatusBarService.smali with a text editor like notepad.
Search for ".line 1773" and you'll find also "const/4 v5, 0x2"
Just change this to "const/4 v5, -0x3" and save the file.
Open again a new commandbox and run this:
java -Xmx512M -jar smali.jar out/ -o edited-classes.dex
Now you'll have a new dex file called "edited-classes.dex".
Delete the old file an rename the new in "classes.dex".
Open again the services.jar file with any zip tool and overwrite the classes.dex file with the one just created.
-------------
I then used update packager to create a signed update.zip of both the framework-res.apk and services jar (they were in a subfolder called framework and the script was set to copy the folder to SYSTEM) but I just get a bootloop and a whole load of force closes.
Can someone who is making themes please help me out and tell me what I am doing wrong?
Many thanks in advance
David p

Tried again following the instructions on this thread http://forum.xda-developers.com/showthread.php?t=732370 and using xUltimate-TP.exe but still ended up with a bootloop. Thank goodness for Nandroid!
I would still appreciate a helping hand though if any themers care to assist.
Thanks
David P

Related

[GUIDE] A Beginner's Guide To Theming

The basic part of a theme is the UI (User Interface) icons.
These icons are situated in three system files:
1. framework-res.apk
2. twframework-res.apk
3. SystemUI.apk
NOTE: Your phone should have the de-odexed versions of these files.
You may get them here http://android.modaco.com/topic/342915-samsung-galaxy-s-deodexedzipaligned-xxjvq-files/#entry1754033 .
MISSION 1 (GET THE FILES)
In order to get these files your phone needs to be rooted and you should have a system file explorer like Yaffs Explorer. The easiest way to root your phone is by flashing a kernel that provides root.
The framework-res.apk is situated in the folder /system/framework/
The twframework-res.apk is situated in the folder /system/framework/
The SystemUI.apk is situated in the folder /system/app/
Copy those files and put it in your sd card and then transfer those files to your PC.
These files will be used as the template for the new theme.
[OPTIONAL] Make a copy of these three files as back-up.
MISSION 1 COMPLETE
MISSION 2 (THE MYSTERIOUS CHANGE)
In order to change the icons there are three ways
a.The Easy way (not the correct way: might cause FCs )
b.The Hard way (recommended for risk takers )
c.Use the online theme kitchen (recommended for beginners )
[ http://uot.dakra.lt/ ]
NOTE:You may have to use both b. and c.
a. The Easy way
You need a program like 7-zip installed in your PC.
Method
-Open the apk using 7-zip.
-Go to the folder named res
-Extract the folder named drawable-hdpi
-Edit the images you want to edit [ DO NOT EDIT .9png IMAGES ]
-Replace the original icons with modified icons(drag & drop into
drawable-hdpi folder)
Tips
-Keep the original image dimensions
-Don't edit .9 pngs
b. The Hard way
This consists of decompiling the apk, modifying the required images, compiling the modified
images and replacing the original icons with the compiled icons.
You will need:
1.Apk Manager
(go here for instructions http://forum.xda-developers.com/showthread.php?t=695701 )
2.xUltimate compiler
(go here for instructions http://www.droidforums.net/forum/xeudoxus/47283-release-xultimate.html )
3.7-zip
Method
-Go to the main folder of Apk Manager
-Put the apk in the folder named place-apk-here-for-modding
- In order to decompile all APKs when working with the i9000, you have to install the framework files with apktool.
- Download apktool and put it on an easy accessable place (like C:\)
- Also put the STOCK framework-res.apk and twframework-res.apk files in the same directory.
- Open a new CMD (Press Windows Key + R), write CMD and press ENTER.
- type "cd .." (without the quotes)
- repeat the "cd .." so you're on C:\ now.
- write: java -jar apktool.jar if framework-res.apk
- repeat, just with twframework-res.apk: java -jar apktool.jar if twframework-res.apk
- This will ensure, it will load the correct resource table and you won't have any errors because of the dependees
-Run Script.bat file
-Select option 9 to decompile the apk
-Go to the folder named "projects" (the decompiled apk folder should be there)
-Inside the decompiled apk folder go to the folder /res/drawable-hdpi
-Modify the icons you want to change(KEEP THE BORDERS OF .9png IMAGES
UNTOUCHED)
-Open the main folder for xUltimate
-Go to the folder \example1\res\drawable-hdpi
-Delete the icons present there
-Put the modified icons
-Go to the main folder for xUltimate and run the xUltimate.exe file
-The compiled icons can be found in the folder
\done\example1\res\drawable-hdpi
-Replace the original icons with the compiled icons USING 7-zip
MISSION 2 COMPLETE
MISSION 3 (SEE THE CHANGE)
To see how your new theme looks like, you should put the modified files back to where they
belong.
There are two ways of doing this:
1. By using the system file explorer
Before doing so make sure that the system is write-enabled. You can do this
by using Damian Tweak app. If you are using Yaffs Explorer make sure you
have enabled root access
in the app's settings.
2. By making a CWM package (safer)
Use the Zip file provided. Replace the original files with moded files and install
using
CWM.
MISSION 3 COMPLETE
HAPPY THEMING
reserved
reserved
I have to thank you so much!
The first Tutorial I found that was understandable for beginners too.
Big Big Big Thanks!
nightm4r399 said:
I have to thank you so much!
The first Tutorial I found that was understandable for beginners too.
Big Big Big Thanks!
Click to expand...
Click to collapse
I'm glad it helped .
Exactly what I needed. Thank you for good guide.
hackeron said:
Exactly what I needed. Thank you for good guide.
Click to expand...
Click to collapse
Great .
Btw do you know how to make this a Sticky Thread?
SCIENTYREAL said:
Great .
Btw do you know how to make this a Sticky Thread?
Click to expand...
Click to collapse
You have to ask a moderator to do this
I have some additions to the guide
The red code is added by me.
Method b) the hard way
-Go to the main folder of Apk Manager
-Put the apk in the folder named place-apk-here-for-modding
- In order to decompile all APKs when working with the i9000, you have to install the framework files with apktool.
- Download apktool and put it on an easy accessable place (like C:\)
- Also put the STOCK framework-res.apk and twframework-res.apk files in the same directory.
- Open a new CMD (Press Windows Key + R), write CMD and press ENTER.
- type "cd .." (without the quotes)
- repeat the "cd .." so you're on C:\ now.
- write: java -jar apktool.jar if framework-res.apk
- repeat, just with twframework-res.apk: java -jar apktool.jar if twframework-res.apk
- This will ensure, it will load the correct resource table and you won't have any errors because of the dependees
-Run Script.bat file
-Select option 9 to decompile the apk
-Go to the folder named "projects" (the decompiled apk folder should be there)
-Inside the decompiled apk folder go to the folder /res/drawable-hdpi
-Modify the icons you want to change(KEEP THE BORDERS OF .9png IMAGES
UNTOUCHED)
-Open the main folder for xUltimate
-Go to the folder \example1\res\drawable-hdpi
-Delete the icons present there
-Put the modified icons
-Go to the main folder for xUltimate and run the xUltimate.exe file
-The compiled icons can be found in the folder
\done\example1\res\drawable-hdpi
-Replace the original icons with the compiled icons USING 7-zip
Click to expand...
Click to collapse
Darkyy said:
You have to ask a moderator to do this
I have some additions to the guide
The red code is added by me.
Method b) the hard way
Click to expand...
Click to collapse
Thanks for replying Darkyy .
So, i Get a ADB not found thing? WHat should i do?
roxyroot said:
So, i Get a ADB not found thing? WHat should i do?
Click to expand...
Click to collapse
You should have Android SDK installed for Apk Manager to work.
The link on how to use Apk Manager is given in the first post, under apk manager. I'll post it again here
http://forum.xda-developers.com/showthread.php?t=695701
Here is the link for Android SDK
http://developer.android.com/sdk/index.html
Btw you should also have Java Development Kit (JDK) installed.
I cant seem to find the twframework-res.apk, it's not in the system/framework folder. I have a sony ericsson play.
Do you know where the android settings menu icons are? the ones you see when you go into android settings. Like wireless & Networks, call settings, sound and so on.
thanks great guide.
SCIENTYREAL said:
You should have Android SDK installed for Apk Manager to work.
The link on how to use Apk Manager is given in the first post, under apk manager. I'll post it again here
http://forum.xda-developers.com/showthread.php?t=695701
Here is the link for Android SDK
http://developer.android.com/sdk/index.html
Btw you should also have Java Development Kit (JDK) installed.
Click to expand...
Click to collapse
I have android SDK (obviously), JRE and i used it the same way given, stilll..The error..I have a SGS SCL i9003...
hackit said:
I cant seem to find the twframework-res.apk, it's not in the system/framework folder. I have a sony ericsson play.
Do you know where the android settings menu icons are? the ones you see when you go into android settings. Like wireless & Networks, call settings, sound and so on.
thanks great guide.
Click to expand...
Click to collapse
Twframework-res is only found in Samsung devices. No need to worry about it. The settings icons are found in settings.apk. Settings.apk is inside the folder system/app.
Sorry for replying late.
bangalorerohan said:
I have android SDK (obviously), JRE and i used it the same way given, stilll..The error..I have a SGS SCL i9003...
Click to expand...
Click to collapse
To be honest I don't know the exact cause of the error. Have you updated Android SDK. You should click on the main SDK icon and it should show all the available updates. Select
the updates and download the files. Sorry if you have already done it.
Sorry for the late reply.
:laugh:
I forgot how to do it and now I am reading my own guide.
Thanks for this great guide! Will come in handy soon

[tut] transparent status bar

How to get a Transparent status bar!
ok ok there are still a few problems to work out but maybe some people smarter than I will know the answers.
Here's what you should know before we begin... MAKE A BACKUP FIRST
at the moment ..
1. this does not work with the stock touchwiz launcher (may be a simple fix havn't looked into it yet.)(well works everywhere but the desktop)
works quite well with ZEAM and not too shabby with GO EX (if you use multipicture live wallpaper from the market)
havent looked into any others.
2. the status bar is still clear on the lockscreen (may annoy some)
fixible with multipicture wallpaper just set use lockscreen settings and then lock screen settings and set a black picture.
probably not perfect but it's a start.
thanks to KBanause for providing the info needed at this link http://forum.xda-developers.com/showpost.php?p=9978779&postcount=62
This tut also assumes you have some basic computer skills and can navigate from a command prompt. and that your computer has java installed. (most do you just need the runtime enviroment if you don't have it get it here http://www.oracle.com/technetwork/java/javase/downloads/jre-7u1-download-513652.html)
OK if you still want to try this
START HERE
MAKE A BACKUP FIRST
download
clearstatustry.zip (attached above)
unzip this file to a folder (7zip or winrar ect whatever)
you should have 4 files here
baksmali-1.2.8.jar
smali-1.2.8.jar
statusbar_background.9 - 25.png 25% transparency
statusbar_background.9 - 50.png 50%transparency
still here . wow ok you must really want to see this.
pick one of the statusbar_background files and rename it statusbar_background.9.png
now you need the SystemUI.apk from your phone it's in /system/app
grab it with a file browser that has root access and copy it into the folder with that other crap.
next Open SystemUI.apk with your zip tool, do not extract, just open.
navigate to the res/drawable-hdpi/ folder and copy your statusbar_background.9.png over the existing one.
now go back to the root of the SystemUI.apk and Drag classes.dex out to your folder.
open a command prompt and navigate to your folder with these files.
or just shift + right click in the folder you extracted the files to and select open command prompt here.
run this command
java -jar baksmali-1.2.8.jar -o classout/ classes.dex
now go back to your folder
and navigate to classout\com\android\systemui\statusbar
open StatusBarService.smali in a txt editor
find the line
invoke-direct/range {v0 .. v5}, Landroid/view/WindowManager$LayoutParams;-><init>(IIIII)V
above that change const/4 v5, 0x2 to const/4 v5, -0x3
save and close
Go back to your CMD prompt and enter this command
java -jar smali-1.2.8.jar classout -o classes.dex
ALMOST THERE I PROMISE
now copy the classes.dex back into the root of the SystemUI.apk file and close
MAKE A BACKUP FIRST
now just copy that systemui.apk back into the /system/app folder on your phone
dont mind the force close and reboot.
MAKE A BACKUP FIRST
if it doesn't seem to work try a live wallpaper
or use Multipicture live wallpaper from the market to set a static image.
this will probably mess up your phone but hey sorry MAKE A BACKUP FIRST
mjcollum said:
java -jar baksmali-1.2.8.jar -o classout/ classes.dex
Click to expand...
Click to collapse
For those that are unfamiliar with command line and get file not found errors, instead of typing everything try this
Code:
java -jar [b](drag baksmali-1.2.8.jar file here)[/b] -o classout/ [b](drag the classes.dex file here)[/b]
This will fill out the path to your files for you if they aren't in the root directory.
mjcollum said:
Go back to your CMD prompt and enter this command
java -jar smali-1.2.8.jar classout -o classes.dex
Click to expand...
Click to collapse
Same concept here
Code:
java -jar [b](drag smali-1.2.8.jar file here)[/b] [b](drag classout folder here)[/b] -o classes.dex
Either way, thanks for the guide. I'm sure a lot of people will find it useful
Good call I didn't even think to let people know about that.
also another heads up for anyone that doesn't know you can shift + right click in the folder and choose open command window here that way you don't have to navigate to the directory.
Wow- I can't believe this thread got buried with only a few posts.
I have followed these outstanding instructions word for word with no issues at all, however my status bar is still blacker than black! After completing this, I went back and pulled my SystemUI.apk again, decompiled it, and checked to make sure the smali edit and the .9 were still there which of course, they are. Is there an xml color code that needs to be changed as well?? I tested this with both Go launcher and ADW and no luck. Help!?!?
Thanks!
I would think that maybe using the transparent lock screen and this we could figure it out. I would love to have that option!
I really wish we could get this working. its the Last visual hack I want to do on my SII that I can't do. Everything else is perfect just really hate that black bar. I can hide it but then I can't see my info either. Grrrrr
In addition to the smali edit and the statusbar_background.9, I found an XML difference between a miui clear status bar systemUI and all of ours (as in any ET4G systemUI. I'm getting ready to mod it and push it. I'll let you know if it works!
Sent from my SPH-D710 using xda premium
I tried this step by step with no luck. To make it white could you just change -0v3 to -0v1 or make the statusbar image white?
Is this possible with apk manager using notepad++ to edit the smali file and recompiling?
Thanks.
is there an easy way for me to "change" the image to another opaque image ie an actual image not a "color"
I could just crop X pixels from the top of my image and MAKE THAT the background for the status bar if that is possible.
Ok I think I figured it out and I don't even think you have to edit the smali but I could be wrong. You have to edit the layout/statusbar xml file and at the top you see ff000000 which is black and change that to the desired color or make it transparent. I just made mine white but combined with the smali edits shown here but stock statusbar image.
nerys71 said:
is there an easy way for me to "change" the image to another opaque image ie an actual image not a "color"
I could just crop X pixels from the top of my image and MAKE THAT the background for the status bar if that is possible.
Click to expand...
Click to collapse
There is, to do that make sure you have the newest version of Android SDK, Java, and ADB
Download APK Multitool here - http://apkmultitool.com/?q=node/5
Extract it then extract the apps you are going to mod, in your case framework-res and SystemUI.
Put the SystemUI.apk in the modding folder and run the script to decompile SystemUI with the framework-res as a dependency (option 10). Before proceeding, but after decompiling check the log file to ensure everything decompiled without error, otherwise it won’t recompile. Errors are usually due to improperly patched .9.png’s, and while they can be very confusing, you can just swap bad ones out with those from a stock ROM until after you’ve made your edits.
Once you have decompiled without any errors open your project folder (inside whatever you named your APK Multitool folder and navigate to;
res/layouts/statusbar.xml:
On the second line find <com.android.systemui.statusbar.StatusBarView androidrientation="vertical" android:background="#ff000000" android:focusable="true" android:descendantFocusability="afterDescendants"
change it to
<com.android.systemui.statusbar.StatusBarView androidrientation="vertical" android:background="@drawable/statusbar_background" android:focusable="true" android:descendantFocusability="afterDescendants"
Do the same on the second to last line which is the date view. It will have the color code (#ff000000) change it to "@drawable/statusbar_background"
Follow the prompts to recompile and use the new apk created in the mod folder called unsignedSystemUI.apk. In the drawable-hdpi folder you’ll find a png named statusbar_background.9.png, which is what will now be displayed as the status bar instead of the color code. You can make it any color you’d like. Ideally, you should ensure that the .9 is properly patched, but if you swap it out after recompiling it somehow doesn’t seem to matter much.
Good luck.
I just don't feel comfortable going to those lengths just yet.
Guess I will have to wait (hope) for a simpler solution
I tried the metamorph one but it does not work (bad file)
You only have to edit calls to the image in system UI status bar XML as someone above said. No smali edits required. Currently it calls a color code. You want it to call an image. Alternately, you could simply use a color code with transparency as well and skip editing an image all together. =P
Sent from my SPH-D710 using XDA App
nerys71 said:
I just don't feel comfortable going to those lengths just yet.
Guess I will have to wait (hope) for a simpler solution
I tried the metamorph one but it does not work (bad file)
Click to expand...
Click to collapse
It's actually easier to do than it is to read, but if you're not comfortable with t yet thats understandable.
What ROM are you using? If you send me the SystemUI.apk your using I can take a look at it.
Change the color code if you want something simple, but if you want to use an image up there, do as posted a few posts up.
calkulin's 2.7
nerys71 said:
calkulin's 2.7
Click to expand...
Click to collapse
+1, if someone has this working on calks 2.7 could you please share the files you edited? Id love to add this to my theme. If no one has already did it, ill give it a try and post results if successful
I can post one tonight, its very easy to do.
Minimal black and white theme has transparent statusbar
Sent from my SPH-D710 using xda premium

[REF] Changing default wallpaper in ICS firmwares [FOR ROM DEVELOPERS]

I decided to write this little guide after a question I got via PM
It seems a pretty "big" problem as Google changed a few parameters in its framework-res.apk file.
So here I am
I hope this will help you someway. If you like this press my Thanks button
____________________
1) Load framework file in apktool
Code:
apktool if framework-res.apk
2) Decompile it
Code:
apktool d framework-res.apk
3) Navigate to /res/drawable-hdpi/ and delete default_wallpaper.jpg file
4) Copy the jpg file you want to be default wallpaper in /res/drawable-hdpi/ and rename it in default_wallpaper.jpg
5) Navigate to /res/values/ and open strings.xml
6) Change this line
Code:
<string name="default_wallpaper_component">com.android.wallpaper/.nexus.NexusWallpaper</string>
with this:
Code:
<string name="default_wallpaper_component">@null</string>
7) Compile framework-res.apk
Code:
apktool b framework-res framework-res-modded.apk
8) Sign it (e.g. ApkManager)
9) Rename it in framework-res.apk and push it to ROM flashable zip
____________________
That's it
If you have any problems compiling back framework-res.apk look here
Have a nice day!
lippol94 said:
I decided to write this little guide after a question I got via PM
It seems a pretty "big" problem as Google changed a few parameters in its framework-res.apk file.
So here I am
I hope this will help you someway. If you like this press my Thanks button
____________________
1) Load framework file in apktool
Code:
apktool if framework-res.apk
2) Decompile it
Code:
apktool d framework-res.apk
3) Navigate to /res/drawable-hdpi/ and delete default_wallpaper.jpg file
4) Copy the jpg file you want to be default wallpaper in /res/drawable-hdpi/ and rename it in default_wallpaper.jpg
5) Navigate to /res/values/ and open strings.xml
6) Change this line
Code:
<string name="default_wallpaper_component">com.android.wallpaper/.nexus.NexusWallpaper</string>
with this:
Code:
<string name="default_wallpaper_component">@null</string>
7) Compile framework-res.apk
Code:
apktool b framework-res framework-res-modded.apk
8) Sign it (e.g. ApkManager)
9) Rename it in framework-res.apk and push it to ROM flashable zip
____________________
That's it
If you have any problems compiling back framework-res.apk look here
Have a nice day!
Click to expand...
Click to collapse
Code:
<string name="default_wallpaper_component">@null</string>
Thanks for the guide.
will null specify, it accepts all wallpapers.!!!
viijay4b7 said:
Code:
<string name="default_wallpaper_component">@null</string>
Thanks for the guide.
will null specify, it accepts all wallpapers.!!!
Click to expand...
Click to collapse
I need some help.. I did this and I had no problem but others are reporting they cannot flash my rom with this change in effect. Going back to stock
framework-res they have no problem.. SOOO any Ideas??? They flash it and than their phone locks up and they do a battery pull and upon reset it will not start
at all..

Decompile/Recompile Jellybean APK's

Ok everyone, this is my first tutorial that I am ever putting out and I will try to be as thorough as possible. This tut is not so much for the people that dont know much about android, it is more for the people that understand most of it already. But as always feel free to read through it and start learning as most of us around here have! So without further a do lets get started!!
FIrst you need 7-zip!!! So go install it!!
So first, the first thing you need to do is go to this link and download the apktools and aapt that are in the zip:http://www.mediafire.com/?acrgcd0w850q0gj
After you extract this zip you will have a folder with all the tools we will need to do this!!!! Now, if you are doing this then you probably already have done it on Ice Cream Sandwich or Gingerbread. So the next thing we need to do is remove your "Environmental Variables". Environmental Variables are basically the commands that you can run in command prompt from any folder on the computer. If you have the android sdk or previously have tried to decompile and compile Apk's chances are you have the setups in the Environmental Variables.
Remove Unneeded Environmental :
1)Hit the start menu on the bottom left hand corner of Windows
2)Right-Click on Computer and select Properties
3)On the top left-hand corner select Advanced System Settings
4)A window comes up and select the button that says "Environmental Variables"
5)In the window that comes up there is two boxes. We are going to edit the bottom one labed "System Variables". Now grab the scroll bar and look for the variable Path. It should be under OS and above PATHEXT. Double-Click "Path" Variable
NOTE: Each path ends in a ";"
6) So now you will need remove every instance that would point to anything android related. For example one is "C:\SDK\platform-tools\;" If it has this then apktools will run the aapt.exe from that platform-tools folder instead of the one that is provided in the zip.
ALTERNATIVE: An alternative would be to delete the aapt that you have in your folder that you have in your Path System Variable.
I know this was not very clear but I again this is for the users a bit more advanced.
-------------------------------
DECOMPILE/COMPILE SystemUI.apk and other Apk's. EXCEPT framework-res.apk
Ok, you can do this however you want but for this tut I am going to extract apktools.zip and place the folder on my desktop. So we're going to open the folder and then place the APK we want to edit along with a JELLYBEAN framework-res.apk into the folder. For example if you want to edit a CM10 "SystemUI.apk" then you will pull the framework-res.apk from /system/framework/ folder nd place it in your desktop JBapktools folder.
Once you have both SystemUI.apk and framework-res.apk inside the JBapktools folder we are ready to start. First rename either one of these files "apktool149.jar" "apktool142.jar" "apktool144.jar" to just apktool.jar. REMEMBER only rename ONE cus we need to keep track of the versions of the apktools.
Next, bring up the folder window and anywhere on the white space hold SHIFT and Right-Click. Then youre going to choose open command window here.
The first command is going to be: java -jar apktool.jar if framework-res.apk
This is going to install the framework.
Now close out the window.
Next go back to the folder and make sure you rename the jar file you renamed earlier back to its original name. For example if you have apktool144.jar and apktool149.jar in the folder then you must rename apktool.jar to apktool142.jar because that is its original and actual version number.
To decompile and recompile SystemUI.apk you need apktool149.jar so once all three are named to their real names then rename apktool149.jar to apktool.jar.
Now,YOU ARE READY!!! Finally.
Again, In the folder SHIFT +Right-Click and select open command window here.
the command to decompile is: java -jar apktool.jar d SystemUI.apk
---------------------------------------------------------------------------------------
Then hit enter you should see something like this:I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Jose\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
---------------------------------------------------------------------------------------
Of course it wont say Jose but it will say your User Accounts name.
Now in the folder you should see another folder in there called SystemUI. Now its DECOMPILED!!!!! WHOOOOO!!!!!!
You can make your edits and edit the pngs and xmls or the smali or whatever your guru-self wants to do.
Now to RECOMPILE!!!!!
To recompile we will still be using apktool149.jar so no need to rename anything back or whatever.
The first thing you should do is open the SystemUI.apk in 7-zip. You can right-click SystemUI.apk and in there, there should be a META-INF folder and a AndroidManifest.xml file. Select both of these be selecting one first(should be highlighted blue) the holding down Cntrl button and selecting the other file. Now that they are both selected click and drag out to apktools folder. We will need these files in a little bit.
Next in the command prompt window, or if you closed it, the reopen by SHIFT+Right-Click and selecting open command window here. The command to decompile is:
java -jar apktool.jar b SystemUI
NOTE:Make sure you use the letter "b" and dont add .apk to the end of it as we are recompiling the FOLDER and not an actual apk file like we do when decompiling.
It should say something like this:
I: Checking whether sources has changed...
I: Smaling
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
Sounds very sexy when reading it I know but we aren't done yet. Remember the META-INF Folder and the AndroidManifest.xml file we pulled out earlier. Ok from the apktools folder select both files again by using Ctrl button. Now type Ctrl C. This will COPY these files to the clipboard. Now that we have the files copied go into SystemUI FOLDER and then go into build folder and then into apk folder. To make it look more neat navigate to /Desktop/apktools/SystemUI/build/apk/ . Now that you are in the apk folder hit Ctrl V. This will PASTE the META-INF and AndroidManifest.xml file into the folder. If a window comes up just choose COPY AND REPLACE.
Last thing to do before we can compile is to go into /SystemUI/dist/ and delete the apk file that is there. The recompiling process is almost complete!!! Go back to command prompt window and just push the ARROW UP on the keyboard. This should bring up the last command you typed in. If its not there then just type it in again:
java -jar apktool.jar b SystemUI
The final apk file should be in SystemUI/dist/ folder!!!!
If you are having any aapt problems then you probably still have a path in Environment Variables that has an aapt.exe in it. Other than that askk and I'm sure myself or someone else can help!!
I will be putting up the how to decompile/recompile framework-res.apk in 2nd post tomorrow or soon because I dont have time right now. The process is different. Have fun themeing and doing whatever it is you do!!!
Added a donate link guys. I'm only 16 so I can't say buy me a beer! So how bout half a gallon of gas? That would be great. Let me know if you donated to I can thank you and put you in my posts!! I have a passion for doing these things so I do not expect any donations from anyone. I do it because I love it and can't get enough of it!! Thanks everyone for being supportive
Donations: Marcismo55
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GL7RKF2EGCH68
FUERRER!!!
1 more just in case
nice
Sent from my Axiom Infekted Razr Maxx using Xparent ICS Blue Tapatalk
Hey man, nice write up. Always good to see people share information.
However, you made it WAY more complicated than it needs to be.
+1 either way. Get you some gas.
_Burst_ said:
Hey man, nice write up. Always good to see people share information.
However, you made it WAY more complicated than it needs to be.
+1 either way. Get you some gas.
Click to expand...
Click to collapse
Sorry man I tried my best :b. And thanks!
Sent from my SPH-L710 using XDA App
Hi,
I was just wondering if the is anyway to decompile the framework-res.apk
I have been trying for ages, but it always gives me errors.
Thanks in advance
Cheers
Corey
fishingfon said:
Hi,
I was just wondering if the is anyway to decompile the framework-res.apk
I have been trying for ages, but it always gives me errors.
Thanks in advance
Cheers
Corey
Click to expand...
Click to collapse
Grab an ICS framework-res apk. Replace manifest resources.arsc and res from the ICS apk with the one from jb apk. Then dexompile with apktool142.jar and then edit. Then recompile with apktoll144.jar. then open the apk that recompiled and take out manifest resources.arsc and res and place back in jb framework sorry if its to confusing. But just a quick write up
Sent from my SPH-L710 using XDA App
monstaX said:
Ok everyone, this is my first tutorial that I am ever putting out and I will try to be as thorough as possible. This tut is not so much for the people that dont know much about android, it is more for the people that understand most of it already. But as always feel free to read through it and start learning as most of us around here have! So without further a do lets get started!!
FIrst you need 7-zip!!! So go install it!!
So first, the first thing you need to do is go to this link and download the apktools and aapt that are in the zip:http://www.mediafire.com/?acrgcd0w850q0gj
After you extract this zip you will have a folder with all the tools we will need to do this!!!! Now, if you are doing this then you probably already have done it on Ice Cream Sandwich or Gingerbread. So the next thing we need to do is remove your "Environmental Variables". Environmental Variables are basically the commands that you can run in command prompt from any folder on the computer. If you have the android sdk or previously have tried to decompile and compile Apk's chances are you have the setups in the Environmental Variables.
Remove Unneeded Environmental :
1)Hit the start menu on the bottom left hand corner of Windows
2)Right-Click on Computer and select Properties
3)On the top left-hand corner select Advanced System Settings
4)A window comes up and select the button that says "Environmental Variables"
5)In the window that comes up there is two boxes. We are going to edit the bottom one labed "System Variables". Now grab the scroll bar and look for the variable Path. It should be under OS and above PATHEXT. Double-Click "Path" Variable
NOTE: Each path ends in a ";"
6) So now you will need remove every instance that would point to anything android related. For example one is "C:\SDK\platform-tools\;" If it has this then apktools will run the aapt.exe from that platform-tools folder instead of the one that is provided in the zip.
ALTERNATIVE: An alternative would be to delete the aapt that you have in your folder that you have in your Path System Variable.
I know this was not very clear but I again this is for the users a bit more advanced.
-------------------------------
DECOMPILE/COMPILE SystemUI.apk and other Apk's. EXCEPT framework-res.apk
Ok, you can do this however you want but for this tut I am going to extract apktools.zip and place the folder on my desktop. So we're going to open the folder and then place the APK we want to edit along with a JELLYBEAN framework-res.apk into the folder. For example if you want to edit a CM10 "SystemUI.apk" then you will pull the framework-res.apk from /system/framework/ folder nd place it in your desktop JBapktools folder.
Once you have both SystemUI.apk and framework-res.apk inside the JBapktools folder we are ready to start. First rename either one of these files "apktool149.jar" "apktool142.jar" "apktool144.jar" to just apktool.jar. REMEMBER only rename ONE cus we need to keep track of the versions of the apktools.
Next, bring up the folder window and anywhere on the white space hold SHIFT and Right-Click. Then youre going to choose open command window here.
The first command is going to be: java -jar apktool.jar if framework-res.apk
This is going to install the framework.
Now close out the window.
Next go back to the folder and make sure you rename the jar file you renamed earlier back to its original name. For example if you have apktool144.jar and apktool149.jar in the folder then you must rename apktool.jar to apktool142.jar because that is its original and actual version number.
To decompile and recompile SystemUI.apk you need apktool149.jar so once all three are named to their real names then rename apktool149.jar to apktool.jar.
Now,YOU ARE READY!!! Finally.
Again, In the folder SHIFT +Right-Click and select open command window here.
the command to decompile is: java -jar apktool.jar d SystemUI.apk
---------------------------------------------------------------------------------------
Then hit enter you should see something like this:I: Baksmaling...
testI: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Jose\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
---------------------------------------------------------------------------------------
Of course it wont say Jose but it will say your User Accounts name.
Now in the folder you should see another folder in there called SystemUI. Now its DECOMPILED!!!!! WHOOOOO!!!!!!
You can make your edits and edit the pngs and xmls or the smali or whatever your guru-self wants to do.
Now to RECOMPILE!!!!!
To recompile we will still be using apktool149.jar so no need to rename anything back or whatever.
The first thing you should do is open the SystemUI.apk in 7-zip. You can right-click SystemUI.apk and in there, there should be a META-INF folder and a AndroidManifest.xml file. Select both of these be selecting one first(should be highlighted blue) the holding down Cntrl button and selecting the other file. Now that they are both selected click and drag out to apktools folder. We will need these files in a little bit.
Next in the command prompt window, or if you closed it, the reopen by SHIFT+Right-Click and selecting open command window here. The command to decompile is:
java -jar apktool.jar b SystemUI
NOTE:Make sure you use the letter "b" and dont add .apk to the end of it as we are recompiling the FOLDER and not an actual apk file like we do when decompiling.
It should say something like this:
I: Checking whether sources has changed...
I: Smaling
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
Sounds very sexy when reading it I know but we aren't done yet. Remember the META-INF Folder and the AndroidManifest.xml file we pulled out earlier. Ok from the apktools folder select both files again by using Ctrl button. Now type Ctrl C. This will COPY these files to the clipboard. Now that we have the files copied go into SystemUI FOLDER and then go into build folder and then into apk folder. To make it look more neat navigate to /Desktop/apktools/SystemUI/build/apk/ . Now that you are in the apk folder hit Ctrl V. This will PASTE the META-INF and AndroidManifest.xml file into the folder. If a window comes up just choose COPY AND REPLACE.
Last thing to do before we can compile is to go into /SystemUI/dist/ and delete the apk file that is there. The recompiling process is almost complete!!! Go back to command prompt window and just push the ARROW UP on the keyboard. This should bring up the last command you typed in. If its not there then just type it in again:
java -jar apktool.jar b SystemUI
The final apk file should be in SystemUI/dist/ folder!!!!
If you are having any aapt problems then you probably still have a path in Environment Variables that has an aapt.exe in it. Other than that askk and I'm sure myself or someone else can help!!
I will be putting up the how to decompile/recompile framework-res.apk in 2nd post tomorrow or soon because I dont have time right now. The process is different. Have fun themeing and doing whatever it is you do!!!
Added a donate link guys. I'm only 16 so I can't say buy me a beer! So how bout half a gallon of gas? That would be great. Let me know if you donated to I can thank you and put you in my posts!! I have a passion for doing these things so I do not expect any donations from anyone. I do it because I love it and can't get enough of it!! Thanks everyone for being supportive
Donations: Marcismo55
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GL7RKF2EGCH68
Click to expand...
Click to collapse
Can you edit Contacts.apk?
I am trying to modifying Jelly Bean Contacts.apk. The original Contacts.apk is from Helly Bean. Using apktool that has been used for ICS and other Jelly Bean apks, I can decompile and then recomplie it without any error. However, the recompiled Contacts.apk would not work in cell phone, showing a message "Unfortunately, Contacts has stopped!".
To simplify the problem, I simply do decompiling and then recompiling without any modifications. I found that the size of resources.arsc has been changed from 1480 KB to 1525 KB. The new Contacts.apk causes FC!
Note: Files in smali folder can still be modified. After editing, use apktool to recompile and create a new apk. Then use WinRAR or 7zp to drag the newly created classes.dex into the original Contacts.apk. Such a "modified" Contacts.apk works properly. Note here that we did not modify resources.arsc.
This problem is only related to resources.arsc!!!!!!!
SunnyOKOK said:
Can you edit Contacts.apk?
I am trying to modifying Jelly Bean Contacts.apk. The original Contacts.apk is from Helly Bean. Using apktool that has been used for ICS and other Jelly Bean apks, I can decompile and then recomplie it without any error. However, the recompiled Contacts.apk would not work in cell phone, showing a message "Unfortunately, Contacts has stopped!".
To simplify the problem, I simply do decompiling and then recompiling without any modifications. I found that the size of resources.arsc has been changed from 1480 KB to 1525 KB. The new Contacts.apk causes FC!
Note: Files in smali folder can still be modified. After editing, use apktool to recompile and create a new apk. Then use WinRAR or 7zp to drag the newly created classes.dex into the original Contacts.apk. Such a "modified" Contacts.apk works properly. Note here that we did not modify resources.arsc.
This problem is only related to resources.arsc!!!!!!!
Click to expand...
Click to collapse
Not to sure bud. But try the Tut I put up before your post. If not it might need to be compiled from source so nothing will be broken
Sent from my SPH-L710 using XDA App
Thank you. Can I use Eclipse to edit the source code? Any ideas?
SunnyOK said:
Thank you. Can I use Eclipse to edit the source code? Any ideas?
Click to expand...
Click to collapse
Not to sure on that either man. Sorry
Sent from my SPH-L710 using XDA App
I get errors on installing framework!
Any ideas?
i am getting error is there any way to solve.... check attachment image
I'm gonna try this guide. It seems like the last step is something I haven't done in my current journey with recompiling apks.
tapatalked² from cowsquadGnex®
---------- Post added at 08:49 AM ---------- Previous post was at 08:48 AM ----------
sahil001 said:
i am getting error is there any way to solve.... check attachment image
Click to expand...
Click to collapse
Do you have java installed on your system?
tapatalked² from cowsquadGnex®
cowsquad said:
I'm gonna try this guide. It seems like the last step is something I haven't done in my current journey with recompiling apks.
tapatalked² from cowsquadGnex®
---------- Post added at 08:49 AM ---------- Previous post was at 08:48 AM ----------
Do you have java installed on your system?
tapatalked² from cowsquadGnex®
Click to expand...
Click to collapse
i haved installed but which particular version do you recommend me and if possible please share downloading link
sahil001 said:
i haved installed but which particular version do you recommend me and if possible please share downloading link
Click to expand...
Click to collapse
Just Google how to install java jdk in windows. There are plenty tutorials. You need java JDK
Edited:
Make sure your java is in your windows system variables. Step 6 on this guide
tapatalked² from cowsquadGnex®
cowsquad said:
Just Google how to install java jdk in windows. There are plenty tutorials. You need java JDK
Edited:
Make sure your java is in your windows system variables. Step 6 on this guide
tapatalked² from cowsquadGnex®
Click to expand...
Click to collapse
Ok ill try and let u know if it works or not
Ѕєит fяσм ๓ұ gαℓαχу S2®
sahil001 said:
Ok ill try and let u know if it works or not
Ѕєит fяσм ๓ұ gαℓαχу S2®
Click to expand...
Click to collapse
Did it work man?
tapatalked² from cowsquadGnex®
cowsquad said:
Did it work man?
tapatalked² from cowsquadGnex®
Click to expand...
Click to collapse
No
Ѕєит fяσм ๓ұ gαℓαχу S2®

Help editing smali

I am trying to edit the smali code in the systemui.apk for a couple mods in the development section. I am having some difficulties. I am trying to use smali/baksmali.
Anyone have a guide or able to provide some steps.
Thanks
First, if you don't have apktool set up Google "How to set up apktool on Windows(or Linux or Mac etc)"
Once set up use this modified apktool and aapt.exe found here. Make sure you select the appropriate aapt.exe depending on you OS
http://forum.xda-developers.com/showthread.php?t=1755243
Rename that modified apktool jar to just apktool.jar and place the jar and exe in your C:\apktool\ directory
Next, get the framework-res.apk and twframework-res.apk (found in /system/framework/). Place them in your apktool directory
CD your apktool folder and type
apktool if framework-res.apk
apktool if twframework-res.apk
Place your SystemUI.apk in your apktool directory and type
apktool d SystemUI.apk
It'll decompile, complete your mods then recompile
apktool b SystemUI
The apk will be in the SystemUI\dist\
Sent from my SPH-L710 using Tapatalk 2
For me the easiest way is baksmali and smali.
For smali its easy. Just extract the classes.dex and run the decompile command. Simple. You will need java installed.
To recompile just run the recompile command and done. You get a new .dex that you pop I the apk you are editing and delete the old one. Name it the same, push the apk and done.
BTW, the command isent actually "decompile" and "recompile"
You will need a little more java experience to know what the commands are.
fergie716 said:
First, if you don't have apktool set up Google "How to set up apktool on Windows(or Linux or Mac etc)"
Once set up use this modified apktool and aapt.exe found here. Make sure you select the appropriate aapt.exe depending on you OS
http://forum.xda-developers.com/showthread.php?t=1755243
Rename that modified apktool jar to just apktool.jar and place the jar and exe in your C:\apktool\ directory
Next, get the framework-res.apk and twframework-res.apk (found in /system/framework/). Place them in your apktool directory
CD your apktool folder and type
apktool if framework-res.apk
apktool if twframework-res.apk
Place your SystemUI.apk in your apktool directory and type
apktool d SystemUI.apk
It'll decompile, complete your mods then recompile
apktool b SystemUI
The apk will be in the SystemUI\dist\
Sent from my SPH-L710 using Tapatalk 2
Click to expand...
Click to collapse
+1
...and don't forget to use 7-zip and grab the META-INF & androidmanifest
XML files, then put them in build/apk and run recompile command again.
"apktool b SystemUI"
Ok I have tried both methods listed above. Maybe I am not understanding something about each way. What I am doing is using root explorer to copy the SystemUI.apk from system/app and the framework-res.apk from system/framework/
When I use apktook, it decompiles but I dont find any smali code i there. I get a list of 2 folders and 2 files (assets, res, androidmanifest, apktool.yml) there are subfolders but still no luck finding smali code in there.
I tried the smali/baksmali method but i cant seem to find any classes.dex (as I understand it, its located in the SystemUI.apk). Am I looking in the wrong place. I used 7zip to view the SystemUIapk, it shows the same folders I mentioned above minus the apktool.yml and additionally a meta-inf folder and resources.arsc.
Am I looking at the wrong place? It is the stock rom. There is a file systemui.odex should I be doing something with that instead?
The editing that I am trying to do is mentioned here in case it helps. http://forum.xda-developers.com/showthread.php?t=1848611
Thanks
deepsix_69 said:
Ok I have tried both methods listed above. Maybe I am not understanding something about each way. What I am doing is using root explorer to copy the SystemUI.apk from system/app and the framework-res.apk from system/framework/
When I use apktook, it decompiles but I dont find any smali code i there. I get a list of 2 folders and 2 files (assets, res, androidmanifest, apktool.yml) there are subfolders but still no luck finding smali code in there.
I tried the smali/baksmali method but i cant seem to find any classes.dex (as I understand it, its located in the SystemUI.apk). Am I looking in the wrong place. I used 7zip to view the SystemUIapk, it shows the same folders I mentioned above minus the apktool.yml and additionally a meta-inf folder and resources.arsc.
Am I looking at the wrong place? It is the stock rom. There is a file systemui.odex should I be doing something with that instead?
The editing that I am trying to do is mentioned here in case it helps. http://forum.xda-developers.com/showthread.php?t=1848611
Thanks
Click to expand...
Click to collapse
Deodex first then use the apk.
I installed a deodexed version of the stock rom, and then used the apktool directions above. They appear to have worked.
Thanks for the help.

Categories

Resources