rootbox .help !!! - Nexus 4 Q&A, Help & Troubleshooting

apktool/framework/1.apk and upon re-installing framework again I got below
C:\apktools>
C:\apktools>java -jar apktool.jar if framework-res.apk
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x010800ce drawable/background_holo_dark, config=-nodpi
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:65)
at brut.androlib.res.data.ResConfig.addResource(ResConfig.java:58)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:201)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:170
)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:135)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:11
0)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:40)
at brut.androlib.res.AndrolibResources.installFramework(AndrolibResource
s.java:562)
at brut.androlib.Androlib.installFramework(Androlib.java:473)
at brut.apktool.Main.cmdInstallFramework(Main.java:250)
at brut.apktool.Main.main(Main.java:81)

Related

[Q] how to use apktool DeskClock.apk

hi devs,
is would like to modify an apk! after some google-work, i found apktool to decompile & to compile the modded! but without success!
what i have done? (OS=linux)
download (aapt,apktool,apktool.jar) to /usr/local/bin
adb pull /system/app/DeskClock.apk /home/htc/
cd /home/htc/
apktool d DeskClock.apk ./out
change the /res/values-de/strings.xml and save
apktool b -f -d out (compile the folder to new apk)
adb shell & cd /system/app & mv DeskClock.apk DeskClock.old & ^ctrl+D
adb push /home/htc/out/dist/DeskClock.apk /system/app/
ok, in my opinion that should be all, but it doesn't work!
i cant see the Clock App on my Droid.
Can anybody say me, were is my misstake?
I'm not very talented in Linux, but your steps seem to be right. I always used Windows at work, so I do only know the apk took for Win XP
But did you check if the recompiled file has the same size as the original one?
Apktool ERROR
Hey I'm trying to use apktool to recompile my SystemUI.apk but anytime i run apktool b SystemUI the following error pops up
C:\Windows\system32>cd C:\Windows
C:\Windows>apktool if C:\Windows\framework-res.apk
I: Framework installed to: C:\Users\Mama\apktool\framework\1.apk
C:\Windows>apktool if C:\Windows\SystemUI.apk
I: Framework installed to: C:\Users\Mama\apktool\framework\127.apk
C:\Windows>apktool d SystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Mama\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
C:\Windows>apktool b SystemUI
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\Windows\SystemUI\res\values\styles.xml:3: error: Error retrieving parent for
item: No resource found that matches the given name '@*android:style/TextAppeara
nce.StatusBar'.
C:\Windows\SystemUI\res\values\styles.xml:8: error: Error retrieving parent for
item: No resource found that matches the given name '@*android:style/TextAppeara
nce.Large'.
C:\Windows\SystemUI\res\values\styles.xml:11: error: Error retrieving parent for
item: No resource found that matches the given name '@*android:style/Widget.But
ton'.
C:\Windows\SystemUI\res\values\styles.xml:16: error: Error retrieving parent for
item: No resource found that matches the given name '@*android:style/TextAppear
ance.StatusBar'.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 10, --target-sdk-ver
sion, 10, -F, C:\Users\Mama\AppData\Local\Temp\APKTOOL1762758136473137198.tmp, -
I, C:\Users\Mama\apktool\framework\1.apk, -S, C:\Windows\SystemUI\res, -M, C:\Wi
ndows\SystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:255)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:324)
at brut.androlib.Androlib.buildResources(Androlib.java:269)
at brut.androlib.Androlib.build(Androlib.java:192)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:188)
at brut.apktool.Main.main(Main.java:70)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, --min-sd
k-version, 10, --target-sdk-version, 10, -F, C:\Users\Mama\AppData\Local\Temp\AP
KTOOL1762758136473137198.tmp, -I, C:\Users\Mama\apktool\framework\1.apk, -S, C:\
Windows\SystemUI\res, -M, C:\Windows\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:253)
... 6 more
C:\Windows>
I know that some of the .xml file might be wrong but i tried just decompiling and recompiling the SystemUI.apk and the same error appear...
Is there something im doing wrong??
Please help!!!!!!
maybe posting in the thread for apktool might get you help faster
and nice revive of a 10 month old dead thread

Decompile APK with apktool and deodex without errors

Hi
i hope someone could help me please.
Id like to deodex the 10E version for D802.
But with some apps i have problems to do this!
A lot off errors.
Dont know why.
But my main problem is, to mod the LGSystemUI.apk!
Decompile with apktool is not the problem, but i cant get it back!
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:164)
at brut.androlib.Androlib.build(Androlib.java:183)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:160)
... 4 more
Please could someone tell my what this error cause?
I guess missing framework files.
But all apk inside Framework foldes i but with if xxx with apktool!
Please help
Big thanks!

[Solved] Error in decompiling and recompiling systemui

