[GUIDE] Creating a localized SGH-T959V ROM - Samsung Galaxy S (4G Model)

Hi everyone
I was getting some queries from Arabic, Vietnamese, Portuguese, Turkish and other languages speakers who wish to have their own loacalized SGH-T959V ROM.
So, here is what we did on HebrewValhalla ROM (Gingerbread BML) :
1. We took Valhalla Final as a basic ROM to be translated.
2. We found an SGS i9000 ROM already localized to the language we want.
3. We decompiled all Valhalla Final necessary APKs to be translated.
4. We decompiled all SGS i9000 necessary APKs to take their translations.
5. We recompiled all Valhalla Final APKs with the the new translations.
6. Pushed one APK at a time with language locality selected. verified and moved on. Finally did it for framework-res and chose language.
7. Minor adjustments, packing and publication.
Explanations :
1. First decide what is your ROM to be translated. download it and save it on a PC.
2. Find and download an SGS i9000 localized ROM. If there isn't such you're in trouble.
3. Download APKTOOL read this. Define the base ROM framework according to instructions and decompile all necessary APKs. save them all locally.
4. In a separate folder use another instance of APKTOOL and define the SGS i9000 ROM framework and decompile the corresponding APKs.
5. Find out what is your language 2 chars lang code (English=EN, Hebrew=IW).
Take out all the APKs Resource\values-XX and layout-XX and place them in the destination ROM corresponding APKs resources. for example :
SGSi9000ROM\APKTOOL\Projects\Camera\Resources\Values-XX should be copied to
ValFnl\APKTOOL\Projects\Camera\Resources\Values-XX
Compile all these APKs (take them from "modded apk") and remove the "signed" from the filenames.
6. Install a locality app like "MoreLocale2" with your selected or manually added language (for Hebrew it was IW, Hebrew) and check your APKs translations.
Once you finish compiling framework-res (and push it to framework folder - preferably through flashable zip or ADB) it will have your language inside and you could uninstall the locality app and choose it in the settings.
This will give you full framework UI support.
7.Take all files and put them in the original ROM location.
A) list of needed APKs on BML ROMs can be found here :
Need to take translations to
system apps:
AccountAndSyncSettings
Browser
Contacts
JobManager
MediaProvider
PackageInstaller
PhoneSetupWizard
SamsungApps
SamsungAppsUNA
SamsungWidget_ProgramMonitor
Settings
SnsAccount
SystemUI
TouchWizCalculator
TSMParts
TW4Launcher
Phone
Camera
TouchWiz30Launcher
TouchWizCalendar
Mms
framework:
framework-res.apk
Working directly from SGSi9000
system apps :
Talk
Street
ClockPackage
Music
Gallery3D
MusicPlayer
VideoPlayer
VoiceRecorder
MyFiles
AxT9IME
CallSetting
DialerTabActivity
Email
Gmail
Memo
B) Most of APKs are in system\app but for full UI you also need to handle the Framework\framework-res.apk
C) If you want to add tweaks and stuff : study how to make recovery flashables - search the web and examine tweaks and bootanimations and how their commands are written.
Now you can install your localized ROM.
Good luck!
(P.S - it took us 2 people about 10 days to release the first version).

Right to left languages (Arabic, Hebrew...) will additionally require RTL tweak - read this
You may need to also copy the fonts from SGS i9000 ROM.

Great
Oh great, man...I'm very pleased helping you with vietnamese yay (just tell me what to do ...and thanx for including Vietnamese :x

I just did...
Please follow instructions very carefully, ask me if you don't understand anything and do it yourself according to the GUIDE.

okay, I'll try my best to start something the next two week (have to finish the next exam week @@)...thanx for your guil...oooh and btw, can you give me any basic links as google is very wide that I don't know where to start with build.prop or framework lines...

You're running too fast. Work according to this with a lot of trial and error and then carry on by searching the xda forums. 99.99% of your questions were probably already asked and answered.
Sent from my SGH-T959V using XDA

