Creating Roms... - Galaxy S II Q&A, Help & Troubleshooting

Hey everyone, Before you tell me there are other threads I can look at for instructions, I understand there are but I'm getting really stressed looking at them. For ages now I've wanted to create my own ROM and now i've finally gotten the chance. For the past 3 days solid I've been trying to look at these guides and instructions and its not that its going over my head, I understand what they're saying. But when I have an error and even if they cover it. I don't have the faintest clue on fixing it, for example:
I've been using Kitchen to build my ROM and configure it... my base is the nightly of Cyanogenmod 26/03/2013
And I can add things and stuff but as soon as I compile it into a ZIP again and try to flash it, I get either status 6... or status 0. I've read up and they say edit Update-script with notepad++ to make sure its in Unix code. Which it already is... When I switch that and just use UpdateR-script with binary... I get status 0. HOW on earth do I fix this xD
What do I have to edit in Notepad++ for this to work? Shall I paste the contents of all the scripts in here?
Please help, I don't want to lose my sanity over this.
Catley.

Bump - Please help ^^

Catley said:
Hey everyone, Before you tell me there are other threads I can look at for instructions, I understand there are but I'm getting really stressed looking at them. For ages now I've wanted to create my own ROM and now i've finally gotten the chance. For the past 3 days solid I've been trying to look at these guides and instructions and its not that its going over my head, I understand what they're saying. But when I have an error and even if they cover it. I don't have the faintest clue on fixing it, for example:
I've been using Kitchen to build my ROM and configure it... my base is the nightly of Cyanogenmod 26/03/2013
And I can add things and stuff but as soon as I compile it into a ZIP again and try to flash it, I get either status 6... or status 0. I've read up and they say edit Update-script with notepad++ to make sure its in Unix code. Which it already is... When I switch that and just use UpdateR-script with binary... I get status 0. HOW on earth do I fix this xD
What do I have to edit in Notepad++ for this to work? Shall I paste the contents of all the scripts in here?
Please help, I don't want to lose my sanity over this.
Catley.
Click to expand...
Click to collapse
The error you get while flashing the ZIP file could be due to an incorrect update-binary. In this case I could solve the problem almost always by replacing the update-binary by the one I extracted from the cache partition (cache.img) of a recent stock firmware.

Thank you, but where would I get that because I've been searching for a while for stock firmware so I could do something like that but I'm also on the side trying to write it from source code on ubuntu, and having a few problems with that too, so I've been more concentrated on that, I might make another thread asking what to do about writing source code because no matter how hard I look, everyone else can do it but me xD

Related

[TOOL] Framework Flasher 1.1.4 (1/14/12) - Easily modify and flash framework-res.apk

