[Q] Editing AndroidManifest.xml is system apks - Sony Ericsson XPERIA X10 Mini

So im wondering, when I edit a system apk this is the process I use:
Open apk with 7zip, I dont extract.
Replace all png's I want to and exit.
Simple yes? Heres the problem. How do I edit AndroidManifest.xml and add it back in? I can get the xml un-encyrpted and edit it but do I need to make the file encypted again before I put it back?
Any comments/suggestions welcomed
Thanks!
Sent from my U20i using XDA App

Possibly the best way I can answer that is by pointing you in this direction: http://forum.xda-developers.com/showthread.php?t=849223
This is a very handy guide to fiddling with your system apps and will not only answer your question but may answer questions you didn't even know you had..

Wow thanks, just what I needed, I had a feeling I had to decompile/recompile it then move the files into the existing one. You'd think they made these things simple huh? XD
Sent from my U20i using XDA App

Oh, but this is simple. Relatively, at least. You just wait until you start having to write smali..

I just had a look, its pretty overwhelming. I code php though so its not that bad. I know the challenges ahead
Sent from my U20i using XDA App

jimcantfixit said:
I just had a look, its pretty overwhelming. I code php though so its not that bad. I know the challenges ahead
Sent from my U20i using XDA App
Click to expand...
Click to collapse
Oh really?? I used to do a lot of C++ back in the day so I'm okay with java but then it starts going over my head a bit. When I'm next in the mood to hack into the code of our little machine, I may end up stalking you mercilessly..

Related

Learning to theme

My problem at this stage is, all the threads say to use photo shop. Well I can't afford those prices. And I refuse to use pirated software! So to the question. Is Gimp compatible or is there something else available that some of you prefer? I wanna know can I get the same results with Gimp or another product?
Thanks for your time.
Sent from my SGH-T959 using XDA Premium App
GIMP is a great alt!
Thanks man. Hitting the button
Sent from my SGH-T959 using XDA Premium App
Check this thread out, I embarrass myself asking for help... may help you too
http://forum.xda-developers.com/showthread.php?t=1067628
get APK Manager and Notepad++ to edit xml files

[Tool] Themer's helper

I created a basic tool for swapping icons(Windows/DOS only right now). Real easy to use. You can either double click the .bat file or run it command line. Either way it works for swapping icons in/out of com.htc.resources.apk, framework-res.apk, and SystemUI.apk.
Only gotcha is that it is case sensitive providing the APK name. I'd love to hear feedback if you give it a try. I'll revise this again in a bit after I get some feedback. If there's interest I'll build one that allows XML swaps as well.
Directions.
Copy the apk file to the directory with this script.
Run the script either from command line or windows
Follow the prompts
Just that easy
MrSmith317 said:
I created a basic tool for swapping icons(Windows/DOS only right now). Real easy to use. You can either double click the .bat file or run it command line. Either way it works for swapping icons in/out of com.htc.resources.apk, framework-res.apk, and SystemUI.apk.
Only gotcha is that it is case sensitive providing the APK name. I'd love to hear feedback if you give it a try. I'll revise this again in a bit after I get some feedback. If there's interest I'll build one that allows XML swaps as well.
Directions.
Copy the apk file to the directory with this script.
Run the script either from command line or windows
Follow the prompts
Just that easy
Click to expand...
Click to collapse
Good idea bro
Sent from my ADR6425LVW using xda premium
Okay, you used to be a helpful guy, now you are an enabler!
I was thinking maybe I should learn to theme a bit so I can make everything exactly to my liking but I have already spent way too much time learning all the root stuff and setting up my phone and now I find this post. Ay-ay-ay...
MrSmith317 said:
I created a basic tool for swapping icons(Windows/DOS only right now). Real easy to use. You can either double click the .bat file or run it command line. Either way it works for swapping icons in/out of com.htc.resources.apk, framework-res.apk, and SystemUI.apk.
Only gotcha is that it is case sensitive providing the APK name. I'd love to hear feedback if you give it a try. I'll revise this again in a bit after I get some feedback. If there's interest I'll build one that allows XML swaps as well.
Directions.
Copy the apk file to the directory with this script.
Run the script either from command line or windows
Follow the prompts
Just that easy
Click to expand...
Click to collapse
can't wait to try it.
feralicious said:
Okay, you used to be a helpful guy, now you are an enabler!
I was thinking maybe I should learn to theme a bit so I can make everything exactly to my liking but I have already spent way too much time learning all the root stuff and setting up my phone and now I find this post. Ay-ay-ay...
Click to expand...
Click to collapse
That's the point..enabling us to be nutty with our phones.
Sent from my ADR6425LVW using Tapatalk
thanks for this man
Awesome! Going to try this tonight!
any reason you could think that this wouldn't work for the Tbolt?
rayjr13 said:
any reason you could think that this wouldn't work for the Tbolt?
Click to expand...
Click to collapse
I don't know how the framework is laid out, but in theory it should work for any HTC phone that uses com.htc.resources. Only problem is that some icons may belong in different places. But that part is on the user anyway...
You made xda News with this. Nice work
Sent from my ADR6425LVW using xda premium
That's friggin awesome
Sent from my ADR6425LVW using Tapatalk