Hey everyone,
Im trying to decompile systemui using , i get these list of errors. What's possibly wrong? Im on Reincarnation V6
D:\SGYroms\apktool1.5.2>apktool d systemui.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\user\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
Exception in thread "main" brut.androlib.err.UndefinedResObject: resource spec:
0x0101038c
at brut.androlib.res.data.ResPackage.getResSpec(ResPackage.java:61)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:58)
at brut.androlib.res.data.ResTable.getResSpec(ResTable.java:54)
at brut.androlib.res.data.value.ResReferenceValue.getReferent(ResReferenceValue.java:62)
at brut.androlib.res.data.value.ResStyleValue.serializeToResValuesXml(ResStyleValue.java:51)
at brut.androlib.res.AndrolibResources.generateValuesFile(AndrolibResources.java:440)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:243)
at brut.androlib.Androlib.decodeResourcesFull(Androlib.java:115)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Errors on recompiling...
D:\SGYroms\apktool1.5.2>apktool b -f -d systemui
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.PathN
otExist: apktool.yml
at brut.androlib.Androlib.readMetaFile(Androlib.java:164)
at brut.androlib.Androlib.build(Androlib.java:183)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.directory.PathNotExist: apktool.yml
at brut.directory.AbstractDirectory.getFileInput(AbstractDirectory.java:
103)
at brut.androlib.Androlib.readMetaFile(Androlib.java:160)
... 4 more
D:\SGYroms\apktool1.5.2>
decompiling error is caused by wrong framework being used - You wont be able to recompile because the resources were not decompiled
Make sure you use correct framework-res.apk - This may not always be the one that comes with the rom as it may of been compiled with jellybean framework
You can try loading this framework and then try to decompile
http://d-h.st/zAg
marcussmith2626 said:
decompiling error is caused by wrong framework being used - You wont be able to recompile because the resources were not decompiled
Make sure you use correct framework-res.apk - This may not always be the one that comes with the rom as it may of been compiled with jellybean framework
You can try loading this framework and then try to decompile
http://d-h.st/zAg
Click to expand...
Click to collapse
Thanks for reply, Decompiling worked like a charm ..but i got these errors while installing framework?
D:\SGYroms\apktool1.5.2>apktool if framework-res.apk
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: drawable-nodpi-v8-ERR0
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: drawable-v8-ERR1
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: drawable-hdpi-v8-ERR2
I: Framework installed to: C:\Users\user\apktool\framework\1.apk
and these on recompiling systemui
D:\SGYroms\apktool1.5.2>apktool b systemui.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.Direc
toryException: java.io.FileNotFoundException: systemui.apk (The system cannot fi
nd the file specified)
at brut.androlib.Androlib.readMetaFile(Androlib.java:164)
at brut.androlib.Androlib.build(Androlib.java:183)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.directory.DirectoryException: java.io.FileNotFoundException: sys
temui.apk (The system cannot find the file specified)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)
at brut.androlib.res.util.ExtFile.getDirectory(ExtFile.java:55)
at brut.androlib.Androlib.readMetaFile(Androlib.java:160)
... 4 more
Caused by: java.io.FileNotFoundException: systemui.apk (The system cannot find t
he file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)
... 7 more
D:\SGYroms\apktool1.5.2>
marcusflint said:
Thanks for reply, Decompiling worked like a charm ..but i got these errors while installing framework?
D:\SGYroms\apktool1.5.2>apktool if framework-res.apk
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: drawable-nodpi-v8-ERR0
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: drawable-v8-ERR1
W: Config flags size > 36. Exceeding bytes: 0x2000000.
W: Invalid config flags detected: drawable-hdpi-v8-ERR2
I: Framework installed to: C:\Users\user\apktool\framework\1.apk
and these on recompiling systemui
D:\SGYroms\apktool1.5.2>apktool b systemui.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.Direc
toryException: java.io.FileNotFoundException: systemui.apk (The system cannot fi
nd the file specified)
at brut.androlib.Androlib.readMetaFile(Androlib.java:164)
at brut.androlib.Androlib.build(Androlib.java:183)
at brut.androlib.Androlib.build(Androlib.java:176)
at brut.apktool.Main.cmdBuild(Main.java:228)
at brut.apktool.Main.main(Main.java:79)
Caused by: brut.directory.DirectoryException: java.io.FileNotFoundException: sys
temui.apk (The system cannot find the file specified)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)
at brut.androlib.res.util.ExtFile.getDirectory(ExtFile.java:55)
at brut.androlib.Androlib.readMetaFile(Androlib.java:160)
... 4 more
Caused by: java.io.FileNotFoundException: systemui.apk (The system cannot find t
he file specified)
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)
... 7 more
D:\SGYroms\apktool1.5.2>
Click to expand...
Click to collapse
framework install is normal - thats fine no problem there
recompile is because you have typed in the incorrect commands
the command should be (assuming the command prompt is at the correct location)
apktool b NameOfDecompiledFolder NameYouWantForNewApk.apk
eg
apktool b mydecompiledsystemui mynewsystemui.apk
the command should be (assuming the command prompt is at the correct location)
apktool b NameOfDecompiledFolder NameYouWantForNewApk.apk
eg
apktool b mydecompiledsystemui mynewsystemui.apk
Click to expand...
Click to collapse
Ah my bad, working fine now, thanks for your help

[Q] trouble recompiling apks

