PPCGeeks

PPCGeeks (http://forum.ppcgeeks.com/index.php)
-   HTC Evo 3D Development (http://forum.ppcgeeks.com/forumdisplay.php?f=322)
-   -   [Dev Tools] How to create mods (http://forum.ppcgeeks.com/showthread.php?t=146428)

OMJ 08-13-2011 08:19 PM

[Dev Tools] How to create mods
 
So you wanna create your own ROM, and add all the latest & greatest mods. So you scurry the popular forums looking for them, but did you learn anything? Anyone can take a modded file & add it to your ROM, but if you want to learn how to create that mod yourself, then this thread is for you.

I will adding all the mods I know how to do, I encourage all other devs to do the same! Add your mod, and I will add a link to your post in the OP. Let's help each other out! Be sure to give thanks to where you learned the mod!

OMJ 08-13-2011 08:19 PM

Re: [Dev Tools] How to create mods
 
1 Attachment(s)
How to add your custom Greeting on the HTC Setup screen (credit to amikam for showing me!)

-mod is located in /system/settings.apk....

-you have to decompile it w/ apktool....c:\apktool>apktool d settings.apk

-once decompiled, goto apktool\settings\res\values\strings.xml, open w/ notepad++...

you need to change both these lines (line # may vary), save, recompile the apk...c:\apktool>apktool b settings


Quote:

line 360 <string name="english_select_your_language">Select your language</string>
change to ie....Welcome to OMJs EVO 3D ROM


Quote:

line 1562 <string name="select_your_language">Select your language</string>
change to ie....Welcome to OMJs EVO 3D ROM

http://up.ppcgeeks.com/EVO3D/Users/O...0_17-55-16.jpg


...


How to add % to stock battery (credit to amikam for showing me!)

-mod is located in /system/framework/framework-res.apk....

-you have to decompile it w/ apktool....c:\apktool>apktool d framework-res.apk

-once decompiled, goto apktool\framework-res\res\drawable-hdpi

-battery icons start @ stat_sys_battery_0.png

-copy/replace new icons

-goto apktool\framework-res\res\drawable

-copy new stat_sys_battery.xml, stat_sys_battery_charge.xml & zzz_stat_sys_battery_1.xml
(personally I just use the 6 stock charging icons, and add the 0-100 % icons, then u don't need to replace stat_sys_battery_charge.xml)

-compile new framework-res (apktool b framework-res)



The following mods are courtesy of SteelH, thx bro!



Remove the USB Debugging icon

This guide is a reference for the smali code changes that must be made inside of services.jar to properly hide the USB debugging icon.

You need to edit com\android\server\NotificationManagerService.smal i

Search for:

Code:


iput v7, v6, Landroid/app/Notification;->icon:I

Comment it out:

Code:


#iput v7, v6, Landroid/app/Notification;->icon:I



Remove the alarm icon http://i53.tinypic.com/2q07p0z.png

This guide is a reference for the smali code changes that must be made inside of SystemUI.apk to properly hide the alarm icon.

You need to edit \com\android\systemui\statusbar\policy\StatusBarPo licy.smali

Search for:

Code:


const-string v1, "alarmSet"

    const/4 v2, 0x0

    invoke-virtual {p1, v1, v2}, Landroid/content/Intent;->getBooleanExtra(Ljava/lang/String;Z)Z

    move-result v0

Replace it with:

Code:


const/4 v0, 0x0

const-string v1, "alarmSet"

const/4 v2, 0x0



Remove the headset icons http://i51.tinypic.com/24nhagh.png http://i53.tinypic.com/69l646.png

This guide is a reference for the smali code changes that must be made inside of SystemUI.apk to properly hide the headset icons.

You need to edit \com\android\systemui\statusbar\policy\StatusBarPo licy.smali

Search for:


Code:


.method protected updateHeadsetStatus(Landroid/content/Intent;)V
    .locals 11
    .parameter "intent"

    .prologue
    const/4 v9, 0x1

    const/4 v8, 0x0

Replace it with:

Code:


.method protected updateHeadsetStatus(Landroid/content/Intent;)V
    .locals 11
    .parameter "intent"

    .prologue
    const/4 v9, 0x0

    const/4 v8, 0x0



Remove the mute http://i55.tinypic.com/iz9j43.png and vibrate http://i55.tinypic.com/99mf50.png icons.

This guide is a reference for the smali code changes that must be made inside of SystemUI.apk to properly hide the mute and vibrate icons.

You need to edit \com\android\systemui\statusbar\policy\StatusBarPo licy.smali


Search for:

Code:


.method private final updateVolume()V
    .locals 9

    .prologue
    const/4 v7, 0x1

    const/4 v6, 0x0

Replace it with:
Code:


.method private final updateVolume()V
    .locals 9

    return-void
    .prologue
    const/4 v7, 0x1

    const/4 v6, 0x0



This MOD will hide the GPS status reticle http://i54.tinypic.com/2gt5c2x.png and http://i51.tinypic.com/344sdx4.png

This was made possible by RMarkwald!

This guide is a reference for the smali code change that must be made inside of SystemUI.apk to properly hide the GPS icons.

You need to edit \com\android\systemui\statusbar\policy\HtcCdmaStat usBar.smali

Search for:

Code:

.method private updateMtGpsIcon()V
.registers 8

.prologue
const/4 v5, 0x3

const/4 v4, 0x1

const/4 v3, 0x0

const-string v6, "gpsone"

Replace with:

Code:

.method private updateMtGpsIcon()V
.registers 8

.prologue
const/4 v5, 0x3

const/4 v4, 0x0

const/4 v3, 0x0

const-string v6, "gpsone"



This MOD will hide the clock.

This was made possible by freeza!


This guide is a reference for the xml code changes that must be made inside of SystemUI.apk to properly hide the clock.

Open status_bar.xml in res/layout and delete this line"



Code:


<com.android.systemui.statusbar.Clock android:textAppearance="@Android:style/TextAppearance.StatusBar.Icon" android:textSize="16.0sp" android:gravity="left|center" android:id="@id/clock" androidaddingRight="6.0dip" android:layout_width="wrap_content" android:layout_height="fill_parent" android:singleLine="true" />



This mod will hide the bluetooth

This guide is a reference for the smali code changes that must be made inside of SystemUI.apk to properly hide the bluetooth icons

You need to edit \com\android\systemui\statusbar\policy\StatusBarPo licy.smali


Search for:


Code:


.method private final updateBluetooth(Landroid/content/Intent;)V
    .locals 10
    .parameter "intent"

    .prologue
    const/4 v7, 0x1

    const/4 v6, 0x0

    const-string v9, "bluetooth"

    const-string v8, "StatusBarPolicy"

Replace with:


Code:


method private final updateBluetooth(Landroid/content/Intent;)V
    .locals 10
    .parameter "intent"

    .prologue
    const/4 v7, 0x0

    const/4 v6, 0x0

    const-string v9, "bluetooth"

    const-string v8, "StatusBarPolicy"



How to make Sense ROMs show 1X/3G Properly


This guide is a reference for the smali code changes that must be made inside of SystemUI.apk to properly show 1X/3G modes.

You need to edit \com\android\systemui\statusbar\policy\HtcCdmaStat usBar.smali, which is located within SystemUI.apk



Search and find the following code:

Code:


.method public static final getDataNetworkIconList_1x()[[I
    .locals 2

    .prologue
    .line 493
    const-string v0, "HtcCdmaStatusBar"

    const-string v1, "return sDataNetType_3g_cdma"

    invoke-static {v0, v1}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 494
    sget-object v0, Lcom/android/systemui/statusbar/policy/HtcCdmaStatusBar;->sDataNetType_3g_cdma:[[I

    return-object v0
.end method

Replace it with:

Code:


.method public static final getDataNetworkIconList_1x()[[I
    .locals 2

    .prologue
    .line 493
    const-string v0, "HtcCdmaStatusBar"

    const-string v1, "return sDataNetType_3g_cdma"

    invoke-static {v0, v1}, Landroid/util/Slog;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 494
    sget-object v0, Lcom/android/systemui/statusbar/policy/HtcCdmaStatusBar;->sDataNetType_1x:[[I

    return-object v0
.end method



The follow MOD is courtesy of j4n87, thx!

How to remove recent apps from notification bar

Successfully remove the annoying recent apps plugin in the notification bar.

You need to edit SystemUI\smali\com\android\systemui\statusbar\Stat usBarFlag.smali, which is located within SystemUI.apk

search & find the following code:

Code:

sput-boolean v0, Lcom/android/systemui/statusbar/StatusBarFlag;->HTC_RECENT_APP:Z
replace it with:

Code:

sput-boolean v2, Lcom/android/systemui/statusbar/StatusBarFlag;->HTC_RECENT_APP:Z

...


more to come!

OMJ 08-13-2011 08:20 PM

Re: [Dev Tools] How to create mods
 
reserved....

proxhack 08-13-2011 09:40 PM

Re: [Dev Tools] How to create mods
 
This is great...I can finally learn some stuff!
Thanks OMJ!

Now, I just need to find some time.

OMJ 08-15-2011 12:49 AM

Re: [Dev Tools] How to create mods
 
added a bunch of SteelH's mods....

scrosler 08-15-2011 04:31 AM

Re: [Dev Tools] How to create mods
 
Can you add mod to properly remove the Location On icon in status bar. it can be done by changing the ping but leaves a blank space.

OMJ 08-15-2011 03:03 PM

Re: [Dev Tools] How to create mods
 
Quote:

Originally Posted by scrosler (Post 2137700)
Can you add mod to properly remove the Location On icon in status bar. it can be done by changing the ping but leaves a blank space.

I would if I had it....the systemui.apk I was using from Freeza had that blank space.....I'm real picky when it comes to that stuff, I've switched to JsChiSurfs systemui.apk & it is correct, no space.

scrosler 08-25-2011 11:51 PM

Re: [Dev Tools] How to create mods
 
Do you know how to properly remove the GPS Icon from stat bar?

OMJ 08-26-2011 10:52 AM

Re: [Dev Tools] How to create mods
 
Quote:

Originally Posted by scrosler (Post 2140706)
Do you know how to properly remove the GPS Icon from stat bar?

This MOD will hide the GPS status reticle http://i54.tinypic.com/2gt5c2x.png and http://i51.tinypic.com/344sdx4.png

This was made possible by RMarkwald!

This guide is a reference for the smali code change that must be made inside of SystemUI.apk to properly hide the GPS icons.

You need to edit \com\android\systemui\statusbar\policy\HtcCdmaStat usBar.smali

Search for:

Code:

.method private updateMtGpsIcon()V
.registers 8

.prologue
const/4 v5, 0x3

const/4 v4, 0x1

const/4 v3, 0x0

const-string v6, "gpsone"

Replace with:

Code:

.method private updateMtGpsIcon()V
.registers 8

.prologue
const/4 v5, 0x3

const/4 v4, 0x0

const/4 v3, 0x0

const-string v6, "gpsone"


scrosler 08-26-2011 02:10 PM

Re: [Dev Tools] How to create mods
 
OMG! I was searching the wrong strings! You sir... Are the man!

OMJ 08-26-2011 02:17 PM

Re: [Dev Tools] How to create mods
 
Quote:

Originally Posted by scrosler (Post 2140826)
OMG! I was searching the wrong strings! You sir... Are the man!

well credit to SteelH, he updated his thread to include it...

scrosler 08-26-2011 03:12 PM

Re: [Dev Tools] How to create mods
 
I dont care if Santa Clause made the mod... lol. I was pulling my hair out for days! lol


I'll show you what I was modding and we can all call me a newb:

http://forum.xda-developers.com/showthread.php?t=780614

I was trying my butt off to do that mod but it just wasnt working out. First the .jar file didint contain the smali but I found the smali in SySUI.

I made his changes and it just didint do anything. Back and forth, round and round I made the changes and tried signing, unsigning, etc etc etc....

Wasnt even hitting the right strings, lol!

I got some other goodies fro your ROM if you havent made them yet.. I will PM You.

scrosler 12-31-2011 08:59 PM

Re: [Dev Tools] How to create mods
 
I still come back to this thread for info!

Best thread ever!

Thanks OMJ!


-Scott

OMJ 01-01-2012 12:32 PM

Re: [Dev Tools] How to create mods
 
I've been meaning to update, but for now, here is a list of mod threads I've kept track of.....


first, the majority of these threads are from SteelH & Freeza, these are links to threads they have started to more easily finds additional mod threads.

SteelH - xda-developers - Search Results

Freeza - xda-developers



MOD Tweaks - [MOD][DEV] ROM Tweaks for your Stock Rom [11-22][v0.1] - xda-developers

Battery % icons (/system/framework/framework-res.apk)

Custom Greeting (/system/app/settings.apk)

4N1 reboot menu (/system/framework/android.policy.jar)


CRT animation (/system/framework/services.jar)

[DEV] Enabling CRT ON & OFF Animation in Roms [HOW-TO] - RootzWiki


1x/3G mod (/system/app/systemui.apk)

[HOW-TO] [TEAM XPOSED] How to make Sense ROMs show 1X/3G Properly - xda-developers


USB debug icon (/system/framework/services.jar)

xda-developers - View Single Post - [HOW-TO] [TEAM XPOSED] Hide various Icons from the Status Bar


GPS icons (/system/app/systemui.apk)

xda-developers - View Single Post - [HOW-TO] [TEAM XPOSED] Hide various Icons from the Status Bar


Hidden Clock (/system/app/systemui.apk)

xda-developers - View Single Post - [HOW-TO] [TEAM XPOSED] Hide various Icons from the Status Bar


MMS Compression (/system/app/mms.apk)

[HOW-TO] [TEAM XPOSED] Disable MMS Compression - xda-developers


Remove recent apps (/system/app/systemui.apk)

[GUIDE] Remove recent apps from notification bar - xda-developers


Disable OTA's (/system/etc/security/otacerts.zip, /system/build.prop & /system/app/CheckinProvider.apk)

[HOW-TO] [TEAM XPOSED] Disable/Block/Prevent OTA Updates - xda-developers


Remove CIQ (init.shooter.rc kernel/ramdisk)

[HOW-TO] [TEAM XPOSED] Remove CIQ - xda-developers


Set minimum CPU speed (\system\etc\init.post_boot.sh)

[HOW-TO] [TEAM XPOSED]Save some battery by lowering the minimum CPU frequency - xda-developers


3D Homescreen (/system/app/settings.apk)

[HOW-TO] [TEAM XPOSED] Enable extra display features - xda-developers


Screen Calibration (/system/app/settings.apk)

[HOW-TO] [TEAM XPOSED] Enable extra display features - xda-developers


Backup and Secure Box to SMS (/system/app/mms.apk)

[HOW-TO] [TEAM XPOSED] Add Backup and Secure Box to SMS - xda-developers


Enable Beats audio sound enhancer in HTC Music app (/system/app/HtcMusic.apk)

[HOW-TO] [TEAM XPOSED] HTCMusic MODs - xda-developers


Transparent notification (/system/app/systemui.apk)

[TEAM XPOSED] [MOD] Transparent notification pulldown - xda-developers


Hotspot hack (/system/framework/framework.jar)

[GUIDE][TOOL]Add Hotspot Hack to your ROM - HackHotspotTool-v1.1 - xda-developers


Disable SIP over WIFI only (/system/framework/framework-res.apk)

xda-developers - View Single Post - ★☆★|ROM|Nightly|◄●|Synergy 3Dvo|●►|2.3.4|SQLite Journal / MPD CPU1 TWEAK|ZEUSMODS|★☆★


Dim capacitive buttons without a kernel

[TEAM XPOSED] [GUIDE] Dim capacitive buttons without a kernel - xda-developers

Tinkerbell 01-01-2012 12:59 PM

Re: [Dev Tools] How to create mods
 
Oh My Goodness!! What a wealth of information OMJ!! Awesome!!

rydah805 01-21-2012 10:50 PM

This is a really helpful thread. thanks! :)


Via My HTC Evo 3D On The Now Network From Sprint.

OMJ 02-28-2012 01:27 PM

Re: [Dev Tools] How to create mods
 
I'm gonna add this to the OP for assembling/disassembling .jar files.

smali - An assembler/disassembler for Android's dex format - Google Project Hosting


Using Smali/Baksmali, I will use framework.jar as the example:

-open deodexed framework.jar w/ 7zip, extract classes.dex

-copy classes.dex to your Baksmali folder

-decompile classes.dex (java -jar baksmali.jar classes.dex)

-make your smali changes in the Out folder

-copy out folder to Smali dir

-compile classes.dex (java -jar smali.jar -o classes.dex out/)

-copy the new classes.dex to framework.jar

peterchakas84 03-04-2012 05:44 PM

Thanks for the post! How ever decompile the settings.apk and only got smali not res any idea wat I did wrong??..

Sent from my PG86100 using PPCGeeks

reaper24 03-04-2012 06:23 PM

Re: [Dev Tools] How to create mods
 
Quote:

Originally Posted by peterchakas84 (Post 2171651)
Thanks for the post! How ever decompile the settings.apk and only got smali not res any idea wat I did wrong??..

Sent from my PG86100 using PPCGeeks

Did you use APKTOOL ? Works like a champ you need to install

com.htc.resources.apk
framework-res.apk

Should work fine..

OMJ 03-04-2012 06:35 PM

Re: [Dev Tools] How to create mods
 
Quote:

Originally Posted by peterchakas84 (Post 2171651)
Thanks for the post! How ever decompile the settings.apk and only got smali not res any idea wat I did wrong??..

Sent from my PG86100 using PPCGeeks

what version of apktool are u using? 1.4.3 is the latest. Also, like reaper said, u need to copy com.htc.resources.apk & framework-res.apk to the apktool folder then run these cmds:

apktool if com.htc.resources.apk

apktool if framework-res.apk


now run the decompile cmd...

peterchakas84 03-04-2012 10:22 PM

Thanks!! For the help! Yes I have that version!!

Sent from my PG86100 using PPCGeebks

reaper24 03-04-2012 11:59 PM

Re: [Dev Tools] How to create mods
 
Quote:

Originally Posted by peterchakas84 (Post 2171670)
Thanks!! For the help! Yes I have that version!!

Sent from my PG86100 using PPCGeebks

Hopefully you get everything workin.. And java isn't being a pain in the ass lol.. I had to set a path up for java to work... Took me a few hours of lookin around to fix it...


I will do more messing with xml files and stuff when I read up on that hex junk:bs: =P~ :D I may mess with it and throw up a couple of builds so folks can test it to see if it is doing what it is suppose to... My builds take me alot of time because I test it my self ... If I don't like it I don't release it lol.. So takes me awhile.. I want people happy not bummed cause the rom is borked or something is FC :thumbright:
:violent2: Right now been testing what I put up yesterday... Playin some Dead Island on the side to just have fun :D

If you need any help feel free to ask me or OMJ

peterchakas84 03-15-2012 11:20 PM

Hi unfortunately after doing the steps mention before I'm stuck on in the same... :-(

Sent from my PG86100 using PPCGeeks

OMJ 03-17-2012 11:26 AM

Re: [Dev Tools] How to create mods
 
Quote:

Originally Posted by peterchakas84 (Post 2172818)
Hi unfortunately after doing the steps mention before I'm stuck on in the same... :-(

Sent from my PG86100 using PPCGeeks

so when u decompile settings.apk you're still not getting a res folder?


All times are GMT -4. The time now is 08:43 AM.

Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
©2012 - PPCGeeks.com


Content Relevant URLs by vBSEO 3.6.0