[Q] How to MOD APK ? - General Questions and Answers

Hey guyz,
I wanted some help regarding modding apk's. I know that many people have asked the same Questions in the past but my question happens to deal with ADDING code to the original APK without the SOURCE.
Its pretty much the same idea as how WHATSAPP+ (or WHATSAPP PLUS) was modded and how the mods were added into the original apk.
Your efforts in answering this question will be greatly appreciated. I have also searched on google to no avail.
Sincerely,
XxXKINGMAKXxX

Hi bro. Although there are many methods for modding, but best way out is to use apktool. You can search on XDA about how to use apktool.
Hit thanks if i helped you
Sent from my GT-S5302 using xda app-developers app

I have tried APK tool but it doesnt help me much, i get the RESOURCES AND OTHER files in SMALI format and have no clue on how to convert them to java files

Related

[APP]Timescape Extentions Development

Hello all. Seeing as timescape is running on a lot of high end devices I and some others believe that Devs should start coding extentions. Anyone willing?
GETTING STARTED
http://blogs.sonyericsson.com/developerworld/2011/02/13/timescape-extensions/
http://developer.sonyericsson.com/w...roid/timescapeextensions/overview?cc=gb&lc=en
TIMESCAPE APP
http://forum.xda-developers.com/showthread.php?t=982051 (post#5)
Hope we can get devs for this!
some ideas so far are:
1. gmail
2. xda
3. weather
+1
since timescape has no reported issues after retail version has been ported (except for silly mistakes during installation) I vouch for this idea.
Sent from my U20i using XDA App
Thanks myth999 for all your hard work! You made this all possible.
Sent from my X10i using XDA Premium App
Have taken a lot from xdda just tryin to give back in some way
Thnx anyways...
Btw I can even provide Java (not smali) sourcecodes for the message, call log, fb and twitter plugins so we can use them as a reference while makin our own plugins.
Sent from my U20i using XDA App
sorry for this question but i'm a bit lost...
can Timescape app work on my T-Mobile Samsung Vibrant?? through arc launcher??
if its android 2.2 or above it wld work
Sent from my U20i using XDA App
Can someone tell how to get it working on CM7 Galaxy S I9000???
myth999 said:
Have taken a lot from xdda just tryin to give back in some way
Thnx anyways...
Btw I can even provide Java (not smali) sourcecodes for the message, call log, fb and twitter plugins so we can use them as a reference while makin our own plugins.
Sent from my U20i using XDA App
Click to expand...
Click to collapse
That's what I was trying....but I have never used Java before so I gave up.
timescape retail thanks to myth999! extentions soon to come
knanda said:
Can someone tell how to get it working on CM7 Galaxy S I9000???
Click to expand...
Click to collapse
In the first post download click link to timescape thread. Go to #5 post and download timescape. I think you need root to put permissions and etc in correct places. Copy the app folder to system/app. Install the apostle from there
If you need more help just ask,
timescape retail thanks to myth999! extentions soon to come
Is it possibly add function for change Timescape wallpaper? Add GMail function will be great.
to change wallpaper, could we decompile the apk, find the image, swap with new picture and resign it? im no dev but it seems logically correct.
Yes, it´s correct thought, but it don´t work (app cannot instal).
i think it's a realy good idea! many extension can be interessent...
I have tried the above procedure in the main thread and it still dont work for me :/ i've tried the apk method. Can you help me set it up for my At&t captivate (its rooted and no roms yet but i can't seem to have non-market app to work). Anyway, i would appreciate if you could help me port Timescape on my device step-by-step. Much appreciated. And please direct me to the libraries and how to install them.
Is there a way to develop a google+ plugin for timescape? this would be great

[GUIDE]Development Guides (For Interested Devs)

