Language Resources File - Android General

Please bear with me. I'm new to Android. But I'm a seasoned java developer. I have inherited a project with zero documentation that I'm trying to figure out. All of the text strings are retrieved from PreferenceManager and SharedPreferences. I put some debug statements in the method that retrieves the strings, and it is indeed finding a long JSON string with labels and values. But I cannot find the source for that. There is one strings.xml file in the res folder. But the strings.xml file is almost empty, and does not contain the labels/strings the app uses. I've grep'd the entire project (I believe) and I can't find any file with all of the labels/strings defined. I've done a clean rebuild, and this string is being built from somewhere. But no clue where it's finding it.
Can someone please help me? Where is the source file for this?
Thanks.
Jerry

Related

Disable auto-import in eclipse?

I'm trying to compile the open source Replica Island project and I notice that there are errors in the source. I see lines of code such as
setContentView(R.layout.main);
that give an error saying that R.layout.main cannot be resolved. So I look up at my import statements and see that it's importing android.R. Well there's the problem, that import statement is pointing to the wrong place. R.layout.main is in the general res folder structure, so the import is unnecessary. So I comment the import out and save the file...
and Eclipse "helpfully" puts the import statement back automagically.
I've been looking around in the panels to find where you can turn this setting off but have no luck so far. Where do you find the setting?

.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.

Building an APK, could use a few pointers please?

If this is in the wrong section please delete/move. This seems the best fit to me. At any rate, Ive been using http://developer.android.com/training/basics/firstapp/building-ui.html to learn how to build an apk, but I havent found anything that shows how to import your own images and such. Id like to import my own background as apposed to the one provided by default. Any help is greatly appreicated!
Try this,
In the layout tag in the xml file, add this
android:background="@drawable/image">
and put the image.jpg or any other format in the drawable folder.
returns the error
[2012-08-26 23:46:09 - V.I.C.T.O.R.Y. TOOLS] /home/sniper_5/workspace/V.I.C.T.O.R.Y. TOOLS/res/layout/activity_victorytool.xml:1: error: Error: No resource found that matches the given name (at 'background' with value '@drawable-xhdpi/Background1').

How to hard code a url and port number into existing android application APKTOOL

I am attempting to learn more about SMALI and reverse engineering android apks. I am using apktool to decompile the application. I am working with an app that allows you to enter the url and port thru an input box, but my question is, How do I hard code the server URL in so I dont need to type it in the input box? Can I create a string name called "host" in strings.xml and somehow point to that string in another file? Also if that does work, or not, is it possible to remove the actual input box from the application thru smali?? If I can add "host" to strings.xml, what other files needs to point to that string xml? I am n00b, but curious about modifying smali, but I cant find much info related to smali in a way I can understand. Also, i read about creating an android sql database file and entering in the url and port there and adding it into assets, but how would I point to the database so the app uses my server url and port I put in the database file and skip the input box where user types in url and port???

Categories

Resources