I am getting the following errors when I attempt to decompile GoogleLatinIME.apk(copied directly from system- app) and SamsungIME.apk(downloaded from xda thread) with apktool I put the framework-res.apk and SystemUI.apk into the framework folder by running command prompt - apktool if .... , also I tried adding twframework-res.apk to the framework folder in apktool. I am running http://forum.xda-developers.com/ver.../rom-eclipse-s5-tw-v1-0-12-8-14-real-t2967151
The possibility exists that I have no idea what I am doing so any help is much appreciated. Thanks!!!
C:\Users\GLEN\apktools\phone\apktool>apktool d GoogleLatin.apk
Input file (GoogleLatin.apk) was not found or was not readable.
C:\Users\GLEN\apktools\phone\apktool>apktool d GoogleLatinIME.apk
I: Baksmaling...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Could not decode ars
c file
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:56)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibRes
ources.java:491)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.jav
a:74)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.jav
a:66)
at brut.androlib.Androlib.getResTable(Androlib.java:50)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:189)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:114)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: java.io.IOException: Expected: 0x001c0001, got: 0x00000000
at brut.util.ExtDataInput.skipCheckInt(ExtDataInput.java:48)
at brut.androlib.res.decoder.StringBlock.read(StringBlock.java:44)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
2)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:83)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:49)
... 8 more
C:\Users\GLEN\apktools\phone\apktool>apktool d SamsungIME.apk
Exception in thread "main" brut.androlib.AndrolibException: brut.directory.Direc
toryException: java.util.zip.ZipException: error in opening zip file
at brut.androlib.ApkDecoder.hasSources(ApkDecoder.java:199)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:83)
at brut.apktool.Main.cmdDecode(Main.java:146)
at brut.apktool.Main.main(Main.java:77)
Caused by: brut.directory.DirectoryException: java.util.zip.ZipException: error
in opening zip file
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:55)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:38)
at brut.androlib.res.util.ExtFile.getDirectory(ExtFile.java:55)
at brut.androlib.ApkDecoder.hasSources(ApkDecoder.java:197)
... 3 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at brut.directory.ZipRODirectory.<init>(ZipRODirectory.java:53)
... 6 more
C:\Users\GLEN\apktools\phone\apktool>

[mod] SystemUI

Hi to all, How I do to decompiler SystemUI.apk, my device is p8lite? I tryed with apktool, but I can not
My errors:
Code:
C:\Program Files (x86)\Minimal ADB and Fastboot>apktool d SystemUI.apk
I: Using Apktool 2.0.3 on SystemUI.apk
I: Loading resource table...
I: Decoding Shared Library (androidhwext), pkgId: 2
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f020244 drawable/stat_sys_data_connected_2g, config=-notround-xhdpi
at brut.androlib.res.data.ResType.addResource(ResType.java:66)
at brut.androlib.res.data.ResType.addResource(ResType.java:55)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:252)
at brut.androlib.res.decoder.ARSCDecoder.readTableType(ARSCDecoder.java:212)
at brut.androlib.res.decoder.ARSCDecoder.readTableTypeSpec(ARSCDecoder.java:154)
at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:116)
at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:544)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:63)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:55)
at brut.androlib.Androlib.getResTable(Androlib.java:66)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:198)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:96)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
Why? where am I wrong?
up
linus2014 said:
Hi to all, How I do to decompiler SystemUI.apk, my device is p8lite? I tryed with apktool, but I can not
My errors:
Code:
C:\Program Files (x86)\Minimal ADB and Fastboot>apktool d SystemUI.apk
I: Using Apktool 2.0.3 on SystemUI.apk
I: Loading resource table...
I: Decoding Shared Library (androidhwext), pkgId: 2
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources: spec=0x7f020244 drawable/stat_sys_data_connected_2g, config=-notround-xhdpi
at brut.androlib.res.data.ResType.addResource(ResType.java:66)
at brut.androlib.res.data.ResType.addResource(ResType.java:55)
at brut.androlib.res.decoder.ARSCDecoder.readEntry(ARSCDecoder.java:252)
at brut.androlib.res.decoder.ARSCDecoder.readTableType(ARSCDecoder.java:212)
at brut.androlib.res.decoder.ARSCDecoder.readTableTypeSpec(ARSCDecoder.java:154)
at brut.androlib.res.decoder.ARSCDecoder.readTablePackage(ARSCDecoder.java:116)
at brut.androlib.res.decoder.ARSCDecoder.readTableHeader(ARSCDecoder.java:78)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:47)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:544)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:63)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:55)
at brut.androlib.Androlib.getResTable(Androlib.java:66)
at brut.androlib.ApkDecoder.setTargetSdkVersion(ApkDecoder.java:198)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:96)
at brut.apktool.Main.cmdDecode(Main.java:165)
at brut.apktool.Main.main(Main.java:81)
Why? where am I wrong?
Click to expand...
Click to collapse
Huawei SystemUI's can't be decompiled, Huawei doesn't want us to mess with their stuff.
XePeleato said:
Huawei SystemUI's can't be decompiled, Huawei doesn't want us to mess with their stuff.
Click to expand...
Click to collapse
I understood, but there must be a way, they do their Huawei and we do not.

Categories

Resources