[Q] language files - Galaxy Note GT-N7000 Q&A, Help & Troubleshooting

I'm using a custom rom,and now that stock rom for my region is published,I want to extract language files (system and dictionaries+keyboards and fonts) from stock rom and inject them to the custom rom that I'm using,so any help is appreciated to find which files do I need to extract from stock rom.

Theoretically, however, reminds you that the app I am not alone but also the framework apk etc. .. must pay attention.. Help to get into a rom, and can for example extract the launcher or gps.conf or apk predefinit of the Rom and then copy them to root through esplorer in our folder system / app . -1.extract the file from system.rfs -2 and install magic iso and go to open the rfs .. app folder you will find the system app .. conf files in the etc etc for gps. APKTool is able to reverse engineer the binaries of Android applications. With it you can de-compile and get an apk files that make up the apk.
Beware though that being a compiled language java bytecode, executable in the case of the Android Dalvik machine, do not get the files. Class with the java code readable plaintext file but. Smali containing assembly code of the virtual machine (assembler / disassmbler smali) . Will be easier to understand and modify resource files in the directory / res, usually they are xml files and png images that you can modify and then recompile the apk...download Apk tool here: http://www.androidlab.it/wp-content/plugins/download-monitor/download.php?id=13 .. 1. Unpack the zip file you just downloaded and APKTool.zip command prompt / shell posizioniamoci within the directory APKtool 2. execute the following command:
apktool framework-if res.apk
we get the result back edge
I: Framework installed to: C: \ Users \ username \ apktool \ framework \ 1.apk. 3. Now we copy the apk in the same folder that we want to de-compile and impart the following command
apk apktool d-name-it-de-compilare.apk
upon completion of the directory APKtool find a folder with the same name of the app that we have de-populated.
We can now go take a look at the file and change where we see fit. 4. To translate the application should modify the files in / res / values-en, if the folder is not present we should create and copy into a folder other values-xx files arrays.xml strings.xml and then edit translating the texts into Italian. 5. after making the changes we should rebuild our apk with the following
apktool b-name-from-complete apk
in the directory with the same name of the app that we previously de-compiled find two new folders
dist / build / ..--- 6. in the / dist find our apk, remember that the resulting file has no signature, to sign our package we can use this. sign or unsign” i file Apk download here: http://goo.gl/9aWVM

not so understandable , but thx anyways.which files do I need to extract for samsung keyboard (AxT9IME) to work??

Re ad this guide: http://forum.xda-developers.com/showthread.php?t=1511730
---------- Post added at 07:30 PM ---------- Previous post was at 07:02 PM ----------
Try this method- Make a backup of the applications that you want to move , the phone will put the apk 'in the path sd>backups>apps, from here you take them and bring them in another rom...

amir_s_m said:
not so understandable , but thx anyways.which files do I need to extract for samsung keyboard (AxT9IME) to work??
Click to expand...
Click to collapse
my question exists!!

Related

framwork-res.apk modifying

