Tutorial MIUI DEVELOPERS TRANSLATION GUIDE (V1.0) MUCH TO ADD!


MarkHUK

Founder/Server Admin xiaomi.eu
Staff member
Nov 6, 2010
5,248
1,000,000
Thank you very much

i also use the latest aapt.exe (805kb)
and i forgot in the last post: i have no errors by decompile and compile

I read in a tutorial to use 1.4.2 for decompile and 1.4.3 for recompile...
Please post the compile output when you build framework-res.apk and framework-miui-res.apk please
 

BurgerZ

Members
Mar 17, 2012
35
18
you dont need all that command line for 7za, just do:

7za a -tzip -mx0 File.apk resources.arsc

DO NOT Call it new_resources.arsc! this is wrong.
Mark, I know. I wrote this name just to understand that it's your newly created resources.arsc.
BTW, how to deodex Backup, Contacts, ThemeManager and SoundRecorder? What bootclasspath do you use for them? You can write me by email (if you want) - az.burgerz@gmail.com. Thanks
 

MarkHUK

Founder/Server Admin xiaomi.eu
Staff member
Nov 6, 2010
5,248
1,000,000
Mark, I know. I wrote this name just to understand that it's your newly created resources.arsc.
BTW, how to deodex Backup, Contacts, ThemeManager and SoundRecorder? What bootclasspath do you use for them? You can write me by email (if you want) - az.burgerz@gmail.com. Thanks

I force deodex them with Kitchen deodexer :)

I dont convolute the whole process....

1. apktool d File.apk
2. Add my resources e.g. values-en and drawables-en-hdpi
3. apktool b File.apk
4. cd File.apk/build/apk
5. 7za a -tzip -mx0 ../../File.apk resources.arsc

Simple as that.
 

MarkHUK

Founder/Server Admin xiaomi.eu
Staff member
Nov 6, 2010
5,248
1,000,000
PS:

Code:
Disassembling Backup.odex ...
java -Xmx512m -jar baksmali.jar -a 15 -d ../framework -c :am.jar:android.policy.jar:android.test.runner.jar:apache-xml.jar:bmgr.jar:bouncycastle.jar:browsermanagement.jar:bu.jar:cneapiclient.jar:com.android.location.provider.jar:com.google.android.maps.jar:com.google.android.media.effects.jar:com.google.widevine.software.drm.jar:com.qualcomm.location.vzw_library.jar:com.quicinc.cne.jar:core.jar:core-junit.jar:ext.jar:filterfw.jar:framework.jar:ime.jar:input.jar:javax.obex.jar:miui-framework.jar:modemwarmup.jar:monkey.jar:pm.jar:services.jar:svc.jar -x Backup.odex
Assembling into classes.dex ...
java -Xmx512m -jar smali.jar -a 15 -o classes.dex out
Found Backup.apk
Removing Backup.odex ...
Put classes.dex into Backup.apk ...
Backup.apk has been deodexed
 

DaLuigi3

Members
Apr 29, 2012
37
18
ok, here is my compiling output:

C:\MiuiTranslator>java -jar apktool-1.4.3.jar b "APK_Dekompiliert\framework-miui-res"
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...

C:\MiuiTranslator>

ps in my scripts i used -mx0 but yesterday i packed it without the script.. so i think i forgot to change from compress to store... i will test it again..

edit: no luck that was not the problem
 

DaLuigi3

Members
Apr 29, 2012
37
18
so I've tried again after this tutorial:
http://htcfanboys.com/download/1982Strand/files/MIUI Stuff/Translations/Tools and guides/ICS_GUIDE.txt

also only with apktool 1.4.3 (install framework, decompile and recompile)
- without compression
- with the original .27 framework-miui-res.apk without modifications!!!!

maybe its important: i am using a windows 7 64bit computer, android sdk installed(using aapt.exe from this)
and my phone is a samsung galaxy s2 i9100

