Recompiling with additional resources and activities - Android Software/Hacking General [Developers Only]

Hello All,
I have an application that I want to add some features to in the form of an additional activity. I have decompiled it with APK tool and attempted to add my own smali files (from the decompiled 2nd app that I developed). I immediately run into problems with the dependencies of my app being different than those of the original app. For example, my app uses the google Easy Permissions lib to ask for permissions. What is the right strategy to help de-conflict the res/values/*.xml files between two apps that both have their own resources? Are there any tools that can assist in this? What about layout and drawable resources?
I started writing a python script to merge public.xml and the others, re-map the ID's for those resources, and then search the smali files to change the values there. That seems error-prone, and I am not even sure if that is the right thing to do.
I had a second thought that perhaps aapt2 compilation of resources could perhaps be modified to give me a different package ID for the app I created and control source to (such as 0x80... instea of 0x7f...) but I am not sure exactly how to go about that, or if that would even work either
Any advice or tools I should be looking at?

Related

Need some .Java asssistance [for Tab+]

This can be moved to development if needed.
^prob some Android exp needed as well, but if you're here reading this I assume you have some.^
I am interested in adding an extended power menu, among other things (CRT anim ON if possible, and maybe a few other small ones.)
(yes Im looking at you guys @garyd and @Entropy, j/k you guys work hard enough Im sure.)
While I am reading my intro to Java Programming. I understand Basic programming, Java is what I need to learn. I am also studying .dex in hopes of one day being able to at least edit it.
If anyone would like to help , I have managed to decompile .dex into .jar and from .jar got all the .classes, etc. and then decompiled to .java, which is so much more readable than .smali. ( as it should be)
I have followed the few guides I could find for extended power menu, trying a few different things as I understand all devices are different. flashed and booted, but power button does nothing.
From what I understand it is actually possible to compile .java to .smali to .dex
from what I can gather this involes adding a mReboot:I options to reboot or reboot recovery. Then adding the array to the power menu, then adding the drawable ids and string ids (which I know how to make with apktool).
I saw one thread stating an entry in build.prop ro.mot.deep.sleep.enabled=true was also required.
PM me or reply if interested. I can upload .java files.
--just trying to get some fresh "development options going"
my next book will liekly be the : 6-in-1 building an android app, which I have done with the google App Inventor. It was fun.
*small donation can be made*

.java/.smali help (small donation)

This can be moved to development if needed.
^prob some Android exp needed as well, but if you're here reading this I assume you have some.^
I am interested in adding an extended power menu, among other things (CRT anim ON if possible, and maybe a few other small ones.)
While I am reading my intro to Java Programming. I understand Basic programming, Java is what I need to learn. I am also studying .dex in hopes of one day being able to at least edit it.
If anyone would like to help , I have managed to decompile .dex into .jar and from .jar got all the .classes, etc. and then decompiled to .java, which is so much more readable than .smali. ( as it should be)
I have followed the few guides I could find for extended power menu, trying a few different things as I understand all devices are different. flashed and booted, but power button does nothing.
From what I understand it is actually possible to compile .java to .smali to .dex
from what I can gather this involes adding a mReboot:I options to reboot or reboot recovery. Then adding the array to the power menu, then adding the drawable ids and string ids (which I know how to make with apktool).
I saw one thread stating an entry in build.prop ro.mot.deep.sleep.enabled=true was also required.
PM me or reply if interested. I can upload .java files.
--just trying to get some fresh "development options going"
my next book will liekly be the : 6-in-1 building an android app, which I have done with the google App Inventor. It was fun.
*small donation can be made*

[Q] To which language does the following code belong to ?

Hey Guys,
Recently I was planning to learn to code android apps, so I decompiled an app I wanted to modify & was going through the source code. All of the .smali files were un-encrypted. I would like to know if this code is Objective-C or Java.
I tried to add the code snippets & also tried to pastie it but apparently the posts doesn't seem to accept foreign links so I'll try to post it in the comments.
File Names: h, h$a
Also, I wanted to know what do these file names represent & what does the "dollar" sign stand for in the file names.
Thanks in Advance,
Netguy
Update: I tried posting it via comments but it wasn't possible. Let me know how can I share the code over here. Thanks.
Smali is disassembled Dalvik virtual machine byte code.
The source of it is Java, although you can't easily reconstruct the original source.
MyClass.smali is the class file for MyClass
MyClass$SubClass.smali is the class file for the nested subclass SubClass
MyClass$1.smali is the class file for an anonymous nested subclass.
ab.smali and ab$bd.smali are obfuscated file names.
Some companies rename everything using automatic tools to hide the intent.
Yes, you can write in smali if you like.
Usually such use is limited to small changes in an existing program.
Thanks a lot for the information Renate NST. While digging through some of the smali files, I found some URLs related to the google ads. So will changing the URL to something else disable the ads or will it just result in malfunctioning of the app ? Thanks a lot once again.

APK Browser (similar to PE/PE+ or ELF Browser)

Hi All,
I am having a horrific time using APKTOOLS. I've tried both Brut.all's 1.4.3, and ibotpeaches's 1.4.10. Brut.all (1.4.3) produces incorrect line numbers, and ibotpeaches (1.4.10) simply crashes. After a decompile/debug instrument/recompile/sign/align cycle, I cannot set breakpoints on the re-engineered APK. I wrote a program to fix line numbers from Brut.all's APKTOOL, but I still cannot set/submit breakpoints.
Is there an APK browser available so I can look at the APK in detail, including the debug information structures? In particular, I'm looking for something to display information on debug_info_item from the DEX format (http://source.android.com/tech/dalvik/dex-format.html).
I would like something similar to PEBrowse (http://www.smidgeonsoft.prohosting.com/pebrowse-pro-file-viewer.html) so that I can confirm/verify the APK with a separate tool. Note: I am aware of APKInspector (https://code.google.com/p/apkinspector/), but it uses APKTOOL.
Jeff

how to against apk-tool&modify apktool,protect my app?

code.google.com/p/android-apktool/wiki/KnownIssues
The author' wrote:
Some APKs won't decompile
I've found that some APKs don't conform to regular Android standards. They were probably built using a modified aapt, which makes decompiling near impossible. These APKs are called "Magic" apks and probably won't be supported.
can i protect my app?
I'm interseted in " modified aapt",but i have no idea about it,who can help me?
thank you
thinkinbunny said:
code.google.com/p/android-apktool/wiki/KnownIssues
The author' wrote:
Some APKs won't decompile
I've found that some APKs don't conform to regular Android standards. They were probably built using a modified aapt, which makes decompiling near impossible. These APKs are called "Magic" apks and probably won't be supported.
can i protect my app?
I'm interseted in " modified aapt",but i have no idea about it,who can help me?
thank you
Click to expand...
Click to collapse
You can try 'Anti Decompiler(Android)Trial' on google play .
https://play.google.com/store/apps/details?id=com.tth.AntilDecompilerTrial
*** Main function of 'Anti decomplier (Android) Trial' App:
- Obfuscate class names, function names, filed names, files name in your source code(Proguard doesn't support to change file names) to make them harder to read.
- Add fake code to your source code. The decompiler tools will get a lot of errors when trying to reverse your original code from the exported apk files.
...+Note Trial: ' Add fake code' is not available on Trial version ---​- Hide all const values (string, character)
...+ Note Trial: ' Hide const values' is not available on Trial version ---​
Isn't proguard/dexguard not what your are searching for?

Categories

Resources