[Q] Modifying a custom rom - Galaxy S II Q&A, Help & Troubleshooting

Hello everybody,
I'm trying to modify a custom rom by myself at the moment, I don't have any programming experience.
I read some guides and they made it quite clear to me.
Only a few questions:
I'm trying to edit Villainrom 3.0 and when changing the kernel to Speedmod the only thing I have to do is replacing the zImage?
And if I want to install apps not in /system /apps but in /data /app will that work?
I have to make the folders manually that is why I ask this.
And is it possible if I make in /system /etc an init.d folder to place some tweaks from other roms there?
And I guess it is possible to just remove anything I don't like? App's sounds etc.
And it may sound stupid but once I unzipped a rom how to make it flashable again?
Just zip it and turn signature off in Clockworkmod?
Thank you for your time!
/please don't flame me for my English..
/please don't flame me I'm just trying to learn some basics.

GJ123 said:
Hello everybody,
I'm trying to modify a custom rom by myself at the moment, I don't have any programming experience.
I read some guides and they made it quite clear to me.
Only a few questions:
I'm trying to edit Villainrom 3.0 and when changing the kernel to Speedmod the only thing I have to do is replacing the zImage?
Thats what i have done on a different rom .
And if I want to install apps not in /system /apps but in /data /app will that work?
NO is what i find needs a script or something .
And I guess it is possible to just remove anything I don't like? App's sounds etc.
Thats what i do delete via win rar
And it may sound stupid but once I unzipped a rom how to make it flashable again?
Just zip it and turn signature off in Clockworkmod?
Dont know i just open win rar and add or delete without unzipping .
jje
Click to expand...
Click to collapse

JJEgan said:
GJ123 said:
Hello everybody,
I'm trying to modify a custom rom by myself at the moment, I don't have any programming experience.
I read some guides and they made it quite clear to me.
Only a few questions:
I'm trying to edit Villainrom 3.0 and when changing the kernel to Speedmod the only thing I have to do is replacing the zImage?
Thats what i have done on a different rom .
And if I want to install apps not in /system /apps but in /data /app will that work?
NO is what i find needs a script or something .
And I guess it is possible to just remove anything I don't like? App's sounds etc.
Thats what i do delete via win rar
And it may sound stupid but once I unzipped a rom how to make it flashable again?
Just zip it and turn signature off in Clockworkmod?
Dont know i just open win rar and add or delete without unzipping .
jje
Click to expand...
Click to collapse
Is that possible with init.d ?
Does anybody know about the /init.d and /data /app story?
Click to expand...
Click to collapse

If you want to place items in the init.d folder, place them in /system/etc/init.d inside the zip, this folder is symlinked with /etc/init.d.
As far as installing apps into /data/app, copying items into there would mean editing the updater-script and making it so that /data is mounted and items copied across, you will have to check the vr updater script for what needs to be added.
Code:
run_program("/sbin/mount", "/dev/block/mmcblk0p10", "/data");
package_extract_dir("data", "/data");
run_program("/sbin/busybox", "umount", "/data");
First line mounts the data partition,
Second line extracts anything inside the folder "data" into the data partition
Last line unmounts the data partition.
I *dont* think this is the same as installing apps, i would think your best bet is to just install them manually, but i am not 100% sure so ymmv.

veyka said:
If you want to place items in the init.d folder, place them in /system/etc/init.d inside the zip, this folder is symlinked with /etc/init.d.
As far as installing apps into /data/app, copying items into there would mean editing the updater-script and making it so that /data is mounted and items copied across, you will have to check the vr updater script for what needs to be added.
Code:
run_program("/sbin/mount", "/dev/block/mmcblk0p10", "/data");
package_extract_dir("data", "/data");
run_program("/sbin/busybox", "umount", "/data");
First line mounts the data partition,
Second line extracts anything inside the folder "data" into the data partition
Last line unmounts the data partition.
I *dont* think this is the same as installing apps, i would think your best bet is to just install them manually, but i am not 100% sure so ymmv.
Click to expand...
Click to collapse
Mmm okay useful!
I think I try adding some apps to
Code:
/system /apps
first and see how they work.
Nice to know that it is possible to freely add things in init.d!
Do you know anything about kernel?

GJ123 said:
Mmm okay useful!
I think I try adding some apps to
Code:
/system /apps
first and see how they work.
Nice to know that it is possible to freely add things in init.d!
I have added and even deleted /changed a few apps to system /apps no problem .
Mainly as i could never alter a custom roms script to run the data folder install .
I usually change z image modem and CSC files remove a few apps and add a few add a few ringtones add bootanimation and power on sound
jje
Click to expand...
Click to collapse