Finally! After days of struggling to figure out how to modify my ROM's framework-res.apk and create a working flashable update.zip to install the framework-res.apk changes, I have finally figured out how (big thanks to the guys here: http://forum.xda-developers.com/showthread.php?p=20962080#post20962080) and have created an automated script to help others struggling with the same problem.
Framework Flasher 1.1.4
Feel free to download and experiment with it. This is my first gift to the XDA/Android Hacking community, and I plan on doing more. I just want to test the waters for now Feedback would be nice. Let me know if I've helped you in some way!
---------------------------
What does it do?
It extracts your framework-res.apk file and allows you to edit the files. After editing, the script will compile, sign the apk, create your update.zip with the correct structure for flashing, and then sign the .zip. Everything you need to modify and flash your framework-res.apk file.
How do I use it?
Download the .zip from the link below and extract it somewhere on your PC. Drag the framework-res.apk file that you want to modify and/or flash into the /place-framework-res-here/ directory. Double-click on RunMe.bat and off you go! Do the steps (1-5) in order and you shouldn't have any problems.
Who needs this?
A LOT of people according to how many google searches I did in the past 3-4 days.
Will it work for files other than framework-res.apk?
Currently, no. However it would be easy to implement that functionality if I saw that people would benefit from it.
I found a bug... what do I do?
Post it in this topic. I'll do what I can to make continual updates as long as I see people are benefiting from it. I'm sure there are bugs in it somewhere, so just let me know.
Where do I download this snazzy piece of software?
http://www.mediafire.com/?1nc14hkhs2yrqmt
The little disclaimer
If you download this tool, please say thanks! Not only does it motivate me to continue to improve this software, but it also let's me know how many users are using it! Thanks!
This script is mainly intended for use with editing script files (xml, etc.), and normal (non 9png) images. 9pngs have been successfully repacked using this tool! If you run into any problems, be sure to make it known!
This tools was created to work with the Droid X2. If you are experiencing problems using it, first ensure that you are in fact using a Droid X2.
Change Log
1.1.4 (1/14/12)
- Corrected the Log error. You can now see error logs!
- Corrected an error processing problem where Framework Flasher would instantly close without warning
1.1 (1/7/12)
- Made compatibility tweaks
- Removed unnecessary overhead
1.0 (1/6/12)
- Initial Release
When reporting errors, please ensure that there are no spaces in your file path, and include what ROM and version you are running.
Hello
This is an awesome little tool you got here. I haven't tried it yet but I'll likely give it a shot eventually.
You should add functionality for SystemUI.apk, that's the other "real big" file people like to edit. Just a suggestion based on what I know about theming
Very nice!
So r u telling me this will modify everything including the. 9 png images..also can u get into the xml files as well or images only...i use apk manager and with the. 9 pngs u cannot touch the 9 patches or change the image without using draw 9 patch to ensure the apk will recompile
Sent from my DROID X2 using xda premium
PoorCollegeGuy said:
Hello
This is an awesome little tool you got here. I haven't tried it yet but I'll likely give it a shot eventually.
You should add functionality for SystemUI.apk, that's the other "real big" file people like to edit. Just a suggestion based on what I know about theming
Very nice!
Click to expand...
Click to collapse
Thanks. I will definitely look into adding this. I'll update the OP with any changes or updates.
Kevin3328 said:
So r u telling me this will modify everything including the. 9 png images..also can u get into the xml files as well or images only...i use apk manager and with the. 9 pngs u cannot touch the 9 patches or change the image without using draw 9 patch to ensure the apk will recompile
Sent from my DROID X2 using xda premium
Click to expand...
Click to collapse
Not tested 9pngs with this, it's mainly intended for scripting (xml files, etc. along with normal non 9png images). I've updated the OP to include a little disclaimer stating this fact. Thanks for pointing that out.
.9.png seems to work
Thanks Wesf90 for the tool. I was curious about the .9.png myself. Looking at the script it decompiles and compiles using apktool just like the apkmanager script does so just by looking at your RunMe.bat it looks like it would be fine. I did test it out to be sure though. So I took the framework-res from eclipse 2.0.3 changes some 9.png files and recompiled without any issues. It is important to note that you need to be careful when editing 9.png files to NOT change the black "patches" around the edge of those images. Doing so will cause bad patches and will generate errors when re-compiling. So for example if you apply a filter to the entire image double check that the color value of the black patches are still 000000 (I've done this ). If you don't mess with the patches all should be fine. It also depends on the original framework-res you are starting with. If you use one that has broken 9.pngs in it to start then you will need to fix them before re-compiling (I've done this too ).
Nice work. I especially like that step 4 that creates the update.zip. That is not in apkmanager that I've been using. So following steps 1,2,3,4 sure does make it simpler for a beginner which was your goal. Keep up the good work!
hedwig34 said:
Thanks Wesf90 for the tool. I was curious about the .9.png myself. Looking at the script it decompiles and compiles using apktool just like the apkmanager script does so just by looking at your RunMe.bat it looks like it would be fine. I did test it out to be sure though. So I took the framework-res from eclipse 2.0.3 changes some 9.png files and recompiled without any issues. It is important to note that you need to be careful when editing 9.png files to NOT change the black "patches" around the edge of those images. Doing so will cause bad patches and will generate errors when re-compiling. So for example if you apply a filter to the entire image double check that the color value of the black patches are still 000000 (I've done this ). If you don't mess with the patches all should be fine. It also depends on the original framework-res you are starting with. If you use one that has broken 9.pngs in it to start then you will need to fix them before re-compiling (I've done this too ).
Nice work. I especially like that step 4 that creates the update.zip. That is not in apkmanager that I've been using. So following steps 1,2,3,4 sure does make it simpler for a beginner which was your goal. Keep up the good work!
Click to expand...
Click to collapse
Thanks for the test run. I've updated to OP to state that 9pngs have been tested.
Creating the update.zip was the hardest part for me, learning how to use update-script and updater-script. Hopefully this will help everyone else get on the right path.
is it possible, that after the editing was done, to simply push the framework to its place? without flashing recovery?
Dude XDA did a writeup on this.. but the article states there is no. 9 compatibility .... which is not true your program decompiles just like apk manager and apk tool do... .9 can be edited the patches simply can't be touched.. making this an awesome little tool !!!
Sent from my DROID X2 using xda premium
Sweet tool, just what I've been looking for
Just wanted to drop in and say thanks for this tool (button hit, donation forthcoming).
I tried this with my framework-res file from and ICS 4.0.1 ROM I'm running and it decompiles perfectly, but after I make edits and try and recompile, the script just closes.
I tried looking at the log in the folder of the tool and it didn't have any information except the date/time I ran the script.
Any thoughts? Would love to make use of this if you think it should work for me. Thanks again!
XT69 said:
is it possible, that after the editing was done, to simply push the framework to its place? without flashing recovery?
Click to expand...
Click to collapse
Yes, definitely possible if you have ADB access. I may add this feature, but the idea of the tool is primarily to allow users to create a flash-able file for their's, or others', phones. I'll put it on my to-do list though
Kevin3328 said:
Dude XDA did a writeup on this.. but the article states there is no. 9 compatibility .... which is not true your program decompiles just like apk manager and apk tool do... .9 can be edited the patches simply can't be touched.. making this an awesome little tool !!!
Sent from my DROID X2 using xda premium
Click to expand...
Click to collapse
Yeah I noticed that about the 9pngs in the article, however several people (including yourself) have stated that 9png's work fine. So hopefully XDA will eventually update the post.
zaxondis said:
Just wanted to drop in and say thanks for this tool (button hit, donation forthcoming).
I tried this with my framework-res file from and ICS 4.0.1 ROM I'm running and it decompiles perfectly, but after I make edits and try and recompile, the script just closes.
I tried looking at the log in the folder of the tool and it didn't have any information except the date/time I ran the script.
Any thoughts? Would love to make use of this if you think it should work for me. Thanks again!
Click to expand...
Click to collapse
Interesting. I plan on releasing another update soon, so send me the file you tried (I sent you a PM), I plan on weeding out small bugs quickly. Once the update is ready, hopefully I can have this bug fixed (or at least resolved)
Wes
zaxondis said:
Just wanted to drop in and say thanks for this tool (button hit, donation forthcoming).
I tried this with my framework-res file from and ICS 4.0.1 ROM I'm running and it decompiles perfectly, but after I make edits and try and recompile, the script just closes.
I tried looking at the log in the folder of the tool and it didn't have any information except the date/time I ran the script.
Any thoughts? Would love to make use of this if you think it should work for me. Thanks again!
Click to expand...
Click to collapse
had the same here!
other then that great tool
Ok to u guys having this happen... try to decompile and them recompile immediately ... if this works odds are u damaged a .9 png... those images have a black 1 pixel boarder that cannot be touched
Sent from my DROID X2 using xda premium
Maybe a dumb question but do we flash this in recovery or is this for pc use?Thanks I been itching to try this on my Iced Sam Vib...
Program is for PC use when u r done it will create a flashing zip for u
Sent from my DROID X2 using xda premium
Dougfresh said:
Maybe a dumb question but do we flash this in recovery or is this for pc use?Thanks I been itching to try this on my Iced Sam Vib...
Click to expand...
Click to collapse
Yes, you're absolutely correct. Once you go through the steps and create the update.zip file, simple place that file onto your sd card. Then flash the .zip in recovery.
Wes
Doesn't work for me. It says that echo is off.
Thanks wesf90. Going to DL, and check this out.
Work with any Android?
Will this work with any Android system, like the GS2? Sorry if I missed the answer somewhere above.
Thx.
disclaimernotice said:
Doesn't work for me. It says that echo is off.
Click to expand...
Click to collapse
Does this happen as soon as you start it?

[SOLVED] Creating an update.zip?

UPDATE: Problem fixed, thanks to florpor. The solution was to change the scripting language from Amend to Edify
Hi all,
I was wondering if I could get some quick advice from some more experienced users here on XDA?
Basically, I've been trying to put together a simple update.zip that I can flash that adds a tone to /system/media/audio/notifications. This is because after each time I flash an update for CM9 on my Galaxy S II, it replaces/removes the tone. Now, I could manually re-add them each time, but I'd like to find an alternative solution.
I've spent the past two hours or so searching around on how to put together an update.zip, and came across this tutorial and thought I was going well, until I tried to flash the zip and got an error message telling me that recovery no longer uses update-script files, and instead uses updater-script. So, I went ahead and renamed it, then re-zipped and re-signed the folders, and tried to flash it through CWM, which just returned an installation aborted message, with no details.
Any ideas? It's probably something really obvious that I'm mising, but it's driving me nuts. I've attached the update.zip, in case it helps.
Anyway, thanks for your time,
screamworks.
your updater-script didn't work because apart from changing its name, the scripting language it's coded in has changed from Amend to Edify.
try looking for posts about converting scripts between the two.. I think there's an automated script for this somewhere or you can do it by hand.
Thanks for that! After fixing that up, I got it to work. Thanks a million
screamworks.

[Q] ICS Settings.apk? Is this possible?

http://forum.xda-developers.com/showthread.php?p=24317850#post24317850
I came across this and I thought it would be cool to do. I have been trying to work on this but but I am getting an error when trying to recompile the program. I am putting it here to see if anyone else can have success with it? It does look cool and I think it would be a great add in for some roms we have here!
1. I have decompiled the rom
2. I did the settings changes that were directed
I am a noob to all of this stuff. This is my first decompile apk project and I do not know what I am doing lol.
I see that there are files to download but the guide does not tell us where to place that.
3. when trying to recompile on step 7/8 I get errors that it does not there is no resources and then it fails.
My question is do you think this is possible with our phone? Does anyone want to give it a try. I actually have a Milestone x2 running 2.3.6. But I wanted to see if this worked for Droid x2 as well. Please let me know I would greatly appreciate it!
Good lord now I have something to do in my spare time! I'm gonna give this a shot and report my results. Might be a few days though, semester is ending.
I'm not entirely sure why you are getting errors when recompiling. It would be nice if I could actually mess around on your pc to figure it out but that's obviously not an option. Lol
Sent from my MB870 using xda premium
lol, I think this might be really neat! Let me know what you come up with. I am very new to this whole thing so it might be something I am doing or something that is written that I might be missing or skipping.
I didn't actually click the link you provided (to tired and lazy atm ), but I'm assuming your using either APK Manager or APK Multi-Tool (I highly recommend Multi-Tool as it's the new APK Manager and the dev keeps it up to date)
Usually if your getting an error like that while trying to compile it's due to missing or out of date APKTool files. Google "APKTool" it should be your first link.
Make sure you have these files up to date and stored correctly (Windows directory)
Also make sure APK Multi-Tool is up to date (version 1.0.2)
Hope this helps.

[Q] - dsixda's Android Kitchen HTC ONE X

Hi all!
Dont know if ill get flamed because this a noob post, but i searched all over, (xda, google) and i cant find a solution to my problem.
Im starting in this cooking deeds but i have problems setting up my kitchen.
I want to cook to an HTC ONE X, i got my dsixda kitchen setted up in a VM, everything works with no problem.
But i have this problem when flashing rom
QUESTION: When flashing my ROM I get the error "mount expects 4 args got 3" or similar.
This refers to the fact your mount command takes 4 parameters (e.g. ext4, EMMC, /dev/block/.., /system) and your update-binary file only checks for 3 parameters. You'll have to change the update-binary file to a compatible one, found under the /tools/update_files folder. Just copy the appropriate file and rename to update-binary. e.g. If you're going to be using MTD partitions, copy 'mtd-update-binary' to /META-INF/com/google/android as "update-binary".
Click to expand...
Click to collapse
i know this is an answered question on dsixda FAQ, but my english is not so good to understand the easy solution to fix it :\
i tryed some several ways to fix this but with no sucess.
i already tryed, copying the update-binary from my ROM.zip to /tools/update_files folder no sucess
i already tryed copying the update-binary from my ROM.zip to /META-INF/com/google/android before script conversion, but with no sucess
i even tryed to make the kitchen my device compatible, renaming the evita (HTC ONE XL) to enderavou (HTC ONE X) in /tools/edify-defs/ in a chance that will have the same "specs" .. but it outputs me another error when flashin :\
sorry for the noob question, i know the solution is in front of my eyes and its easy, but my english is weak and i cant figure this alone with the short explanation on FAQ.
so if anyone can give me a more detailed help, or maybe if anyone has the templates for HTC ONE X to make dsixda kitchen compatible, ill appreciate.
thanks all
I have replaced the updater script from a working rom with the one the kitchen comes up with. Depending on the changes you made in the kitchen that has worked well for me. Looks like your script needs to match the partition setup. Compare the 2 scripts, 1 from working and 1 from kitchen and you should be able to see the difference.
I am far from a dev, and I'm sure someone will chime in with better info. but maybe this will work for you.
onlychevys said:
I have replaced the updater script from a working rom with the one the kitchen comes up with. Depending on the changes you made in the kitchen that has worked well for me. Looks like your script needs to match the partition setup. Compare the 2 scripts, 1 from working and 1 from kitchen and you should be able to see the difference.
I am far from a dev, and I'm sure someone will chime in with better info. but maybe this will work for you.
Click to expand...
Click to collapse
that was my first solution ... no sucess... maybe if i try another updater from another rom ... hum but i dont see any logic .. its supose to work with update from any working rom

[Q] Making / editing custom ROM's using Linux

I'm looking for a little bit of help with understanding something.
My ideal place to get to is to eventually provide the community here with custom roms and mods which everyone can enjoy on their devices, just like what all the greats devs do here day in day out.... but before I get there, I'm on a path of discovery. At the minute, I want to take a XDA dev's already pre worked ROM, go in to it and change a few things up.... edit the apps, maybe play with a few apks, change the ringtones etc, and then resign the ROM and flash it to my device.
I've been reading some great tutorials such as http://forum.xda-developers.com/showthread.php?t=1801690 and http://forum.xda-developers.com/showthread.php?t=1843506 which I am finding very helpful, however....
They seem to be geared towards someone working on a windows machine. I dont want to do it in Windows, I want to do it in Linux... I dont wish to use "CygWin" and I would rather do it manually than use a kitchen - I could easily follow these guides in Windows and achieve my stated aim of a slightly modified custom ROM, however, the overall goal here is to acquire knowledge, and enjoy the process as it goes along.
Now, my current understanding under Linux (Mint 13) is that I can download a recovery flashable Zip, go in to it, and just change up some of the files as I desire.... but then I get confused when it comes to repackaging the ROM prior to flashing it to my device. How would I go about doing this?
As a side note, when it seems that all development for these devices is done under Linux / Mac... why do all the newb guides steer you to Windows?
Are you asking how to rezip or how to recompile?
If you're asking about zipping up the folder, go here:
http://forum.xda-developers.com/showthread.php?t=1499885
If you're asking about recompiling, it should state how to do so on the page you got the apktool from.
Hi, thanks for your reply. I guess for now what I am asking is how to get the ROM back to a flashable zip file.
The I believe is that you need to have the ROM signed. The windows tutorials point you to a batch file script that does the signing and creates you an "update.zip" file. What id the alternative to this under linux?
Also, in the post you just provided a link to, someone says that you must also edit an update script to reflect the changes you made, such as any apks removed or added etc, where would I find this?
You need signapk.jar which I believe is included in the android sdk if not just Google and you can find it, once you have that you need a key to sign with, again Google for a testkey.
Then in your terminal you would run:
Code:
java -jar signapk.jar certificate.pem key.pk8 your-update.zip your-signed-update.zip
Sent from my PACman GT-I9100 using xda premium
Excellent, thank you very much.. will play with this later

Categories

Resources