[Q] Syntax Error - Hero CDMA Q&A, Help & Troubleshooting

I've searched, and searched, and searched some more.
I'm trying to create an update zip, but I keep getting this error:
E:Syntax error in update script
I'm trying to flash a com.htc.resources.apk that I modifies because I lose my ability to sign in gapps and I lose all my contacts when I push it. My update-script is in /META-INF/com/google/android. I edited it with notepad
THIS IS MY SCRIPT:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
What am I doing wrong?

Related

update script syntax error

can someone tell me why the hell this:
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
is giving me syntax errors?
I also tried:
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.2 10
I'm about to pull my hair out.
these are the only lines in the script. nothing else. All I'm going si copying stuff to the /system/app directory. WTF????
tejasrichard said:
can someone tell me why the hell this:
Code:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
is giving me syntax errors?
I'm about to pull my hair out.
these are the only lines in the script. nothing else. All I'm going si copying stuff to the /system/app directory. WTF????
Click to expand...
Click to collapse
Do you have a /system folder in you zip? I know it's a dumb question, but.....I'm just asking...
lol, yeah! i know, check all the easy stuff, but this really should be working...
at first i was trying to so a /system/app and a /data/app, but that kept getting the syntax error. Then, I modified it to be just /system/app/, but it still won't work.
BUMP! for my 10chars

A quick update-script question

