Help with install script - Samsung Galaxy J5 Questions & Answers

I have a problem in my install script and idk how to fix it to flash integrated kernel image from zip to rom. On my older galaxy mini 2 , this method worked. but now it fail. Maybe samsung has changed something, so please help me to figure out how to solve it. Here is how the flashing lines are looking:
Code:
mount("/dev/block/mmcblk0p16", "/dev/block/mmcblk0p15", "/dev/block/mmcblk0p3", "/system");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "/dev/block/mmcblk0p16"),
delete("/tmp/boot.img"));
File gets copied on tmp but recovery log says: assert failed: write_raw_image.... ERROR 7

You're maybe using the wrong update-binary.
Check if you have the right zip for your model.

The right zip? I want to create one. And where to choose that right zip from? Can you link or upload the right updater binary ?
Sent from my SM-J500F using XDA-Developers mobile app

Related

[Q] How to create a zip compatible with CWR v3.0.0.5.

Hello.
For several days, I tried to create a "zip file" you can install via Clockwork Recovery 3.0.0.5. I tried to use "Update-Zip-Packager" but when I go to install the zip CWR tells me that the update is not good for the 3.0.0.5 version of Clockwork Recovery. Is there any software similar to Zip-Update-Packager creates update.zip compatible with version 3.0.0.5?
I want to create this zip only to delete some files that are always present in "system / app" so as not remove them manually each time.
I do the following steps:
1. Create a folder named Update.
2. Create "Update\META-INF\com\google\android\updater-script" in wich I write the following lines using Notepad:
ui_print("CLEANER");ui_print("-----------");mount("MTD", "system", "/system");show_progress(1, 10);delete("/system/app/app1.apk");delete("/system/app/app2.apk");delete("/system/app/app3.apk");show_progress(0.200000, 10);unmount("/system");ui_print("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
where am I wrong?
Many thanks ..
PS: Sorry for my bad English...
help me please...
You are a Windows guy, Linux doesn't like Windows NOTEPAD.
You must use Linux friendly Text Editor.
Try Notepad++
Make sure you have update-binary still in the folder where your update-script is.
Code:
ui_print("CLEANER");
ui_print("-----------");
mount("MTD", "system", "/system");
show_progress(1, 10);
delete("/system/app/app1.apk");
delete("/system/app/app2.apk");
delete("/system/app/app3.apk");
show_progress(0.200000, 10);
unmount("/system");
ui_print("=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-");
Looks okay to me, but you do have to keep note, the code looks gibberish to me.
Uh.. there is a Update-Zip-Packager?!?? "-_____-
sigh, I was typing it in notepad++

[Q] updater-script in CWM zip rom....

I am trying to edit the updater script in NexusHD2 Gingerbread latest version so it will flash the kernel properly with cLK without having to install a second zip for kernel after installing rom zip.... here is what I do.... In the updater-script that's in nexushd2, i take these lines:
ui_print("Copying zImage and initrd.gz to boot...");
package_extract_dir("boot", "/boot");
And replace them with this:
ui_print("installing Kernel");
assert(package_extract_file("boot.img", "/tmp/boot.img"),
write_raw_image("/tmp/boot.img", "boot"),
delete("/tmp/boot.img"));
And then I delete the /boot directory in the nexushd2 zip file and put in the boot.img from the kernel zip.... I get error in .zip, status 6 when I try to install the finished zip file.... anyone know what I can do to fix this? Thanks in advance for any help.....oh yea, I also tried the boot.img from my clockwork backup.... and if it matters.... im using wordpad for windows to do this....thanks in advance for any help....my thoughts were that its maybe something to do with the/tmp not being mounted..... but the script I took the lines from to extract and mount the boot.img was from hyperdroid rom... and it didn't have anything in that script about mounting /tmp that I saw.....
EDIT: Just tried to do the same in jedit instead of wordpad and had the same result.... does updater-binary file need to also be changed? If so, how do I do that? If I can't do it with windows, I also have latest ubuntu.....
here's updater-script if you want to have a look
https://gitorious.org/android-leo-r...META-INF/com/google/android/updater-script.lk
Thanks for the reply.... can you verify this is what I did wrong, I can't try it at the moment....
format("yaffs2", "MTD", "boot");
mount("yaffs2", "MTD", "boot", "/boot");
that's what I had in my updater script..... but I need to take out yaffs 2 on both lines so it looks like this:
format("MTD", "boot");
mount("MTD", "boot", "/boot");
?? From what I can see on yours, I can take out the yaffs2 line on every format and mount option?
diesburg said:
Thanks for the reply.... can you verify this is what I did wrong, I can't try it at the moment....
format("yaffs2", "MTD", "boot");
mount("yaffs2", "MTD", "boot", "/boot");
that's what I had in my updater script..... but I need to take out yaffs 2 on both lines so it looks like this:
format("MTD", "boot");
mount("MTD", "boot", "/boot");
?? From what I can see on yours, I can take out the yaffs2 line on every format and mount option?
Click to expand...
Click to collapse
It depends on the update-script you are using, so I presume, that would be the case.
give it a go, and see what happens
I'm using update-script and update-binary(if update-binary would make any difference) that was already in the nexushd2 roms and just editing them to do boot.img instead of initrd and zimage from the /boot directory.... but I will try here in a while and see how it works out and post results....
I tried quite a few different things based on the changes I mentioned above and nothings works.... I think I give up....lol... maybe theres a good reason why tytung doesn't make a separate one for cLK.....maybe it's a ***** to do with his rom for some reason....lol
diesburg said:
I tried quite a few different things based on the changes I mentioned above and nothings works.... I think I give up....lol... maybe theres a good reason why tytung doesn't make a separate one for cLK.....maybe it's a ***** to do with his rom for some reason....lol
Click to expand...
Click to collapse
No technical reason.
It will waste my time to upload two versions for MAGLDR and cLK.
And it will also waste people's time to download two big files if they want to try both bootloaders.
Flashing two zip files is completely not a problem.
The attached is modified META-INF for cLK.
Thanks for sharing the meta inf files... I know it's not a big deal to flash 2 files.... but I got nothing but time on my days off from work... so I figured what the hell, why not make one of my hd'2 favorite roms just a little more convenient to flash.... I loaded it with a few apps on the system partition... at least my favorite apps that work being in system/apps without force closing..... and next im gonna do data/apps in the zip file also... so when I install the zip, it's all already there for me besides account sign-ins.....I know there's CWM for all that restoring apps.... I just like the idea of having a zip with everything I like already in it...lol..and im not worried about magldr as ill never be switching back to it.... unless of course they can get super mario brothers 3 instead of tetris in the bootloader.... lmao... anyways, thanks for the help tytung....

[q] status 7 : Rom won't flash

I'm trying to port a 4.3 rom from Galaxy S3 to Nexus 4, but when I finally try to flash the rom I'm given the error Status 7 (symlink):
symlink: some symlinks failed
E:Error in /data/media/0/port.zip
(Status 7)
Instalation aborted.
I took the error log from CWM and here is what is said:
minzip: Process function elected to fail (in inflate)
minzip: Error extracting "/system/lib/libSpenSkia.so"
failed to mkdir /system/etc/firmware/wcd9310: No space left on device
symlink: failed to symlink /system/etc/firmware/wcd9310 to /data/misc/audio/mbhc.bin : making parents failed
symlink: failed to symlink /system/etc/firmware/wcd9310 to /data/misc/audio/mbhc.bin : No such file or directory
script aborted: symlink: some symlinks failed
symlink: some symlinks failed
E:Error in data/media/0/port.zip (that's my rom's name)
(Status 7)
Instalation aborted
I:using /data/media for /sdcard/0/clockworkmod/ .recovery_version
What should I do?
Are you using the latest CWM? You could also try TWRP to flash the rom.
I've heard twrp doesnt work with custom roms
Sent from my Nexus 4 using XDA Premium 4 mobile app
Xintorrim said:
I've heard twrp doesnt work with custom roms
Sent from my Nexus 4 using XDA Premium 4 mobile app
Click to expand...
Click to collapse
All I have used on my N4 is TWRP and I've had no problems so far. I have tried Slim, Experience, Asylum, etc.
I've tried twrp but still no success. It must be a problem inside the rom
Sent from my Nexus 4 using XDA Premium 4 mobile app
As a test, try TWRP with another 4.4 custom rom.
My custom ROM won't flash with CWM nor with TWRP. Tried to flash it using another custom ROM and it didn't work too. I really believe there's something wrong with my custom ROM or with the device itself. In another thread a user told me that "Like the error said. NO SPACE LEFT. So, increase the system Partition or delete some APK in the rom". I guess I can't delete any apk's and I don't know how to increase system Partition. Moreover, I don't know if that would even work. I'd like someone to help me with a solution based on the error log I posted before.
Flash first CyanogenMOD, then flash any other ROM and use TWRP for it!
Would it really make any difference?
Sent from my Nexus 4 using XDA Premium 4 mobile app
Xintorrim said:
I'm trying to port a 4.3 rom from Galaxy S3 to Nexus 4, but when I finally try to flash the rom I'm given the error Status 7 (symlink):
symlink: some symlinks failed
E:Error in /data/media/0/port.zip
(Status 7)
Instalation aborted.
I took the error log from CWM and here is what is said:
minzip: Process function elected to fail (in inflate)
minzip: Error extracting "/system/lib/libSpenSkia.so"
failed to mkdir /system/etc/firmware/wcd9310: No space left on device
symlink: failed to symlink /system/etc/firmware/wcd9310 to /data/misc/audio/mbhc.bin : making parents failed
symlink: failed to symlink /system/etc/firmware/wcd9310 to /data/misc/audio/mbhc.bin : No such file or directory
script aborted: symlink: some symlinks failed
symlink: some symlinks failed
E:Error in data/media/0/port.zip (that's my rom's name)
(Status 7)
Instalation aborted
I:using /data/media for /sdcard/0/clockworkmod/ .recovery_version
What should I do?
Click to expand...
Click to collapse
Had this problem with my old xperia mini and this was the solution : (not sure it'll work, but give it a shot if you want to take the risk)
Download notepad ++
Open up the updater script and delete the first two lines I think.
I'm not a 100% sure this was all so best,
SEARCH FOR STATUS 7 ERROR IN THE XPERIA MINI FORUMS. YOU'LL GET YOUR ANSWER THERE.
Sent from my Nexus 4
Tried to do what you guys said but still no results. Here are logcat and the recovery.log
http://d-h.st/o7w recovery
http://d-h.st/AgE logcat
Sent from my Nexus 4 using XDA Premium 4 mobile app

updater-script mounting issue

Okay so I am working on a custom rom and my first few attempts didn't copy anything into the /system so I decided to add the mount system into my updater-script-
I added the mount to system:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
but after flashing and grabbing a copy of the recovery.log I get the following error:
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/userdata at /data: Device or resource busy
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/system at /system: Device or resource busy
so I am wondering if something is wrong with the mount command or if something else could be wrong?
Any assistance will be appreciated
XxZombiePikachu said:
Okay so I am working on a custom rom and my first few attempts didn't copy anything into the /system so I decided to add the mount system into my updater-script-
I added the mount to system:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
but after flashing and grabbing a copy of the recovery.log I get the following error:
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/userdata at /data: Device or resource busy
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/system at /system: Device or resource busy
so I am wondering if something is wrong with the mount command or if something else could be wrong?
Any assistance will be appreciated
Click to expand...
Click to collapse
I'v got the same problem i tried to copy other roms updater scrips put it does not work too
XxZombiePikachu said:
Okay so I am working on a custom rom and my first few attempts didn't copy anything into the /system so I decided to add the mount system into my updater-script-
I added the mount to system:
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/userdata", "/data");
mount("ext4", "EMMC", "/dev/block/platform/msm_sdcc.1/by-name/system", "/system");
but after flashing and grabbing a copy of the recovery.log I get the following error:
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/userdata at /data: Device or resource busy
mount: failed to mount /dev/block/platform/msm_sdcc.1/by-name/system at /system: Device or resource busy
so I am wondering if something is wrong with the mount command or if something else could be wrong?
Any assistance will be appreciated
Click to expand...
Click to collapse
These commands are correct actually... But are you following them with:
delete_recursive("/system");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
If you use the updater-script from my stock ATT rom as an example it should boot for you...
Also you need to make sure you have Loki in the script and rom itself...
VECTUS said:
These commands are correct actually... But are you following them with:
delete_recursive("/system");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
If you use the updater-script from my stock ATT rom as an example it should boot for you...
Also you need to make sure you have Loki in the script and rom itself...
Click to expand...
Click to collapse
I definitely have the delete recursive system followed by the extract system/data but I don't have the loki folder/commands for updater-script mainly because I don't know where to get them from/what is the command to run, when I get home I'll take a look at your updater-script and do what needs to be done(I don't want to be using other peoples scripts or files because I know some can get rather overprotective, so far I've been getting help from xdabbeb/bigfau but I don't want to have to ask for every little detail) thanks for the tip I'll update if anything good or bad happens
Sent from my potato d800
XxZombiePikachu said:
I definitely have the delete recursive system followed by the extract system/data but I don't have the loki folder/commands for updater-script mainly because I don't know where to get them from/what is the command to run, when I get home I'll take a look at your updater-script and do what needs to be done(I don't want to be using other peoples scripts or files because I know some can get rather overprotective, so far I've been getting help from xdabbeb/bigfau but I don't want to have to ask for every little detail) thanks for the tip I'll update if anything good or bad happens
Sent from my potato d800
Click to expand...
Click to collapse
Anything you want to use in that stock ROM is free to use. That's why I made it. The ROM includes loki with correct file structure. Loki install commands are at the end of the udater script in the ROM...
Edit. Lol I just remembered I threw in the data folder in the stock ROM as a place holder for apps etc. If you use the data command I'm your updater script you will need a data folder in the ROM but the data folder is not a must have for your ROM because it will be created anyway... The data folder is an old trick to load updated apks or system app Apks can be moved there to create more space for system/apps...
VECTUS said:
Anything you want to use in that stock ROM is free to use. That's why I made it. The ROM includes loki with correct file structure. Loki install commands are at the end of the udater script in the ROM...
Edit. Lol I just remembered I threw in the data folder in the stock ROM as a place holder for apps etc. If you use the data command I'm your updater script you will need a data folder in the ROM but the data folder is not a must have for your ROM because it will be created anyway... The data folder is an old trick to load updated apks or system app Apks can be moved there to create more space for system/apps...
Click to expand...
Click to collapse
The boot.img in your Rom is the 10d boot?
Yea I know about the data folder and I have it in to include some apps/others stuff and remove some of the system apps and use them as normal apps for greenify
Sent from my potato d800
hey @VECTUS after getting loki working(tested with some test splitwindow stuff I'm working on and in case you are wondering one of them force closes and renders the phone unusable while the other works but no apps show up so work in progress), I rebuilt my custom rom with new stuff(loki/kernel) and still get the mount failed in recovery, everything after the mount fails does it stuff extracting data/system, symlink and loki/boot flash(I don't see the recursive system delete in recovery.log), if you would like to take a look at the script/log let me know and i'll share a link for now I am taking a break because everything else I have made works(custom bootanimation/mods/etc) but the rom is a no go, in the last 2 days I've flashed like 15 different test and nothing if you have any insight please let me know
p.s. in your updater script you use the set_metadata/set_metadata_recursive, when I tried it I got a syntax error and changing it to set_perm/set_perm_recursive eliminates the error but then I get the /system is not a valid uid bla, bla, bla any thoughts on this?
XxZombiePikachu said:
hey @VECTUS after getting loki working(tested with some test splitwindow stuff I'm working on and in case you are wondering one of them force closes and renders the phone unusable while the other works but no apps show up so work in progress), I rebuilt my custom rom with new stuff(loki/kernel) and still get the mount failed in recovery, everything after the mount fails does it stuff extracting data/system, symlink and loki/boot flash(I don't see the recursive system delete in recovery.log), if you would like to take a look at the script/log let me know and i'll share a link for now I am taking a break because everything else I have made works(custom bootanimation/mods/etc) but the rom is a no go, in the last 2 days I've flashed like 15 different test and nothing if you have any insight please let me know
p.s. in your updater script you use the set_metadata/set_metadata_recursive, when I tried it I got a syntax error and changing it to set_perm/set_perm_recursive eliminates the error but then I get the /system is not a valid uid bla, bla, bla any thoughts on this?
Click to expand...
Click to collapse
Hey can you send me a link to your ROM? I have tomorrow to look at it... Just pm me...
I'm getting this exact same error with my SafeStrapped, GPE re-ROM'ed AT&T S4 (the one that Asurion had the nerve to replace a shattered first-gen Moto X of mine with) when attempting to take the Lollipop OTA from Joe-Tech's ROM... but then again, that's what you'd expect from a bootloader/recovery-locked device. Even so, it actually passes the verification stage... which is remarkable.

