Holo Hacker Challenge - Converting Ugly to Modern - Android Software/Hacking General [Developers Only]

Introducing the Holo Hacker Challenge!
What is this challenge you may say?
Well it is the chance to give something back to your favorite apps!
Here is how it works... The idea is that while some new apps maybe starting to adapt the Holo UI a lot haven't and some have but still use Gingerbread as the Target version.
Your goal is to find a developer that is willing to give you their code for a week or more to upgrade it to the latest stuff.
For an app to qualify, it has to keep some custom item in the new Holo theme carried over from the old interface. An example would be if they had a Red color scheme, use some red throughout the new Holo interface... Don't just make it stock Holo. Also all Gingerbread icons must be upgraded to ICS/JB Icons.
Also there is another way you can do this... If you want to surprise a dev with a new UI, extract the source from the apk, build the new UI, then confirm with them if they want it and if they do they can merge it with their code.
This is meant to be a fun project that anybody can do (but it might be complicated if you don't know how to code, like myself.)
And their is currently no prizes but the prize is basically being apart of the app if the developer makes your version the new one!

Getting Source from an APK
Automatic Way (Step 1-3 only first time!):
Step 1. Download VTS (www.virtuous-ten-studio.com)
Step 2. Open it and click the blue File button, then Open Settings
Step 3. Follow this instruction from the VTS website for adding a framework-res.apk file (Get from a 4.2.2 rom)
To install your framework, navigate to External tools -> Apktool -> Frameworks
Look at the "Add framework" button, notice the text box with the word "tag" in it.
In this text box you can type in a framework tag in case you have multiple frameworks for multiple devices or different Roms.
For example, I have an HTC Evo 4G LTE and I am running Tranquility Rom. I would type in Evo-Tranquility as a tag. That way I know that is the framework for that device on that Rom.
Next you will click on the "Add framework" button and a popup window will appear.
If the framework files are located in your hard drive, click on the round button next "Local file" and navigate to your framework files (ex. framework-res.apk & com.htc.resources.apk)
If the framework files are located on your device, make sure your device is connected and click on the round button next to "Remote file," then click on the arrow next to framework in order to view all your framework apks. Now click on the framework apk you wish to install.
Make sure you use the same "tag" on both framework files for the same Rom/Device.
Press the "OK" button on the bottom right hand side of the settings menu.
Click to expand...
Click to collapse
Step 4. Click the Blue button again and click New Solution, then import.
Step 5. Select your apk file
Step 6. Finish in the boxes and it will get your source for you!
The manual way (copied from http://www.souldevteam.net/blog/2012/01/27/how-to-retrieve-source-code-from-an-android-apk-file/)
Step 1. Rename the .apk file you wish to retrieve and change the extension to .zip. Then extract the file that it creates.
Step 2. Copy the contents of the dex2jar folder to the extracted folder to make it easier for yourself, and run:
dex2jar classes.dex
Click to expand...
Click to collapse
and copy the resulting “classes.dex.dex2jar.jar” into a new folder.
Step 3. Open up the Java Decompiler and drag “classes.dex.dex2jar.jar” into the window and then go to File > Save and save the source in a .zip file.
Step 4. Extract the saved .zip and copy the contents to a new folder somewhere. This will be where we keep your source code.
Step 5. Now, copy “framework-res.apk” and “yourapk.apk” to the APKTool folder. Then open a command prompt or Terminal window and type:
apktool if framework-res.apk
apktool d <yourapk.apk>
Click to expand...
Click to collapse
Step 6. Now just copy the contents of the resulting folder to the same place you copied the contents of “classes.dex.dex2jar.jar” earlier and voila, you have your source code.

Reserved 2

Reserved 3

Related

[Q] How to edit .xml files within and .apk

Im not trying to re-engineer an app, but I simply want to check out an apk to look at the placement of a certain line of code. When i open up the files within the apk though, i get a bunch of nonsense. How do I edit the files within the apk...i know theres a way, or else we wouldnt have custom roms.
Apktool (or some wrapper like Apk Manager). It's quite outdated, so you won't be able to decode some newer apks though.
Brut.all said:
Apktool (or some wrapper like Apk Manager). It's quite outdated, so you won't be able to decode some newer apks though.
Click to expand...
Click to collapse
gahh, i was hoping there would be an easier way than that xP...I experimented with apktool, but it wasnt recognizing the .apk i was typing in...i just suck with command prompt stuff
....thanks anyway though
schwartzman93 said:
gahh, i was hoping there would be an easier way than that xP...I experimented with apktool, but it wasnt recognizing the .apk i was typing in...i just suck with command prompt stuff
Click to expand...
Click to collapse
Brut.all also mentioned APK Manager in his post which is a script wrapper for his apktool that automates much of the process. It's available at the link I gave for both Windows and Linux. All you should need to do is run the script, place your apk in the appropriate folder created by the script, have the script decompile your apk, then you can find the decoded xml file(s) of interest.
thanks guys
i was having a bit of trouble with apk mananger, i couldnt get it to do anything with this one app, i would tell it an action and it just closed the script
EDIT: I figured it out
Hi guys, i'm using APK Manager and i was able to change the xml without having any trouble by decompressing the apk. I'm wondering what i need to do in order to resign the APK. I have already tried to compress the apk and then sign it, but streight away after I installed the apk i got in boot looping.
The file i'm talking about is the framework-res.apk
Any suggestion?
Thanks in advance.
Edit/
Solved.
Basically i was trying to sign framework-res.apk, instead i have found the solution in this forum that actually worked fine for me:
Code:
1. Place your original "framework-res.apk" into "\place-apk-here-for-modding\" folder
2. Run "script.bat"
3. Set Project (22) and choose the "framework-res.apk" (1)
4. Decompile (9)
5. Place or overwrite new Xmls and PNGs in "\projects\framework-res.apk\res\drawable or drawable-hdpi"
5. Recompile (11)
6. Answer "Yes" when it asks wheter it is system file
7. Answer "Yes" when it asks "would you like to copy over any additional files...?"
8. Script is paused => (don't press a key)
9. Go to the "keep" folder (it's in the same folder than "script.bat")
10. In this "Keep" Folder,
- delete "resources.arsc" file
- delete originals "stat_sys_battery.xml" and "stat_sys_battery_charge.xml" from the "keep\res\drawable" folder
- delete all originals PNGs that were meant to be edited
11. Go back to "script.bat" and press a key to let him finish the job
12. Your new "framework-res.apk" has been created in the "\place-apk-here-for-modding\" folder. It's called "unsignedframework-res.apk".. but he's not working yet.
13. Unzip all the content of the "unsignedframework-res.apk". You should have 5 objects (3 folders, 2 files).
14. Zip these files with Winrar/Winzip (whatever) but you must choose "No compression" method to zip it.
15. Rename this zip into "framework-res.apk".
15. Put it into an update.zip and it should be OK to flash trough the recovery mode.
Thanks anyway!

Modding the sense 3.0 (step by step directions needed)

I love all the beautiful modified skins of Thypancy's intial theme. Is there a post where we could learn to mod these themes. too. I have 4 in mind that I would like to make or have modified, but i would rather learn how to do it myself. Can someone point me in the right direction.
Hi,
I am not a PRO at this... but i would just explain you the procedure:
1) extract/Decompile the .apk file you want to MOD or make changes to. Use m10 editor for this.Select the option "decomplie all"
2) Minimize the m10 editor, and open the folder where you m10 editor is installed. There you would find a folder with the name of the .apk file you just decomplied. Go to folder assests>"base theme name">drawble>shared folder.
3) now select the .png files you want to edit. Install Paint.net, and edit with them, it was easy process for me. Remeber to "flip image vertical" after you are done with editing.
4) now go back to m10 editor, and Save the file.
5) You should have AndroidSDK installed.If not, do it. Then go to the folder where you have installed it. open the "autosign" file. It will open command prompt. There select the option to sign the file manually. Give the path for the file. It will sign it then. Exit from that program.
6) you are done, you can install it now.
Well, this is the basic idea for modding, and it would work if you have a little bit knowledge. I have been taught all this by "laletsehgal21", who has a good thread of his MODS... you can ask him for a detailed help.
Happy Modding
mathrania said:
Hi,
I am not a PRO at this... but i would just explain you the procedure:
1) extract/Decompile the .apk file you want to MOD or make changes to. Use m10 editor for this.Select the option "decomplie all"
2) Minimize the m10 editor, and open the folder where you m10 editor is installed. There you would find a folder with the name of the .apk file you just decomplied. Go to folder assests>"base theme name">drawble>shared folder.
3) now select the .png files you want to edit. Install Paint.net, and edit with them, it was easy process for me. Remeber to "flip image vertical" after you are done with editing.
4) now go back to m10 editor, and Save the file.
5) You should have AndroidSDK installed.If not, do it. Then go to the folder where you have installed it. open the "autosign" file. It will open command prompt. There select the option to sign the file manually. Give the path for the file. It will sign it then. Exit from that program.
6) you are done, you can install it now.
Well, this is the basic idea for modding, and it would work if you have a little bit knowledge. I have been taught all this by "laletsehgal21", who has a good thread of his MODS... you can ask him for a detailed help.
Happy Modding
Click to expand...
Click to collapse
Thanks for the Info!!!
mathrania said:
Hi,
I am not a PRO at this... but i would just explain you the procedure:
1) extract/Decompile the .apk file you want to MOD or make changes to. Use m10 editor for this.Select the option "decomplie all"
2) Minimize the m10 editor, and open the folder where you m10 editor is installed. There you would find a folder with the name of the .apk file you just decomplied. Go to folder assests>"base theme name">drawble>shared folder.
3) now select the .png files you want to edit. Install Paint.net, and edit with them, it was easy process for me. Remeber to "flip image vertical" after you are done with editing.
4) now go back to m10 editor, and Save the file.
5) You should have AndroidSDK installed.If not, do it. Then go to the folder where you have installed it. open the "autosign" file. It will open command prompt. There select the option to sign the file manually. Give the path for the file. It will sign it then. Exit from that program.
6) you are done, you can install it now.
Well, this is the basic idea for modding, and it would work if you have a little bit knowledge. I have been taught all this by "laletsehgal21", who has a good thread of his MODS... you can ask him for a detailed help.
Happy Modding
Click to expand...
Click to collapse
cool man.....
Jst one thing attach the base file that one must use to decompile so that he does not have errors while re-compiling
In de-compiled files changes have to b made in three places.
1. Androidmanifest.xml (name of package).
2. Res\values\strings.xml (name of theme).
3. Assets\shared(change this to theme name)
Now compile and then edit
lalitsehgal21 said:
cool man.....
Jst one thing attach the base file that one must use to decompile so that he does not have errors while re-compiling
In de-compiled files changes have to b made in three places.
1. Androidmanifest.xml (name of package).
2. Res\values\strings.xml (name of theme).
3. Assets\shared(change this to theme name)
Now compile and then edit
Click to expand...
Click to collapse
I tried this but instead of pngs, i'm getting dat files in the "\\\drawable\shared" folder? Is anyone else having this problem?
keedog said:
I tried this but instead of pngs, i'm getting dat files in the "\\\drawable\shared" folder? Is anyone else having this problem?
Click to expand...
Click to collapse
no after using m10 editor u'll play with dat files only best part is inverted
lalitsehgal21 said:
no after using m10 editor u'll play with dat files only best part is inverted
Click to expand...
Click to collapse
What???? I'm way confused by that last sentence.
keedog said:
What???? I'm way confused by that last sentence.
Click to expand...
Click to collapse
he means, that the images you would like to EDIT would be inverted(up side down kind of) already...... the way it looks in your android phone...it wd be inverted
keedog said:
I tried this but instead of pngs, i'm getting dat files in the "\\\drawable\shared" folder? Is anyone else having this problem?
Click to expand...
Click to collapse
In the m10 editor, on the second tab "m10files", select "decode images". And then start the process.....
I have attached an .apk file. Install it on your sensation, apply the theme to your mobile. Observe the stuff. Then try to decompile the same file, and edit the images to your choice. It will help you to recognize what files you should change to get your desired result.
mathrania said:
I have attached an .apk file. Install it on your sensation, apply the theme to your mobile. Observe the stuff. Then try to decompile the same file, and edit the images to your choice. It will help you to recognize what files you should change to get your desired result.
Click to expand...
Click to collapse
Thatz a pretty nice one, and i like how u pointed out all the pages with text. thanks again.
mathrania said:
Hi,
I am not a PRO at this... but i would just explain you the procedure:
1) extract/Decompile the .apk file you want to MOD or make changes to. Use m10 editor for this.Select the option "decomplie all"
2) Minimize the m10 editor, and open the folder where you m10 editor is installed. There you would find a folder with the name of the .apk file you just decomplied. Go to folder assests>"base theme name">drawble>shared folder.
3) now select the .png files you want to edit. Install Paint.net, and edit with them, it was easy process for me. Remeber to "flip image vertical" after you are done with editing.
4) now go back to m10 editor, and Save the file.
5) You should have AndroidSDK installed.If not, do it. Then go to the folder where you have installed it. open the "autosign" file. It will open command prompt. There select the option to sign the file manually. Give the path for the file. It will sign it then. Exit from that program.
6) you are done, you can install it now.
Well, this is the basic idea for modding, and it would work if you have a little bit knowledge. I have been taught all this by "laletsehgal21", who has a good thread of his MODS... you can ask him for a detailed help.
Happy Modding
Click to expand...
Click to collapse
I have all the pngs replaced and the its back in a apk, but now I don't see a autosign file in the sdk folder. am I looking in the wrong place?
This is the Android-sdk (along with java jdk) that i downloaded. I can't find a autosign file anywhere.
i found the autosign bat fle. but now im getting errors.
question: how/where do i change these?
In de-compiled files changes have to b made in three places.
1. Androidmanifest.xml (name of package). how do u change this?
2. Res\values\strings.xml (name of theme). how/where do u change this?
3. Assets\shared(change this to theme name) h0w/where do u change this?
---
also when I replaced the background image, and he skin png, they resorted back to the original and didn't keep my background image nor skin pmg.
Sorry to hijack, but how would I change the dock/nav bar?
Sent from my HTC Sensation Z710e