JJEgan said:
GJ123 said:
Mmm okay useful!
I think I try adding some apps to
Code:
/system /apps
first and see how they work.
Nice to know that it is possible to freely add things in init.d!
I have added and even deleted /changed a few apps to system /apps no problem .
Mainly as i could never alter a custom roms script to run the data folder install .
I usually change z image modem and CSC files remove a few apps and add a few add a few ringtones add bootanimation and power on sound
jje
Click to expand...
Click to collapse
I could use an custom rom as base where there already are apps in
Code:
/data /app
But I don't think it is necessary.
Do you have any experience with changing kernel before flashing?
I'm thinking about just replacing the zImage with another but the vr-updaterscript says:
Code:
ui_print("Installing Ninphetamine 2.0.5 kernel - By the king, Ninpo/Hacre himself! ");
assert(package_extract_file("zImage", "/tmp/zImage"),
write_raw_image("/tmp/zImage", "/dev/block/mmcblk0p5"),
delete("/tmp/zImage"));
Don't know if it works with Speedmod instead of ninpo.
Click to expand...
Click to collapse

Just replace the zimage, I've done it plenty of times. That text will show that ninpo is installing in CWM and should have no affect, but for sanity you can change that text to speedmod.
Sent from my GT-I9100 using Tapatalk

nikzDHD said:
Just replace the zimage, I've done it plenty of times. That text will show that ninpo is installing in CWM and should have no affect, but for sanity you can change that text to speedmod.
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
Thank you very very much!
Can you confirm that tweaks in the init.d folder can just be copy/pasted?

GJ123 said:
Thank you very very much!
Can you confirm that tweaks in the init.d folder can just be copy/pasted?
Click to expand...
Click to collapse
Should be fine, but just open up the scripts with something like notepad just to make sure it doesn't rely on anything else.
Sent from my GT-I9100 using Tapatalk

Okay thanks everyone!
So this is what I did until now:
unzip Checkrom XILA2
removed some audio and some /system /apps
I replaced the
Code:
modem.bin
with another
Code:
modem.bin
.
I changed the zImage with another.
Changed some lines in the updaterscript. (names et cetera)
Placed some Thunderbolt! tweaks in init.d
Ctrl+A and zipped everything with winzip, .zip file normal compression.
All done with simple copy/paste.
The big question: Will this boot?

nikzDHD said:
Should be fine, but just open up the scripts with something like notepad just to make sure it doesn't rely on anything else.
Sent from my GT-I9100 using Tapatalk
Click to expand...
Click to collapse
same suggestion but instead of normal notepad use notepad++ and edit the scripts of your choice.
---------- Post added at 06:12 PM ---------- Previous post was at 06:11 PM ----------
GJ123 said:
Okay thanks everyone!
So this is what I did until now:
unzip Checkrom XILA2
removed some audio and some /system /apps
I replaced the
Code:
modem.bin
with another
Code:
modem.bin
.
I changed the zImage with another.
Changed some lines in the updaterscript. (names et cetera)
Placed some Thunderbolt! tweaks in init.d
Ctrl+A and zipped everything with winzip, .zip file normal compression.
All done with simple copy/paste.
The big question: Will this boot?
Click to expand...
Click to collapse
why don't you try it out and see and let us know. and as of course make sure you backup your current rom

Suarez7 said:
same suggestion but instead of normal notepad use notepad++ and edit the scripts of your choice.
---------- Post added at 06:12 PM ---------- Previous post was at 06:11 PM ----------
why don't you try it out and see and let us know. and as of course make sure you backup your current rom
Click to expand...
Click to collapse
I use Notepad++ already mate
I'm just kind of afraid I completely forgot something and I won't be able to enter recovery or something.
Donwload mode should work in every situation but I'd rather not.

GJ123 said:
I use Notepad++ already mate
I'm just kind of afraid I completely forgot something and I won't be able to enter recovery or something.
Donwload mode should work in every situation but I'd rather not.
Click to expand...
Click to collapse
nah you should be fine. from the looks of it. enjoy anyway hope all goes well for you..and if you want to try themes with your new rom then change framework and systemui i think and use the kl1 version..that way you can try jkay mods and flash a theme if you want...if you really that bothered about looks....but i would wait cause maybe in a week jkay will release his magic if he is not that busy

Just a status update from my side:
I flashed it and IT BOOTS
There are only some problems, Titanium Backup does not ask for Root Permission and so won't get it.
Market crashes.
Some apps from /data crash after some time.
But even with this problems I really appreciate all your help!

