MMS APK (JB 4.1.1) How to Recompile - Samsung Galaxy Nexus

Hey guys,
Need some help recompiling MMS.apk.
Got the files needed for the procedure and have decomp'd successfully but now trying to recompile, no go... I get framework-res errors. Am I missing something? I just decomp'd MMS.apk then made a maxfilesize and maxline change and ran command-
apktool b mms
It tries but I get...
I: Building resources...
c:\abc\mms\AndroidManifest.xml:80: error: No resource identifier found for attri
bute 'parentActivityName' in package 'android'
aapt: warning: string 'template_edit_title' has no default translation in c:\abc
\mms\res; found: de
aapt: warning: string 'template_insert_ctx_menu_title' has no default translatio
n in c:\abc\mms\res; found: de
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\DOCUME~1\*****\LOCALS~1\Temp\
APKTOOL1230142302152542334.tmp, -I, C:\Documents and Settings\******\apktool\f
ramework\1.apk, -S, c:\abc\mms\res, -M, c:\abc\mms\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:251)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:325)
at brut.androlib.Androlib.buildResources(Androlib.java:270)
at brut.androlib.Androlib.build(Androlib.java:193)
at brut.androlib.Androlib.build(Androlib.java:175)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\D
OCUME~1\*******\LOCALS~1\Temp\APKTOOL1230142302152542334.tmp, -I, C:\Documents
and Settings\*******\apktool\framework\1.apk, -S, c:\abc\mms\res, -M, c:\abc\mm
s\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:249)
... 6 more
Can someone please help?? Why is it trying to get something from my docs and setting folder?? What does that have to do with any of this???
I think I'm missing a step here...I haven't done anything with framework-res or anything so, that could be the issue... Sorry, I'm just starting to get into this...
Thanks in advance guys.
Running 1.4.9. The latest...for JB...

You didn't pull your ROMs framework and run
Code:
apktool if framework-res.apk
.
Sent From My Toro+ via Tapatalk

ÜBER™ said:
You didn't pull your ROMs framework and run
Code:
apktool if framework-res.apk
.
Sent From My Toro+ via Tapatalk
Click to expand...
Click to collapse
Oh ok thanks man.
Yeah, that seemed to enable me to get it recompiled now. If I decomp'd it without that, does that make a difference? Do I "have" to sign it also?
I'm re flashing it and its not sticking...no MMS app anywhere... I usually can just dump it in the System/app folder and do permissions and reboot using ES File Explorer... Didnt work... Am I doing something else wrong? Haha...
Thanks man.

Lambetts said:
Oh ok thanks man.
Yeah, that seemed to enable me to get it recompiled now. If I decomp'd it without that, does that make a difference? Do I "have" to sign it also?
I'm re flashing it and its not sticking...no MMS app anywhere... I usually can just dump it in the System/app folder and do permissions and reboot using ES File Explorer... Didnt work... Am I doing something else wrong? Haha...
Thanks man.
Click to expand...
Click to collapse
No you dont have to sign it. If its not working the there is something wrong and you may need to redo it. Make sure your flashing this in a flash able. And not just dropping in its proper place
Sent From My Toro+ via Tapatalk

ÜBER™ said:
No you dont have to sign it. If its not working the there is something wrong and you may need to redo it. Make sure your flashing this in a flash able. And not just dropping in its proper place
Sent From My Toro+ via Tapatalk
Click to expand...
Click to collapse
Thanks man.
Yeah, I didnt have the framework installed when I decompiled.
Its giving me this...anything to worry about?
I: Building resources...
aapt: warning: string 'template_edit_title' has no default translation in C:\abc
\mms\res; found: de
aapt: warning: string 'template_insert_ctx_menu_title' has no default translatio
n in C:\abc\mms\res; found: de
I: Building apk file...
I'll try and reflash this one...
Thanks again.

Lambetts said:
Thanks man.
Yeah, I didnt have the framework installed when I decompiled.
Its giving me this...anything to worry about?
I: Building resources...
aapt: warning: string 'template_edit_title' has no default translation in C:\abc
\mms\res; found: de
aapt: warning: string 'template_insert_ctx_menu_title' has no default translatio
n in C:\abc\mms\res; found: de
I: Building apk file...
I'll try and reflash this one...
Thanks again.
Click to expand...
Click to collapse
You may have issues with it crashing when searching looks like your getting the aapt error did you update the aapt to the latest?.
Sent From My Toro+ via Tapatalk

ÜBER™ said:
You may have issues with it crashing when searching looks like your getting the aapt error did you update the aapt to the latest?.
Sent From My Toro+ via Tapatalk
Click to expand...
Click to collapse
Yeah, the 1.4.9?? Is that the latest?
It flashed. But I "had" to flash it over the other one... Usually I can drop it in. Or rename the old one to mms.apkbak and flash, just in case I want revert.
Spose I can just flash back if I want.
No errors just yet. My additions stuck. Do you know what "maxsize" value I would use for like 450kb?
I put 0500000, and thought that was 500kb. but its going as low as 239kb. I want to make it prob 300kb, to be safe for other carriers.
Thanks mate. You've really helped me understand some stuff here...might even get into themeing a little...one step at a time though...haha
Cheers.

