[G1 Android Development] Frank2807:
It would be a really good tool if it will work for me. Thank you for your work!

But I have a question about a strange, for me not understandable problem.

I played around with the framework-res.apk from GingerYoshi (for Dream/Magic) but in about 100 tests I don't get a working apk after modding. Now I screw down to a minimum but doesn't work.

decompile the apk (Point 9)

compile the apk without changing anything. I say yes to system.apk and say no to the "keep-folder-question"

I get no error message but the finished apk doesn't work. I tried to compile with the "keep-folder-option" after I changed the stat_sys_battery.xml. No error message, but it doesn't work.

Has anybody an idea? (Win7 64 bit if it is important and apk manager 4.9)

Thank you very much!

Frank

Edit: I played around...

Edited the stat_sys_battery.xml and the stat_sys_battery_charge.xml and added some pngs in the drawable-mdpi folder. Then compiled (system app - yes; Use keep-folder - yes). Got no error.

That product I decompiled again and get an error during decompiling

That's the log:

I: Decoding resources...
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080365
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080370
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108037a
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080385
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108038f
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108033d
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108033e
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108033f
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080340
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080341
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080342
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080343
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080344
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080345
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080347
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080348
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080349
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108034a
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108034b
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108034c
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108034d
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108034e
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108034f
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080351
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080352
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080353
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080354
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080355
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080356
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080357
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080358
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080359
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108035a
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108035c
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108035d
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108035e
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108035f
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080360
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080361
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080362
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080363
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080364
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080366
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080367
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080368
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080369
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108036a
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108036b
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108036c
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108036d
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108036e
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108036f
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080371
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080372
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080373
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080374
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080375
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080376
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080377
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080378
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080379
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108037b
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108037c
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108037d
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108037e
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108037f
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080380
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080381
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080382
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080383
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080384
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080386
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080387
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080388
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080389
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108038a
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108038b
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108038c
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108038d
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x0108038e
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080390
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080391
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080392
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080393
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080394
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080395
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080396
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080397
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080398
W: Could not decode attr value, using undecoded value instead: ns=android, name=drawable, value=0x01080399
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01080365
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.data.value.ResReferenceValue.getReferent(Unknown Source)
at brut.androlib.res.data.value.ResReferenceValue.toResXmlFormat(Unknown Source)
at brut.androlib.res.data.value.ResAttr.convertToResXmlFormat(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.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)

