[Galaxy S II Android Development] danividalg:
Ok, I think I know what is it.

It's the same that the shared uid?

It's only a value that must be copied with the sign for the system to accept the apk as valid. I'm right?

Then, another question :P

I don't know how to use apk manager. What steps should I do to get the right SystemUI.apk with the "SystemUI.apk\res\layout\tw_status_bar_expanded.xml" modified and same public id?

I have tried to make the following:

1.- copy original SystemUI.apk to "place-apk-here-for-modding" folder

2.- Execute script and choose decompile option (9)

Then I get an error, but apk seems to be decopiled

Error is:

I: Loading resource table...

I: Loaded.

I: Loading resource table from file: C:\Documents and Settings\xxx\apktool\framework\1.apk

I: Loaded.

W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x01030305

W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x01030305

W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x01030305

W: Could not decode attr value, using undecoded value instead: ns=android, name=theme, value=0x01030305

I: Decoding file-resources...

I: Decoding values*/* XMLs...

I: Done.

Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec: 0x01030305

at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:55)

at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:51)

at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:59)

at brut.androlib.res.data.value.ResReferenceValue.encodeAsResXml(ResReferenceValue.java:46)

at brut.androlib.res.data.value.ResScalarValue.encodeAsResXmlAttr(ResScalarValue.java:43)

at brut.androlib.res.decoder.ResAttrDecoder.decode(ResAttrDecoder.java:40)

at brut.androlib.res.decoder.AXmlResourceParser.getAttributeValue(AXmlResourceParser.java:315)

at org.xmlpull.v1.wrapper.classic.XmlPullParserDelegate.getAttributeValue(XmlPullParserDelegate.java:69)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.writeStartTag(StaticXmlSerializerWrapper.java:267)

at org.xmlpull.v1.wrapper.classic.StaticXmlSerializerWrapper.event(StaticXmlSerializerWrapper.java:211)

at brut.androlib.res.decoder.XmlPullStreamDecoder.decode(XmlPullStreamDecoder.java:46)

at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)

at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:100)

at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:114)

at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:93)

at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)

at brut.apktool.Main.cmdDecode(Main.java:128)

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

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml

at brut.androlib.Androlib.readMetaFile(Androlib.java:142)

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

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

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

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

Caused by: brut.directory.PathNotExist: apktool.yml

at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)

at brut.androlib.Androlib.readMetaFile(Androlib.java:138)

... 4 more

3.- Then I have modified "SystemUI.apk\res\layout\tw_status_bar_expanded.xml" under folder projects

4.- I have executed script and choosed compile (11).

Then get error:

Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathNotExist: apktool.yml

at brut.androlib.Androlib.readMetaFile(Androlib.java:142)

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

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

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

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

Caused by: brut.directory.PathNotExist: apktool.yml

at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:103)

at brut.androlib.Androlib.readMetaFile(Androlib.java:138)

... 4 more

After that, I answered yes to question "is system app" and answered no to question "copy additional files not modified".

Then I get in folder "place-apk-here-for-modding" a unsigned apk. I have opened it with 7zip to be sure that all files are ok and there are no files exept "META-INF" folder :O ???

If I do the same but answer yes to question "copy additional files not modified" and follow instructions, I get the unsigned apk ok, but without the modified file "SystemUI.apk\res\layout\tw_status_bar_expanded.xml"

Please, help :S

What I'm doing wrong?

Thanks and best regards.