Related

[Request] Notification bar mods

Hi guys!
I'm a proud owner of the Samsung Galaxy Nexus.
First day, unlocked, rooted and Android Revolution HD rom installed!
I'm now trying to get my perfect setup and I need your help!
I'm trying to mod the notification bar like in the Black Exodus theme by Nitroz.
I'd like all icons in white with the black notification bar and the clock in the center of the bar. Next thing I want is when the bar is expanded to get all words in white instead of ICS blue.
Problem is, I'm not able to get it to work.
I've got my systemUI.apk and my Framework-res.apk ready.
Got my apktool installed to decompile and recompile the apk and signapk to sign it.
I've managed to get my SystemUI to decompile and put in a line of code in the status_bar.xml file to get the clock centered.
I then try to recompile it but that's where I fail. It freaks out and gives me a few errors that I don't understand.
I was wondering if the people of XDA would be kind enough to help me out here!
Thanks in advance!
diSke
If you changed number of images for battery animation, you'll have to edit "stat_sys_battery.xml" and "stat_sys_battery_charge.xml" in "SystemUI.apk/res/drawable/" otherwise battery icon won't show up. Other icons are just png files.
Dont know where the color of the text is but its somewhere in framework-res.apk. My advice is to do one thing, compile, push and see how it works. If it works, do another edit.
What edits you've made exactly?
AlisCZ said:
If you changed number of images for battery animation, you'll have to edit "stat_sys_battery.xml" and "stat_sys_battery_charge.xml" in "SystemUI.apk/res/drawable/" otherwise battery icon won't show up. Other icons are just png files.
Dont know where the color of the text is but its somewhere in framework-res.apk. My advice is to do one thing, compile, push and see how it works. If it works, do another edit.
What edits you've made exactly?
Click to expand...
Click to collapse
I've tried to get the clock centered (which is my main goal)
White icons and white text is a big plus!
I found quite a few tutorials on how to get the clock centered so I guess my code should be solid.
But since I can't recompile my SystemUI file I couldn't see if it worked or not.
It gives me this error message.
Code:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\Joris>cd \
C:\>cd apktools
C:\Apktools>apktool d SystemUI.apk
I: Baksmaling...
I: Loading resource table...
I: Loaded.
I: Loading resource table from file: C:\Users\Joris\apktool\framework\1.apk
I: Loaded.
I: Decoding file-resources...
I: Decoding values*/* XMLs...
I: Done.
I: Copying assets and libs...
C:\Apktools>apktool b SystemUI
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Apktools\SystemUI\res/drawable-sw600dp-xhdpi
invalid resource directory name: C:\Apktools\SystemUI\res/layout-sw600dp
invalid resource directory name: C:\Apktools\SystemUI\res/values-sw600dp
invalid resource directory name: C:\Apktools\SystemUI\res/values-sw600dp-port
invalid resource directory name: C:\Apktools\SystemUI\res/values-sw720dp
invalid resource directory name: C:\Apktools\SystemUI\res/values-sw720dp-port
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Joris\AppData\Local\Temp\A
PKTOOL6571312919530206705.tmp, -I, C:\Users\Joris\apktool\framework\1.apk, -S, C
:\Apktools\SystemUI\res, -M, C:\Apktools\SystemUI\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
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)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\Joris\AppData\Local\Temp\APKTOOL6571312919530206705.tmp, -I, C:\Users\Joris
\apktool\framework\1.apk, -S, C:\Apktools\SystemUI\res, -M, C:\Apktools\SystemUI
\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
C:\Apktools>
You could try AOKP. You can center clock in setting of the rom.
For apktool try to decompile SystemUI.apk over 10. Thats decompiling with dependence and you can install your framework this way.
Over 22 choose your SystemUI.apk. Press 10, some blabla will write in the terminal and you will be asked to put your dependency file. Just drag your framework-res.apk in the window or put the full path to it and that should do it. Then you can decompile with 9.
Yeah I knew you could manually do it in AOKP but I really like the ROM i'm on now.
Oké, I'll try that! Thanks!
It doesn't work. When I try to drag my framework-res.apk when it asks for my dependee apk it says:
"Sorry that's not the dependee apk, try again"
Any ideas?
Damn I'm sure I had the same problem but I can't remember how I fixed it
Well this is what I did and it worked for me. Make sure your apktool is in C:
AlisCZ said:
Damn I'm sure I had the same problem but I can't remember how I fixed it
Well this is what I did and it worked for me. Make sure your apktool is in C:
Click to expand...
Click to collapse
Yes I did all that.
I stopped messing with it and used a gentle approach and I managed to get it to work. Got my new SystemUI to compile and sign and pushed it back to the phone.
Rebooted my phone and *sign* status bar and softkeys were gone.
changing some .png files aren't the problem. That's easy.
Messing with the code isn't! Any help would be appreciated to get my clock centered with the Android Revolution HD ROM!
Thanks AlisCZ for your help so far!
diSke said:
Yes I did all that.
I stopped messing with it and used a gentle approach and I managed to get it to work. Got my new SystemUI to compile and sign and pushed it back to the phone.
Rebooted my phone and *sign* status bar and softkeys were gone.
changing some .png files aren't the problem. That's easy.
Messing with the code isn't! Any help would be appreciated to get my clock centered with the Android Revolution HD ROM!
Thanks AlisCZ for your help so far!
Click to expand...
Click to collapse
Sorry. I don't know what you should do now. Statusbar and navbar disappear when you do wrong edit in code. Thats only thing I cant tell you right now. I dont have to sign SystemUI for my AOKP btw

CM9 Mods Help Kinda

I have modded my status bar in cm9 so its transparent but when i try to make it have center clock i get this
|24/07/2012 -- 15:09:39.00|
--------------------------------------------------------------------------
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\APKTOOL\other\..\projects\SystemUI.apk\res\layout\status_bar.xml:20: error: Error parsing XML: not well-formed (invalid token)
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\toms\AppData\Local\Temp\APKTOOL2239799123584665020.tmp, -I, C:\Users\toms\apktool\framework\1.apk, -S, C:\APKTOOL\other\..\projects\SystemUI.apk\res, -M, C:\APKTOOL\other\..\projects\SystemUI.apk\AndroidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:193)
at brut.androlib.Androlib.buildResourcesFull(Androlib.java:302)
at brut.androlib.Androlib.buildResources(Androlib.java:249)
at brut.androlib.Androlib.build(Androlib.java:172)
at brut.androlib.Androlib.build(Androlib.java:155)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\Users\toms\AppData\Local\Temp\APKTOOL2239799123584665020.tmp, -I, C:\Users\toms\apktool\framework\1.apk, -S, C:\APKTOOL\other\..\projects\SystemUI.apk\res, -M, C:\APKTOOL\other\..\projects\SystemUI.apk\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.java:191)
... 6 more
when im trying to compile the apk any ideas :/
Guide is here http://forum.xda-developers.com/showthread.php?t=1773930
Download the latest version of smali 1.3.3 from here and compile it manually.
C:\APKTOOL\other\..\projects\SystemUI.apk\res\layo ut\status_bar.xml:20 ... could you show us the line 20 in this xml?
I thanked both and i fixed my errors in line 20 but now ive got this
C:\APKTOOL\other\..\projects\SystemUI.apk\res\layout\status_bar.xml:29: error: Error parsing XML: mismatched tag
Which i have no idea about ?
+ .txt file is in .zip because i cant upload it ;/ + just realised i changed extension so its supposed to be .xml
try this: View attachment status_bar.zip
cyberking said:
try this: View attachment 1219507
Click to expand...
Click to collapse
Thanks + I did it and got transparent mod and center clock working after a bit but now there is no status bar and i cannot get it to come up anyone got any ideas ? it came up once :/ Really want to get it to work quite a few people want this
Managed to do it thanks to everyone who helped I thanked everyone :')
nice, so where was problem, i'm just curios
cyberking said:
nice, so where was problem, i'm just curios
Click to expand...
Click to collapse
Had one extra line in the status_bar.xml file + to get it to appear i had to reflash cm9 after full wipe then install the cm9 zip again just with different SystemUI.apk in it
dudeman1996 said:
Download the latest version of smali 1.3.3 from here and compile it manually.
Click to expand...
Click to collapse
Dude,
Is there any way to lock my mobile again....???
devilsdude said:
Dude,
Is there any way to lock my mobile again....???
Click to expand...
Click to collapse
What do you mean lock?
Sent from my HTC Wildfire S A510e using xda premium

Decompiled att ion framework-res.APK?

So I noticed we didn't, or I didn't see, a decomplied framework-res and I was looking up some stuff about it and tried a few things and here is the folders I got when I "decomplied" the res,
Assets
Images
Sounds
Webkit
res
508 folders, no reason to list them here
AndroidManifest.XML
From that I feel like something is missing from the decomplie and I wanted to ask before I pursue this more because I want to move in the right direction, I'm not a dev but I like to dawdle and who says an extra person playing with stuff will hurt?
According to Ganesh it's the recompile that hasn't worked out yet. Maybe that's because of what your saying, something is missing from the decompile.
Sent from my LT28i using xda app-developers app
Yes I did have a problem there if I recall but I had more progress when I put the apktool on the root of my hdd and then run cmd as admin
Sent from my LT28at using xda premium
I have another question, different topic but I didn't feel like making another topic and spamming the page, in sys/ Module/ restart/ parameters there is a file called Download_mode and its value is set to 1, does this file, if set to 0, stop the phone from rebooting out of download mode after a set period of time? If so then we should theoretically be able to find one for fast boot?
thanitos said:
So I noticed we didn't, or I didn't see, a decomplied framework-res and I was looking up some stuff about it and tried a few things and here is the folders I got when I "decomplied" the res,
Assets
Images
Sounds
Webkit
res
508 folders, no reason to list them here
AndroidManifest.XML
From that I feel like something is missing from the decomplie and I wanted to ask before I pursue this more because I want to move in the right direction, I'm not a dev but I like to dawdle and who says an extra person playing with stuff will hurt?
Click to expand...
Click to collapse
decompiling framework-res.apk
./apktool if SemcGenericUxpRes.apk ion
./apktool d -f -t ion framework-res.apk out
I: Loading resource table...
I: Loaded.
I: Decoding AndroidManifest.xml with resources...
I: Decoding file-resources...
I: Decoding values */* XMLs...
I: Loading resource table from file: /home/ganesh/apktool/framework/2-ion.apk
I: Loaded.
I: Done.
I: Copying assets and libs...
Click to expand...
Click to collapse
Click to expand...
Click to collapse
Compiling framework-res.apk (Without making any changes)
./apktool b out new.framework-res.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
aapt: warning: string 'BaMmi' has no default translation in /home/ganesh/test/out/res; found: ar bg ca cs da de el en_GB es es_US et fa fi fr hi hr hu in it iw ko lt lv ms nb nl pl pt pt_PT ro ru sk sl sr sv th tl tr uk vi zh_CN zh_TW
I: Building apk file...
Click to expand...
Click to collapse
Click to expand...
Click to collapse
The Original size = 21 mb
The Decompiled-Recompiled Size = 15 mb.
Now if you try and push it to /system/framework you get boot loop.
And if you change resources, like adding pngs, it will not even compile.
We are missing something else here? Don't know what!
ganeshbiyer said:
decompiling framework-res.apk
Compiling framework-res.apk (Without making any changes)
The Original size = 21 mb
The Decompiled-Recompiled Size = 15 mb.
Now if you try and push it to /system/framework you get boot loop.
And if you change resources, like adding pngs, it will not even compile.
We are missing something else here? Don't know what!
Click to expand...
Click to collapse
C:\apk>apktool b framework-res unchanged/framework-res.apk
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\apk\framework-res\res/drawable-sw600dp-hdpi
invalid resource directory name: C:\apk\framework-res\res/drawable-sw600dp-mdpi
invalid resource directory name: C:\apk\framework-res\res/drawable-sw600dp-xhdpi
invalid resource directory name: C:\apk\framework-res\res/layout-sw600dp
invalid resource directory name: C:\apk\framework-res\res/layout-w600dp
invalid resource directory name: C:\apk\framework-res\res/values-h720dp
invalid resource directory name: C:\apk\framework-res\res/values-sw600dp
invalid resource directory name: C:\apk\framework-res\res/values-sw600dp-land
invalid resource directory name: C:\apk\framework-res\res/values-sw600dp-w1024dp
invalid resource directory name: C:\apk\framework-res\res/values-sw600dp-w1280dp
invalid resource directory name: C:\apk\framework-res\res/values-w360dp
invalid resource directory name: C:\apk\framework-res\res/values-w480dp
invalid resource directory name: C:\apk\framework-res\res/values-w500dp
invalid resource directory name: C:\apk\framework-res\res/values-w600dp
invalid resource directory name: C:\apk\framework-res\res/values-w720dp
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\Jesse\AppData\Local\Temp\A
PKTOOL8244304813261978902.tmp, -x, -I, C:\Users\Jesse\apktool\framework\2-nozomi
.apk, -S, C:\apk\framework-res\res, -M, C:\apk\framework-res\AndroidManifest.xml
]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
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)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\Jesse\AppData\Local\Temp\APKTOOL8244304813261978902.tmp, -x, -I, C:\Users\J
esse\apktool\framework\2-nozomi.apk, -S, C:\apk\framework-res\res, -M, C:\apk\fr
amework-res\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
Click to expand...
Click to collapse
for me when I decompile Im missing folders after it
thanitos said:
for me when I decompile Im missing folders after it
Click to expand...
Click to collapse
Are you doing this first:
apktool if SemcGenericUxpRes.apk
Yup
Sent from my LT28at using xda premium
what version of APKTOOL you use?
Currently I am using version 1.5, I have no problem to compile or decompile (no error), but when I install framework-res.apk, my phone goes into bootloop.
I tried several utility to sign my file, but so far no result.
The newest version also talking about the att version just to be clear
Sent from my LT28at using xda premium
Hello !
Have anything find a solution to compile correctly framework-res.apk. ???
just found one from Xperia S/Sola forums and it works for our ION :good:
http://forum.xda-developers.com/showthread.php?t=1943855
Followed the steps and changed the showNavigationBar value to true re-compiled the framework-res.apk and copied the resources.arsc from the compiled apk to original apk and pushed it to the Ion, and it worked. Can see the Navigation bar buttons now. The only catch is you cannot change the application backgrounds using the themes.
kapil4wm said:
just found one from Xperia S/Sola forums and it works for our ION :good:
http://forum.xda-developers.com/showthread.php?t=1943855
Followed the steps and changed the showNavigationBar value to true re-compiled the framework-res.apk and copied the resources.arsc from the compiled apk to original apk and pushed it to the Ion, and it worked. Can see the Navigation bar buttons now. The only catch is you cannot change the application backgrounds using the themes.
Click to expand...
Click to collapse
Thanks for the find and letting us know about it, much appreciated now I wana play with it!
Edited- after reading the linked topic I noticed that step 4 makes me feel stupid for not thinking of that lol but I dont fully understand step 5 and what those two lines of code are for, maybe if I was at my pc I could open it and see but I'm not so in the context what do they do?
Sent from my LT28at using xda premium
I want to bring this thread back to life ... Since I can't find a solution to my problem after modding the Framework-res.apk.
In addition to known problem that you can't changed theme. My dialer is now became transparent. This is very annoyed and make it hard to read the number pad. Can anyone please help ?
Here is the screenshot:
{
"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"
}
That's a deep necro, just flash the original ftf. Easy quick fix
Sent from my LT28at using xda app-developers app
thanitos said:
That's a deep necro, just flash the original ftf. Easy quick fix
Sent from my LT28at using xda app-developers app
Click to expand...
Click to collapse
I could simply restore my backup of framework-res.apk. I post the question here if any one successfully recomplile framework-res without the problems I mentioned above.
Sent from my Ion* using Tapatalk 2

