TOAD - The Open-Source Android Deodexer - Android General

{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Deodexing Android is hard. Writing a program that can deodex Android for you is even harder.
Whenever Google come up with a new version of the OS, they change how the odexed rom is put together. Which means that a new method to deodex it is required. Working out what that method is and how to automate the process can be really time-consuming. So what happens is many great deodexing tools fall into disuse because the developer isn't able to keep it updated.
That's where TOAD comes in. The idea behind The Open-source Android Deodexer is that it uses short, easy to read, batch files to process the odexed files. These batch files, or 'Methods' as I'm calling them, can be easily added to for new versions of Android.
Or they can be modified if they need to be. I'm not the best coder in the world, and I'm hardly an expert on deodexing. I don't even have a device on which I can test these Methods on right now. So, if somebody looks at the code and thinks it can be improved, those improvements can be made.
In fact, I'm not just encouraging people to make contributions if they can..I'm practically begging for them to. With the help of the community, this tool could theoretically last for years..
How To Deodex Your Files
To use TOAD, you first need to download the latest version from the link above. This is self-extracting EXE file which you can put anywhere. I suggest putting it in C: though just to minimise any issues.
When you run the EXE, you'll get a folder that looks like this:
The "Method_Files" folder contains all the batch files TOAD uses for the actual deodexing. The "Tool_Files" folder contains various files TOAD needs to run properly. And the "Your_Files" folder is empty - this is where your files need to go.
So copy into that folder your "build.prop" and "framework" folder. TOAD won't be able to do anything without those two things.
If you'd like to deodex your "app", "priv-app", "vendor/app", "vendor/priv-app", or "vendor/framework" folders, copy those in as well.
Once you've done that, run the tool.
TOAD will ask you if you want to deodex the framework folder or not. That's up to you but please bear in mind that, for any version of Android past KitKat (4.4.4. - API 19), you won't be able to deodex anything without an odexed framework folder.
The tool will now read the build.prop file and find out which version of Android you're using. This is done by finding out the API used to make the rom. Every version of Android has its own, unique API and there's a page that lists them all here: https://source.android.com/setup/start/build-numbers.
Every Android version that TOAD can handle will have its own individual Method file. This is a batch file in the "Method_Files" folder. If there's one that matches your files, TOAD will ask you if you want it to try to deodex everything.
Click on "YES" and sit back. TOAD will take care of everything else for you.
TOAD will go through the various files and try to deodex them, using the method outlined in the relevant batch file. If a file can't be deodexed, the tool will make a note of the error and move onto the next one.
As long as it's able to deodex at least one file, TOAD will make a ZIP file for you when it's finished.
Flash this in recovery and your rom should now be deodexed.
However, because every rom is different and developers like to do their own things, there is a chance that this ZIP won't work. So make sure you do a full backup before you try it. The ZIP shouldn't brick your phone but I can't guarantee you won't end up in a bootloop.
If it works, let me know. If it doesn't work, let me know as well so I can try and work out a solution. The more we know, the better TOAD will be!
XDA:DevDB Information
TOAD - The Open-Source Android Deodexer, Tool/Utility for all devices (see above for details)
Contributors
Ticklefish
Version Information
Status: Stable
Created 2018-09-29
Last Updated 2019-09-21

HOW TO DEODEX YOUR ROM​
To use TOAD, you first need to download the latest version from the link above. This is self-extracting EXE file which you can put anywhere. I suggest putting it in C: though just to minimise any issues.
When you run the EXE, you'll get a folder that looks like this:
The "Method_Files" folder contains all the batch files TOAD uses for the actual deodexing. The "Tool_Files" folder contains various files TOAD needs to run properly. And the "Your_Files" folder is empty - this is where your files need to go.
So copy into that folder your "build.prop" and "framework" folder. TOAD won't be able to do anything without those two things.
If you'd like to deodex your "app", "priv-app", "vendor/app", "vendor/priv-app", or "vendor/framework" folders, copy those in as well.
Once you've done that, run the tool.
TOAD will ask you if you want to deodex the framework folder or not. That's up to you but please bear in mind that, for any version of Android past KitKat (4.4.4. - API 19), you won't be able to deodex anything without an odexed framework folder.
The tool will now read the build.prop file and find out which version of Android you're using. This is done by finding out the API used to make the rom. Every version of Android has its own, unique API and there's a page that lists them all here: https://source.android.com/setup/start/build-numbers.
Every Android version that TOAD can handle will have its own individual Method file. This is a batch file in the "Method_Files" folder. If there's one that matches your files, TOAD will ask you if you want it to try to deodex everything.
Click on "YES" and sit back. TOAD will take care of everything else for you.
TOAD will go through the various files and try to deodex them, using the method outlined in the relevant batch file. If a file can't be deodexed, the tool will make a note of the error and move onto the next one.
As long as it's able to deodex at least one file, TOAD will make a ZIP file for you when it's finished.
Flash this in recovery and your rom should now be deodexed.
However, because every rom is different and developers like to do their own things, there is a chance that this ZIP won't work. So make sure you do a full backup before you try it. The ZIP shouldn't brick your phone but I can't guarantee you won't end up in a bootloop.
If it works, let me know. If it doesn't work, let me know as well so I can try and work out a solution. The more we know, the better TOAD will be!

HOW TO DEODEX INDIVIDUAL FILES​
To use TOAD, you first need to download the latest version from the link above. This is self-extracting EXE file which you can put anywhere. I suggest putting it in C: though just to minimise any issues.
When you run the EXE, you'll get a folder that looks like this:
The "Method_Files" folder contains all the batch files TOAD uses for the actual deodexing. The "Tool_Files" folder contains various files TOAD needs to run properly. And the "Your_Files" folder is empty - this is where your files need to go.
So copy into that folder your "build.prop" and "framework" folder. TOAD won't be able to do anything without those two things.
If you'd like to deodex files from your "app", "priv-app", "vendor/app", "vendor/priv-app", or "vendor/framework" folders, copy those in as well.
Once you've done that, run the tool and select the bottom option.
TOAD will scan the folders and present you with a list of all the odexed APK and JAR files available. For Android 4.4. (KitKat) and above, this won't include any of the 'boot' JAR files. These have to be deodexed all at the same time and doing so will make it impossible to deodex the rest of the rom.
If you want to deodex these without deodexing the rest of the rom, just put the "framework" folder and "build.prop" file in the "Your_Files" folder only then select the top option on the first screen. This will process the whole "framework" folder only.
The tool will now read the build.prop file and find out which version of Android you're using. This is done by finding out the API used to make the rom. Every version of Android has its own, unique API and there's a page that lists them all here: https://source.android.com/setup/start/build-numbers.
Every Android version that TOAD can handle will have its own individual Method file. This is a batch file in the "Method_Files" folder. If there's one that matches your files, TOAD will ask you if you want it to try to deodex everything.
Click on "YES" and sit back. TOAD will take care of everything else for you.
TOAD will try to deodex the file, using the method outlined in the relevant batch file. If the file can't be deodexed, the tool will make a note of the error and let you know.
If the file can be deodexed, TOAD will make a ZIP file for you when it's finished.
Flash this in recovery and your file should now be deodexed.
However, because every rom is different and developers like to do their own things, there is a chance that this ZIP won't work. So make sure you do a full backup before you try it. The ZIP shouldn't brick your phone but I can't guarantee you won't end up in a bootloop.
If it works, let me know. If it doesn't work, let me know as well so I can try and work out a solution. The more we know, the better TOAD will be!

*** reserved ***

** reserved **

Another Good Job.Nice Tools Coming From You! Good Luck On Improving Your Skills More..

Its great as always
thanks bro

Great job! Good luck with your new project?

This is amazing !, Power to you !

Great job, mate, probably an excellent project like TMA

@Ticklefish - Thanks for this. My first try: everything smooth, no errors, zip created, but nothing was deodexed. All of the files in the zip are the same as the original ones, apks and odex folders.
Xperia X Compact, latest stock 8.0...

levone1 said:
@Ticklefish - Thanks for this. My first try: everything smooth, no errors, zip created, but nothing was deodexed. All of the files in the zip are the same as the original ones, apks and odex folders.
Xperia X Compact, latest stock 8.0...
Click to expand...
Click to collapse
Ah, my first customer! And it's gone wrong already!
This is good, in a strange way. I did some dummy runs with an Oreo system dump while I was making this and everything seemed to work just fine. If your files aren't deodexing, I need to know why.
Could you please share your files, including your log.txt? I'll go through them on my side and see if I can work out a solution.
Sent from my Sony Xperia XA1 using XDA Labs

@Ticklefish
Great job buddy

Ticklefish said:
Ah, my first customer! And it's gone wrong already!
This is good, in a strange way. I did some dummy runs with an Oreo system dump while I was making this and everything seemed to work just fine. If your files aren't deodexing, I need to know why.
Could you please share your files, including your log.txt? I'll go through them on my side and see if I can work out a solution.
Sent from my Sony Xperia XA1 using XDA Labs
Click to expand...
Click to collapse
OK. I won't be at the computer until tomorrow, but will do. I'll try again also...

levone1 said:
OK. I won't be at the computer until tomorrow, but will do. I'll try again also...
Click to expand...
Click to collapse
If you can, that would be very handy. I'm trying it right now with a system dump I found here: https://forum.xda-developers.com/lg-v30/development/stock-dump-v300s-19c-android-8-0-0-t3712009 (thanks to @Reb0rn for uploading it). I've had to make my own build.prop file to get it to work as that's not in the dump but that shouldn't cause any problems.
TOAD is on file 73 of 225 so far but everything seems to be working as it should. The APK's are all having their classes.dex files put in them correctly.
It's not impossible that something goes wrong when the flashable ZIP is constructed, so I'll just have to wait for it all to be finished.
Watch this space...

Ticklefish said:
If you can, that would be very handy. I'm trying it right now with a system dump I found here: https://forum.xda-developers.com/lg-v30/development/stock-dump-v300s-19c-android-8-0-0-t3712009 (thanks to @Reb0rn for uploading it). I've had to make my own build.prop file to get it to work as that's not in the dump but that shouldn't cause any problems.
TOAD is on file 73 of 225 so far but everything seems to be working as it should. The APK's are all having their classes.dex files put in them correctly.
It's not impossible that something goes wrong when the flashable ZIP is constructed, so I'll just have to wait for it all to be finished.
Watch this space...
Click to expand...
Click to collapse
Sir i also tried the tool for services.jar to deodex i coppied all the concerned files as you mentioned but haven't successful coz the zip contain same services.jar file and its relevant vdex file. The same thing as other user reported. I will try to send you the zip in the evening.
Sent from my SM-G930F using Tapatalk

msubhani said:
Sir i also tried the tool for services.jar to deodex i coppied all the concerned files as you mentioned but haven't successful coz the zip contain same services.jar file and its relevant vdex file. The same thing as other user reported. I will try to send you the zip in the evening.
Sent from my SM-G930F using Tapatalk
Click to expand...
Click to collapse
I've finished processing the files I mentioned earlier. It's a 8.0 rom so uses 26.bat in the Method_Files folder. There was a file that couldn't be deodexed but those that could have the classes.dex files in them. The oat folder is still in the framework folder, which it shouldn't be. So I need to make a slight change there which I'll do. Once I've tested it again, I'll update the batch file here.
If you share your files, that would be helpful. Especially your logs.txt.

Ticklefish said:
I've finished processing the files I mentioned earlier. It's a 8.0 rom so uses 26.bat in the Method_Files folder. There was a file that couldn't be deodexed but those that could have the classes.dex files in them. The oat folder is still in the framework folder, which it shouldn't be. So I need to make a slight change there which I'll do. Once I've tested it again, I'll update the batch file here.
If you share your files, that would be helpful. Especially your logs.txt.
Click to expand...
Click to collapse
Yup you are right. I will send you log
Sent from my SM-G930F using Tapatalk

I've just uploaded version 1.0.0.1 to the downloads tab. This is exactly the same as the previous version, except one line in Method_Files\26.bat is slightly different. This ensures the framework/oat folder is deleted if all the boot JAR files in framework are deodexed.
It's a relatively simple thing but it could stop the phone from booting so worth doing.
Because it's such a small change, if you've already downloaded TOAD, you can download the new version...or just download the new BAT file. Which I've uploaded as well.

Ticklefish said:
I've just uploaded version 1.0.0.1 to the downloads tab. This is exactly the same as the previous version, except one line in Method_Files\26.bat is slightly different. This ensures the framework/oat folder is deleted if all the boot JAR files in framework are deodexed.
It's a relatively simple thing but it could stop the phone from booting so worth doing.
Because it's such a small change, if you've already downloaded TOAD, you can download the new version...or just download the new BAT file. Which I've uploaded as well.
Click to expand...
Click to collapse
no success sir. log attached. oat folder still in zip. PM you one link please see.

Related

[How To] Basic Themeing

This is a very basic guide to beginning themeing. It is not meant to be all-inclusive, just some simple steps that can be taken to make your own custom theme fairly easily. This guide should allow anyone to be able to grab images they like from any ROM and incorporate them into their own.
I SUGGEST YOU ALWAYS MAKE A BACKUP OF ANY FILE BEFORE YOU THEME IT AND NANDROID FIRST BEFORE FLASHING
Here is a basic overview of changing images in an apk:
1. Get your base file to theme – framework-res.apk, com.htc.resources.apk, phone.apk ect.
2. “Open” apk archive with 7-zip (don’t unzip!) and drag and drop the new images into the appropriate folder.
3. Flash new file.
Now some details:
1. The first step is to obtain the file you are going to theme. The file you are themeing ( i.e. going to flash to your phone) must come from the ROM you are currently running. Always use files from your current ROM as a base, however the images you want to change can come from other ROMs, or you can edit existing ones or make your own from scratch. You can obtain your theme base through an ADB pull of the files from your phone, or simply downloading the ROM zip file and extracting the files you need.
2. Now that you have the file to theme, don’t touch it! OK, more specifically, you won’t unzip or do anything to this file except “open” it with 7-zip (unless this is a market app, but more on that later). You are going to drag and drop the new icons into this file by “opening” it and navigating to the appropriate folder. The images you want to change are stored in the apk under /res/drawable-hdpi. Once you have your new icons from other sources, open your base file and navigate to this folder and drop them in.
3. Now you can flash this new file. I have provided empty zip files that you can place your themed files into and flash in recovery. Place your framework-res.apk and/or com.htc.resources.apk into the /system/framework folder located in the zip file provided. Now highlight the META-INF and system folders and zip them up. You can now place this file on the root of your SD card and flash. System apps can be placed under /system/app in the zip file.
Some more info on common themeable files:
Framework-res.apk – this is the meat and potatoes of a theme. On an AOSP ROM it will contain almost everything you want to theme aside from individual apps themselves. Sense ROMs have another file com.htc.resources.apk, as well as framework-res.apk. Both of these files are located in a ROM under /system/framework.
System apps: These apps come packaged in a ROM under /system/apps. They can be themed in the same manner as a framework apk. Some of these apps include Gmail, browser, camera, ect. Place them in your flashable zip under the folder /system/app.
Market apps: These apps are downloaded from the market and are can be pulled from your phone from /data/app. These files require a bit more to theme. They don’t share the same signature as the system apps and you must resign them using a program such as apkmanger. Place them in your flashable zip under /data/app.
If there are any errors, or if anyone has suggestions please let me know. I may have over looked some details, ect.
Thanks to everyone on XDA who has shared their knowledge and made this a great community!
Thanks that will be helpful
Sent from my PC36100 using XDA App
so using this guide we can pull parts and what not from other elements of themes we like and create our own framework to push back? Also, based on what you have, shouldn't it be easy to put this up on bid for hire (?) website to create a program to automate that?
xlGmanlx said:
so using this guide we can pull parts and what not from other elements of themes we like and create our own framework to push back? Also, based on what you have, shouldn't it be easy to put this up on bid for hire (?) website to create a program to automate that?
Click to expand...
Click to collapse
Yes the idea of this guide was to help people pick and choose icons they like in other ROMs and add it to their own. I'm not sure what bid for hire is?
its a website where you can load your requirements and folks can bid to do your work
linky
nukedukem said:
Yes the idea of this guide was to help people pick and choose icons they like in other ROMs and add it to their own. I'm not sure what bid for hire is?
Click to expand...
Click to collapse
xlGmanlx said:
its a website where you can load your requirements and folks can bid to do your work
linky
Click to expand...
Click to collapse
Interesting. Didn't know anything like this existed.
Sent from my EVO (CM6.1) using XDA App
Thank you, thank you!!!! I've been looking for something like this for a while.
evolishesh said:
Thank you, thank you!!!! I've been looking for something like this for a while.
Click to expand...
Click to collapse
No prob. Let me know if it works for you.
I couldn't get the auto signing to work, but the manual way of doing it worked.
Hmm, I got a boot loop on first try and doing this. Does that mean something went wrong with the signing, or that what I created for the theme was wrong? I used the empty .zip folder and re-zipped it, so I don't think that is the issue.
JasonK75 said:
Hmm, I got a boot loop on first try and doing this. Does that mean something went wrong with the signing, or that what I created for the theme was wrong? I used the empty .zip folder and re-zipped it, so I don't think that is the issue.
Click to expand...
Click to collapse
The signing should be ok. If you are using Amon_ra recovery it wont let you flash an unsigned zip I believe. Are you on sense or AOSP? Are you editing images or just copying from other ROMs?
What you might want to do is just create a simple test file. Change just one image and then flash that. That should let you know that your process is correct.
I using Amon Ra and using AOSP. I was moving some items out of a sense ROM so I guess that is where I might have went wrong. I think I'll take your advice and move just a single image and see how that works for me. Thanks!
I tried again this time I ended up stuck at the EVO white screen. I'm guessing it doesn't like the sense part I'm trying to throw in there. I'll have to try again with a AOSP theme instead.
Sent from my EVO (CM6.1.1) using XDA App
A couple things to look out for when swapping sense/CM icons - some file names are slightly different between sense and AOSP. Rename any sense icons to their AOSP counterparts and vice versa. Also, double check the image size of the icon is the same in both, i.e. 70x70 pixels, ect. and make sure you are not adding images that don't exist normally in the framework. For example there wont be any 4G icons in CM framework.
Also, make sure you aren't unzipping the new framework-res.apk you want to theme and flash, or trying to resign it. Only sign the flashable zip, not the individual files inside. The only thing you want to do with the framework-res.apk you will package and flash is open (not unzip) with 7-zip and navigate to the res/drawable-hdpi folder so you can drag and drop the new icons into it, overwriting the old.
I hope that helps!
How important is it to re-sign? I have modified the Framework and Resources apks with 7zip by switching images out. I have also modified the Rosie.apk. I put everything back where it was supposed to go, backed out of 7-zip and flashed. I have never had an issue with it, nor have I re-signed it. Just wondering.
spence341 said:
How important is it to re-sign? I have modified the Framework and Resources apks with 7zip by switching images out. I have also modified the Rosie.apk. I put everything back where it was supposed to go, backed out of 7-zip and flashed. I have never had an issue with it, nor have I re-signed it. Just wondering.
Click to expand...
Click to collapse
AFAIK if you are on clockwork recovery, I don't think it checks for signatures. I think Amon_ra requires a signed file to flash. I think it's just added protection against flashing any old junk. If you can flash in amon_ra without a signature and you don't have problems then I wouldn't worry about it. It's the signature of the framework-res.apk ( or com.htc.resources.apk) that's important. That's why you don't unzip it.
I think that
1.7.0.2 = yes
1.8 = no
nukedukem said:
AFAIK if you are on clockwork recovery, I don't think it checks for signatures. I think Amon_ra requires a signed file to flash. I think it's just added protection against flashing any old junk. If you can flash in amon_ra without a signature and you don't have problems then I wouldn't worry about it. It's the signature of the framework-res.apk ( or com.htc.resources.apk) that's important. That's why you don't unzip it.
Click to expand...
Click to collapse
nukedukem said:
A couple things to look out for when swapping sense/CM icons - some file names are slightly different between sense and AOSP. Rename any sense icons to their AOSP counterparts and vice versa. Also, double check the image size of the icon is the same in both, i.e. 70x70 pixels, ect. and make sure you are not adding images that don't exist normally in the framework. For example there wont be any 4G icons in CM framework.
Also, make sure you aren't unzipping the new framework-res.apk you want to theme and flash, or trying to resign it. Only sign the flashable zip, not the individual files inside. The only thing you want to do with the framework-res.apk you will package and flash is open (not unzip) with 7-zip and navigate to the res/drawable-hdpi folder so you can drag and drop the new icons into it, overwriting the old.
I hope that helps!
Click to expand...
Click to collapse
Thanks, any advice does help.
I did make sure the the icons I was swapping out were named the same thing in the CM ROM, but I didn't check the size of it at all.
I didn't unzip the famework-res.apk but instead just went into it with 7-Zip and dragged the icons into that. Then I backed out of 7-Zip so that it would save and close everything properly - know that does work because that is how I add the Fold transistions to the ROM - and then I put the famework-res.apk into the folder and zip it up per your instructions above. Then I manually sign it (still haven't been able to get the auto-signing to work) and then flash.
I'll have to try again moving a CM theme to the CM framework-res.apk and see if it is working. What I was attempting to do was take, from the Batman Theme for sense, the drop down notification shade with the Bat Icon and put it into the CM ROM. I don't know if you have time to try it yourself to see if it works, or if you get the same issues that I had.
Either way, thanks for the help! I know I'll get this theming down at some point!
nukedukem said:
No prob. Let me know if it works for you.
Click to expand...
Click to collapse
Hey buddy.
I’m stuck. I had to download and install Eclipse with the sdk plus java. I don’t know where to go from there. Every time I open the rom that I want to theme and get the framework.apk and edit the PNG’s , how do I go about saving them? Do I just used the same name as the old ones or I have to save them with a new name.
Or pm Me.
xlGmanlx said:
I think that
1.7.0.2 = yes
1.8 = no
Click to expand...
Click to collapse
So the new amon_ra doesn't require a signed file to flash? I'll make a note off that. Thanks.
JasonK75 said:
Thanks, any advice does help.
I did make sure the the icons I was swapping out were named the same thing in the CM ROM, but I didn't check the size of it at all.
I didn't unzip the famework-res.apk but instead just went into it with 7-Zip and dragged the icons into that. Then I backed out of 7-Zip so that it would save and close everything properly - know that does work because that is how I add the Fold transistions to the ROM - and then I put the famework-res.apk into the folder and zip it up per your instructions above. Then I manually sign it (still haven't been able to get the auto-signing to work) and then flash.
I'll have to try again moving a CM theme to the CM framework-res.apk and see if it is working. What I was attempting to do was take, from the Batman Theme for sense, the drop down notification shade with the Bat Icon and put it into the CM ROM. I don't know if you have time to try it yourself to see if it works, or if you get the same issues that I had.
Either way, thanks for the help! I know I'll get this theming down at some point!
Click to expand...
Click to collapse
OK I'll try and do what you are trying to do and see if it works...
evolishesh said:
Hey buddy.
I’m stuck. I had to download and install Eclipse with the sdk plus java. I don’t know where to go from there. Every time I open the rom that I want to theme and get the framework.apk and edit the PNG’s , how do I go about saving them? Do I just used the same name as the old ones or I have to save them with a new name.
Or pm Me.
Click to expand...
Click to collapse
So now you have an unzipped framewor-res.apk with a bunch of images. This framework should be the one that you want to take icons from. If not, start over with the ROM you want to copy images from. You will want to copy the images you want to put into another ROM so that you can dump them into the new framework-res.apk. After you figure out what icons you want to bring to your new framework, get a clean version of framework/com.htc from the ROM you are actually running - i.e. if you are running myn ROM on your phone, download the myn ROM and pull out the framework-res.apk or com.resources.apk that you are going to theme.
Now with this fresh clean framework you will "open" it with 7-zip to navigate to the /res/drawable-hdpi folder so you can now drag and drop the images you want to copy over into it. Then the close the 7zip window and your framework-res.apk is all set to flash. You don't need to rename if the file names are the same, you can just drag and drop and the files will be overwritten in the new framework.

