yashsingh1/xdaforums huggingface dataset:
[Desire Android Development] totalcmdext:
The strange is that i have decompile the framework-res.apk and without change anything tried to compile and i am taking this error.

I have chekhed the file "\values-iw\strings.xml" and maybe there is something wrong or doesn't regognise the character of this language.

Any idea?
[Desire Android Development] firefds:
Copy paste the line here. IW is Hebrew, i can help you
[Desire Android Development] totalcmdext:
<string name="lockscreen_uimsim_unlock_progress_dialog_message">משחרר כרטיס UIM/SIM\u0000</string>

I don't know maybe need it to update the aapt.exe (it is framework from HTC Sense 2.3.5 build)
[Desire Android Development] totalcmdext:
*] C:\cygwin\home\Z000JYVX\_Cooking_\AutoAPKTool2.0.3d\_INPUT_APK\framework-res

recompiling C:\cygwin\home\Z000JYVX\_Cooking_\AutoAPKTool2.0.3d\_INPUT_APK\framework-res...

W: Could not find sources

I: Building resources...

c:\cygwin\home\Z000JYVX\_Cooking_\AutoAPKTool2.0.3d\_INPUT_APK\framework-res\res\values\public.xml:3696: error: Public entry identifier 0x1080407 entry index is larger than available symbols (index 1031, total symbols 1031).

c:\cygwin\home\Z000JYVX\_Cooking_\AutoAPKTool2.0.3d\_INPUT_APK\framework-res\res\values\public.xml:3696: error: Public symbol drawable/stat_sys_battery_charge_animfull declared here is not defined.

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\z000jyvx\AppData\Local\Temp\APKTOOL785206734152396059.tmp, -x, -S, c:\cygwin\home\Z000JYVX\_Cooking_\AutoAPKTool2.0.3d\_INPUT_APK\framework-res\res, -M, c:\cygwin\home\Z000JYVX\_Cooking_\AutoAPKTool2.0.3d\_INPUT_APK\framework-res\AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)

at brut.androlib.Androlib.buildResources(Androlib.java:248)

at brut.androlib.Androlib.build(Androlib.java:171)

at brut.androlib.Androlib.build(Androlib.java:154)

at brut.apktool.Main.cmdBuild(Main.java:174)

at brut.apktool.Main.main(Main.java:59)

Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\z000jyvx\AppData\Local\Temp\APKTOOL785206734152396059.tmp, -x, -S, c:\cygwin\home\Z000JYVX\_Cooking_\AutoAPKTool2.0.3d\_INPUT_APK\framework-res\res, -M, c:\cygwin\home\Z000JYVX\_Cooking_\AutoAPKTool2.0.3d\_INPUT_APK\framework-res\AndroidManifest.xml]

at brut.util.OS.exec(OS.java:83)

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)

... 6 more

The system cannot find the drive specified.

Strange issue!!!

After loading the framework-res.apk tried to compile again the modded frameworks-res and have the above problem.
[Desire Android Development] carl1961:
Why you have AutoAPKTool in your cygwin folder? May be best to move to c:\ (as shown on first post) when you move to c: \ re run reg so programs can files, also if your on windows 7 you need to run autoapktool as administrator

Also I think you need the com.htc.resources.apk for resources
[Desire Android Development] totalcmdext:
I have moved the folder in the root.

I have installed the framework-res.apk and also as additional framework the com.htc.resources.apk .

Then tried to compile the framework-res.apk with the following problem:

[*] C:\AutoAPKTool2.0.3d\_INPUT_APK\framework-res

recompiling C:\AutoAPKTool2.0.3d\_INPUT_APK\framework-res...

W: Could not find sources

I: Building resources...

c:\AutoAPKTool2.0.3d\_INPUT_APK\framework-res\res\values\public.xml:3696: error: Public entry identifier 0x1080407 entry index is larger than available symbols (index 1031, total symbols 1031).

c:\AutoAPKTool2.0.3d\_INPUT_APK\framework-res\res\values\public.xml:3696: error: Public symbol drawable/stat_sys_battery_charge_animfull declared here is not defined.

Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\z000jyvx\AppData\Local\Temp\APKTOOL310209398588554281.tmp, -x, -S, c:\AutoAPKTool2.0.3d\_INPUT_APK\framework-res\res, -M, c:\AutoAPKTool2.0.3d\_INPUT_APK\framework-res\AndroidManifest.xml]

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)

at brut.androlib.Androlib.buildResourcesFull(Androlib.java:301)

at brut.androlib.Androlib.buildResources(Androlib.java:248)