By the way, even if there is no SGS i9000 ROM for your lanhuage you can still create the translated strings XMLs, it will just take you much much longer. Probably will need to spread the work with other teammates.
Sent from my SGH-T959V using xda premium

Hi Guys
This method is good for translating ICS ROMs as well.
I use it for HebMIUI.
The only thing changed is the version of APKtool to use and the system and framework apps to translate - this is a post I just sent Mataflikas :
Hi Amigo
To be able to translate Erik's MIUI ROM to Spanish,
What you need to do is go to miuiandroid site and download the SGS i9000 Spanish MIUI ROM.
Than download Erik's ROM. Download APKmanager/ APKtool for ICS and aapt ver. 1.5.0 and place aapt in the 'other' folder of apktool in your pc.
Now you need to copy framework-res.apk & framework-miui-res.apk from the Spanish ROM to the 'other' folder. Register both framework files by running in command line '..\other\apktool if framework-res.apk'
& '\other\apktool if framework-miui-res.apk'. Copy all system\app APKs as well as both framework files to the 'files to be modified' folder.
run the apktool batch script.
Decompile all the apks by selecting (option 22) & decompiling (9) one at a time.
Now go to each apk project folder (located in the projects folder) and enter the 'res' (resources) folder. I assume 'es' is the shortcut for Spanish locale - verigy that!
You need to take all the 'values-es', 'layout-es', 'raw-es' etc. These are the Spanish translations. Now repeat this for all the apks. Make a saparated apktool folder for Erik's ROM, register his own frameworks and decompile the same apks there. When you're done, throw every apk translation to the 'res' folder of the same app in Erik's ROM. When done, run script on Erik's and select (22) and compile (11) is this a system app? Choose YES, let me delete only changed data? Choose YES. Then it will make a 'keep' folder, go there and delete 'resources.arsc' file. Press any key and you have a new file 'unsignedAPKNAME' in the 'files to be modified' folder. Done with all apks you can replace them in the ROM zip and try to flash it. If framework-miui-res.apk is not valid you will enter a bootloop so leave it for the end. I didn't even recompile it on HebMIUI. Last things - you can change default locale & region in system\build.prop and change your gps location by changing the system\etc\gps.conf to the one of your country (google it). Good luck and let me know if you have a question.
And If you want to publish your result - talk to Erik first !
sent from me

The complete detailed guide for enabling Hebrew and RTL on CM7/CM9/AOKP based ROMs

Related

Apk Manager 4.9 - Makes Modifying Ur Apk A Breeze (Windows/Linux)