Ways to make a rom

By any chance could someone tell me the best way to make a rom, I have a droid 3 and really want to make a rom but I don't know where to start, thanks in advance
Sent from my DROID3 using XDA App
The best roms start with 3 eggs and little bit of milk to make them fluffy. Whisk briskly!
If you want to jump in, this is a good place to start http://source.android.com/source/index.html
If you just want to dip your toe in the water, then you could start with modding roms, such as adding/removing apks, theming, writing update scripts.
Find a rom and unzip it. Look inside, poke around. Don't be shy-take things apart. Peel back the layers until you find xml and png files. Then, put it all back together and see if you can get it to flash.
Thanks
Sent from my DROID3 using XDA App
thanks so much for the info!
If you download a rom and unzip it, there will be a META-INF folder- look in here- there will be some crypto certs and a com/google/android/ folder which will have the updater-script and update-binary. The script is how the phone knows what to do with the rom. Read through the script and try to decipher what it is actually doing. It will be different for some roms. For example, the cyanogen roms will back up some system apps and replace them after flashing.
You might also come across a boot.img in the root directory of the rom. If you do, there will be some instructions in the updater-script for what to do with it.
Next look in the system/app directory- you'll find a bunch of apk files. These are actually in zip format, so you could unzip them to see what is inside.
A basic test would be to add or remove an apk to the system apps and then get it to flash. Of course you'll need a rooted phone and maybe jarsigner or signapk. Signing a rom will put all those CERT.RSA files back into the META-INF/ folder, which contain crypto hashes of all the files and the names of the files. Some recoveries will allow you to flash an unsigned rom, but you might as well figure out how to sign them. It's in the android link I posted earlier.
Good luck!
Thank you for that also this is very helpful I was kinda confused on where to start with aosp, also that the droid 3 has a locked bootloader
Sent from my DROID3 using XDA App
By any chance would you know how to do some theming? If I understand right it has to do with decompiling the framework-res and systemui apks, and replacing some pngs and xmls with others right?
Sent from my DROID3 using XDA App
I just got started with this so I am by no means an expert. I think you'll want to start by deodexing a rom so that you can make changes to the res, xml, etc. I think most stock apps come as a two part package- an .apk file and an .odex file, both with the same names. Find a stock app and look in the framework and app folders. De-odex-ing takes the odex file, de-compiles it, and then recompiles it into a classes.dex file that is put back into the apk or jar file. This configuration will should allow you to make changes without having to compile the rom from scratch... at least that is my understanding.
Find an apk that doesn't have an odex file and look for the classes.dex file inside. Then take a peak in the res folder in the apk. In the res folder you'll find all sorts of xml and png files.
To get started with decompiling, you'll want baksmali http://code.google.com/p/smali/wiki/DeodexInstructions
Take a look at the issues. JesusFreke wrote some interesting comments in issue 61.
I think there are a few other packages that will do the same thing, and there are certainly a few scripts that will work too.
I ran into some issues with deodexing honeycomb- I outlined the process here http://forum.xda-developers.com/showthread.php?t=1324653.
This is also a good source http://wiki.sdx-developers.com/index.php/How_to_deodex_a_ROM
Good info, thanks.
thank you you have been extremely helpful, im gonna try to get my rom out by sometime this week thank you
I just did some mini-theming. I have an ASUS Transformer- the stock rom has it's own back/menu/home buttons. I wanted a more complete honeycomb look, so I grabbed the stock honeycomb versions from a xoom rom, and added them into my deodexed stock ASUS SystemUI.apk. Oddly enough, if I signed the apk, it wouldn't work, but if I left it unsigned, it works fine.
thats odd, i thought you needed to sign it for it to work