Hi,
i'am searching for a guide how to manipulate correctly the framework-res.apk.
All ways i have tested fails.
I would modify some symbols in Notification bar (battery 1%) but all Time the my Phone run into bootloop or all Application Crashes after Startup.
I've tryed Apk Manager 4.9 / and Manualy with apktool.
Help plz .....
what i did :
1-extract apk (i use 7zip/WinRAR)
2-edit/replace image file(s)
3-repack with zero compression level ('store' level)
4-sign the apk
5-replace file using apk or create flashable recovery zip.
regards.
signing the framework-res.apk will not work.. will make the device go into bootloop
what you need is extract the framework-res.apk using apktool and edit the things you want and then compile it again using apktool .... now open the original framework-res.apk and replace the file resources.arsc with the edited compiled one..
this way you will retain the signature of the original framework-res.apk
PapaDocta said:
signing the framework-res.apk will not work.. will make the device go into bootloop
what you need is extract the framework-res.apk using apktool and edit the things you want and then compile it again using apktool .... now open the original framework-res.apk and replace the file resources.arsc with the edited compiled one..
this way you will retain the signature of the original framework-res.apk
Click to expand...
Click to collapse
But when i add some new Files and Edit some XML the Sign will be Corrupted ?
no it won't...
You need to do two copies.. the original file and the moded one...
1. make a backup of the original file
2. extract the original file using apktool
3. edit and modify anything you like
4. compile the edited file
5. rename the compiled file to framework-res.zip and take the modified resources.arsc
6. using winrar or 7zip open (to view not extract) the backed up framework-res.apk
7. place the moded resources.arsc into the backed up framework-res.apk
by doing this you retain the original signature of the backed up file and not breaking it..
Thx, will test it ;-)
kowalski99 said:
But when i add some new Files and Edit some XML the Sign will be Corrupted ?
Click to expand...
Click to collapse
Android system, signs system apk's on boot, you shouldnt sign them
Sent from my Desire HD using Tapatalk
My signed apk just work well.
AFAIK, we only cant re-sign htc's apk.
PapaDocta said:
signing the framework-res.apk will not work.. will make the device go into bootloop
what you need is extract the framework-res.apk using apktool and edit the things you want and then compile it again using apktool .... now open the original framework-res.apk and replace the file resources.arsc with the edited compiled one..
this way you will retain the signature of the original framework-res.apk
Click to expand...
Click to collapse
The right approach always depends, what you want to change. There is no need to decompile, if you only change a few standard png. If you change xml in values folder like color, styles or arrays, you can certainly not delete resources.arsc - resources have nothing to do with the signature anyway. So if you want to play safe, you should insert the original Meta-Inf (signature) and Android Manifest after compile. It is also recommended to zipalign the final apk in order to reduce RAM usage.
thanks he_stheone64 for the clarification.. i reached that conclusion based on my own research on the net and yeah i used to change the XML files to add language support and that the only way that worked with me..
And be sure to have a working and up-to-date sdk before trying to use apktool...
First, using a old sdk release i got a partially working result (few graphics bugs and strange reboots), then with a badly updated sdk on top off the old i got apktool making many errors. Finally, re-installing the last sdk from start i got apktool and my resulting apk working correctly.

[Q] apktool

how do you install apktool on windows for noobs? i dont understand the instructions on apktools website so i was wondering if you guys could help.
Any help is appreciated.
----edit----
sorry i wasn't more descriptive. so i think i am supposed to download apktool install windows and the apktool file itself. on the apktool download page it says to unpack into windows directory. so im asking, do i download both files and move them to c: windows\ apktool (new folder created). how do i unpack them in the first place. i tried winrar and it gave back errors. Please help.
please? 46 view anyone? im sure some of you have apktool on windows 7
Took me 2 sec to find it.
[UTIL][15.05.11] Apktool v1.4.1 - a tool for reengineering apk files
Don't know if that is what you are looking for or not.
Also here, took the same amount of time to find it.
Apk Manager 4.9 - Makes Modifying Ur Apk A Breeze (Windows/Linux)
BeenAndroidized said:
Took me 2 sec to find it.
[UTIL][15.05.11] Apktool v1.4.1 - a tool for reengineering apk files
Don't know if that is what you are looking for or not.
Click to expand...
Click to collapse
Thanks, but thats not what im looking for. know about that. it doesn't have instructions on the thread of how to install it on the thread. i have it downloaded. both the install windows file and the apktool file. now how do i install them? They are tar.bz2 files which windows can't do anything with so i dont know how to install it. please help
Download the tar extractor.
Here is one http://www.7-zip.org/
http://code.google.com/p/android-apktool/
Requirements
•JRE 1.6 (Java Runtime Environment)
•aapt command in a PATH
•basic knowledge of what is SDK, aapt, PATH, smali and Google search engine may be useful
Installation for noobs
•Windows:
1.Download apktool-install-windows-* file
2.Download apktool-* file
3.Unpack both to your Windows directory
•Linux:
1.Download apktool-install-linux-* file
2.Download apktool-* file
3.Unpack both to /usr/local/bin directory (you must have root permissions)
•Mac OS X:
1.Download apktool-install-macos-* file
2.Download apktool-* file
3.Unpack both to /usr/local/bin directory (you must have root permissions)
Installation of framework files
•See FrameworkFiles
Usage
•Open terminal/command line and type "apktool <enter>". Then you should see usage help.
Discuss it: Google Groups or XDA
ldrifta said:
http://code.google.com/p/android-apktool/
Requirements
•JRE 1.6 (Java Runtime Environment)
•aapt command in a PATH
•basic knowledge of what is SDK, aapt, PATH, smali and Google search engine may be useful
Installation for noobs
•Windows:
1.Download apktool-install-windows-* file
2.Download apktool-* file
3.Unpack both to your Windows directory
•Linux:
1.Download apktool-install-linux-* file
2.Download apktool-* file
3.Unpack both to /usr/local/bin directory (you must have root permissions)
•Mac OS X:
1.Download apktool-install-macos-* file
2.Download apktool-* file
3.Unpack both to /usr/local/bin directory (you must have root permissions)
Installation of framework files
•See FrameworkFiles
Usage
•Open terminal/command line and type "apktool <enter>". Then you should see usage help.
Discuss it: Google Groups or XDA
Click to expand...
Click to collapse
so do i download the files and extract them with 7zip to c:\windows\apktool\?
not sure if you need 7zip. think you can just extract it to rood of C: drive.. the link i put on last post is where i got those directions from... just try it, if it dont work than i will look more into it for you
windows cant do anything with the tar.bz2 files so you need a third party program. i tried extracting with 7zip and winrar but it gives back an error so it doesnt extract.
I think your answer lies here
http://forum.xda-developers.com/showthread.php?t=1466100

