Error on compile with apktool - Android Software/Hacking General [Developers Only]

Apktool Version -2.6.1
Operating System -Windows
APK From -ROM android 12
log from apk easy tool:
[all log](https://github.com/iBotPeaches/Apktool/files/8921654/RecentLog-Instance1.txt)
```
I: Using Apktool 2.6.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether sources has changed...
I: Smaling smali_classes2 folder into classes2.dex...
I: Checking whether resources has changed...
I: Building resources...
W: C:\Users\mor\Documents\APK Easy Tool\1-Decompiled APKs\MtkSettings\res\values\attrs.xml:55: error: duplicate symbol '@null'.
```
Frameworks:
framework-res.apk
framework dolder
APK:
https://drive.google.com/file/d/1XA3UTWS91GeF72Gdfj852ZLQIZc5kWkw/view?usp=sharing (settings app)
Thanks.

Related

[Resolved] Newsbie question: apktool - recompiled binary is not installable

Hi,
first of all sorry for posting in a new thread, but I'm not allowed to post in apktool-thread (to few postings).
I'm trying to edit permissions of apk's with apktool.
Code:
C:\temp\android\apktool>apktool d -s -f "n:\Cut the Rope - Android\cut-the-rope.apk" test
I: Copying raw classes.dex file...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Carsten\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
No, errors.
I reassemble it unmodified.
Code:
C:\temp\android\apktool>apktool b test test.apk
I: Copying classes.dex file...
I: Checking whether resources has changed...
I: Building resources...
I: Copying libs...
I: Building apk file...
No, errors.
Installing the file
Code:
F:\android-sdk-windows\platform-tools>adb install c:test.apk
2327 KB/s (2931257 bytes in 1.230s)
pkg: /data/local/tmp/c:test.apk
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
gives an error.
Code:
$logcat *:e
/PackageParser( 460): Package com.feelingtouch.physical has no certificates at entry assets/font/Plok.ttf; ignoring!
Any ideas what's wrong?
greetings
Carsten
found the solution. All packages have to be signed, even if they are installed via adb.
Debug test signing is enough:
Code:
jarsigner -verbose -keystore C:\Users\Carsten\.android\debug.keystore -storepass android c:test.apk androiddebugkey

[Q] Apk Manager SystemUI.apk Compile Problem

Hello my friends.
I installed frameworkres and tw framework resources files. I decompiled SystemUI.apk and changed drawables.xml and status bar smali.
But I can't compile SystemUI.apk Error.
Log is here :
Code:
java version "1.7.0_05"
Java(TM) SE Runtime Environment (build 1.7.0_05-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
C:\Windows\SysWOW64\Apk Manager\place-apk-here-for-modding\../place-apk-here-for-modding/signedSystemUI.apk BulunamadĀ
C:\Windows\SysWOW64\Apk Manager\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedSystemUI.apk BulunamadĀ
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\HP\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" java.lang.NullPointerException
at org.jf.util.PathUtil.getRelativeFile(PathUtil.java:44)
at org.jf.smali.smaliFlexLexer.getSourceName(smaliFlexLexer.java:2922)
at org.antlr.runtime.CommonTokenStream.getSourceName(CommonTokenStream.java:345)
at org.antlr.runtime.tree.CommonTreeNodeStream.getSourceName(CommonTreeNodeStream.java:106)
at org.antlr.runtime.tree.TreeP****r.getSourceName(TreeP****r.java:78)
at org.jf.smali.smaliTreeWalker.getErrorHeader(smaliTreeWalker.java:372)
at org.antlr.runtime.BaseRecognizer.displayRecognitionError(BaseRecognizer.java:192)
at org.antlr.runtime.BaseRecognizer.reportError(BaseRecognizer.java:186)
at org.jf.smali.smaliTreeWalker.smali_file(smaliTreeWalker.java:451)
at brut.androlib.mod.SmaliMod.assembleSmaliFile(SmaliMod.java:85)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:43)
at brut.androlib.src.DexFileBuilder.addSmaliFile(DexFileBuilder.java:33)
at brut.androlib.src.SmaliBuilder.buildFile(SmaliBuilder.java:64)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:48)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:243)
at brut.androlib.Androlib.buildSources(Androlib.java:200)
at brut.androlib.Androlib.build(Androlib.java:191)
at brut.androlib.Androlib.build(Androlib.java:174)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
up