Hi Guys
Lets create a post containing all Porting Tutorials, to make Development easy.
Here are a few porting tutorials that I saw.
GUIDES:
Xposed - ROM modding without modifying APKs/flashing
.
Compiling CWM Recovery
.
Compiling TWRP Recovery
.
Building Kernels and Android Sources
.
Porting ARM V7 Roms to ARM V6
.
Porting MIUI with JB/ICS
.
Porting Jelly Bean( A few Assists)
.
Dev Basics Collection
.
MIUI v4
.
MIUI v4 Updated- Different and Noob Friendly
.
Sense UI
.
Making a Flashable Package (Update.zip)
.
Making a CWM Flashable Zip
.
Complete Android ROM development and essential tutorials
.
Re-Odexing a ROM
.
Porting AOSP ICS ROMs
.
Compiling CM9 on Mac-OSX Lion
.
MIUI (Source GB)
.
Create your own De-Bloat Tool
.
Porting LewaOS,JoyOS for Noobs
.
UOT Kitchen Guide
.
Making your Own Custom ROM
.
Unpack or Repack an APK
.
Building your first KERNEL
.
Compile JB on Ubuntu
.
DEODEXing Stock ODEXED ROM
.
Using AROMA Installer in your ROM
Other Modding and Theming:
Remap Hardware Button to ICS Recent Apps
.
Create GB Dictionary for your Language
.
ICS Recent Apps Button/Softkeys to Status Bar
.
Smooth Scrolling and Volume Increase
.
Re-Odexing a ROM
.
How to LogCat
.
Convert .jar to .apk
.
Setting up Android Dev Environment in Ubuntu 11.10
.
Modifying APK Files
.
Modifying APK files - Another Method
.
CREDITS:
Credits to the Original Developers/Writers for posting this stuff.
I am just linking it to their threads, all credits go to them.
NOTE:
If you find any other Topic that maybe useful, Post it in comments, so that We can make a huge thread of Guides.
THANK YOU ALL:
I Thank you all for referring to this.. I have just searched a bit and though making a thread would be useful. I am really Happy that it helped many of you!! Will keep adding!!
This made it on XDA PORTAL
MAIN PAGE LINK:
Here is the Post i made in Android Software Development
^^
please try to......
Sent from 2.3.5
Thats great pudup. Please do try..
Sent from my GT-I9103 using XDA
pudup said:
Makes me feel like I could port ics for galaxy r.
And there's no reason to believe I can't.
Sent from my GT-I9103 using XDA
Click to expand...
Click to collapse
Goodluck .
This was sent from a Galaxy Ace. Problem?
If you guys find any tutorials, please post as Comments so that I Can integrate to Main Thread
I have linked this thread to the How To's post as requested.
Thanks for that dude!!
Added @pankaj88 's Custom Rom Development Guide!
Do you have a guide for deodexing stock odexed ROM?....I hope devs could create one...specifically for our device.:fingers-crossed:
Will search flr that. I only found one for re odexing
Sent from my GT-I9103 using xda app-developers app
Just saw that this thread is featured in XDA news, with mention of our device forum. Nice work F3nix.
Sent from my GALAXY R using XDA
How about adding this here?
http://forum.xda-developers.com/showthread.php?t=1726238
Sent from my GALAXY R using XDA
:good:wow congrats buddy this came on XDA portal ....
http://www.xda-developers.com/android/want-to-learn-choose-your-tutorial/
Awesome!! THANKS Alot for your encouragement..
Will keep adding anything that I or you feel Useful!
If it helps anyone,I Would love to do so!!
F3niX said:
Awesome!! THANKS Alot for your encouragement..
Will keep adding anything that I or you feel Useful!
If it helps anyone,I Would love to do so!!
Click to expand...
Click to collapse
Thank you dude, very interesting, I dont even know how I get here if I use a Galaxy Nexus and an Evo 3D, but its still a Guide for everyone.
I request the higher tumbs for F3niX
Nice work, and much appreciated!
Sent from my MB865 using xda premium
Thanks man
u saved me hell of a time
Brilliant idea to start such an collection. Thanks to all contributors.
Off topic: Does anyone know of good tutorials in german? My son is 8 years old but already into programming lego mindstorms robots (with brixcc). He wants to dive into android programming. I don't know if he will quit at an early stage but at least I want to let him try.
German. I Havent found any. But i will keep searching.
Other option is to use Google Translate and check it in German, but i dont think it will be that good.
Made a Thread on Android Software Development Forum. So that others can also see this..
Thanks for your Encouragement.

[SOLVED] Why does APK not work after modification ?