at brut.androlib.Androlib.build(Androlib.java:171)

at brut.androlib.Androlib.build(Androlib.java:154)

at brut.apktool.Main.cmdBuild(Main.java:174)

at brut.apktool.Main.main(Main.java:59)

Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\z000jyvx\AppData\Local\Temp\APKTOOL310209398588554281.tmp, -x, -S, c:\AutoAPKTool2.0.3d\_INPUT_APK\framework-res\res, -M, c:\AutoAPKTool2.0.3d\_INPUT_APK\framework-res\AndroidManifest.xml]

at brut.util.OS.exec(OS.java:83)

at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)

... 6 more

The system cannot find the drive specified.

Any idea for this issue?
[Desire Android Development] firefds:
You can delete the u0000 and put the whole string in between " ". I think the / is making the problem
[Desire Android Development] AntwonJenkins:
My Issue

[*] C:\Android\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme

recompiling C:\Android\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme...

W: Could not find sources

I: Building resources...

(skipping index file 'C:\Android\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme\res\drawable\Thumbs.db')

(skipping index file 'C:\Android\AutoAPKTool2.0.3\_INPUT_APK\PersonalTheme\res\drawable-hdpi\Thumbs.db')

I: Building apk file...

The system cannot find the drive specified.

________________________________________________

I have done everything and don't see any errors in the above log but what drive is it looking for? or where can I specify for it to work? I'm just trying to recompile a CM7 theme.
[Desire Android Development] xavierjohn22:
Did you have the apk in output directory?

Have you tried deleting that thumbs.db file?
[Desire Android Development] AntwonJenkins:
Yes the apk is in the output folder and i still get the same error message and I have deleted the thumbs.db file with no different results.
[Desire Android Development] xavierjohn22:
Framework?

I think its a bug in my tool displaying the error drive. Usually this happens when the resource.arsc is not in apk, so it displays the error, i havent handled the error in a while. Lol
[Desire Android Development] shoman94:
Any way you can update this to use the latest apktool also? So it supports ICS framework?
[Desire Android Development] ghiki:
In XDAAutoTool I got

:(
[Desire Android Development] MishFdM:
It would be really helpful...
[Desire Android Development] xavierjohn22:
Incalid property value should be checked by the one who edit

Sent from my HTC Desire
[Desire Android Development] xavierjohn22:
When i find time with ics i will bump this, still busy with mobi

Sent from my HTC Desire
[Desire Android Development] MishFdM:
ICS apks issue is still a big problem for the most of MIUI translators around the world.

Looking forward to hearing from you xavierjohn22, keep up the great work !

Thank you :)
[Desire Android Development] xavierjohn22:
But lenny of miui au uses autoapktool to build the miui au ics.

You just have to have the right framework and edit it.

Sent from my HTC Desire
[Desire Android Development] t4ure4n:
I have my apk for Android 2.3.3 and I am trying to decompile it using xdaAutoTool 3.0.1.

When I try to decompile the file I get following error.

Can someone please help me?

I have attached my apk file below
[Desire Android Development] firefds:
What version of apktool are you using?

And did you install the right framework?
[Desire Android Development] t4ure4n:
1.4.2

If you are talking about android SDK then I have all frameworks from 1.6 to 4.0.3 installed..
[Desire Android Development] firefds:
No. Ilm not talking abou that.

When you are in the apk tool window you have a button that says INSTALL FRAMEWORK.

Put framework-res.apk in your INPUT folder and click that button.

Now decompile it.

Btw, there is a new apktool out.
[Desire Android Development] jivany:
trying to download but it just dosent connect to HTC Fanboys website. it never connects to the server im guessing it just sits in limbo everytime i try the link?? anybody have a mirror? thanks
[Desire Android Development] 1982Strand:
download apktool 1.4.3 and put it in the bin folder along with the aapt from your sdk.

Then you can decompile/recompile android 4.03 with the autotool :)
[Desire Android Development] 1982Strand:
XJ, how about adding an option in settings, so we can change aapt.exe versions too?

Just like the option to switch between apktool?

Just came to think of it regarding the ICS discussion here too and i for one tend to switch between versions anyway..

:D
[Desire Android Development] 1982Strand:
This can mean several things, but i've stumbled upon this too a few times..

When it happened to me, the first time was because i had renamed the _INPUT_APK folder (for later use) and forgot to create a new one before continuing my work.

The second was because i tried "deodex full rom" and the file in use was bad (Not downloaded correctly)

The third time was because i had a space in a filename, which the tool can't handle, so i renamed the file..

