Problems editing cyanogenmod 7 framework-res.apk - Android Software/Hacking General [Developers Only]

I've searched the forum and found other ppl having problems editing this apk, but I've found no solutions...
Here is my problem: I'm trying to edit a framework-res.apk from a cyanogenmod 7 build for the huawei u8500, more precisely some xmls
I've tried with several methods, including:
1 decompile-edit-recompile-sign -> bootloop
2 decompile-edit-open with 7zip/winrar-merge files -> bootloop
I've tried this at first boot and also after the first, the result it's always the same, bootloop
I'm not doing big changes to xmls, just some height adjustment...
I've heard that in gingerbread I also need to modify systemUI.apk also, is this correct? If so, why apk manager is giving me error while decompiling it?
all the tries were done using apk manager 4.9 and with no errors in log except from when decompiling systemUI...
HELP T_T

No one will help us
C'mon Guys any Tip ?
Thank in Advance!!

how are you pushing the edited files?
I know that the one safe way is via an update.zip , try that.

TuoNonno said:
I've searched the forum and found other ppl having problems editing this apk, but I've found no solutions...
Here is my problem: I'm trying to edit a framework-res.apk from a cyanogenmod 7 build for the huawei u8500, more precisely some xmls
I've tried with several methods, including:
1 decompile-edit-recompile-sign -> bootloop
2 decompile-edit-open with 7zip/winrar-merge files -> bootloop
I've tried this at first boot and also after the first, the result it's always the same, bootloop
I'm not doing big changes to xmls, just some height adjustment...
I've heard that in gingerbread I also need to modify systemUI.apk also, is this correct? If so, why apk manager is giving me error while decompiling it?
all the tries were done using apk manager 4.9 and with no errors in log except from when decompiling systemUI...
HELP T_T
Click to expand...
Click to collapse
can you give more info?
i mean, are you have any error on compiling the framework?
can you post the log file of apk manager?

TuoNonno said:
I've searched the forum and found other ppl having problems editing this apk, but I've found no solutions...
Here is my problem: I'm trying to edit a framework-res.apk from a cyanogenmod 7 build for the huawei u8500, more precisely some xmls
I've tried with several methods, including:
1 decompile-edit-recompile-sign -> bootloop
2 decompile-edit-open with 7zip/winrar-merge files -> bootloop
I've tried this at first boot and also after the first, the result it's always the same, bootloop
I'm not doing big changes to xmls, just some height adjustment...
I've heard that in gingerbread I also need to modify systemUI.apk also, is this correct? If so, why apk manager is giving me error while decompiling it?
all the tries were done using apk manager 4.9 and with no errors in log except from when decompiling systemUI...
HELP T_T
Click to expand...
Click to collapse
I have run into some issues with framework-res.apks, the issue ended up being corrupt images, the dot 9 files. I replaced them with clean images and overwrote them after compile using 7-zip. Hope this helps a little.
Sent from my Inspire 4G using XDA Premium App.

britoso said:
how are you pushing the edited files?
I know that the one safe way is via an update.zip , try that.
Click to expand...
Click to collapse
I tried both with an update.zip and also changing it on the original rom...
tj_style said:
can you give more info?
i mean, are you have any error on compiling the framework?
can you post the log file of apk manager?
Click to expand...
Click to collapse
No errors...
Code:
java version "1.6.0_25"
Java(TM) SE Runtime Environment (build 1.6.0_25-b06)
Java HotSpot(TM) 64-Bit Server VM (build 20.0-b11, mixed mode)
"adb" non Š riconosciuto come comando interno o esterno,
un programma eseguibile o un file batch.
Impossibile trovare C:\Users\Nonno\Desktop\New8300\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/signedframework-res.apk
Impossibile trovare C:\Users\Nonno\Desktop\New8300\apk_manager_4.9\place-apk-here-for-modding\../place-apk-here-for-modding/unsignedframework-res.apk
I: Loading resource table...
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...
I: Building apk file...
Yes, "W" is a "warning" - it may be a potential problem or may be not. Most of apks have some code, so its lack may be a sign of an problem. framework-res.apk doesn't have it, so this warning is ok for that file.

Related

[Q] .smali conversion

k after googling a lot i came to apktool for decoding i used sucessful able to get resource files and hell getting .smali file any way around to get .java file from .smali file. i just searched the forum still not sure possible or not

[Q] Apktool v1.4.2.269870b "Multiple resources" issue