Apktool help

Hi,
I can decompile/compile/sign/zipalign fine using apktool, but when i have decompiled framework/systemui all the xml files come out with huge gaps between the coding. im using notepad++ to view/edit xml.
It doesn't affect the compiling but its hard to find code to change.
example: a normal xml with 5 lines of code will come out with about 20-30 lines.
Am i doing something wrong or is it apktool?
thanks.
stealo said:
Hi,
I can decompile/compile/sign/zipalign fine using apktool, but when i have decompiled framework/systemui all the xml files come out with huge gaps between the coding. im using notepad++ to view/edit xml.
It doesn't affect the compiling but its hard to find code to change.
example: a normal xml with 5 lines of code will come out with about 20-30 lines.
Am i doing something wrong or is it apktool?
thanks.
Click to expand...
Click to collapse
Its an APKtool issue, emmm I got alot of errors using apk manager and apktool, I dont know whats the problem and still didnt find a solution. Everytime I use it I have to have errors... and its annoying
I could do many stuff if it would work !!
do you want my apktool folder? i can try and help if its the same as my setup. its a bit messy but works.
Sent from my GT-I9100 using xda app-developers app
stealo said:
do you want my apktool folder? i can try and help if its the same as my setup. its a bit messy but works.
Sent from my GT-I9100 using xda app-developers app
Click to expand...
Click to collapse
check the link below ma8, even though its a mod tutorial thread, u have some usefull info regarding APK tool and also about decompile/recompile subject's over there, which might help u with ur issue
http://forum.xda-developers.com/showthread.php?p=29020343&posted=1#post29020343
Sun90 said:
check the link below ma8, even though its a mod tutorial thread, u have some usefull info regarding APK tool and also about decompile/recompile subject's over there, which might help u with ur issue
http://forum.xda-developers.com/showthread.php?p=29020343&posted=1#post29020343
Click to expand...
Click to collapse
cheers.
i saw that this mornong. i got sweet [email protected]#k all done at work today. playin around with all that stuff. ive switched back to cm9 stable. still got issues with the xml's, a door knob probably knows more than me though.
Sent from my GT-I9100 using xda app-developers app

Decompiling an app