APKTOOL - recompiling error

I had been looking before for the same thread I created, but I hadn't found so I created this one. I want to mod some apps for my Jelly Sandwich. Decompiling goes well, but recompiling - error!
This what I exactly do:
apktool if framework-res.apk (success)
apktool d SystemUI.apk (success)
apktool b SystemUI.apk (error)
This is what I get after recompiling command:
Code:
I: Checking whether sources has changed...
I: Smaling...
Exception in thread "main" brut.androlib.AndrolibException: Could not write dex
to file: SystemUI\build\apk\classes.dex
at brut.androlib.src.DexFileBuilder.writeTo(DexFileBuilder.java:61)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:50)
at brut.androlib.src.SmaliBuilder.build(SmaliBuilder.java:35)
at brut.androlib.Androlib.buildSourcesSmali(Androlib.java:222)
at brut.androlib.Androlib.buildSources(Androlib.java:179)
at brut.androlib.Androlib.build(Androlib.java:170)
at brut.androlib.Androlib.build(Androlib.java:154)
at brut.apktool.Main.cmdBuild(Main.java:182)
at brut.apktool.Main.main(Main.java:67)
Caused by: java.io.FileNotFoundException: SystemUI\build\apk\classes.dex (Odmowa
dostŕpu)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at brut.androlib.src.DexFileBuilder.writeTo(DexFileBuilder.java:57)
... 8 more
Even without changing anything, apktool doesn't recompile my apk.
I have tried to recompile on two PCs - both of them have latest Java software installed.
I could post it in General Android section, but I think it can be related with Xperia only.
-----------------EDIT------------------------
I got something like that once also:
Code:
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/drawab
le-sw600dp-hdpi
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/layout
-sw600dp
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/values
-sw600dp
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/values
-sw600dp-port
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/values
-sw720dp
invalid resource directory name: C:\Users\JA\Desktop\apktool\SystemUI\res/values
-sw720dp-port
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, -F, C:\Users\JA\AppData\Local\Temp\APKT
OOL5816768975862364769.tmp, -I, C:\Users\JA\apktool\framework\1.apk, -S, C:\User
s\JA\Desktop\apktool\SystemUI\res, -M, C:\Users\JA\Desktop\apktool\SystemUI\Andr
oidManifest.xml]
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:193)
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)
Caused by: brut.common.BrutException: could not exec command: [aapt, p, -F, C:\U
sers\JA\AppData\Local\Temp\APKTOOL5816768975862364769.tmp, -I, C:\Users\JA\apkto
ol\framework\1.apk, -S, C:\Users\JA\Desktop\apktool\SystemUI\res, -M, C:\Users\J
A\Desktop\apktool\SystemUI\AndroidManifest.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:191)
... 6 more
I had this problem before too
Are you sure the apk you decompiled hasnt been modified my anyone before ?
Are you using the latest aapt and apktool ? Apktool 1.5 kinda fix all those problems, althought most problems come from apk..
In the second log of your apktool, all you need to do is edit the xml files where the error is coming from.
Anyway, heres the apktool thread
http://forum.xda-developers.com/showthread.php?t=1755243
Sent from my WT19i
kokzhanjia said:
I had this problem before too
Are you sure the apk you decompiled hasnt been modified my anyone before ?
Are you using the latest aapt and apktool ? Apktool 1.5 kinda fix all those problems, althought most problems come from apk..
In the second log of your apktool, all you need to do is edit the xml files where the error is coming from.
Anyway, heres the apktool thread
http://forum.xda-developers.com/showthread.php?t=1755243
Sent from my WT19i
Click to expand...
Click to collapse
This 1.5 is strange... What is the comand for decompiling, compilng and installing frameworks? Damn...
Sent from my HTC One X using xda premium
Install frameworks first :apktool if framework-res.apk
Decompile : apktool d <name of apk> <folder created>
Recompile : apktool b <name of folder> <name of new apk>
Sent from my WT19i
Well, those methods work on 1.4.3 downloaded from Google project site only. And recompiling doesn't work also.
So I cannot recompile modded before apks by other people?
Sent from the best phone in the world - HTC One X with ARHD and Bricked Kernel 1,6 GHz
maxio1998 said:
Well, those methods work on 1.4.3 downloaded from Google project site only. And recompiling doesn't work also.
So I cannot recompile modded before apks by other people?
Sent from the best phone in the world - HTC One X with ARHD and Bricked Kernel 1,6 GHz
Click to expand...
Click to collapse
You can,but thr error you stated may happen again,maybe if you could send that apk and i have a look ? If its okay to you
Sent from my WT19i
I would learn to use apktool before making a ROM
Well, I had this problem a few month ago, and i solved it by reinstalling / downloading it and putting stock. 587 framework-res.apk...
Try it, hope it helps
Sent from my LT18i using xda app-developers app
jader13254 said:
I would learn to use apktool before making a ROM
Well, I had this problem a few month ago, and i solved it by reinstalling / downloading it and putting stock. 587 framework-res.apk...
Try it, hope it helps
Sent from my LT18i using xda app-developers app
Click to expand...
Click to collapse
I just cannot solve it, I installed 587 framework and infact I cannot recompile anything
Try
Put an Folder where is just apktool.jar and aapt.exe
Open command
Type java -jar apktool.jar if framework-res.apk
Then type java -jar apktool.jar if SemcGenericUxpRes.apk
Then type java -jar apktool.jar d SystemUI.apk
Then java -jar apktool.jar b SystemUI
Gesendet von meinem LT18i mit Tapatalk 2
papayayoghurt said:
Try
Put an Folder where is just apktool.jar and aapt.exe
Open command
Type java -jar apktool.jar if framework-res.apk
Then type java -jar apktool.jar if SemcGenericUxpRes.apk
Then type java -jar apktool.jar d SystemUI.apk
Then java -jar apktool.jar b SystemUI
Gesendet von meinem LT18i mit Tapatalk 2
Click to expand...
Click to collapse
Danke schön! I will try later, Freund!
Sent from the best phone in the world - HTC One X with ARHD and Bricked Kernel 1,6 GHz
maxio1998 said:
Danke schön! I will try later, Freund!
Sent from the best phone in the world - HTC One X with ARHD and Bricked Kernel 1,6 GHz
Click to expand...
Click to collapse
Danke schön, ich werde es später probieren mein Freund
Sent from my LT18i using xda app-developers app
jader13254 said:
Danke schön, ich werde es später probieren mein Freund
Sent from my LT18i using xda app-developers app
Click to expand...
Click to collapse
Ja, papayayoghurt ist Österreicher
Aber, wir mussen English sprechen - das ist xda
Sent from the best phone in the world - HTC One X with ARHD and Bricked Kernel 1,6 GHz
papayayoghurt said:
Try
Put an Folder where is just apktool.jar and aapt.exe
Open command
Type java -jar apktool.jar if framework-res.apk
Then type java -jar apktool.jar if SemcGenericUxpRes.apk
Then type java -jar apktool.jar d SystemUI.apk
Then java -jar apktool.jar b SystemUI
Gesendet von meinem LT18i mit Tapatalk 2
Click to expand...
Click to collapse
Code:
C:\Users\JA\Desktop\apktool>java -jar apktool.jar b lol
I: Checking whether sources has changed...
I: Smaling...
I: Checking whether resources has changed...
I: Building resources...
C:\Users\JA\Desktop\apktool\lol\res\values\arrays.xml:27: error: Found tag refer
ence-array where item is expected
C:\Users\JA\Desktop\apktool\lol\res\values\public.xml:888: error: Public symbol
array/shutdown_reboot_actions declared here is not defined.
C:\Users\JA\Desktop\apktool\lol\res\values\public.xml:887: error: Public symbol
array/shutdown_reboot_options declared here is not defined.
Exception in thread "main" brut.androlib.AndrolibException: brut.common.BrutExce
ption: could not exec command: [aapt, p, --min-sdk-version, 15, --target-sdk-ver
sion, 15, -F, C:\Users\JA\AppData\Local\Temp\APKTOOL3563551836292598120.tmp, -I,
C:\Users\JA\apktool\framework\1.apk, -S, C:\Users\JA\Desktop\apktool\lol\res, -
M, C:\Users\JA\Desktop\apktool\lol\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, 15, --target-sdk-version, 15, -F, C:\Users\JA\AppData\Local\Temp\APKT
OOL3563551836292598120.tmp, -I, C:\Users\JA\apktool\framework\1.apk, -S, C:\User
s\JA\Desktop\apktool\lol\res, -M, C:\Users\JA\Desktop\apktool\lol\AndroidManifes
t.xml]
at brut.util.OS.exec(OS.java:83)
at brut.androlib.res.AndrolibResources.aaptPackage(AndrolibResources.jav
a:253)
... 6 more
I placed folder with apktool on desktop, btw.
jader13254 said:
Danke schön, ich werde es später probieren mein Freund
Sent from my LT18i using xda app-developers app
Click to expand...
Click to collapse
Yeah, I know, I just wanted to put some English to German LOL
Hi
Ok, please try to decompile using this tool:
http://wanamlite.com/forums/showthread.php?tid=30
LG
papayayoghurt said:
Hi
Ok, please try to decompile using this tool:
http://wanamlite.com/forums/showthread.php?tid=30
LG
Click to expand...
Click to collapse
Will try tomorrow.
Ok, now I can recompile apks but only some. I get error while recompiling Phonebook, Mesaages or Phone. What is that?
Sent from the best phone in the world - HTC One X with ARHD and Bricked Kernel 1,6 GHz
I'm having the same issue. I cannot recompile some apk even without changes, on the other hand some others work well. The mentioned link doesn't work.
vavalexus said:
I'm having the same issue. I cannot recompile some apk even without changes, on the other hand some others work well. The mentioned link doesn't work.
Click to expand...
Click to collapse
Use the latest apktool, I have no problems with it. If you're on an older version, replace aapt.exe from the latest Android SDK.
僕のLT18iから送られてきた
popthosegaskets said:
Use the latest apktool, I have no problems with it. If you're on an older version, replace aapt.exe from the latest Android SDK.
僕のLT18iから送られてきた
Click to expand...
Click to collapse
I tried both old an latest (2.0 beta) apktools, same issue. Please try re-compile "skype.apk" (I do not attach it since it is quite heavy but I believe you will be able to download it somewhere).
Thank you!
vavalexus said:
I tried both old an latest (2.0 beta) apktools, same issue. Please try re-compile "skype.apk" (I do not attach it since it is quite heavy but I believe you will be able to download it somewhere).
Thank you!
Click to expand...
Click to collapse
You can send me the link which you downloaded it from, along with what you want to change. I can do it for you.
僕のLT18iから送られてきた

