A quick update-script question - Nexus One Q&A, Help & Troubleshooting

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.

Related

[Q] Syntax Error

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?

help on rom update script!!! :(

if someone could plz help me!! when i try to install my rom i have a problem, the installation stops at
E:Cant chown/mod/system/etc/init.d
(no such file or directory)
E: faliure at line 80
set_perm_recursive 0 0 0777 0777 system: etc/init.d
installation aborted
One thread is enough.
http://forum.xda-developers.com/showthread.php?t=1000983

[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

Flashable zip

Hi everyone,
I finally learnt something and started modding my phone.
I have a flashable zip with the folders of my systemUI.apk
And the META-INF folder with this script:
"
Show_progress 0. 1 0
Copy_dir PACKAGE:systen SYSTEM:
set_perm_recursive 0 0 0755 0644 SYSTEM:app
Show_progress 0. 1 10
"
Does anyone know if this will flash properly?
Sent from my GT-I9070 using xda app-developers app

Can someone fix my ****ing ZIP for me?

No matter what I do, it won't flash. Magisk will flash it but it does not function and creates two directories under /Magisk, Magisk-SSH? and Magisk-SSH??, and in TWRP it produces a new error no matter what I do. Even leaving the config.sh and module.prop completly alone and only adding the files to the directory the ****ing zip wont flash.
Download link
Pls upload to another site man,,can't download the file because of adfly..
Sent from my 2014813 using Tapatalk
try changing the permission to 755 instead of 777 for the binaries on your config.sh ... and zip it on sub folder of your module, dont do it on the root folder ... it wont be flashed that way bcoz wrong root folder. attached some ss for how to zip it.
Code:
set_perm $MODPATH/system/bin/scp 0 2000 0755 u:object_r:zygote_exec:s0
set_perm <filename> <owner> <group> <permission> <contexts> (default: u:object_r:system_file:s0)
or
set_perm_recursive $MODPATH/system/bin 0 0 0755 0755
set_perm_recursive <dirname> <owner> <group> <dirpermission> <filepermission> <contexts> (default: u:object_r:system_file:s0)
hope that help :good:
adewisman said:
try changing the permission to 755 instead of 777 for the binaries on your config.sh ... and zip it on sub folder of your module, dont do it on the root folder ... it wont be flashed that way bcoz wrong root folder. attached some ss for how to zip it.
Code:
set_perm $MODPATH/system/bin/scp 0 2000 0755 u:object_r:zygote_exec:s0
set_perm <filename> <owner> <group> <permission> <contexts> (default: u:object_r:system_file:s0)
or
set_perm_recursive $MODPATH/system/bin 0 0 0755 0755
set_perm_recursive <dirname> <owner> <group> <dirpermission> <filepermission> <contexts> (default: u:object_r:system_file:s0)
hope that help :good:
Click to expand...
Click to collapse
I dropped the project because the binaries don't work anyway. I placed them into /Magisk manually (basically doing the zip's job manually) along with the module.prop but calling them produces various errors. I cross-compiled them for ARM64 so they are the correct architecture.

Categories

Resources