[MOD] How 2 change KL7/KL8 Lockscreen sentence

Hi people,
I decided to open this thread not to teach something to someone, cause I'm not a developer, but only because many people, both on this forum and on other italians forums that I follow, asked "how 2 change that horrible sentence?"
Requirements : Windows 7 x86 or x64 with java jdk installed and working
Let's start...
1. You need this zip https://docs.google.com/open?id=0BzRB5vMumafCZjVmZTcwMzQtOTM5ZS00YmEzLThkMzgtMTAxMThhMjJiMDM3 then this one https://docs.google.com/open?id=0BzRB5vMumafCMTQyZDJkMmEtMzZlYS00OGNmLTk0NWQtZTk0YzU0OGI1NjFm to finish this one https://docs.google.com/open?id=0BzRB5vMumafCMmY1NjBiYWYtYTkyNy00ZDk1LTljODgtMGIzYTBkZjZiMjk2
2. unzip first packet in a directory of your choice, then install 2nd package (windows systems only)
3. with "root explorer" or similar app, copy the file "framework-res" from your \system\framework directory, to [your drive]:\AutoAPKTool2.0.1\_INPUT_APK
4. run "AutoAPKToolMain.bat"
5. choose task number "6" (decompile APK), then drag the file from point "3" to the window prompt, then press return - when the log window appear, close it
6. with windows explorer, go to [your drive]:\AutoAPKTool2.0.1\_INPUT_APK\framework-res directory, open "res" then : if your language is stock english, go to "values" directory, else choose "values-[your language code]. Example for italian language is "values-it"
7. now choose file "strings.xml" and right click "edit with Notepad ++". With "find function", search for ""lockscreen_unlock_guide_text" string
8. modify text within the "><" symbols (be careful to modify only THAT text), with a phrase of your choice. Note that if you want to add a "'" or a "," you must use "\" symbol, like this example : if you want to write "I'm a xda user" you must write "I\'m a xda user". Be careful to this rule!
9. Save your file
10. now switch back to "AutoAPKToolMain.bat" window prompt, then choose task "9" (recompile-build). Now drag [your drive]:\AutoAPKTool2.0.1\_INPUT_APK\framework-res directory to the window prompt, then press return
11. wait the log window, then close it
12. open the file "FTM.zip" (flashable template maxicet) with winrar or 7zip, then copy the file [your drive]:\AutoAPKTool2.0.1\_OUT_APK_ZIPALIGN\framework-res.apk to the "\system\framework" directory. It's highly suggested to do the same with original "framework-res" file, name it "FTMORIGINAL.zip", copy it to your sd card, and use it in case of "emergency" to recovery your actual situation
13. copy "FTM.zip" to your GNOTE sd and flash it with CWM recovery
14. enjoy your new "tweaked" lockscreen, you can see mine at this link (see last 2 screenshots), meaning of "strusciare ma non esagerare" is "rubbing but don't exaggerate"... https://plus.google.com/u/0/103134609175852890838/posts/RTDtsGBvWJy
Credits : "xavierjohn22" for "autoAPK tool" development
If you like this guide, please hit "Thanks"..
Very nice Massimo. Thanks! Let me know when you are ready to start tearing into the CM9 ICS framework-res/systemui theme
nickshertzer said:
Very nice Massimo. Thanks! Let me know when you are ready to start tearing into the CM9 ICS framework-res/systemui theme
Click to expand...
Click to collapse
Thanks Nick, I'll try soon...
Excellent explanation !!!
What is the file FTM.zip?
There would be a guide as easy to customize even the top bar?
thanks
bibbaste said:
Excellent explanation !!!
What is the file FTM.zip?
Click to expand...
Click to collapse
Sorry, guide corrected with "FTM.zip"
bibbaste said:
Excellent explanation !!!
There would be a guide as easy to customize even the top bar?
thanks
Click to expand...
Click to collapse
You can use this method with every apk, most important thing is that the apk isn't "mismatched", for example a themed one with wrong .png / xml links
is it possible to add a slider as well