Pre Root

Hello, i wanted to know if anyone can help me. I am trying to include a pre rooted magisk but it gives me an error like this:
Failed to unmount /system: No such volume script aborted (no error message)
Updater process ended with ERROR: 7
Error installing zip file '/external_sd/Bootleggers Edited.zip'
my code (which i found online) to include magisk is this:
ui_print(" Installing Magisk Root...");
package_extract_dir("magisk", "/tmp/magisk");
run_program("/sbin/busybox", "unzip", "/tmp/magisk/Magisk-v18.1.zip", "META-INF/com/google/android/*", "-d", "/tmp/magisk");
run_program("sbin/busybox", "sh", "tmp/magisk/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/magisk/Magisk-v18.zip");
unmount("/system");
I personally think it's because of the busybox, i want to fix this. Just to confirm, I am editing the Bootlegger NOT to post online, it is just for me because i have to much spare time haha
Thanks in advance
RyzoModding said:
Hello, i wanted to know if anyone can help me. I am trying to include a pre rooted magisk but it gives me an error like this:
Failed to unmount /system: No such volume script aborted (no error message)
Updater process ended with ERROR: 7
Error installing zip file '/external_sd/Bootleggers Edited.zip'
my code (which i found online) to include magisk is this:
ui_print(" Installing Magisk Root...");
package_extract_dir("magisk", "/tmp/magisk");
run_program("/sbin/busybox", "unzip", "/tmp/magisk/Magisk-v18.1.zip", "META-INF/com/google/android/*", "-d", "/tmp/magisk");
run_program("sbin/busybox", "sh", "tmp/magisk/META-INF/com/google/android/update-binary", "dummy", "1", "/tmp/magisk/Magisk-v18.zip");
unmount("/system");
I personally think it's because of the busybox, i want to fix this. Just to confirm, I am editing the Bootlegger NOT to post online, it is just for me because i have to much spare time haha
Thanks in advance
Click to expand...
Click to collapse
I fixed the error by now but it doesn't root. So it completed flashing and after launching and installing magisk manager, it said it isn't rooted
RyzoModding said:
I fixed the error by now but it doesn't root. So it completed flashing and after launching and installing magisk manager, it said it isn't rooted
Click to expand...
Click to collapse
Why are you doing this exactly?
Is it not just easier to flash a Magisk zip than going through all this trouble?
Or is this something you are merely interested in trying out because you are interested?
garylawwd said:
Why are you doing this exactly?
Is it not just easier to flash a Magisk zip than going through all this trouble?
Or is this something you are merely interested in trying out because you are interested?
Click to expand...
Click to collapse
Yeah it is indeed because i'm intrested haha i make apps die pc with c# and stuff and wanted tot try this as Well, i always rooted the wat you said forum 3 years, nut i just wanted tot start editing Roms with pre root and edited apps and stuff haha
No idea... Go ahead ?

Categories

Resources