Yoou need to double check your settings, your paths, filenames, file integrety etc. etc. Also, try shutting down the tool, then check task manager for running processes, like xdatool, 7zip processes and apktool/aapt. Shut them all down before restarting the tool :)

Hope this helps..
[Desire Android Development] lenny_kano:
I actually solved the issue and explained to all the translation groups, so they shouldnt be having problems now? I can modify the apks just fine, as long as I use apktool 1.4.3 and the latest aapt. Only issue is framework-miui-res, which needs a couple of extra steps (which I also explained to all translation groups), so it should be fine now. Basically install any com.HTC.resources.apk from a sense rom as 2.apk, and in apktool.yml for framework-miui-res and a line - 2, under where it says - 1.

Then all will build fine. Any other issues are because your XML isn't formatted properly, which nothing xj can do will fix.
[Desire Android Development] Soulfly999:
Hi,

thanks for the good description. Is it possible to get some example of the .json and .html Files (OTA-Update)?

Don't know exactly what to do!?
[Desire Android Development] xavierjohn22:
In my miui desire rom thread, first post attachment

Sent from my HTC Desire
[Desire Android Development] xavierjohn22:
Dan, Here,

In next update ill try to decompile ICS, you might want to send me the framework you are using for ICS, and lol, i forgot the steps now. ha ha ha. i look at it when lenny posted in my miui thread.

wahahaha its posted above your post. Cheers!

Anyways, V4.0.0 RELEASED

Once you have uploaded your ICS files i will try to decompile-recompile and play around using bruts latest apktool and see what i will come up to support ICS more, he he he

Right now i added

Decompile with...........

Recompile with...........

Fyi,

You need to click input apk again in order for list to update at the moment.

A special request from those not using MIUI rom but decompiling apks like ICS with multiple apktool versions, he he he

IMPORTANT!!

If you got Invalid Property Value during load then clear this section in INI,

(Just delete the whole [MainFormPosition] Section and those under it)

These lines as sample:

[MainFormPosition]

Top=-216

Left=84

Width=12312

Height=9060
[Desire Android Development] borce_razor:
I have problems with latest version of xdaAutoTool. All ocx are registered (win 7 64bit), but app crashes on start up
[Desire Android Development] xavierjohn22:
From the post above yours. Open ini file for existing users. Delete the section line i mentioned and values below it.

[MainFormPosition]

.....

Sent from my HTC Desire
[Desire Android Development] 1982Strand:
Hey XJ :)

One more thing aside from the PM i sent you..

I tested the deodex full rom feature too with miui ics..

I attached my edited bootclass file for this, but you might want to check it to see if it's 100% correct. (to deodex the official nexus s ics rom). Also, i used smali/baksmali version 1.3.2 with this :)
[Desire Android Development] xavierjohn22:
Tried it already, I found no error here, he he h

Yes 1.3.2 smali/balsmali is for ics

Yes basically what you did was key in all framework files that would need the framework file itself or by the apks while disassembling, then reassembling it converting the odex to dex,

I added it in the default xdaautotool download as well as my i9000 bootclass file for porting to samsung galaxy tab, lol

By the way uploading 4.0.1, a quick update, Multi INPUT apk folder support + some minor bug changes
[Desire Android Development] qaysedcftgb:
apktool 2.0.3 runs like a charme

xavierjohn22,

just wanted to leave a note, that your tool made my day!

I have spent hours/days in readings and doings concerning decompiling/recompiling framework-res.apk but I always failed!

Nearly desperated I tried your tool and...

...I was able to get a framework changed and working!

THANKS!!

Cheers

qaysed

/EDIT

froyo framework on a samsung device
[Desire Android Development] huggs:
I am trying to deodex the SystemUI.apk from my Samsung Dart and I get the following error message.

What does this mean and is there anything I can do to make it work?
[Desire Android Development] xavierjohn22:
You need a working line of text for the custom boot class path with your framework files defined.

Sent from my HTC Desire
[Desire Android Development] xavierjohn22:
Thanks man, glad it worked for you. Cheers!

Sent from my HTC Desire
[Desire Android Development] huggs:
How can I find out what the boot class path should be?
[Desire Android Development] qaysedcftgb:
as witten, changing framework-res.apk runs perfect.

But I wanted to edit a system.apk:

DialerTabActivity.apk

What has been done?

stock framework-res.apk and DialerTabActivity.apk copied to \_INPUT_APK

installed framework with option 1

decompiled both apks with option 2

edited the colors.xml in

\DialerTabActivity\res\values

with notepad++

saved it.

