Skip to main content

How to translate Android system files into Khmer

Stage 1: If you haven’t read about Stage 1 on how to add Khmer Language support to Android OS yet click here
(it contains links to download all required tools to translate apk)
Nokorsoft.com

Stage 2.a how to translate an apk file.

2.b Translate Android System files into Khmer

Translate android system file and android app are pretty much the same. The differences are:
- You need to put frameworks-res.apk in the apk folder, in order to make it decompiles properly.
- There is a strict instructions that must be followed in order to replace the kernel system files, otherwise, you would brick your phone.



Concept:
  1. Use apktool to decompile the android system files.
  2. modify the resources in res folders
  3. recompile them back.
  4. replace resources.arsc and other xml and images resources with the  modified one using winrar make you sure save in zip format and “store” as compression method.
  5. when replace the modified files system/framework or system/app with modified files. make sure you set the permission to all 777.
Understanding MIUI android system files and its functions (credit: MarkHUK)
in /system/app
AccountAndSyncSettings.apk (Account manager for sync contacts, pictures e.g. Google (Gmail))
AntiSpam.apk (phone filter, block unwanted number, you don’t like, delete it)
Backup.apk (MIUI Backup utility including Cloud backup and automatic backup, don’t want it, just delete it)
Contacts.apk (MIUI Contacts app)
ContactsProvider.apk (Provider for Contacts, background app)
CloudService.apk (MIUI User account management apk)
DefaultContainerService.apk (service for contact list, must keep)
DownloadProviderUi.apk (Used for Download management UI)
FileExplorer.apk (MIUI File manager)
Gallery.apk (MIUI Gallery app)
Launcher2.apk (MIUI Launcher)
MediaProvider.apk (media provider service, must keep)
MiuiCamera.apk (MIUI Camera)
MiuiMusic.apk (MIUI Music player)
Mms.apk (MIUI SMS / MMS app)
Monitor.apk (System application monitoring and firewall app)
Notes.apk (MIUI / Xiaomi notes app)
PackageInstaller.apk (apk installer service)
Phone.apk (MIUI Phone app)
Settings.apk (Common system settings)
SettingsProvider.apk (Background provider for settings app)
SideKick.apk (Search app in MIUI for global searching)
Superuser.apk (MIUI Customised superuser for application permissions management)
SoundRecorder.apk (MIUI Sound recording app)
SystemUI.apk (System user interface for status bar and toggle interactions etc)
TelephonyProvider.apk (Used for number lookup in framework etc)
TelocationProvider.apk (Used for GPS tracking)
ThemeManager.apk (mtz Theme manager from MIUI)
Torch.apk (CM Torch app customised by MIUI)
UserDictionaryProvider.apk (must keep)
in /system/framework
Frameworks-res.apk (contains icon files, lockscreen message, date time settings….)
The red colour apk files are hard core kernel files, it is a bit tricky when you replace it.
To translate non hard core kernel system file stock app, you can use the same method as translating a normal apk, example: FileExplorer, MiuiMusic, Torch,
But when you install it, you need to use RootAppDelete to delete the stock app

  1. Click  on SysApp button, disable the apk (example, deskclock.apk)
  2. play with your phone, if it stable, then to go Recycler of RootAppDelete to uninstall it
  3. install the translated apk file (signed-deskclock.apk) to replace it.

2.b.1 Translate Framworks-res.apk


Let’s work on the frameworks-res.apk
step 1: extract your Apktool to c:\apktool (note: I use the original apktool, not the ICS one)
step 2: extract frameworks-res.apk from your phone located in /system/frameworks/ using Root Explorer to copy it to your sdcard, and  transfer the file on to your desktop.
step 3: copy the frameworks-res.apk from your desktop to the same folder as apktool which is c:\apktool in this example. (now you should have 2 copies of frameworks-res.apk, one on your desktop and one in c:\apktool folder)
step 4: go to command prompt (run command prompt, if you don’t know just google it ), and type following commands (as shown in the photo above)
cd c:\apktool
apktool if frameworks-res.apk
apktool d framworks-res.apk
At this point, don’t close the command prompt windows.  Go to c:\apktool you will see framework-res folder.
Now you can start translating files in res folder of the framework-res. (Please refer to  Stage 2.a on how to translate an apk file)
…………
………….
Ok, now I assume that you have completed the translation. So, let’s rebuild the frameworks-res using the command below.
apktool b frameworks-res
Once it’s done. you find framework-res.apk in C:\apktool\framework-res\dist folder
Let’s resources into the original framework-res.apk
The main different between translating an apk and a kernel system file is that you can re-sign the apk, it will brick your phone. To solve this problem you need to transfer the translated resources into the orignal system file (in here, frameworks-res.apk).

