Related
i'm struggling to recompile systemui from rcmix 4.0
1st of all, no edits have been made, so there is no issue in that direction.
the problem is i think in recompliling smali, which makes app fc.
i used apk manager 4.9 and apk multitool v 1.0.2. they both give an error about a file not found when compliling:
2012-02-29 02:15:58 (3,98 MB/s) - `apkver.txt' saved [152/152]
A subdirectory or file projects already exists.
A subdirectory or file place-apk-here-for-modding already exists.
A subdirectory or file place-ogg-here already exists.
A subdirectory or file place-apk-here-to-batch-optimize already exists.
A subdirectory or file place-apk-here-for-signing already exists.
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
I: Framework installed to: C:\Users\Tomi\apktool\framework\1.apk
I: Framework installed to: C:\Users\Tomi\apktool\framework\1.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Tomi\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\Tomi\apktool\framework\2.apk
I: Loaded.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
The system cannot find the file specified.
but seem to build apk fine (roughly the same size and structure)
then i tried using apktool 1.4.3, installed framework, decompliled and recompiled with no error at all, drag and dropped classes.dex from recompiled apk to original (because of signatures) and push to phone and it crashes.
C:\Users\Tomi\Desktop\apktool>apktool if C:\Users\Tomi\Desktop\apktool\framework-res.apk
I: Framework installed to: C:\Users\Tomi\apktool\framework\1.apk
C:\Users\Tomi\Desktop\apktool>apktool d SystemUI.apk sysui
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Tomi\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Loading resource table from file: C:\Users\Tomi\apktool\framework\2.apk
I: Loaded.
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\Users\Tomi\Desktop\apktool>apktool b sysui test3.apk
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
I: Building apk file...
C:\Users\Tomi\Desktop\apktool>
am i doing something wrong? where? any help much appreciated
i figured my problem lies somewhere in signatures of the app. it gets broken even if i drag/drop classes.dex from one original file to another, tried using 7zip and winrar. any suggestions?
since this is a monologue, lets finish it if someone ever bumps into it
i didnt resign it at first and i read several posts against signing system apks
http://forum.xda-developers.com/showthread.php?t=822388
Before you get the idea please consider to thank Препод, poppuri and sk0t (from 4pda.ru) for their time and hard work, all credits go to them.
Here we go, the idea is simple , decompile "lidroid-res.apk", open "apktool.yml", you will find this :
Code:
version: 1.4.5
apkFileName: lidroid-res.apk
isFrameworkApk: true
usesFramework:
ids:
- 1
If you keep the "- 1" it will uses only one framework, you have to add "2", like this :
Code:
version: 1.4.5
apkFileName: lidroid-res.apk
isFrameworkApk: true
usesFramework:
ids:
- 1
- 2
Done, make your changes and re-compile, use my Apk_Manager if you have any trouble with ICS files.
Thanks again to Препод & poppuri & sk0t, don't forget to credit them.
as 2.apk - do I need to install twframework-res.apk or lidroid-res.apk?
firefds said:
as 2.apk - do I need to install twframework-res.apk or lidroid-res.apk?
Click to expand...
Click to collapse
i think you will need twframework-res.apk.
So, now we can translate to own languages the lidroid toggles, right?
Krendelrus said:
So, now we can translate to own languages the lidroid toggles, right?
Click to expand...
Click to collapse
Yes, it should work.
Very useful, thanks.
Lovely bit of info, cheers Wanam - works perfect
I can't thank you enough for this sir!
yoderk said:
I can't thank you enough for this sir!
Click to expand...
Click to collapse
You are welcome.
sorry for beeing noob, but after editing apktool.yml and compiling (11) i get an error "An error occured, please check the log..."
Schneckmeier said:
sorry for beeing noob, but after editing apktool.yml and compiling (11) i get an error "An error occured, please check the log..."
Click to expand...
Click to collapse
Get me the log.
I used your Apk_Manager_ICS:
Code:
|11.04.2012 -- 18:31:21,04|
--------------------------------------------------------------------------
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
I: Framework installed to: C:\Users\Schneckmeier\apktool\framework\2.apk
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Schneckmeier\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at brut.androlib.Androlib.parseUsesFramework(Androlib.java:399)
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:182)
at brut.apktool.Main.main(Main.java:67)
Schneckmeier said:
I used your Apk_Manager_ICS:
Code:
|11.04.2012 -- 18:31:21,04|
--------------------------------------------------------------------------
java version "1.6.0_24"
Java(TM) SE Runtime Environment (build 1.6.0_24-b07)
Java HotSpot(TM) 64-Bit Server VM (build 19.1-b02, mixed mode)
I: Framework installed to: C:\Users\Schneckmeier\apktool\framework\2.apk
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Schneckmeier\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
at brut.androlib.Androlib.parseUsesFramework(Androlib.java:399)
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:182)
at brut.apktool.Main.main(Main.java:67)
Click to expand...
Click to collapse
Maybe because you used the second solution, i removed it from the first page.
Use this one instead :
Code:
version: 1.4.5
apkFileName: lidroid-res.apk
isFrameworkApk: true
usesFramework:
ids:
- 1
- 2
re-installed newer java runtime environment 1.7.0_03 and used your second method now it works! Thanks wanam for help!!
Schneckmeier said:
re-installed newer java runtime environment 1.7.0_03 and used your second method now it works! Thanks wanam for help!!
Click to expand...
Click to collapse
It should work with jre 1.5 too.
is there anyway to change the "hamster" text in the values folder as everytime i recompile, i get a systemui error? im assuming i need to edit the text in strings.xml but still not working. any ideas? thx
dead0 said:
is there anyway to change the "hamster" text in the values folder as everytime i recompile, i get a systemui error? im assuming i need to edit the text in strings.xml but still not working. any ideas? thx
Click to expand...
Click to collapse
Any logs?
wanam said:
Any logs?
Click to expand...
Click to collapse
there were no errors in the log after compiling but i didn't edit the apktool.yml. everytime i edit *.yml i get compile error as posted above
tried again by just editing the apktool.yml as per your suggestion but get a compile error:
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
Could Not Find C:\Users\Administrator\Desktop\Apk_Manager_ICS\place-apk-here-for-modding\../place-apk-here-for-modding/signedlidroid-res.apk
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Administrator\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.err.CantFindFrameworkResException
at brut.androlib.res.AndrolibResources.getFrameworkApk(AndrolibResources.java:366)
at brut.androlib.Androlib.parseUsesFramework(Androlib.java:400)
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:182)
at brut.apktool.Main.main(Main.java:67)
Hi Wanam, how do you mod it so it doesn't say 'wanam lite' on the shut down dialog?
dead0 said:
there were no errors in the log after compiling but i didn't edit the apktool.yml. everytime i edit *.yml i get compile error as posted above
tried again by just editing the apktool.yml as per your suggestion but get a compile error:
java version "1.7.0_03"
Java(TM) SE Runtime Environment (build 1.7.0_03-b05)
Java HotSpot(TM) 64-Bit Server VM (build 22.1-b02, mixed mode)
Could Not Find C:\Users\Administrator\Desktop\Apk_Manager_ICS\place-apk-here-for-modding\../place-apk-here-for-modding/signedlidroid-res.apk
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Administrator\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
Exception in thread "main" brut.androlib.err.CantFindFrameworkResException
at brut.androlib.res.AndrolibResources.getFrameworkApk(AndrolibResources.java:366)
at brut.androlib.Androlib.parseUsesFramework(Androlib.java:400)
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:182)
at brut.apktool.Main.main(Main.java:67)
Click to expand...
Click to collapse
Push framework-res.apk (apktool if framework-res.apk).
kowcop said:
Hi Wanam, how do you mod it so it doesn't say 'wanam lite' on the shut down dialog?
Click to expand...
Click to collapse
Edit /res/values/strings.xml.
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)
I don't know what that error means but your apk manager is having problems with the smali
Try just doing the drawables with apk manager and see if that works...if it does work try the smali with this
Thank you but I have a problem. I don't know how can I use this tool.
Guide is here : http://forum.xda-developers.com/showthread.php?t=1136625
but links are broken.
You could try that what jarmezrocks has posted on that thread or post on it for some help.
I may still have the video/s from that tut and i can check tonight when I'm back at my pc but if you google 'smali baksmali tutorial' you should be able to find all the Info you need...and more...it's all out there
Sent from my GT-I9100 using xda premium
Arnadel said:
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)
Click to expand...
Click to collapse
hello Sir.. there must be something to do with the codings in the statusbar .smali file.. try to inspect the codes again. it could be wrong codes that u have inserted. I ever came across these errors before when I tried to change some codes .smali file.. I managed to recompile when I reverted the original codes back..
Hy.
I always got any little problem witc compile/decompile XXLJS systemui.apk.
I have tried apkmanager 5.02., and apk multy tool with:
apktool 1.4.0,
apktool 1.4.1,
apktool 1.4.2,
apktool 1.4.3,
apktool 1.4.4,
apktool 1.4.5,
apktool 1.4.10,
apktool 1.5.0,
apktool 1.5.1,
.......and no succes. What do I wrong???
Please help me to make more modded apk-s to xxljs roms.
/ I use windows 8/
Thanx.
bezke said:
Hy.
I always got any little problem witc compile/decompile XXLJS systemui.apk.
I have tried apkmanager 5.02., and apk multy tool with:
apktool 1.4.0,
apktool 1.4.1,
apktool 1.4.2,
apktool 1.4.3,
apktool 1.4.4,
apktool 1.4.5,
apktool 1.4.10,
apktool 1.5.0,
apktool 1.5.1,
.......and no succes. What do I wrong???
Please help me to make more modded apk-s to xxljs roms.
/ I use windows 8/
Thanx.
Click to expand...
Click to collapse
i also have warnings when compiling. the trick is to copy the files from the modded SystemUI.apk into the original SystemUI.apk
- geroxx -
bezke said:
Hy.
I always got any little problem witc compile/decompile XXLJS systemui.apk.
I have tried apkmanager 5.02., and apk multy tool with:
apktool 1.4.0,
apktool 1.4.1,
apktool 1.4.2,
apktool 1.4.3,
apktool 1.4.4,
apktool 1.4.5,
apktool 1.4.10,
apktool 1.5.0,
apktool 1.5.1,
.......and no succes. What do I wrong???
Please help me to make more modded apk-s to xxljs roms.
/ I use windows 8/
Thanx.
Click to expand...
Click to collapse
I've just checked decompiling / compiling the SystemUI.apk (from the XXLSJ) and everything works well, with just a "standalone" apktool (1.5.0.5), on Windows 7.
Have you installed the frameworks?
Installing frameworks:
Command:
Code:
apktool if XXLSJ\framework-res.apk
Result:
Code:
I: Framework installed to: C:\Users\Gyebro\apktool\framework\1.apk
Command:
Code:
apktool if XXLSJ\twframework-res.apk
Result:
Code:
I: Framework installed to: C:\Users\Gyebro\apktool\framework\2.apk
Then testing decompile:
Command:
Code:
apktool d SystemUI.apk SystemUI_XXLSJ
Result:
Code:
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Gyebro\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Done.
I: Copying assets and libs...
Finally test-recompile also finishes without errors:
Command:
Code:
apktool b SystemUI_XXLSJ SystemUI_custom.apk
Result:
Code:
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'abbrev_wday_abbrev_month_day_no_year' has no default translation ...
... [I]some aapt:warnings that translations are missing[/I] ...
I: Building apk file...
If you want to use APKMultiTool, then you either install frameworks first with running the apktool from command line, or install the frameworks by choosing the "decompile apk with dependencies" option. (But I recommend using the apktool if command)
You only need to install frameworks once. (They are stored in C:\Users\username\apktool\1.apk and 2.apk)
Search for Apk manager for ICS.
Don't remember where I founded but works!
EDIT: Wanam apk manager ICS.
I'm not home now but I remember this apk manager is made by Wanam...search in his HP mate! If you want when I arrive at home I can upload for you and send Google docs link.
Good lucky
Sent from my GT-I9100 using xda app-developers app
i get some zip error
Try Apk Changer. It works with windows 8.
http://forum.xda-developers.com/showthread.php?t=1189971
hi all..
I am trying to decomiple and then recompile SecContacts.apk from Lollipop 5.0 Rom..
It decompiles and recompiles fine but when I Push it to phone set Permissions and reboot it doesn't work..
I tried different versions of apktool but all have same result..
the error is "Parse error, There was a problem while parsing the package"
can anyone guide on how to recompile secContacts.apk
PS : i) Compiling decompiling works well for other apks including SystemUi, TWHome etc
ii) I tried 3 different SecContacts.apk from different 5.0 TW Roms and even 3,4 different aptools.. all have same result
Hi LAzY_kRAzY
1st) You MUST use SecContacts from your own ROM only. Do not try others.
2sd) When do you get this "Parser Error"? This error should be issued while compiling, not executing. Please be more detailed.
3rd) How did you do things? Decompiling/Recompiling with some tool set?
-=-=-=-=-=
How it should work:
a) Download last ApkTool 2.1.1
b) Be sure to have Java 1.7 installed
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
c) Extract from your ROM or Device the following files:
Code:
system/priv-app/SecContacts.apk
system/framework/framework-res.apk
system/framework/twframework-res.apk
Note: ALL files should be at the same folder
d) Install framework files at the command prompt:
Code:
c:>java -jar apktool_2.1.1.jar if framework-res.apk
...
c:>java -jar apktool_2.1.1.jar if twframework-res.apk
e) Decompile Contacts at the command prompt
Code:
c:>java -jar apktool_2.1.1.jar d SecContacts.apk -f
-f = if last decompile failed, it will overwrite
DO NO CHANGES AT ALL
f) Build Contacts at the command prompt
Code:
c:>java -jar apktool_2.1.1.jar b SecContacts -c
-c = Copies original AndroidManifest.xml and META-INF.
If you perform exactly these steps, does it work?
Any message different from success should be presented. The more details the better support you get.
Let us know.
Nice regards.
.
LAzY_kRAzY said:
hi all..
I am trying to decomiple and then recompile SecContacts.apk from Lollipop 5.0 Rom..
It decompiles and recompiles fine but when I Push it to phone set Permissions and reboot it doesn't work..
I tried different versions of apktool but all have same result..
the error is "Parse error, There was a problem while parsing the package"
can anyone guide on how to recompile secContacts.apk
PS : i) Compiling decompiling works well for other apks including SystemUi, TWHome etc
ii) I tried 3 different SecContacts.apk from different 5.0 TW Roms and even 3,4 different aptools.. all have same result
Click to expand...
Click to collapse
Kdio said:
Hi LAzY_kRAzY
1st) You MUST use SecContacts from your own ROM only. Do not try others.
2sd) When do you get this "Parser Error"? This error should be issued while compiling, not executing. Please be more detailed.
3rd) How did you do things? Decompiling/Recompiling with some tool set?
-=-=-=-=-=
How it should work:
a) Download last ApkTool 2.1.1
b) Be sure to have Java 1.7 installed
c) Extract from your ROM or Device the following files:
Code:
system/priv-app/SecContacts.apk
system/framework/framework-res.apk
system/framework/twframework-res.apk
Note: ALL files should be at the same folder
d) Install framework files at the command prompt:
Code:
c:>java -jar apktool_2.1.1.jar if framework-res.apk
...
c:>java -jar apktool_2.1.1.jar if twframework-res.apk
e) Decompile Contacts at the command prompt
Code:
c:>java -jar apktool_2.1.1.jar d SecContacts.apk -f
-f = if last decompile failed, it will overwrite
DO NO CHANGES AT ALL
f) Build Contacts at the command prompt
Code:
c:>java -jar apktool_2.1.1.jar b SecContacts -c
-c = Copies original AndroidManifest.xml and META-INF.
If you perform exactly these steps, does it work?
Any message different from success should be presented. The more details the better support you get.
Let us know.
Nice regards.
.
Click to expand...
Click to collapse
1st) I tried other secContacts.apk to test if they work fine.. If I am will use anything other than stock I will obviously ask for permission and give proper credits
2nd) I tried this using latest apktool and java versions.. I also tried TickelMyAndroid tool..
I am only getting this error with secContacts.apk
I themed stock SystemUI and TouchWiz for G900H.. decompiled and recompiled them using same tools.. they all work fine..
I get no error while compiling the apk but when I push it to phone and replace it in Priv-app/SecContacts set permissions and reboot it doesnt install like others.. If I click it and try to install like an apk it says Parsse Error..
P.S: I googled about this issue and I found out few other users also have this problem with 5.0 TW SecContats.apk but no solution was available
Hi LAzY_kRAzY
Please perform the experiment exactly as I've gave you making no modifications to SecContacts before building it and report back.
This is computer science and HAS to work.
Nice regards.
.
LAzY_kRAzY said:
1st) I tried other secContacts.apk to test if they work fine.. If I am will use anything other than stock I will obviously ask for permission and give proper credits
2nd) I tried this using latest apktool and java versions.. I also tried TickelMyAndroid tool..
I am only getting this error with secContacts.apk
I themed stock SystemUI and TouchWiz for G900H.. decompiled and recompiled them using same tools.. they all work fine..
I get no error while compiling the apk but when I push it to phone and replace it in Priv-app/SecContacts set permissions and reboot it doesnt install like others.. If I click it and try to install like an apk it says Parsse Error..
P.S: I googled about this issue and I found out few other users also have this problem with 5.0 TW SecContats.apk but no solution was available
Click to expand...
Click to collapse
ok sure..
I tried earlier by recompiling without any modification but result was same..
I had java 1.8 installed.. will try with v 1.7..
will report soon
Kdio said:
Hi LAzY_kRAzY
Please perform the experiment exactly as I've gave you making no modifications to SecContacts before building it and report back.
This is computer science and HAS to work.
Nice regards.
.
Click to expand...
Click to collapse
tried exactly as u mentioned but similar results
Code:
C:\Apktool 2.1.1>java -jar apktool_2.1.1.jar if framework-res.apk
I: Framework installed to: C:\Users\Shoaib Nawaz\apktool\framework\1.apk
C:\Apktool 2.1.1>java -jar apktool_2.1.1.jar if twframework-res.apk
I: Framework installed to: C:\Users\Shoaib Nawaz\apktool\framework\2.apk
C:\Apktool 2.1.1>java -jar apktool_2.1.1.jar d SecContacts.apk
I: Using Apktool 2.1.1 on SecContacts.apk
I: Loading resource table...
I: Decoding Shared Library (touchwiz), pkgId: 2
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Shoaib Nawaz\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
C:\Apktool 2.1.1>java -jar apktool_2.1.1.jar b SecContacts -c
I: Using Apktool 2.1.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'action_menu_add_new_contact_button' has no default translation.
W: warning: string 'callmessage_kor_lgt' has no default translation.
W: warning: string 'contact_tips_button_to_manage_our_groups' has no default translation.
W: warning: string 'emergency_service' has no default translation.
W: warning: string 'fail_to_find_address_dialog_message' has no default translation.
W: warning: string 'guide_dialer_make_call_with_this_number' has no default translation.
W: warning: string 'guide_dialer_tap_to_write_your_number' has no default translation.
W: warning: string 'menu_add' has no default translation.
W: warning: string 'pick_smemo' has no default translation.
W: warning: string 'selected_cocktail_count' has no default translation.
W: warning: string 'tab_logs_verizon_lra' has no default translation.
W: warning: string 'tab_logs_verizon_uscc' has no default translation.
W: warning: string 'too_many_find_address_dialog_message' has no default translation.
W: warning: string 'volte_can_not_add_call' has no default translation.
I: Copy original files...
I: Copy AndroidManifest.xml...
I: Copy META-INF...
I: Building apk file...
I: Copying unknown files/dir...
C:\Apktool 2.1.1>
I have also attached the original SecContacts.apk
try recompiling it and see if it works
LAzY_kRAzY said:
tried exactly as u mentioned but similar results
I have also attached the original SecContacts.apk
try recompiling it and see if it works
Click to expand...
Click to collapse
Ok ... the decompile/build procedures seem ok but the android icon instead of the default Contacts one is not good sign.
I can't test by myself as I'm running 5.1.1 and can not even try to decompile/build as you didn't provided framework files
Now lasts what exactly are you doing to re-install it.
You should, with your File Manager:
1st) Make a copy of your /system/priv-app/SecContacts.apk
2sd) Delete your /system/priv-app/SecContacts.apk
3rd) Copy /extSdCard/SecContacts.apk to /system/priv-app/
4th) Set permission of /system/priv-app/SecContacts.apk to rw-r--r-- (644)
5th) Restart your system ... a Hot Boot should suffice.
-=-=- At this moment you get the error ... right ? -=-=-=
Let me know
Nice regards.
.
@Kdio
As I told above everything works well for other themed apks like system UI nd TW..
I know pushing apks manually via root browsers, backing up old apks, setting permissions then rebooting etc.. there is no problem in it..
when I manually push the apk set permission and reboot Contacts and Phone apps dont appear in my app drawer as they do not install (because apk is corrupt or signature verification fails or soomething else) no error appears in this case but the app also doesn't install..
so if I go again in my root browser an browse to the secContacts.apk location and click it it shows an option to install.. I click it and then it shows Parse Error..
I am using G900H stock framework-res.apk, twframework-res.apk
and I using 64 bit windows 10
LAzY_kRAzY said:
I am using G900H stock framework-res.apk, twframework-res.apk
and I using 64 bit windows 10
Click to expand...
Click to collapse
If you were kind to share your framework files, I may try building it here.
Nice regards.
.
Kdio said:
If you were kind to share your framework files, I may try building it here.
Nice regards.
.
Click to expand...
Click to collapse
ok sure..
here is my framework-res.apk
and twframework-res.apk
@Kdio
have you tried it ??
LAzY_kRAzY said:
@Kdio
have you tried it ??
Click to expand...
Click to collapse
Hi LAzY_kRAzY
Sorry the delay
Just did it with no success
The decompilation/build was exactly as yours:
Code:
C:\Users\Kdio\Desktop\s5\framework>java -jar apktool_2.1.1.jar if framework-res.apk
I: Framework installed to: C:\Users\Kdio\apktool\framework\1.apk
C:\Users\Kdio\Desktop\s5\framework>java -jar apktool_2.1.1.jar if twframework-res.apk
I: Framework installed to: C:\Users\Kdio\apktool\framework\2.apk
C:\Users\Kdio\Desktop\s5\framework>cd..
C:\Users\Kdio\Desktop\s5>java -jar apktool_2.1.1.jar d SecContacts.apk
I: Using Apktool 2.1.1 on SecContacts.apk
I: Loading resource table...
I: Decoding Shared Library (touchwiz), pkgId: 2
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Kdio\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
C:\Users\Kdio\Desktop\s5>java -jar apktool_2.1.1.jar b SecContacts -c
I: Using Apktool 2.1.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'action_menu_add_new_contact_button' has no default translation.
W: warning: string 'callmessage_kor_lgt' has no default translation.
W: warning: string 'contact_tips_button_to_manage_our_groups' has no default translation.
W: warning: string 'emergency_service' has no default translation.
W: warning: string 'fail_to_find_address_dialog_message' has no default translation.
W: warning: string 'guide_dialer_make_call_with_this_number' has no default translation.
W: warning: string 'guide_dialer_tap_to_write_your_number' has no default translation.
W: warning: string 'menu_add' has no default translation.
W: warning: string 'pick_smemo' has no default translation.
W: warning: string 'selected_cocktail_count' has no default translation.
W: warning: string 'tab_logs_verizon_lra' has no default translation.
W: warning: string 'tab_logs_verizon_uscc' has no default translation.
W: warning: string 'too_many_find_address_dialog_message' has no default translation.
W: warning: string 'volte_can_not_add_call' has no default translation.
I: Copy original files...
I: Copy AndroidManifest.xml...
I: Copy META-INF...
I: Building apk file...
I: Copying unknown files/dir...
C:\Users\Kdio\Desktop\s5>
And the SecContacts.apk outputed got no positive identification as yours:
Everything is accordingly to the book, so lasts the suggestion that is your specific ROM that contains the weirdness.
Please let me know if you come to any conclusion.
Nice regards.
.
Kdio said:
Hi LAzY_kRAzY
Sorry the delay
Just did it with no success
The decompilation/build was exactly as yours:
Code:
C:\Users\Kdio\Desktop\s5\framework>java -jar apktool_2.1.1.jar if framework-res.apk
I: Framework installed to: C:\Users\Kdio\apktool\framework\1.apk
C:\Users\Kdio\Desktop\s5\framework>java -jar apktool_2.1.1.jar if twframework-res.apk
I: Framework installed to: C:\Users\Kdio\apktool\framework\2.apk
C:\Users\Kdio\Desktop\s5\framework>cd..
C:\Users\Kdio\Desktop\s5>java -jar apktool_2.1.1.jar d SecContacts.apk
I: Using Apktool 2.1.1 on SecContacts.apk
I: Loading resource table...
I: Decoding Shared Library (touchwiz), pkgId: 2
I: Decoding AndroidManifest.xml with resources...
I: Loading resource table from file: C:\Users\Kdio\apktool\framework\1.apk
I: Regular manifest package...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Baksmaling classes.dex...
I: Copying assets and libs...
I: Copying unknown files...
I: Copying original files...
C:\Users\Kdio\Desktop\s5>java -jar apktool_2.1.1.jar b SecContacts -c
I: Using Apktool 2.1.1
I: Checking whether sources has changed...
I: Smaling smali folder into classes.dex...
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'action_menu_add_new_contact_button' has no default translation.
W: warning: string 'callmessage_kor_lgt' has no default translation.
W: warning: string 'contact_tips_button_to_manage_our_groups' has no default translation.
W: warning: string 'emergency_service' has no default translation.
W: warning: string 'fail_to_find_address_dialog_message' has no default translation.
W: warning: string 'guide_dialer_make_call_with_this_number' has no default translation.
W: warning: string 'guide_dialer_tap_to_write_your_number' has no default translation.
W: warning: string 'menu_add' has no default translation.
W: warning: string 'pick_smemo' has no default translation.
W: warning: string 'selected_cocktail_count' has no default translation.
W: warning: string 'tab_logs_verizon_lra' has no default translation.
W: warning: string 'tab_logs_verizon_uscc' has no default translation.
W: warning: string 'too_many_find_address_dialog_message' has no default translation.
W: warning: string 'volte_can_not_add_call' has no default translation.
I: Copy original files...
I: Copy AndroidManifest.xml...
I: Copy META-INF...
I: Building apk file...
I: Copying unknown files/dir...
C:\Users\Kdio\Desktop\s5>
And the SecContacts.apk outputed got no positive identification as yours:
Everything is accordingly to the book, so lasts the suggestion that is your specific ROM that contains the weirdness.
Please let me know if you come to any conclusion.
Nice regards.
.
Click to expand...
Click to collapse
I am using the stock samsung rom and firmware..
I dont think its the problem of Rom or framework because all other stock apps decompile and recompile fine..
secondly as I mentioned earlier, I tried with other 5.0 TW roms with their respective frameworks but all had the same response..
so maybe its secContacts.apk issue..
anyways thanks for your effort and time :highfive:
LAzY_kRAzY said:
so maybe its secContacts.apk issue..
Click to expand...
Click to collapse
Hi LAzY_kRAzY
As you didn't report solving the problem ...
I've been seeing several others getting the same issue you described and, for them, the solution was:
- Do not push original signature while building (without -c parameter)
- Sign the apk with whatever signature you want (different from original anyway)
- Follow [GUIDE]Disable signature verification
Please let us know.
Nice regards.
.
@Kdio thanks but I havent managed to get it working yet..
tried this too but same result :-/
LAzY_kRAzY said:
@Kdio thanks but I havent managed to get it working yet..
tried this too but same result :-/
Click to expand...
Click to collapse
There is still a follow up from that services.jar method ... but not sure if it applies to our devices.
As you already have services.jar decompiled, check this out:
http://forum.xda-developers.com/showthread.php?t=2342262
Nice regards.
.
Kdio said:
There is still a follow up from that services.jar method ... but not sure if it applies to our devices.
As you already have services.jar decompiled, check this out:
http://forum.xda-developers.com/showthread.php?t=2342262
Nice regards.
.
Click to expand...
Click to collapse
this method is actually from older versions of android..
there is no .method checkSignaturesLP in PPackageManagerService.smali in lollipop :-/
Same problem from Galaxy J2.
LAzY_kRAzY said:
this method is actually from older versions of android..
there is no .method checkSignaturesLP in PPackageManagerService.smali in lollipop :-/
Click to expand...
Click to collapse
Azhero said:
Same problem from Galaxy J2.
Click to expand...
Click to collapse
I don't know if yall have figured it out yet but decompile, make your changes, recompile. Open the newly compiled apk with 7zip/archive manager, open res, delete the raw folder (if there is one) , then open the original apk and drag and drop the res folder from the apk you compiled into the original then push the original. If you make smali changes just do the same thing. Open the new apk drag and drop the classes into the original push the original.
You have to delete the raw folder if swapping the res folder or else the sound file gets compressed and screws everything up