FORUMS

[TOOL] Graphic Porter 1.0.0B2 - Streamlined drawable theming.

167 posts
Thanks Meter: 261
 
By br.ruan, Senior Member on 26th September 2014, 06:05 PM
Post Reply Email Thread
DISCONTINUED
This project is no longer developed due to current implementation restrictions to ease of use.
It is incompatible with android 5.0 and later.




The age of making and sharing mods for our favorite Android roms seems mostly over these days. This is probably due to themes and increasingly customizable third-party roms. However themes are not customizable (if you are as picky as I am, it's difficult to find one you are completely satisfied with) and customization options remain limited on popular roms. So after using Graphic Porter myself for some time now, I decided to share it with you

This is a tool that aims to bring the the drawables (.xml .png .9.png .gif .jpg files) you want to modify directly to you, handling apks and everything else between you and those drawables as transparently as possible. With advanced importing and editing capabilities, this tool can save you a lot of time and headache.

See Streamline Android Theming with Graphic Porter


« Features
  • Powerful profile system
    Graphic Porter assesses your device and builds a profile for it, so it 'knows' exactly what images to look for when importing, as well as how to handle them for you very own device.

  • Flexible import system
    Source drawables from other roms, mods or even your best friend's device! Graphic Porter will automatically select the most suitable drawables for your device and even resize them if necessary. It's recommended not to extract from devices that have a lower dpi than your own device to maintain the best quality possible. If possible, it will avoid resizing.

  • Advanced image editing tools
    Not only can you edit images in your favourite image editor, it also contains useful and powerful tools to make most common color changes quickly.

  • Supports all Android's recommended types of drawables [NEW]
    Edit .xml, .png, jpg, .gif and .9.png drawables.

  • Ability to change a drawable's type [NEW]
    Drag and drop a different type of drawable to replace the original, like replacing holo_background_dark.xml with another image of your choosing!

  • Safe
    Graphic Porter strives to eliminate common mistakes made while theming, as well as handling your device with as much care as possible and not taking any risks. Please do understand that, at the end of the day, you alone are responsible for your device.

  • Code is open, like Android
    I'm not gonna hide what this script does on your computer or phone. You are free to look around and modify even if you know what you are doing - suggestions are always welcome.
    If you want to use or replicate the functionality in Graphic Porter, I only ask that you leave me credit and also link to this thread.
« Screenshots: Graphic Porter





« Screenshots: Preview of my phone with some different colors
« Features that I'm thinking of adding
  • Add image editor to color grays and whites.
  • Create a customizable color list to choose from when selecting colors for one of the editors.
  • Enable Graphic Porter to remove specific drawables from the build.
  • Enable Graphic Porter to extract specific drawables.
  • Ideas are welcome
« Bugs found
  • None at the moment; please report them if discovered.
« System requirements you should try to comply with
  • Computer:
    • Windows 7 or later.
    • Installed drivers for your Android device, including ADB drivers if needed.
    • Installed Java 7 (JRE version 1.7).
  • Android device:
    • A custom recovery or fully functional ADB support in recovery.
    • Properly rooted - requires root access in recovery.
« Supported Android roms
Graphic Porter is not limited to any specific rom. With that said, it's only configured (by default) for the following roms, or more specifically, the following 'drawable sets'. However, you can define your own sets (or customize the current ones) for your rom - see the how to, it is very simple.
Using drawable sets makes it easy to identify and modify only the drawables that affect the given component of the UI, as opposed to manually filtering through all the drawables in an apk (which you can also do with GP).

It is a given that you get very differently themed Android roms out there (and also just different,especially the OEM ones), as well as differences between Android versions themselves. This basically means that just because the CyanogenMod rom's toggle drawables are these ones, doesn't mean that they are the same ones Samsungs's TouchWiz roms use, even if they are present.

Currently, the following drawable sets are defined by default. If you are unsure what they are, 'Preview' them after importing the original in GP:
  • CyanogenMod 10+ based roms (PA, SlimRom, Carbon Rom, etc.)
    • General UI: Backgrounds (the Settings background, for example)
    • General UI: Phone (call) icons
    • General UI: Check boxes
    • General UI: Radio buttons
    • General UI: Switches
    • General UI: IM (Android) emotions/smilies
    • General UI: Text field underline
    • General UI: Text selection handle
    • General UI: Tab underline
    • General UI: Loading spinner/circle
    • Lockscreen: Pattern lock: Circle indicators
    • Lockscreen: Pattern lock: Dots (to connect)
    • Lockscreen: Slide Lock: Handles
    • Lockscreen: Slide Lock: Dots (around handle)
    • Notification panel: Quick Settings icons
    • Notification panel: Contextual Headers
    • Settings: Settings list icons

  • TouchWiz 4.4.2
    • Notification panel: Quick panel icons
You can configure additional images by following the steps below under "How to".
« Downloads
Graphic Porter 1.0.0B2 Download
Extract the zip and dubble-click "Graphic Porter.bat" to run. On the initial start up you will be required to create a profile for your device.
  • Release Notes
    • GP is able to function with or without apktool, it's entirely up to you and is disabled by default. Using apktool gives you the advantage to edit .9.png and .xml drawables as well, including the ability to change a drawable's type (like replacing an .xml drawable with a .png image). The downside is the possibility that apktool may fail, but when that happens you will only lose the benefits of using apktool for that specific apk - the 'normal' drawables will still be flashed to that apk. You may need to add custom versions of apktool and aapt for your rom.
    • Flashing recompiled apks (see Settings, disabled by default) could cause a bootloop, but if it happens, simply restore the apk backup.
    • I'll add more when they come to mind, can't remember everything at the moment.


  • Changelog
    • IMPROVE: No need to worry about filename duplicates in drawable configurations anymore.
    • FIX: ADB connect to device error. "adb get-serialno" was giving "unknown" at times where "adb device"s would give actual serial number, hence the error.
    • OTHER: Small fixes and changes

    • ADD: Apktool 2.0.0RC2, as well as the ability to select the apktool version in use. Useful for using custom apktool versions.
    • ADD: Ability to select aapt version in use, useful for using custom aapt versions.
    • UPDATED: Menus and controls. BEWARE
    • FIX: Updating exported explorer view after editing.
    • ADD: Support for .xml drawables.
    • ADD: Backup and restore feature.
    • UPDATED: Auto apk backup behaviour.
    • ADD: Automatic zipalign of apks.
    • REMOVE: xUltimate Draw9Patch Compiler.
    • UPDATED: Sorted settings menu and added new options, mostly related to apktool.
    • FIX: Draw-9-patch verify.
    • ADD: Ability to import non-decompiled .9.png drawables if there is another border for them to use, either in the current build or in the profile.
    • FIX: Java version checker not reporting incorrect version.
    • FIX: VRtheme importing.
    • ADD: Ability to change the format/type of drawables.
    • ADD: Unique profile ID for restore even if profile name was changed.
    • REMOVED: Automatic retry when having trouble accessing devise via ADB; device will be given more time to connect.
    • ADD: Option to select apk source when flashing.
    • ADD: Option to manually edit the apk source/resources.
    • OTHER: Various other improvements, changes and small fixes

Previous releases:
  • Graphic Porter 0.9.2 Download
    • 0.9
      • ADD: Full support for .9.png images.
      • FIX: ADB recovery issue. You will be prompted to confirm the device is in recovery if it can't be confirmed.
      • TOOL: Updated ImageMagick to 6.8.9
      • FIX: Build save/restore ignored the editors' undo files.
      • FIX: Windows version check to display the error properly on pre-Windows 7 systems.
      • ADD: APKTool
      • ADD: xUltimate 9 Patch Compiler.
      • OTHER: Disabled Windows version check temporarily: issues with Windows 8
      • FIX: Crash when updating profile.
      • FIX: Small fixes
    • 0.9.1
      • FIX: Adb false error "no root access".
      • ADD: A few more configs.
      • FIX: Compiling .9.png's. Worked around xUltimate's issues.
      • FIX: Windows version check.
      • ADD: Java version check.
    • 0.9.2
      • FIX: 9-Patch verification on drag and drop.
      • OTHER: Small improvements.
      • FIX: Settings' cache verification of invalid values.
      • FIX: Adb export did not flash any mods.
      • ADD: Contingency added if xUltimate crashes (happens sometimes).
  • Graphic Porter 0.8 Download
    • Initial Release
« How to
  • Navigate through Graphic Porter

    This is a batch script, and the only mouse input that is used is when dragging and dropping a file onto Graphic Porter. Besides that, navigation plays entirely on the keyboard. All the keys you can press appear on screen like this: [N] - the "N" key on your keyboard.

    On the main menu, after creating your first profile, you can:
    • navigate through pages by pressing the keys [O] or [P] to move backwards or forwards respectively.
    • select any presented option by pressing the respective number from [1] to [0] (10).
    • select any additional or other options on the current page that are displayed at the bottom of the screen.
  • Adding custom versions of aapt and apktool

    Some roms may need special versions of apktool or aapt in order to decompile and recompile successfully.

    1. Place your custom version of aapt or apktool in "resources\tools\aapt_versions" or "resources\tools\apktool_versions" respectively. Don't worry about a specific filename format.

    2. In Graphic Porter, go to Settings. On the 'Advanced' page, select 'current apktool/aapt version' and select the one you want to use.
  • Reset the settings to default

    Simply exit Graphic Porter and delete the file "resources\settings\settings_cache".
  • Configure drawable sets for your rom

    You will need the names of the drawables you want to add, so you'll have to extract the system apk that contains them from your rom and extract the apk itself as well. You will find the images inside the apk at "res/drawable*/*".

    1. In the directory "resources\settings\drawable_functions\", create a folder with a simple identifying name (without spaces), like "QuickSettingsIcons", and open it. You can copy other folders in this directory and simply modify them accordingly.

    2. Create a text file named "Properties" (without the .txt extension) and add the following lines:
      Code:
      name=Quick Settings Icons
      category=NOTIFICATION PANEL
      resize_on_extract=yes
      • name: The name that will appear in Graphic Porter.
      • category: The name of the category by which it would be grouped together on a page.
      • resize_on_extract: The value can be "yes" or "no". It sets whether or not the images should be resized if they are too big or too small when they are extracted. For example, the Quick Settings Icons should be resized but the Holo Backgrounds should not (they can be resized manually if needed). If you are unsure, keep it "yes".

    3. Create a text file named after apk that contains the images, for example, for the "SytemUI.apk" you will create a text file named "SystemUI.apk". In it, list the names of the drawables you want to be added. You can also specify an extension for the drawable if you only want that type to be profiled. If you only want drawables with that specific name to match, regardless of the type/extension, add a period "." at the end of the name. You may use more than one wildcard at any position in the file names. For example:
      Code:
      ic_qs_nfc_*
      *_qs_signal*.*
      ic_qs_screen_timeout_off.
      ic_wifi_*
      You will need to create a file like this for each apk that contains the images you are targeting.

    4. Optional: Create a text file named "Exceptions" to add a list of files the profiler should ignore. You can use wildcards in 3 ways only, or without a wildcard, namely:
      Code:
      *_qs*
      *_activated.png
      ic_*
      ic_qs_screen_timeout_off.xml
      Note: A wildcard at the beginning and end will match anywhere, including beginning or end. No wild card will need to match the entire file name, including the extension.

    You will need to restart Graphic porter and update your profile for changes to take effect.
« Credits
Thank you all for reporting issues you experience and helping make Graphic Porter a stable tool everyone can use, and of course, thanks for using it
The Following 35 Users Say Thank You to br.ruan For This Useful Post: [ View ] Gift br.ruan Ad-Free
28th September 2014, 08:57 AM |#2  
OP Senior Member
Thanks Meter: 261
 
More
Info 2 Graphic Porter NOW ...well on 06-11-2014...
1.0.0B1. Nuff' said.

Previous updates:
  • 04-11-2014
    Currently testing A LOT of changes... Will release 1.0.0Beta1 when reasonably stable...

    The first 1.x release!!!

  • 02-11-2014
    Figured out why I was having trouble with apktool - it had nothing to do with apktool.

    Now I'm having this issue. As that does seem to be apktool/aapt related, I will finish and prepare Graphic Porter 1.0.0B1 for release. Apktool and aapt can be manually updated and selected later on, unless this issue is resolved before then.

  • 30-10-2014
    Still having problems with apktool - at least on my CM11 rom

    The use of apktool would be completely optional (amoungst other new options). This will ensure that GP can be used despite having rom compatiblitity issues with apktool.
    NOTE: apktool will need to be enabled to modify 9.png and xml drawables.

    There are also already improvements to drawable handling, as it no longer just handles image drawables.

    So currently, what's causing the delay is that neither apktool 1.5.2 or 2.0.0RC2 is compiling 9.pngs, and even thought 2.0.0RC2 does compile the xmls, they are about 2-3 times the original size (didnt check the output of 1.5.2), which tells me something is wrong - no modifications to the decompiled xmls were made.
    As you've probably predicted, flashing the recompiled system apks result in a bootloop (-c option is used when building with apktool, also I've tried manually copying the META-INF and manifest xml with no change in outcome.) The apks are decompiled and recompiled without any errors or even warnings.

    Any ideas? I'll gather more info when i get to my computer and post a question on this.


    Ok, some more not-so-good news: I no longer have access to an uncapped internet connectio , and will have to make do with about 1GB p/m which is intended only for personal use when not connected to wifi (the uncapped line). I'm mentioning this becuase I will not be able to test different roms with this tool, not to mention only updating my own rom only once or twice p/m...
    This is technologically shattering to someone who average 30-100GB p/m


  • 16-10-2014
    Working on a big-err experimental release...... and then ironing... hopefully in just a few days depending on time available.

    Oh yeah and I'm dumping xUltimate - too many issues (hopefully...) with anti-virus programs.

  • 05-10-2014
    So after a series of troublesome 0.9.x releases, hopefully after 0.9.2 we can move on to features as apposed to bug fixes.

  • 02-10-2014
    I honestly did not expect Graphic Porter to get noticed this quickly (if at all), but hey I'm definitely not complaining

    Also I updated my terrible, inexplicable language use and word skipping tendencies in the OP >.>

  • 02-10-2014
    Fixed the whole 9-patch compiling issue.. download GP 0.9.1

  • 02-10-2014
    Having issues with compiling .9.png's... working on it.
    Also the whole adb/root/flashing issue should be resolved in the upcoming release.

  • 01-10-2014
    Updated Graphic Porter Bring those .9.pngs!!!

  • 30-09-2014
    Fixed it. However.. it seems after all ImageMagick does not care for the 9 -patch binary chunk :/ Busy working on providing full support for *.9.pngs...

  • 28-09-2014
    Since Carbon rom (unofficial) isn't being built anymore for my device, I decided to use CyanogenMod for a while - I'm very happy jactivelte is officially supported by CM now

    Anyway, after Graphic Porter booted my device into recovery (I wanted to flash the images I just colorized), it couldn't find any device that is in recovery connected to my computer . As it turns out, even if my CM device is in recovery, it still labels itself as a "device". So when I have time to work around this, I will upload screenshots of when the above modifications are flashed to your device, and of course, update Graphic Porter. This wasn't a problem on Carbon rom, that's why Graphic Porter used this method.
