[Q] ne1 having problems Flashing zips - Nexus 10 Q&A, Help & Troubleshooting

I have done my fare share of writing updater_scripts. For some reason i can not get twrp or cmw to flash a zip. I get no errors, it prints verything on the screen from th ui_prints and twrp gives me a sucessfull but when i reboot the cnages iv made are not there. i have attached 2 scripts tha i have tried so can someone take a look, but i really dont think my script is the problem. thanks to anyone that can help.

Not sure why... your scripts look fine... but could you try this mount instead...
Code:
mount("ext4", "EMMC", "/dev/block/platform/dw_mmc.0/by-name/system", "/system");

craigacgomez said:
Not sure why... your scripts look fine... but could you try this mount instead...
Code:
mount("ext4", "EMMC", "/dev/block/platform/dw_mmc.0/by-name/system", "/system");
Click to expand...
Click to collapse
thanks for the input! but no such luck on that one either. im at a loss on this one. It has to have something to do with the mounting, because the delete_recursive("/system/app"); is not even working.

Related

[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....

[REQ] CWM Flashable templates for Framework-res.apk and SystemUI.apk

I have been experiencing alot difficulties while pushing Framework-res.apk and SystemUI.apk in my Stock deodexed rom as well as Custom Roms. It always end up in a bootloop.
Can somebody make updater-script for both files separately and make a flashable zip for them, so that whenever I have to flash these 2 files, I just replace them in those zips and I'm ready to go?
I tried learning editing Updater-script, but I always ended up in some errors.
Please Help.
I would really appreciate it, I know its just a 10 minutes work for some people here. :fingers-crossed:
Please Help me
Code:
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("app", "/system/app");
run_program("/sbin/busybox", "umount", "/system");
systemui above
framework-res below
Code:
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("framework", "/system/framework");
run_program("/sbin/busybox", "umount", "/system");
not 10mins,
less than a minute
Hey thank you!
Thank u for these codes,
What about Update-binary in META-INF folder? Is it same for every flashable zip? Can I use these codes on both Stock and custom roms?
varun90rulz said:
Thank u for these codes,
What about Update-binary in META-INF folder? Is it same for every flashable zip? Can I use these codes on both Stock and custom roms?
Click to expand...
Click to collapse
open updater-script with notepad and paste these codes,
the update-binary is universal so yea
deathnotice01 said:
open updater-script with notepad and paste these codes,
the update-binary is universal so yea
Click to expand...
Click to collapse
Thanks! I'll just check this and will ask if anything goes wrong! Thanks a lot. :good:
deathnotice01 said:
open updater-script with notepad and paste these codes,
the update-binary is universal so yea
Click to expand...
Click to collapse
i thought editing it in normal notepad will cause problems
status 0?
status 6?
status 7 or something?
74M3NUMB3RS said:
i thought editing it in normal notepad will cause problems
status 0?
status 6?
status 7 or something?
Click to expand...
Click to collapse
works fine with me
I have heard that too
74M3NUMB3RS said:
i thought editing it in normal notepad will cause problems
status 0?
status 6?
status 7 or something?
Click to expand...
Click to collapse
I read somewhere opening in Notepad causes trouble, I use Notepad++ for this purpose.
I have a one question:
what using this code "/sbin/busybox"
varun90rulz said:
I read somewhere opening in Notepad causes trouble, I use Notepad++ for this purpose.
Click to expand...
Click to collapse
Note pad ++ updated would be more appropriate to use.
varun90rulz said:
I have been experiencing alot difficulties while pushing Framework-res.apk and SystemUI.apk in my Stock deodexed rom as well as Custom Roms. It always end up in a bootloop.
Can somebody make updater-script for both files separately and make a flashable zip for them, so that whenever I have to flash these 2 files, I just replace them in those zips and I'm ready to go?
I tried learning editing Updater-script, but I always ended up in some errors.
Please Help.
I would really appreciate it, I know its just a 10 minutes work for some people here. :fingers-crossed:
Please Help me
Click to expand...
Click to collapse
Follow these steps :
1. If you have a custom rom then get its updater-script,open it with notepad++
2. Find & copy this line mount("ext4", "EMMC", "/dev/block/@@@@@", "/system");
Note: @@@@@ will be something different for your device
3.FINAL STEPS MAKE YOUR UPDATER-SCRIPT:
Write these lines
mount("ext4", "EMMC", "/dev/block/@@@@@", "/system");
delete("/system/app/framework-res.apk");
package_extract_dir("system", "/system");
set_perm_recursive(0, 0, 0755, 0644, "/system/framework");
unmount("/system");
That's it & u r done.
Press the Thanks button if i helped you :good:
& Lemme know for any queries

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.

Help with install script

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

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