Using Option 3 (for recompiling both apks) or only option 7 (entering the directory name) I see that only the file

_INPUT_APK\DialerTabActivity\build\apk\classes.dex

is created for the dialertabactivity.

The XMLs are still in plain text... not recompiled

So I have no chance to copy the changed XML to _CUSTOM_RES... directories.

If I say... I dont mind... build a usable apk anyway, the apk is built, but my changes are not used.

Is it possible in general to edit XML files in other system apps or what may I have done wrong?

Used all three versions of implemented apk tool.

Win XP, 32bit is installed.

As mentioned: framework changes are working, so the whole installation is working, but the dialertab apk makes problems.

Cheers

qaysed

EDIT:

- overwrite resources.arsc (ON)

- overwrite classes.dex (ON)

are used
[Desire Android Development] 1982Strand:
look in your framework folder of the odexed rom you're trying to deodex. You need to make a new bootclass file, putting in all filenames that have a corresponding .odex file.

Look at the other bootclass files in the autotool as an example (under "deo" - tab, then click the button "edit bootclass file")

If it's a full rom zip you are working with, i recommend you use the "deodex full rom" feature, under "Misc" -tab. When done, the deodexed rom will be located in Flashables folder..

Hope it helps :) :)
[Desire Android Development] huggs:
So if I deodex the rom zip, I should be able to pull the deodexed SystemUI from it and overwrite the /system/app/SystemUI.apk on my phone and delete SystemUI.odex and it should work, right?

Where should I place the rom.zip to deodex it using the AutoDeo tool?

Would I still have to make a new bootclass file in the framework directory of the rom.zip?

If I do, what must the file be named and is there any certain way that I must list all the .jar's and .apk's that have corresponding .odex files?

Thanks for your help with this, trying to figure it out on my own has proven mind-boggling. I have tried several scripts and tools to deodex my SystemUI and all I've been able to come up with so far is a bunch of error messages.
[Desire Android Development] 1982Strand:
If i get it right, the rom you currently have on your phone is odexed? I'm not sure if it will work if you replace system files with a deodexed one... I think it won't, seems most logical to me..

If you have a full rom zip, odexed. Open it and open the framework folder. write down all the filenames with a matching .odex file (such as framework.jar, etc. etc.) Go to "Deo"-tab and click edit bootclass file. Edit the name and content of the bootclass file and click "save new", you now have a bootclass file for your odexed rom. (Again, see the other bootclass files for examples)

Then go to "Misc"-tab and check the option, use your newly created bootclass file and deodex the rom. If it's Android 4.0 or above, you need to use smali/baksmali 1.3.2, otherwise 1.2.6 is okay. (Download the right versions, change versions in the Settings in autotool). It doesn't matter where th file is located, just make sure there are no spaces in the filename and path to it..

When done, you can decompile/recompile the files if you want, or just flash the rom. Which ROM is it exactly? Link?

:D :D :D
[Desire Android Development] huggs:
So then I would have to deodex the whole rom, flash the deodexed rom, and custom restore everything but /system from a nandroid then huh?

I have heard/read before that it is possible to use a deodexed systemui on an odexed rom. If it is possible, I think I would much rather go that route, but will take what I can get.

The rom I am using is the one listed under my Samsung Dart SGH T-499 in my sig (DashBlack's CM7) . The rom listed in my sig is a link to the creator's thread.

I was kinda surprised to see an odex'ed CM7 port, but the Samsung Dart doesn't have much development aside from what DashBlack has done, and this rom runs quite smooth, all it's missing is the ability to make the status bar transparent. The UOT kitchen couldn't even make it so.
[Desire Android Development] 1982Strand:
Well, i don't know if it would work, never tried it anyway :)

But if you can, you can choose to deodex the single apk too, would seem much easier.. ;D
[Desire Android Development] huggs:
I tried to deodex the single apk, but didn't know how to create a custom bootclass path file. (Still not 100% clear on how to do this for deodexing a single apk)

If I knew what to put into the bootclass path line for option 4 in the AutoDeo tool, I'd try to do it that way.

I'm gonna try and deodex the whole rom.zip and if I can do that, I'll try replacing my systemui and deleting the corresponding .odex file. If it doesn't work, that's what nandroids are for, then I guess I'll have no choice but to flash the deodexed rom and do a custom nandroid restore, assuming that I'm able to deodex the rom.zip successfully in the first place.
[Desire Android Development] 3rdstring:
Sure it will. The deodexed apks will have an entry in the dalvik-cache, the odexed apks wont. You just have to get rid of the apk & odex file to replace it with a deodexed version.

HTH
[Desire Android Development] 1982Strand:
Ok thanks for the info good to know ;-)