The Following 7 Users Say Thank You to br.ruan For This Useful Post: [ View ] Gift br.ruan Ad-Free
29th September 2014, 08:25 PM |#3  
_moelle's Avatar
Recognized Themer
Flag NRW
Thanks Meter: 8,863
 
Donate to Me
More
Can someone provide me a download link for APKFramework? (addon) ...cant download it from provided link in First Post.
30th September 2014, 10:47 AM |#4  
OP Senior Member
Thanks Meter: 261
 
More
Quote:
Originally Posted by _moelle

Can someone provide me a download link for APKFramework? (addon) ...cant download it from provided link in First Post.

The mediafire link seems to work fine here

Uploaded it to Google Drive for you.

As an alternative you can duplicate the "resources\settings\function_config\CheckBoxes " folder and rename it to "APKFramework". Then simply replace the line "btn_check_*.png" in the text file "Names_framework-res.apk" with this:
Code:
*.png
You should also change the name in the "Properties" text file. See the 'How to' above.
The Following 3 Users Say Thank You to br.ruan For This Useful Post: [ View ] Gift br.ruan Ad-Free
1st October 2014, 12:01 AM |#5  
Calingo's Avatar
Senior Member
Flag On The Dark Side
Thanks Meter: 76
 
More
Question Error
I get a Error Whenever I try to open it
Downloaded - Extracted it Desktop - Open it

