Hello so what I've got is this. I've modified some of the system .apks and the framework on my current rom well an update has rolled out and i was wondering how do i take those modded apps with me I've used zipthemer and cwm but i get a bootloop using zipthemer i had wrote my xml to install the entire .apk is this wrong any help would be greatly appreciated thanks
Use Super Manager to make a backup of all your .APK's on the device it will be under the .APK section in Super Manager around tab 4 or 5 i believe! Mount your SD card in your PC after the backup and push the backup .APK's to a new folder on your PC and do a fresh clean flash of the new ROM then push the .APK's back onto the device after you reboot! If this is not exactly what you are looking for feel free to elaborate a bit more im pretty sure i understand the concept you are going for!
That's pretty much what I'm aiming at only im talking about modified /system apks I usually wind up pulling the apps and framework and replacing the image files inside the new ones with the ones ive edited using 7.zip and pushing them back to /system/app or framework with adb but man that takes forever lol I guess what ive done here is created a system wide theme including system apps and framework but i dont know how to write the xml to push the images into the framework and apks through a cwm flashable
I guess im kinda looking for building a flashable theme something i can just flash after installing the rom update but I''m not really sure if what I've done is or could be considered a theme i guess it would be seeing as how it changes the look of the apps and framework its seems like I'm themeing the hard way
(btw typing while i think sorry if it doesn't make sense)
edit - but it seems like ive tried pushing the actual "old" apk from an older version to a new version of the same rom and it force closes
Sent from my Incredible 2 using xda premium
AHH yea now i fully understand what you are getting at... props br0... i for one have never used ABD to push system modified values back to the droid but i completely get what your doing. I assume the "old.apk" force closes because your modified values collide with the default values resulting in a source error, are you using some sort of hex editor to modify anything? or just extracting .png's and swapping? if swapping .png's only you should be able to extract swap and rebuild with success but im sure there will be bugs as this is open source of sorts! I'll take a look around and see if i can find anything structured towards this because i gotta tell you man that is something i have thought about taking on myself for a little bit now just haven't gotten around to it. Sounds easy enough to do what you are going for as does most things... until you put it into practice lol i'll have a look around br0
No I'm not using an editor just 7zip to open the apk and pulling pngs from old and placing them in the "new" apk and pushing it back to the system folder if you can download something like this from the market surely I can build one I think I'm just missing something
That would be awesome man any help further into this would be greatly appreciated and Ill do the same and post here
Sent from my Incredible 2 using xda premium
Nevaloud said:
No I'm not using an editor just pulling pngs from old and placing them in the "new" apk and pushing it back to the system folder
That would be awesome man any help further into this would be greatly appreciated and Ill do the same and post here
Sent from my Incredible 2 using xda premium
Click to expand...
Click to collapse
Download a apk editor just Google how to edit apk and you should find a nice set of script put together as a cmd promt.There extract the apk both old and new then replace the PNG files.After that repackage them using the script and also sign them as a system apk (there is a script for this too).After that just copy it to the folder you took it from or via ADB.I edited mine SystemUI.apk like this and now my status bar is exactly like the one in ICS
Sent from my LG-P350 using xda premium
This sounds like what I do with with 7zip i keep the drawable files ive edited on my cpu after a rom update i pull the new apk and open with seven zip and just drag and drop what I've edited to the open res
push back reboot success
Sent from my Incredible 2 using xda premium
Nevaloud said:
This sounds like what I do with with 7zip i keep the drawable files ive edited on my cpu after a rom update i pull the new apk and open with seven zip and just drag and drop what I've edited to the open res
push back reboot success
Sent from my Incredible 2 using xda premium
Click to expand...
Click to collapse
Yeah but i think you need to sign them too in order for them not to FC and yeah rebooting after you pushet them is a must
Sent from my LG-P350 using xda premium
O no no they don't force close doing this at all
they only force close when I tried pushing an "old" apk to the "new" rom
If you pull the new ones and change with 7zip and push back they're money
I really just want to build a flashable theme zip so I don't have to pull all kinds of stuff after an update
Just a simple flash maybe even something i could deploy onto another inc2 but I'm really not sure if that's possible because of the amount of changes done to multiple apks and framework
If you guys would like to see screen shots ill post some just for fun I've done alot of work
Sent from my Incredible 2 using xda premium
http://forum.xda-developers.com/showthread.php?t=1111476
you can have a look at this
Thank you for the link but I'm not using apktool to decompile apps I'm just editing .Png images and putting what I pull from the phone back on the phone like a theme would but I'm not just editing the framework-Res I've "themed" 6 or 7 system apks aswell but I have done zero XML editing to anything
From my Inc2 Nevaloud V2.6
Related
By any chance could someone tell me the best way to make a rom, I have a droid 3 and really want to make a rom but I don't know where to start, thanks in advance
Sent from my DROID3 using XDA App
The best roms start with 3 eggs and little bit of milk to make them fluffy. Whisk briskly!
If you want to jump in, this is a good place to start http://source.android.com/source/index.html
If you just want to dip your toe in the water, then you could start with modding roms, such as adding/removing apks, theming, writing update scripts.
Find a rom and unzip it. Look inside, poke around. Don't be shy-take things apart. Peel back the layers until you find xml and png files. Then, put it all back together and see if you can get it to flash.
Thanks
Sent from my DROID3 using XDA App
thanks so much for the info!
If you download a rom and unzip it, there will be a META-INF folder- look in here- there will be some crypto certs and a com/google/android/ folder which will have the updater-script and update-binary. The script is how the phone knows what to do with the rom. Read through the script and try to decipher what it is actually doing. It will be different for some roms. For example, the cyanogen roms will back up some system apps and replace them after flashing.
You might also come across a boot.img in the root directory of the rom. If you do, there will be some instructions in the updater-script for what to do with it.
Next look in the system/app directory- you'll find a bunch of apk files. These are actually in zip format, so you could unzip them to see what is inside.
A basic test would be to add or remove an apk to the system apps and then get it to flash. Of course you'll need a rooted phone and maybe jarsigner or signapk. Signing a rom will put all those CERT.RSA files back into the META-INF/ folder, which contain crypto hashes of all the files and the names of the files. Some recoveries will allow you to flash an unsigned rom, but you might as well figure out how to sign them. It's in the android link I posted earlier.
Good luck!
Thank you for that also this is very helpful I was kinda confused on where to start with aosp, also that the droid 3 has a locked bootloader
Sent from my DROID3 using XDA App
By any chance would you know how to do some theming? If I understand right it has to do with decompiling the framework-res and systemui apks, and replacing some pngs and xmls with others right?
Sent from my DROID3 using XDA App
I just got started with this so I am by no means an expert. I think you'll want to start by deodexing a rom so that you can make changes to the res, xml, etc. I think most stock apps come as a two part package- an .apk file and an .odex file, both with the same names. Find a stock app and look in the framework and app folders. De-odex-ing takes the odex file, de-compiles it, and then recompiles it into a classes.dex file that is put back into the apk or jar file. This configuration will should allow you to make changes without having to compile the rom from scratch... at least that is my understanding.
Find an apk that doesn't have an odex file and look for the classes.dex file inside. Then take a peak in the res folder in the apk. In the res folder you'll find all sorts of xml and png files.
To get started with decompiling, you'll want baksmali http://code.google.com/p/smali/wiki/DeodexInstructions
Take a look at the issues. JesusFreke wrote some interesting comments in issue 61.
I think there are a few other packages that will do the same thing, and there are certainly a few scripts that will work too.
I ran into some issues with deodexing honeycomb- I outlined the process here http://forum.xda-developers.com/showthread.php?t=1324653.
This is also a good source http://wiki.sdx-developers.com/index.php/How_to_deodex_a_ROM
Good info, thanks.
thank you you have been extremely helpful, im gonna try to get my rom out by sometime this week thank you
I just did some mini-theming. I have an ASUS Transformer- the stock rom has it's own back/menu/home buttons. I wanted a more complete honeycomb look, so I grabbed the stock honeycomb versions from a xoom rom, and added them into my deodexed stock ASUS SystemUI.apk. Oddly enough, if I signed the apk, it wouldn't work, but if I left it unsigned, it works fine.
thats odd, i thought you needed to sign it for it to work
First off you need a deodoxed custom rom , next copy the desired APK's from your System/App folder or from the zip you flashed or from wherever.
Download and Install WinRAR or 7Zip and drag the APK onto the shortcut on your desktop. It should open it up , next extract the LDPI and the HDPI folder/s onto your desktop.
Edit your pics with any program e.g. Paint.net . Then replace the modified folder with the old one.
Next download SignAPKTics from APKTops and install that. Drag the modded APK to your SD card.
Click START , choose the APK , click next , choose Test Sign and click sign! Wait 1.5 mins! And ot should be done. Now just (with root browser) replace the old one with the modded one.
And re-boot! Enjoy...
hah great tip for us
thanks
Has the OP tested this trick?
Thanks a lot!!!!!!!!!!!! :^)
Sent from my GT-S5360 using xda premium
bumslayer said:
Has the OP tested this trick?
Click to expand...
Click to collapse
Click START , choose the APK , click next , choose Test Sign and click sign! Wait 1.5 mins! And ot should be done. Now just (with root browser) replace the old one with the modded one.
Click to expand...
Click to collapse
I'm not sure if he has tried it with system app. replacing a file like systemUI.apk or framework-res.apk will make our device continously give FC message. we should use zip file to push the apk to /system/app. system app is also should not signed. I always using this trick without signing stuff and it works. we just need to make sure that we're replace the ordinary file (not the .9 one) and put a picture with same resolution with the original one.
Exactly my thoughts. Resigning systems apps is a big NO. I already did it twice (SystemUI.apk) and I ended up with no statusbar. Good thing I had a backup.
bumslayer said:
Exactly my thoughts. Resigning systems apps is a big NO. I already did it twice (SystemUI.apk) and I ended up with no statusbar. Good thing I had a backup.
Click to expand...
Click to collapse
afaik, it's all or nothing. if you resign one system apk, you have to do for all system apk with the same key.
irfanbagus said:
afaik, it's all or nothing. if you resign one system apk, you have to do for all system apk with the same key.
Click to expand...
Click to collapse
AND permissions.. make sure the permissions are same as original BEFORE putting it in the appropriate folder..
noobwithgalaxyy said:
AND permissions.. make sure the permissions are same as original BEFORE putting it in the appropriate folder..
Click to expand...
Click to collapse
Thats the reason I prefer flashing instead of manually replacing the files cuz then you dont need to set the permissions. Its good for lazy people like me
I have tried it and it works. I did it because when I didn't it said "status bar force close".
Sent from my GT-S5360 using XDA
I.AM.H3RO said:
I have tried it and it works. I did it because when I didn't it said "status bar force close".
Sent from my GT-S5360 using XDA
Click to expand...
Click to collapse
lol?
show us screen shots
when making a guide always post screenshots dude,
not just post words,
make it clarified and very detailed so that people reading this will not get lost,
also don't post for the sake of just putting it there,
you have a good title
but when people read this its not "easy"
try to put yourself in other people's shoes,
even i can't comprehend the output you put on this
no offence but make this better and stop posting threads that are useless
The easiest and foolproof method is to use Ninjamorph or metamorph app from market.I've modified tones of .pngs with them.
First open the apk with the app
Exit the app
Go to myfiles/Androidthemes/workspace/name-of-apk/res/
Then go to drawable ldpi
Take a look at all of the .png files
Find which .png you want to replace.
You should make your own pic with photoshop or anything to replace it with exact resolution and name
Store it in the sd-card
Open the app again
Go to Existing project/name-of-apk/res/drawable ldpi
Click on the .png you want to replace
App will ask you to replace it with some other .png
Navigate to the modified pic
It'll replace the .png
Then go back to homepage of app
Then click finish project
Tap on the apk name
App will ask you whether you want to replace the original apk
Do as you want
Reboot phone
Make a nandroid backup before everything. cheers
sent while doin' some burnouts
b16h22 said:
The easiest and foolproof method is to use Ninjamorph or metamorph app from market.I've modified tones of .pngs with them.
First open the apk with the app
Exit the app
Go to myfiles/Androidthemes/workspace/name-of-apk/res/
Then go to drawable ldpi
Take a look at all of the .png files
Find which .png you want to replace.
You should make your own pic with photoshop or anything to replace it with exact resolution and name
Store it in the sd-card
Open the app again
Go to Existing project/name-of-apk/res/drawable ldpi
Click on the .png you want to replace
App will ask you to replace it with some other .png
Navigate to the modified pic
It'll replace the .png
Then go back to homepage of app
Then click finish project
Tap on the apk name
App will ask you whether you want to replace the original apk
Do as you want
Reboot phone
Make a nandroid backup before everything. cheers
sent while doin' some burnouts
Click to expand...
Click to collapse
yea metamorph/ninjamorph is great but i'd prefer to do it in PC and just push it via adb cuz i use photoshop and i find it a hassle to use my phone to edit apk's
It's for those guys who dont know how to decompile/compile apk files with their pc.But I agree with you, pc is the best way to go.
sent while doin' some burnouts
I.AM.H3RO said:
First off you need a deodoxed custom rom , next copy the desired APK's from your System/App folder or from the zip you flashed or from wherever.
Download and Install WinRAR or 7Zip and drag the APK onto the shortcut on your desktop. It should open it up , next extract the LDPI and the HDPI folder/s onto your desktop.
Edit your pics with any program e.g. Paint.net . Then replace the modified folder with the old one.
Next download SignAPKTics from APKTops and install that. Drag the modded APK to your SD card.
Click START , choose the APK , click next , choose Test Sign and click sign! Wait 1.5 mins! And ot should be done. Now just (with root browser) replace the old one with the modded one.
And re-boot! Enjoy...
Click to expand...
Click to collapse
May be you should try it out first.Replacing system apps with root explorer is a very dangerous business.I'm familiar with that.My phone started to do endless boot loops which even a nandroid restore failed to fix and ended up in flashing a new stock rom.
sent while doin' some burnouts
b16h22 said:
May be you should try it out first.Replacing system apps with root explorer is a very dangerous business.I'm familiar with that.My phone started to do endless boot loops which even a nandroid restore failed to fix and ended up in flashing a new stock rom.
sent while doin' some burnouts
Click to expand...
Click to collapse
agree
pushing it using adb is a more safer way, because if something goes wrong with forcing it to system then you can just repush the original system apk
you was replacing a running apk. there's no doubt it will give you FC message (lol). try your method to replace framework-res.apk or any system app/framework. b16h22 is right. your method is dangerous.
I modify my systemui.apk but signapktic give
Doesn't exist
132 installed package
Error ...
I'm just trying to help people , if you don't like it then good for you. I'd love to add screenies but laptop is broken. If you could provide them then brilliant.
Sent from my GT-S5360 using XDA
Use test sign and if that doesn't work are install signapktic
Sent from my GT-S5360 using XDA
So as in my earlier thread I have moved back to eagles blood 4.0.4 AOSP rom. One of the drawbacks is that the hdpi drawable folder in my systemui does not have 1% icons. I've read a few tuts on how to make my own....or add them from a downloadable zip.
My question to those who are more knowledgeable about development is this: will opening the drawable hdpi folder from my systemui.apk with 7-zip and replacing all my stock sys_batt PNG images with the custom 1% images and then saving those to the folder and pushing the systemui.apk back to my phone do the trick?
Sent from my LG-P999 using xda premium
Pain-N-Panic said:
So as in my earlier thread I have moved back to eagles blood 4.0.4 AOSP rom. One of the drawbacks is that the hdpi drawable folder in my systemui does not have 1% icons. I've read a few tuts on how to make my own....or add them from a downloadable zip.
My question to those who are more knowledgeable about development is this: will opening the drawable hdpi folder from my systemui.apk with 7-zip and replacing all my stock sys_batt PNG images with the custom 1% images and then saving those to the folder and pushing the systemui.apk back to my phone do the trick?
Sent from my LG-P999 using xda premium
Click to expand...
Click to collapse
Should add long as those are referenced (I think in the xml, but then, I have never done this myself). Would need a nandroid for sure .
-- The noob says:
From first-hand experience, a smartphone is incapable of making you smarter!
Nope, they're not. I have to manually reference them in the sys_bat icon XML file located in drawable folder. Then I have to swap in the images in the drawable hdpi folder once they're referenced. However, I'm having issues. Once I extract the files from the apk with 7zip, specifically the drawable folder to get to the sys_bat icon XML file, I cannot open it in notepad++ to edit it. I'm getting an error. Any ideas mansa?
Edit- LOL nandroid was the first thing I did!
Now I have to crank out this stupid paper for class so I can continue tinkering with my Android lol
Sent from my LG-P999 using xda premium
Ok, So I've come to learn that in order to edit XML files within the APK, that the APK needs to be decompiled with APK Tool, not simply extracted using 7zip. I downloaded APK tool and set everything up according to this tut----> http://forum.xda-developers.com/showthread.php?t=1989533
I have the APKTOOL folder placed on the root of my C:/ drive. Inside that folder I have placed the following aapt (the apktool exe or application file), apktool (batch file), apktool.jar, and my framework-res.apk (I know I need to use systemui.apk, I'm just using this as I follow the tutorial on how to get this program working before I try anything on my own files). When I get to the command c:\apktool>apktool if system.apk to install the APK on my system so I can decompile I get an error saying it's not a recognized command. Any ideas dev-friendly users?
So I realized I didn't have the JDK installed on my pc since I did a system wipe on it the other day. Reinstalled it but it's still not working. Very frustrating. I'm also using win 8 if that means anything.
Giving up on apktool as I cannot seem to get a way around the error. However, apk manager seems much more user friendly and have seen tuts using the program specifically for ics roms. I've only seen tuts for apktool using jelly bean roms so maybe that's the issue. I won't be home until late tonight as I have class. If anyone has any tips/suggestions please let me know.
Sent from my LG-P999 using xda premium
Not that many people are in here anyway but I figured I'd give it a shot. So I went to use apk manager instead of apk tool which seemed to be a much more "newb friendly" program. I can successfully decompile my framework-res.apk but cannot decompile my systemUI.apk afterward. I get an error....here's my log if anyone can help me with it:
EDIT- deleted log as I was able to decompile systemUI with a different apk program. That was a huge headache getting it to decompile. Now editing the XML should be no problem, along with swapping out the PNG's. Recompiling on the other hand will most likely be another headache!
In this tutorial I will show you how to create your own T.W. rom using your GS3 and Root Explorer. There are many ways you can create a rom but not everyone has the time to sit at a computer every night. However, your phone is always on you and can find a few minutes here and there to create your own masterpiece.
For the sake of this tutorial, we will name our new rom "SLICK".
Here are a few things you will need...
1. The rom base from Scottsroms. I'm NOT talking about Cleanrom but the unmodified stock rooted rom.
2. Root Explorer.
3. Script Manager
4. Any mod you can flash or come up with on your own.
1. GET STARTED!
Download the base rom to your phones EXT-sdcard and extract it using Root Explorer. After it's extracted the new unziped rom will be located in /storage/sdcard0/SpeedSoftware/Extracted. The extracted rom is now your new base. At this point it would be a great idea to move it to your EXT-sdcard and create a new project folder for it and label the folder "Project SLICK". inside the folder is your rom. lets rename that rom "SLICK".
Lets open your new SLICK rom. You should have some folders...
BOOT IMAGE
DATA
META-INF
SYSTEM
3. THE SYSTEM FOLDER
/SYSTEM/APP
Most of your work will done in the System folder so lets open that up. This is the heart of your rom! There are many folders here but lets start with the app folder. This folder has every app installed in your rom. This is a good time to remove the bloat you don't want in your rom. Go ahead and delete the apk's you don't want or need.
/SYSTEM/BIN
Here you can speed up your system or make it more battery efficient by deleting things like "mpdecision" and things like that. Be careful what you delete though. In general you won't do much in here.
/SYSTEM/BUILD.PROP
Here you can change values or add values. The one value we are concerned with is "ro.build.display.id" This build property's value will be displayed in the end users settings menu under "about phone". So let's give this property the correct value "ro.build.display.id=SLICK ROM v1.0" The rest of the build properties you can do as you wish. Build.prop is simply a text file. You can use the text editor built into Root Explorer.
/SYSTEM/CSC
Open this file and you will see more files. Listed is "feature.xml". Here you can edit values for various items for texting and mms.
/SYSTEM/ETC
Here is where you will find a folder called "init.d". Located in this folder are various text files. The text files are scripts that are told to run when your phone boots. You can add or modify to the existing scripts or create a new text file.
So we went over a few of the basics of modding your new rom and molding it into something you can call your own but does it work??
4. TESTING YOUR NEW BASE.
So we have already modified our rom a considerable amount and should have a good solid base. Before we go any further we should really test things out first. If we did something wrong earlier we will at least have an idea where to look. So lets flash our new rom. Go to you EXT-sdcard and find our project folder. you should still have your SLICK file. Zip this file with Root Explorer. Make sure you have a good battery and a cool environment because it's going to take your GS3 about 30min of hard work to zip this file. When that is finally completed, flash your new rom located in /storage/sdcard0/SpeedSoftware/Archives. Flash it just like you would any other rom.
Test your new rom out on your GS3 and see how things are running. Check your existing modifications you did earlier. If everything looks good, we can continue modding. If not you will need to go back to your base to see where you went wrong. This is also a great time to check your init.d scripts. One way to do this is to download "Script manager" from the market and click on your init scripts to read there log. It will tell you if something went wrong.
If everything is looking good, we can continue modding...
5. THE MODS
So we have that nice clean base but what about all them mods in the roms we download and flash everyday? There are a few different ways we can do this and we will start with the easiest but first, do a nandroid backup of your new base. If one of your mods you perform next goes bad it's simply quicker to recover. Now, If you have flashable zips of some of the mods you like then you can flash them now and make sure they are working the way they should in your rom. Remember, just cause we have the d2vzw does not mean mods from the sprint or T-mobile won't work on our devices. Sometimes it's worth a try. It's all about which firmware they are on and what has changed with the firmware.
So we flashed a few mods but don't have everything we wanted. At this point you are left with only one option and that is to get on that PC of yours and learn to decompile a APK. I may touch on this subject later as it is a bit more involved for someone new to this sort of thing.
6. UNDERSTANDING THE FLASHABLE ZIP
The alternate method of a flashable zip is to extract your flashable using Root Explorer and picking it apart. For example we will use "Lean Kernel" and kill 2 topics with one stone. If you unzip the kernel you will see...
BOOT.IMG
META-INF
SYSTEM
As you can see there are some familiar files to us just like when we extracted our base rom in the beginning. Basically when you flash a mod like this or any flashable for that matter, it installs files into your rom in certain places. In this example we will be installing in BOOT.IMG and SYSTEM. But what? And what is that META-INF file for? Well this META-INF file is what tells your rom what files and what to do with those files. Inside META-INF is a text file called an "updater script".
Here is what it looks like...
Code:
show_progress(0.500000, 0);
mount("ext4", "EMMC", "/dev/block/mmcblk0p14", "/system");
package_extract_dir("system", "/system");
set_perm(0, 0, 0777, "/system/etc/init.d/00leanKernel");
unmount("/system");
assert(package_extract_file("boot.img", "/cache/boot.img"),
write_raw_image("/cache/boot.img", "/dev/block/mmcblk0p7"),
delete("/cache/boot.img"));
show_progress(0.100000, 0);
Line 2 shows it mounting the system so we can write to it.
Line 3 shows us extracting the entire directory of the system file in the flashable into the system file of our rom.
Line 4 shows we are setting permissions for one of the system files we just installed in the rom. In this case it is an INIT.D file.
Line 5 shows us returning the system to an un-writable state.
Line 6 shows we are now installing the other file called BOOT.IMG.
So we installed BOOT.IMG and the SYSTEM file. The BOOT.IMG file is usually only found in a rom or kernel zip so most of the time you won't see this file in a flashable but I wanted to use this as an example to show a bit about the kernel side of things.
Ok, so lets get back to the original files of this flashable zip. The updater script stated we installed a new system file into the rom so whats in there? If we open the SYSTEM file from our flashable with Root Explorer you will find a file hierarchy...
SYSTEM
-- ETC
--- INIT.D
---- "00LEANKERNEL"
-- LIB
--- MODULES
---- Listed here are a bunch of ".ko" modules and i'm not listing them all.
So whats the point of all this? Well lets say when we originally debloated our rom in the begining we could of included some of our flashable mods like a custom kernel before we zip the rom to test the base. So in this case we can manually install this kernel before we zip the base. We can take the BOOT.IMG from our extracted kernel and replace the BOOT.IMG in our extracted rom. We only need the files from the flashable so we need to copy and paste the "00LEANKERNEL" file from our flashable to our roms /system/etc/init.d folder. We can also take those ".ko" files from the flashable and dump those into the /system/lib/module folder and we are done. You have now manually installed a kernel into your base rom before you zipped it. Now when you zip your rom and flash it, your new base rom will boot with your custom kernel. Since we manually installed the kernel we don't need the META-INF file provides an auto install script for installing through recovery. Technically we could take all of our flashable mods, extract them, look at the file hierarchy and copy and paste the those files to our extracted base rom. That way we can zip our rom and test it with the mods right off the bat. You can really make things quicker this way and is in general the way to go.
I think it's rather important to fully understand a flashable zip. How it's built and how it completes it's task. It's used so often and makes mods so incredibly easy to install but it is also what installs our rom! One of the files we see when we open "slick" is a META-INF and there inside is the updater script to flash the rom. Again we are doing the same thing as we do with the flashable mod but this time we are installing a lot more files with a lot more permissions. It is the exact same thing as shown above just a bit more extensive.
7. PUT THE PIECES TOGETHER
Ok so we have our base rom running on our phone and possibly a few mods installed. We also have our extracted and debloated "slick" rom on the EXT-sdcard inside our project folder. The next part is rather easy if you understand how those flashable mods were installed. If you understand the whole flashable and its files, your better off just extracting them and then copy and paste them where they need to go. After you have all your mod files in place you can now zip your official "Slick" rom using Root Explorer of course. Prepare yourself for another 30 minutes for it to zip. After it's zipped your done. You have now created your first fully modded rom! However...
Lets say you don't get the whole flashable thing and or you had made some other changes to the rom while you were testing. Lets say you flashed some mods and created a few init.d scripts or the build.prop along the way. NO WORRIES! We can put the rom together another way. A lot of the mods you flash will install files in some usual areas of the rom like your Framework folder and such. Lets just say we don't know though. You can actually copy complete folders from the rom you are running right there and now and paste them into your extracted "Slick" base rom using Root Explorer. So you can take "/system/framework" from your currently running rom, copy it, and paste it in "/storage/EXT-sdcard/project folder/slick/system/framework". In short just take your copy of the framework file and put it in your extracted base and paste it. Root Explorer will then ask you if you want to replace this file and click yes. You have just transferred any modded file that might have been in framework to your extracted rom. Any folder you may think was modded, simply copy and paste it to your extracted base rom on your EXT-sdcard. Once you think you have it all the modded files transferred you can zip your new "Slick rom! Flash and enjoy!!
FINISHED
So we have now completed our own rom on the device itself. It's really not too difficult just a bit more time consuming with zipping and that. However, you may need to do a bit more research on how to decompile and recompile an APK. This is one of things that can really be a pain to setup. It's again the basics that will kill you. The whole PITA is not decompiling or making changes to a framework file, it's setting up the environment that sucked for me. You have to get the Java and files in order and all the little crap to get it to work. IMO, if you haven't decompiled an APK yet it's really not difficult at all. Like I said. It's the basics. I encourage you to learn this because it's so freakin easy after it's all setup and you will be able to do so much more with your rom. Once you get this APK thing down don't be afraid to take someone elses work and reverse engineer it. Try to figure out what that developer did to accomplish what he wanted. It's a great way to learn and thats what it's about.
I may add to this somewhere down the road but for now it's all I have. I hope this helped and motivated someone to create a rom and begin there journey to become developer someday! We can all use fresh ideas for development. There is so much more to come for Android so get your hands dirty and share!
Thanks guys!
Ha never really thought of doing this on the fly with my phone. Even though all the right stuff was sitting in my face thanks for opening my eyes razz1
Sent from my SCH-I535 using Tapatalk 4 Beta
dincdoes.me said:
Ha never really thought of doing this on the fly with my phone. Even though all the right stuff was sitting in my face thanks for opening my eyes razz1
Sent from my SCH-I535 using Tapatalk 4 Beta
Click to expand...
Click to collapse
It's another way. May not be the fastest way but it's another option. I also wanted to write this as a general rom creation and learning some basics. It's always the basics that will kill a project and motivation. I would like to see a complete newb to be able to complete a rom with this tutorial. Then I accomplished something. Going to have to finish this tomorrow though. It's taking longer than I thought lol.
Yea I mean I'm a newb at doing it from my phone if that counts =) .. What explorer do you like to use to repack the zips. I'm sure I'll try this method soon to play while bored at work. Rom tool box will help with boot animations, fonts and transition animations too take care thanks for giving our community some new skills I'm sure it will help out down the road.
Sent from my SCH-I535 using Tapatalk 4 Beta
Thank you for this post. This will definitely get me to try and make my own ROM the way I like, also I might just learn some new stuff. Great post thanks again
Sent from my SCH-I535 using xda app-developers app
Nice tutorial.
It's a great way to show what can be done just from your phone.
:good:
Right on man. Been waiting for this. Thank you.
Sent from my SCH-I535 using xda app-developers app
dincdoes.me said:
Yea I mean I'm a newb at doing it from my phone if that counts =) .. What explorer do you like to use to repack the zips. I'm sure I'll try this method soon to play while bored at work. Rom tool box will help with boot animations, fonts and transition animations too take care thanks for giving our community some new skills I'm sure it will help out down the road.
Sent from my SCH-I535 using Tapatalk 4 Beta
Click to expand...
Click to collapse
I use androzip man.
Sent from my SCH-I535 using xda app-developers app
More added
So would I make, say ROM manager a system app? Just copy the apk into the /System/App folder?
Evil Genius Jr. said:
So would I make, say ROM manager a system app? Just copy the apk into the /System/App folder?
Click to expand...
Click to collapse
Yes, but not all apps you download from google play work in /system/app. Some want to be installed into /data/app. However /data/app doesn't exist till after the rom is booted. You would need to add the folder to your extracted rom and modify the updater script.
razz1 said:
Yes, but not all apps you download from google play work in /system/app. Some want to be installed into /data/app. However /data/app doesn't exist till after the rom is booted. You would need to add the folder to your extracted rom and modify the updater script.
Click to expand...
Click to collapse
You are the fu**ing man razz1.
Sent from my SCH-I535 using xda app-developers app
That's about all I have for now. OP completed!:sly:
Hello. Ok so I created a ROM what I call MyTWGE (Tuchwiz Google Edition). Followed the instructions, unzipped the stock Verizon OS went into the -app- folder deleted all the Verizon, Samsung and Google apps (only the ones that are download able from Google Play). Replaced the stock launcher with the 5x6 version that I extracted from another zip, replaced the camera with the Google edition camera (download able from GP), replaced the keyboard with the Note2 keyboard (also unzipped from another zip). Looked around and deleted a few more files I found that were connected to some Samsung apps and zipped it up. Flashed the zip yesterday onto the phone and it's ALIVE working.
Thank you for your patience to write up all these instructions. I previously used TB to debloat my phone and that was it, learned a few thing thanks again
Sent from my SCH-I535 using xda app-developers app
Lehocki said:
Hello. Ok so I created a ROM what I call MyTWGE (Tuchwiz Google Edition). Followed the instructions, unzipped the stock Verizon OS went into the -app- folder deleted all the Verizon, Samsung and Google apps (only the ones that are download able from Google Play). Replaced the stock launcher with the 5x6 version that I extracted from another zip, replaced the camera with the Google edition camera (download able from GP), replaced the keyboard with the Note2 keyboard (also unzipped from another zip). Looked around and deleted a few more files I found that were connected to some Samsung apps and zipped it up. Flashed the zip yesterday onto the phone and it's ALIVE working.
Thank you for your patience to write up all these instructions. I previously used TB to debloat my phone and that was it, learned a few thing thanks again
Sent from my SCH-I535 using xda app-developers app
Click to expand...
Click to collapse
Lol the whole time I was reading this I was waiting for you to say something didn't work out for you but it all did I guess. Nice!!
Yeah running for the past 24h no problems everything works. Thanks
Sent from my SCH-I535 using xda app-developers app
---------- Post added at 02:24 AM ---------- Previous post was at 02:07 AM ----------
Only thing that that's annoying is the wifi in the taskbar. I read in one of the posts that I have to go into systemui and some other files within n delete lines 12 through 21 but that didn't work , am guessing I need to decompile systemui to do that. The person in the post didn't clarify and I'm not ready to do that yet. Reason is I don't know anything about programming or linux or decompiler or anything like that. Deleting files I can do replacing some sure. But I'm happy my first attempt to mix something together worked and I'll keep doing it till I actually figure out what it is that I am doing. Thanks again for the post
Sent from my SCH-I535 using xda app-developers app
Yea. Follow Didacts write ups to get you through it. It's all in framework res apk.
So i've done a thorough Google search and discovered that im not the only one who hates the smug little Samsung man that appears over all your contacts that don't have pictures, or pops up as caller ID.
I did find a post that was relevant to the old S4 which I think sent me down the right path, but i have limited knowledge in compiling and installing systems apps via adb or however.
I believe I have done the leg work, so if someone has a moment to assist in making a flashable zip or providing clear instructions to install a modified systemUI.apk, it would be greatly appreciated.
The offending picture png is located in the above mentioned SystemUI.apk. According to the post i was reading re the S4 there used to be 2 seperate system apps (Call and MMS) that contained the image, but from what i've read and been able to find in relation to the S6 is only the SystemUI.apk
I copied it out, unzipped it, and then replaced it with a random but more suitable picture. I made sure that the picture was exactly the same dimensions. Does it being a greater size cause an issue?
I then compressed it again using 7zip, set the file permission back to rw-r--r-- and.... thats as far as i got.
Im not sure how to test whether what i did is correct, or to install it via recovery as a flashable or push it through adb (i don't know the linux commands). In frustration i did try just renaming the original apk using Root Explorer, but of course immediately got a SystemUI has stopped unexpectedly (im almost positive the smug little man was laughing at me by this point) and forced reboot. Oddly upon reboot my phone functioned as per normal, with the smug little guy still mocking me, even though the SystemUI.apk had been renamed!? That stumped me. I could only think that its somehow referencing the information from somewhere else???? I dunno.
Can someone have a look at the attached and let me know if it should work and how i can try install it?
For your reference the only matching png i could find is located: SystemUI.apk\res\drawable-xxxhdpi-v4\contacts_default_caller_id_list.png
Im sure this is a MOD that the countless other smug man haters out there would appreciate as well
download the modified apk but cant install it
Sent from my SM-G925F using XDA-Developers mobile app
ruud said:
download the modified apk but cant install it
Sent from my SM-G925F using XDA-Developers mobile app
Click to expand...
Click to collapse
No, I believe there's either more to it than just swapping the png out, or the apk needs to be installed via adb seeing it's the stock rom's Ui, but I appreciate your efforts.
The app needs to be signed anyway if you unzip it and zip it again. This can be made with Android Signer or a similar app.
But...for what you want there's no need to uncompress the apk and recompress it afterwards. This procedure is needed if you want to extract or edit certain files (usually .xml files) but not for replacing a resource as a png or image.
First you should have an identically named file and the png should have same resolution (also there are certain specific png's that should be modified only by someone who knows how...so called .9 png's). Considering it's a normal one and it has same resolution (it can be sometimes of different res but phone will resize it and not always the result is what you want), just open the apk with WinRAR for ex (this is what I use) and delete tha original png then add to the archive, in the same place your png.
Should work well, no need for extracting and compressing the files again and so on and I don't advice to do that if you don't know how to sign or deal with apk's
Please note that there could be several folders were the image can be, if the image is a resource that is resolution dependant. So you might find it in hdpi, xhdpi, mdpi, xxhdpi...and similar folders. In this case you should change at least the image in the folder for your specific resolution. But I guess this is not the case since SystemUI is speciffic to a ROM and phone model and should have resources only for it's resolution setup at build time
Good luck
Sent from nowhere over the air...
Hi, thanks for your response. I actually used 7zip to swap the png without extracting it, but my problem is how to replace a system apk from recovery? I have no knowledge of how to do this or make a flashable zip. Thanks in advance
Sent from my SM-G925I using XDA-Developers mobile app
Just use the same way, replace with 7zip. You only need a template flashable .zip. Ask Google for it.
Sent from my SM-G925F using Tapatalk
You can replace the file using the included file manager in TWRP (if you use this recovery). You just have to mount /system before that in order to access the file. You should find SystemUI.apk in /system/app. Alternatively, you could replace the file even with your phone started and with Android booted. Using a root file explorer like ES File Explorer, navigate to /system/app and replace SystemUI.apk there. Then reboot phone for changes to take effect. I strongly recommend to make a safe copy of the file before overwritting it
Second method is easier than the recovery one. You can also use a flashable zip, you can make one yourself by using a flashable zip 'template', that is an empty zip made for flashing in which you just put the files you need to be copied along with their complete path. A quick search will give you several such zip files,I'm on mobile right now and I can't make the flashable zip for you
Sent from nowhere over the air...
Rapier said:
You can replace the file using the included file manager in TWRP (if you use this recovery). You just have to mount /system before that in order to access the file. You should find SystemUI.apk in /system/app. Alternatively, you could replace the file even with your phone started and with Android booted. Using a root file explorer like ES File Explorer, navigate to /system/app and replace SystemUI.apk there. Then reboot phone for changes to take effect. I strongly recommend to make a safe copy of the file before overwritting it
Second method is easier than the recovery one. You can also use a flashable zip, you can make one yourself by using a flashable zip 'template', that is an empty zip made for flashing in which you just put the files you need to be copied along with their complete path. A quick search will give you several such zip files,I'm on mobile right now and I can't make the flashable zip for you
Sent from nowhere over the air...
Click to expand...
Click to collapse
Thanks for the info Rapier. I tried using root explorer to swap it, but as soon as I renamed the original systemui.apk I got a force close error (because the system was obviously running systemui.apk) and I was forced to do a reset to clear the error off the screen.
After rebooting, the apk had be renamed but the system was still chugging along regardless of the fact that this systemui.apk effectively wasn't even there anymore. It was showing as systemui.bak, what I renamed it to. I tried going ahead and putting the modified apk in the directory anyway, rebooted, and nothing. No change to the png whatsoever, even though the png I used was showing in the correct spot and all.
Sent from my SGP611 using XDA-Developers mobile app
lonelydra said:
Just use the same way, replace with 7zip. You only need a template flashable .zip. Ask Google for it.
Sent from my SM-G925F using Tapatalk
Click to expand...
Click to collapse
Thanks for the tip, I didn't know there were just templates available. I'll give it a shot, but by the way it's behaving when I've just replaced the file using a root explorer, I think there's more to it eg. The apk I modified isn't functional or something
Sent from my SGP611 using XDA-Developers mobile app
If you still see the image after replacing the file, it could be that it is not stored only in systemui. It could be in the dialer/phone apk as well or in the framework-res.apk. I saw the little figure you wanna change in several places across the ROM, including in the S-Health app...it is used I think everywhere where there is no picture set for an avatar. It can be that the one you found is for something else
Sent from nowhere over the air...
Rapier said:
If you still see the image after replacing the file, it could be that it is not stored only in systemui. It could be in the dialer/phone apk as well or in the framework-res.apk. I saw the little figure you wanna change in several places across the ROM, including in the S-Health app...it is used I think everywhere where there is no picture set for an avatar. It can be that the one you found is for something else
Sent from nowhere over the air...
Click to expand...
Click to collapse
Damn, but you're probably right. If I decide to pursue this annoying smug little man, am I at least doing it right?
I mean in theory; replacing the png with another of the same dimensions (does size matter?) and as long as I've swapped it out of the apk rather than extracting and compressing again, set the permissions the same and replacing any apk I come across with the new image, it should work yes?
Someone suggested using an overlay function? Would that be easier?
I couldn't find the phone apk for the S6, do you know where I should be looking?
Thanks for all your advice with this!
Sent from my SGP611 using XDA-Developers mobile app
Yes, you're right, if you replace the correct png you should get rid of it.
I was involved in several projects in the past, theming as well as building or porting ROMs so I can help with what I know.
You asked about resolution and yes it does matter. In apk's you might find the png stored in folders dependant on display res and named accordingly: LDPI, MDPI, HDPI, XHDPI, XXHDPI and so on. You MUST change the png in the correct folder or else you won't see any change. If for ex you change the png in MDPI folder and our phone is XXXHDPI...you won't see a change. Also the dimension of the png's differs with each res so it is not ok to just put the same resolution file in all folders. There are several guidelines to be followed when dealing with such images and when replacing resources. I think our phone is XXXHDPI or XXHDPI...not really sure cause I never checked but you can find this info easily. After you find out which it is the right res, replace only the png's in that coresponding folder and leave the others alone.
You might want start looking for that image in the phone/people apk and in the framework-res.apk. Be VERY careful what you do with the framework as it's a main component of the ROM...mess with it and you'll have to reflash the ROM
Sent from nowhere over the air...