Hi there,
I am building a .zip file that will install RTL support for some applications , and got stuck at the update-script part.
I have two files named CalendarFix.apk , and GalleryFix.apk , I would like to install them directly from the recovery.
Tried to put them both in system/app and data/app with :
copy_dir PACKAGE:system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:app
copy_dir PACKAGE:data DATA:
set_perm 1000 1000 0771 DATA:app
But no luck , they wont install .
Is there a command that I need to use to install them ?
I thought to use run_program , though I did`nt see it in any rom update-script code.
I need to -
Extract CalendarFix.apk and GalleryFix.apk , delete the old once (Calendar.apk,Gallery.apk) and install the new once .
Any help would be appreciated,
Danny.
http://www.robmcghee.com/android/creating-an-android-update-zip-package/
Fantastic , I managed to work that out.
Thanks.

Clockwork FRF83

Flashing from CM 5.0.8 using Rom Managers FRF83. It downloads three files, ERE27, FRF50, and FRF83. I get this error when installing part two
Code:
Installing: SDCARD:/clockworkmod/download/android.antbox.org/koush/google/passion/signed-passion-FRF50-from-ERE27.1e519a24.zip
I:Set boot command "boot-recovery"
Finding update package...
I:Update location: SDCARD:/clockworkmod/download/android.antbox.org/koush/google/passion/signed-passion-FRF50-from-ERE27.1e519a24.zip
Opening update package...
I:Update file path: /sdcard/clockworkmod/download/android.antbox.org/koush/google/passion/signed-passion-FRF50-from-ERE27.1e519a24.zip
Installing update...
I:Trying update-binary.
installing HTC updater extensions
Failed to mount /dev/block/mtdblock3 on /system: Device or resource busy
mtd mount of system failed: Device or resource busy
Verifying current system...
mtd read matched size 2101248 sha e7f20e513e5bd5c30e20670e992092296ee731a0
0 bytes free on /cache (6762912 needed)
error opening /cache/recovery/otatest: No such file or directory
0 regular files in deletable directories
no files can be deleted to free space on /cache
unable to make 6762912 bytes available on /cache
script aborted: assert failed: apply_patch_space(6762912)
assert failed: apply_patch_space(6762912)
E:Error in /sdcard/clockworkmod/download/android.antbox.org/koush/google/passion/signed-passion-FRF50-from-ERE27.1e519a24.zip
(Status 7)
Installation aborted.
Failure at line 7:
install_zip SDCARD:/clockworkmod/download/android.antbox.org/koush/google/passion/signed-passion-FRF50-from-ERE27.1e519a24.zip
From what I'm reading, this means that the updater script from Rommanager doesn't release the mount on system after the first flash, because I can easily navigate to the directory after I receive this error and install it manually. I figure the way it works is after install it umounts.
Just as an FYI, if others are trying this, this is what I did to overcome. 1.Using clockwork recovery
2.mount SD
3.find FRF83fromFRF50
4. copy to /sdcard/update.zip
5. manually install ERE27toFRF50
6. let it boot
7. reboot into stock recovery
8. install update.zip through stock recovery
BOOM FRF83
Ooops, sorry MODs. It originated as a question, but I figured it out mid writing this. Please move to general. Sorry

[TUTORIAL] Self-assembly of Android Firmwares

I just saw a tutorial in 4PDA by R0iz and wanted to share it here!
The link to the original post translated:
http://tinyurl.com/self-assembly-androidOS
Extract the files *. img
To extract system.img, used unyaffs (http://code.google.com/p/unyaffs/)
I have compiled under Ubuntu 64. With Unyaffs can only be extracted system.img.
To extract boot.img use extract-kernel.pl and extract-ramdisk.pl
# extract-kernel.pl boot.img
# extract-ramdisk.pl boot.img
Click to expand...
Click to collapse
Rebuilding boot.img
After extracting boot.img with the enclosed extract-*. pl
In order to collect boot.img with Custom kernel in the same folder run:
# mkbootfs boot.img-ramdisk | gzip > ramdisk-boot
# mkbootimg --kernel boot.img-kernel --ramdisk ramdisk-boot --cmdline "no_console_suspend=1 console=null" -o newBoot.img --base 0x19200000
Click to expand...
Click to collapse
Rebuilding system.img
At first glance it seems that you can simply mount the image and format it with YAFFS, but it's not because, as SPL Hero does not allow flash system.img directly.
You must use the format update.zip packages for this. (читайте ниже) (See below)
Write update.zip quite simple really. For example, to add the package test.apk in your rum:
- Create an empty folder <workdir>
- Create a folder structure for test.apk (<workdir> / system / app) and copy test.apk
- Create a folder structure for the update-script (<workdir> / META-INF/com/google/android)
- Edit <workdir> / META-INF/com/google/android/update-script
- Insert the following:
show_progress 0.1 0 show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM: copy_dir PACKAGE: system SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:app set_perm_recursive 0 0 0755 0644 SYSTEM: app
show_progress 0.1 10 show_progress 0.1 10
- Pack the contents <workdir> in zip (not the folder itself <workdir>, only its contents)
Now you have to sign a zip file. Testsign.zip download and copy it to your <SDK> / tools.
Unzip it there, thus creating a sub-folder sign with a file testsign. in it.
Then in the folder <workdir>, run this command:
java-classpath "<SDK> / tools / sign / testsign.jar" testsign file.zip file-signed.zip
Everything is now ready for your update.zip pouring into the apparatus by a modified recovery.
Click to expand...
Click to collapse
Change. Apk package
apk can just unpack an archive, change what you need and pack it back. But in the end you have to sign it as well as update.zip packages.
ODEX files
- What is it? Answer
- How to get rid of them?
For deodex ODEX files, use this howto
Then you can create classes.dex file by running smali from your "out". Then rename it to classes.dex and add it to apk.
- How to create them?
Use dexopt-wrapper on the device.
Click to expand...
Click to collapse
Porting ROM with other devices.
Well, this part is simple smile_good.gif
- Extract system.img
- Extract boot.img
- Replace boot.img-kernel of the original Roma HTC Hero.
- Rebuild boot.img
- Collect update.zip (see how it's done in any Custom rum for Hero)
- Sign and flash.
Device should start, and even be able to call, but probably will not work WiFi, BT, trackball.
Androsign script (Linux)
Androsign allows you to quickly sign the zip and apk. Just put it in <SDK> / tools, then CHMOD + X. If the path to the folder \ tools registered in the PATH, then you can run this script by typing:
androsign /dev/folder1/folder2/update.zip
He will Update-signed.zip (or App-signed.apk, etc.) in the same folder where the original file.
THANKS ARE WELCOMED!
Can we actually use this to port Sense or MIUI ?
this explains part of the process, the steps to do fo that purpose extracting and rebuilding but of course not about the code. i've heard MIUI is complex than sense
Most of us know this allready but nice to see it being said instead of learning the hard way
Sent from my GT540 using XDA Premium App

[Q] E: Error in /sdcard/update.zip (status 4) when install from sdcard

I try to create update.zip as code below
update-script:
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.1 10
when i choose zip from sdcard it show error message
E: Error in /sdcard/update.zip (status 4)
Clockworkmod v3.2.0.0
That's and updater-script problem. Update-script problem lol you should know that you need to edify it to convert update-script into updater-script. And you also have other issues to fix.

Categories

Resources