HTML Code:
 START UP
'10' is not recognized as an internal or external command,
operable program or batch file.
'9' is not recognized as an internal or external command,
operable program or batch file.
'8' is not recognized as an internal or external command,
operable program or batch file.
'7' is not recognized as an internal or external command,
operable program or batch file.
'6' is not recognized as an internal or external command,
operable program or batch file.
'5' is not recognized as an internal or external command,
operable program or batch file.
'4' is not recognized as an internal or external command,
operable program or batch file.
'3' is not recognized as an internal or external command,
operable program or batch file.
'2' is not recognized as an internal or external command,
operable program or batch file.
'1' is not recognized as an internal or external command,
operable program or batch file.
------------------------------------------------------------------------------
--------------------
 This Program is designed for Windows 7 and above.

 Press any key to exit
Open It With Admin Privileges

HTML Code:
 Please ensure that you have properly downloaded and extracted:
 "Graphic Porter 0.8.zip".




-----------------------------------------------------------------

 [ANY KEY] Exit
The Following User Says Thank You to Calingo For This Useful Post: [ View ] Gift Calingo Ad-Free
1st October 2014, 12:17 AM |#6  
OP Senior Member
Thanks Meter: 261
 
More
Quote:
Originally Posted by Calingo

I get a Error Whenever I try to open it
Downloaded - Extracted it Desktop - Open it