I ask a question on your site several weeks ago about the default messaging app on Samsung Galaxy s2 aokp jelly bean. It seems that if someone sends me a picture with text the picture covers to text and I can't read it. I asked if there was any way to correct it and below is the answer I got. I am sorry to disagree with whoever posted this however that is not a simple fix. I have Google and look for how to decompile a app and I am unable to find a app to edit a apk file. I am NOT asking for a step by step but surely someone can recommend an app I can download that would allow me to open the MMS app and edit it. Once again this is not a simple fix perhaps it is for you but it is not for me thank you for your time
This is a simple issue that the user can fix. Just have to decompile the apk and adjust the spacing. A search would have saved you opening a new thread.
Thread closed.
Sent from my SGH-I777 using xda app-developers app
lishron said:
I ask a question on your site several weeks ago about the default messaging app on Samsung Galaxy s2 aokp jelly bean. It seems that if someone sends me a picture with text the picture covers to text and I can't read it. I asked if there was any way to correct it and below is the answer I got. I am sorry to disagree with whoever posted this however that is not a simple fix. I have Google and look for how to decompile a app and I am unable to find a app to edit a apk file. I am NOT asking for a step by step but surely someone can recommend an app I can download that would allow me to open the MMS app and edit it. Once again this is not a simple fix perhaps it is for you but it is not for me thank you for your time
This is a simple issue that the user can fix. Just have to decompile the apk and adjust the spacing. A search would have saved you opening a new thread.
Thread closed.
Sent from my SGH-I777 using xda app-developers app
Click to expand...
Click to collapse
If you search xda or google you will find plenty of tools that will do that for you.
I really do appreciate all the hard work that xda developers do. I do not like posting on here because I know your time is important but I also don't want to feel belittled. Have searched your site perhaps I'm poor at searching. Is there an app you would suggest that I could download to my phone or Android tablet to edit apk file. Thanks so much
Sent from my SGH-I777 using xda app-developers app
lishron said:
I really do appreciate all the hard work that xda developers do. I do not like posting on here because I know your time is important but I also don't want to feel belittled. Have searched your site perhaps I'm poor at searching. Is there an app you would suggest that I could download to my phone or Android tablet to edit apk file. Thanks so much
Sent from my SGH-I777 using xda app-developers app
Click to expand...
Click to collapse
Apktool, the app by virtuous team, and i think apk manager
Sent by from my Zanpakuto using Getsuga Tensho!
Thanks so much however after posting this I updated to the newest aokp and the issue is resolved. It does still have the sender's name overlapping the date but not the picture overlapping the message. Thanks so much and I will still try the suggested APK editor.
Sent from my SGH-I777 using xda app-developers app
Go check out the Android development guide by Google, you can get several tools to decompile an apk. As well as .dex file
Sent from my SGH-I777 using Tapatalk 2
I agree that response was pretty rude. I'm guessing they were trying to scare you away rather than giving advice on next steps. That if you don't know how to do what they said you'd leave it to those that do know how.
But on to your original question...
Wikipedia's location for APK format (can't post link as I'm too new) says that the file is just a ZIP file (or JAR file). So likely 7-zip or your favorite program that can open ZIP's/JAR's will work. You might have to rename the extension to .ZIP or .JAR for the program to recognize it.
Nobody was being rude. We told him to search and that there are plenty of resources already available to him. Nothing wrong with that. Good luck and happy flashing.
The post was mine and it was not rude in the least. The information for what you need to do is posted. Has been for a few years now. Ever since people started doing customs themes. You will not be able to do this without a computer. All you have to do is decompile the apk, find the XML that displays the mms message and adjust the spacing by a few pixels. And then recompile the apk. There are tut all over the place on how to do this
You may have to be creative in your searches to be lead where you need to go but that is part of the learning that android requires. Sometimes you need to think outside the box to get the outcome you desire.
Batcom2
OneOfMany07 said:
I agree that response was pretty rude. I'm guessing they were trying to scare you away rather than giving advice on next steps. That if you don't know how to do what they said you'd leave it to those that do know how.
But on to your original question...
Wikipedia's location for APK format (can't post link as I'm too new) says that the file is just a ZIP file (or JAR file). So likely 7-zip or your favorite program that can open ZIP's/JAR's will work. You might have to rename the extension to .ZIP or .JAR for the program to recognize it.
Click to expand...
Click to collapse
This only works for 35% of the apk as the XML files are encrypted until decompiled as are the .9 pngs
Batcom2

Adding apps to flashable files

So if I want to add apps like the note2 gallery to my port do I just put it in the app file zip it up and sign it?
Sent from my SGH-T959 using xda app-developers app
Hey skinzy98, real quick, just wanted to let you know that your work in the development sub-forum is greatly appreciated. Keep up the good work! :thumbup:
Now to answer your question. If you're planning to inject an app into a ROM, then you can accomplish this by placing the .apk into the system/app directory inside your ROMNAME.zip, and that's it (assuming the ROM sets recursive permissions to the entire system/app directory). This would result in your injected app being installed as a system app. However, if you want it to be installed as a data app... Well, it's gonna' be a little more involved. For what you plan to do, installing it as a system app would probably be best anyhow. Good luck, and let me know if you need any help/have any questions. Always glad to help a bro out when I can.
Sent from my SGH-T959
N00B_IN_N33D said:
Hey skinzy98, real quick, just wanted to let you know that your work in the development sub-forum is greatly appreciated. Keep up the good work! :thumbup:
Now to answer your question. If you're planning to inject an app into a ROM, then you can accomplish this by placing the .apk into the system/app directory inside your ROMNAME.zip, and that's it (assuming the ROM sets recursive permissions to the entire system/app directory). This would result in your injected app being installed as a system app. However, if you want it to be installed as a data app... Well, it's gonna' be a little more involved. For what you plan to do, installing it as a system app would probably be best anyhow. Good luck, and let me know if you need any help/have any questions. Always glad to help a bro out when I can.
Sent from my SGH-T959
Click to expand...
Click to collapse
Thanks man that's what I thought I just didn't want to put in the builds I made yesterday and it screw em all up so I figured I'd ask
Sent from my GT-I9000 using xda app-developers app
skinzy98 said:
So if I want to add apps like the note2 gallery to my port do I just put it in the app file zip it up and sign it?
Sent from my SGH-T959 using xda app-developers app
Click to expand...
Click to collapse
You are going about it the right way, but beware some apps from different sources may in other files or framework.
Just fyi if you run into unexpected issues.
Good luck
PAC_Vibrant 360° Productions
jrongi1 said:
You are going about it the right way, but beware some apps from different sources may in other files or framework.
Just fyi if you run into unexpected issues.
Good luck
PAC_Vibrant 360° Productions
Click to expand...
Click to collapse
Unfortunately happen my parents are against me doing ports and think it is a waste of time. I'll see what happens
Sent from my GT-I9000 using xda app-developers app

Categories

Resources