i have no ideas more:(

edit: i used com.htc.resources.apk (22,9mb) but now i found another com.htc.resources.apk with 28,7mb. So which one should i use or which one you are using?
 

MarkHUK

Founder/Server Admin xiaomi.eu
Staff member
Nov 6, 2010
5,248
1,000,000
SGS2 doesnt use com.htc.resources.apk you need to use the other framework that comes in the samsung rom. in place of the com.htc one.
 
  • Like
Reactions: DaLuigi3

BurgerZ

Members
Mar 17, 2012
35
18
SGS2 has twframework-res.apk, which is id2 framework like com.htc.resources.apk.
Huawei phones use framework-res-hwext.apk ad id2 framework.
 
  • Like
Reactions: DaLuigi3

BurgerZ

Members
Mar 17, 2012
35
18
Mark, after deodexing procedure Camera.apk crashes on GNEX phone in video mode. Any ideas?
 

MarkHUK

Founder/Server Admin xiaomi.eu
Staff member
Nov 6, 2010
5,248
1,000,000
so I've tried again after this tutorial:
http://htcfanboys.com/download/1982Strand/files/MIUI Stuff/Translations/Tools and guides/ICS_GUIDE.txt

also only with apktool 1.4.3 (install framework, decompile and recompile)
- without compression
- with the original .27 framework-miui-res.apk without modifications!!!!

maybe its important: i am using a windows 7 64bit computer, android sdk installed(using aapt.exe from this)
and my phone is a samsung galaxy s2 i9100

i have no ideas more:(

edit: i used com.htc.resources.apk (22,9mb) but now i found another com.htc.resources.apk with 28,7mb. So which one should i use or which one you are using?

apktool if twframework-res.apk

and follow same steps as we've told you. Bootloop will disappear :)

Cheers,
Mark
 
  • Like
Reactions: DaLuigi3

MarkHUK

Founder/Server Admin xiaomi.eu
Staff member
Nov 6, 2010
5,248
1,000,000
Aha.. Your ROMs have Camera.apk deodexed (with FC on video mode). So I just wonder how to resolve this bug. Will try to do it myself(
ive not had time due ot personal issues
 

DaLuigi3

Members
Apr 29, 2012
37
18
apktool if twframework-res.apk

and follow same steps as we've told you. Bootloop will disappear :)

Cheers,
Mark

i tried it with twframework from miui rom and wih the one from the stock lp8 samsung rom but i also get this fu*** bootloop
 

DaLuigi3

Members
Apr 29, 2012
37
18
i want to translate the framework-miui-res.apk. but at the moment i only will decompile and recompile it without modification and without this bootloop...
 

BurgerZ

Members
Mar 17, 2012
35
18
i want to translate the framework-miui-res.apk. but at the moment i only will decompile and recompile it without modification and without this bootloop...
OK. I can translate your ROM for you. If I succeed I can help you with all your troubles (advises, tools, whatever). Just give me the link to your translation files (SGS2 as I understand).
 
  • Like
Reactions: DaLuigi3

MarkHUK

Founder/Server Admin xiaomi.eu
Staff member
Nov 6, 2010
5,248
1,000,000
OK. I can translate your ROM for you. If I succeed I can help you with all your troubles (advises, tools, whatever). Just give me the link to your translation files (SGS2 as I understand).
That does not help him Learn!

You are clearly missing a step out somewhere or you've messed a string up or similar, get a logcat of the boot so we can see it!
 
  • Like
Reactions: DaLuigi3

DaLuigi3

Members
Apr 29, 2012
37
18
yes, i will try and learn it because i will translate it in the future without help:) but i think if he get it work he maybe can help me better...
 

MarkHUK

Founder/Server Admin xiaomi.eu
Staff member
Nov 6, 2010
5,248
1,000,000
yes, i will try and learn it because i will translate it in the future without help:) but i think if he get it work he maybe can help me better...
the information provided is sufficient but you are evidently doing something very wrong in the process.
 

DaLuigi3

Members
Apr 29, 2012
37
18
the information provided is sufficient but you are evidently doing something very wrong in the process.

hmm i am doing it like the tutorial i posted and you said to me.

@BurgerZ:

your resources.arsc is bigger than the original one. my builded resources.arsc has the same size as the original one, i will test it now...

edit:

bootloop:( does it work for you?
 

BurgerZ

Members
Mar 17, 2012
35
18
hmm i am doing it like the tutorial i posted and you said to me.

@BurgerZ:

your resources.arsc is bigger than the original one. my builded resources.arsc has the same size as the original one, i will test it now...

edit:

bootloop:( does it work for you?
For me? No, I don't have SGS2. And my resources.arsc is bigger than the original one coz I added your files (translation) and new resources.arsc includes all old resources and your resources
 
  • Like
Reactions: DaLuigi3

Similar threads