HTML Code:
 START UP
'10' is not recognized as an internal or external command,
operable program or batch file.
'9' is not recognized as an internal or external command,
operable program or batch file.
'8' is not recognized as an internal or external command,
operable program or batch file.
'7' is not recognized as an internal or external command,
operable program or batch file.
'6' is not recognized as an internal or external command,
operable program or batch file.
'5' is not recognized as an internal or external command,
operable program or batch file.
'4' is not recognized as an internal or external command,
operable program or batch file.
'3' is not recognized as an internal or external command,
operable program or batch file.
'2' is not recognized as an internal or external command,
operable program or batch file.
'1' is not recognized as an internal or external command,
operable program or batch file.
------------------------------------------------------------------------------
--------------------
 This Program is designed for Windows 7 and above.

 Press any key to exit
Open It With Admin Privileges

HTML Code:
 Please ensure that you have properly downloaded and extracted:
 "Graphic Porter 0.8.zip".




-----------------------------------------------------------------

 [ANY KEY] Exit

What version of Windows are you running? This error occurs because you are running a version of windows lower than Windows 7 - at least it appears to the script that way.
The Following 2 Users Say Thank You to br.ruan For This Useful Post: [ View ] Gift br.ruan Ad-Free
1st October 2014, 12:36 AM |#7  
Calingo's Avatar
Senior Member
Flag On The Dark Side
Thanks Meter: 76
 