Related

[Q] A few questions about cooking my own ROM

Hi,
I started ROM cooking 2 days ago and now I've got some questions.
How can I include ZIPs into my ROM? (e.g. these tweaks or UOT-Theme)
How can I make apps uninstallable?
I moved some system-apps to /data/apps but this way they weren't installed..
How to change read_ahead_kb to get better SD-Performance? There isn't a /sys/... folder
greetings
cube
1.For tweaks,just download them and put in /WORKING/system/etc/init.d. Then,in edify script put this string:
Code:
set_perm(0, 0, 0777, "/system/etc/init.d/99tweaks");
2.To make apps uninstallable,just put them in /data/app.
3.It depends. What apps you moved to /data/app? You can only put apps like facebook,netlog,twitter etc.
4.Sys folder is in boot.img,but files in sys folder gets written when you flash. Just make a script like 06sdtweak and put it in init.d. Then,set permissions in updater script like you do with that tweaks.
Then,in edify script put this string:
Click to expand...
Click to collapse
edify script is update_script I think?
3.It depends. What apps you moved to /data/app? You can only put apps like facebook,netlog,twitter etc.
Click to expand...
Click to collapse
Ok. I tried with Calendar and something like this
Just make a script like 06sdtweak and put it in init.d
Click to expand...
Click to collapse
T think this one will be ok?
http://forum.xda-developers.com/showthread.php?t=1010807
Thanks for your quick reply!
Calendar can't be moved to data partition.
Create your own script. Create file named 06sdtweak and put in
Code:
echo "4096" > /sys/devices/virtual/bdi/179:0/read_ahead_kb;
.
Please switch to using Edify,amonRa isn't too used as we now have clockworkmod recovery. It's updater-script.
Please look my signature,i'm quoting myself:
ciaox's signature said:
If my post was useful to you please thank me
Click to expand...
Click to collapse

How to zip a ROM to be flashed