[Guide] Custom Wallpapers in Your Launcher (ICS)

I am currently trying to add additional wallpapers to the stock launcher.apk in ICS because of the glitch that some of you may know about when you choose a picture for a background it makes you crop it and then it doesn't scroll... So this is what i have done.
The Easy Way
WARNING: You will have to redo your icons on your launcher after this.
Step 1.. I used ADB to pull the Launcher2.apk from my Inspire 4g.
Step 2. Opened Launcher2.apk with 7zip and navigated to Launcher2.apk\res\drawable-nodpi\ inside you will find all the default wallpapers for ICS.
Step 3. Take all the wallpapers that you want (Limited to the amount of wallpapers originally in the apk) and rename them to be the same names as the original files in the Launcher and replace them in the zip.
The Dimensions for the new wallpapers are as follows:
960x800 at 72dpi for the Full image
213x189 at 150.012dpi for the thumb (dont ask my why the dpi is like that)
Step 4. Mount your phone as USB
Step 5. Upload the new Launcher2.apk to your SD card
Step 6. Use ES File Explorer to Replace your Launcher2.apk and restart your phone
Step 7. Hit Menu go to Manage apps and find Launcher and choose Force Stop and Clear Data
At this point you will need to redo your icons on and will now be able to choose your wallpapers. Restart phone again if needed.
The Extensive Way (Currently cannot get to work with Launcher - Working on making an App Guide)
WARNING: You will have to redo your icons on your launcher after this.
Step 1. Download Apktool and put them in your SDK Platform-tools folder (Be sure to get both the Jar and the Script don't overwrite the aapt file!)
Step 2. Attach your phone to your computer and ADB pull the Launcher2.apk
Code:
adb pull /system/app/Launcher2.apk /"SAVE FILE HERE"
Step 3. Use the Apktool to extract contents of apk. Open a command prompt and type.
Code:
apktool d Launcher2.apk
Step 4. Edit Launcher2\res\values\arrays.xml and add the additional file names of your new backgrounds.
Step 5. Edit the Launcher2\res\values\public.xml and add the additional file file names to the code with extra Hex item numbers in the drawable section. (here is a hex number chart for those who dont know hex hex)
Step 6. Put your new backgrounds in Launcher2\res\drawable-nodpi
Step 7. Use the Apktool to build the apk.
Code:
apktool b Launcher2
Step 8. Mount your phone as USB
Step 9. Upload the new Launcher2.apk to your SD card
Step 10. Use ES File Explorer to Replace your Launcher2.apk and restart your phone
Step 11. Hit Menu go to Manage apps and find Launcher and choose Force Stop and Clear Data
At this point you will need to redo your icons on and will now be able to choose your wallpapers. Restart phone again if needed.
In order to view and or edit XML files you first must decompile the apk with something like apktool (that's what I use).
After you finish editing you then must recompile it before you can use it on your phone.
"I love my Springfield XD40"
cwhitney24 said:
In order to view and or edit XML files you first must decompile the apk with something like apktool (that's what I use).
After you finish editing you then must recompile it before you can use it on your phone.
"I love my Springfield XD40"
Click to expand...
Click to collapse
Thanks, giving it a try now! Will amend to my guide when I complete my new Launcher2.apk

<<<GUIDE>>>theming 9.png's

Okay, is a pretty simple process to be honest, but time consuming, if you find a short-cut as you learn, please share. So, do you have:
adb installed,
winrar or similar application,
apktool installed,
and a photo editing program installed?
if your answer to all of these is yes, than follow these steps.
1.get your framework.apk
2.your com.resources.apk
put them in your apktool/framework folder, should be in your USER name folder, look for it,
Once there paste the .apk's in that folder, rename your framework.apk to 1,
and rename your com.resources.apk to 2
next create a folder in your desktop and name it MODS (this is what i use so this is what we will call it ) place all the .apk's which you are going to theme in there.
for this tutorial we are going to call it the rosie.apk
first thing is de-compiling the .apk, this will reveal the 9.png's to you
ok, open up command prompt and type:
cd desktop\MODS
press enter, next type:
apktool d rosie .apk
after this you should have a new folder in your MODS folder called rosie,
once in that folder go to the location of the 9.png's you are trying to theme,
open them in your photo editing program and you should now see some black lines along the edges of the 9.png images don't touch them (you can but i don't really have the knowledge to do it myself, so don't touch them )
if your photo editor has a selection tool go ahead and select everything but the first pixel where the black lines are located,
now erase whats inside your selection and theme away as long as you don't touch that first pixel, so to be safe use the selection tool!
after you are done theming it, save the image to replace the old one,
okay, remember that time consuming part..... well you must do this to each individual image as far as i know anyhow , so ONCE again if you find/know shortcuts please share and pass the knowledge along......
after you are done with the .apk, type this in command prompt:
apktool b rosie rosie-new.apk
this will compile your newly themed apk, along with your new 9.png's
REMEMBER, I'M USING rosie.apk AS AN EXAMPLE, SO INSTEAD OF rosie IT SHOUD BE THE NAME OF THE .apk YOU ARE BUILDING AT THAT TIME
that's it!
add the .apk to your theme, just remember to remove the -new part from the name, flash and enjoy
This Tutorial was made possible mainly 2 individuals:
tommytomatoe
mpitcher225
this guys where and are TREMENDOUS help to me!
Hope this helps!

Categories

Resources