More
Thumbs up Version
Quote:
Originally Posted by br.ruan

What version of Windows are you running? This error occurs because you are running a version of windows lower than Windows 7 - at least it appears to the script that way.

I am running windows 8 64 Bit
One more thing should I connect tmy device before opening the program
By the way nice work mahn sounds awesome just wana try it any donation links
1st October 2014, 12:50 AM |#8  
OP Senior Member
Thanks Meter: 261
 
More
Quote:
Originally Posted by Calingo

I am running windows 8 64 Bit
One more thing should I connect tmy device before opening the program
By the way nice work mahn sounds awesome just wana try it any donation links

Ey I worked on this script for a time when I had Windows 8 64-bit and it had no problems. I'll look for a work around for this.

In the meantime, you can edit "Graphic Porter.bat" in Notepad++ (or Notepad) and delete the following line, it's around line 45:
Code:
call "%BIN%\callscripts\WINDOWSVERSIONCHECK"
Thanks but I will have to get back to you on that Thanks though
1st October 2014, 12:57 AM |#9  
Calingo's Avatar
Senior Member
Flag On The Dark Side
Thanks Meter: 76
 
More
Info 2 Device
Quote:
Originally Posted by br.ruan

Ey I worked on this script for a time when I had Windows 8 64-bit and it had no problems. I'll look for a work around for this.

