Google Apps add-on : update-script question - Nexus One Q&A, Help & Troubleshooting

Hi all,
I was looking in the google apps addon package used with Cynogens ROMs and specifically I was looking at the update-script contained in the zip file
assert compatible_with("0.2") == "true"
assert getprop("ro.product.device") == "passion" || getprop("ro.build.product") == "passion" || getprop("ro.product.device") == "sholes" || getprop("ro.build.product") == "sholes"
show_progress 0.1 0
copy_dir PACKAGE:system SYSTEM:
show_progress 0.6 0
delete SYSTEM:app/GoogleSearch.apk
delete SYSTEM:app/LatinIME.apk
delete SYSTEM:app/Provision.apk
show_progress 0.1 10
Can someone explain to me why at the end after installing the addon the script deletes those 3 apks from the system/app folder?
thanks
N

Anyone any help???
Mods: this was for the dev. section. In generic q&a seems unrealistic I will ever get an answer since the question is on the update script !!??!!

188 views and no one that can answer this question?
little help here?
Mod, please can you move this to dev. as it obviously is about the update-script ????!!??

Those are placeholder files that Cyanogen includes to make your system boot-able *WITHOUT* the Google pieces. However, with the Google pieces installed they are no longer needed - and can cause incompatibilities in the operating system. Thus, this ensures that they are removed. If you had the Google pieces installed prior to installing Cyanogen's Mod, his backuptool.sh would remove these files.. but, only if the correct Google files are found on your system:
app/VoiceSearchWithKeyboard.apk <-LatinIME.apk
app/SetupWizard.apk <-Provision.apk
app/EnhancedGoogleSearchProvider.apk <-GoogleSearch.apk
if you compare the /system/app directories of the two updates you will see that the three files the Addon is looking to remove are only included in Cyanogen's update, and not in the Google Addon, and vice-versa on the other three files.

hi daveid,
thanks for taking the time to explain this to me.
makes sense since cyano says his rom can be use with or without the google addons.
thanks again!
N

Related

[Q] Unable to Flash radio

Hi I am trying to Install CM6 on my T-Mobile HTC G1
I tried 3 time from the scratch but same result, i am getting below error
E: Failure at line 2:
assert getprop("ro.product.device") == "dream" || getprop("ro.build.product") == "dream"
I tried to find solution on google but no help, as far as I understand problem is with update script at path
<dream_magic.radio-2.22.23.02-signed.zip\META-INF\com\google\ >
Current script is
assert compatible_with("0.2") == "true"
assert getprop("ro.product.device") == "dream" || getprop("ro.build.product") == "dream"
show_progress 0.5 0
write_radio_image PACKAGE:radio.img
show_progress 0.5 10
can someone help me with correct update script.
Thanks!
DroidClock said:
Hi I am trying to Install CM6 on my T-Mobile HTC G1
I tried 3 time from the scratch but same result, i am getting below error
E: Failure at line 2:
assert getprop("ro.product.device") == "dream" || getprop("ro.build.product") == "dream"
I tried to find solution on google but no help, as far as I understand problem is with update script at path
<dream_magic.radio-2.22.23.02-signed.zip\META-INF\com\google\ >
Current script is
assert compatible_with("0.2") == "true"
assert getprop("ro.product.device") == "dream" || getprop("ro.build.product") == "dream"
show_progress 0.5 0
write_radio_image PACKAGE:radio.img
show_progress 0.5 10
can someone help me with correct update script.
Thanks!
Click to expand...
Click to collapse
I have checked I am already on radio 2_22_19_26I
Is that mean I can directly flash Danger Spl and Flash Generic G1 rom skipping Radio flash???
Help me here please

[4.3]Cyanogenmod 10.2[ALPHA-1] refix

the rom's updater-script is wrong ,must be refix it
assert(getprop("ro.product.device") == "**tass" || getprop("ro.product.product") == "**5570") maybe install
but the rom is very lag ,and camera /sdcard doesn't work
this is the link :http://forum.xda-developers.com/showthread.php?t=2423901

