Related
To create themes, or to edit themes to your liking, you will need a working knowledge of android, adb, how to resign apk's, knowledge of your own O/S.
Before you start be aware that you will may end up wiping your phone once, if not more. So lets go over the things that you will need.
You will need JF's RC30, RC8, or ADP1 V1.3, depending on what version you intend to create for.
Here is the link to these: http://forum.xda-developers.com/showthread.php?t=466174
You will also want to get the dev bootloader installed on your phone and to HIGHLY suggest everyone trying your theme to install it as well.
Link to dev bootloader: http://forum.xda-developers.com/showthread.php?t=455860
You will also need to resign all the apks located in /system/app and framework-res.apk located in /system/framework. When you push all of these to your phone.
JesusFreke was kind enough to build a custom signing tool for me that would allow me to right click on an apk and resign it from there. I am posting it here for others to use as well. Note that this is a courtesy of JF, so thank him for it. I cannot stress how much time this has saved me and will save you.
Here is the link: Http://www.FightForthePits.com/testsign(2).zip
Before using this you need to know how to set this up:
I will assume that you have the sdk downloaded and extracted somewhere(if not, do that now), extract both files to the tools directory of your sdk.
Now you will need to add the tools dir of your sdk to the environment variable CLASSPATH.(This is for XP, Vista coming soon)
To do this, right click on My Computer click properties, then choose the tab that says advanced. Click the button that says environmental variables. Go to system variables find the one that says CLASSPATH, double click it, go to the end of variable value. There should be a semicolon ; at the end. type in the path to the testsign.jar located in the tools directory of your SDK, for example the path to my testsign.jar was c:\sdk\android-sdk-windows-1.0_r1\tools\testsign.jar If CLASSPATH is not in your system variables then create it. Secondly, Find the system variable called PATH and add to the end of it, the full path to your sdk directory. For example, mine was c:\sdk\android-sdk-windows-1.0_r2\tools
Now right click the reg file that you extracted and choose to install it, or merge.
Now, right click an apk, do you see an option that says ResignApk? That's how you will resign your .apks and .zips.
If you find the right click menu not working for some reason you can type the following in cmd to sign your files: java testsign whateverfiletosign
Now through doing this you have done two things, first off you have made the resigning process extremely easy, secondly you will not have to cd to the tools dir of the sdk to use adb or any other tool in the sdk.
You will also need a version of linux installed or running vmware with linux, if you want to create, or edit, an update script, which will install the theme onto the users phone.
You will need to be specific in addressing what version your theme is for, RC8, RC30, or ADP1. Make sure every file gets signed. Make sure you test the update.zip before you release it.
Every .apk contains the images relating to itself. However, every apk has the ability to use the images in framework-res.apk. The images for every apk is located inside of itself. To find these images open up the apk, you can rename it to .zip or open it with an archiver of your choice, winrar, winace, etc. Then after opening the apk open the folder called res and inside of that there are folders that are named Drawable, drawable-land, drawable-port, etc. This is where the images are stored.
Ther are some things you cannot edit unless you rebuild the entire apk from source, which we will not go into here.(another tutorial, another time) Just know that at this time you SHOULD NOT edit, or even open images with the extension .9.png. If you do you will have problems...Trust me. These are special images called ninepatch images and android resizes these images to fit wherever android, or any other apk, needs it to. if you do open them or edit them they will no longer render correctly when resized. I believe that in order to edit these you must do so and then put them into the source and rebuild the entire apk.
Before getting started you must also realize that you cannot simply resign one or two apk's and stick them in your phone and expect them to work. You must resign every apk inside of /system/app and framework-res.apk and put them on your phone at the same time.
To simplify this process for you though, I have provided an empty update.zip which you can place all of your resigned apps into and use to update your phone to your custom theme. You can also download someonelses theme and use there files, since they are resigned already. It may also be easier to see what files do what and go where since they have already been edited and are easy to point out.
Now, your ready to start changing things up.
You will now need to open the apk, which you can do by adding .zip after .apk, effectively changing it to a zip. Note that if you are using windows you will need to unhide known file extension types. you can also use your favorite archiver such as winrar, winzip, etc.
See here to unhide known file extension types for Xp: http://www.mediacollege.com/microsoft/windows/extension-change.html
See here to unhide file extension types for Vista: http://maximumpcguides.com/windows-vista/how-to-change-a-file-extension/
After opening the apk go to res and copy the folders that have drawable in their name. Go to your desktop, or wherever, create a new folder called Images, or whatever. Open the folder, paste the drawable folders in there. Now you can see what the files look like without opening them. Btw, you may also want to add -frame, or -launcher, to the end of the folders you cope over to keep them separated from others.
Finally, you've edited the images put them all in the apk renamed it back to an apk and resigned it. Now it's time to push it to your phone and see the changes you've made.
Important! : Whenever pushing files to the phone NEVER do it while the phone is running. Do this in recovery mode! If you do this while the phone is running normally you will begin to lose space in /system.
So, boot into recovery plug your phone in and open a cmd prompt. From the cmd prompt type adb shell mount /system then type the following: adb push c:\whereveryourfileis\whateveryourpushing.apk /system/app (system/framework if your pushing framework-res.apk)
Now reboot your phone. If it doesn't boot, try doing a wipe, if that doesn't work reinstall an update and try again. There are alot of things people can do wrong, I can't explain them all here. If you get real stuck, you can ask for help here or contact me on Gtalk [email protected].
So now your theme is done and your ready to make an update.zip for others to install your theme.
I have created a template for you to make your own update.zip. Just download, add the system apps to app, and framework to framework. Zip it up, SIGN IT, TEST IT YOURSELF, and then distribute it!
Empty update.zip template: Http://www.FightForthePits.com/Androidstuff/update_empty.zip
If anyone has any questions please try asking for help in this thread before emailing me for help Usually I will respond to questions in this forum.
I hope this Tutorial has been helpful. I will add on to it as needed.
Stericson
Links of interest:
Downloading SDK: http://code.google.com/android/intro/installing.html
Using ADB: http://code.google.com/android/reference/adb.html
Working with ninepatch should be straightforward if you use the draw9patch tool included in the SDK. Documentation on usage here:
http://code.google.com/android/reference/draw9patch.html
JF could also save theme users a wipe by resigning /system/app/* and /system/framework/framework-res.apk in his builds with the test keys. Nice tutorial, btw.
However it doesn't. I have used that to no avail. I believe you need to edit the images, put them in the source then rebuild the apks from the source.
As for JF's update, it does not currently wipe your phone after install. So, for him to do this he would have to have his update do a wipe. So technically, they would still have to do this initial wipe.
Stericson
Stericson said:
However it doesn't. I have used that to no avail. I believe you need to edit the images, put them in the source then rebuild the apks from the source.
Click to expand...
Click to collapse
Good point. I thought you could simply drop a similarly dimensioned PNG in but apparently there is some metadata that only the android tool can create.
As for JF's update, it does not currently wipe your phone after install. So, for him to do this he would have to have his update do a wipe. So technically, they would still have to do this initial wipe.
Click to expand...
Click to collapse
True, but a user who is upgrading to a JF update after having put in customized (and test-key signed) system apps will have to wipe again anyway =) Anyone using custom themes will have to wipe every time a JF update (or any update) comes out. However if JF resigns, custom theme users would not have to wipe and stock theme users only have to wipe once. (Nevermind the fact I think everyone should wipe when updating...)
thx stericson this will help big time how long before I can get resigned rc30 last night when you said all the apk. need to be resigned I was like this is going to be a long night but I see jf hooked you up save some big time with his resigning tool
jashsu said:
Good point. I thought you could simply drop a similarly dimensioned PNG in but apparently there is some metadata that only the android tool can create.
True, but a user who is upgrading to a JF update after having put in customized (and test-key signed) system apps will have to wipe again anyway =) Anyone using custom themes will have to wipe every time a JF update (or any update) comes out. However if JF resigns, custom theme users would not have to wipe and stock theme users only have to wipe once. (Nevermind the fact I think everyone should wipe when updating...)
Click to expand...
Click to collapse
Ah, good point
The resigned apps will be released maybye sometime tonight...I had them done but ran into a script problem on adp1 and I have yet to try the rc30 and rc8 ones yet. so I won't release those until I've tested them. If you want to be a Guinea pig however, just let me know
Stericson
Stericson said:
Ah, good point
The resigned apps will be released maybye sometime tonight...I had them done but ran into a script problem on adp1 and I have yet to try the rc30 and rc8 ones yet. so I won't release those until I've tested them. If you want to be a Guinea pig however, just let me know
Stericson
Click to expand...
Click to collapse
The resigned apps have been released, each update file will resign all of apps in /system/app and framework-res.apk. However, these updates make no changes to them whatsoever...Meaning your phone will look just like a brand new phone without any modifications.
rc30 works thx Stericson made it easy for use
Issues with using the update.zip above
Hi all,
I just wanted to point out that after I applied the update.zip above and rebooted applications kept force closing randomly and constantly even through the initial setup (where you have to click the green android to start).
Prior to this, I had JF's RC30 1.3, and the engineering bootloader V2 no sigcheck.
First I did just a alt+s then a alt-w and alt+s. And still nothing.
I'm new to all this so I'm not even sure where to begin troubleshooting. Should I be using the HardSPL?
Thanks in advance and I appologize if this isn't the right place for this post.
Update:
After reflashing with JF's 1.3 RC30 and the problem persisted I noticed that there was a new release 1.31 and this has fixed the problem. I hope this helps anyone else who runs into the same problem.
I still don't know what went wrong though, can anyone shed some light on this? thanks.
Truly there's no telling, sounds like J'f's update fixed it. Can I ask what version you tested?
I would also like to announce that now, thanks to JF, again, you do not have to wipe your phone completely to apply the resigned app updates. However, you will have to re-enter your google info and your call history and other minor things will be gone, but all of your apps will be retained.
Stericson
Alright, I am a little confused........
So I downloaded testsign.zip and extracted it to the tools folder. Then I went into environmental variables and added CLASSPATH with the value D:\Android\tools\testsign.jar and now I am not sure what to do next. Can someone give me some clarification. And btw I am on XP but I can get on linux at home if I need it, but I am a total noob to all this stuff so be gentle.
I'm using http://www.fightforthepits.com/Androidstuff/update_Rc30.zip and have been encountering issues when the phone boots up. As soon as the initial phone setup comes up I get process force close errors, I extracted launcher.apk, edited the files I wanted, repacked it, signed it and then resigned the update.zip. Any ideas what I'm doing wrong? I'm already running JF's RC30 1.31
Did you repack it in linux? Did you resign Launcher.apk? Also, that update file was never meant to be used as a template for an update since it kind of wipes your phone. You should be using update_empy, to push your own theme.
If you want to do only one file at a time, flash that update(update_rc30) then adb push your file into system/app. There are lots of things that you can mess up, most of them are hard to catch too. At any rate, everyone who has made a theme can tell you it's not just a straight forward process, expect errors. I've had more than I count I know....
Trial and error is your best teacher
Stericson
Stericson said:
Did you repack it in linux? Did you resign Launcher.apk? Also, that update file was never meant to be used as a template for an update since it kind of wipes your phone. You should be using update_empy, to push your own theme.
If you want to do only one file at a time, flash that update(update_rc30) then adb push your file into system/app. There are lots of things that you can mess up, most of them are hard to catch too. At any rate, everyone who has made a theme can tell you it's not just a straight forward process, expect errors. I've had more than I count I know....
Trial and error is your best teacher
Stericson
Click to expand...
Click to collapse
Must .apk's be signed if they're pushed over ADB? I'm not running Linux, I'm repacking/signing in windows.
I also had the issue with force close when installing the resigned update from the first post, apps that shouldn't even run on start up were force closing.
Also the IM application was gone, had to do a wipe and go back to jf 1.31 to correct it
I will take another look at the update I provided...
Stericson
did you ever figure out how to change the text on the status bar from black to white?
to do that you have to rebuiuld the entire apk from source and edit an xml document
Stericson
has anyone tried making the icons bigger? I noticed they are 48x48 if we go bigger will that affect anything? Also has anyone been able to remove the text below the icons on the home screen? Oh and where is the tab located that has been made invisible?
*edit
well I tried making the icons bigger and it doesn't really do anything, they don't show up bigger on the screen. Might have something to do with the text underneath, not sure.
Kyeld said:
Must .apk's be signed if they're pushed over ADB? I'm not running Linux, I'm repacking/signing in windows.
Click to expand...
Click to collapse
yes they must be signed.
Hello!
So, some guys tested my bat-script and they reported that it works! So i create a new thread..
All you need is a java installation (i think jdk, becuase you need the jar binary) and adb! You have to edit the bat file and
set the 2 variables to the directory.
The other variables (sed, smali, baksmali, dexopt-wrapper) are in the package, so you shouldnt change it.
If anything necessary is not found, the script will not start!!
Attention: If you run the bat file, be sure your mobile is NOT IN STANDBY!! You have to be in normal mode (not recovery or sth) and the screen turned on!
So not in lockscreen/standby mode, because otherwhise SuperUser does not popup and ask for root-rights.
When you dont allow root-rights you will see a permission error during the script and this is bad (it will ask you 2-3 times for root rights).
I made this script, so everyone can look at the commands (not hiding inside an exe file which could do anything).
Here is the link: http://rapidshare.com/files/420586328/install_lockscreen.zip
Windows verion needs to be on rapidshare/filehoster, because i have put the sed binary + dll into it (you need it for windows and autopatching the .smali file)
Just download the bat script and edit it with an editor (notepad++ or jedit or just notepad) and set the ADB variable to adb.exe and JAVA_DIR to the JDK-directory (not including \bin - just the main-directory).
Tested successfully on my JM5 and some other user with JM8 and someone with JH2!
4 things todo (not for running the script, just for the future ):
1. create script for linux/mac os usage (shouldnt be so hard, but i have not so much time currently..)
2. auto-create an update.zip with the original android.policy.odex/.jar file for errors (because you cannot change this file if the phone cannot boot - su segmentation fault)
3. if /system/xbin/dd is not here or if it is missing the "conv=notrunc" option, the script should abort
4. create a version for deodexed mobiles/firmwares.
I dont have a clue, how to create an update.zip, so if anyone of you could give me a little help, i would be very happy
And i dont have a deodexed mobile, so someone should tell me the difference, so i can make a different script or the script should autodetect it.
Big thanx to Ateisti for found this solution: http://forum.xda-developers.com/showthread.php?t=779803
If you like my work you can buy me a beer (but you dont have to ): Beer via paypal
menu button fix included or not?
When someone would tell me what this is, then i can insert it in the script
Ateisti talk about it at the end of the first post of his thread
Found it
- By default, the menu button will also unlock the screen. To disable this behavior, you have to modify /res/values-hdpi-v4/bools.xml in /system/framework/framework-res.apk, and change the value of <bool name="config_disableMenuKeyInLockScreen">false</bool> to true. Can also be done by modifying code.
But, i have disabled WidgetLocker and just the AndroidLockscreen now..
I can hit so many times i want the menu button, the lockscreen will never be released..
I have JM5 (2.1). Maybe this is there different?
I will make on the weekend a linux version of the script and then i will also enable this feature..
thE_29 said:
When someone would tell me what this is, then i can insert it in the script
Click to expand...
Click to collapse
There is also a way to do this from the android.policy smali files. I did it on my UGJH2.
go into "android.policy\com\android\internal\policy\impl\LockScreen.smali"...
Do a search for "return v4" and change it to "return v6" (this should be within the method ".method private shouldEnableMenuKey()Z", closer to the ".end method" line.)
To add it to your script, have it change this at the same time as the other file you edit and bingo, no more menu button unlock....
didn't work here.
thank god you made a backup folder
JHJP8, not de-odexed.
READ THIS ENTIRE GUIDE BEFORE ASKING QUESTIONS. READ THIS ENTIRE GUIDE BEFORE ATTEMPTING ANYTHING. READ THIS ENTIRE GUIDE FOR ALL THE HELPFUL INFORMATION CONTAINED IN IT. READ THIS ENTIRE GUIDE EVEN IF YOU KNOW WHAT YOU ARE DOING.
This guide is for anyone that would like to build their own custom keyboard with a customized layout with customized keys (hit one keyboard button and your entire email is filled in for you automatically). This method of hacking should work with other .apk files for similar endeavors. With this guide you should be able to create a custom keyboard based on the gingerbread keyboard. Read this entire guide before asking any questions. I have added information on the many things that have personally caused me errors. If you have problems with the program itself, post here asking for help, ask on the android developers's IRC channel, or read the FAQs posted about the different programs that must be used.
this is a windows 7 based guide; the only differences between W7 and other OS's is minor path changes and downloads (I don't think that android commander is available on Mac OSX)
Things that are required:
very basic commandline experience
APKtool
Signapk
android SDK installed and working (install all available packages if you do not know how to set up an emulator)
android commander -or- knowledge of how to install a custom .apk on your device
notepad -or- your favorite code editor
lots of debugging time, patience
an ability to navigate the above programs
**Common Commands**
1. apktool b <NAME OF DECOMPILED KEYBOARD FOLDER> <PATH LEADING TO YOUR FOLDER CONTAINING SIGNAPK (NAME THE FILE), READY TO COMPILE FOLDER>
2. java -jar signapk.jar testkey.x509.pem testkey.pk8 <NAMEOFFILE FROM ABOVE> <PATH TO YOUR ANDROID SDK TOOLS FOLDER>
3. adb install testsign.apk
#Protip: in Windows 7 (Vista?) hold the shift button as you right click in a folder to open a commandprompt in that directory
Command 1. is to be run from the directory holding your apk folder (do not go inside the decompiled apk folder; if you can see Android Manifest you've gone too far). The command will place the compiled apk folder into your signapk folder assuming you have set up the above commands correctly. As a side note, the compiled apk will be called "test.apk". If you want to decompile (go from an apk to "undone" folder just use "apktool d <NAME OF APK> <OUTPUT FOLDER NAME INCLUDING ITS DESIRED DIRECTORY {EX: c:\android-sdk\keyboard\gingerbredkeyboard}>
Command 2. will sign the apk file called "test.apk" and save the result in your tools folder inside your android sdk folder.
Command 3. will install the apk into your running emulator. This is optional since you can from here install the file onto your device to test things out. However, I highly recommend using the emulator because it is easier to deal with. This command will fail if your emulator has been left alone for a little while. Just do some sort of action in your emulated device to "wake it up" so that the command will find the running emulator. After you install the apk, you may need to delete the old apk before you install a newer version that you have created.
-----
Keyboard stuff
When you decompile the keyboard file, you'll see a bunch of folders, the main folders that you'll want to focus on are inside res\xml and res\values (res\drawable-Xdpi if you want to make a complete theme with new images). From here the xml files governing the keyboard layout should be readable by any xml editor (notepad). Some of my notes will be written below so you can use what I've discovered to generate your own code. As a quick note, the cases of letters count, you must be perfect in your xml code.
The xml files are all named with self explanatory names, just look down the list at the names and you should find what you're looking for.
values and xml folders with letters after it mean that those are aspects that are only going to work for a specific language; if you want to make global commands for any language on the keyboard use the xml files that do not have a suffix. From here you can be creative and hijack a language that you won't normally use and use it as your own personal keyboard with special keys and whatnot (a keyboard just for accented letters? personal word shortcuts?)
code examples:
android:keyLabel="Hi"
this line is what will show up on the keyboard key in question, as above, "Hi" will be printed on this key
androidopupCharacters="★"
this line is what will show up when you hold down the key in question, you will get options for ★ with this code; do not use commas to separate symbols/letters, each individual character will be it's own separate key
android:keyOutputText=";] " self explanitory, anything contained inside the quotes will be printed when the key is pressed, leave a space like I did after smilies so that you dont' have to hit the spacebar after using this key; see exceptions below
droid:keyEdgeFlags="left" is used in the <key> entry of anything on the left "edge" of a <row>
droid:keyEdgeFlags="right" same as above, but used on the rightmost key
EXCEPTIONS:
Certain characters are used in coding, if you don't enter them a special way, you will receive errors in your code when compiling or the key will simply not work. In order to use commands that "print" text with exceptions in them, prefix the exception with a "\". For example: android:keyOutputText="\@" will print the character "@". A list of known exceptions are listed below, there may be others. Special, special exceptions also exist where even prefixing it causes coding problems, in these cases, use its "name" in place of its actual character. For example: the ampersand character '&", you must use the code associated with it; see the "popup_punctuation.xml" file for some of these exceptions. There may be more exceptions that I have not come across. If you're having problems with your keyboard and cannot figure out why your key is not showing up correctly, try to treat it as an exception.
Characters that are exceptions:
#
@
?
"
IMPORTANT EXCEPTION:
I couldn't get the popup_comma.xml file to work with the above exceptions rule or with the keyoutputtext code
Putting it all together:
<Key android:keyLabel="\@G!" android:keyOutputText="cheval.de.jeanvaljean\@gmail.com" android:keyEdgeFlags="left"/>
The above will draw a key that's labeled "@G!" that yields "[email protected]" that is also the leftmost tag in a given row. Personally, I have added similar code to the above so that I have keys for the handles "@gmail.com" and "@yahoo.com" (along with my personal email so I never have to type it out all the way ever again) to the period key on the keyboard (in xml "popup_punctuation.xml"). I have also tweaked the smilies on the enter key to my own personal smilies. Assuming you've read the above and have some minimal xml experience you can figure out the rest for yourself. There are many other things that I have left out code-wise that I found to be extremely easy to figure out just by browsing the source code. As a personal tip to you, I recommend highly that you use the emulator as it is far easier than pushing files to your phone, deleting them, blah blah blah.
---
Have fun and good luck =]
Hello guys,
Just thought i'd share the source code with you and a tutorial on how to modify it to work with a rom with a modified ondemand governor by default. Or if you wanna change the values altogether you will be able to do so.
Also if any other devs wanna modify it to look better or anything feel free, we are a community
Right first off your gonna need
Eclipse properly set up to work with android and OpenSense SDK (i will not go through how to do this, google is your friend for that)
The Source Code provided in this post
An APK signer
Patience because if your not experienced this could take a while
Tutorial:
First off extract the .zip somewhere on your pc
Then your gonna want to open Eclipse, go to File/New/Project.
From there expand the android folder and select "Android Project From Existing Code"
Click Here For ScreenShot
On the next screen where it says "Root Directory", point it to where you extracted the source folder to.
If you have done it correctly your screen should look like this:
Click Here For ScreenShot
Click finish and the project will be open.
From there, at the top left you will see a section saying "Package Explorer".
Underneath you will see "com.ondemand.gaming.boost.OnDemandGamingBoostActivity".
Click the arrow to open it up.
Once opened you will see a lot more options, the one we need to worry about is"src", so go ahead and open that one up.
You will see another 2 options, go ahead and open up "com.ondemand.gaming.boost".
From there you will see "OnDemandGamingBoostActivity.java", double click that and it will open in the main window.
Click Here For ScreenShot
Right the bit we are after is about halfway down, so just scroll down till you find this section of code.
Click Here For ScreenShot
From here you will see that this is where all the commands get executed.
"ShellInterface.runCommand" basically tells the app to run a command.
The top half is the values to revert back to when you disable gaming boost, this is shown by the "preference.setSummary("Gaming Boost Disabled");" at the end of the commands. (Most likely this is just the section you will be editing, but the same would apply if you was changing the optimized values)
From here its pretty much self explanatory, you edit the values to whatever you want them to revert back to after you disable gaming boost.
Make sure you edit all the values, some commands appear twice so make your you edit every instance of the value you see, a good way to check is to search for the old value when you think you have finished to see if you have missed it anywhere.
Please Note: They have to match whatever your ROM Dev uses in his ramdisk, contact him if you dont know what they are or check/modify his ramdisk yourself.
The last thing you need to edit is the file the app checks for before allowing the changes.
Above all the commands you will see "String ODGBState = SubActivities.readFile(ODGB_File + "/up_threshold", true);"
This basically means the app will check the value of "up_threshold" and if the value in the app doesn't match the value in the ramdisk the app won't work.
This is where things may get a little confusing.
The value for the checkfile for when the app is disabled is actually found in the second block of commands, where the optimized values are.
Just above the commands you will see "int iDisabled = 85;"
The "85" is the value of the up_threshold you have just modified in the previous steps, so change that to match what you tweaked it to.
Exporting the APK.
Once you have done all the editing you want to export the apk for use.
On the left hand side pane, the 3rd from the bottom in list you will see "AndroidMnifest.xml". Double Click it.
In the main windows about three quarters of the way down you will see the "exporting" tab. Click on "export an unsigned apk"
Choose a name and where you want to save the app and click save.
A pop up will come up when its saved.
From there all you need to do is sign the APK and push it to system/app, or include it in your ROM ZIP.
This may not be a 100% perfect tutorial but its worked for me, i'm still learning.
If anyone see's any errors please point them out.
Thank you.
SOURCE CODE
Welcome back everyone,
We are in knee deep waters now, probably committed and ready to get going on the last of set of tools that need to do some serious modding.
If you are not up to speed, please go to Part I, Part II and Part III.
Get up to speed on those tutorials first before we continue. Remember, this is not Call of Duty, this isn't even Star Wars, this War of the MegaZord 5. We are in the serious stretch of the basics of modding the final frontier son!
Our target today is to utilize the Smali and BakSmali tools.
As you recall from the previous tutorials, the Smali and Baksmali have been put in our very specific folder
Code:
C:\other\Smali\
So, what does the Smali/Baksmali code need to do for it to work? We will need a JAR file. The JAR is a java archive file. You can also open those files with 7-zip, in each of the JAR files we will look at has a classes.dex file which we will need
Each Jar file in our
Code:
MD4_Version_1\system\framework\
Will have a classes.dex file inside, since the name is the same for all files, this is very tricky to manage unless you are organized so remember that each classes.dex file you take out, you remember where the new one needs to go.
So, lets open the following file in 7-zip,
Code:
android.policy.jar
Take the classes.dex file and place it in the folder where the Smali.jar file is and Baksmali.jar files are.
Now open a command prompt to that location and execute the following code,
Code:
C:\other\Smali>java -jar baksmali.jar -o output classes.dex
You will not receive feedback from this command. Do not stress if it looks like nothing happened, of course coincidentally, a new folder has been created in our folder called output(You can name it whatever you want just trying to keep it simple.
This folder will have a de-compiled set of .smali code that will allow us to modify very critical settings and make amazing mods.
The good news is we have the technology now we need the....wait wrong show,
We have the ability to take any classes.dex file and modify it and we can recompile it and execute a mod perfectly.
To recompile, we will need to execute the following code
Code:
C:\other\Smali>java -jar smali.jar -o newclasses.dex output
This will create a new file called newclasses.dex
We will need to place it inside the android.policy.jar
Of course, take the file and place it on your desktop, rename it to classes.dex and place it in the android.policy.jar and your mods are ready to go.
So that's all you need to do because the signatures cannot be messed with so this is the best way to do it.
Now, to the modding part, we have the tools to do all the mods you can set your furry little thoughts on.
learned how to implement the following with all of the code belonging to their expert makers.
Removed increasing ringtone
Call Record built into phone
Quick Unlock implemented(only reason I got into this ROM modifying because it annoyed me to press OK button to unlock, only thing iPhone got right...lol android wins)
Sounds modified
Default Sounds Set
Free Tethering working
1 percent battery
Removed apps from system/app to reduce clutter
Modified default wallpapers from Samsung
Phone contacts Theming
4 in 1 reboot enabled
No Sound on Camera
TouchWiz default layout
Seems basic enough but it is all I need, sure there are much fancier things to add, but these tutorials are about adding only what you want.
If all of these sound like you need them or want them, I can go into how to implement these. Not sure what the level of interest is at this point from people as these are not terribly tricky but sometimes, the code made from the original developer does not match exactly and then you have to find it and implement it.
Of course, this comes at a great cost to time, as I was working one each mod, I made 17 versions had to back track to version 12 as a mod I implemented had a bug I did not know exists until I did a fresh install.
This happens a lot by the way. The other day, I had Bluetooth on and connected to headset, a call came through, answered it, switched from headset to speaker and phone just turned off, I am sure there is another bug from another thing in another place that I overlooked.
My point is, making any mod will require a LOT of time. I installed each ROM after that glitch to make sure everything worked. I used Titanium Backup to assist me in my endeavor but it was a hassle to change all my settings to what I needed(there is a way to set your settings any way you want as well while working in the ROM)
The thing is, each developer here takes a great deal of time and effort to do this and sure they have the expertise but it was because they got down in the nitty gritty and found a way to make it happen. They also usually do it out of their good will and hearts(well most of the ones I know). It has to be the most inspiring thing ever to find a group of people that are not doing this to make money but they take time out of their lives and help us Nooblets out. I mean it is our super phone we want to modify right? And I want to say thanks to them. I want to say thanks to everyone who I mooched off their code for to get what I need, because without you, I would be on Google doing something unpronductive. Luckily, things started to work and mods made more sense and it is not so intimidating as it once was...of course several hundred flashes later, it better make more sense.
Thanks for everyone who reads this and gains something. This concludes the part of the tutorial I set out to accomplish and that was to get all the tools needed to make anyone a ROM builder(at least modifier).
Team Venum thanks for your great support as always you guys rock, I dabbled with their ROMs when I had an issue with exchange email
The MOAR team who helped me understand ROM structure for their crazy ROM.
loserskater for his quick unlock code which was by far amazing, I still look through the code and think he made it up on the spot.
lmike6453 who got me closer to figuring out loserskater's epic code.
So many more to thank but cant think of where all my research is, guess I should have listened to my own advice and stayed organized.
zalooa said:
Welcome back everyone,
We are in knee deep waters now, probably committed and ready to get going on the last of set of tools that need to do some serious modding.
If you are not up to speed, please go to Part I, Part II and Part III.
Get up to speed on those tutorials first before we continue. Remember, this is not Call of Duty, this isn't even Star Wars, this War of the MegaZord 5. We are in the serious stretch of the basics of modding the final frontier son!
Our target today is to utilize the Smali and BakSmali tools.
As you recall from the previous tutorials, the Smali and Baksmali have been put in our very specific folder
Code:
C:\other\Smali\
So, what does the Smali/Baksmali code need to do for it to work? We will need a JAR file. The JAR is a java archive file. You can also open those files with 7-zip, in each of the JAR files we will look at has a classes.dex file which we will need
Each Jar file in our
Code:
MD4_Version_1\system\framework\
Will have a classes.dex file inside, since the name is the same for all files, this is very tricky to manage unless you are organized so remember that each classes.dex file you take out, you remember where the new one needs to go.
So, lets open the following file in 7-zip,
Code:
android.policy.jar
Take the classes.dex file and place it in the folder where the Smali.jar file is and Baksmali.jar files are.
Now open a command prompt to that location and execute the following code,
Code:
C:\other\Smali>java -jar baksmali.jar -o output classes.dex
You will not receive feedback from this command. Do not stress if it looks like nothing happened, of course coincidentally, a new folder has been created in our folder called output(You can name it whatever you want just trying to keep it simple.
This folder will have a de-compiled set of .smali code that will allow us to modify very critical settings and make amazing mods.
The good news is we have the technology now we need the....wait wrong show,
We have the ability to take any classes.dex file and modify it and we can recompile it and execute a mod perfectly.
To recompile, we will need to execute the following code
Code:
C:\other\Smali>java -jar smali.jar -o newclasses.dex output
This will create a new file called newclasses.dex
We will need to place it inside the android.policy.jar
Of course, take the file and place it on your desktop, rename it to classes.dex and place it in the android.policy.jar and your mods are ready to go.
So that's all you need to do because the signatures cannot be messed with so this is the best way to do it.
Now, to the modding part, we have the tools to do all the mods you can set your furry little thoughts on.
learned how to implement the following with all of the code belonging to their expert makers.
Removed increasing ringtone
Call Record built into phone
Quick Unlock implemented(only reason I got into this ROM modifying because it annoyed me to press OK button to unlock, only thing iPhone got right...lol android wins)
Sounds modified
Default Sounds Set
Free Tethering working
1 percent battery
Removed apps from system/app to reduce clutter
Modified default wallpapers from Samsung
Phone contacts Theming
4 in 1 reboot enabled
No Sound on Camera
TouchWiz default layout
Seems basic enough but it is all I need, sure there are much fancier things to add, but these tutorials are about adding only what you want.
If all of these sound like you need them or want them, I can go into how to implement these. Not sure what the level of interest is at this point from people as these are not terribly tricky but sometimes, the code made from the original developer does not match exactly and then you have to find it and implement it.
Of course, this comes at a great cost to time, as I was working one each mod, I made 17 versions had to back track to version 12 as a mod I implemented had a bug I did not know exists until I did a fresh install.
This happens a lot by the way. The other day, I had Bluetooth on and connected to headset, a call came through, answered it, switched from headset to speaker and phone just turned off, I am sure there is another bug from another thing in another place that I overlooked.
My point is, making any mod will require a LOT of time. I installed each ROM after that glitch to make sure everything worked. I used Titanium Backup to assist me in my endeavor but it was a hassle to change all my settings to what I needed(there is a way to set your settings any way you want as well while working in the ROM)
The thing is, each developer here takes a great deal of time and effort to do this and sure they have the expertise but it was because they got down in the nitty gritty and found a way to make it happen. They also usually do it out of their good will and hearts(well most of the ones I know). It has to be the most inspiring thing ever to find a group of people that are not doing this to make money but they take time out of their lives and help us Nooblets out. I mean it is our super phone we want to modify right? And I want to say thanks to them. I want to say thanks to everyone who I mooched off their code for to get what I need, because without you, I would be on Google doing something unpronductive. Luckily, things started to work and mods made more sense and it is not so intimidating as it once was...of course several hundred flashes later, it better make more sense.
Thanks for everyone who reads this and gains something. This concludes the part of the tutorial I set out to accomplish and that was to get all the tools needed to make anyone a ROM builder(at least modifier).
Team Venum thanks for your great support as always you guys rock, I dabbled with their ROMs when I had an issue with exchange email
The MOAR team who helped me understand ROM structure for their crazy ROM.
loserskater for his quick unlock code which was by far amazing, I still look through the code and think he made it up on the spot.
lmike6453 who got me closer to figuring out loserskater's epic code.
So many more to thank but cant think of where all my research is, guess I should have listened to my own advice and stayed organized.
Click to expand...
Click to collapse
It was nicely done, thanks. :good: