[Q] Making updater-script... doesn't make any sense!! - Android Q&A, Help & Troubleshooting

I was tying to make a fancy updater-script for an add-on for my ROM, but I kept getting a Status 6 error when flashing, so I stripped it back to nothing, just the most basic commands, and eventually got it to work. I made a copy, tried editing it to add the fancy stuff back in... broke again.
So I stripped the copy back to the basic commands... and it still breaks .
As far as I can see, the two files I have attached are identical in every single way, but one fails with a Status 6, the other flashes (BattMod works, update doesn't). Both are edited using gedit on Ubuntu, both zips are created in Ubuntu, neither are signed.
Can anyone see why, I am really tearing my hair out here... all I want to do is add some ui_prints and some progress bars .

I haven't looked it them yet, but make sure you are using the correct update-binary. Different ones support different number of parameters in the mount command.

Don't leave junk files in the update like updater-script.old, it's bad practice
My guess would be that since it's named update.zip, it's looking for a signature and it can't find one. Try renaming update.zip to battmod.zip and see if it works, or sign it first with testsign.

l0st.prophet said:
I was tying to make a fancy updater-script for an add-on for my ROM, but I kept getting a Status 6 error when flashing, so I stripped it back to nothing, just the most basic commands, and eventually got it to work. I made a copy, tried editing it to add the fancy stuff back in... broke again.
So I stripped the copy back to the basic commands... and it still breaks .
As far as I can see, the two files I have attached are identical in every single way, but one fails with a Status 6, the other flashes (BattMod works, update doesn't). Both are edited using gedit on Ubuntu, both zips are created in Ubuntu, neither are signed.
Can anyone see why, I am really tearing my hair out here... all I want to do is add some ui_prints and some progress bars .
Click to expand...
Click to collapse
With what are you editing it?
I've found out that editing it with notepad or any program won't work even if i'm using the right commands, so i decided to use amend2edify, you select an update-script (an update-script you can edit it with notepad without any problem) and it converts it into updater-script, updater-binary, but you have the possibility to edit anything in the output that you want and save it, or just copy-paste into the output the commands in your updater-script onto output by overwriting the converted output.
Don't know if i explained myself well.
Good luck

Try This One
Blank-CWM.zip
It's made for the Moto Photon, so you will need to:
1) Replace the update-binary with one from your phone.
2) Copy the file you wish to flash
3) Delete the txt files in it as well as any folders that you do not need to use in the process of flashing
4) Be sure to set the permissions to target the folder or file you are flashing. If you do NOT update this, you will end up in bootloops (Don't say I didn't warn you)
5) Flash away
Cheers!

Related

image editing?

For the last week everything has been going good cooking my own ROM's. I thought I would see if I could change the color of some of the background images, but when I do. The ROM appears to build fine, but when I try to flash my phone, it says "no image found". Is there a way to safely edit the images. I tried a few things like marking the file read only, which the original was, but no go. Any thoughts?
A Bit more detail. What program are you using to edit the images?
The most likely suggestion is that you are changing the file type when editing (bmp to jpg etc...) or changing the extension. Take a look at those options and see if that will correct the error.
You can change what is in the file, but you cannot change the file type or extension.
Good Luck,
Doug M.
I'm using gimp to edit the images. Maybe there is some other problem too. I unzipped the kitchen again and only added my packages back in, without any of the images edited, and it still said no image file. It was working with my packages before, and now it isn't. Not sure what is wrong.
OK, I think I figured it out. It has something to do with my memory card. once I took it out, everything worked fine.

[Q] Can someone please help me with two things?