Hi
MIUI V4 has an issue of silent whatsapp notification.
a solution was found and described in here :
What you need to do is decompile the APK.
Look in \res\xml\preferences.xml
Search for android:ringtoneType="all"
Replace with android:ringtoneType="notification"
Click to expand...
Click to collapse
The problem is when I decompile, change and recompile whatsapp apk (and sign it), it becomes smalller (dropping from 7MB to 5.4). even trying to swap resources.arsc of the files with 7zip, does the same.
I even tried manipulating XDA whatsapp plus, but the result is the same - when trying to install the new "small" apk I get an error "application not installed" and that's it (no other version exists in the device).
How do I deal from here ?
Whatsapp won't fix this as it is custom ROM related and I think it is fixed on MIUI JB...
Thanks.
This is the latest official whatsapp apk from the Google Play :
Hi itzik2sh
I think i have whatsapp notification working normally (icon, sound and vibration) on MiUI (my cMiUI fyi), so, kinda weird that not working for u...
Anw, bout the size, i think it is normal cause, I used this trim size trick to minimize the size of my roms tho ^^…so, once it is installed and work properly, u shouldnt worry bout the size
Sent from my SGH-T959V using xda premium
But it's not working, and cmiui is a different ROM.
sent from me
Have you tried not signing it after you do ur changes?
----------------------------------------------
If helped don't be afraid to hit the thanks button it doesn't bite lol
tried it... not working...
I'll give it a shot and see what I can do tomorrow cus right now I'm going to sleep lol
----------------------------------------------
If helped don't be afraid to hit the thanks button it doesn't bite lol
Check if signatures are there in the apk(compiled one). The changes in size are normal. It happens due to compression ratios.
Sent from my GT-S5360 using XDA
Can i port the original signature? How do I do that?
sent from me
I hope not! That is the point of signing the APK. Only the person with the private part of the key can sign, allowing users to confirm that the package, as they have it, came from the signer.
Posted from my SGS4G, thanks to Team Acid development
Hi Jeff
I know it's the vision and purpose of signing, but there are too many apks
I'm lately unable to recompile and get them working.
Erik - I was also never able to translate MIUI camera.apk,
as adding some resources made apk not run anymore. even swaping resources.arsc doesn't help.
Working with latest APKTOOL jar 1.5.0 and signing !
Thanks!

Recruiting...

Hey guys
I'm developing a new GB ROM for the Xperia Play and I need someone who is able to modify APKs. (I have tried myself but apktool always comes back with errors when trying to (re)compile the APK)
The role won't require image editing skills as I should be able to do that part myself, however the modding involved will mainly consist of replacing the PNGs within the APK.
I will supply the PNGs that need to be put into the APKs. I will also supply the APKs that need to be modified.
Please PM me for more details if you are interested in helping out
Thank you
Sent from my R800i using xda app-developers app

[Q] Advanced reboot for Sense 5 4.2.2