Okay so I've spent about 2 days tweaking my stock deodexed Rom to my liking and It's super fast and responsive. Faster scrolling and speed hacks. Quadrants in the 2000s. And much more. How do I take this Rom and zip it so other people can flash it if they want?
Sent from my Beastly EVO.. And did I mention it has 3D?
youngpro83 said:
Okay so I've spent about 2 days tweaking my stock deodexed Rom to my liking and It's super fast and responsive. Faster scrolling and speed hacks. Quadrants in the 2000s. And much more. How do I take this Rom and zip it so other people can flash it if they want?
Sent from my Beastly EVO.. And did I mention it has 3D?
Click to expand...
Click to collapse
packaging up a ROM is fairly simple.
for a ROM .zip there are a few main components:
1) *required* /system directory (contains all your ROM files)
2) *required* META-INF/com/google/android/ with two files, updater-script and update-binary. updater-script file instructs the update-binary on how to process/install your ROM. the custom recovery will look for these two files and execute them.
3) *optional* a kernel in the .zip to be flashed
hope that helps! good luck on publishing your ROM!
joeykrim said:
packaging up a ROM is fairly simple.
for a ROM .zip there are a few main components:
1) *required* /system directory (contains all your ROM files)
2) *required* META-INF/com/google/android/ with two files, updater-script and update-binary. updater-script file instructs the update-binary on how to process/install your ROM. the custom recovery will look for these two files and execute them.
3) *optional* a kernel in the .zip to be flashed
hope that helps! good luck on publishing your ROM!
Click to expand...
Click to collapse
So could I just take a ROM and just change certain files and apps? And how do you make the Rom do cool stuff while flashing like spell your Rom name while it flashes? Sorry for all the questions but I appreciate ur help.
Sent from my Beastly EVO.. And did I mention it has 3D?
youngpro83 said:
So could I just take a ROM and just change certain files and apps? And how do you make the Rom do cool stuff while flashing like spell your Rom name while it flashes? Sorry for all the questions but I appreciate ur help.
Sent from my Beastly EVO.. And did I mention it has 3D?
Click to expand...
Click to collapse
Usually, at least from what I know...
The more In depth stuff is done with the ROM Kitchen through a computer!
youngpro83 said:
So could I just take a ROM and just change certain files and apps? And how do you make the Rom do cool stuff while flashing like spell your Rom name while it flashes? Sorry for all the questions but I appreciate ur help.
Sent from my Beastly EVO.. And did I mention it has 3D?
Click to expand...
Click to collapse
yes, you could take a ROM and only replace certain files / apps with the ones you've modified.
the ROM "cool stuff" while it flashes is all done in the updater-script file i mentioned in #2 of the required ROM files in my previous post above.
the ROM I maintan and publish for EVO 3D is 100% stock with root/su binary added, busybox and a bunch of linux arm developer binaries in /system/xbin.
my stock ROM would be a great base for you to start modifying and experimenting with!
1) swap out the apk/files in the .zip with the ones you've modified.
2) modify the updater-script file with your syntax
3) let us know how it goes!
[ROM] joeykrim-original-1.2.0 Odex *Stock Rooted 2.08.651.2* Aug 21st 2011
on windows, 7zip is a great GUI application for swap/editing files inside a .zip without having to extract the whole thing.
on linux, i'd just unzip the whole .zip to a directory and then swap out the files/edit the files in that directory, then zip up. also, i think ubuntu archive manager (default GUI for .zip files) lets you modify/edit files inside the .zip without having to extract the whole thing.
hope that helps!
joeykrim said:
yes, you could take a ROM and only replace certain files / apps with the ones you've modified.
the ROM "cool stuff" while it flashes is all done in the updater-script file i mentioned in #2 of the required ROM files in my previous post above.
the ROM I maintan and publish for EVO 3D is 100% stock with root/su binary added, busybox and a bunch of linux arm developer binaries in /system/xbin.
my stock ROM would be a great base for you to start modifying and experimenting with!
1) swap out the apk/files in the .zip with the ones you've modified.
2) modify the updater-script file with your syntax
3) let us know how it goes!
[ROM] joeykrim-original-1.2.0 Odex *Stock Rooted 2.08.651.2* Aug 21st 2011
on windows, 7zip is a great GUI application for swap/editing files inside a .zip without having to extract the whole thing.
on linux, i'd just unzip the whole .zip to a directory and then swap out the files/edit the files in that directory, then zip up. also, i think ubuntu archive manager (default GUI for .zip files) lets you modify/edit files inside the .zip without having to extract the whole thing.
hope that helps!
Click to expand...
Click to collapse
Thanks a lot. So ill experiment with ur base. What is syntax?
Sent from my Beastly EVO.. And did I mention it has 3D?
youngpro83 said:
Thanks a lot. So ill experiment with ur base. What is syntax?
Sent from my Beastly EVO.. And did I mention it has 3D?
Click to expand...
Click to collapse
fancy word i used in place of code/text. you can open the updater-script inside of the .zip file with a text editor. the updater-script file uses the edify scripting language.
there are a lot of guides on how to use edify and what each phrase means. google the terms, "edify android guide" and there should be a bunch of results. one of the results which looks fairly decent - Edify Script Syntax Explained
hope that helps! good luck!
youngpro83 said:
Okay so I've spent about 2 days tweaking my stock deodexed Rom to my liking and It's super fast and responsive. Faster scrolling and speed hacks. Quadrants in the 2000s. And much more. How do I take this Rom and zip it so other people can flash it if they want?
Sent from my Beastly EVO.. And did I mention it has 3D?
Click to expand...
Click to collapse
Cool man! Good luck! Hope to see ya on the dev page.
Sent from my SPH-P100 using xda premium
Alright so progress is being made and its going very well. Only things Im stuck on now is:
1. How do I add certain apps like astro or ES file explorer WITHOUT putting them into the system/apps folder??
2. How do I change the background at boot so that its not the colorful flares that Sprint has on there.
3. How do I remove the 3D apps game apk?
Once I have those figured out I think my ROM will be ready for the public.
youngpro83 said:
Alright so progress is being made and its going very well. Only things Im stuck on now is:
1. How do I add certain apps like astro or ES file explorer WITHOUT putting them into the system/apps folder??
2. How do I change the background at boot so that its not the colorful flares that Sprint has on there.
3. How do I remove the 3D apps game apk?
Once I have those figured out I think my ROM will be ready for the public.
Click to expand...
Click to collapse
1. android package manager monitors two locations for .apk files and will install them as soon as they appear in these two directories: /system/app and /data/app. if you want your rom to install .apk files to /data/app, you'll need to add the package_extract_dir command to your updater-script for /data and also create a data/app directory in the ROM zip file and put whatever apk files you want added in the data/app dir of the ROM zip file.
2. For Android boot animations the system looks in 3 locations in this order. 1) /data/local/bootanimation.zip, 2) /system/media/bootanimation.zip and 3) framework-res.apk . Since there are no bootanimation.zip files on our device, I'm assuming the sprint boot animation is stored in the framework-res.apk file. No worries, as placing any bootanimation file in either /data/local or /system/media will take priority over the Sprint animation in framework-res.apk.
3. 3D Games apk file is located here: /system/app/PGAWidget_HTCEvo3D_Sprint_v100.apk . Simply remove that apk file from /system/app inside the ROM .zip and it will not be loaded.
Let us know if you have any other questions. Hope that helps and good luck in the publishing!
joeykrim said:
1. android package manager monitors two locations for .apk files and will install them as soon as they appear in these two directories: /system/app and /data/app. if you want your rom to install .apk files to /data/app, you'll need to add the package_extract_dir command to your updater-script for /data and also create a data/app directory in the ROM zip file and put whatever apk files you want added in the data/app dir of the ROM zip file.
2. For Android boot animations the system looks in 3 locations in this order. 1) /data/local/bootanimation.zip, 2) /system/media/bootanimation.zip and 3) framework-res.apk . Since there are no bootanimation.zip files on our device, I'm assuming the sprint boot animation is stored in the framework-res.apk file. No worries, as placing any bootanimation file in either /data/local or /system/media will take priority over the Sprint animation in framework-res.apk.
3. 3D Games apk file is located here: /system/app/PGAWidget_HTCEvo3D_Sprint_v100.apk . Simply remove that apk file from /system/app inside the ROM .zip and it will not be loaded.
Let us know if you have any other questions. Hope that helps and good luck in the publishing!
Click to expand...
Click to collapse
Man you are the BOMB.COM!!!!
And for 2. I wasnt looking to replace the boot animation. I kinda like the Sprint one. I was trying to replace the actual wallpaper that the phone boots into. So at the home screen I can have my own wallpaper that I choose for my ROM.
Also for 1. Do I need to create a unmount script like the one for /system? Or do I just add the script you mentioned and that is it?
Thanks so much for your help man. I dont think I would have gotten this far without you!!
youngpro83 said:
Man you are the BOMB.COM!!!!
And for 2. I wasnt looking to replace the boot animation. I kinda like the Sprint one. I was trying to replace the actual wallpaper that the phone boots into. So at the home screen I can have my own wallpaper that I choose for my ROM.
Also for 1. Do I need to create a unmount script like the one for /system? Or do I just add the script you mentioned and that is it?
Thanks so much for your help man. I dont think I would have gotten this far without you!!
Click to expand...
Click to collapse
Oh, I misunderstood for 2. For the actual wallpaper .. I did a few quick google searches and haven't come up with anything super helpful. Based on this blog post Appears there are two possible locations for the default wallpaper images to be stored, either in the Launcher.apk or in /system/frameworks/framework.jar. Unfortunately, I'm not able to experiment on the device and search more thoroughly. If nobody posts back a better answer I'll look into this tonight.
1. Yea, it would be best practice to mount data, package extract dir /data and then unmount data. You should be able to copy the mount/unmount commands used for system and change the mount points to data and for the mount command change the device point for data .. off the top of my head I think its one number higher, but not positive. cat /proc/partitions to see the exact device mount point.
Hope that helps!
joeykrim said:
Oh, I misunderstood for 2. For the actual wallpaper .. I did a few quick google searches and haven't come up with anything super helpful. Based on this blog post Appears there are two possible locations for the default wallpaper images to be stored, either in the Launcher.apk or in /system/frameworks/framework.jar. Unfortunately, I'm not able to experiment on the device and search more thoroughly. If nobody posts back a better answer I'll look into this tonight.
1. Yea, it would be best practice to mount data, package extract dir /data and then unmount data. You should be able to copy the mount/unmount commands used for system and change the mount points to data and for the mount command change the device point for data .. off the top of my head I think its one number higher, but not positive. cat /proc/partitions to see the exact device mount point.
Hope that helps!
Click to expand...
Click to collapse
Helps a bunch!!! I will have to dig deeper because I tried flashing after creating those scripts and I got error 6 when trying to flash. Ill add the mount/unmount commands and see if that fixes it.
youngpro83 said:
Helps a bunch!!! I will have to dig deeper because I tried flashing after creating those scripts and I got error 6 when trying to flash. Ill add the mount/unmount commands and see if that fixes it.
Click to expand...
Click to collapse
To debug flashing errors while in the recovery, open adb shell and type:
Code:
cat /tmp/recovery.log
The recovery log has more details and usually the exact line of code where it failed. Feel free to paste this into pastebin and link up here, or paste into the thread and we can help troubleshoot.
Another step deeper into troubleshooting and debugging land of ROM development! Hope that helps!
Joeykrim, learned more from this thread then searching chefs central..
life64x said:
Joeykrim, learned more from this thread then searching chefs central..
Click to expand...
Click to collapse
I Agree... This Thread could be on its way to being a little STICKY, Lol!
Nah but Good Thread guys!

Making and flashing a .zip help

I'm trying to change the icon in my status bar that is displayed when i'm playing rhapsody. i've modified the notification icons in the .apk that i found in data/app. I created a .zip using the structure /META-INF/com/google/android/updater-script. in the main folder where META-INF resides i have a folder called data and inside that i have the modified com.rhapsody-1.apk. my updater script is as follows:
ui_print("Applying my update";
run_program("/sbin/busybox", "mount", "/data";
package_extract_dir("app", "/data/app";
run_program("/sbin/busybox", "umount", "/data";
i zipped everytihng up, put it on the root of my sd card. I then used zipsigner2 (from the market) to sign the .zip. Rebooted to recovery, made a back up, navigated to install the .zip from the sd card, flashed and it looked like it was working but the last line of the script simply said "installation aborted". Any help or guidance on where i'm failing here would be greatly appreciated.
thanks in advance!
Swyped Thunder coming at you
Swyped Thunder coming at you
Best advice I can give you is use an existing zip.
I have a template zip if you would like a copy.
Just insert your apk into it and flash.
D
dsb9938 said:
Best advice I can give you is use an existing zip.
I have a template zip if you would like a copy.
Just insert your apk into it and flash.
D
Click to expand...
Click to collapse
I concurr. That is how I started to make mine.. Much easier..
dsb9938 said:
Best advice I can give you is use an existing zip.
I have a template zip if you would like a copy.
Just insert your apk into it and flash.
D
Click to expand...
Click to collapse
Would love your template of you don't mind.
Swyped Thunder coming at you
hotelmrrsn said:
Would love your template of you don't mind.
Swyped Thunder coming at you
Click to expand...
Click to collapse
Whatever template zip yopu end up with, just check your ROM, some mount things differently etc. some mount ext3, some mount using busy box, some mount with certain permissions.
Another way, is to grab a mod, or theme that someone has done for your ROM you are using and then just delete out all the apps and such and use that for a base zip. Of course edit the update-script file as well.
Gunthermic said:
Whatever template zip yopu end up with, just check your ROM, some mount things differently etc. some mount ext3, some mount using busy box, some mount with certain permissions.
Another way, is to grab a mod, or theme that someone has done for your ROM you are using and then just delete out all the apps and such and use that for a base zip. Of course edit the update-script file as well.
Click to expand...
Click to collapse
I tried this with a uot zip buy the directory I need wasn't included, and want sure just how to update the script
Swyped Thunder coming at you
hotelmrrsn said:
I tried this with a uot zip buy the directory I need wasn't included, and want sure just how to update the script
Swyped Thunder coming at you
Click to expand...
Click to collapse
I can upload one tonight if need be.
using something like 7Zip open a flashable zip in view. Dont extract it.
You will see at least two folders. The one you want is the Manifest folder. go through that one and find the updater-script. One will be the binary, dont edit it. the othe ris the actual script, pull it out by dragging it out and use a text editor of some type to edit it. once done, drag file right back into the 7Zip you already have open.
Gunthermic said:
I can upload one tonight if need be.
using something like 7Zip open a flashable zip in view. Dont extract it.
You will see at least two folders. The one you want is the Manifest folder. go through that one and find the updater-script. One will be the binary, dont edit it. the othe ris the actual script, pull it out by dragging it out and use a text editor of some type to edit it. once done, drag file right back into the 7Zip you already have open.
Click to expand...
Click to collapse
really appreciate it!

[zip] Empty Flashable Zip Template

Some people aren't sure how to create a flashable zip. So here is a template zip file.
Instructions add your APK files to the appropriate directory within the zip.
ie framework-res.apk would go in system/framework/
SystemUI.apk would go in system/app/
Vigor_VZW_bootanimation.zip would go in system/customize/resource/
*You may need to create directories within the zip*
lol nice idea i have never thought about making one for people I forget people dont know how
This could be very useful for people who are new to theming and from development and who are still learning how to sign zips.
Nice work and good idea.
Sent from my ADR6425LVW using XDA App
ljbaumer said:
This could be very useful for people who are new to theming and from development and who are still learning how to sign zips.
Nice work and good idea.
Sent from my ADR6425LVW using XDA App
Click to expand...
Click to collapse
Agreed. This is pretty sweet and actually an idea I was going to ask someone for once (I had no idea how to do these).
And MrSmith, now I can try to get all the boot anims updated with flashables also so that everyone will have different options. Thanks!!
Thanks for dropping this. Already have one, but this helps anyone trying to learn. You may have given the next big developer a good first tool. Congrats.....
Sent from my ADR6425LVW using Tapatalk
Thanks. I'll give this a go on cleanrom.
Sent from my ADR6425LVW using xda premium
Is this just the required directories for theming or does it include the ones required to make a flashable ROM?
ShaneMA said:
Is this just the required directories for theming or does it include the ones required to make a flashable ROM?
Click to expand...
Click to collapse
this is just a flashible zip only you will need to add your files to the right folders to make it theme
is there a list of the folders? for example what folders should i make to add ringtones to the ones that are already on my phone? how about notifications, wallpapers, etc.?
bal1985 said:
is there a list of the folders? for example what folders should i make to add ringtones to the ones that are already on my phone? how about notifications, wallpapers, etc.?
Click to expand...
Click to collapse
The three things you've listed are items that can be freely transferred via USB. This is more for theme elements and applications.
However to answer your question, stock ringtones and notifications are in /system/media/audio/ringtones and /system/media/audio/notifications . The stock wallpapers are stored in /system/customize/resource.
MrSmith317 said:
Some people aren't sure how to create a flashable zip. So here is a template zip file.
Instructions add your APK files to the appropriate directory within the zip.
ie framework-res.apk would go in system/framework/
SystemUI.apk would go in system/app/
Vigor_VZW_bootanimation.zip would go in system/customize/resource/
*You may need to create directories within the zip*
Click to expand...
Click to collapse
Good idea.. I have my own templates I use. Never thought to post.. kinda nervous that someone out there would brick their phone and blame me...been busy as hell past month, hopefully soon I'll get some time to port over some of my previous work over to the rezound, since now all the issues with compiling and decompiling have been figured out.. I got some catching up to do
Sent from my ADR6425LVW using Tapatalk
Mr. Smith,
So if I wanted to make a flashable zip of say the market apk or root explorer that I can keep on the root of my SD card so if for some reason the rom I flash is missing gapps. Would I just make a folder called data with a subfolder called app and then it would get installed in data app ? Then drop the apk within the app folder and resign using android signer ?
I just had that happen while trying to flash the anthrax kernel , for some reason I lost my market apk and since it was a fresh flash I had no access to a file explorer. So ended up googling the commands to adb push the market apk to system. It worked, but made me think if I had my own flashable market zip I could have just flashed that and been up and running easier .
mjh68 said:
Mr. Smith,
So if I wanted to make a flashable zip of say the market apk or root explorer that I can keep on the root of my SD card so if for some reason the rom I flash is missing gapps. Would I just make a folder called data with a subfolder called app and then it would get installed in data app ? Then drop the apk within the app folder and resign using android signer ?
I just had that happen while trying to flash the anthrax kernel , for some reason I lost my market apk and since it was a fresh flash I had no access to a file explorer. So ended up googling the commands to adb push the market apk to system. It worked, but made me think if I had my own flashable market zip I could have just flashed that and been up and running easier .
Click to expand...
Click to collapse
You got it. As long as you get the structure down right, flashing the zip will drop the files in the proper directory on your phone/device.
What about file permissions and owner? How do we set that in the zip (eg. if I need to flash a file to /system that requires permissions 644, owner 0/0.
Nighthound said:
What about file permissions and owner? How do we set that in the zip (eg. if I need to flash a file to /system that requires permissions 644, owner 0/0.
Click to expand...
Click to collapse
Android handles that. However you can edit the script : META-INF/com/google/android/updater-script to make whatever changes you need. So you could add a line: run_program("/sbin/busybox", "chmod", "644", "xxx_file");
MrSmith317 said:
Android handles that. However you can edit the script : META-INF/com/google/android/updater-script to make whatever changes you need. So you could add a line: run_program("/sbin/busybox", "chmod", "644", "xxx_file");
Click to expand...
Click to collapse
Ahh, I googled for edify scripts and found there is a set_perm command which does exactly what I need. Thanks!
Nighthound said:
Ahh, I googled for edify scripts and found there is a set_perm command which does exactly what I need. Thanks!
Click to expand...
Click to collapse
haha that too.
MrSmith317 said:
Come a day there won't be room for naughty men like us to slip about at all.
This job goes south, there well may not be another.
So here is us, on the raggedy edge. Don't push me, and I won't push you.
Dong le ma?
Click to expand...
Click to collapse
Shiny!
MrSmith317 said:
Some people aren't sure how to create a flashable zip. So here is a template zip file.
Instructions add your APK files to the appropriate directory within the zip.
ie framework-res.apk would go in system/framework/
SystemUI.apk would go in system/app/
Vigor_VZW_bootanimation.zip would go in system/customize/resource/
*You may need to create directories within the zip*
Click to expand...
Click to collapse
Quick Q. is it possible to create 1 flashable zip that would flash more than 1 file into different directories I.e a file into System/app and another in System/Framework ?
funnyangrykid said:
Quick Q. is it possible to create 1 flashable zip that would flash more than 1 file into different directories I.e a file into System/app and another in System/Framework ?
Click to expand...
Click to collapse
Yeah man, that's what this blank flashable zip does
You can put as many files in the 'app' or 'framework' folder and it will flash them all

[Q] Create /data/app in a Rom?

Hi, im trying to add a .apk for a keyboard into my rom but when i put it into the /system/app foldrer and flash it, it just keeps FCing when i boot. So now im thinking of putting it into the /data/app folder, but my rom doesnt have a /data folder so i need to make one. What do i need to add in the update-script to copy /data/app from rom into my phone? my phone is the Desire Z and i think it has ext 4?
Have you looked into using dsixda's kitchen? It runs in Linux(or windows with a little work) it can add that option plus a lot more stuff.
Sent from my Kanged Shooter
netwokz said:
Have you looked into using dsixda's kitchen? It runs in Linux(or windows with a little work) it can add that option plus a lot more stuff.
Sent from my Kanged Shooter
Click to expand...
Click to collapse
Yeah, use dsixda kitchen, but I don't think it is a problem of where is the apk installed. U should place it in system. What apk is it? sometimes 2.2.X apks are not compatible with 2.3.X ones or 4.0.X
luiseteyo said:
Yeah, use dsixda kitchen, but I don't think it is a problem of where is the apk installed. U should place it in system. What apk is it? sometimes 2.2.X apks are not compatible with 2.3.X ones or 4.0.X
Click to expand...
Click to collapse
nope...most 3rd party keyboard will give you FC if you put them on /system/app. the easiest way is using dsixda's kitchen to put them on /data/app. we can also add these lines into the updater script to copy the apk into /data/app.
Code:
mount("EXT4"; "EMMC"; "<your data partition location>"; "/data")
extract_package_dir("data"; "/data")
kurotsugi said:
nope...most 3rd party keyboard will give you FC if you put them on /system/app. the easiest way is using dsixda's kitchen to put them on /data/app. we can also add these lines into the updater script to copy the apk into /data/app.
Code:
mount("EXT4"; "EMMC"; "<your data partition location>"; "/data")
extract_package_dir("data"; "/data")
Click to expand...
Click to collapse
Yea i was searching and found that code, but im also not sure what the name of the partition is
is it mmcblk0p8? not sure what the ending number should be
evilcuber said:
Yea i was searching and found that code, but im also not sure what the name of the partition is
is it mmcblk0p8? not sure what the ending number should be
Click to expand...
Click to collapse
try running
Code:
adb shell cat /proc/mounts
that should get you the mounting points. If not try:
Code:
adb shell cat /proc/mtd
do i need to set permissions? if so, what are the lines for the persmissions i need to set? or do i just need those 2 lines that you mentioned?
Also can i delete the stock android keyboard .so file in the library if i get the 3rd party keyboard to work?
I could be wrong, but I don't believe you need to set permissions. And what .so file are you talking about, and where is it located?
netwokz said:
I could be wrong, but I don't believe you need to set permissions. And what .so file are you talking about, and where is it located?
Click to expand...
Click to collapse
Its the .so file for latinjni_latinime.so which is for the default android kb. also can i just put those 2 lines anywhere in the updater script?
Here i changed the formating of the script to match my script
mount("ext4", "EMMC", "/dev/block/mmcblk0p26", "/data");
extract_package_dir("data", "/data");
looks right?
Ok when i try to flash it it says Error in /sdcard/romename.zip
(status 6)
I put it the above lines of code in the updater script
I wouldn't delete it, that's what tells the OS what keys you have available, and is needed. As far as the script goes, I'm not sure, I could never get it to work editing it myself. That's why I used dsixda's kitchen, as it does it for you.
i used the kitchen to make data/app but i still get the error
EDIT: Fixed
data/app
What is the use of data/app folder? And, how is is different from system/app
data/app is user apps and system/app is apps needed by the os
Sent from my GT-I9100G using xda app-developers app
i dislike dsixda's kitchen, i build my roms manually how to do this manually?
just copy the lib which is in the apk to system,libs,set permission to rw-r-r-- and reboot.done

Categories

Resources