Step 1:
- open the modified framework-res.apk in C:\apktool\framework-res\dist folder with winrar
- extract resources.arsc  or other resources that you modified such images from the drawable-hdpi onto desktop folder. 
Step 2:
- Open the original frameworks-res.apk that you first saved on desktop  with winrar.
- drag the modified resources.arsc that you just extracted from the modified frameworks-res.apk to replace the original resources.arsc in the original frameworks-res.apk on the desktop. make you sure save in zip format and “store” as compression method
- replace other original xml and images resources with the  modified xml and images files one using the same method as replacing resource.arsc
Step 3: make you sure save in zip format and “store” as compression method.
Step 4: install copy the frameworks-res.apk from your desktop to your phone.
WARNING!: Make sure you backup your phone first. 
This is the tricky bit.
1. First, you need to copy it into /system/ folder of your phone first. (don’t skip this step)
2. Then, change the permission to 777. Refer to below image.  (user, group, other, all read, write, execute). That’s the only permission that works for me.

3. restart your phone. If everything goes well, you can boot into you home screen. otherwise. you just bricked your phone, and need to restore it from backup. and try it again. :)

Desktop\framework-res.apk\res\xml\


Pretty much the same step as translating frameworks-res.apk
  1. copy settings.apk from phone to desktop. And make another copy from desktop to c:\apktool\, make you that you have frameworks-res.apk in the same folder as well.
  2. run command prompt:
       cd c:\apktool
       apktool if frameworks-res.apk
       apktool d settings.apk
Note: you see the problem in the image about. This is because the miui_logo.9.png is corrupted, make sure you delete it from drawable-en-hdpi and drawable-hdpi of the res folder.
       3.  find the settings folder in c:\apktool\ and start translating the resources in settings folder.
Note: there is one problem in here. Due to the problem of miui_logo.9.png file, you won’t be about to click on “About Phone” in the settings page, it will crash your phone. To fix that issue, you can remove “About Phone” from the settings page. It is located in C:\apktool\settings\res\xml\settings.xml

4 now, rebuild the settings.apk using command prompt:
apktool b settings
If you got errors, it means that you haven’t deleted the miui_logo.9.png in the drawable-hdpi and drawable-en-hdpi.
Now, you should have a modified settings.apk in C:\apktool\settings\dist
The same as frameworks-res.apk
  1. exract resources.arsc and the xml (settings.xml) from the modified settings.apk.
  2. replace resource.arsc
  3. replace settings.xml in your original settings.apk\res\xml with the modified one.
  4. copy it to /system/ on your phone, change permission, then copy to /system/app (this one doesn’t need 777 permission, just user: read write, group: read, others: read)
  5. restart your phone.
    ប្រភព
    Nokorsoft.com

Comments

Popular posts from this blog

វិធីសាស្រ្ត Unlock bootloader របស់ Motorola