So i have written a simple script to ease the process of editing apks. Got a lot of downloads so thought its in demand
Whether you're doing basic image editing or editing the smali or xml files, on average u have to use (Brut.all or JF's smali/baksmali) awesome tool to extract the apk, edit it, then sign the apk and then adb push/install it. This process is quite tiresome if you are testing a method that needs fine tweaking.
This script should make the process a LOT smoother.
Theres an option of compiling/signing/installing all in one step
Thanks:
Goes to Brut.all for his awesome tool.
Goes to JF for ofcourse, smali/baksmali
Goes to farmatito for porting this script to linux
Features:
- Extract, Zip apk's.
- Optimize pngs (ignores .9.pngs)
- Zipalign apks
- Sign apks
- Push to specific location on phone
- Incorporates brut.all's apktool
- Pull apk from phone into modding environment.
- Batch optimize apk (Zipalign,optipng,or both)
- Quick sign an apk (Batch mode supported)
- Batch Ogg optimization
- Compression level selector (monitor status above menu)
- Batch install apk from script (option 16)
- Logging on/off has been removed. Instead a log.txt is created which logs the activities of the script organized using time/date headers
- User can change the max java heap size (only use if certain large apks get stuck when decompiling/compiling apks) (Option 19)
- Improved syntax of questions/answers
- Error detection. Checks if error occured anytime u perform a task, and reports it
- Read log (Option 20)
- U can now set this script as ur default application for apks. When u do, if u double click any apk it will install it for u.
- Supports batch installation, so if u drag multiple apks into the script (not while its running) it will install them all for u. U can ofcourse drag a single apk as well
- Added framework dependent decompiling (For non propietary rom apks). (Option 10). Checks whether the dependee apk u selected is correct.
- Allows multiple projects to be modified, switch to and from.
- Allows to modify system apk's using apktool but ensures maximum compatibility in terms of signature / manifest.xml
- Stuff i forgot i guess
Instructions (Windows):
- Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
- Run script
- Minimize the script
- Edit files inside the project folder
- Maximize the script
Instructions (Linux):
- Place apk in appropriate folder (Any filename will work, if running for first time folders will not be there, you must run and then the folders will be created)
- Open terminal and change-directory to apkmanager (Easiest way is to type "cd ")
- Chmod 755 Script.sh
- Chmod 755 all files apps inside other folder (thanks for the tip bkmo )
- Run script by typing ./Script.sh
- Minimize the script
- Edit files inside the out folder
- Maximize the script
Requirements:
Java
Adb
Future Improvements:
- Manage multiple simultaneous apk edits (choose which apk to extract/build)
- Option to optimize the apks
- Option to adb push to user defined location
- Other stuff i dont know yet
Got problems ?
1. Make sure your path has no spaces
2. Your filename has no wierd characters
3. Java/adb are in your path
4. It's not a proprietary rom's apk (aka Sense,Motorola,Samsung) (If u are, then use option 11 and drag the required framework, eg com.htc.resources, twframework-res...etc)
5. It's not a themed apk (if it is, expect .9 png errors, use as close to stock as possible)
6. Look at the log to know whats happening
7. If all else fails, post as much info as possible and we will try to assist you.
MOD EDIT:
New DL link from this post
http://apkmultitool.com
Nice
As you probably know, I want to add signing and installing functionality to apktool. But I don't plan to make any kind of GUI for it, so such wrapper is a very good thing for many users, thanks
What is "Option to optimize the apks"?
I was thinking of incorporating the script "apkopt" it was basically using optipng to optimize the png's and then used zip align on the apks. Thanks btw, this tool wudnt exist without ur awesome script
I just did this so ppl would stop asking questions like "How do i change this/that in an app"
Here this is wht im talking about Link
Very nice
Thanks dude...
once again you manage to make modding easier with your scripts!
Does your apkopt avoid .9.png files? Because those have been a pain in the behind.
Re: Apk Manager 1.0 - Makes Modifying Ur Apk A Breeze
my script currently does not optimize apks. it will be in the upcoming updates and yea prolly when ill implement itll avoid .9.pngs lol
I have already incorporated "adb push" into the script.
Aside from adding an option to optimize the apks, is there anything else you guys think would make this script easier to use ?
Im really targetting those ppl who overcomplicate the simple process of editing apks. Any tips would be appreciated.
I posted a video attached to the main post.
New version out, features added are
Zipalign apks
Optimize pngs, ignores .9.pngs
allows to adb push to phone through script.
Great script man, it works flawlessly. You may just wanna edit your post #1 rather than continuously bumping with new posts for every update. I'm sure a mod won't be too pleased with that
I'm getting the
'java' is not recognized as an internal or external command, operable program or batch file​message when I attempt to sign an apk. I tried switching the PATH in Environment Variables so that it's pointing to my Java bin folder, but then I just end up with
java.io.FileNotFoundException: ..\place-apk-here\repackaged-unsigned.apk <The system cannot find the file specified>
at java.util.zip.ZipFile.open<Native Method>
at java.util.zip.ZipFile.<init><Unknown Source>
at java.util.zip.ZipFile.<init><Unknown Source>
at java.util.zip.ZipFile.<init><Unknown Source>
at com.android.signapk.SignApk.main<SignApk.java:320>
Could Not Find C:\ApkManager2.0\place-apk-here\../place-apk-here/repackaged-unsigned.apk​Help? :]
What app are you trying to edit ? also are you editing pngs only or code editing ?
Hop on Here im helping someone out so ill help u 2
There's a lot of things in /system that benefit from the optimized .pngs. Vending.apk, for instance, shrunk to half the size and runs a bit quicker and smoother now. Even framework-res.apk enjoyed the optimization. Paid apps, on the other hand, don't seem to fare so well; perhaps they check the md5sum of the app or something.
Yea png optimization works for almost all apks, zipalign on the other hand as i recall doesnt work on certain system apks such as settings.apk. Im prolly gonna incorporate apkopt's script into this which would allow to optimize a folder full of apks. As for paid apps not being optimized, a lot of dev already do their part on making the apk as small as possible, so perhaps thats the case.
hmm, after trying a couple of unpaid apps, it seems that perhaps the testkeys aren't compatible with my build. For any signed app, I get an error "Failure [INSTALL_FAILED_UPDATE_INCOMPATIBLE]"
Yes when u modify a non system apk, they need to be resigned, and you cannot resign it with same key as dev cuz u dont know it hence anytime u modify an app, u must uninstall it, install the modded version, and from then on any change u make u dont have to uninstall as the keys will match
ahhh thanks. My mistake was just removing the package rather than uninstalling it.
Getting this on a zipalign. The file is there but it is repackaged-unsigned.apk and throws this error:
Please make your decision: 5
Unable to open 'E:\ApkManager\place-apk-here\repackaged-signed.apk' as zip archi
ve
Could Not Find E:\ApkManager\place-apk-here\repackaged-signed.apk
The system cannot find the file specified.
Nevermind....looks like it is by design that it tries both signed and unsigned and throws the error on the file that does not exist. It's just I did not see any zipalign output
having an issue that when I go to resign an apk the file deletes after running the script.. am I missing something here?