Now the my stat_sys_battery.xml looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<level-list
xmlns:android="http://schemas.android.com/apk/res/android">
<item android:drawable="@drawable/stat_sys_battery_0" android:maxLevel="4" />
<item android:drawable="@17302373" android:maxLevel="5" />
<item android:drawable="@17302384" android:maxLevel="6" />
<item android:drawable="@17302394" android:maxLevel="7" />
<item android:drawable="@17302405" android:maxLevel="8" />
<item android:drawable="@17302415" android:maxLevel="9" />
<item android:drawable="@drawable/stat_sys_battery_10" android:maxLevel="10" />
<item android:drawable="@17302333" android:maxLevel="11" />
<item android:drawable="@17302334" android:maxLevel="12" />
<item android:drawable="@17302335" android:maxLevel="13" />
<item android:drawable="@17302336" android:maxLevel="14" />
<item android:drawable="@17302337" android:maxLevel="15" />
<item android:drawable="@17302338" android:maxLevel="16" />
<item android:drawable="@17302339" android:maxLevel="17" />
<item android:drawable="@17302340" android:maxLevel="18" />
<item android:drawable="@17302341" android:maxLevel="19" />
<item android:drawable="@drawable/stat_sys_battery_20" android:maxLevel="20" />
<item android:drawable="@17302343" android:maxLevel="21" />
<item android:drawable="@17302344" android:maxLevel="22" />
<item android:drawable="@17302345" android:maxLevel="23" />
<item android:drawable="@17302346" android:maxLevel="24" />
<item android:drawable="@17302347" android:maxLevel="25" />
<item android:drawable="@17302348" android:maxLevel="26" />
<item android:drawable="@17302349" android:maxLevel="27" />
<item android:drawable="@17302350" android:maxLevel="28" />
<item android:drawable="@17302351" android:maxLevel="29" />
<item android:drawable="@17302353" android:maxLevel="30" />
<item android:drawable="@17302354" android:maxLevel="31" />
<item android:drawable="@17302355" android:maxLevel="32" />
<item android:drawable="@17302356" android:maxLevel="33" />
<item android:drawable="@17302357" android:maxLevel="34" />
<item android:drawable="@17302358" android:maxLevel="35" />
<item android:drawable="@17302359" android:maxLevel="36" />
<item android:drawable="@17302360" android:maxLevel="37" />
<item android:drawable="@17302361" android:maxLevel="38" />
<item android:drawable="@17302362" android:maxLevel="39" />
<item android:drawable="@drawable/stat_sys_battery_40" android:maxLevel="40" />
<item android:drawable="@17302364" android:maxLevel="41" />
<item android:drawable="@17302365" android:maxLevel="42" />
<item android:drawable="@17302366" android:maxLevel="43" />
<item android:drawable="@17302367" android:maxLevel="44" />
<item android:drawable="@17302368" android:maxLevel="45" />
<item android:drawable="@17302369" android:maxLevel="46" />
<item android:drawable="@17302370" android:maxLevel="47" />
<item android:drawable="@17302371" android:maxLevel="48" />
<item android:drawable="@17302372" android:maxLevel="49" />
<item android:drawable="@17302374" android:maxLevel="50" />
<item android:drawable="@17302375" android:maxLevel="51" />
<item android:drawable="@17302376" android:maxLevel="52" />
<item android:drawable="@17302377" android:maxLevel="53" />
<item android:drawable="@17302378" android:maxLevel="54" />
<item android:drawable="@17302379" android:maxLevel="55" />
<item android:drawable="@17302380" android:maxLevel="56" />
<item android:drawable="@17302381" android:maxLevel="57" />
<item android:drawable="@17302382" android:maxLevel="58" />
<item android:drawable="@17302383" android:maxLevel="59" />
<item android:drawable="@drawable/stat_sys_battery_60" android:maxLevel="60" />
<item android:drawable="@17302385" android:maxLevel="61" />
<item android:drawable="@17302386" android:maxLevel="62" />
<item android:drawable="@17302387" android:maxLevel="63" />
<item android:drawable="@17302388" android:maxLevel="64" />
<item android:drawable="@17302389" android:maxLevel="65" />
<item android:drawable="@17302390" android:maxLevel="66" />
<item android:drawable="@17302391" android:maxLevel="67" />
<item android:drawable="@17302392" android:maxLevel="68" />
<item android:drawable="@17302393" android:maxLevel="69" />
<item android:drawable="@17302395" android:maxLevel="70" />
<item android:drawable="@17302396" android:maxLevel="71" />
<item android:drawable="@17302397" android:maxLevel="72" />
<item android:drawable="@17302398" android:maxLevel="73" />
<item android:drawable="@17302399" android:maxLevel="74" />
<item android:drawable="@17302400" android:maxLevel="75" />
<item android:drawable="@17302401" android:maxLevel="76" />
<item android:drawable="@17302402" android:maxLevel="77" />
<item android:drawable="@17302403" android:maxLevel="78" />
<item android:drawable="@17302404" android:maxLevel="79" />
<item android:drawable="@drawable/stat_sys_battery_80" android:maxLevel="80" />
<item android:drawable="@17302406" android:maxLevel="81" />
<item android:drawable="@17302407" android:maxLevel="82" />
<item android:drawable="@17302408" android:maxLevel="83" />
<item android:drawable="@17302409" android:maxLevel="84" />
<item android:drawable="@17302410" android:maxLevel="85" />
<item android:drawable="@17302411" android:maxLevel="86" />
<item android:drawable="@17302412" android:maxLevel="87" />
<item android:drawable="@17302413" android:maxLevel="88" />
<item android:drawable="@17302414" android:maxLevel="89" />
<item android:drawable="@17302416" android:maxLevel="90" />
<item android:drawable="@17302417" android:maxLevel="91" />
<item android:drawable="@17302418" android:maxLevel="92" />
<item android:drawable="@17302419" android:maxLevel="93" />
<item android:drawable="@17302420" android:maxLevel="94" />
<item android:drawable="@17302421" android:maxLevel="95" />
<item android:drawable="@17302422" android:maxLevel="96" />
<item android:drawable="@17302423" android:maxLevel="97" />
<item android:drawable="@17302424" android:maxLevel="98" />
<item android:drawable="@17302425" android:maxLevel="99" />
<item android:drawable="@drawable/stat_sys_battery_100" android:maxLevel="100" />
</level-list>

only the usuall steps are right. The others are broken. After compiling the first time all png's were in the apk. Now only the usuall steps (10, 20, 40...) are left. The other are away. :(