In the meantime, you can edit "Graphic Porter.bat" in Notepad++ (or Notepad) and delete the following line, it's around line 45:

Code:
call "%BIN%\callscripts\WINDOWSVERSIONCHECK"
Thanks but I will have to get back to you on that Thanks though

Should I Try Connecting my device before running the program

1st October 2014, 12:57 AM |#10  
_moelle's Avatar
Recognized Themer
Flag NRW
Thanks Meter: 8,863
 
Donate to Me
More
just wanna throw a question in....there is the option to replace images by using a "mod or rom-zip" ...using a rom is working with no problems but what kind of path/file structure does the "mod" zip need to have? to replace images by using a rom zip makes no sense to me cause a rom zip mostly contains stock icons etc.

if i chose another zip, the script doesnt find the images which i want to have replaced (they are in the zip but looks like not placed in the right folder.)
1st October 2014, 01:12 AM |#11  
OP Senior Member
Thanks Meter: 261
 
More
Quote:
Originally Posted by Calingo

Should I Try Connecting my device before running the program

I was just about to update my post about that :|
But no it won't change that error you're getting, the only way for you now (until I upload the next) is to remove that line from the main script.

It's almost 2AM here and my brain is slowing down........

Quote:
Originally Posted by _moelle

just wanna Throw a question in....there is the option to replace images by using a "mod or rom-zip" ...using a rom is working with no problems but what kind of path/file structure does the a "mod" zip need to have? to change by a rom zip makes no sense to me cause a rom zip nostly contains stock icons etc.

if i chose another zip, the script doesnt find the images which i want to have replaced .

Choosing from another rom's file is usefule in cases like Carbon rom mostly still has white stock themed switches, etc. while CyanogenMod and PA has blue ones now, which can easily be colorized into any other color.

The "traditional" mods you get have the same file structure as roms (in a sense, it's like a partial rom you're flashing). Apart from those it will also extract from morph and vrtheme mods - they dont have apks in them, just the images.

The reason GP doesn't find the images you are looking for is probably because they aren't there. Even though it is 'the same thing' in both roms, the names for the files may be different, so they won't be picked up. You can look in "resources\cached_mods\<you_mod_name>" for all the files that were extracted. Roms vary in many ways, especially when you get in between manufacturers... it's a pain
The Following User Says Thank You to br.ruan For This Useful Post: [ View ] Gift br.ruan Ad-Free
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes