[Q] Translating .apk files - General Questions and Answers

Is there a way to take a particular .apk file, pull out .xml language files, translate the words and put them all back in?

I think you'd need to decompile the APK then let it know the other language files are there (but I'm not 100% sure)
Max. (From my Galaxy 2)

Yep, there is
Decompile the apk
Open up the folder, and then find the file strings.xml - translate all strings in that file - recompile - n u r done

That's obviously assuming it was developed using standard development methods. It's possible that all the string values are hard-coded into the application, in which case you can't do it (easily).

.
Thread moved to Q&A due to it being a question. Would advise you to read forum rules and post in correct section.
Failure to comply with forum rules will result in an infraction and/or ban depending on severity of rule break.

The majority of developers don't code strings into code I could say in Android as the development environment warns you about them. So you can safely say that MOST of the strings that need to be translated are in strings.xml
Before Google Translate API was a paid service I was using a chrome plugin (not sure what it was called. and an eclipse plugin called androlate which creates the string.xml files for you.
But now you can't use any of them.

Related

decompile apk

Hi,
Is there a way how to decompile apks??
Thx
Apk's can be opened using winrar.
they are just zip files.
If its open source, then just grab the source.
If its not then any kind of reverse engenering is illegal (i believe)
depends on what your purpose, if you want to just see the contents, then change the extension to .zip and open it (the for-dummies way) or just open it with 7z (the propper way). If you want to change the actual behavior or properties of the program, then google smali/baksmali. You get low-level decompiled code which you can modify, then re-compile, and add it back to the app.
Before people say anything, I do believe this does belong in development, I mean, if all those cheap-hack job hero roms belong in development, then sure as hell questions like these belong here too.
Start asking your questions in the right sub-forum (Q&A) (Theme) or even in (General), or simply search.......Final result will be a ban for you up too 3 days.
Thanks
Thread Trashed!!

[Q] Get a list of database names in code from android app?

Hello,
I would like to get a list of database names in code. I'm not looking for databases outside my application/package, just those in my /data/data/<my_package>/database folder.
I can easily locate them on the file system and open them using adb and sqlite3,
but I need to dynamically get a list of databases so that I can open and manage them in code.
I currently use a separate database to keep track of database names as they get created/deleted through my application, but I imagine there is a way to get a list of databases directly via SQL query or some sqlite library call.
Can anyone help me with this?
Thanks,
-dj
This should be in the "Android Development" forum.
BTW, I tried to post this question in a more topical "Android Development" forum, but I'm an XDA newb and don't have permissions to post in there.
Maybe these links can help you? I don't do much droid programming anymore and I never worked with databases in droid. Also welcome to XDA
http://www.devx.com/wireless/Article/40842
http://developer.android.com/reference/android/database/sqlite/package-summary.html
solution
The solution turned out to be very simple.
The main application context has a databaseList() function that, conveniently, returns a list of database names associated with the application.
String[] dbList = getApplicationContext().databaseList();
Thanks for the links dbzfanatic. devx looks like a good resource... it's going on my bookmark bar for sure.
Glad I could help and thanks for posting the solution for others who might have the same question. Since it's a string array I'm guessing the function just returns the DB names and not handles to them?
database names
dbzfanatic said:
Glad I could help and thanks for posting the solution for others who might have the same question. Since it's a string array I'm guessing the function just returns the DB names and not handles to them?
Click to expand...
Click to collapse
Correct, just a list of the database names.
I need a few more posts before I'm permitted to post a link, but this is the approximate reference link:
developer.android.com/reference/android/content/Context.html#databaseList()

[REQ] Zenonia 4 Offline

MODS, FEEL FREE TO DELETE THIS THREAD IF IT VIOLATES CERTAIN RULES
I just wanted to know if there are coders/crackers who could modify the apk to make it work offline. I tried removing certain xmls by comparing the korean version with the english version but it still requires network connection.
Here are the links:
Korean (offline) http://www.mediafire.com/?wf2smedzk62j7bn
English http://www.mediafire.com/?h3ft2s7y97x13xi

how to play .pls on Windows phone 7

Can anyone tell me how to play .pls on Windows phone 7 media element
Maybe you get the answer when you clone this thread 10 times.
Until now you did it only three times.
http://forum.xda-developers.com/showthread.php?t=1852573
http://forum.xda-developers.com/showthread.php?t=1852581
http://forum.xda-developers.com/showthread.php?t=1854194
Try several times more. But first - go read forum rules - especially the chapter about creating new threads.
I've closed all your similar repetitive threads. Please read the XDA ruls before posting: http://forum.xda-developers.com/showthread.php?t=726334
This thread remains open for getting your answer.
Moved to related forum.
WP7 doesn't natively understand the format, of course, so you'd need an app that could process it. The app would have to parse the playlist files, acquire the actual media files, and then play the media files (such as through a MediaElement) one at a time in the order specified by the playlist(s). None of this should be too hard.
Now, if you want to be able to open a .PLS file directly on WP7 - that is, from an email attachment or a download link on a webpage or something like that - you'll need to be able to set file associations. This is possible, but requires at least interop-unlock on your phone or root-unlock on your app. You need to add an entry under HKEY_CLASSES_ROOT for .PLS, with the default value specifying something like "plsplaylist", and then create HKCR\plsplaylist, give it a registry value called EditFlags of 0x00010000, and create additional registry keys HKCR\plsplaylist\shell\open\command with a default value of your app's launch URI (app://{APP_PRODUCT_ID_HERE}/_default?pls=%s). To understand that, your app would need to have a check in its OnNavigatedTo event that examines the parameters of the navigation for the key "pls" and loads the file represented by its value.

[Q] strange .xml files

Hey,
I am trying to get a transparant navigationbar with the help of the following tutorial( on cm 10.1):
http://forum.xda-developers.com/showthread.php?t=2361902
Now I am at the part where I need to edit the .xml files. But when I open them in notepad++ it only shows some characters and a lot of null teksts.
a screenshot can be seen in the attachment. Does anybody know how to solve this?
thanks in advance!
You need to unpack the apk using apktool, rather than 7zip, for getting access to the xml files.
-----
Tips for a pleasant XDA:
Search before asking. Someone has likely already asked.
Spell your words completely, and use punctuation. It confuses people when you use "u" and "ur" and "dat", or when you wrongly use "there/their/they're/your/you're".
Be nice. Don't be rude, just move on to another post without leaving a comment. We are not 7 years old.
And PLEASE, do not ask for the "best" anything. We all have our preferences.
spycedtx said:
You need to unpack the apk using apktool, rather than 7zip, for getting access to the xml files.
-----
Tips for a pleasant XDA:
Search before asking. Someone has likely already asked.
Spell your words completely, and use punctuation. It confuses people when you use "u" and "ur" and "dat", or when you wrongly use "there/their/they're/your/you're".
Be nice. Don't be rude, just move on to another post without leaving a comment. We are not 7 years old.
And PLEASE, do not ask for the "best" anything. We all have our preferences.
Click to expand...
Click to collapse
it is working now, thanks

Categories

Resources