Hey everyone, I have successfully made a few ROMS for myself (using the DSIXDA HTC Android ROM kitchen v 1.00). I am making a ROM for the HTC Evo.
I know how to do most of it, I have managed so far:
To add my own ringtones
To add my own notification sounds
To set the default ringtone, notification, and change the default wallpaper
Add a theme to my ROM
But there is a few questions I have. I have Googled, looked around on here, and done what I can to find the answers but I am so far unsuccessful.
My first question: Ok, I know that the default wallpapers reside in the system/customize/resource directory. I have attempted to replace the wallpaper (and small preview) wallpapers with my own custom ones. I tried using Paint.net for Windows to resize to the same dimensions as the default wallpaper. For example, to replace htc_wallpaper_01.jpg, I edited a 960x800 wallpaper to have the same size and name (everything the same) and changed htc_wallpaper_small_01 with a matching 80x60 smaller version of the new graphic. I have found sometimes it works, but if I do a few using the method mentioned above, the ROM fails to load up. Can someone help and explain why?
Question 2: I am trying to place the removed apps automatically on the SD Card. I made a "sdcard" folder in the root directory of my ROM. I tried editing the update.zip to include copy_dir PACKAGE:sdcard /sdcard and when I do a check for errors I get none, yet when I try and install the ROM it gives me the "E:syntax error in update script" meaning I am not doing it right. I tried doing it the same way Fresh did it and it also threw me the same error.
So can anyone please tell me how to do this? I know I am close with both and I have tried dissecting other ROMS to see how they did it but I cannot figure it out.
First question:
It could be many possibilities. Maybe not enough room on system, file names not matching, etc...
Try each png on seperate flashes to find the culprit.
*The best way to find out for sure is to use "adb logcat" on boot. This tells you all your errors the OS has.*
Second question:
Im not understanding what your trying to do?
Root of a rom is /
sdcard is mounted to a folder on /
If you want to store the apk on sdcard then,
the proper code to install in /sdcard from update.zip:
Code:
copy_dir PACKAGE:sdcard SDCARD:
If this is not what your asking please explain to me what your asking.
RichieDaze said:
First question:
It could be many possibilities. Maybe not enough room on system, file names not matching, etc...
Try each png on seperate flashes to find the culprit.
*The best way to find out for sure is to use "adb logcat" on boot. This tells you all your errors the OS has.*
Second question:
Im not understanding what your trying to do?
Root of a rom is /
sdcard is mounted to a folder on /
If you want to store the apk on sdcard then,
the proper code to install in /sdcard from update.zip:
Code:
copy_dir PACKAGE:sdcard SDCARD:
If this is not what your asking please explain to me what your asking.
Click to expand...
Click to collapse
Thank you RichieDaze for the response.
You mentioned png., but all the ROMS I have seen have the wallpaper in .jpg format. I was just wondering if there was a certain size they have to be (I mimic the exact size of the default ones).
I think I got this part worked out by doing exactly that, installing 1 at a time until I find the culprit.
For question 2: Thanks to using the DSIXDA kitchen, I cannot use updater.script, which seems to be the way ROM makers like Calkulin, Hero_over, and other have used to set their removed apps to automatically copy on to the SD card when you install the ROM.
I have to use update.script instead, and when I try and do it using that I run into an error.
What I am trying to is remove the usual bloat from the ROM, but copy the removed apps so that users can have the option of installing them if they use any of them.
You are answering my question and are on the right track to helping me. I will try to add that (the way you wrote it out) and see what happens to my update.script.
Thank you very much for your help, greatly appreciated and please let me know if there is some other way to do this if you are aware of any or if someone is using update.script instead of updater.script.

Fonts: how do i install a font to my phone?