Sent from my Commodore 64
[Desire Android Development] 1982Strand:
Put in all the names of the jar files in the framework folder, if they have a matching. Odex file. separate by a semicolon :-)

Sent from my Commodore 64
[Desire Android Development] xavierjohn22:
You are using commandline automation?

If its dialer you are modding, go to dialer folder and see if it has build folder and resources.

In _custom_res folder theres a text file that lets you copy this binary before build, type your file in there and save. When building it will grab the one in apktool build.

Or the most simplest way, use the options on (dist)

Copy dist generated apk (fist)

Generate zipalign (dist)

Sign apk if needed (dist)

The output will be in _output_APK_dist_zipalign

Sent from my HTC Desire
[Desire Android Development] huggs:
I entered all the .jar's in the /system/framework folder of my rom.zip that had corresponding .odex files in when prompted after choosing #4, and it said 'Deodexing SystemUI.apk' and it scrolled too fast for me to read the rest, and when it finished,it wouldn't let me scroll back up to see what had been done or what error messages were displayed.

I also tried using the xdaAutoTool, I made a custom bootclass path entry for my phone and used it with 'Deodex Stock' and 'Deodex Custom' and both returned System Error Number380: Invalid property value.

This was with just trying to deodex the SystemUI.apk, with the apk and odex file placed in the correct input folder of each of the two tools I tried. I'm still not sure where I'm supposed to put everything in order to deodex my whole rom.zip, so I haven't tried that yet.

.
[Desire Android Development] xavierjohn22:
Source app folder has odex files and apks from system app?

Source framework folder has odex files and jars feom framework?

Bootclass file with correct format, no line break on end?

Right smali and baksmali version?

Fyi, deodex the jars first not just system ui. If your framework dont deodex, there would most be probably issues deodezing an apk.

Best is deodex all.

Sent from my HTC Desire
[Desire Android Development] huggs:
Deodexing everything is gonna have to be my next step then, but I'm quitting for tonight. My brain is fried. Thanks to everybody for helping me figure all this out. I definitely couldn't do it on my own, or at least it would be so much more difficult that I wouldn't bother to try.
[Desire Android Development] 1982Strand:
Ok, just made it easier for you :D

I deodexed the rom for you, here's the link: CM7.2 for Dart

I wasn't able to download the "HOTFIX" for the rom you use, so i don't know which files it contain, so if you want to try it out yourself, or deodex the HOTFIX to have the latest files, here's the stuff you should enter in the box with "Edit bootclass file", within the autotool. MUCH easier to use than the command line tool :)

I used the deodex full rom feature and from downloading the rom till finished deodexing, it took like 10 mins or so ;)

am.jar:android.policy.jar:android.test.runner.jar:bmgr.jar:bouncycastle.jar:com.android.location.provider.jar:core-junit.jar:core.jar:ext.jar:framework.jar:ime.jar:input.jar:javax.obex.jar:mokey.jar:pm.jar:services.jar:sqlite-jdbc.jar:svc.jar
[Desire Android Development] xavierjohn22:
Wowa, lol, what a help man. Cheers!

Sent from my HTC Desire
[Desire Android Development] firefds:
Use option 81 and install twframework-res.apk.
[Desire Android Development] qaysedcftgb:
AAHHH!!!!

now it looks much better!

No naggy erros and there is an apktool.yml win dialertabactivity directory with the content

---

version: 1.3.2

apkFileName: DialerTabActivity.apk

isFrameworkApk: false

usesFramework:

ids:

- 1

- 2

---

So... first try with copying the modified file

E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\res\values\colors.xml

to

E:\AutoAPKTool2.0.3\_CUSTOM_RES\DialerTabActivity\res\values\colors.xml

was not succesfull. The APK building process was OK, but again decompiling and checking the colors.xml of the new created APK showed, that the old values are still there.

So I think I will have to try the things with the

E:\AutoAPKTool2.0.3\_INPUT_APK\DialerTabActivity\build\apk\resources.arsc and copying the edited files...

in addition with option 23 (resources.arsc) and 25 (_CUSTOM_RES).

But the hint with twframework was very good!

This gives me a good sigt of hope that I will also manage to edit other APKs than the framework-res.apk.

Cheers

qaysed

---------- Post added at 02:54 PM ---------- Previous post was at 02:49 PM ----------

btw:

this file is still not seen.

Would anyone be so kind to give an example of that file (naming and content)?

maybe heres my next problem which may be solved manually?

Cheers

qaysed