Hello,
From my understanding, when i edit any apk, i should delete the public.xml file as from my understanding it is supposed to get created upon compiling. I remember deleting public.xml from CM7 theme apks and not having a problem. Is it because framework-res.apk is a system apk? Can someone please clarify when and when not to delete the public.xml file?
Thanks all
PS: This is a recycled thread i ran into this question trying to solve the previous contents of this thread, which i have figured out, now i ran into above question.
Bump
Sent from my HTC HD2 using Tapatalk
elesbb said:
Bump
Sent from my HTC HD2 using Tapatalk
Click to expand...
Click to collapse
1- have you ever seen anyone else doing this successfully? if so post the thread and we'll take a look. i haven't, though have not looked really.
2- which xml file is it?
jsmccabe78 said:
1- have you ever seen anyone else doing this successfully? if so post the thread and we'll take a look. i haven't, though have not looked really.
2- which xml file is it?
Click to expand...
Click to collapse
No i havent, if someone already has done it, would i be posting another thread asking how to do it? idts.
And its one of the keyguard xml files found in framework-res.apk I think its the keyguard screen unlock.xml Found in red layout.
heres a snippet of what i think needs to be edited.
Code:
<com.android.internal.widget.DigitalClock android:id="@id/time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginLeft="20.0dip" android:layout_marginTop="15.0dip" android:layout_marginRight="20.0dip" android:layout_alignParentLeft="true" android:layout_alignParentTop="true">
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="56.0sp" android:ellipsize="none" android:gravity="bottom" android:id="@id/timeDisplay" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_marginBottom="6.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
<TextView android:textAppearance="?textAppearanceMedium" android:textSize="18.0sp" android:ellipsize="none" android:gravity="bottom" android:id="@id/am_pm" android:layout_width="wrap_content" android:layout_height="fill_parent" android:layout_marginLeft="4.0dip" android:singleLine="true" android:shadowColor="#c0000000" android:shadowDx="0.0" android:shadowDy="0.0" android:shadowRadius="3.0" />
</com.android.internal.widget.DigitalClock>
Okay after more googling, i think the file i listed above is for pattern unlock. I think the regular lockscreen is as keyguard_screen_tab_unlock.xml. FYI this is for a CM7 ROM. Im gonna edit the above file, (somethin obvious like background color or something) to see if i notice a difference.
UPDATE: I figured out exactly what i want to do. It was that file keyguard_screen_tab.xml. Editing that gave me what i wanted. I have a new question for pro themers out there,
From my understanding, when i edit any apk, i should delete the public.xml file as from my understanding it is supposed to get created upon compiling. I remember deleting public.xml from CM7 theme apks and not having a problem. Is it because framework-res.apk is a system apk? Can someone please clarify when and when not to delete the public.xml file?
Thanks all
I'm not really pro, but I can tell from experience, when you Edit only classes.dex or add/edit only png's you do not need to remove public.xml.
Actually I never removed public.xml before..
what you do need to remove is Resources.arsc when you modify any XML.
Related
I am just getting rolling with Android developement and hacking so while I get my legs on the app developement and theming I thought I would offer my assistance with any xml editing that needs to be done as I noticed there were quite a few references to people needing help editing xml.
PM me with any assistance you need editing/modifying xml.
dashultz said:
I am just getting rolling with Android developement and hacking so while I get my legs on the app developement and theming I thought I would offer my assistance with any xml editing that needs to be done as I noticed there were quite a few references to people needing help editing xml.
PM me with any assistance you need editing/modifying xml.
Click to expand...
Click to collapse
What tools are you using? Once you pull a XML file from an APK what are you using to open, read, and edit the files? Thanks!
KenIzz said:
What tools are you using? Once you pull a XML file from an APK what are you using to open, read, and edit the files? Thanks!
Click to expand...
Click to collapse
Decompile using apk manager, then edit whatever xml using something like notepad++ or any other rich text editor. After done editing, compile and sign.
I'm sorry if this question had been asked already, but I've been googling for 2 days and I'm going crazy...
I found tutorials such as this one, but I don't have a statusbar_background.png file in the drawable folder, in there I only have status_bar_background.hml. I have statusbar_background.9.png in the drawable-mdpi folder where the other requested files are also located, but I'm reluctant to use it since I don't exactly know whats the difference between .png and .9.png. Another tutorial , besides statusbar_background.png, also asks for classes.dex, extracted from services.jar, and I don't have this one either. I guess it's a Froyo thing all these little differences, but I don't want to improvise, so can anyone, please, help out with a tutorial or suggestions on how to edit the status bar for this built?
All useful help much appreciated! Thanks!
P.s. I'm uploading the framework-res.apk, extracted from my phone, in case someone needs to see what it consists of and how things are organized inside.
Do I have to deodex? If so, how?
Anybody?
I'm trying to edit the status_bar.xml in systemui.apk/res/layout/ to direct to an image (statusbar_background.png)
Iv'e edited lines 2 and 19:
<com.android.systemui.statusbar.StatusBarView
<com.android.systemui.statusbar.DateView
From
android:background="#ff000000"
To
android:background="@drawable/statusbar_background"
The image shows on boot but instantly force closes.
Have i missed something completely obvious
The systemui in question is taken from a Touchwiz based Rom.
Hopefully someone can shed some light.
Here are my before and after xml's
Anybody........
Its lonely in here.
dully79 said:
Anybody........
Its lonely in here.
Click to expand...
Click to collapse
hey man , i know its lonely, nobody ussually see these general sections (unspefic to any phone)
.. try posting in ur own phones general section !!
I know someone had previously posted a jar for doing something similar to this, but it lacks a requested feature and is somewhat limited, restrictive, and makes slightly more work to accomplish the same thing. (no disrespect to the author of it).
Usage
Code:
maketc outfile.xml [folder]
Where folder is where the images are, and is optional. If left off, it will use the current folder.
You would put your images into a folder named com_some_packagename. If the images are already prefixed with com_some_packagename, they are left alone, if they are not, they are renamed in the process. This cuts out a step previously needed.
Example
You have 1.png, 2.png, 3.png in the folder /home/user/com_packagename.
You are in /home/user
You run maketc android.xml com_packagename
The files are renamed to com_packagename_1.png, com_packagename_2.png, com_packagename_3.png
/home/user/android.xml is generated to contain
HTML:
<?xml version=1.0 encoding=UTF-8?>
<resource-redirections>
<item name="drawable/1">@drawable/com_packagename_1</item>
<item name="drawable/2">@drawable/com_packagename_2</item>
<item name="drawable/3">@drawable/com_packagename_3</item>
</resource-redirections>
The easiest way to use this is extract the zip to ~/bin (/home/yourusername/bin) and it should then be in your path. If /home/yourusername/bin doesn't exist, create it. You may have to log out and in again for it to be picked up. You will need to give maketc execute permissions either via whatever file manager you use (viewing the file properties/security) or via shell with the command chmod +x ~/bin/maketc
This is meant for Linux, though it should also work under Cygwin.
Hopefully someone will find this useful. Enjoy!
EDIT: As I have not done any work with theme chooser, it just now occurred to me that multiple packages can be in one xml. In its current form, this script can only process one at a time, per folder, but I still think it is less overall work required to get the desired end result with a little copying & pasting.
Download at http://androplasty.com/showthread.php/2160-Theme-Chooser-XML-Generator
Very good, the output file is in alphabetical order (the other jar file did not do this)
Also its very useful not having to copy paste the jar file everywhere
Yes, Yes, Yes!!! Thanks Jim. This is a horrible place to post this, but nonetheless, thanks for getting all "Matrixy" on this last night. You have no clue how many hours combining your script and the xmlgenerator will save those who do TC themes. Now... All we have to do is incorporate it into Vaelpak!!! Must've beat Skyrim last night.
---------- Post added at 09:20 AM ---------- Previous post was at 09:17 AM ----------
Mushroom_Lord said:
Very good, the output file is in alphabetical order (the other jar file did not do this)
Also its very useful not having to copy paste the jar file everywhere
Click to expand...
Click to collapse
For those who don't know Jim's exploits, he's likely one of the best dev's here. It took him 3 minutes to write the bash script to add the process a couple nights back and once he snagged a TC theme, this took very little time.
I've completely re-written this in Mono so it now works on Linux and Windows and added a lot more functionality. Hit the download link in the OP for the details.
Now supports unlimited package names, auto-detected, and 3 different options for batch renaming.
would really like to use this please! i cannot download from your site because my activation email has not been sent. i did sign up. i hit the resend button several times to no avail...
---------- Post added at 09:19 AM ---------- Previous post was at 09:13 AM ----------
pretty sure posting links to download something that requires registration is not permitted.just sayin...at least for me it wasnt..idk how popular you are, so it may be ok for you
JayR_Themer said:
would really like to use this please! i cannot download from your site because my activation email has not been sent. i did sign up. i hit the resend button several times to no avail...
---------- Post added at 09:19 AM ---------- Previous post was at 09:13 AM ----------
pretty sure posting links to download something that requires registration is not permitted.just sayin...at least for me it wasnt..idk how popular you are, so it may be ok for you
Click to expand...
Click to collapse
Responded to your PM. You should be all set.
And you're right, it is not permitted. Post attachments here require registration to download, so if some hypocrite here wants to kill this thread or ban me for it, so be it. I started my own site and stopped posting my work to XDA over a year ago due to some ridiculous rules and bat**** crazy power mongering mods. I posted this here only because there are a large number of themers here that may find it useful.
Ahh i see. Thank you very much.
Sent from my Galaxy Nexus using Tapatalk 2
I Am looking for this. please attach file.
thankyou
Johnsondr80 said:
I Am looking for this. please attach file.
thankyou
Click to expand...
Click to collapse
The link in the OP has been corrected.
vaelek said:
The link in the OP has been corrected.
Click to expand...
Click to collapse
You the Boss
Thanks you will hear from me again by this weekend.
I can"t download this file, can anybody help me, please!
hi all
i dont know if it is an error or not when i recompile framework-res.apk all id="0x01xxxxxx" changed to id="0x03xxxxxx" such as :
<public type="string" name="global_action_power_off" id="0x01040193" />
changed to <public type="string" name="global_action_power_off" id="0x03040193" />
notice at RED number. So all the reference id in android.policy.jar will be different with id in framework-res.apk
that mean it will wont work
So your trying the way to properly de/recompile framework-res.apk right?
Don't delete the original public.xml, just edit it and add the new ID for the new variable you introduced.
I know exactly that error you just encountered coz I had those the first time I compiled my framework file last time.
Edit: this is actually a special case only, we're always aware that we need to delete public.xml and it will regenerate, not on this framework-res.apk(SysteUI.apk is fine), Sony f'd us too much already.
Tapatalked from my bricked TX
Rycon33 said:
So your trying the way to properly de/recompile framework-res.apk right?
Don't delete the original public.xml, just edit it and add the new ID for the new variable you introduced.
I know exactly that error you just encountered coz I had those the first time I compiled my framework file last time.
Edit: this is actually a special case only, we're always aware that we need to delete public.xml and it will regenerate, not on this framework-res.apk(SysteUI.apk is fine), Sony f'd us too much already.
Tapatalked from my bricked TX
Click to expand...
Click to collapse
thank you. i thought so , keep original public.xml then add new id. but i want to sure about that.
anyway i want add reboot,recovery option to power menu so could you help me. i search a lot and found some guides but for samsung, i think it is different
with xperia.
devilmaycry2020 said:
thank you. i thought so , keep original public.xml then add new id. but i want to sure about that.
anyway i want add reboot,recovery option to power menu so could you help me. i search a lot and found some guides but for samsung, i think it is different
with xperia.
Click to expand...
Click to collapse
Apologies mate, I've only done reboot mod but not "reboot to recovery". On a stock Sony ROM, I haven't seen anybody have done it before ever since I had my first Sony phone since x8 , arc, P, until TX.
Tapatalked from my bricked TX
thanks.
i just add new id in original public.xml to recompile, and then decompile new framework-res.apk but why all id in public.xml had changed ? i'm not clearly about that.
please explain more. thanks.
and some *.png files had changed too (smaller file size) i used apktool 1.5.2
and do i need to follow this http://forum.xda-developers.com/showthread.php?t=2321207
to avoid bootloop ?
You need to follow that guide the first time, otherwise it will only cause the phone to bootloop. Then after that you can de/recompile easily. Not sure about your question on public.xml. And it's better to post there if you got problem on recompile, more help you will get from there.
Tapatalked from my bricked TX