[Q] LT25i (XV) flashing error - "this is a mint"

Hi guys, please take a minute to help a fellow Sony fan out...
I managed to unlock bootloader via flashtool, root and install recovery as on istux's guide http://forum.xda-developers.com/showthread.php?t=2798411
But when I try to flash DirtyUnicorns_Unofficial_Tsubabsa_build2, it tells me..."This package is for LT25i Tsubasa devices; this is a mint."!
I don't know if this is related at all, but when I try to wipe the cache, it says "failed to unmount /cache"
Why does it think it is a "mint" (whatever that is) and how do I fix this?
From being stuck in recovery after wiping data, the only thing I can do is flash stock 4.3 FTF (9.2.A.2.5) again using flashtool. Is there a better way out of this?
swe.rider said:
Hi guys, please take a minute to help a fellow Sony fan out...
I managed to unlock bootloader via flashtool, root and install recovery as on istux's guide http://forum.xda-developers.com/showthread.php?t=2798411
But when I try to flash DirtyUnicorns_Unofficial_Tsubabsa_build2, it tells me..."This package is for LT25i Tsubasa devices; this is a mint."!
I don't know if this is related at all, but when I try to wipe the cache, it says "failed to unmount /cache"
Why does it think it is a "mint" (whatever that is) and how do I fix this?
From being stuck in recovery after wiping data, the only thing I can do is flash stock 4.3 FTF (9.2.A.2.5) again using flashtool. Is there a better way out of this?
Click to expand...
Click to collapse
If you're completely sure you're installing the correct ROM for your phone, then you need to use 7zip to open the ROM zip file (Open Archive) and navigate to "\META-INF\com\google\android\" and extract the "updater-script" file. Edit it with Notepad++ (or use Linux, do not use Windows notepad) and delete the first command:
Code:
assert(getprop("ro.product.device") == "lt29i" || getprop("ro.build.product") == "lt29i" ||
getprop("ro.product.device") == "hayabusa" || getprop("ro.build.product") == "hayabusa" ||
getprop("ro.product.device") == "LT29i" || getprop("ro.build.product") == "LT29i" || abort("This package is for \"lt29i,hayabusa,LT29i\" devices; this is a \"" + getprop("ro.product.device") + "\"."););
The example above is from a ROM for a TX. Yours should similar.
The first line of the script should start with:
Code:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/System", "/system");
Save the file and re-add it to the ROM zip file, replacing the previous updater-script, then you can connect your phone to your PC and use ADB to push the file back to the sdcard on the phone.
Also, if you only wiped /data, then you could just reboot, wait for Android to start up and copy the file normally. Then reboot back to recovery and reflash. On the other hand, if you wiped /system, ADB is your only option, unless you want to reflash a stock FTF.
I'm pretty sure this is because the command checks the phones build.prop to see if the device/product matches certain strings that identify your device, but apparently they don't always match.
Antiga Prime said:
If you're completely sure you're installing the correct ROM for your phone, then you need to use 7zip to open the ROM zip file (Open Archive) and navigate to "\META-INF\com\google\android\" and extract the "updater-script" file. Edit it with Notepad++ (or use Linux, do not use Windows notepad) and delete the first command:
Code:
assert(getprop("ro.product.device") == "lt29i" || getprop("ro.build.product") == "lt29i" ||
getprop("ro.product.device") == "hayabusa" || getprop("ro.build.product") == "hayabusa" ||
getprop("ro.product.device") == "LT29i" || getprop("ro.build.product") == "LT29i" || abort("This package is for \"lt29i,hayabusa,LT29i\" devices; this is a \"" + getprop("ro.product.device") + "\"."););
The example above is from a ROM for a TX. Yours should similar.
The first line of the script should start with:
Code:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/System", "/system");
Save the file and re-add it to the ROM zip file, replacing the previous updater-script, then you can connect your phone to your PC and use ADB to push the file back to the sdcard on the phone.
Also, if you only wiped /data, then you could just reboot, wait for Android to start up and copy the file normally. Then reboot back to recovery and reflash. On the other hand, if you wiped /system, ADB is your only option, unless you want to reflash a stock FTF.
I'm pretty sure this is because the command checks the phones build.prop to see if the device/product matches certain strings that identify your device, but apparently they don't always match.
Click to expand...
Click to collapse
Antiga, thank you very much, I actually succeeded by following your advice from post #10 here http://forum.xda-developers.com/showthread.php?t=2581336
I wiped everything but just restored a nandroid backup I made in recovery before wiping and that worked when i needed to copy different files after things went wrong with the flash.
Would there be any problem caused by not being able to unmount /cache during wiping?
swe.rider said:
Antiga, thank you very much, I actually succeeded by following your advice from post #10 here http://forum.xda-developers.com/showthread.php?t=2581336
I wiped everything but just restored a nandroid backup I made in recovery before wiping and that worked when i needed to copy different files after things went wrong with the flash.
Would there be any problem caused by not being able to unmount /cache during wiping?
Click to expand...
Click to collapse
You're welcome. It's happened to me before, never known why, but after flashing a different ROM you can always try wiping /cache again; it generally works.

