Hoping an "apktool" wizard can help me resolve a compile error driving me up a wall. I've been using apktool for past 6 months successfully making various system and data apk changes, but this one has me stumped. Experimenting with making a few simple color changes in my active Gmail v4.5.2 (inverted theme) apk. It successfully decompiles, but cannot recompile. To eliminate any of my changes, I started over and decompiled the Gmail apk... then immediately recompiled, but get the "No resource identifier found for attribute..." error (attached). I updated my JAVA and re-installed apktool... same issue. Anyone have guidance on what the issue might be? attaching screenshot of my CMD window commands in both WORD and PDF formats. Thx
EDIT: SOLVED I got it solved thanks to recognized themer "Ticklefish" in the UK. Turns out, the apk I was editing included 4.2 code (WidgetCategory)... and apktools could not handle this during recompile with my 4.1.2 framework. I just edited the 4 xml files which had the 4.2 code and removed those lines... made my theming edits... and it recompiled flawlessly. Then signed the apk and pushed to /system/app. If anyone else runs into similar apktool compile errors, this is why and how to resolve.
Related
Hi all
at the moment I'm trying to port a Theme from OpenDesire to Cyanogen RC2.
I got my framework-res.apk, replaced all those icons in there, that looks pretty nice. So that part worked.
Now I wanted to apply a battery circle mod to my theme but i'm stuck here.
I got apkmanager 4.8 and decompiled my already patched framework-res.apk to edit some xml files. I added the icons, i've put them into my public.xml, added some other xml files needed and now I'm trying to recompile that stuff. The tool produces an error about not declared images.
Looks like this here: drawable/zoom_plate declared here is not defined.
There are about 100 of these errors and these are no files I've touched.
I tried to decompile the original Cyanogen RC2, not even patched, framework, editing nothing and compiling again.. same error.
Am I missing something?
Solved.
Actually I confused my sources, after searching and editing I managed to get my theme working.
There were some files in the specified dir not mentioned in the public.xml, an some lines defining files not being there.
Had the idea after a break and a coffee
Hey so I recently ported over an Epic 4g to virgin mobile and everything is working great except MMS. For some reason I cant figure out how to recompile APK apps on my pc. I have reinstalled java set that path, etc no luck. Anways I was wondering if some one could recompile both of these MMS.apk files with settings from the optimus v. Please don't just copy and paste the settings, just change the carrier values that need to be changed. I would be willing to donate a couple dollars to anyone that could help me with editing these apks.
Thanks!
Here are the settings: I think just the user agents and URLs need to be changed:
https://github.com/inferiorhumanorg...mmit/937eeda64e1fb48dcdb52b0b5ed755bca67135f6
Hey, what you need to do is download APKTool. Then use adb or extract from the ROM zip /system/framework/framework-res.apk, and use apktool to install the framework on your computer.
With that done you can use apktool to decompile the Mms.apk and modify the settings in Mms/res/xml/mms_config.xml - you can change the user agent and url there.
Then use apktool to build the Mms back into an apk. After signing it using jarsigner (part of the Android SDK) you will be able to put it into /system/app on your phone.
For more information you can look at the APKTool guide - miui-au.com/add-ons/apktool/ - and the Android developer apk signing guide - developer.android.com/guide/publishing/app-signing.html
I want to modify the Phone.apk from teamhacksung CM9 B17 for Galaxy S.
What I want to do is to modify it that when I have an incoming call, to see the full picture of the caller. more precisely I want that the black rectangle where you have icon to answer or t reject, to be transparent.
It can be done. I got from the xda forum a moded Phone.apk for B16 where that rectangle is transparent.
I have attached a picture so that you understand what I'm talking about. i also have attached that transparent mod for B16.
Using Beyond Compare 3, I guess that I have to modify in the following file:
Phone.apk\res\layout\incall_touch_ui.xml and replace:
<com.android.internal.widget.multiwaveview.MultiWaveView android:id="@id/incomingCallWidget" android:background="@android:color/black" android:visibility="gone" android:layout_width="fill_parent" .......
with:
<com.android.internal.widget.multiwaveview.MultiWaveView android:id="@id/incomingCallWidget" android:background="@android:color/transparent" android:visibility="gone" android:layout_width="fill_parent" .......
Here comes the problem:
I decompile Phone.apk with Apk_Manager_5.0.2, change that word, save the file and the recompile.
After i install the phone.apk using a zip container from recovery, when I try to make a call or receive a call, I get the: "Voice calls not suported" error.
I tryed all the combinations for compiling: system app, signed/unnsigned; nonsystem app signed/unsigned. Same error.
What am I doin wrong? Any ideas?
Thanks.
similar problem here, but my Phone.apk just crashs
I've had similar issues on Samsung's GB ROMs. I had no problems with Contacts.apk, MMS.apk and DialerTabActivity.apk. I could easily recompile them and moded versions would work. But recompiled Phone.apk kept FC-ing so I eventually gave up.
I don't know what tools themers use to make it work.
After recompiling the Phone.apk open it with 7zip, extract the file that you have modified and put it in the original phone.apk.
Inviato dal mio GT-I9000 usando Tapatalk 2 Final
copying the file did work, thanks for that tip. However the mod did not work, the lower area is still black :-(
You need to change some files from the apk manager to compile android 4.0 files. I can upload my apk manager whitch works as soon as I get home.
those apk manager changes (it's actually not a single change in apk manager but just using apktools 1.4.1) are only related to the smali/dex files. layout/*.xml aren't influenced by that.
These are the changes that I was talking about:
"No problem I used Apk Manager 5.x(dont know exactly). But I've done this two things with the APK-Manager:
-deleted the original aapt.exe in /others and copied the one from the platform tools folder in from the sdk(has to be done if you work with ics apps)
-(de)compiled with Apk-tool 1.4.1 instead of 1.4.3 as the newer version sometimes causes some errors. Just delete the Apkttool.jar in /others and download 1.4.1 from the apk tool webite and paste it in /other
afterwards everything should work fine.."
i know those changes (see above), they don't solve the problem though.
apktool 1.4.1 + copy unchanged files (everything but ressources.arsc and incall_touch_ui.xml): FC
apktool 1.4.1 + don't copy: FC
apktool 1.4.3 + copy unchanged files: no FC but contact pic is still the old size
apktool 1.4.3 + don't copy: FC
same proble here with GS2.
this incoming call screen filled with black is very anoying...
any news on how to fiw that?
phone transparent incoming call
That app does wgat it is supposed, ask mr goodle, for i don't kjnow where i have found it
i made it AOKP build 37
Thats great, but can you explain how to do that?
Cause i' use GS2, and not GS, adn with different rom, we have to use differents phone.apk.
So instead of asking you every time, i'd like to learn how to do it.
Thanks!
Decompiled
Edited
Compiled
Signed
Hi. That's how I was able to do it:
First, copy your Phone.apk from the system folder inside your phone to your computer. Do not use any other Phone.apk, because it may be another version and it will not work. Or extract the Phone.apk from the rom that you flashed to your phone and use it.
You must make some changes to the apk manager to complie/decomplile Phone.apk.
Here is the list with the changes. If you follow it exactly, it should work:
-delete the original aapt.exe in /others and copy the one from the platform tools folder from the sdk(has to be done if you work with ics apps) - you must install android 4.0 sdk. Google it and you will find it easy.
-(de)compile with Apk-tool 1.4.1 instead of 1.4.3 as the newer version sometimes causes some errors. Just delete the Apkttool.jar in /others and download 1.4.1 from the apk tool webite and paste it in /other
afterwards everything should work fine...
Then, when you get the unsignedPhone.apk, rename it to Phone.apk, and put it in a zip file and flash via recovery. Do not copy it with inside the phone because it will not work. If you don't know how to make a zip file, just download any mod (perka, reloaded ...) and open the zip with 7zip, delete any apk's you find in it, and drag Phone.apk inside the System folder from the zip, and then flash it via recovery.
Good luck.
If it does't work, send me an email: [email protected], and I will send you my apk manager that is allready modified and works to compile/decompile.
Hi everyone. I own the Samsung Galaxy J3 2016 carrier Virgin Mobile. I am attempting to decompile android.policy.jar to do some smali editing. And oddly enough a number of the general jars we all edit regularly to add mods such as reboot menu,etc. are pretty much empty files on my J3. The android.policy.jar file is only 309 bytes with nothing in it except a Meta INF folder with MANIFEST file in there but noting else at all. No classes.dex. Now I thought ok maybe its because I am not deodexed. So I looked in the arm folder in framework and there are indeed odex files in there but none for android.policy.jar nor other typical modded jars we tend to mod. Is this normal across the board for newer Samsung devices like the S6/7 models? Also when I decompile an apk like SystemUI.apk there are no smali files included with the decompiled apk. But the apk seems to decompile correctly and I can edit whats there just fine and recompile it and use it successfully. I just added a center clock mod to SystemUI in fact and it works fine. Just confused about what I am missing here. I seem to have all of my tools up to date for decompiling. Can anyone point me in the right direction? Or give me some insight on these new changes. Thanks
Hey all,
I need to change 2 small lines of text in an existing XML from a decompiled Settings.apk and it seems just impossible.
I've been on it litteraly 10 hours yesterday trying to figure it out.
I really could use some help.
The data: rooted stock Z1C 5.1.1 14.6.A.1.236 (non deodexed).
I need to decompile Settings.apk, just modify one existing .XML and recompile it.
(as seen here http://forum.xda-developers.com/showpost.php?p=55659129&postcount=2 ).
The problem is I cannot for the life of me recompile the Z1C Settings.apk.
I tested with windows apktool, android apktool, java JRE7, JRE8. It decompiles OK with JR7 but throws memory error with JR8.
But regardless I'm NEVER able to recompile it, apktool is never "able to find sources", and then it crashes out with some PNG error.
I use those 2 frameworks: framework-res.apk and SemcGenericUxpRes.apk.
If you are able to decomp/recomp the Z1C "Settings.apk", please by all means let me know the tools and method you use.
Does it make a difference if my rom (and Settings.apk) is deodexed or not?
Are there more frameworks I don't know about for Z1C?
Thanks much for any help, I'm going a bit nuts with this.
Ps24u said:
Hey all,
I need to change 2 small lines of text in an existing XML from a decompiled Settings.apk and it seems just impossible.
I've been on it litteraly 10 hours yesterday trying to figure it out.
I really could use some help.
The data: rooted stock Z1C 5.1.1 14.6.A.1.236 (non deodexed).
I need to decompile Settings.apk, just modify one existing .XML and recompile it.
(as seen here http://forum.xda-developers.com/showpost.php?p=55659129&postcount=2 ).
The problem is I cannot for the life of me recompile the Z1C Settings.apk.
I tested with windows apktool, android apktool, java JRE7, JRE8. It decompiles OK with JR7 but throws memory error with JR8.
But regardless I'm NEVER able to recompile it, apktool is never "able to find sources", and then it crashes out with some PNG error.
I use those 2 frameworks: framework-res.apk and SemcGenericUxpRes.apk.
If you are able to decomp/recomp the Z1C "Settings.apk", please by all means let me know the tools and method you use.
Does it make a difference if my rom (and Settings.apk) is deodexed or not?
Are there more frameworks I don't know about for Z1C?
Thanks much for any help, I'm going a bit nuts with this.
Click to expand...
Click to collapse
Deodexed is definitely better for this. I don't have confidence to say odex won't work, but I wouldn't be surprised.
What errors are you getting?
I would suggest deodexing. There are flashable patches in the forums. I've been able to use apktool on phone smoothly and easily with deodexed stock rom.
Thanks much for your reply levone1, I'm currently in talks with the creator of apktool to find where the compiling problem comes from, it seems to be related to image (png) files, although the only thing i modified is one .xml file..
Ps24u said:
Thanks much for your reply levone1, I'm currently in talks with the creator of apktool to find where the compiling problem comes from, it seems to be related to image (png) files, although the only thing i modified is one .xml file..
Click to expand...
Click to collapse
Do you have a reason not to deodex?
No I don't, actually I deoxed 2 hours ago
I used this patch http://forum.xda-developers.com/son...236-xperia-z1-z1c-5-1-1-deodex-patch-t3268096
It worked great.
But the exact same problem remains:
I: Using Apktool 2.1.1
I: Checking whether resources has changed...
I: Building resources...
W: libpng error: Not enough image data
W: ERROR: Failure processing PNG image C:\Unzipped\a\Settings\res\drawable-xhdpi
-v4\appwidget_item_bg_pressed.9.png
W: libpng error: Not enough image data
W: ERROR: Failure processing PNG image C:\Unzipped\a\Settings\res\drawable-ldrtl
-xhdpi-v4\appwidget_item_bg_pressed.9.png
etc....
I wait a reply from the dev for now ^^;
Ps24u said:
No I don't, actually I deoxed 2 hours ago
I used this patch http://forum.xda-developers.com/son...236-xperia-z1-z1c-5-1-1-deodex-patch-t3268096
It worked great.
But the exact same problem remains:
I: Using Apktool 2.1.1
I: Checking whether resources has changed...
I: Building resources...
W: libpng error: Not enough image data
W: ERROR: Failure processing PNG image C:\Unzipped\a\Settings\res\drawable-xhdpi
-v4\appwidget_item_bg_pressed.9.png
W: libpng error: Not enough image data
W: ERROR: Failure processing PNG image C:\Unzipped\a\Settings\res\drawable-ldrtl
-xhdpi-v4\appwidget_item_bg_pressed.9.png
etc....
I wait a reply from the dev for now ^^;
Click to expand...
Click to collapse
Try apktool 2.0. Or just do it on phone. I've modded stock lp ROMs w no problem using this - http://forum.xda-developers.com/sony-xperia-z1-compact/general/apktool-phone-t3230338
(latest version is 6.1, but I've had better success overall with 6.0.5. I can post a link if you need)
Same with apktool 2.0 or apktool android, already tried (always crash in libPNG error), but thanks for the tip!