[TUTORIAL][updated 11/9] ANDROID .xml(decryption) & .9.png EDITING

I am not a developer myself , i did learn few thing through various search sites & posts (most frustrating way), today wildfire owners are desperately requesting for few tweaks , roms (SFM) etc , to be frank wildfire is loosing its developers(sorry dev's)due to new & improved phones being released in the market which are greater than our's
=================================================================================
CONTENTS:
Post 2 : how to edit .9 images
Post 3 :apk manager method
USEFUL LINKS
1.EVERY NEWBIE MUST READ THIS POST
2.BASIC JAVA , ANDROID JAVA TUT
3.ANDROID KITCHEN (basic)
4.ROM BUILDING GUIDE(bit outdated)
=================================================================================
1.EDIT .9 IMAGES
DESCREPTION:
.9 images are basically PNG images , but are modified to specify a few extra expandable instrustions such as HEIGHT , WIDTH . These images are compiled in draw9patch of sdk & are encrypted via eclipse software
REQUIRED SOFTWARE:
1.WinRar(or any other zip tool)
2.Android sdk manager (draw9patch)
3.eclipse IDE for java developers(download it from www.eclipse.org)
4.image editor(i use paint.net tool)
PROCEDURE:
As an example i am using cm7 nightly & i am editing a .9 image in systemui.apk(theme related file) which is in System>app folder
EDIT : now you can download the attachment or can directly see my example images in post itself
__________Extracting Image__________
1.open the cm7 zip via winrar , navigate to app folder which is in system folder
**cm7nightly 170.zip
2. double click on the systemui.apk & a new window pops up with the contents in the syatemui.apk
**cm7nightly 170.zip>systemui.apk
3.all images are in res folder(common for any app) go to res folder
**cm7nightly 170.zip>systemui.apk>res
4. now you have to keep in mind that all the images used by that particular apk are in RES folder & are kept in sub folders named starting with 'drawable' as
drawable-ldpi,drawable-mdpi,drawable-hdpi,drawable
**cm7nightly 170.zip>systemui.apk>res>drawable-ldpi , ref image step2
5.go to drawable-ldpi and extract those image to any folder in your pc
**c:/vimjam/desktop/myfolder , ref image step3
6. rename that image which you want to edit by removing the .9 in the name(original image name : header.9 edit it to header)
**c:/vimjam/desktop/myfolder/header.png , ref image step4
7.edit that image as you wish & save it in .png file only
**c:/vimjam/desktop/myfolder/header.png
8.now open draw9patch.jar which will be in the following folder x1:/x2/Android\android-sdk\tools\lib (x1 refers to your C drive or D drive or whatever partition where you installed your sdk)(x2 refers to program files folder or program files(x86) in few windows versions)
**c:/program files(x86)/android/android-sdk/tools/lib/draw9patch.jar
9.drag your edited image on the draw9patch window , then it will show as the screen shot given below
**c:/program files(x86)/android/android-sdk/tools/lib/draw9patch.jar , ref image step5
__________.9 Image Editing__________
10.this is the part where you encode .9 script on your image
11.basically what draw9patch does is it gives a black lining at the ends of the image(which are to be specified by us)which are later encrypted as instructions in eclipse software)
12.in draw9patch first tick the show patches option
13.now you have to experiment a little bit to understand this procedure , when you left click at the edges of the image a black spot appears that black spot is the .9 code
**right click on that black spot to erase it
14. for now see the screen shots and do the black lining just as what i did(type 1) (do not use the black line at round edges(only at rectangular edges)(refer type 2 image for more details)**after you've completed the procedure use the lining as done in type2 screenshot provided below , ref image type1
15. save that image with the same name as the original file (see screen shot named savetype)(you can see that the image still contains these black dots , dont worry its natural)
**c:/vimjam/desktop/myfolder/header.9.png , ref image header.9
__________Eclipse Encryption__________
16.this is the part where you complete the encryption using ECLIPSE
17. now open eclipse , click new>project>android>android project , ref image step6
18.a new window opens fill the details (refer my pic named demo)(i use the word demo in the details you can use any other) & click finish , ref image step7
19. now expand the demo project , you can see a couple of things like src , gen... ignore them except res folder , ref image step8
20.expand res folder , drag the .9 patched image(which you edited using draw9patch.jar) in drawable-xxx
(xxx refers to ldpi or hdpi or mdpi )
**NOTE: if your edited image is from drawable-ldpi place it in drawable-ldpi only similarly hdpi to hdpi , mdpi to mdpi only , ref image step8
21. right click on the demo folder project & click on android tools , and then on
EXPORT UNSIGNED APPLICATION PACKAGE.... & save your file
**your saved file will be demo.apk , ref image step8
22.now drag that saved file into any zip file(don use the cm7 nightly zip) or you can create a zip archive of that demo.apk which is generated by eclipse
** compress demo.apk to demo.zip
23. open the demo.zip archive, double click on demo.apk , navigate to res , drawable-ldpi and extract the header.9.png image
24. now open cm7nightly170.zip , navigate to systemui.apk , double click on it , click res,drawable-ldpi & now drag the previous image which you extracted from the demo.zip archive ,then the winrar will ask for confirmation click ok
** cm7nightly170.zip>systemui.apk>res>drawable-ldpi , ref image step9
25.dont close the cm7 nightly zip yet , after you clicked ok the winrar will ask for a save confirmation to save changes in parent folder click yes and close it .done
(this confirmation will be small & will be hidden behing other open windows/applications so check carefully & do not miss this confirmation) , ref image step10
now you can flash that nightly file via recovery,same procedure can be applied to any .9 images of any apk
==========================================
EDIT2: UPDATED IMAGE SCREENSHOTS , PLACED ALL IMAGE EXAMPLES IN ".9 IMAGE EXAMPLES.RAR" FILE
**RAR FILE CONTAINS ALL THE IMAGES WITH LITTLE EXPLANATION IN THE IMAGES ITSELF TO UNDERSTAND THIS PROCEDURE DOWNLOAD THAT RAR FILE(contains no virus its my word)
***EDIT : using apk manager to recomoile a sense apk is causing few errors , although decompiling is working fine
Another easier way is to just decompile the framework using apk manager, and editing the .9 png on photoshop since you can edit the black patches as well and just recompile @kevin2516
you can also use apk manager to decrypt .xml files
here are the links for apk manager 4.9 & 5.0 (detailed method will be published soon)
for version 4.9 http://forum.xda-developers.com/showthread.php?t=695701
for version 5.0 http://forum.xda-developers.com/showthread.php?t=1227179
guys as my suggestion use the apk manager method only to decompile the apk's ,(compiling them is kinda messy)(1 out of 5 times the files ive compiled caused force close so better safe than sorry)
procedure:
1. place the apk you want to edit in the folder named "place apk here for modding"
2.double click script file a cmd opens(if it shows java not found error then watch this video and get it right http://www.youtube.com/watch?v=X05JPrto_c8)
3.type 22 and hit enter
4.enter its the apk file's no which you want to edit
5.type 9 and hit enter
6.it might show some errors ignore them
7.now go to project folder which will be in the same place in apk manager folder
8.now open any .xml file with any text editor (i use notepad++)(you can also edit .9 images this way)
9.do the required changes & save it
10.type 11 if what you are editing is a system apk
11.else use 14
12.if your choice was 11(in cmd) then a the cmd will ask few confirmations(type y for both)
13. a new folder gets created by name keep
14.go to that folder and delete every file that you've changed & if you have edited a .xml file then delete the resources.arsc(else dont)
15.after doing this press any key in cmd done
16.a file by the name unsigned.apk will be created in the place the apk here for modding folder
16.sign that file if it is not a system apk , & replace it in your rom
good going mate... I'm desperately waiting to get over with my CAT exams in November... then I'll give my sole into developing!!!
oh that's great & all the best for your CAT exam , i am planning for CAT in the coming years
Another easier way is to just decompile the framework using apk manager, and editing the .9 png on photoshop since you can edit the black patches as well and just recompile
Sent from somewhere far far away.
kevin2516 said:
Another easier way is to just decompile the framework using apk manager, and editing the .9 png on photoshop since you can edit the black patches as well and just recompile
Sent from somewhere far far away.
Click to expand...
Click to collapse
I don't know how it goes with you, but I have always a bootloop when I do that. Probably because the signature isn't correct.
So perhaps to complement Kevin: after recompiling, you can take your modified files out of your "new" apk and put it in the "old" one, and then flash the "old-new hybrid" apk.
Erwin
ErwinP said:
I don't know how it goes with you, but I have always a bootloop when I do that. Probably because the signature isn't correct.
So perhaps to complement Kevin: after recompiling, you can take your modified files out of your "new" apk and put it in the "old" one, and then flash the "old-new hybrid" apk.
Erwin
Click to expand...
Click to collapse
For the framework-res.apk you don't sign it.
They would work too if the above doesn't.
Sent from somewhere far far away.
pyroblazer said:
good going mate... I'm desperately waiting to get over with my CAT exams in November... then I'll give my sole into developing!!!
Click to expand...
Click to collapse
You are not giving any of the other mgmt exams after that? Just CAT?
/ENd OT
EDIT : NVM
Very , very good job. I searched weeks on this forum and other on how to tweak , or create , or modify a rom , and all i could find was some programs ... but still don't know how to use them.
So this thread is very usefull
currently i'm busy with exams ,will update this thread for more simplicity & will add more images about .9 encryption soon

[INFO]Editing system files (smali,dex,apks)

NOTE: If you want to edit framework-res.apk or systemui.apk, follow this guide, it's the best available:good:
http://forum.xda-developers.com/showthread.php?t=2086771
Now, lets start
smali, dex....whaaat?
It's simple our odexed ROMs have .apk which use .odex files which contain cache. When the ROM is deodexed the .apk contains classes.dex which now contains information present in the .odex files!:good:
Smali is nothing but disassembled .dex file! The .dex file is disassembled into java code which can be edited via Notepad ++( simple notepad works too)
WHY?
Why do you need to edit classes.dex !
For me, i was trying to make CRT on/off animation which required editing classes.dex in service.jar!
More edits where classes.dex inside services.jar is needed
- Changing status bar clock color
- Changing text color in notification bar
- More? Tell Me!:highfive:
HOW?
Requirements: Java SDK!
I have APK Multi Tool, although it decompiles .apk and .dex files inside the apk, it doesn't provide option to decompile a separate classes.dex!
Still it's best software for decompiling apks and more!
Smali-Me 1.0
Download and Instructions:
http://www.wrapcode.com/android/baksmali-smali-dex-files/
ROM Tools by iamareebjamal - More noob friendly
http://forum.xda-developers.com/showthread.php?t=2163286
Once you have decompiled classes.dex, you'll get various folder with various files. Edit the files required and then recompile!
So after generating new classes.dex, put it back to services.jar by opening the file in winzip!:good:
ONE MORE THING
Make your own flashable zip
The recompiled systemui.apk or framework-res.apk, when pushed via root explorer give lot of force closes. This is normal, however if u wish to avoid it u can create a cwm flashable zip for the same!:good:
I'm attaching the sample.zip here and u can add your files in the specified folders. For more details read the source forum:
http://forum.xda-developers.com/showthread.php?t=1721680
Reserved- for more stuff!
Subscribed.. will see what it is later
Hey, add this to your guide, i far more easier and nice to look at too than smali me
http://forum.xda-developers.com/showthread.php?p=40435351#post40435351

[Newbies][Documentation]What's an apk and how does it work

Quick Intro :
Let me answer that question, an apk, first of all, is the format of Android apps, as .exe would be for Windows, apk means Android Package by the way.
But what’s the big deal?
Well an apk contain a lot of things into it.
When you open it as an archive, you might get those files:
AndroidManifest.xml
assets
res
META-INF
resources.arsc
classes.dex
AndroidManifest.xml is the file that contains the information about the app itself: the list of all activities, all permissions, the name of the app’s package, and the software/hardware requirements. To be able to read it, you’ll need to decompile the apk file.
Assets and res folders are meant for resources. Most often, you won’t see the assets folder because its usage is limited, (explanations here). We’ll focus on res since asset isn’t used so often.
META-INF contains CERT.RSA and CERT.SF (certificate) as well as MANIFEST.MF (a manifest)
Those files are the app signature, and META-INF is the folder that contains signature.
The resources.arsc file is the file holding most of the resources that were originally in the res folder. After compiling the code, Android Studio (or others software) compile resources into this file. You won’t be able to open it with an archive explorer. We’ll need to decompile the apk to get the resources back into the res folder.
And, finally, the classes.dex file contains the every smali files of the app. A smali file contains the java code for a specific part of the app. To be able to have the smali files (into the smali folder), you’ll have to baksmali your app.
Hopefully, apktool (a reverse engineering tool) does it for you.
Let’s decompile the apk using apktool (a popular tool used to decompile apps):
Once apktool is installed (see the apktool web page to know how to install), you’ll need to use the command prompt to decompile the apk:
Code:
java -jar apktool.jar d [name of the apk].apk
(I advise to create a folder and to put every file needed in it: the apk, the apktool.jar file, and the apktool script).
You’ll have an out folder, and when you browse it, you’ll have most of the time:
AndroidManifest.xml
original (a folder)
res (a folder)
smali (a folder)
The AndroidManifest.xml that you see here is the translated one.
In the “original” folder rest the META-INF folder and the original AndroidManifest.xml file (untranslated). As you can guess by its name, this folder contains unchanged original files.
The res folder is now full, because every resource from the resources.arsc file are now back into the res folder
Same for the smali folder, this folder contains every piece of code contained into the classes.dex file.
We will now focus on the res folder. Now that it’s complete, we can see those folders (it depends on your apk, but here is the list of the most common ones):
anim (other animation stuff, see the links at the end of the thread)
animator (animation properties)
color (color state list: in which condition this color is used for a particular element)
drawable (can be pictures or xml files, it contains a lot of things)
layout (contains the files that define the layouts of the app)
mipmap (icons for different screen densities)
values (xml files that contains values, that will be referenced in other xml files in other folders)
xml (every other unclassified xml files)
Those folders contain files that will be named following their resource ID.
So how does all of this work together?
Well, the java code written in the smali files will call resources with their IDs. This way, the app will show you the write thing at the right moment, following the code. The layouts are already described in the layout folder. What the code really do is analyzing the action of the end user and calling other resources in consequence.
For example, I’m using the XDA Labs app on my phone. I’m in my phone’s section, and I’m about to click on a thread to open it.
I clicked on the thread, so the code loaded the thread layout with every post in it, and other resources such as the little arrows at the top to jump to the end/beginning of the thread, the reply button, its color, … That’s how to work if I want to keep it simple.
I tried, in this guide, to simplify android app basic for beginners. Feel free to ask any question, I’ll be glad to answer.
If you want to go further into it, you can read a very complete guide about app basics by google (it’s a bit complicated to read, assuming you’re just starting to understand).
Here are the links:
https://developer.android.com/guide
If you have any question about that guide, you can also ask me (with the quote you didn’t understood).
Keep at mind that mastering app basics is really important if you ever want to theme/create an app. So, this guide and the google one is a good place to start.
Have fun reading
Hello Raiz,
I decompiled the apk of an androind app from playstore using dex jar and apktool however I can't find the scripts anywhere in the resulting files. Where should I look? Or is there something more that I have to do? I'm trying to edit something for personal use to make the game more enjoyable. I saw a .unity3D file in there so I presume it was made in unity if this helps.
Good tutorial about concepts of APK file. The details you share are so educational. Thanks for sharing

Categories

Resources