Hi,
I'm using Apktool v1.4.2.269870b (I'd build it from git source of apktool) to decode gmail.apk of honeycomb, I'm facing the below error
I: Copying raw classes.dex file...
I: Loading resource table...
Exception in thread "main" brut.androlib.AndrolibException: Multiple resources:
spec=0x7f0c0036 dimen/account_width, config=-port-v13
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:196)
at brut.androlib.res.decoder.ARSCDecoder.readConfig(ARSCDecoder.java:165)
at brut.androlib.res.decoder.ARSCDecoder.readType(ARSCDecoder.java:130)
at brut.androlib.res.decoder.ARSCDecoder.readPackage(ARSCDecoder.java:105)
at brut.androlib.res.decoder.ARSCDecoder.readTable(ARSCDecoder.java:82)
at brut.androlib.res.decoder.ARSCDecoder.decode(ARSCDecoder.java:48)
at brut.androlib.res.AndrolibResources.getResPackagesFromApk(AndrolibResources.java:315)
at brut.androlib.res.AndrolibResources.loadMainPkg(AndrolibResources.java:50)
at brut.androlib.res.AndrolibResources.getResTable(AndrolibResources.java:43)
at brut.androlib.Androlib.getResTable(Androlib.java:44)
at brut.androlib.ApkDecoder.getResTable(ApkDecoder.java:148)
at brut.androlib.ApkDecoder.decode(ApkDecoder.java:98)
at brut.apktool.Main.cmdDecode(Main.java:120)
at brut.apktool.Main.main(Main.java:57)
before posting here I'd searched similar issue, found very similar issue
code.google.com/p/android-apktool/issues/detail?id=148
which is fixed with github.com/fboldog/brut.apktool/commit/1b6d63cb355d4a36274f5edf0383a2c4e6e0f868,
however apktool version I'm using has this fix and doesn't fix my issue,
also, I'd installed framework-res.apk of honeycombs, this also didn't help me.
Could you please help me , please let me know if you need my .apk file.
Thanks,
Ponnada.

Can't Load res/raw Files After Modding

Hello xda-developers!
I'm new to Android hacking, but I have a general background in programming...
I've been modding an application recently, unpacked the .apk file, done my changes and repacked it, signed it and everything works well...But when I run the program, and the program wants to play an mp3 file, which was located in res/raw before packing the .apk file, it gives an error: "Can't load audio file."...What is the possible cause of this problem and how to solve it? Are the IDs of the raw resource files changed everytime I unpack and repack the .apk file or what?
Thanks in advance...
Edit: Issue fixed by unpacking and repacking using Apktool instead of WinZip.

[Resolved] Help needed! public.xml drawable symbol declared but not defined...

Hello dear devs
I'm trying for 2 weeks now, without luck, to find a way to decompile, add resources and recompile Erikmm's MIUI v4 :
settings.apk
framework-miui-res.apk
as part of my HebMIUI project.
I downloaded an ICS aimed APKtool and used the original as well.
the original fails to even decompile, the other one fails to recompile, giving public.xml drawable symbol declared but not defined error:
For example for settings.apk I get this
I managed to recompile all the system and framework apps besides settings and framework-miui-res so it's really frustrating to not being able to finish this work.
If someone here has a working environment or some issue pointing I missed, I'd greatly appreciate it if you share it with me.
Thanks.
I fixed the 9.png error at the start of the pastebin, it's not related to this issue. Still getting all those declared but not defined errors.
I get them even if I decompile recompile without changing anything...
I'll try to decompile with dependencies. If that won't work I'll try to remove the declared objects from xml.
sent from me
WARNING: The pastebin link totally had a virus waiting. Sorry itskit2sh.
Not much help at the moment, but apktool is going to receive updates (supposedly)
https://www.xda-developers.com/android/apktool-to-receive-updates-once-again/
For settings try and use the apktool from developer.android. As for how you are recompiling miui uses framework-res and framework-miui-res as dependencies. Lastly the miui_logo thing might be because I added my Darth Vader one for when booting shutting down lol. Ill upload my update today to dropbox and have u try with the newest one
----------------------------------------------
If helped don't be afraid to hit the thanks button it doesn't bite lol
Thanks for your replies guys, unfortunately no luck yet.
I copied aapt ver 1.4.3 to both old apktool and ics apktool.
still I get "bad magic value" on old apktool decompilation
and like gazilion rows "declared but not defined" for public.xml objects on ics apktool compilation.
Also decompilation with dependencies did not quite work as it did not get my depended apk suggestions (framework-miui-res/framework-res/settings).
are there any alternatives to this method ? thanks.
Resolved (!) using these files of the newest WIP apktool files (ver. 1.4.9)
once again thanks for all your help guys !!!

[Q] Problem Modding APK

Hello guys,
I am modding an apk to bypass an update check.
I have this outdated APK that functions fine since the URL and query and site address remains same but whenever it checks for and update it crashes. The thing is the developer made it topnotch but since then left and his site was recently taken down so check update query crashes it totally. What I need to do is update just the one function where it brings up the GUI after start. Otherwise it keeps saying download update or crashes randomly at time of starting up.
Now I have been browsing for a day or two for all the tutorials and right now I`m hell lot of confused. I have downloaded many tools and dependencies but I dont know how to proceed. I will tell you guys what I have and what I need.
I have de-compiled the APK using "dex2jar", I had a .JAR file which I decomplied using JD-GUI-Windows now after saving source I have .ZIP file in which I made the necessary editing. Next I downlaoded APKTool.JAR and extracted resource files and XML files that can be read in text editor. Along with some .SMALI files.
Now I am not familier with SMALI language at all and editing in it seems rather complicated and on the other side I have the .JAR file that decomlied all the classes just fine.
MY QUESTION IS:
How do I recompile the files I have ? I have the main coding extraced using dex2jar so in java format and JD-Gui to in .ZIP files, and resources/XML files also decoded using APKTools. What do I do next to recompile the APK ?
In short I have plain text based java source code and plain text XML and other resource file. How do I recompile it ?

Categories

Resources