[MOD] Theme updater for Windows/Linux

Hi everyone,
Imagine that you are updating two or more themes for roms like OpenDesire/Defrost/CyanogenMod (I'm pretty sure that this updater works for every AOSP rom but I didn't try), that in one week can be updated at least 4 times. Don't get me wrong, the updates are appreciated, but updating all the themes for all the new versions gets old in no time.
So, I made myself two scripts, one that runs on Windows (this is the first one so is no so updated, but if I see that people use this I'll be willing to create a C# version) and another for linux (bash script), that do this work for me.
This scripts, decompile, copy the modded file (for the status battery), compile the framework again and then add the new images to the framework. After all that it generates the update.zip file for each mod so they can be flash using the recovery (Clockworkmod/Amon Ra/even the default recovery).
Windows Version 1.0
Linux Version 1.0
In the second post, I'll put instructions explaining how to configure the scripts.
Credits :
Brut.all for APKTool.
Daneshm90 for the APKManager (It give me the basic knowledge to create the first versions of the scripts).
Instructions :
Windows.-
If you want to update more than one mod at the same time, you need to edit the script.bat file and modify the "start:" seccion like this :
Code:
:Start
if "%jumpmod%"=="0" set mod=MOD1
if "%jumpmod%"=="1" set mod=MOD2
if "%jumpmod%"=="2" set mod=MOD3
if "%jumpmod%"=="3" set mod=MOD4
if "%jumpmod%"=="4" goto end
set jump=0
goto Create
In order for this to work you need to put the original framework-res.apk in the folder "original"
The mod files have to be in MOD/Images (images you add) and MOD/Xml (xml to recompile). Right now the script is only prepare to recompile the xml for the status battery.
If you add more than one mod, the folders name must be the same as in the start seccion (MOD1, MOD2, MOD3...)
You must have installed Java JRE
Once you configure the script, run it, wait for it to be done. Then go to the result folder and you will find the update.zip file/s.
Linux.-
If you want to update more than one mod at the same time, you need to add as much folders as mods you want in the mods folder. The new folders must have the same structure as the default one.
The mod folders contains one folder to put the images to add after the framework have been recompile (MODNAME/add/drawable-hdpi) and one folder for the file that are used to make the mod (MODNAME/mod/drawable for the XML and MODNAME/mod/drawable-hdpi for the necessary images).
In order for this to work you need to put the original framework-res.apk in the folder "original" or you can download the original Rom by using the script (it extracts the framework-res.apk from /system/framework/).
YOU MUST configure the variables within the script.sh to set the initial path of the script and the path to copy the resulting update.zip files.
In order for this to work you must be ROOT (This is because the apktool, if anyone have a workaround please let me know)
You must copy the following files to /usr/local/sbin/ for this to work :
Code:
/theme_updater/other/7za
/theme_updater/other/aapt
You must have installed openjdk
Windows.-
Version 1.0 - Initial release
Linux.-
Version 1.0 - Initial release
thanks Zeussn, it worked like a charm when i was using it yesterday

APK-Fire - tool to add language from 1 rom's apk files to an other

Hi,
After flashing a custom rom I noticed that rom didn't have my language, so I wanted to add it to this custom rom.
After a great and long journey and thx to the info found on this forum I managed to add the language I wanted.
During the journey I started to write a small tool to make the whole process a bit less painful. The tool has been growing from as simple batch decomiple - recompile apk tool to 1 that adds the value folders and do the resources.arsc switch thing.
This is my 1ste release and is still a beta version so still has some errors, stuff to be added and bad code. But still I hope some of you can use it.
If you got any questions just post or pm
Greetings
Installing the tool.
Just extract all files to your root folder and run the ignite script as root. That's it.
There is a help option that guide you step by step.
EDIT: Small adjustment in the language lists and added the Custom_language_list option
EDIT: Like I said tool is still in beta stage, it seems that yesterday in my hurry to get it ready I screwed up big time (like command to make a cp without telling where to copy to) anyway already beta version 1.1 is out now
UPDATE: 1ste real release out now.
Killed some more bugs
Updated the help page
Added some layout editing
Added or updated the log handeling
how can i insert pt language on last jaggyrom for htc explorer ?
I would appreciate if u created a 'How To' for Super Noobs like me ...
a windows version
If there is a windows version,it will be more appreciated.
bascro said:
I would appreciate if u created a 'How To' for Super Noobs like me ...
Click to expand...
Click to collapse
There is a help function in the tool that guide through most of the steps from the moment you got your hands on tha apk files.
So now the question is how to get those apk files.
Well I like to use Android-Kitchen to unpack rom's, and you'll need that tool anyway to add the new apk files to the rom.
1. Decompile the rom containing the language you want. (Can be stock-rom, your original rom, other custom,...)
2. Copy all the apk files from the systeml/app folder to the stock_APK.
3.Copy the framework-res.apk and com.htc.resources.apk from the system/framework folder to flare/framework and the stock_APK folders
The rest of the how you'll find when you start APK-Fire and use option 'h'
Note: Not all of the apk file will decompile without errors, those that give errors (like market, street, superuser,...) you don't realy need to add language so just delete those apk's from the stock_APK and the decompiled_APK folders.
pedrofidalgo said:
how can i insert pt language on last jaggyrom for htc explorer ?
Click to expand...
Click to collapse
To add portugees you can choose to add all the languages from the South_West_Europe list.
or
you put pt and pt-rPT (each on a diff line) to the Custom_language_list.
then follow the steps you'll find in help option.
picodaren said:
If there is a windows version,it will be more appreciated.
Click to expand...
Click to collapse
There is a windows version called APK Edit
Only prob here is that you have to open the apk that has the wanted language, copy those folders, open the apk from the rom where you want to add the language to and repeat this process for all the apk files 1 by 1.
If you take this road plz let me know how long it took yah
i have jaggy rom. and a backup of my stock rom in Portuguese. can i install pt language on jaggy rom ?
Need a little help .. : p
pedrofidalgo said:
i have jaggy rom. and a backup of my stock rom in Portuguese. can i install pt language on jaggy rom ?
Need a little help .. : p
Click to expand...
Click to collapse
sure you can.
Step trough:
1 Set-up Android-kitchen
2 Decompile your stock rom
3 copy the content of the system/apk folder to the APK-Fire/stock_APK
4 copy the 2 apk files from system/framework to APK-Fire/stock_APK AND APK-Fire/flare/framework
5 Start APK-Fire and install the frameworks (option 1)
6 Decompile the apk files (option 2)
7 Add the language code to the Custom_language_list each language code get's it's own line. (you find this file in the APK-Fire/lighter folder) for portugees you add something like this:
pt
pt-rPT
8 Get the value folders containing the portugees language (option 4)
9 Now you can choose to back up the stock_apk and the decompiled_apk folders (option 6 / 1) or delete the content of those 2 folders.
10 Got back to the kitchen and decompile the Jaggyrom and repeat the steps 2 till 6 as before.
11 Now copy the value folders you took from the stock rom to the jaggyrom (option 5)
12 Recompile the apk files (option 3)
(check log for errors, warnings you could ignore but errors need attention, be aware that non stock apps mostly will give errors but those also don't need additional language)
13 Do the resources.arsc switch thing to fool the signature security (option 6)
(for more info what this is all about read the switch_resources script)
14 Copy your upgraded apk files from the APK-Fire/firebox/translated_APK folder to the Android-kitchen/WORKING_****/system/app (don't forget to copy the 2 framework apk files to the Android-kitchen/WORKING_****/system/framework folder and not the app folder)
15 Cook your rom
16 Flash the rom
17 Hold your fingers crossed while booting
18 Hopely enjoy the costum rom in your desired language.
Hope this helps you.
Cosmoon said:
sure you can.
Step trough:
1 Set-up Android-kitchen
2 Decompile your stock rom
3 copy the content of the system/apk folder to the APK-Fire/stock_APK
4 copy the 2 apk files from system/framework to APK-Fire/stock_APK AND APK-Fire/flare/framework
5 Start APK-Fire and install the frameworks (option 1)
6 Decompile the apk files (option 2)
7 Add the language code to the Custom_language_list each language code get's it's own line. (you find this file in the APK-Fire/lighter folder) for portugees you add something like this:
pt
pt-rPT
8 Get the value folders containing the portugees language (option 4)
9 Now you can choose to back up the stock_apk and the decompiled_apk folders (option 6 / 1) or delete the content of those 2 folders.
10 Got back to the kitchen and decompile the Jaggyrom and repeat the steps 2 till 6 as before.
11 Now copy the value folders you took from the stock rom to the jaggyrom (option 5)
12 Recompile the apk files (option 3)
(check log for errors, warnings you could ignore but errors need attention, be aware that non stock apps mostly will give errors but those also don't need additional language)
13 Do the resources.arsc switch thing to fool the signature security (option 6)
(for more info what this is all about read the switch_resources script)
14 Copy your upgraded apk files from the APK-Fire/firebox/translated_APK folder to the Android-kitchen/WORKING_****/system/app (don't forget to copy the 2 framework apk files to the Android-kitchen/WORKING_****/system/framework folder and not the app folder)
15 Cook your rom
16 Flash the rom
17 Hold your fingers crossed while booting
18 Hopely enjoy the costum rom in your desired language.
Hope this helps you.
Click to expand...
Click to collapse
i dont know how to do it :/
if i give you my backup can you add pt language for the last jaggyrom ?
cumps
really??
I've already robbed the experience from you of wandering through the jungle of this mystic entity called Android by making the wandering seem nothing more then a walk through the park.
And now you tell me you don't want to know this mystic entity?
Nah I don't buy that, you almost got me there.
I'm willing to guide you through every step but I refuse to carry you.
If you'r on IRC or msn or I can meet you there to start your journey.
Btw at the current rate Jaggyjags is spitting out rom's I can't keep up adding stuff for everyone so I go by the rule:
You translate 1 version of a rom for a man and you made him happy till the release of the next version. You teach a man how to translate a rom and you made him happy for many versions
pedrofidalgo said:
i dont know how to do it :/
if i give you my backup can you add pt language for the last jaggyrom ?
cumps
Click to expand...
Click to collapse
seriously, I know you like your phone and want get the best out of it but your maximum effort is installing .zip roms or .zip updates?
you've got 2 options.
1. Stick with whatever you have right now: your Portuguese backup or any available custom rom.
2. research, research again, try things out and learn. Try to stop asking people to do things for you. It's difficult, I know, specially when you are used to it, but don´t worry, it always is.
Believe me, it is a really nice feeling when you get things done on your own.
good luck
Would you teach us HOT TO DO IT MANUALLY (without using APK Fire)
pmeler said:
Would you teach us HOT TO DO IT MANUALLY (without using APK Fire)
Click to expand...
Click to collapse
Well.... all right then
I've explained most of how to add language already, k most of it in close relation with the use of APK-Fire. Anyway I'll try to explain the whole process starting from the base rom till the modified one.
Step 1
Check if your (custom) rom really really doesn't have your language. Try also 'morelocal' app. This simple step can save you lot's of time
Step 2
Now that you't sure that the (custom) rom doesn't have your language or you just want to add more languages to the rom you build your self you have to go and look for roms that do have the language(s) your want to add.
Possible finding places:
- different versions of the leaked stock rom
- Others people custom rom's
- Rom's for other devices. ! Won't work for the 2 framework apk files, but has good chances to work with the other apk files !
Step 3
Question now probably is how can I find out what languages a rom contains (specialy those for other devices). Well easy, you just have to dismantle the rom's and to be sure a few apk files.
The easyest way to dismantle a rom is to use Android-Kitchen. This tool doesn't need alot of installing or modification but I do recommend you read the how to etc.
So now you have easy access to all the content files of the rom.
Take a few apk files from the system/app folder and dismantle them with 'Apk Tool' or if you realy want to go hardcore 'aapt'. And check the 'app-name'/res for 'values-*' folders that you need.
Step 4
Now that you've found the folders containing the translation (those values-* folders) you've got to copy them to to 'app-name'/res of the afk file from the rom you want to add language to.
dismantled app from copy value folders dismantled app from
rom with language -----------------> rom without language
Step 5
recompile the dismantled app where you just added the value folders to
Step 6
You thought you where allmost done didn't you??? Now the real fun part just starts.
In order to bypass the security that check for the integity of the apk file we need to cheat abit.
You need the new apk file and the original apk (the one without the language)
*rename the 'app-name'.apk file (from both version) to 'app-name'.zip
*delete the resources.arsc file from the original 'app-name'.apk (now temporaly 'app-name'.zip)
*take that same file from the new apk file and copy it to the original apk
* rename the original back from 'app-name'.zip to 'app-name'.apk
* Copy that apk file back into the rom (Android-Kitchen remember)
Step7
Now you repeat this proces for ALL apk files you find in the rom.
Yup all +100 apk files from 1 rom + the same +100 apk files from the other rom need to get this treatment.
Step 8
Cook rom
So you see 8 simple step is more or less what it takes.
Same tutorial but better here
Even more resources here and here
Updated the tool
Cosmoon said:
Updated the tool
Click to expand...
Click to collapse
It doesn't seem to do the last step for me. The one that is supposed to copy the resources.arsc. It just creates another copy of the stock, without the new resources.arsc.
Any idea of what's going on? Would be a flavor to not have to do this manually!
Hmm I fully tested the latest update with the 2 rframework apk files and everything worked fine.
Are you sure that it's just a copy of the stock apk folder?
The switch_resources script does all the final steps. renaming, delete file from stock, copy from new to stock and rename back.
As I still have to add loggin to this part you should see an output on screen showing what the script is/was doing.
While that part is running you should see a folder called 'temp' (inside firebox or 1 of the subfolders of firebox).
Inside the firebox/recompiled_APK you should find a folder for each app containing the resources.arsc file.
And as last check you can compair the size of the 3 diff apk files. (stock, recompiled and translated). If I'm not mistaken the translated is the smallest (how strange it may sound)
Also make sure the tool is in your root folder.
If possible send me the output you get during this fase.
Cosmoon said:
Hmm I fully tested the latest update with the 2 rframework apk files and everything worked fine.
Are you sure that it's just a copy of the stock apk folder?
The switch_resources script does all the final steps. renaming, delete file from stock, copy from new to stock and rename back.
As I still have to add loggin to this part you should see an output on screen showing what the script is/was doing.
While that part is running you should see a folder called 'temp' (inside firebox or 1 of the subfolders of firebox).
Inside the firebox/recompiled_APK you should find a folder for each app containing the resources.arsc file.
And as last check you can compair the size of the 3 diff apk files. (stock, recompiled and translated). If I'm not mistaken the translated is the smallest (how strange it may sound)
Also make sure the tool is in your root folder.
If possible send me the output you get during this fase.
Click to expand...
Click to collapse
They are identical, not even smaller so Although i was running this in cygwin on windows so it might be that. I'll try to boot it up in ubuntu to see if it's any difference Could be the su that's messing with me in cygwin :S
leolulz said:
They are identical, not even smaller so Although i was running this in cygwin on windows so it might be that. I'll try to boot it up in ubuntu to see if it's any difference Could be the su that's messing with me in cygwin :S
Click to expand...
Click to collapse
Never tried it on windows with cygwin, I'm running a debian linux, so that could be the thing that's messing it up.
Still good to know that only that part doesn't work on windows, I'll see if I can modify the script.
THANK YOU Cosmoon !
I asked because I want to remove unsued language from framework-res.apk to make it slimmer
Cosmoon said:
Never tried it on windows with cygwin, I'm running a debian linux, so that could be the thing that's messing it up.
Still good to know that only that part doesn't work on windows, I'll see if I can modify the script.
Click to expand...
Click to collapse
Ye, but it could work although, i never checked the su/root stuff, kinda rushed it yesterday to see how it worked Anyways it's a nice script and ill love to see this project getting further
pmeler said:
THANK YOU Cosmoon !
I asked because I want to remove unsued language from framework-res.apk to make it slimmer
Click to expand...
Click to collapse
Hmm never thought about that. Only thinking of adding stuff but having a option to remove can be handy to.
I'll add it in the next update.
Thx great idea man

[Q] Can't translate my ICS ROM

Hi there,
I decompiled all apk from the system/app/ folder of the original .zip of the ICS ROM I want to translate (MIUIv4 RD), I added in each of decomplation directory the correct values-*lang*/ folder, I recompliled everything (without any error, using a bit mooded version of apktool (else it fails)), I flashed every apk to my phone, but the new language won't appear in MIUI ICS menu. Is there any more file to edit so that it can use new languages values ?
Thanks for help. If it succeed, I promise I will upload my files .
Cheers,
KennyG9

What am I doing wrong with framework-res.apk?

So
I just want to play with translations for fun. I wanted to create somekind of pirate language.
So what I did.
I took framework-res.apk from ROM
Decompiled it using a apktool.
Copied string.xml from value folder to the values-nl folder
Translated some strings
Compiled folder
Signed apk (tried also without signing)
And I put apk to the ROM
And here comes a bootloop

Categories

Resources