There is a font on another rom that I like, how would I get that installed onto my Eris? I have the file from the other rom.
Have a look at T2noob's batch file font installer for ideas (and fonts, too).
Looks like he takes a pair of True Type (.ttf) files - one regular face, one bold face - and copies them to
/system/fonts/
renaming the (respective) .ttf files to "DroidSans.ttf" and "DroidSans-Bold.ttf"
Then, just reboot.
That was done for rooted 2.1 ROMs; I'm not sure if it the same for AOSP or CM6 Froyo ROMs
good luck
bftb0
bftb0 said:
Have a look at T2noob's batch file font installer for ideas (and fonts, too).
Looks like he takes a pair of True Type (.ttf) files - one regular face, one bold face - and copies them to
/system/fonts/
renaming the (respective) .ttf files to "DroidSans.ttf" and "DroidSans-Bold.ttf"
Then, just reboot.
That was done for rooted 2.1 ROMs; I'm not sure if it the same for AOSP or CM6 Froyo ROMs
good luck
bftb0
Click to expand...
Click to collapse
Thank you so much, this helps. I posted a question to his thread on the other site, but is it possible, since the fonts are in "true type" format that I can use some of mine?
johnny quest said:
Thank you so much, this helps. I posted a question to his thread on the other site, but is it possible, since the fonts are in "true type" format that I can use some of mine?
Click to expand...
Click to collapse
The best way to find out is to try.
Just make a Nandroid backup before you start, and then there is zero risk involved in trying.
bftb0
bftb0 said:
The best way to find out is to try.
Just make a Nandroid backup before you start, and then there is zero risk involved in trying.
bftb0
Click to expand...
Click to collapse
Ok, thanks I will give it a try.
johnny quest said:
Ok, thanks I will give it a try.
Click to expand...
Click to collapse
I used the T2Noobat but it says Device not found but when I go to the folder where my font is, its not there. So I don't know if I have to reboot my phone in order for my font to take effect. Or, the way you said about system/fonts..... I don't know where in my sd would I find the fonts in order to change it.
johnny quest said:
I used the T2Noobat but it says Device not found but when I go to the folder where my font is, its not there. So I don't know if I have to reboot my phone in order for my font to take effect. Or, the way you said about system/fonts..... I don't know where in my sd would I find the fonts in order to change it.
Click to expand...
Click to collapse
If you get errors, it is not reasonable to conclude that the install worked despite the errors. That's what error messages are for - to tell you that something went wrong.
T2noobs .bat file (script) presumes that you have:
1) ADB working on your PC (generally by installing the Android SDK or HTC Sync + adb)
2) That your phone is connected via USB cable
3) That your phone has USB Debugging turned on
4) That your phone is running a rooted ROM.
You don't have to use his script. I mentioned it as an example. You can just use a root-aware file manager (RootExplorer or Estrongs File Manager), and re-mount /system in RW mode, and then drop your two True Type fonts into
/system/fonts/
with the file names "DroidSans.ttf" and "DroidSans-Bold.ttf"
and then reboot. Obviously, there will already be files in there with those names to begin with, so you need to either (a) rename them to something else, (b) move them to some other folder, or (c) delete them.
I don't know how to make this any clearer.
You probably should spend some time learning how to perform Nandroid backups and restores before you do any of this (if you have not already mastered those skills). Having good backups will save your butt.
bftb0
PS. I just did this on my (CELB 3.2) ROM, so I know it works - assuming you are not using some screwy fonts.
bftb0 said:
If you get errors, it is not reasonable to conclude that the install worked despite the errors. That's what error messages are for - to tell you that something went wrong.
T2noobs .bat file (script) presumes that you have:
1) ADB working on your PC (generally by installing the Android SDK or HTC Sync + adb)
2) That your phone is connected via USB cable
3) That your phone has USB Debugging turned on
4) That your phone is running a rooted ROM.
You don't have to use his script. I mentioned it as an example. You can just use a root-aware file manager (RootExplorer or Estrongs File Manager), and re-mount /system in RW mode, and then drop your two True Type fonts into
/system/fonts/
with the file names "DroidSans.ttf" and "DroidSans-Bold.ttf"
and then reboot. Obviously, there will already be files in there with those names to begin with, so you need to either (a) rename them to something else, (b) move them to some other folder, or (c) delete them.
I don't know how to make this any clearer.
You probably should spend some time learning how to perform Nandroid backups and restores before you do any of this (if you have not already mastered those skills). Having good backups will save your butt.
bftb0
PS. I just did this on my (CELB 3.2) ROM, so I know it works - assuming you are not using some screwy fonts.
Click to expand...
Click to collapse
Thank you so much, I've been living on backups and restores. believe me I've learned my lesson. I will give this a try.
Your method worked great with the Root Manager. I bought it on the market. Ok, my biggest problem now is that my font is microscopic small. I don't know why. But I can't see the letters of which folder I'm in to take that font out.
I need a favor: can you post up screenshots or the number of folders to scroll down to get to the system/fonts/droidsans.tff
I can't see it, really its that small its the universal acc font.
Never mind I got it. Took a lot of squinting but I got it. Thanks.

[GUIDE][HOWTO] theme for the Nook

I've seen it asked quite a few times now, so I thought I would share how I've been creating my own themes for the Nook. This is a quick and dirty guide as I've almost got it down to a science for quick, keyboard shortcut, theming.
Things you'll need
Photoshop or The Gimp for editing files
Android SDK so you can push and pull files to/from the Nook.
draw9patch app in the Android SDK /tools folder for creating 9.png files
APK Manager (http://forum.xda-developers.com/showpost.php?p=6703735&postcount=1)
Notepad++ or some other text editor for editing XML files. After using Notepad++ on this, I'd highly recommend it though
An attention span
Some restraint
This is a rather good guide that helped me get started. My only complaint is that it is almost to complicated and includes more information than what is needed for a basic theme.
http://forum.xda-developers.com/showthread.php?t=916814
​
Getting Started:
Download the Android SDK and get it installed.
Download APK Manager
ADB pull /system/framework/framework-res.apk
Make a copy of the framework-res.apk files as a back-up in case you need to revert
Copy the framework-res.apk file to the /place-apk-here-for-modding folder under the APK Manager folder
Launch the APK Manager Script.bat file
Type in 22 to select the default project
Type in the number next to framework-res.apk in the list to select it as your project
Select 1 to extract the files
Select 9 to decompile (this is what makes the XML files readable)
Go to the /projects/framework-res/res folder under the APK Manager folder to view all the files from the theme
Images are located in the /drawable-mdpi folder. XML files are located throughout, but the files specific to layout are under the /layout folder. To change global settings, such as color codes and strings, edit the XML files under the /values folder.
Creating custom PNG files: If you are using Photoshop, use the Save For Web feature when saving. Save the image as PNG-24. Select None under the Matte option. Select None under Metadata.
A word on 9.png files: 9.png files are files that can be stretched by the OS. There is a 1 pixel border all the way around the image. In that 1 pixel border, you'll notice solid black lines here and there. The black pixels indicate which portions of the image are to be stretched. You can add this border and the black pixels in Gimp or Photoshop, or you can open the file the draw9patch app under the Android SDK /tools folder. The draw9patch app will actually display how the image will look when stretched as you add the black pixels around the border, so it can come in handy and it's what I prefer to use. You can open and edit .9.png files in draw9patch and edit the border even after you save the file.
​
Once you have all your files edited, recompile the APK package with APK Manager
Option 11
y
y
It will tell you to delete the files under the /keep folder that you have edited. Delete any images and XML files, from the /keep folder, you edited under the /projects folder. If you edited XML files, delete the /keep/res/resources.arsc file as well
Press any key to continue and let the script finish
In a separate command line window, mount your Nook's /system folder (adb shell mount -o remount,rw /dev/block/mmcblk1p2 /system)
back in APK Manager, select 8
/system/framework/framework-res.apk
Reboot your Nook
Boot Loop: If you messed something up and are stuck in a boot loop, most of the time you can still mount your Nook, push the original framework-res.apk to it and reboot. Or, you can use an unedited version of the CWM flashable zip file from the link below.
NOTE: it is not smart to push your framework-res.apk file to the Nook. I've learned the hard way that you can only do this about 10 times before you run out of memory and can no longer boot your Nook until you reflash Froyo again.
I'd recommend only a few flashes on a bare bones copy of Froyo until you feel comfortable with working on the framework theme. After that, I'm attaching a base, flashable zip for you to use in CWM so you can flash the theme instead of pushing. This will prevent you from getting stuck in a boot loop (unless you do something wrong yourself).
To add your framework-res.apk file to the zip, just open the zip and replace the /system/framework/framework-res.apk file (I'd recommend 7zip).
​
A Few Goodies
I'm including all of the PSD files I use to edit and create themes. If you want to create your own, custom theme, these will get you started. The only downside to these PSD files is that they are at the MDPI scale. If you want to create an HDPI theme, you'll need to increase the sizes.
Link to PSD files for creating your own theme, plus the flashable CWM zip file:
http://jjis.me/android-theme-templates
​
Hey man, I know you theme the froyo roms, but Im attempting a theme for the Phiremod CM7 and I cant seem to get anything but splash hangs and bootloops. I theme CM7 for the hero so I know my way around that, but Im wondering if theres something about the Nook that I have to do differently. For instance what is the mount.sh file you have in the tools folder on your themes? Is that only for froyo? Any help you could give me would be appreciated.
PMDColeslaw said:
Hey man, I know you theme the froyo roms, but Im attempting a theme for the Phiremod CM7 and I cant seem to get anything but splash hangs and bootloops. I theme CM7 for the hero so I know my way around that, but Im wondering if theres something about the Nook that I have to do differently. For instance what is the mount.sh file you have in the tools folder on your themes? Is that only for froyo? Any help you could give me would be appreciated.
Click to expand...
Click to collapse
CM7 is a little different than the stock builds of Froyo and others. They use the theme manager for it. If you are looking to theme for CM7, I'd suggest learning what it is needed to package it for the theme manager. I spent about an hour one day trying to find documentation, but couldn't. If can, or have it, please let me know where to find it so I can link to it and use it myself.
With that said, it appears that CWM does not flash, or at least mount, the same on the Nook. I'm assuming it's because it's on the external SD card and not internal. The mount.sh file was borrowed from samuelhaff's flashable ROMs. It actually tells CWM to mount the internal memory and flash to it.
If you are flashing without the mount.sh, it could be why you're getting the boot loops.
CWM uses edify language instead of amend. Again, it took me forever to find little to no documentation on it.
If you are using the mount.sh file and you are still getting stuck in a boot loop, I did discover a little issue with it yesterday. I was trying to use it to flash my new theme without the Vending.apk mod and I kept getting stuck in a black screen during start up. I forgot my edify code deletes the Vending.apk file so that was causing my problem. If you know how to edit the file, go for it. If not, I'm planning on updating it to correct this. If you need to, for now, just copy the Vending.apk to your flashable zip file.
It deletes the services.jar file as well. This was a requirement on Froyo since the status bar text is black by default. The services.jar file has to be edited to change the status bar text to white. Since CM7 does not need that change, try pushing just the framework-res.apk file, reboot and see if you boot successfully. If so, that is more than likely your problem.
wretchedlocket said:
CM7 is a little different than the stock builds of Froyo and others. They use the theme manager for it. If you are looking to theme for CM7, I'd suggest learning what it is needed to package it for the theme manager. I spent about an hour one day trying to find documentation, but couldn't. If can, or have it, please let me know where to find it so I can link to it and use it myself.
With that said, it appears that CWM does not flash, or at least mount, the same on the Nook. I'm assuming it's because it's on the external SD card and not internal. The mount.sh file was borrowed from samuelhaff's flashable ROMs. It actually tells CWM to mount the internal memory and flash to it.
If you are flashing without the mount.sh, it could be why you're getting the boot loops.
CWM uses edify language instead of amend. Again, it took me forever to find little to no documentation on it.
If you are using the mount.sh file and you are still getting stuck in a boot loop, I did discover a little issue with it yesterday. I was trying to use it to flash my new theme without the Vending.apk mod and I kept getting stuck in a black screen during start up. I forgot my edify code deletes the Vending.apk file so that was causing my problem. If you know how to edit the file, go for it. If not, I'm planning on updating it to correct this. If you need to, for now, just copy the Vending.apk to your flashable zip file.
It deletes the services.jar file as well. This was a requirement on Froyo since the status bar text is black by default. The services.jar file has to be edited to change the status bar text to white. Since CM7 does not need that change, try pushing just the framework-res.apk file, reboot and see if you boot successfully. If so, that is more than likely your problem.
Click to expand...
Click to collapse
Thanks for the reply! I actually took yours apart and was able to correct my script and I noticed that the delete services.jar line was causing issues as well. If you can I'd like you to take a look at the updater script after I edited it and see if you see any errors. It's attached below. I have gotten the framework and other themed apps to flash fine, but for some reason the themed market will not install. After flash it is in the /system/app folder as vending.apk. but it doesn't actually replace the stock market anywhere else. I actually spent several hours today trying to get the market back because I got frustrated and went all delete happy in root explorer, lol.
As far as Theme Chooser goes, here is a decent tutorial, but I haven't taken the time to really try and change my whole MO to use it. I theme the aospCMod for the heroc without using the chooser app. You can also get some good tips on building themes for the chooser in the #aospbot irc channel. A few of the guys in there build themes for it.
View attachment updater-script.zip
PMDColeslaw said:
Thanks for the reply! I actually took yours apart and was able to correct my script and I noticed that the delete services.jar line was causing issues as well. If you can I'd like you to take a look at the updater script after I edited it and see if you see any errors. It's attached below. I have gotten the framework and other themed apps to flash fine, but for some reason the themed market will not install. After flash it is in the /system/app folder as vending.apk. but it doesn't actually replace the stock market anywhere else. I actually spent several hours today trying to get the market back because I got frustrated and went all delete happy in root explorer, lol.
As far as Theme Chooser goes, here is a decent tutorial, but I haven't taken the time to really try and change my whole MO to use it. I theme the aospCMod for the heroc without using the chooser app. You can also get some good tips on building themes for the chooser in the #aospbot irc channel. A few of the guys in there build themes for it.
View attachment 546902
Click to expand...
Click to collapse
Stupid question, but you are copying the vending file as Vending.apk and not vending.apk, correct?
Also, if you're using my themed market, there are only two icons that are customized. The rest looks stock.
Sent from my SAMSUNG-SGH-I897 using Tapatalk
wretchedlocket said:
Stupid question, but you are copying the vending file as Vending.apk and not vending.apk, correct?
Also, if you're using my themed market, there are only two icons that are customized. The rest looks stock.
Sent from my SAMSUNG-SGH-I897 using Tapatalk
Click to expand...
Click to collapse
Yeah the file is Vending.apk but its my themed market.
Sent from my NookColor using Tapatalk
PMDColeslaw said:
Yeah the file is Vending.apk but its my themed market.
Sent from my NookColor using Tapatalk
Click to expand...
Click to collapse
Sorry for the delay in response. I had too many things to do with the family yesterday.
If you haven't got this working yet, I'd suggest trying to start with removing just the /system/app/Vendind.apk file via the updater-script. If it works, then go back in and add each additional line until you run into problems again. At that point, you'll know what your problem is.
Since everything else (framework-res.apk, services.jar, etc.) gets replaced successfully, leave those lines alone. I'd just start with the basics of replacing the Vending.apk first and then work your way back up from there.

Editing .smali files??

Im trying to teach myself here and actually reading unlike others at times, but What my GOAL: is to remove the GPS icon in my ROM when it is not active. I may be wrong so please correct me if I am...
I started with "APKtool" to decompile my "systemUI.apk" I then edited "HtcCdmaStatusBar.smali" located in "com/android/systemui/statusbar/policy"
I ran into a problem with compiling it back together with errors (after trying for hours to find my mistake) I moved on to...
"APK-Manager"
Again following instructions I decompiled "systemUI.apk" using "com.htc.resources.apk" as well since its a system file..
It seems to have worked, it said to delete whatever I modified in the "keep" folder well the ".smali" files don't appear only XML and system images but I went ahead and tried to take that "SystemUI.apk" that I recompiled with the edited files and dropped it in my phone via root manager
(well yea that didnt seem to work)
I moved on to this link http://forum.xda-developers.com/showthread.php?t=549309
I used it as a reference to edit the files I wanted to and not the the ones that were on the guide. well I had no errors and I and did everthing correctly, as i thought and the finally step I pushed the "SystemUI.apk" via adb and then rebooted
That resulted in a force close on my "status bar" i believe it said when I booted it up, after i cleared the force close my phone worked fine except the fact I had NO TASKBAR what so ever...
I am running "Showdown 1.0'
http://forum.xda-developers.com/showthread.php?t=1209777
Like always, Thanks for any help or ideas in advanced....
Questions or Problems Should Not Be Posted in the Development Forum
Please Post in the Correct Forums
Moving to Q&A
Where did the thread go? Dont see it in Q &A forum??? Having the same problem
I was JUST having a very similar issue.. I was trying to decompile and recompile rosie but it kept giving me errors. Someone said try apkmanager 4.9 (I was using 5) and my problems went away. Also I noticed if you are using a file that has already been modified apkmanager didnt seem to like that. I had to take a stock one, make the xml changes, build it then replace whatever images I had replaced in the original
and now I cant get the ***** to build right. I'm not trying to mod it so the pull down notification bar is semi-transparent but it wont build correctly
pastebin of my apkmanager log file http://pastebin.com/uZ8JacJL

Categories

Resources