Decompile, modify, compile SystemUIGoogle.apk - Oreo 8.1

Hi
I used apktool to decompile SystemUIGoogle.apk from stock Oreo 8.1
I changed something and now I'd like to compile again and push modified APK to my Pixel XL.
I was getting error with 9patch PNG, but I need now sign,zippalign etc.
Apktool can do this?
If yes, how?
What tools do I need more?
Some time ago I used APK Multitool and I made changes, then flashable zips, but Oreo is not supported yet, so..any help is appreciated..
Thanks in advance.
Ask @Tulsadiver
I don't actually sign my mods as they are done directly on the phone therefore using existing signing.
Tulsadiver said:
I don't actually sign my mods as they are done directly on the phone therefore using existing signing.
Click to expand...
Click to collapse
You're saying I can modify SystemUIGoogle.apk on the fly on the phone?
How?
Is it safe?
I want to change only one value in one xml.
mr-tical said:
You're saying I can modify SystemUIGoogle.apk on the fly on the phone?
How?
Is it safe?
I want to change only one value in one xml.
Click to expand...
Click to collapse
You still have to do the modding yourself on your computer..... decompile, mod, recompile, and then install via TWRP. Vrthemer has been around a long time.
Tulsadiver said:
You still have to do the modding yourself on your computer..... decompile, mod, recompile, and then install via TWRP. Vrthemer has been around a long time.
Click to expand...
Click to collapse
Well, I have problem with recompile after modification.
If I attach framework-res.apk, SystemUIGoogle.apk and write what and where to modify, can you do it for me?
mr-tical said:
Well, I have problem with recompile after modification.
If I attach framework-res.apk, SystemUIGoogle.apk and write what and where to modify, can you do it for me?
Click to expand...
Click to collapse
Sure but what kind of trouble are you having?
Tulsadiver said:
Sure but what kind of trouble are you having?
Click to expand...
Click to collapse
I decompiled SystemUIGoogle.apk with apktool.
I changed what I need in res/values/bools.xml >
Code:
<bool name="config_hideLtePlus">true</bool>
to false
And now while compile I have problem with:
Code:
ERROR: 9-patch image C:\Users\Adam\Desktop\apk\SystemUIGoogle\res\drawable-xxxhdpi\pip_dismiss_scrim.9.png malformed.
W: No marked region found along edge.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Adam\AppData\Local\Temp\brut_util_Jar_734656234341715788.tmp, p, --forced-package-id, 127, --min-sdk-version, 27, --target-sdk-version, 27, --version-code, 27, --version-name, 8.1.0, --no-version-vectors, -F, C:\Users\Adam\AppData\Local\Temp\APKTOOL3518753523982827780.tmp, -0, arsc, -0, arsc, -I, C:\Users\Adam\AppData\Local\apktool\framework\1.apk, -S, C:\Users\Adam\Desktop\apk\SystemUIGoogle\res, -M, C:\Users\Adam\Desktop\apk\SystemUIGoogle\AndroidManifest.xml]
W: Found along left edge.
W: ERROR: Failure processing PNG image C:\Users\Adam\Desktop\apk\SystemUIGoogle\res\drawable-xxxhdpi\pip_dismiss_scrim.9.png
I fixed this by deleting pip_dismiss_scrim.9.png from res\drawable-xxxhdpi and from public.xml in res\values (I tried yestarday fixing this in different ways, but with no luck)
And now apk was compiled without errors
Code:
C:\Users\Adam\Desktop\apk>apktool b SystemUIGoogle
I: Using Apktool 2.3.2
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'notifications_off_text' has no default translation.
W: warning: string 'notifications_off_title' has no default translation.
W: warning: string 'skylab_instruction_assistant' has no default translation.
W: warning: string 'skylab_instruction_fit' has no default translation.
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
But now I need sign, zippalign etc this apk before I push this to my marlin and I don't know how to do it
mr-tical said:
I decompiled SystemUIGoogle.apk with apktool.
I changed what I need in res/values/bools.xml >
Code:
<bool name="config_hideLtePlus">true</bool>
to false
And now while compile I have problem with:
Code:
ERROR: 9-patch image C:\Users\Adam\Desktop\apk\SystemUIGoogle\res\drawable-xxxhdpi\pip_dismiss_scrim.9.png malformed.
W: No marked region found along edge.
brut.androlib.AndrolibException: brut.common.BrutException: could not exec (exit code = 1): [C:\Users\Adam\AppData\Local\Temp\brut_util_Jar_734656234341715788.tmp, p, --forced-package-id, 127, --min-sdk-version, 27, --target-sdk-version, 27, --version-code, 27, --version-name, 8.1.0, --no-version-vectors, -F, C:\Users\Adam\AppData\Local\Temp\APKTOOL3518753523982827780.tmp, -0, arsc, -0, arsc, -I, C:\Users\Adam\AppData\Local\apktool\framework\1.apk, -S, C:\Users\Adam\Desktop\apk\SystemUIGoogle\res, -M, C:\Users\Adam\Desktop\apk\SystemUIGoogle\AndroidManifest.xml]
W: Found along left edge.
W: ERROR: Failure processing PNG image C:\Users\Adam\Desktop\apk\SystemUIGoogle\res\drawable-xxxhdpi\pip_dismiss_scrim.9.png
I fixed this by deleting pip_dismiss_scrim.9.png from res\drawable-xxxhdpi and from public.xml in res\values (I tried yestarday fixing this in different ways, but with no luck)
And now apk was compiled without errors
Code:
C:\Users\Adam\Desktop\apk>apktool b SystemUIGoogle
I: Using Apktool 2.3.2
W: Could not find sources
I: Checking whether resources has changed...
I: Building resources...
W: warning: string 'notifications_off_text' has no default translation.
W: warning: string 'notifications_off_title' has no default translation.
W: warning: string 'skylab_instruction_assistant' has no default translation.
W: warning: string 'skylab_instruction_fit' has no default translation.
I: Building apk file...
I: Copying unknown files/dir...
I: Built apk...
But now I need sign, zippalign etc this apk before I push this to my marlin and I don't know how to do it
Click to expand...
Click to collapse
Upload it.
Tulsadiver said:
Upload it.
Click to expand...
Click to collapse
All files here
https://drive.google.com/drive/folders/1LakStApjucWhIJiiCBZb-iqCMaXU_lUh?usp=sharing
mr-tical said:
All files here
https://drive.google.com/drive/folders/1LakStApjucWhIJiiCBZb-iqCMaXU_lUh?usp=sharing
Click to expand...
Click to collapse
Is the signed one, the modded one?
Tulsadiver said:
Is the signed one, the modded one?
Click to expand...
Click to collapse
framework-res.apk and SystemUIGoogle.apk are original.
SystemUIGoogle_unsigned.apk is modded and recompiled.
mr-tical said:
framework-res.apk and SystemUIGoogle.apk are original.
SystemUIGoogle_unsigned.apk is modded and recompiled.
Click to expand...
Click to collapse
Try flashing this.
Tulsadiver said:
Try flashing this.
Click to expand...
Click to collapse
Oh Man, thanks!!!
It's working!
Finally!
I have + mark next to LTE while active LTE-CA connection on STOCK (+ with H also)
I can't understand why this is default turned off in Android, but finally I have what I want!
Thank you again, now I need to read about VRTheme
Cheers.
Hey op, I have the same issue on pie with the smaller model of pixel. How do i go about editing it so that I can enable the + next to 4g?
@Tulsadiver
can you tell me how did you recompile the file without error ?
Blackball said:
@Tulsadiver
can you tell me how did you recompile the file without error ?
Click to expand...
Click to collapse
The SystemUIGoogle.apk? There is one png file that needs fixed and replaced.
https://www.androidfilehost.com/?fid=818222786056033865
I can use this file with pie too ?
At my first try i delete the file and everything seems fine. After replace the systemui the phone doesnt boot.
Then i copy the original file back and the phone still not boot
After install firmware with fastboot it still not boot
After wipe data its booting ... that was really strange
Tulsadiver said:
Try flashing this.
Click to expand...
Click to collapse
how is this working? i dont see the values folder on priv-app/systemuiGoogle from module
GabrielHoward said:
how is this working? i dont see the values folder on priv-app/systemuiGoogle from module
Click to expand...
Click to collapse
It has been recompiled into resources.arsc

Categories

Resources