[MOD] Black Check Marks - Much easier to see!

NOTE: I'm probably not going to make any new versions of this. There are simply too many rom versions. Instead, I have provided complete instructions in this post on how to do this yourself. Check the DIY section.
This is a modification of the framework-res.apk that turns the green check marks into black ones. The green ones don't have enough contrast and are very hard to see with the phone held at a normal distance from your eyes, or in bright sunlight. I made a point not to change the aesthetics of the existing icons. I just wanted to make them darker.
I tested the new icons in a variety of apps, and every app I tested that used the old icons now shows the new ones. Some apps like Gmail use square, holo-style check marks and aren't affected by this mod. The check marks in the HTC settings are also not affected. I'm not sure where those icons are stored, or else I would change them, too. Those ones can be changed by picking a different HTC skin. The "Matte" skin, in particular, makes those check marks dark blue.
I have created different versions for different Sense-based roms here on XDA.
CleanROM 4.5
CleanROM 4.2 LE/SE
I have not tested the versions for Sick Sense or Xi40 r119, however, there's not much that could go wrong with them. I extracted the framework-res.apk from those roms, stuffed in the new PNGs, added them to my flashable mod structure, zipped them up, and signed them. Please let me know if you try them out. Make a nandroid backup first, though!
If you are currently running a theme that already modifies framework-res.apk for your rom then this mod will eliminate those changes. This is meant to be applied over the default theme of the specific versions above. If your rom gets updated then this may or may not work with the new version. These best way to check this is to compare the MD5 hash of the unaltered framework-res.apk from one of the above rom versions to the unaltered framework-res.apk from whatever new version has come out. If the checksums are the same then the rom maker hasn't updated framework-res.apk and you can freely overwrite it again with the Black Check Marks Mod.
Screenshots
Here's a set of 25% resolution before and after screenshots. This sort of simulates difficult viewing conditions, and shows how hard it can be to see the green check marks, and how much easier it is to see the black ones.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Here's a large screenshot from Windows showing the icons in detail:
I also edited the smaller "zzzhtc holo" version of the icons which are used by some apps. They aren't shown here, but are used by "reddit is fun" in the screenshot above.
Notes About Flashing
This is a flashable mod. I've only flashed it with TWRP 2.2.0, but it doesn't use Aroma or anything particularly unusual, so I don't see why you couldn't flash it with CWM. Obviously, you are flashing this at your own risk. Do a nandroid backup first!
Undo
If you want the ability to easily undo this mod, then just backup your current /system/framework/framework-res.apk. If you forget, you can always extract it again from the rom itself without having to reflash the whole rom. Or, just restore the nandroid backup you obviously made before applying this!
Source Graphics
I have included a zip file containing the source graphics. This will let you modify the icons further to make your own, or to add these icons to a different version of framework-res.apk. This includes the PSD files I created to make the icons. The PSD files use adjustment layers with masks. It would be quite easy to make versions that were some dark color instead of black by only changing the adjustment layers.. All the icons for a given size are in one file in layers. (Two PSD files total.)
DIY!
There are simply too many roms and rom versions for me to keep up with them all, so from now on, I'm not going to provide any new versions. I might provide versions for the ROMs I use, but starting with 2.23.707.2 the size of framework-res.apk is 18MB. Even when zipped it's still 12MB and too big to attach here on XDA. So, you can make your own mods from now on. It's super easy! There are a lot of steps here because I want to explain it in enough detail so everyone can do it. This whole process takes under two minutes once you know what you're doing.
Things you will need
A Windows PC.
7-Zip
Java (to sign the zip file at the end.)
The attached template file, "BlackCheckMarksMod_Custom.zip", which contains the source PNGs, the updater-script, and testsign.jar.
Step by step instructions
1. Extract framework-res.apk
You need a copy of framework-res.apk from your rom. Most of the time you can simply open the rom zip file in 7-Zip, navigate to /system/framework and drag the file from there to your desktop. Some rom makers use an Aroma installer with multiple versions of framework-res.apk and none of them are in /system/framework until after you install the rom. You can either find the right file somewhere inside the rom first, or wait until you install the rom then extract it from your phone. The second idea is the most foolproof. You just need a file explorer on your phone capable of navigating to your /system/framework folder, and you copy framework-res.apk from there to /sdcard. Then mount the SD card on your PC and copy the file to your desktop.
2. Copy framework-res.apk into the template
Download and unzip the template zip file, "BlackCheckMarksMod_Custom.zip". (When unzipping there is no need to unzip it into a containing folder because the root of the zip file only contains one folder.) This contains everything you need to make a flashable zip. Inside you will find the following structure:
(Directories in bold)
BlackCheckMarks_Custom
____BlackCheckMarksMod
________META-INF (contents not shown)
________system
____________framework
________sign.bat
________testsign.jar
____PNG files
________A bunch of check mark icons
Copy your framework-res.apk into BlackCheckMarks_Custom\BlackCheckMarksMod\system\framework. At this point, this is still the unaltered version from your rom.
3. Replace the stock check marks
There are two ways to open the APK with 7-Zip.
The easiest way to do it -- but hardest to demonstrate because of differences in versions of Windows and their various dialog boxes -- is to simply associate the .apk extension with 7-Zip. This involves using the Open With... command from the right-click menu on the APK file, or just double clicking it then selecting 7-Zip as the app to use for APK files.
The second way to do it is to launch the 7-Zip File Manager and then navigate to the APK. This is the process I will show here.
In your Start menu, locate and open 7-Zip File Manager.
When it opens, navigate to the folder where you placed the APK: BlackCheckMarks_Custom\BlackCheckMarksMod\system\framework
Alternatively, you can just paste in the path that you copy from the Explorer window.
It should now look something like this:
Now, double click on framework-res.apk. You will see a file listing from inside the APK.
Double click on the "res" folder and you should see more folders.
Double click on the "drawable-xhdpi" folder and stop there.
You should now see a bunch of icons. Now we need to copy our custom icons over the ones inside this folder.
In Windows Explorer, go back up to the root of the "BlackCheckMarks_Custom" folder and you should see a "PNG files" folder.
Open the "PNG files" folder.
Make sure you can see both the 7-Zip window and this Windows Explorer window.
In Windows, Press Ctrl-A to select all the files in the "PNG files" folder, or just select them all manually.
Drag and drop the PNG files into the 7-Zip window.
7-Zip will confirm that you want to add these files to the zip. (It doesn't always come to the front, so you may have to click on 7-Zip to see the prompt.)
Click "Yes" to confirm adding the files.
After a split second it should be complete and you can now close the 7-Zip window.
4. Make the mod zip file
You are ready to make the flashable zip file.
In Windows, navigate to the BlackCheckMarks_Custom\BlackCheckMarksMod folder.
Select just the META-INF folder and the system folder. (If you don't know, to select both you click on one then hold down Ctrl and click the other.)
When they are both selected, right click one of them and choose 7-Zip > Add to "BlackCheckMarksMod.zip" (See screenshot)
After a few seconds you should have a BlackCheckMarksMod.zip in the BlackCheckMarksMod folder. (See screenshot)
5. Make sure the batch file can find Java
You may or may not have the Java binary path in your PATH environment variable. If you don't know what this means, it doesn't matter. I will tell you how to find out, and what to do in either case.
How to find out if Java is in your PATH:
Press WindowsKey-R, or chose Start>Run... from the Start Menu.
Type in cmd and press enter. This will open a command line.
In the command window, type in java and press Enter.
You will see one of two things. See the screenshots below.
This output means Java IS in your PATH variable:
This output means Java is NOT in your PATH variable:
If Java is NOT in your path variable then you need to edit the batch file in step 6. Otherwise, proceed to Step 7.
6. Edit the batch file only if Java was not in your PATH in step 5
We need to edit the batch file so that it points directly at your copy of java.exe which is probably in your Program Files folder. (Or perhaps your Program Files (x86) folder if you are on a 64-bit machine.
The likely places to find java.exe are:
C:\Program Files (x86)\Java\jre1.6.0_22\bin\java.exe
C:\Program Files\Java\jre1.6.0_22\bin\java.exe
Perhaps you will have a slightly different version number, or maybe you installed Java in some other location. To modify the batch file:
Go to the BlackCheckMarks_Custom\BlackCheckMarksMod folder
Right click on Sign.bat and choose Edit. This should open the file in Notepad.
In Notepad, replace the first word, java, with the full path to your java.exe. It should look like one of the two paths above.
You must surround the whole path to java in double quotes! See the example of the whole batch file below:
Code:
"C:\Program Files (x86)\Java\jre1.6.0_22\bin\java.exe" -classpath testsign.jar testsign BlackCheckMarksMod.zip BlackCheckMarksMod-signed.zip
pause
Once you've edited the file, save it and close Notepad.
6. Sign the zip file
Now that you've made sure the batch file is OK, you just double-click it. This will run testsign.jar on the zip file you made. The command window that opens will pause to let you see any errors that occur. You will have to close it manually when it finishes.
If it worked, you won't see much:
If all went well you should now see BlackCheckMarksMod-signed.zip in your folder.
You are done! Stick this file on your phone, do a nandroid backup, then flash this zip and see if it works!
MD5s
CleanROM 4.2: 445d07b8112bce8a090d43940951ae9b
CleanROM 4.5: 993c96203d895d97c02e66a69ec39080
Thank you!
Sent from my HTC One X using Tapatalk 2
EDIT: Doesn't work on xi40, based off of Sense. Won't get past the boot screen. Oh well.
theking_13 said:
EDIT: Doesn't work on xi40, based off of Sense. Won't get past the boot screen. Oh well.
Click to expand...
Click to collapse
That's odd. I'll check it out tonight.
EDIT: The Xi40 framework-res.apk is quite a bit different from the one in CleanROM. I wonder if the CleanROM one is even the same as the stock one. I'll have to look inside a stock rom. For now, I'm going to label this mod as designed for CleanROM.
It's really easy to change the check marks yourself if you'd like. Making it a flashable zip is a bit more work, but that's not necessarily needed. You can just use the file manager in your recovery to push the modified file into the system folder.
Copy framework-res.apk from your rom's /system/framework to somewhere on your computer.
Download the zip file of icons from up above.
Open the APK in 7zip. Do not unzip it into a folder. Just open it in 7zip.
Navigate in 7zip to the folder within the APK: \res\drawable-xhdpi
Drag and drop the PNG checkmark icons from my icon pack into the drawable-xhdpi folder in 7zip. It will ask you to confirm adding them to the APK.
Close 7zip.
Now you just put this file on your /sdcard storage and reboot into your bootloader. Use the file manager to copy it into /system/framework. Perhaps you should backup the old file by renaming it to framework-res.apk.bak or something. It's easier to undo this change with that file than it is to restore a nandroid backup. Then you need to fix the permissions on the file. In TWRP's file manager there is a button to set permissions to 755 ("chmod 755") This will grant unneeded execute permissions, but that can be changed later in any root file explorer, like Root Explorer. It can probably even be left as-is with no harm. Ideally it should be 644, though. (rw-r--r--)
Alternatively, unzip my mod and replace the framework-res.apk that's inside of it with the one you just edited, and zip it back up. Then use the Android Signer to sign the new zip file. Note: the signer won't work unless you have the path to the java bin folder in your PATH environment variable. You also need .Net 2.0 installed.
Either method can be a little tricky. Personally, I find making the flashable zip to be easier. Especially since I already wrote the updater-script for it.
Good work on this! I've been thinking a lot about the check marks located in some of the system settings areas, and I'm thinking the respective pngs to change them are located within the framework-htc-res.apk in system/framework but I could be wrong.
Digging into a few of the xml files in original framework-res.apk yielded some hex color codes for certain ui elements as well. Could be that changing the right one of those may have the desired effect for the rest of the check marks. Just a few random leads to investigate.
I haven't had much time otherwise I'd look more into it. But thanks for taking the time to make this a flashable. :good:
theking_13 said:
EDIT: Doesn't work on xi40, based off of Sense. Won't get past the boot screen. Oh well.
Click to expand...
Click to collapse
I created a version for Xi40. If you would like to try it, let me know if it works.
QQNoob said:
I created a version for Xi40. If you would like to try it, let me know if it works.
Click to expand...
Click to collapse
No problem, will be more than happy to test.
Sent from my HTC One X using Tapatalk 2
theking_13 said:
No problem, will be more than happy to test.
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
+1
Sent from my HTC One X using xda premium
Thanks, guys. Let me know if it works.
I just upgraded to CleanROM 4.2 and had to make a new version of this mod for that.
You think the r119 mod will work on r122?
Eh, to hell with it. Backing up now and coming back with results.
Sent from my HTC One X using Tapatalk 2
theking_13 said:
You think the r119 mod will work on r122?
Eh, to hell with it. Backing up now and coming back with results.
Sent from my HTC One X using Tapatalk 2
Click to expand...
Click to collapse
You could always just unzip each mod and compare the MD5s of the two framework-res.apk. If they are the same, then you're good to go. If they're different, then it still might work, but the rom designer probably changed those resources for a reason. You'd lose whatever changes they made.
EDIT: Considering that Xi40 r122 doesn't even have a framework-res.apk, I'd assume that it won't work.
How do I check the MD5 sums?
EDIT: I'll try it in the morning, so tired and took forever to back up lol
Sent from my HTC One X using Tapatalk 2
theking_13 said:
How do I check the MD5 sums?
Click to expand...
Click to collapse
There's no point now. r122 doesn't even have a framework-res.apk, as I mentioned in my last post. If it did, you would simply open each ROM in 7zip or some other zip tool, and drag framework-res.apk out of the rom to somewhere handy. Then use a tool like http://www.winmd5.com/ to generate the MD5 hash for each copy of the file. If the values are the same, then it's the exact same file. If they are different, then something was changed in that APK for the new rom version. But there is no framework-res.apk in r122, so it's moot.
Damn, wish there was. I would love to try your mod, the green check marks are so deceiving sometimes.
Sent from my HTC One X using Tapatalk 2
I hope Jelly Bean fixes these check marks for us. I'd love to try this but I'm stock but rooted.
Sent from my HTC PG09410 using xda premium
theking_13 said:
Damn, wish there was. I would love to try your mod, the green check marks are so deceiving sometimes.
Click to expand...
Click to collapse
It turns out that there are no less than four versions of framework-res.apk in this rom. One for the three carriers of this phone, and one generic one. None of them match the MD5 of the r119 one. I assume this rom gives you a choice during install of what carrier branding you want. Which one are you using? I can make a flashable version of Back Check Marks for them all, anyway.
EDIT: Done and uploaded.
FYI: Tried ATT and Generic for r122. Neither worked for me.
Sent from my HTC One X using Tapatalk 2
phatboypat said:
FYI: Tried ATT and Generic for r122. Neither worked for me.
Click to expand...
Click to collapse
That's a pity. Guess I'll might have to flash it myself and take a look. Can you look in your /system/framework/ directory and tell me if framework-res.apk is in there?
QQNoob said:
That's a pity. Guess I'll might have to flash it myself and take a look. Can you look in your /system/framework/ directory and tell me if framework-res.apk is in there?
Click to expand...
Click to collapse
Yes, it is.
Sent from my HTC One X using Tapatalk 2
phatboypat said:
Yes, it is.
Click to expand...
Click to collapse
When you say it didn't work. Would it not boot, or were the check marks simply still green?
QQNoob said:
When you say it didn't work. Would it not boot, or were the check marks simply still green?
Click to expand...
Click to collapse
Check marks were still green.
Sent from my HTC One X using Tapatalk 2

How to create your own tw rom on your phone using root explorer

In this tutorial I will show you how to create your own T.W. rom using your GS3 and Root Explorer. There are many ways you can create a rom but not everyone has the time to sit at a computer every night. However, your phone is always on you and can find a few minutes here and there to create your own masterpiece.
For the sake of this tutorial, we will name our new rom "SLICK".
Here are a few things you will need...
1. The rom base from Scottsroms. I'm NOT talking about Cleanrom but the unmodified stock rooted rom.
2. Root Explorer.
3. Script Manager
4. Any mod you can flash or come up with on your own.
1. GET STARTED!
Download the base rom to your phones EXT-sdcard and extract it using Root Explorer. After it's extracted the new unziped rom will be located in /storage/sdcard0/SpeedSoftware/Extracted. The extracted rom is now your new base. At this point it would be a great idea to move it to your EXT-sdcard and create a new project folder for it and label the folder "Project SLICK". inside the folder is your rom. lets rename that rom "SLICK".
Lets open your new SLICK rom. You should have some folders...
BOOT IMAGE
DATA
META-INF
SYSTEM
3. THE SYSTEM FOLDER
/SYSTEM/APP
Most of your work will done in the System folder so lets open that up. This is the heart of your rom! There are many folders here but lets start with the app folder. This folder has every app installed in your rom. This is a good time to remove the bloat you don't want in your rom. Go ahead and delete the apk's you don't want or need.
/SYSTEM/BIN
Here you can speed up your system or make it more battery efficient by deleting things like "mpdecision" and things like that. Be careful what you delete though. In general you won't do much in here.
/SYSTEM/BUILD.PROP
Here you can change values or add values. The one value we are concerned with is "ro.build.display.id" This build property's value will be displayed in the end users settings menu under "about phone". So let's give this property the correct value "ro.build.display.id=SLICK ROM v1.0" The rest of the build properties you can do as you wish. Build.prop is simply a text file. You can use the text editor built into Root Explorer.
/SYSTEM/CSC
Open this file and you will see more files. Listed is "feature.xml". Here you can edit values for various items for texting and mms.
/SYSTEM/ETC
Here is where you will find a folder called "init.d". Located in this folder are various text files. The text files are scripts that are told to run when your phone boots. You can add or modify to the existing scripts or create a new text file.
So we went over a few of the basics of modding your new rom and molding it into something you can call your own but does it work??
4. TESTING YOUR NEW BASE.
So we have already modified our rom a considerable amount and should have a good solid base. Before we go any further we should really test things out first. If we did something wrong earlier we will at least have an idea where to look. So lets flash our new rom. Go to you EXT-sdcard and find our project folder. you should still have your SLICK file. Zip this file with Root Explorer. Make sure you have a good battery and a cool environment because it's going to take your GS3 about 30min of hard work to zip this file. When that is finally completed, flash your new rom located in /storage/sdcard0/SpeedSoftware/Archives. Flash it just like you would any other rom.
Test your new rom out on your GS3 and see how things are running. Check your existing modifications you did earlier. If everything looks good, we can continue modding. If not you will need to go back to your base to see where you went wrong. This is also a great time to check your init.d scripts. One way to do this is to download "Script manager" from the market and click on your init scripts to read there log. It will tell you if something went wrong.
If everything is looking good, we can continue modding...
5. THE MODS
So we have that nice clean base but what about all them mods in the roms we download and flash everyday? There are a few different ways we can do this and we will start with the easiest but first, do a nandroid backup of your new base. If one of your mods you perform next goes bad it's simply quicker to recover. Now, If you have flashable zips of some of the mods you like then you can flash them now and make sure they are working the way they should in your rom. Remember, just cause we have the d2vzw does not mean mods from the sprint or T-mobile won't work on our devices. Sometimes it's worth a try. It's all about which firmware they are on and what has changed with the firmware.
So we flashed a few mods but don't have everything we wanted. At this point you are left with only one option and that is to get on that PC of yours and learn to decompile a APK. I may touch on this subject later as it is a bit more involved for someone new to this sort of thing.
6. UNDERSTANDING THE FLASHABLE ZIP
The alternate method of a flashable zip is to extract your flashable using Root Explorer and picking it apart. For example we will use "Lean Kernel" and kill 2 topics with one stone. If you unzip the kernel you will see...
BOOT.IMG
META-INF
SYSTEM
As you can see there are some familiar files to us just like when we extracted our base rom in the beginning. Basically when you flash a mod like this or any flashable for that matter, it installs files into your rom in certain places. In this example we will be installing in BOOT.IMG and SYSTEM. But what? And what is that META-INF file for? Well this META-INF file is what tells your rom what files and what to do with those files. Inside META-INF is a text file called an "updater script".
Here is what it looks like...
Code:
show_progress(0.500000, 0);
mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system");
package_extract_dir("system", "/system");
set_perm(0, 0, 0777, "/system/etc/init.d/00leanKernel");
unmount("/system");
assert(package_extract_file("boot.img", "/cache/boot.img"),
write_raw_image("/cache/boot.img", "/dev/block/mmcblk0p7"),
delete("/cache/boot.img"));
show_progress(0.100000, 0);
Line 2 shows it mounting the system so we can write to it.
Line 3 shows us extracting the entire directory of the system file in the flashable into the system file of our rom.
Line 4 shows we are setting permissions for one of the system files we just installed in the rom. In this case it is an INIT.D file.
Line 5 shows us returning the system to an un-writable state.
Line 6 shows we are now installing the other file called BOOT.IMG.
So we installed BOOT.IMG and the SYSTEM file. The BOOT.IMG file is usually only found in a rom or kernel zip so most of the time you won't see this file in a flashable but I wanted to use this as an example to show a bit about the kernel side of things.
Ok, so lets get back to the original files of this flashable zip. The updater script stated we installed a new system file into the rom so whats in there? If we open the SYSTEM file from our flashable with Root Explorer you will find a file hierarchy...
SYSTEM
-- ETC
--- INIT.D
---- "00LEANKERNEL"
-- LIB
--- MODULES
---- Listed here are a bunch of ".ko" modules and i'm not listing them all.
So whats the point of all this? Well lets say when we originally debloated our rom in the begining we could of included some of our flashable mods like a custom kernel before we zip the rom to test the base. So in this case we can manually install this kernel before we zip the base. We can take the BOOT.IMG from our extracted kernel and replace the BOOT.IMG in our extracted rom. We only need the files from the flashable so we need to copy and paste the "00LEANKERNEL" file from our flashable to our roms /system/etc/init.d folder. We can also take those ".ko" files from the flashable and dump those into the /system/lib/module folder and we are done. You have now manually installed a kernel into your base rom before you zipped it. Now when you zip your rom and flash it, your new base rom will boot with your custom kernel. Since we manually installed the kernel we don't need the META-INF file provides an auto install script for installing through recovery. Technically we could take all of our flashable mods, extract them, look at the file hierarchy and copy and paste the those files to our extracted base rom. That way we can zip our rom and test it with the mods right off the bat. You can really make things quicker this way and is in general the way to go.
I think it's rather important to fully understand a flashable zip. How it's built and how it completes it's task. It's used so often and makes mods so incredibly easy to install but it is also what installs our rom! One of the files we see when we open "slick" is a META-INF and there inside is the updater script to flash the rom. Again we are doing the same thing as we do with the flashable mod but this time we are installing a lot more files with a lot more permissions. It is the exact same thing as shown above just a bit more extensive.
7. PUT THE PIECES TOGETHER
Ok so we have our base rom running on our phone and possibly a few mods installed. We also have our extracted and debloated "slick" rom on the EXT-sdcard inside our project folder. The next part is rather easy if you understand how those flashable mods were installed. If you understand the whole flashable and its files, your better off just extracting them and then copy and paste them where they need to go. After you have all your mod files in place you can now zip your official "Slick" rom using Root Explorer of course. Prepare yourself for another 30 minutes for it to zip. After it's zipped your done. You have now created your first fully modded rom! However...
Lets say you don't get the whole flashable thing and or you had made some other changes to the rom while you were testing. Lets say you flashed some mods and created a few init.d scripts or the build.prop along the way. NO WORRIES! We can put the rom together another way. A lot of the mods you flash will install files in some usual areas of the rom like your Framework folder and such. Lets just say we don't know though. You can actually copy complete folders from the rom you are running right there and now and paste them into your extracted "Slick" base rom using Root Explorer. So you can take "/system/framework" from your currently running rom, copy it, and paste it in "/storage/EXT-sdcard/project folder/slick/system/framework". In short just take your copy of the framework file and put it in your extracted base and paste it. Root Explorer will then ask you if you want to replace this file and click yes. You have just transferred any modded file that might have been in framework to your extracted rom. Any folder you may think was modded, simply copy and paste it to your extracted base rom on your EXT-sdcard. Once you think you have it all the modded files transferred you can zip your new "Slick rom! Flash and enjoy!!
FINISHED
So we have now completed our own rom on the device itself. It's really not too difficult just a bit more time consuming with zipping and that. However, you may need to do a bit more research on how to decompile and recompile an APK. This is one of things that can really be a pain to setup. It's again the basics that will kill you. The whole PITA is not decompiling or making changes to a framework file, it's setting up the environment that sucked for me. You have to get the Java and files in order and all the little crap to get it to work. IMO, if you haven't decompiled an APK yet it's really not difficult at all. Like I said. It's the basics. I encourage you to learn this because it's so freakin easy after it's all setup and you will be able to do so much more with your rom. Once you get this APK thing down don't be afraid to take someone elses work and reverse engineer it. Try to figure out what that developer did to accomplish what he wanted. It's a great way to learn and thats what it's about.
I may add to this somewhere down the road but for now it's all I have. I hope this helped and motivated someone to create a rom and begin there journey to become developer someday! We can all use fresh ideas for development. There is so much more to come for Android so get your hands dirty and share!
Thanks guys!
Ha never really thought of doing this on the fly with my phone. Even though all the right stuff was sitting in my face thanks for opening my eyes razz1
Sent from my SCH-I535 using Tapatalk 4 Beta
dincdoes.me said:
Ha never really thought of doing this on the fly with my phone. Even though all the right stuff was sitting in my face thanks for opening my eyes razz1
Sent from my SCH-I535 using Tapatalk 4 Beta
Click to expand...
Click to collapse
It's another way. May not be the fastest way but it's another option. I also wanted to write this as a general rom creation and learning some basics. It's always the basics that will kill a project and motivation. I would like to see a complete newb to be able to complete a rom with this tutorial. Then I accomplished something. Going to have to finish this tomorrow though. It's taking longer than I thought lol.
Yea I mean I'm a newb at doing it from my phone if that counts =) .. What explorer do you like to use to repack the zips. I'm sure I'll try this method soon to play while bored at work. Rom tool box will help with boot animations, fonts and transition animations too take care thanks for giving our community some new skills I'm sure it will help out down the road.
Sent from my SCH-I535 using Tapatalk 4 Beta
Thank you for this post. This will definitely get me to try and make my own ROM the way I like, also I might just learn some new stuff. Great post thanks again
Sent from my SCH-I535 using xda app-developers app
Nice tutorial.
It's a great way to show what can be done just from your phone.
:good:
Right on man. Been waiting for this. Thank you.
Sent from my SCH-I535 using xda app-developers app
dincdoes.me said:
Yea I mean I'm a newb at doing it from my phone if that counts =) .. What explorer do you like to use to repack the zips. I'm sure I'll try this method soon to play while bored at work. Rom tool box will help with boot animations, fonts and transition animations too take care thanks for giving our community some new skills I'm sure it will help out down the road.
Sent from my SCH-I535 using Tapatalk 4 Beta
Click to expand...
Click to collapse
I use androzip man.
Sent from my SCH-I535 using xda app-developers app
More added
So would I make, say ROM manager a system app? Just copy the apk into the /System/App folder?
Evil Genius Jr. said:
So would I make, say ROM manager a system app? Just copy the apk into the /System/App folder?
Click to expand...
Click to collapse
Yes, but not all apps you download from google play work in /system/app. Some want to be installed into /data/app. However /data/app doesn't exist till after the rom is booted. You would need to add the folder to your extracted rom and modify the updater script.
razz1 said:
Yes, but not all apps you download from google play work in /system/app. Some want to be installed into /data/app. However /data/app doesn't exist till after the rom is booted. You would need to add the folder to your extracted rom and modify the updater script.
Click to expand...
Click to collapse
You are the fu**ing man razz1.
Sent from my SCH-I535 using xda app-developers app
That's about all I have for now. OP completed!:sly:
Hello. Ok so I created a ROM what I call MyTWGE (Tuchwiz Google Edition). Followed the instructions, unzipped the stock Verizon OS went into the -app- folder deleted all the Verizon, Samsung and Google apps (only the ones that are download able from Google Play). Replaced the stock launcher with the 5x6 version that I extracted from another zip, replaced the camera with the Google edition camera (download able from GP), replaced the keyboard with the Note2 keyboard (also unzipped from another zip). Looked around and deleted a few more files I found that were connected to some Samsung apps and zipped it up. Flashed the zip yesterday onto the phone and it's ALIVE working.
Thank you for your patience to write up all these instructions. I previously used TB to debloat my phone and that was it, learned a few thing thanks again
Sent from my SCH-I535 using xda app-developers app
Lehocki said:
Hello. Ok so I created a ROM what I call MyTWGE (Tuchwiz Google Edition). Followed the instructions, unzipped the stock Verizon OS went into the -app- folder deleted all the Verizon, Samsung and Google apps (only the ones that are download able from Google Play). Replaced the stock launcher with the 5x6 version that I extracted from another zip, replaced the camera with the Google edition camera (download able from GP), replaced the keyboard with the Note2 keyboard (also unzipped from another zip). Looked around and deleted a few more files I found that were connected to some Samsung apps and zipped it up. Flashed the zip yesterday onto the phone and it's ALIVE working.
Thank you for your patience to write up all these instructions. I previously used TB to debloat my phone and that was it, learned a few thing thanks again
Sent from my SCH-I535 using xda app-developers app
Click to expand...
Click to collapse
Lol the whole time I was reading this I was waiting for you to say something didn't work out for you but it all did I guess. Nice!!
Yeah running for the past 24h no problems everything works. Thanks
Sent from my SCH-I535 using xda app-developers app
---------- Post added at 02:24 AM ---------- Previous post was at 02:07 AM ----------
Only thing that that's annoying is the wifi in the taskbar. I read in one of the posts that I have to go into systemui and some other files within n delete lines 12 through 21 but that didn't work , am guessing I need to decompile systemui to do that. The person in the post didn't clarify and I'm not ready to do that yet. Reason is I don't know anything about programming or linux or decompiler or anything like that. Deleting files I can do replacing some sure. But I'm happy my first attempt to mix something together worked and I'll keep doing it till I actually figure out what it is that I am doing. Thanks again for the post
Sent from my SCH-I535 using xda app-developers app
Yea. Follow Didacts write ups to get you through it. It's all in framework res apk.

Editing the framework.apk (Solved)

So I was wondering, is there anyway for me to edit the base and accent colours of the framework.apk in the system files so I can make my phone look different from others. I know this can be done using Cyanogenmod's theme engine but I'd prefer to stay on a stock version of android which is more stable and up to date.
I have android 7.1.1 beta with root and an unlocked bootloader, I have tried taking the framework.apk from other device to put on my own but it always causes a stuff up in the data partition (which is kind of expected) meaning that I need to factory reset my phone to get it working again.
Thank you in advance.
Images of some extreme examples are available below
Substratum legacy works on stock roms, but ypu need root from ive read! Ive never tried! Always make backup first
Jackio987 said:
So I was wondering, is there anyway for me to edit the base and accent colours of the framework.apk in the system files so I can make my phone look different from others. I know this can be done using Cyanogenmod's theme engine but I'd prefer to stay on a stock version of android which is more stable and up to date.
I have android 7.1.1 beta with root and an unlocked bootloader, I have tried taking the framework.apk from other device to put on my own but it always causes a stuff up in the data partition (which is kind of expected) meaning that I need to factory reset my phone to get it working again.
Thank you in advance.
Images of some extreme examples are available below
Click to expand...
Click to collapse
Yes it is possible. Decompile your framework-res.apk and change the accent colors in your res/values/colors . XML and your Systemui.apk and your Settings Google.apk for the switchbar background.
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Tulsadiver said:
Yes it is possible. Decompile your framework-res.apk and change the accent colors in your res/values/colors . XML and your Systemui.apk and your Settings Google.apk for the switchbar background.
View attachment 3925511 View attachment 3925512 View attachment 3925513
Click to expand...
Click to collapse
So I have taken a look at the framework-res.apk/res/values/color folder and extracted a few of the .xml files to take a look at them. I opened the files using notepad++ but nothing comes up correctly and I can't find any number values to represent the colors. So I was wondering if there were any special programs that I have to open the .xml files in and if there is can you also point me to the .xml file that edits the colors of the quick settings.
I have also taken a look at Substratum and it says that android 7.1.1 is unstable for use with the application.
Jackio987 said:
So I have taken a look at the framework-res.apk/res/values/color folder and extracted a few of the .xml files to take a look at them. I opened the files using notepad++ but nothing comes up correctly and I can't find any number values to represent the colors. So I was wondering if there were any special programs that I have to open the .xml files in and if there is can you also point me to the .xml file that edits the colors of the quick settings.
I have also taken a look at Substratum and it says that android 7.1.1 is unstable for use with the application.
Click to expand...
Click to collapse
What are you using to decompile the apk? If you haven't already, try using apktool. Install apktool and then in a terminal use:
Code:
apktool decode framework-res.apk
That should spit out proper xml files.
screenshot:
[IMG]http://i.imgur.com/ap6auRM.png[/IMG]
Jackio987 said:
So I have taken a look at the framework-res.apk/res/values/color folder and extracted a few of the .xml files to take a look at them. I opened the files using notepad++ but nothing comes up correctly and I can't find any number values to represent the colors. So I was wondering if there were any special programs that I have to open the .xml files in and if there is can you also point me to the .xml file that edits the colors of the quick settings.
I have also taken a look at Substratum and it says that android 7.1.1 is unstable for use with the application.
Click to expand...
Click to collapse
Yes, you are looking at files that have not been decompiled Apktool is a great tool. Take a look at "tickle my android" if you want the best and easiest one around.
And, for the QS background, you will need to decompile Systemui.apk I believe it is in the layout folder, a XML file called qs_background_primary. XML change the solid color from ?android color primary to the hex code color of your choice
http://forum.xda-developers.com/showthread.php?t=1633333
synesthete said:
What are you using to decompile the apk? If you haven't already, try using apktool. Install apktool and then in a terminal use:
Code:
apktool decode framework-res.apk
That should spit out proper xml files.
screenshot:
[IMG]http://i.imgur.com/ap6auRM.png[/IMG]
Click to expand...
Click to collapse
Thank you for your help. Now I just want to make sure because this is my first time actually playing around with system apk's, Do I need to do anything special to package the apk back together and onto my device other than applying the right permissions?
Also the reason why the xml's weren't working at first was because I just used winrar to extract the files because that worked on iOS's IPA's when I used to work with them and my current guess would be that if I was to put the apk back onto my phone I would need to do more than package it as a .zip and rename it as an .apk.
I would test this on my Moto G first but it's super stuffed up at the moment.
Jackio987 said:
Thank you for your help. Now I just want to make sure because this is my first time actually playing around with system apk's, Do I need to do anything special to package the apk back together and onto my device other than applying the right permissions?
Also the reason why the xml's weren't working at first was because I just used winrar to extract the files because that worked on iOS's IPA's when I used to work with them and my current guess would be that if I was to put the apk back onto my phone I would need to do more than package it as a .zip and rename it as an .apk.
I would test this on my Moto G first but it's super stuffed up at the moment.
Click to expand...
Click to collapse
To recompile,
Code:
apktool b systemui
(or framework-res) You will want to replace the meta-inf and android manifest of your newly recompiled apk with the original ones.
First, before you do any decompiling you must install your framework
Code:
apktool if framework-res.apk
Tulsadiver said:
To recompile, Apktool b systemui (or framework-res) You will want to replace the meta-inf and android manifest of your newly recompiled apk with the original ones.
Click to expand...
Click to collapse
Thank you I'll try it now
Ok it worked. Thank you so much for your help. With this new found knowledge I probably won't do much but it's just something useful to know just in case I have a sudden urge to make my operating system's main colours yellow and brown. Also editing just the colour values in the framework edited the colours in the quick settings and the settings application because they all refer to the framework for that colour.
Things I have learned:
How to decompile apk's properly
How to edit system ui/ framework/ settings colours
How to recompile an apk
How to make sure that the apk works when your device boots up.
Thank you everyone I couldn't of done it with out you.
EDIT: Oops. Just saw that someone else replied (and with better info). You can disregard this post. I'm glad you got your answers.
Jackio987 said:
Thank you for your help. Now I just want to make sure because this is my first time actually playing around with system apk's, Do I need to do anything special to package the apk back together and onto my device other than applying the right permissions?
Also the reason why the xml's weren't working at first was because I just used winrar to extract the files because that worked on iOS's IPA's when I used to work with them and my current guess would be that if I was to put the apk back onto my phone I would need to do more than package it as a .zip and rename it as an .apk.
I would test this on my Moto G first but it's super stuffed up at the moment.
Click to expand...
Click to collapse
The apktool decode command will spit out a folder tree. After making your edits, you should be able to use the apktool build command to recompile to an apk file again. If you don't specify a specific output path, it will probably dump it in a "dist" subfolder within the decompiled apk folder. If you just type "apktool" in the terminal, it should give you more detailed instructions for its options. Once you have an apk, you might need to sign it. You should be able to do that easily on your android device with the app zipsigner: https://play.google.com/store/apps/details?id=kellinwood.zipsigner2
Once you have the signed apk you should be able to replace the original with the same permissions and group policy settings and reboot. I would recommend making a nandroid backup to revert to in case you get stuck in a bootloop. It has been a long time since I have done this, so I might have missed something. Maybe I will give it a try when I have some time later.
how to add pixel icons in system apk
hilla_killa said:
Substratum legacy works on stock roms, but ypu need root from ive read! Ive never tried! Always make backup first
Click to expand...
Click to collapse
Unfortunately Substratum isn't really working too well on the 7.1 DP and it will notifiy you when using the app that modifying anything may very well cause bootloop, which in my case was very true. Tried to install the Pixel Theme that worked flawlessly on 7.0, then bootlooped after the required reboot. However, you can still try it and revert back fairly easily. The dev created 2 .zips in the Substratum folder to fix the bootloop if it does happen (the legacy zip is what fixed mine).
A$h!$h said:
how to add pixel icons in system apk
Click to expand...
Click to collapse
Which icons are you referring to? Navbar or apps?
Jackio987 said:
So I was wondering, is there anyway for me to edit the base and accent colours of the framework.apk in the system files so I can make my phone look different from others. I know this can be done using Cyanogenmod's theme engine but I'd prefer to stay on a stock version of android which is more stable and up to date.
I have android 7.1.1 beta with root and an unlocked bootloader, I have tried taking the framework.apk from other device to put on my own but it always causes a stuff up in the data partition (which is kind of expected) meaning that I need to factory reset my phone to get it working again.
Thank you in advance.
Images of some extreme examples are available below
Click to expand...
Click to collapse
Hey Jackio987,
Yeah! that's true
Refer to my post for better customizations! That's here

Categories

Resources