ធ្លាប់បានលឺច្រើនមកហើយអំពីវិធីសាស្រ្ត Unlock bootloader ផ្សេងៗដូចជា  SONY ,  HTC , Nexus ជាដើម តែអ្វីដែលយើងមិនធ្លាប់ដឹងនិង សាកល្បងគឺពពួក Motorola តែម្តង។ វិធីសាស្រ្តផ្សេងៗត្រូវបានអនុវត្តហើយ វាផ្តល់នូវលក្ខណៈងាយស្រួលផ្សេងៗគ្នាដើម្បីឲ្យយើងមានសិទ្ធកាន់តែច្រើនទៅលើការប្រើប្រាស់ទូរស័ព្ទទំនើបរបស់យើង។ ថ្ងៃនេះខ្ញុំសូមណែនាំពីវិធី unlock bootloader របស់ពពួកMotorola វិញម្តងដែលម៉ាកមួយនេះ ហាក់ដូច ជាមិនសូវពេញនិយមក្នុងទីផ្សារយើងសោះ។ តែយ៉ាងណាក្តីក៏ខ្ញុំព្យាយាមប្រមូលរាល់ពត៌មានទូរស័ព្ទដែលមានទាំងអស់មកដាក់ក្នុងនេះផងដែរ។ ចំពោះជំហ៊ាននៃការប្រតិបត្តិមានដូចខាងក្រោម៖ ទាញយក  fastboot ទាញយក  driver តម្លើង driver ពន្លា fastboot ប្រើប្រស់  terminal  របស់ Windows ដើម្បីចូលទៅទីតាំង fastboot. exe បើកទូរស័ព្ទចូលទៅ fastboot ដោយចុច Power+ vol  Down ហើយដោតខ្សែ  USB  ទាំងព្រម វាឃ្លាខាងក្រោម $ fastboot oem get_unlock_data បន្ទាប់មកវានឹងបញ្ហានូវទិន្ន័យដូចគំរូខាងក្រោម $ fastboot oem get_unlock_data (bootloader) 0A40040192024205#4C4D3556313230 (bootloader) 30373731363031303332323239#BD00 (bootloader) 8A672BA474

how to install khmer on Sony Ericsson X8

 ខ្ញុំ​បានអាន​នូវឯកសារ​របស់​សមាជិកមម្នាក់ក្នុងក្រុម CAUG (Cambodia Android User Group) ស្តីអំពីការ តំលើង ភាសារដែល​អាច​មើល​បាន​ត្រឹម​ត្រូវ ដាក់ចូល​ទៅក្នុង​ទូរស័ព្ទ Xperia X8 របស់​ក្រុមហ៊ុន​សូនី។ សូមមើលជំហ៊ាននៃការធ្វើតាមលំដាប់ដូច​ខាងក្រោម

Orkida English-Khmer Dictionary

ថ្ងៃ​នេះ​សុំ លើក​យក​វត្ថុ​បូរាណ​ ប៉ុន្តែ​ពេញ​និយម ដែល​ត្រូវ​បាន​ដំឡើង​ស្ទើគ្រប់​កុំព្យូទ័រ​បង​ប្អូន​ខ្មែរ​យើងគឺ វចនានុក្រម Orkida English<->Khmer ។ សង្ឃឹម​ថា​ម្ចាស់​បង្កើតវចនា​នុក្រម​នេះ មិន​យល់​ទាស់​អី​ទេ ដែល​ខ្ញុំ​ដាក់​អោយ​គេ​ទាញ​យក​ជាសាធារណះ​ដូច្នេះ ព្រោះ​ថា​វា​កម្មវិធី​ដែល​បង្កើត​ឡើង​តាំង​ពីឆ្នាំ ១៩៩៨មក​ម្ល៉េះ ម្យ៉ាង​វិញ​ទៀតបង​ប្អូន​យើង​បាន​ចម្លង​ពីមួយ​ទៅ​មួយស្ទើរ​គ្រប់​កុំព្យូទ័រ​ ទៅ​ហើយ។ ដោយ​ឡែក​ពេល​ខ្ញុំ​សាកល្បង​ស្វែង​រក​ក្នុង Google អំពី​វចនា​នុក្រម​នេះ ហាក់​ដូច​ជា​ស្ងាត់​ឈឹង​ មិនសូវ​មាន​កន្លែង​ Download សោះ ! ដូច្នេះ​ដើម្បី​អោយ​ការ​ស្វែង​រកក្នុង​អ៊ិនធឺណិត​ទាក់​ទង​នឹង​ស្រុក​ខ្មែរ​ យើងកាន់​តែមាន​​ប្រសិទ្ធភាព ខ្ញុំ​សម្រេច​ចិត្ត​ Upload វា​ចូល​ក្នុង Hosting របស់​ខ្ញុំ​ ហើយ​ចែក​អោយ​បងប្អូន​ដែល​ត្រូវ​ការ​វា​ យក​ទៅ​ប្រើ​ប្រាស់​ចុះ។ ថ្វីត្បិត​តែ​វា​រាង​ចំណាស់​បន្តិច​មែន តែ​រហូត​មក​ដល់​ Windows 7 ហើយ​ វា​នៅ​តែ​អាច​ដំឡើង​និង​ប្រើ​បាន​ជា​ធម្មតា។ ទាញ​យកវចនានុក្រម​ Orkida By : Sam Vichea