Thanks a lot for the tool. I m gonna give it a try tomorrow while preparing the greek pack for the latest MIUI
Yup, no problem. will cut down more than half of your time spent, lol.
Thanks a lot for the tool. I m gonna give it a try tomorrow while preparing the greek pack for the latest MIUI
Ah sorry too, i was not clear either.
Usually i do values-en or values-zh or drawable-en when i do translation in miui.
Anyways, it should save the changes upon recompile.
During build usable make sure:
Overwrite resources.arsc : (10) = ON
Overwrite classes.dex : (11) = ON
10, mostly handle those edits in values xml files
11, when smali edits are made
EDIT:
Ah shocks wait, i am looking at it, seems like i turned it off by bypassing the script
Hi Xavier,
I've tried your tool but only get this:
"Java was not found, you will not be able to sign apks or use apktool"
Java is installed Java6 on win7x64.
Any idea how to solve this?
On what system does it work fine?
thnx
Hi Xavier,
I've tried your tool but only get this:
"Java was not found, you will not be able to sign apks or use apktool"
Java is installed Java6 on win7x64.
Any idea how to solve this?
On what system does it work fine?
thnx
Yesterday i thied it for myself and did a test with the languagepack update 2 or 3, i followed the steps and erverything worked. The only thing i didn't test was if the flashable really worked.
I did not see anything what had to do with java.
Using win7x32 which java i use... i don't know.
Still got a question how to use your AUTO APK TOOL.
I have downloaded Multi Lang Update 4, unzipped it and put the APKs in _INPUT_APK.
JW made an update for the translations, those are strings, arrays and plurals.
How do i use the update JW made?
Is the fisrt thing i do "decompile" (APKs are in_INPUT_APK), when decompiled i get 'new' folders in _INPUT_APK with the strings etc, can i copy the updated folders to _INPUT_APK so it overwrites the "old" folders and after that recompile and follow the steps 3, 4, and 18 to make my updated flashable language pack?
Ofcourse i only want the NL pack so it is possible to delete the languages i don't use/want?
Which folders/files are "forbidden" to delete, i mean which folders/files are needed for a good running ROM. I do not know how to put it clear to explain, so i hope you know what i mean.
Thnx for now and i'm off to bed. goodnight all.
yeah i got what you mean.
Easiest way is
- decompile my multilang apks, (remove the ones we dont translate)
- yes it will all be in the _INPUT_APK folder (it will recreate struture there)
- yes copy jan willem 3's updates over in the _INPUT_APK folder structure
- it will overwrite all files
- then recompile after copying it over (if all is translated well, it should have no errors)
- then build usable
- then 18 build the flashable, (delete the build.prop inside the flashable_update.zip and inside the system folder before building it, if you know what it is for then just reuse it)
NOTE
as i have said, you can delete all that has values-pt, values-de, raw-de, etc. but you might delete something that is needed so don't delete values folder
the only complicated apk is the framework-res so you can leave that one out if you want
another method
- grab the apks from the en-zh rom
- then just add jan willem 3's nl sources in the decompiled folder structure
- then recompile
- build usable
- 18, build flashable
When i would copy JW his update (in this case it isn't the update tranlation for 1.4.29 as far as i know). How do i get the new strings and the string that are deleted?
If i take the APP-EN_BASE_1.4.22_20110423.rar for expamle.
I put it in the right folder and decompile, remove everything i don't want to have (the other languages) and i copy the latest translation in to that folder it will overwrite everything and would delete the new strings that haven't been translated yet (so after copying it is possible that i will miss a few strings).
(When copying a file with a size of 1mb and you copy it to the same file, but that one is bigger (say 1.5mb) the 1mb file will overwrite the 1.5mb file, so this "new" file has a size of 1mb am i correct? Or am i totally wrong and confused?)
W/ResourceType( 2712): Bad XML block: header size 261 or total size 0 is larger than data size 0
C:\Users\Administrator\Desktop\AutoAPKTool1.0.2\_INPUT_APK\Gallery\res\menu-da\media_context_menu.xml:14: error: Error: No resource found that matches the given name (at 'id' with value '@id/set_or_cancel_cover').
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL8651035744520181830.tmp, -I, C:\Users\Administrator\apktool\framework\1.apk, -S, C:\Users\Administrator\Desktop\AutoAPKTool1.0.2\_INPUT_APK\Gallery\res, -M, C:\Users\Administrator\Desktop\AutoAPKTool1.0.2\_INPUT_APK\Gallery\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(Unknown Source)
at brut.androlib.Androlib.buildResourcesFull(Unknown Source)
at brut.androlib.Androlib.buildResources(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.androlib.Androlib.build(Unknown Source)
at brut.apktool.Main.cmdBuild(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\ADMINI~1\AppData\Local\Temp\APKTOOL8651035744520181830.tmp, -I, C:\Users\Administrator\apktool\framework\1.apk, -S, C:\Users\Administrator\Desktop\AutoAPKTool1.0.2\_INPUT_APK\Gallery\res, -M, C:\Users\Administrator\Desktop\AutoAPKTool1.0.2\_INPUT_APK\Gallery\AndroidManifest.xml]
at brut.util.OS.exec(Unknown Source)
... 7 more
recompiling MiuiMusic.apk...
I: Smaling...
I: Building resources...
aapt: warning: string 'music_picker' has no default translation in C:\Users\Administrator\Desktop\AutoAPKTool1.0.2\_INPUT_APK\MiuiMusic\res; found: de
I: Building apk file...
Just when I started to have problems with APK Manager, you bring this tool out. It is a little different interface, but at least I'm able to decompile and recompile the apk's that I was having trouble with.
Will you be adding features like optimizing images and zipaligning in the future? If not, that's cool. It does what I can't get APK Manager to do anymore. Thanks.
I am adding features after i posted this for i am using it in MIUI translation, mass production, LOL, yeah that would come, the auto deodexer was also in my working folder now so they are all there, i just need to get confirmation with autodeodexer for i am modding some of the scripts, if ever i will post it.
but i could update with the optimizing, and zipalign
right now it has optimization MX3 level only on the flashable zip, so we build less file size updater.
it would not be that difficult to put those functions my friend. yes i'll update it once i am over the miui fever this weekend, every friday is like hell
Okay, the first two apk's that I decompiled and recompiled worked fine. Now I am trying to invert the Dropbox app, but I am getting this error:
[*] C:\Users\Tim\AutoAPKTool1.0.2\_INPUT_APK\Dropbox.apk
decompiling C:\Users\Tim\AutoAPKTool1.0.2\_INPUT_APK\Dropbox.apk...
I: Baksmaling...
I: Loading resource table...
I: Decoding resources...
I: Loading resource table from file: G:\apktool\framework\1.apk
W: Could not decode attr value, using undecoded value instead: ns=android, name=hardwareAccelerated, value=0xffffffff
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x010102d3
at brut.androlib.res.data.ResPackage.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.data.ResTable.getResSpec(Unknown Source)
at brut.androlib.res.decoder.ResAttrDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(Unknown Source)
at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(Unknown Source)
at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(Unknown Source)
at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(Unknown Source)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(Unknown Source)
at brut.androlib.res.decoder.ResFileDecoder.decode(Unknown Source)
at brut.androlib.res.AndrolibResources.decode(Unknown Source)
at brut.androlib.Androlib.decodeResourcesFull(Unknown Source)
at brut.androlib.ApkDecoder.decode(Unknown Source)
at brut.apktool.Main.cmdDecode(Unknown Source)
at brut.apktool.Main.main(Unknown Source)
I was getting this with APK Manager, but I thought it was something to do with the program. Do you have any ideas? I am using Windows Home Premium-64 bit and APK Tool 1.3.1. I thought someone said the new .NET update was screwing things up, but I don't know.
You can try to switch to 1.3.2 with this tool or 1.3.1, have you tried decompiling the app in 1.3.2?
Also is this for GB or FROYO, aapt can be change from froyo to gingerbread, just need to put it in the same directory, later i'll add feature to switch too.
I got this from bruts thread with a user reply from me, here's where you get the files if switching from 1.3.1 to 1.3.2 did not help
FROYO
C:\android-sdk-windows\platforms\android-8\tools\aapt.exe
GB
C:\android-sdk-windows\platform-tools\aapt.exe
@XJ What is the fastest and most simple way to compare the deleted and added strings?
Do i have to walk thu all the strings to compare or is there an other way that is faster and easier to do?
Do i have to check the "bugfixlist" and open only the strings that are mentioned there?
Don't know if it's the best/fastest way, but what i did was download a programm called Diffmerge (Google it) and then compared the latest english source we have (APP-EN_BASE_1.4.22_20110423.rar) with a decompiled version of newest en/zh rom upgrade.
This way i could "quickly" find changes/additions/removal of strings and then apply them to my language pack
But again, i'm also a newbie at this, so i'm not sure if this is the correct thing to do..
const-string v1, "yyyy\u5e74MM\u6708dd\u65e5 HH:mm:ss"
const-string v1, "yyyy MM dd HH:mm:ss"
const-string v1, "yyyy\u5e74MM\u6708dd\u65e5 HH:mm"
const-string v1, "yyyy MM dd HH:mm:ss"
const-string v1, "yyyy\u5e74MM\u6708dd\u65e5 HH:mm"
const-string v1, "yyyy MM dd HH:mm:ss"
const-string v2, "\u7167\u7247"
const-string v2, "MIUI Camera Shots"
const-string v2, "SD\u5361"
const-string v2, "SD Card"
const-string v2, "MIUI\u622a\u5c4f"
const-string v2, "MIUI Screenshots"
const-string v2, "\u94c3\u58f0"
const-string v2, "Downloads"
const-string v3, "\u25cf"
const-string v3, "Menu" or const-string v3, "Sort"
const-string v8, "\u8bbe\u7f6e\u58c1\u7eb8"
const-string v8, "Use as wallpaper"
const-string v9, "\u8bbe\u4e3a\u684c\u9762\u58c1\u7eb8"
const-string v9, "Set as desktop wallpaper"
const-string v9, "\u8bbe\u4e3a\u9501\u5c4f\u58c1\u7eb8"
const-string v9, "Set as lockscreen wallpaper"
const-string v2, "\u91cd\u547d\u540d\u5931\u8d25"
const-string v2, "Rename failed"
const-string v18, "\u89c6\u9891\u5c5e\u6027"
const-string v18, "Video properties"
const-string v18, "\u56fe\u7247\u5c5e\u6027"
const-string v18, "Video properties"
const-string v5, "\u89c6\u9891\u5c5e\u6027"
const-string v5, "Video properties"
const-string v5, "\u56fe\u7247\u5c5e\u6027"
const-string v5, "Image properties"
<item android:id="@id/rename" android:title="???" />
<item android:id="@id/rename" android:title="Rename" />
const-string v10, " (\u5168\u5c4f)"
const-string v10, " (Full Screen)"
----------------------------
.method static constructor <clinit>()V
.locals 1
.prologue
.line 22
const/4 v0, 0x0
sput-boolean v0, Lcom/android/mms/ui/MmsTabActivity;->sPasswordConfirmed:Z
return-void
.end method
-----------------------------
.method private setupRecommendationTab()V
.locals 4
.prologue
.line 95
new-instance v0, Landroid/content/Intent;
invoke-direct {v0}, Landroid/content/Intent;-><init>()V
.line 96
const-class v1, Lcom/android/mms/ui/FestivalSmsCategoryList;
invoke-virtual {v0, p0, v1}, Landroid/content/Intent;->setClass(Landroid/content/Context;Ljava/lang/Class;)Landroid/content/Intent;
.line 97
iget-object v1, p0, Lcom/android/mms/ui/MmsTabActivity;->mTabHost:Landroid/widget/TabHost;
iget-object v2, p0, Lcom/android/mms/ui/MmsTabActivity;->mTabHost:Landroid/widget/TabHost;
const-string v3, "festival"
invoke-virtual {v2, v3}, Landroid/widget/TabHost;->newTabSpec(Ljava/lang/String;)Landroid/widget/TabHost$TabSpec;
move-result-object v2
const v3, 0x7f090135
invoke-virtual {p0, v3}, Lcom/android/mms/ui/MmsTabActivity;->getText(I)Ljava/lang/CharSequence;
move-result-object v3
invoke-virtual {v2, v3}, Landroid/widget/TabHost$TabSpec;->setIndicator(Ljava/lang/CharSequence;)Landroid/widget/TabHost$TabSpec;
move-result-object v2
invoke-virtual {v2, v0}, Landroid/widget/TabHost$TabSpec;->setContent(Landroid/content/Intent;)Landroid/widget/TabHost$TabSpec;
move-result-object v0
invoke-virtual {v1, v0}, Landroid/widget/TabHost;->addTab(Landroid/widget/TabHost$TabSpec;)V
.line 99
return-void
.end method
-----------------------------
.line 45
invoke-direct {p0}, Lcom/android/mms/ui/MmsTabActivity;->setupRecommendationTab()V
const-string v2, "\u4eca\u5929"
const-string v2, "Today"
const-string v2, "\u6628\u5929"
const-string v2, "Yesterday"