hi
so one of the features I would like to add to a stock deodex 4.2.2 ROM is the advanced reboot feature. I want to do this nativly but I dont know how. can someone point me in the right direction.
thankyou
phonegeekjr said:
hi
so one of the features I would like to add to a stock deodex 4.2.2 ROM is the advanced reboot feature. I want to do this nativly but I dont know how. can someone point me in the right direction.
thankyou
Click to expand...
Click to collapse
use SENSE 5 toolbox in development thread http://forum.xda-developers.com/showthread.php?p=46837064
Or else VIPER XL it pretty much has all the options one can need!
Have tried that and it doesn't seam to work. I am building and testing the Rom and this is a feature I want to include. I use viper when I'm not testing and love it. What do I have to edit to have this feature in my rom
Sent from my HTCONE using xda app-developers app
phonegeekjr said:
Have tried that and it doesn't seam to work. I am building and testing the Rom and this is a feature I want to include. I use viper when I'm not testing and love it. What do I have to edit to have this feature in my rom
Sent from my HTCONE using xda app-developers app
Click to expand...
Click to collapse
Most of the guides that I have found are for non HTC phones. I have a few links for you to check out. From what I have read, they are mostly framework-res.apk and android.policy.jar edits.
I have extracted the classes.dex out of the jar and tried to wade my way through all of the .smali files. It looks as if the GlobalActions.smali points to either GlobalActions3 or GlobalActions4.smali for reboot options.
The guides also point to certain edits which need to be made to the framework-res.apk. Mainly strings.xml. They say to then recompile, then decompile the new framework-res.apk and lookup certain hex values in public.xml.I thought I had it figured out, but then I saw that some of the hex codes were 4xxxxxx hex codes, which points to framework-HTC-res.apk. That's kindof where I got stuck because I could not get that apk to successfully decompile.
Looking at the GlobalActions.smali I saw references to com.HTC.resources, so I kinda knew this was to be expected. I seem to be having trouble getting the necessary framework installed through apktool to successfully decompile.
Additionally, I have taken apart quite a few Roms frameworks (Roms that aren't using Sense 5 toolbox or exposed mods) to try to decipher how they applied the necessary changes, yet they are all so different. Some look to have used arrays, others strings. I know the arrays are probably for multilingual options.
Links coming as soon as I get to my pc.
Click button below for links:
http://forum.xda-developers.com/showthread.php?t=1169443
http://forum.xda-developers.com/showthread.php?t=811532
https://docs.google.com/document/d/11a7ghZpdTcZbeDtneTnEHkHLn5_XQ9k2FDFFh-os-q0/edit
http://forum.xda-developers.com/showthread.php?t=776495
When reading the hex values in the files, the chart below should point you in the right direction:
0x10xxxx is in framework-res.apk
0x20xxxx is in com.htc.resources.apk
0x40xxxx is in framework-htc-res.apk
I too am trying to learn how to do all of this. Please let me know if you figure anything out. It seems to be who you know around here that directly reflects what you know.
Thanks. Do u know of a apk to tool to fix these apps with
Sent from my HTCONE using xda app-developers app
phonegeekjr said:
Thanks. Do u know of a apk to tool to fix these apps with
Sent from my HTCONE using xda app-developers app
Click to expand...
Click to collapse
Not quite sure what you meant here. An .apk to do what exactly?
Also, if I've helped and you want to show appreciate for my comment, just hit the thanks button, instead of thanking me in your posts. I believe that is the recommended way of doing things around here. Check the forum rules for clarification.
http://forum.xda-developers.com/showthread.php?p=30899605
Sent from my HTC One XL using XDA Premium 4 mobile app
Black!Jack said:
Not quite sure what you meant here. An .apk to do what exactly?
Also, if I've helped and you want to show appreciate for my comment, just hit the thanks button, instead of thanking me in your posts. I believe that is the recommended way of doing things around here. Check the forum rules for clarification.
http://forum.xda-developers.com/showthread.php?p=30899605
Sent from my HTC One XL using XDA Premium 4 mobile app
Click to expand...
Click to collapse
I need a tool to decompile and recompile apk
Sent from my HTCONE using xda app-developers app
Zarchiver
Sent from my Evita
timmaaa said:
Zarchiver
Sent from my Evita
Click to expand...
Click to collapse
what about for a linux computer are there any tools I can use with that.
Not sure about on Linux, you should be able to find something via Google. There should also be guides on XDA.
Sent from my Evita
phonegeekjr said:
I need a tool to decompile and recompile apk
Sent from my HTCONE using xda app-developers app
Click to expand...
Click to collapse
Apktool... ApkMultiTool (really just a UI to take command line work out of the equation-not really my style though), Virtuous10 Studios, many more I'm sure I forgot. I have some .bat files for executing necessary commands if your not sure how to use command line.
Sent from my HTC One XL using XDA Premium 4 mobile app
---------- Post added at 05:32 PM ---------- Previous post was at 04:32 PM ----------
timmaaa said:
Zarchiver
Sent from my Evita
Click to expand...
Click to collapse
Not sure that Zarchiver is a tool for Decompiling and Recompiling .apks.
From what I have read about it, it looks more like a File Manager/Archiver.
@ PhoneGeek... for Linux I would have to say that apktool is going to be your best bet. You can find the XDA thread here. And the main page for apktool is here.
Black!Jack said:
Most of the guides that I have found are for non HTC phones. I have a few links for you to check out. From what I have read, they are mostly framework-res.apk and android.policy.jar edits.
I have extracted the classes.dex out of the jar and tried to wade my way through all of the .smali files. It looks as if the GlobalActions.smali points to either GlobalActions3 or GlobalActions4.smali for reboot options.
The guides also point to certain edits which need to be made to the framework-res.apk. Mainly strings.xml. They say to then recompile, then decompile the new framework-res.apk and lookup certain hex values in public.xml.I thought I had it figured out, but then I saw that some of the hex codes were 4xxxxxx hex codes, which points to framework-HTC-res.apk. That's kindof where I got stuck because I could not get that apk to successfully decompile.
Looking at the GlobalActions.smali I saw references to com.HTC.resources, so I kinda knew this was to be expected. I seem to be having trouble getting the necessary framework installed through apktool to successfully decompile.
Additionally, I have taken apart quite a few Roms frameworks (Roms that aren't using Sense 5 toolbox or exposed mods) to try to decipher how they applied the necessary changes, yet they are all so different. Some look to have used arrays, others strings. I know the arrays are probably for multilingual options.
Links coming as soon as I get to my pc.
Click button below for links:
http://forum.xda-developers.com/showthread.php?t=1169443
http://forum.xda-developers.com/showthread.php?t=811532
https://docs.google.com/document/d/11a7ghZpdTcZbeDtneTnEHkHLn5_XQ9k2FDFFh-os-q0/edit
http://forum.xda-developers.com/showthread.php?t=776495
When reading the hex values in the files, the chart below should point you in the right direction:
0x10xxxx is in framework-res.apk
0x20xxxx is in com.htc.resources.apk
0x40xxxx is in framework-htc-res.apk
I too am trying to learn how to do all of this. Please let me know if you figure anything out. It seems to be who you know around here that directly reflects what you know.
Click to expand...
Click to collapse
first link is for samsung. last link is for mod for a sense 4 or sense 4+ rom. the samsung link, is it ok to folow the steps in it. and the mod isnt even for the at&t htc one xl sense 5. will it work
phonegeekjr said:
first link is for samsung. last link is for mod for a sense 4 or sense 4+ rom. the samsung link, is it ok to folow the steps in it. and the mod isnt even for the at&t htc one xl sense 5. will it work
Click to expand...
Click to collapse
That is what I was originally trying to let you know. The one for the HTC MOD is device specific (HTC Desire I believe). I have gone through the .smali files as these guides instructed and noticed a wide variety of variance. If you decide to attempt the instructions per those guides, you do so at your own risk; especially if you have no idea what you are really doing. The Devs around here are labeled that for a reason. Chances are... they really know what they are doing when messing around with files that could deem our phones inoperable.
One bit of advice I will give you before you start messing with the .smali files, is to learn Java, if you don't already, and then head over to the Smali page and read through all of the documentation in their wiki (it will be hard to understand if you don't know Java though). After taking the time to learn these things, when you open up the .smali files you will have a better understanding of what you are actually looking at and how things are structured. For example, when you open one up, you will perhaps see some variance of :
invoke-direct {v0, v1, p0, v2}
Well, what do all of these v's and p's mean - what do they point to?
There are two naming schemes for registers - the normal v naming scheme and the p naming scheme for parameter registers. Confused?
Read the wiki! Confused by the wiki? Learn Java! This is really the best advice that I can give you. By no means am I downing you or questioning your intelligence. I am simply trying to help you by pointing you in the right direction. Spoon-feeding you all of the answers isn't going to help you learn. I am by no means an expert; not even dillusional enough to think that I am- though my wife may disagree!
In addition, when you get to the Smali page, on the Project home tab, there is a link for an IRC chat room and an example of how the entry level "Hello World" app is broken down into .smali.
Hope that I have helped, to at least point you in the right direction. If I have click the Thanks button!
Edit: Here are some links that may be useful in your quest for knowledge of this subject matter:
Modifying .smali files
Convert .smali to .java
Dalvik opcodes
Android opcodes
Bytecode for the Dalvik VM
Another place with useful links
All of these resources were found with the help of my good friend Google, and her red-headed stepchild XDA!
Hi. I have tried yet again to make sense 5 toolbox apm work. Still not. Latest version of framework used. Any ideas
edit: foumd the problem and apm is now working.
Sent from my HTC One XL using xda app-developers app

Categories

Resources