[FAQ]Recovery recognizing "tsubasa" as "mint

Well as I see people asking this, I thought I'll just make a thread about this issue which is pretty simple to solve.
The reason why you got this issue may be caused by flashing some Roms( such as installing Rizal's Roms' CWM Backup versions )
If you accidentally brick your device, please don't blame on me, as it's you deciding to do this.
Well anyway, here's how you get rid of this:
1. Open your Rom's Zip file with Winrar or 7zip (or something similar)
2. Navigate to "[Your Rom Name].zip\META-INF\com\google\android" and you'll see a file called "updater-script"
3. Open the file with any file editor such as Notepad++ and remove the following lines
Code:
assert(getprop("ro.product.device") == "LT25i" ||
getprop("ro.build.product") == "LT25i" ||
getprop("ro.product.device") == "tsubasa" ||
getprop("ro.build.product") == "tsubasa" ||
abort("This package is for device: LT25i,tsubasa; this device is " + getprop("ro.product.device") + "."););
4. Save the file and close the editor, and the zip manager should automatically save the file back into the zip
5. Now flash the Rom and flash it, and it should work now.
P.S. You don't have to do this to every Rom you're going to flash, just do this when the problem occurs.

this package is for santoni devices, this a "" device??

i am new to custom rom flashing and while flashing lineage OS to my redmi 4 (indian variant) it came up with this error. this package is for santoni deivces, this is a "" device. can someone help me with that? thanks
if are you definitely sure that you have redmi 4x device then unzip archive, find META-INF/com/google/android/updater-script, delete first string which contains ` "assert(getprop("ro.product.device") == "santoni" || getprop("ro.build.product") == "santoni" || abort("E3004: This package is for device: santoni; this device is " + getprop("ro.product.device") + ".");" `
ucollider said:
if are you definitely sure that you have redmi 4x device then unzip archive, find META-INF/com/google/android/updater-script, delete first string which contains ` "assert(getprop("ro.product.device") == "santoni" || getprop("ro.build.product") == "santoni" || abort("E3004: This package is for device: santoni; this device is " + getprop("ro.product.device") + ".");" `
Click to expand...
Click to collapse
can i just simply unzip the rom, do the modifications as told by you and then again simply zip it. Will the zip be flashable then?
Dcentvlogger said:
can i just simply unzip the rom, do the modifications as told by you and then again simply zip it. Will the zip be flashable then?
Click to expand...
Click to collapse
Of course, besides it just code prevention to make sure you had the exact firmware. Just remove those line if you sure your phone is redmi 4x (santoni), it's safe and it'll work like a charm.

Categories

Resources