Decompiling Settings.apk on Xperia V - Android 4.3

I'm using android 4.3 stock version of framework-res.apk to decompile Settings.apk but Apktool 1.5.2 & Apktool 2.0 beta are giving me this error :
"Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info."
any help ?
Found the Problem & fixed apktool
apparently I needed to install SemcGenericUxpRes.apk before decompiling the Settings.apk file, another problem presented itself at this point..
installing SemcGenericUxpRes.apk using apktool 2.0 beta 7 resulted an error :
Exception in thread "main" brut.androlib.AndrolibException: Multiple types: <emp
ty>
at brut.androlib.res.data.ResPackage.addType(ResPackage.java:168)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:131)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:10
9)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:81)
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:686)
at brut.androlib.Androlib.installFramework(Androlib.java:640)
at brut.apktool.Main.cmdInstallFramework(Main.java:249)
at brut.apktool.Main.main(Main.java:91)
so I did some research and fixed the 'Multiple types' bug in apktool (I'll attach the fixed version at the end of the post) ,and now every thing worked just fine ^_^
C:\apk>java -jar apktool-fixed.jar if framework-res.apk
I: Framework installed to: C:\Users\User\apktool\framework\1.apk
C:\apk>java -jar apktool-fixed.jar if SemcGenericUxpRes.apk
I: Framework installed to: C:\Users\User\apktool\framework\2.apk
C:\apk>java -jar apktool-fixed.jar d Settings.apk
I: Using Apktool 2.0.0-Beta7 on Settings.apk
I: Loading resource table...
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\User\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Loading resource table from file: C:\Users\User\apktool\framework\2.apk
Cleaning up unclosed ZipFile for archive C:\Users\User\apktool\framework\2.apk
I: Loading resource table...
Cleaning up unclosed ZipFile for archive C:\Users\User\apktool\framework\1.apk
I: Copying assets and libs...
I: Copying unknown files/dir...
I: Copying original files...
fixed apktool 2.0 beta 7 (remove spaces from the url) : http :// www . mediafire . com /?cnstb97sszm476y
delete as I found the answer, please ignore

[Q] Help can't decompile Settings.apk using apk multitool

I am decompiling the Settings.apk for a custom rom but I got this error. How do I fix it?
--------------------------------------------------------------------------
|Sat 05/30/2015 -- 10:04:54.45|
--------------------------------------------------------------------------
java version "1.8.0_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Limpocyte\apktool\framework\1.apk
I: Loaded.
I: Regular manifest package...
I: Decoding file-resources...
Exception in thread "main" java.lang.NullPointerException
at brut.androlib.res.decoder.Res9patchStreamDecoder.decode(Res9patchStreamDecoder.java:37)
at brut.androlib.res.decoder.ResStreamDecoderContainer.decode(ResStreamDecoderContainer.java:34)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:107)
at brut.androlib.res.decoder.ResFileDecoder.decode(ResFileDecoder.java:73)
at brut.androlib.res.AndrolibResources.decode(AndrolibResources.java:238)
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)
Also I am using the version 1.0.11 of APK multitool.

[Q&A][LP][5.0.2]Decompile Settings.apk error

Everything works like a charm when I decompile other APKS but when I tried settings.apk it didn't work saying this error.
I have installed everything like deodexed systemui.apk and framework-res.apk.
I dont know weather its with SemcGenericUxpRes or some stuff.
C:\apktool>apktool d settings.apk
I: Using Apktool 2.0.0 on settings.apk
I: Loading resource table...
I: Decoding Shared Library (com.sonyericsson.uxp), pkgId: 2
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\m0rpheus\apktool\framework\1.apk
I: Decoding Shared Library (com.sonyericsson.uxp), pkgId: 2
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
Can't find framework resources for package of id: 2. You must install proper framework files, see project website for more info.
Help anyone!
Its fixed now I installed com.sonyericsson.uxp.apk to framework files and its working now.
Mod please delete this thread
HOW
how can you installer the com.sonyericsson.uxp.apk to framework ?

Categories

Resources