[ROM][THINK TANK] NOT WORKING Leaked Rom as Update.zip - Vibrant Q&A, Help & Troubleshooting

OK, so I've never tried to put a rom together using redbend_ua but figured now was a good time to figure it out... This is basically just the leaked things that would normally be flashed by odin but instead packaged so redbend_ua can flash them. This will flash correctly but it doesn't boot. I'm at a point where I'm stuck so if anyone wants to help out, here's what I have so far.
DO NOT FLASH THIS ROM!
http://www.multiupload.com/TUBMZ3FKH8
I also used redbend to try and restore all the bml partitions (12) and it looks like it's working but now the phone wont ever boot, it just ends up back in recovery...
Edit: I "may" have figured out how to enable download mode for devices that are hardware locked. Still need to tinker and make sure it's safe but nice to stumble on. If you don't mind risking damaging your phone, I believe that it's bml4 or bml5 from a good phone

I'm also thinking an alternative is to dd all the partitions on the phone since redbend can restore them. Maybe I could copy them all off and then rewrite the update to restore each partition? Any ideas? Anyone?

Anyone have any other ideas I could try?

Well, it was a terrible idea to overwrite all the partitions. Now the phone asks for my sim unlock as soon as it boots up... Gotta find a way around that now... It also reboots non stop... Tried to repartition in odin and use the original rom but didn't fix the problem. :O(

Not sure why your having issue with this?
My update.zip & kernel flashing works perfect.

This is for the new leaked rom. Instead of doing the traditional method I wanted to only use redbend_ua with the leaked files. You can flash everything fine through odin but if you use redbend to flash them it wont boot.

youneek said:
Edit: I have figured out how to enable download mode for devices that are hardware locked. When I flashed ms_guru's rom I had to use vol+down and power to get into download mode. I then flashed the recovery bml partition and I can do it by using the volume keys and usb again. Still need to tinker and make sure it's safe but nice to stumble on.
Click to expand...
Click to collapse
Whoa whoa this is a huge discovery. Could you explain that in a little more detail? If you got into download mode using the hardware then you didn't have a locked phone to begin with?

you'll be glad to know you did not destroy all your partitions.
1st of all, i doubt your updater-script actually works - you dont have the update-binary in your update.zip, which means there is no parser who can actually execute the update-script.
assuming im wrong and that your script actually works, it will reboot after the 1st redbend_ua (thats how redbend_ua works - it reboots when it finishes), and according to your script you flash the kernel partition first. so, just reflash the kernel partition again with a valid zImage to repair.

The zip posted in the thread is not my attempt to flash all the bml. It is my version that attempts to flash the new rom using redbend instead of ODIN. The version that has damaged my phone has login information so I wont post it. I can get the phone to boot now but it doesn't recognize any sim cards. redbend works perfectly fine the way I posted it, not sure what you are saying it's missing?
The current upgrade script looks more like the one below... It was a bad idea...
show_progress 0.1 0
copy_dir PACKAGE:redbend TMP:/redbend
set_perm 0 0 755 TMP:/redbend/redbend_ua
copy_dir PACKAGE:bml1 TMP:/bml1
run_program /tmp/redbend/redbend_ua restore /tmp/bml1/bml1.bak /dev/block/bml1
delete PACKAGE:big_update/bml1.bak
copy_dir PACKAGE:bml2 TMP:/bml2
run_program /tmp/redbend/redbend_ua restore /tmp/bml2/bml2.bak /dev/block/bml2
delete PACKAGE:big_update/bml2.bak
copy_dir PACKAGE:bml3 TMP:/bml3
run_program /tmp/redbend/redbend_ua restore /tmp/bml3/bml3.bak /dev/block/bml3
delete PACKAGE:big_update/bml3.bak
copy_dir PACKAGE:bml4 TMP:/bml4
run_program /tmp/redbend/redbend_ua restore /tmp/bml4/bml4.bak /dev/block/bml4
delete PACKAGE:big_update/bml4.bak
copy_dir PACKAGE:bml5 TMP:/bml5
run_program /tmp/redbend/redbend_ua restore /tmp/bml5/bml5.bak /dev/block/bml5
delete PACKAGE:big_update/bml5.bak
copy_dir PACKAGE:bml6 TMP:/bml6
run_program /tmp/redbend/redbend_ua restore /tmp/bml6/bml6.bak /dev/block/bml6
delete PACKAGE:big_update/bml6.bak
copy_dir PACKAGE:bml7 TMP:/bml7
run_program /tmp/redbend/redbend_ua restore /tmp/bml7/bml7.bak /dev/block/bml7
delete PACKAGE:big_update/bml7.bak
copy_dir PACKAGE:bml8 TMP:/bml8
run_program /tmp/redbend/redbend_ua restore /tmp/bml8/bml8.bak /dev/block/bml8
delete PACKAGE:big_update/bml8.bak
copy_dir PACKAGE:bml9 TMP:/bml9
run_program /tmp/redbend/redbend_ua restore /tmp/bml9/bml9.bak /dev/block/bml9
delete PACKAGE:big_update/bml9.bak
copy_dir PACKAGE:bml10 TMP:/bml10
run_program /tmp/redbend/redbend_ua restore /tmp/bml10/bml10.bak /dev/block/bml10
delete PACKAGE:big_update/bml19.bak
copy_dir PACKAGE:bml11 TMP:/bml11
run_program /tmp/redbend/redbend_ua restore /tmp/bml11/bml11.bak /dev/block/bml11
delete PACKAGE:big_update/bml11.bak
copy_dir PACKAGE:bml12 TMP:/bml12
run_program /tmp/redbend/redbend_ua restore /tmp/bml12/bml12.bak /dev/block/bml12
delete PACKAGE:big_update/bml12.bak
show_progress 0.1 10

i was referring to the missing 'update-binary' from the update.zip you posted. without this the script wont run.
regarding redbend - from what ive been told, after a successful flash, redbend reboots. in order to overcome this, one might use '/cache/ota/command' but it hasnt been tested yet (acording to supercurio). take a look here: http://forum.xda-developers.com/showpost.php?p=7906500
which partitions did you flash? if by accident you flashed bml3 then you might screwed your IMEI info holder. take a look here: http://forum.xda-developers.com/showthread.php?t=740218

and i dont agree - i dont think your hacking is such a bad idea
here is an idea i've been playing with lately:
Code:
ui_print("ROM flasher");
# copying needed files in ramdisk
package_extract_file("redbend_ua", "redbend_ua");
package_extract_file("boot.bin", "boot.bin");
package_extract_file("Sbl.bin", "Sbl.bin");
package_extract_file("param.lfs", "param.lfs");
package_extract_file("zImage", "zImage");
package_extract_file("factoryfs.rfs", "factoryfs.rfs");
package_extract_file("modem.bin", "modem.bin");
set_perm(0, 0, 0755, "redbend_ua");
# disable reboot
set_perm(0, 0, 0644, "/sbin/reboot");
ui_print("Flash Now !");
# running the flash operation
run_program("redbend_ua", "restore", "boot.bin", "/dev/block/bml1");
run_program("redbend_ua", "restore", "Sbl.bin", "/dev/block/bml4");
run_program("redbend_ua", "restore", "param.lfs", "/dev/block/bml6");
run_program("redbend_ua", "restore", "zImage", "/dev/block/bml7");
run_program("redbend_ua", "restore", "factoryfs.rfs", "/dev/block/bml9");
run_program("redbend_ua", "restore", "modem.bin", "/dev/block/bml12");
# reboot
set_perm(0, 0, 0755, "/sbin/reboot");
run_program("reboot", "now");

you can redbend the factory.rfs ( I can be Mistaken though ) as it's to big of a file for temp data space to be stored on.

I can get the phone to boot by flashing jp8, then jfd and then ji2 with partitions checked on jp8 and jfd. If I don't do all 3 things, the phone is toast. Now everything works but radio doesn't work. Looks like someone else may have run into this issue before... http://forum.xda-developers.com/showpost.php?p=7580835&postcount=24

youneek said:
I can get the phone to boot by flashing jp8, then jfd and then ji2 with partitions checked on jp8 and jfd. If I don't do all 3 things, the phone is toast. Now everything works but radio doesn't work. Looks like someone else may have run into this issue before... http://forum.xda-developers.com/showpost.php?p=7580835&postcount=24
Click to expand...
Click to collapse
very nice

eugene373 said:
you can redbend the factory.rfs ( I can be Mistaken though ) as it's to big of a file for temp data space to be stored on.
Click to expand...
Click to collapse
so maybe something like this:
Code:
ui_print("ROM flasher");
# mount the sdcard
mount("vfat", "/dev/block/mmcblk1", "/sdcard/sd");
# extract needed files in ramdisk
package_extract_file("redbend_ua", "redbend_ua");
set_perm(0, 0, 0755, "redbend_ua");
# disable reboot
set_perm(0, 0, 0644, "/sbin/reboot");
ui_print("Flash Now !");
# running the flash operation
run_program("redbend_ua", "restore", "/sdcard/sd/boot.bin", "/dev/block/bml1");
run_program("redbend_ua", "restore", "/sdcard/sd/Sbl.bin", "/dev/block/bml4");
run_program("redbend_ua", "restore", "/sdcard/sd/param.lfs", "/dev/block/bml6");
run_program("redbend_ua", "restore", "/sdcard/sd/zImage", "/dev/block/bml7");
run_program("redbend_ua", "restore", "/sdcard/sd/factoryfs.rfs", "/dev/block/bml9");
run_program("redbend_ua", "restore", "/sdcard/sd/modem.bin", "/dev/block/bml12");
# reboot
unmount("/sdcard/sd");
set_perm(0, 0, 0755, "/sbin/reboot");
run_program("reboot", "now");

z4ziggy said:
so maybe something like this:
Code:
ui_print("ROM flasher");
# mount the sdcard
mount("vfat", "/dev/block/mmcblk1", "/sdcard/sd");
# extract needed files in ramdisk
package_extract_file("redbend_ua", "redbend_ua");
set_perm(0, 0, 0755, "redbend_ua");
# disable reboot
set_perm(0, 0, 0644, "/sbin/reboot");
ui_print("Flash Now !");
# running the flash operation
run_program("redbend_ua", "restore", "/sdcard/sd/boot.bin", "/dev/block/bml1");
run_program("redbend_ua", "restore", "/sdcard/sd/Sbl.bin", "/dev/block/bml4");
run_program("redbend_ua", "restore", "/sdcard/sd/param.lfs", "/dev/block/bml6");
run_program("redbend_ua", "restore", "/sdcard/sd/zImage", "/dev/block/bml7");
run_program("redbend_ua", "restore", "/sdcard/sd/factoryfs.rfs", "/dev/block/bml9");
run_program("redbend_ua", "restore", "/sdcard/sd/modem.bin", "/dev/block/bml12");
# reboot
unmount("/sdcard/sd");
set_perm(0, 0, 0755, "/sbin/reboot");
run_program("reboot", "now");
Click to expand...
Click to collapse
in theory it should work, but not having ever tried it myself, idk to be honest.

eugene373 said:
you can redbend the factory.rfs ( I can be Mistaken though ) as it's to big of a file for temp data space to be stored on.
Click to expand...
Click to collapse
I can redbend the factory.rfs but it doesn't look like it fixes the issue. It's flashed during odin anyways. To get it to fit in tmp I had to delete everything else in tmp as part of the script.

My example zip that I posted appears to work correctly and flashes all the files that were in the new update. I'll try and make one that flashes the original since that has more files. Maybe that will work?
Is there a copy PACKAGE like copy PACKAGEriginal_rom/redbend_ua TMP:/original_rom/redbend_ua instead of copy_dir ?

trying to package the stock rom, i'll have an update in a second...

Ok so I made one with everything from the stock rom and after flashing says something like unable to mount sbl11... I'll mess with it more in the morning.
Sent from my Nexus One using XDA App

Related

D4 Update Zip Maker v1.2r1 - Make update.zip with some clicks!

Well, I was seeing that some times people just don't like to manually make scripts, so I had the iniciative to make this software, and after weeks of no sleep, here you go.. I hope you guys like it!
Features:
Installable, now you can choose any folder on PC for building zip! Removed since 1.2
Easily build update scripts for Edify script (Used by most of ClockWorkMod Recovery's)
Configuration for compression
MD5 Calculation for Created Zips
Read from file
Hotkeys
Smart functions (like automatic placeholders for empty system folders only)
Non-repeatable options prompt (for example, formatting data twice)
Device selection (we'll need devices plugins )
Manual edition
Default symlinks for toolbox and busybox
Easy use for starting users
More!...
Simple instructions
Please report bugs, and remember that you need to have java installed for run this, and if you're on windows vista/7, run as administrator
This is a little video when I was building last options, now it's more complete and fast
Cheers,
D4.
10.03.2012 - 1.2r1
Fixed a LOT of bugs
Non installable again
Added EVO 3D prebuilt
Revamped logo, and Customizable themes on options
15.08.2011 - 1.01r2
Fixed this bug, thanks to darkstep for reporting
Improved zip method
13.08.2011 - 1.01r1
Now installable!
Output folder now it's on installation folder
Selection of external folder
Read script from zip
Added more hotkeys
Custom zip comment
Fixed bugs
08.08.2011 - 1.0r2
Implemented location of working directory (now you can work out of update folder)
Fixed bugs
07.08.2011 - 1.0r1
Initial Release.
sweet tool thanks
Excellent job!!!. This app is excellent, now evertbody can make custom zips.
Simple instructions for everybody to build zips:
Our work Folder will be called /update by default, and Update zip maker will create this folder on startup (you can change working folder). Also Update Zip Maker zip this folder when you press "Build package". *NEW* Now you can change working folder!
Copy files to be modded on selected place (for example, if I want to mod /system/build.prop, I'd put build.prop inside /update/system/ folder, which will create Update Zip Maker software) //also something interesting, If you press "Extract system" button, Update Zip Maker will create /system folder, inside /update, and the same for data
Mount our filesystem (for build.prop case, then we need to mount system)
OPTIONAL: Add some notification to user, like "installing build.prop"
Extract files (for build.prop case pressing Extract system)
Set permissions(for build.prop case 0 0 0 644)
Push zip to phone, install and enjoy!
This program is the bestI think this will be usefull for all devices who use ClockWorkMod Recovery so it will be greate to have teseter's with difrend device
btw D4 you are rocking exelent work
EDIT: hey is there any option that you add permissions for framework, bin, xbin, system?
i think when you press Set permissions it pups up like it is but there would be extra space that you just chose perms like for framework
Code:
(0, 0, 0755, 0644, "/system/framework");
this is just my proposal
Eyama said:
This program is the bestI think this will be usefull for all devices who use ClockWorkMod Recovery so it will be greate to have teseter's with difrend device
btw D4 you are rocking exelent work
EDIT: hey is there any option that you add permissions for framework, bin, xbin, system?
i think when you press Set permissions it pups up like it is but there would be extra space that you just chose perms like for framework
Code:
(0, 0, 0755, 0644, "/system/framework");
this is just my proposal
Click to expand...
Click to collapse
for folders like framework you can use "set permissions recursively"
btw, guys, could you press "sumbit to portal", on the top of first post, so everybody can see this please?
Edit, new version it's up, enjoy!
This program like a charm ^^ ,very simple and useful
thanks alot D4 )
This program doesn't create "update-binary", it is a bug or it is volontary ?
EDIT : My mistake ! I didn't use this software correctly... Sorry It work like a charm
Very good job ! Great app
New version it's up!, now installable!, enjoy new features!.
excellent job D4
you're the man this is wery good
First Thanks for Great tool.It's small and easy.
I make an update.zip to install an application.Here is the script:
mount("yaffs2", "MTD", "userdata", "/data");
ui_print("Coping app");
package_extract_dir("data", "/data");
set_perm_recursive(0, 0, 0755, 0644, "/data/app");
Problem is when i open the application it Force close.
Please Help me.
nishan432 said:
First Thanks for Great tool.It's small and easy.
I make an update.zip to install an application.Here is the script:
mount("yaffs2", "MTD", "userdata", "/data");
ui_print("Coping app");
package_extract_dir("data", "/data");
set_perm_recursive(0, 0, 0755, 0644, "/data/app");
Problem is when i open the application it Force close.
Please Help me.
Click to expand...
Click to collapse
Are you sure problem isnt with the app?
also try
set_perm(0, 0 , 755, 644, "/data/app/yourapp.apk")
set_perm_recursive it's for whole folders!
why do i keep getting this message
i set my working folder inside the folder is system/etc/init.d/ and the script i wanna run,i have tryid everything
darkstep said:
why do i keep getting this message
i set my working folder inside the folder is system/etc/init.d/ and the script i wanna run,i have tryid everything
Click to expand...
Click to collapse
Working folder it's main folder, that means /somefolder, you're trying to use /somefolder/system/etc/init.d, then you just need to use main folder, that means, working folder it's where you can see "META-INF", "system", "data", etc...
omg not working for me im not that big of a newbie
darkstep said:
omg not working for me im not that big of a newbie
Click to expand...
Click to collapse
I don't understand you, can you tell me all steps you followed?, also did you run as admin?
edit: and btw, we still don't have your device prebuilt (htc wildfire), can you test with u20?.
i will make a video and post it on youtube later
here is the video,not that great quality,i was in a hurry
Do I need net framework to run this? I'm on XP SP3 and when I try to run nothing happens. Tried opening as admin, no dice.

Trying to make a flashable zip for TWRP

Hi all
I have been trying to make a flashable zip for my mod for jb 4.2.2.
I haven't really seen a detailed guide (exact steps) on how to achive this.... most of the threads are for CWM, the op of the thread attaches a sample.zip but its for CWM.
My problem is the update-binary. When I come to flash the file it give an error and quits the install.
My mod is to be written to the system folder.
Where do I get an update-binary file compatible with 4.2.2 if that is what I require.
I am willing to read/learn if there is a guide.
Thanks all
Sent from my GT-I9300 using xda app-developers app
Hey there mate,
try the following method:
http://teamuscellular.com/Forum/topic/3488-how-to-make-flashable-zip-files-for-cwm-or-twrp/
Thanks for the reply mate. Yeah have read this post but still need to find out about the update binary file.
Again thanks
Sent from my GT-I9300 using xda app-developers app
I'd recommend finding a flashable zip that already works for TWRP and replacing the contents of it with your mod.
That should work...
You could try this blank TWRP zip I use it for 4.1.2 so not sure if it will work with 4.2.2 as it stands.
If you rename it make sure you don't have any spaces in the naming format all words must be linked with a _ or - or something no gaps
Top work guys thanks alot for ya fast responses will try when I get in
Sent from my GT-I9300 using xda app-developers app
ag4751 said:
You could try this blank TWRP zip I use it for 4.1.2 so not sure if it will work with 4.2.2 as it stands.
If you rename it make sure you don't have any spaces in the naming format all words must be linked with a _ or - or something no gaps
Click to expand...
Click to collapse
i tried the attached file but as it starts its says
E: Error executing updater binary in zip
error flashing zip
this is on the internal memory.
this is the update script im using.... more that likely wrong...
ui_print("Lockscreen Clock Font");
show_progress(0.500000, 0);
ui_print("inspired by Delight CFW Font");
run_program("/sbin/busybox", "mount", "/system");
package_extract_dir("system", "/system");
set_perm_recursive 0 0 0755 0644 SYSTEM:app
unmount("/system");
ui_print("Reboot now!");
show_progress(1.000000, 0);
i took mikep99 advice and edited the script and put my info in
i busybox installed so am now a little stuck
Try with a ';' at the end of the set_perm line..
EDIT. remove the line completely and try.
EDIT2. That line should be:
set_perm_recursive(0, 0, 0755, 0644, "/system");
Sent from my GT-I9300 using xda app-developers app
mikep99 said:
Try with a ';' at the end of the set_perm line..
EDIT. remove the line completely and try.
EDIT2. That line should be:
set_perm_recursive(0, 0, 0755, 0644, "/system");
Sent from my GT-I9300 using xda app-developers app
Click to expand...
Click to collapse
thanks for replying
i just tried the editions to the file and it did install this time but sent me in to boot loop... all restored in 127 seconds.... love TWRP lol just wish my mod would flash.
i am trying to flash the keyguardwidget.apk to the /system/app folder.
the set_perm line has had different values ive notice in other flash files, are mine correct for what im trying to do.
Its just file permissions. that wont cause a boot loop in itself
Sent from my GT-I9300 using Tapatalk 2
i tryed adding a couple of more lines but still boot looped.... after it flashes it says "fix permissions... looks like you are not rooted"
i just dont want to edit someone elses work.
Boooooooom!!!! done it :silly:
For all..... this line DID send me in to boot loop
set_perm_recursive(0, 0, 0755, 0644, "/system");
it should be
set_perm(0, 0, 0644, "X");
were X is the directory in the zip
thanks to all for your help
pug1 said:
Boooooooom!!!! done it :silly:
For all..... this line DID send me in to boot loop
set_perm_recursive(0, 0, 0755, 0644, "/system");
it should be
set_perm(0, 0, 0644, "X");
were X is the directory in the zip
thanks to all for your help
Click to expand...
Click to collapse
odd
The only thing I can think is that:
0, is /system, Next 0 is app, And the 644 is to the app itself.
Had to look at another flash file (gs4 keyboard)
Sent from my GT-I9300 using xda app-developers app

Updater-Script Status 7 Error on Flash

Greetings XDA Forums! First time poster due to a very annoying problem I have with my Updater-Script.
Let me provide background knowledge:
I flashed the Sammy Deluxe Operation IVY Rom on my S4. It's essentially a 100% port of the S5 rom. It works better than my expectation and I was mentally blown away. However there was one annoyance. The hardware keys for the Context Menu and App Switcher were changed to emulate the S5 method. I didnt like it because now context menu is inaccessible. I tried doing the trick where I hold down the capacitive button to see if that works, but Im afraid that trick is a hardware coded trick that was only implemented on the S5. Not the S4 where its merely being emulated.
Adding to my state of annoyance, the ROM author wrote on the front page he wont change it back and dont even ask to change it back. Quote, he said this : "Please change it yourself. This is a S5 style ROM and I don’t understand what the problem is to adapt to new changings. If not, there is always the possibility for you to revert to the original softkey layout." I do understand why he would say that. Let me keep going.
I decided to fix it myself by visiting these 2 links
http://forum.xda-developers.com/showthread.php?t=2792460
This forum post shows you how to emulate the S5 Capacitive Context Menu Button on the S4 ( now the app switcher button )
So I did the reverse process of that. I decompiled the framework-res.apk, edited the boolean back to S4 Default ( which is what I want )
also set the key 139 ( Left Side Capacative ) back to Context Menu function. Recompiled the framework-res.apk.
The question is now is how to install my changes.
I made a flashable zip with updater script and everything. I followed this guide here so I can see the basic syntax and have an understanding of it.
http://forum.xda-developers.com/showthread.php?t=2377695
On doing so, the process of deleting the old framework-res.apk and putting the new one in works perfectly. However the command set_perm doesnt after copying the file to the /system/framework folder. During the flash everything else is good, but once it gets to set perm, Status 7 error is spewed by CWM and it says set_perm some changes failed
I double checked my parenthesis, my semi-colons, and my quotations.
I'm sure the problem is within the syntax of set_perm
Here is my code and I will attach it at the bottom as well for any additional help.
Code:
ui_print("framework-res fix by baboomerang");
ui_print("Mounting system...");
run_program("/sbin/busybox", "mount", "/system");
show_progress(0.150000, 1);
ui_print("Removing old copy of framework-res");
ui_print("Removing old copy of Generic");
delete("/system/framework/framework-res.apk");
delete("/system/usr/keylayout/Generic.kl");
ui_print("Installation...");
show_progress(0.250000, 2);
package_extract_file("/system/framework/framework-res.apk", "/system/framework");
package_extract_file("/system/usr/keylayout/Generic.kl", "/system/usr/keylayout");
ui_print("Patching done");
show_progress(0.476000, 3);
ui_print("Using CHMOD 644 or rw r r");
ui_print("Uploading Stage 1 to diagnose which set perm broken");
set_perm(0,0,0644, "/system/framework/framework-res.apk");
ui_print("Uploading Stage 2 To diagnose which set perm broken");
set_perm(0,0,0644, "/system/usr/keylayout/Generic.kl");
show_progress(0.789000, 4);
ui_print("Unmounting system...");
run_program("/sbin/busybox", "umount", "/system");
show_progress(0.930000, 5);
ui_print("Cleaning Up...");
show_progress(0.999999, 6);
ui_print("Installation done..........");
ui_print("Now your s4 hardware keys should be back to normal");
It works all the way up to the UI PRINT Uploading Stage 1 to diagnose which set perm broken. Then it just stops with status 7 error.
I am finally requesting assistance or guidance on where to fix this problem. or HOW TO to be accurate.
Hello
Copy your apk at the same level of your updater script and try that :
assert(package_extract_file("framework-res.apk", "/system/framework/framework-res.apk"));
Thanks for the help but...
cyrillem28410 said:
Hello
Copy your apk at the same level of your updater script and try that :
assert(package_extract_file("framework-res.apk", "/system/framework/framework-res.apk"));
Click to expand...
Click to collapse
I see the purpose of that line of code you told me to add. Since I see that English isn't your best ( Don't worry, I understand ) I assume your telling me to put that line of yours above my package extract line code.
So like this:
Code:
ui_print("framework-res fix by baboomerang");
ui_print("Mounting system...");
run_program("/sbin/busybox", "mount", "/system");
show_progress(0.150000, 1);
ui_print("Removing old copy of framework-res");
ui_print("Removing old copy of Generic");
delete("/system/framework/framework-res.apk");
delete("/system/usr/keylayout/Generic.kl");
ui_print("Installation...");
show_progress(0.250000, 2);
[B]
[I]package_extract_file("/system/framework/framework-res.apk", "/system/framework");
assert (package_extract_file("framework-res.apk", "/system/framework/framework-res.apk"));
package_extract_file("/system/usr/keylayout/Generic.kl", "/system/usr/keylayout");[/I][/B]
ui_print("Patching done");
show_progress(0.476000, 3);
ui_print("Using CHMOD 644 or rw r r");
ui_print("Uploading Stage 1");
set_perm(0,0,0644, "/system/framework/framework-res.apk");
ui_print("Uploading Stage 2");
set_perm(0,0,0644, "/system/usr/keylayout/Generic.kl");
On doing this I get from cwm:
Code:
-- Installing: /storage/sdcard1/framework-fix
by baboomerang.zip
Finding update package...
Opening update package...
Installing update...
framework-res fix by baboomerang
Mounting system...
Removing old copy of gramework-res
Removing old copy of Generic
Installation...
[I][B]assert failed: package_extract_file("framework
-res.apk", "/system/framework/framework-res.apk")[/B][/I]
E:Error in /storage/sdcard1/framework-fix by b
aboomerang.zip
(Status 7)
Installation aborted.
I get this when the assertion is below/after the original package_extract. I haven't tried the assertion before/above the original package_extract.
Btw thanks, I think Im getting closer.
EDIT: I am closer and got very close. But now I am here.
Code:
ui_print("framework-res fix by baboomerang");
ui_print("Mounting system...");
[I][B]mount("ext4", "EMMC", "/dev/block/mmcblk0p16", "/system");[/B][/I]
show_progress(0.150000, 1);
ui_print("Removing old copy of framework-res");
ui_print("Removing old copy of Generic");
delete("/system/framework/framework-res.apk");
delete("/system/usr/keylayout/Generic.kl");
ui_print("Installation...");
show_progress(0.250000, 2);
[I][B]package_extract_file("system/framework/framework-res.apk", "/system/framework");
package_extract_file("system/user/keylayout/Generic.kl", "/system/usr/keylayout");[/B][/I]
ui_print("Patching done");
show_progress(0.476000, 3);
ui_print("Using CHMOD 644 or rw r r");
ui_print("Uploading Stage 1");
set_perm(0,0,0644, "/system/framework/framework-res.apk");
ui_print("Uploading Stage 2");
set_perm(0,0,0644, "/system/usr/keylayout/Generic.kl");
show_progress(0.789000, 4);
[I][B]assert(package_extract_file("framework-res.apk", "/system/framework/framework-res.apk"),
package_extract_file("Generic.kl", "/system/usr/keylayout"));[/B][/I]
ui_print("Unmounting system...");
unmount("/system");
This fixes my issues. But I now get back to the part of Stage 1. Where it cant set the permissions.
Instead of using this:
Code:
package_extract_file("[I][B]/system[/B][/I]/framework/framework-res.apk", "/system/framework");
package_extract_file("[I][B]/system[/B][/I]/user/keylayout/Generic.kl", "/system/usr/keylayout");
I did this:
Code:
package_extract_file("[I][B]system[/B][/I]/framework/framework-res.apk", "/system/framework");
package_extract_file("[I][B]system[/B][/I]/user/keylayout/Generic.kl", "/system/usr/keylayout");
Reason for that is because I saw in the guide in my first post, their package_extract_file shows "system" since its coming from the zip itself there is no " / " folder behind it. its just the zip itself, meta inf and system folder. Even if that was added, it doesn't make any sense or wouldn't fit the flashable zip standard.
Fixed 100% working
Ok so thanks for the help, I fully fixed my script with a lot of experimenting.
Here's a summary of what I did
I changed
Code:
run_program("/sbin/busybox", "mount", "/system");
to
Code:
mount("ext4", "EMMC", "/dev/block/mmcblk0p16", "/system");
also added
Code:
package_extract_dir("system", "/system");
before doing this below
Code:
package_extract_file("system/framework/framework-res.apk", "/system/framework");
package_extract_file("system/usr/keylayout/Generic.kl", "/system/usr/keylayout");
Next I used
Code:
set_perm_recursive(0, 0, 0755, 0644, "/system/framework", "/system/usr/keylayout");
to at least in a different way change the permissions of the files directly with no errors. the 0755 sets the framework folder itself of rwx rx rx then 0644 sets all the files inside to rw r r.
Then I continued to use
Code:
set_perm(0, 0, 0644, "/system/usr/keylayout/Generic.kl");
set_perm(0, 0, 0644, "/system/framework/framework-res.apk");
and somehow after all that it worked yay!
Finally, I did
Code:
assert(package_extract_file("system/framework/framework-res.apk", "/system/framework/framework-res.apk"),
package_extract_file("system/usr/keylayout/Generic.kl", "/system/usr/keylayout/Generic.kl"));
so at least the files are forced to be downloaded.
Im keeping this here so future viewers at least see or get an idea on how to fix it like I did. Cheers

[Guide][For Beginners] How to make flashable zips of anything.

Disclaimer
I will not be responsible if you screw up with your device.
Do make a Nandroid backup first.
Before we start
Downloads
WinRAR
Notepad++
Template Zip
Lets get started
I have provided you with the template zip inside which by making changes we can create our flashable zips. All necessary files are inside Template zip
Open up the template zip. There you will see two folders "META-INF" and "system". [In "META-INF" all the coding stuff resides and in "system" all your apps and media files resides.]
META-INF
In META-INF have one folder "com" and three files [We don't have to edit these three files]
Now open "com" folder and inside it open "google" folder then "android" folder.
Now inside "android" folder you will see two files "update-binary" [We don't have to edit this file, leave it as it is.] and "updater-script"[It is the file which is used to tell custom recovery what to do with the flashable zip ].
We have to edit "updater-script" file by using notepad++. [Scroll below to see how to edit updater-script]
System Folder
It is the folder where all of your apks, zips, libs reside.
Inside System Folder make folders as following:
If you want to flash an app and make it system app create "app" folder and if not a system app make "priv-app" folder. You can also make "lib" folder along with "app" folder if your apps uses libs.
If you want to flash a bootanimation or ringtones etc make "media" folder.
If you want to flash something else ask it below.
How to edit "updater-script"?​
What is updater-script?
updater-script is a file written in edify script language which instructs the recovery to perform certain tasks.
updater-script is located in /META-INF/com/google/android/updater-script in flashable zip
Some basic rules:
Every statement must end with a semicolon (; )
Comments must start with #
Strings must be delimited by double quotes (” “)
Commands
Now i will try to explain commands used in updater-script in very easy language or noob language.
Code:
format("yaffs2", "MTD", "system", "/system");
The above command is used to format the specified partition
Syntax explanation:
format - The main command to direct the recovery to format using the following parameters
"yaffs2" - Filesystem type used in the device
"MTD" - Type of the partition used in the file system
"system" - Name of the partition to be formatted
"/system" - Location of the partition to be formatted
======================================================================================================
Code:
ui_print("Format Completed");
The above command directs the recovery to display the following text enclosed in double quotes in the user interface (display).
After successful formatting it displays "Format Completed" in the device screen.
======================================================================================================
Code:
mount("yaffs2", "MTD", "system", "/system");
The mount command directs the recovery to mount the following file system and the following partition
The text syntax is same as format command as instead of formatting it mounts.
======================================================================================================
Code:
package_extract_dir("system", "/system");
This command searches for the directory (folder) named "system" in the root of the zip file and copies all the content of the "system" folder from the zip file into the "/system" partition which is already mounted by the previous mount command ie it copies all the folder items inside system folder like apps, media etc as explained above.
======================================================================================================
Code:
package_extract_file("autoroot.sh", "/tmp/autoroot.sh");
This command searches for the file named "autoroot.sh" in the root of the zip file and copies the file to "/tmp" folder and names it as "autoroot.sh" (here it does not change the name)
======================================================================================================
Code:
symlink("mksh", "/system/bin/sh");
The above command creates a symlink.
What is symlink?
Symlink is nothing but shortcuts, for example if a file is required in two different places instead of copy pasting the file in two different locations, the file is copied to one of the two locations and in the other location a shortcut to the file(symlink) is created. The source and the symlink can have different names (actually this is the prime use of symlinks).
Let me explain it in a noob friendly manner.
Take the above symlink, it creates a shortcut(symlink) for the command "mksh" and places it in the path of the operating system. The shortcut(symlink) directs to the file "/system/bin/sh" , so whenever the os gets a request to execute the "mksh" command, the actual
binary that gets excuted will be "/system/bin/sh" .
Creating symlinks saves a lot of space because instead of copying the whole file and placing it in requiered places we are just creating shortcuts which directs to the source file which can be placed anywhere in the file system (generally placed in the path of the os).
======================================================================================================
Code:
set_perm_recursive(0, 0, 0755, 0644, "/system");
The above command is used to set permission recursively for the files and folders present inside a folder (in this case for "/system" folder).
Explanation of syntax:
0 - uid - It defines that the following permission is set for the user id 0 .
0 - gid - It defines that the following permission is set for the group id 0 .
0775 - Dirmode - It defines that 0775 permission to set to directories contained within the specified directory.
0644 - Filemode - t defines that 0644 permission to set to files contained within the specified directory.
"/system" - Target directory to set the above mentioned permissions.
======================================================================================================
Code:
set_perm(0, 3003, 06755, "/system/bin/ip");
The above command is used to set permission for a individual file (in this case for "/system/bin/ip" file).
syntax explanation:
0 - uid - It defines that the following permission is set for the user id 0 .
3003 - gid - It defines that the following permission is set for the group id 3003 .
06775 - It defines that 06775 permission to set to the specific file.
"/system/bin/ip" - Target file to set the above mentioned permissions.
Other Permission commands:
Use to push new files to /data partition and /system partition.
ui_print(“Setting permissions…”);
set_perm_recursive(1000, 1000, 0771, 0644, “/data/app”);
set_perm_recursive(0, 0, 0755, 0644, “/system”);
set_perm_recursive(0, 0, 0777, 0777, “/system/etc/init.d”);
set_perm_recursive(0, 2000, 0755, 0755, “/system/bin”);
set_perm(0, 3003, 06755, “/system/bin/ip”);
set_perm(0, 3003, 02750, “/system/bin/netcfg”);
set_perm(0, 3004, 02755, “/system/bin/ping”);
set_perm(0, 2000, 06750, “/system/bin/run-as”);
set_perm_recursive(1002, 1002, 0755, 0440, “/system/etc/bluetooth”);
set_perm(0, 0, 0755, “/system/etc/bluetooth”);
set_perm(1000, 1000, 0640, “/system/etc/bluetooth/auto_pair_devlist.conf”);
set_perm(1002, 1002, 0440, “/system/etc/dbus.conf”);
set_perm(1014, 2000, 0550, “/system/etc/dhcpcd/dhcpcd-run-hooks”);
set_perm(0, 2000, 0550, “/system/etc/init.goldfish.sh”);
set_perm_recursive(0, 0, 0755, 0555, “/system/etc/ppp”);
set_perm_recursive(0, 2000, 0755, 0644, “/system/vendor”);
set_perm_recursive(0, 2000, 0755, 0644, “/system/vendor/etc”);
set_perm(0, 2000, 0755, “/system/vendor/lib”);
set_perm(0, 2000, 0755, “/system/vendor/lib/hw”);
set_perm_recursive(0, 2000, 0755, 0755, “/system/xbin”);
set_perm(0, 0, 06755, “/system/xbin/su”);
set_perm(0, 1000, 0755, “/system/xbin/busybox”);
======================================================================================================
Code:
unmount("/system");
This command just unmount the system.
======================================================================================================
iflesh Command:
Code:
Ifelse(condition),(do_this),(else_do_this);
Example:
Code:
ifelse mount("yaffs2", "MTD", "system", "/system") == "system", ui_print("Mounted!"), ui_print("Mount Failed!");
Ifelse command can be explained simply as asking the system to do something based on the result of a condition.
From example:
The ifelse command would attempt to mount the MTD partition named "system" to "/system".
If the mounting process succeeds (the condition), the script will display "Mounted!", else it will display "Mount Failed!"
======================================================================================================
Code:
abort()
It just abort's the script execution.
Note: It is usually paired with some other command for example the getprop command or with ifelse. Independently specifying abort() in the updater-script will kill the script abruptly right there so use this command carefully.
======================================================================================================
Code:
show_progress(fraction,duration)
Code:
show_progress(0.2,5);
fraction = a fraction of the bar (more on that in a moment)
duration = seconds
The "seconds" part just means how long the progress bar should take to fill up to the new level. It will not delay your script in any way: it will only take this much time if something else in the script is also taking that much time.
For example, if you run this snippet, you can watch the progress bar partially fill up pieces at a time. Each piece will take 5 seconds to fill, then pause for 2 seconds before the next piece starts (sleep command is for 7, so after the progress bar is done its 5 seconds of movement, there are 2 seconds of sleep left until the next command)
======================================================================================================
ALWAYS LEAVE TWO BLANK LINE AT THE END OF THE update-script (if the code contains 50 lines then 52 lines should be visible in the notepad++ including two blank line after the end of the script)
======================================================================================================
HOPE I HELPED YOU GUYS..... IF I MISS SOMETHING PLEASE LET ME KNOW.... AND DON'T FORGET TO PRESS THANKS....:good:
For More Info visit: http://forum.xda-developers.com/wiki/Edify_script_language
Reserved
Reserved
Excellent guide!!, thanks , it will help me a lot.
xxkirianxx said:
Excellent guide!!, thanks , it will help me a lot.
Click to expand...
Click to collapse
Its good that it helped you!!!
If I want to remove system folder and data folder so is it possible without any wrong effects
Sent from my Symphony V80 using XDA-Developers mobile app
lkdevil said:
If I want to remove system folder and data folder so is it possible without any wrong effects
Sent from my Symphony V80 using XDA-Developers mobile app
Click to expand...
Click to collapse
Whole system folder or a folder inside /system
META-INF Folder
hi. @TheRoyalSeeker
we only edit what in "updater-script" ( to make it flashable via recovery )
now my question is :
1. is (update-binary) always suitable for all android platform - KK, LP, even MM ?
2. or is it (update-binary) always suitable for any devices ?
if no.. so..
I believe I can make "META-INF" Folder or "updater-script" by myself, but for "CERT.RSA" , "CERT.SF" , "MANIFEST.MF" and "update-binary" could you tell me how or from where can I take or pull those file ?
I'm stuck on those 4 files
if yes.. so..
I dont really bother anymore, I just download any "template.zip" which is containing those files, and only editing "updater-script"
thank you very much for your reply. I'm kindly appreciate anyhelp.
maz izaackovich said:
hi. @TheRoyalSeeker
we only edit what in "updater-script" ( to make it flashable via recovery )
now my question is :
1. is (update-binary) always suitable for all android platform - KK, LP, even MM ?
2. or is it (update-binary) always suitable for any devices ?
if no.. so..
I believe I can make "META-INF" Folder or "updater-script" by myself, but for "CERT.RSA" , "CERT.SF" , "MANIFEST.MF" and "update-binary" could you tell me how or from where can I take or pull those file ?
I'm stuck on those 4 files
if yes.. so..
I dont really bother anymore, I just download any "template.zip" which is containing those files, and only editing "updater-script"
thank you very much for your reply. I'm kindly appreciate anyhelp.
Click to expand...
Click to collapse
"update-binary" is pretty much universal and the only problem that might occur is with x86 devices.
For extracting "update-binary" and other files you can use your ROM's zip.
Use template zip, i don't think any problem will occur.
TheRoyalSeeker said:
Disclaimer
For More Info visit: http://forum.xda-developers.com/wiki/Edify_script_language
Click to expand...
Click to collapse
bundle of thanks brother i really really appricate your hard work, today XDA successfull coz XDA have your kind of peoples
brother its help me alot,
i want to know something , i extracted the lollipop rom , the format it system,img,ext4 ........now i change the some permissions
now i want to again repack the rom so how can i repack it? pack in img,ext4
and 2nd Q is that,
i create a zip file , from stock system,img,ext4 and after create with meta folder, during installation in end its says , end with error 7 etc
after i reboot so it take 5 minuts and after BB is unknown with null imei, why?
Mr Hassan said:
bundle of thanks brother i really really appricate your hard work, today XDA successfull coz XDA have your kind of peoples
brother its help me alot,
i want to know something , i extracted the lollipop rom , the format it system,img,ext4 ........now i change the some permissions
now i want to again repack the rom so how can i repack it? pack in img,ext4
and 2nd Q is that,
i create a zip file , from stock system,img,ext4 and after create with meta folder, during installation in end its says , end with error 7 etc
after i reboot so it take 5 minuts and after BB is unknown with null imei, why?
Click to expand...
Click to collapse
Sorry, but I don't know how to repack system.img.ext4, i have never made a rom before or edited yet, so i will be unable to help about that.
Error 7 generally occurs due to some wrong scripting in updater-script or by using incompatible update-binary.
You can share your updater-script here, so i can check it.
TheRoyalSeeker said:
Sorry, but I don't know how to repack system.img.ext4, i have never made a rom before or edited yet, so i will be unable to help about that.
Error 7 generally occurs due to some wrong scripting in updater-script or by using incompatible update-binary.
You can share your updater-script here, so i can check it.
Click to expand...
Click to collapse
thanks for reply, check it
Mr Hassan said:
thanks for reply, check it
Click to expand...
Click to collapse
Sorry for replying too late, I have been too much busy lately and that's why I haven't been using XDA since last 20 days.
I am sure you might have fixed the problem by yourself as it has been many days since you posted the above post.
Again just want to apologise for not being able to reply.
TheRoyalSeeker said:
Sorry for replying too late, I have been too much busy lately and that's why I haven't been using XDA since last 20 days.
I am sure you might have fixed the problem by yourself as it has been many days since you posted the above post.
Again just want to apologise for not being able to reply.
Click to expand...
Click to collapse
thanks for again your reply ,
now i,m in next step, kindly if you have time so please visit and share your experience
https://forum.xda-developers.com/android/help/repack-img-giving-error-odin-invalid-t3577719

Flashing xposed framework zip during rom install

Hello, I'm very new to modifying roms and am stuck on piece of code. My rom flashes fine but I am trying to add xposed framework to the script. I am extracting the xposed directory just as it is when you download the zip, nothing is changed from the original exposed zip. When I first inserted the code:
package_extract_dir("xposed", "/tmp/xposed");
run_program("/tmp/xposed/META-INF/com/google/android/flash-script.sh");
I checked the log after the rom install and it errored with a permission problem. I then inserted this piece of code:
set_perm_recursive(0, 0, 0777, 0777, "/tmp/xposed");
In between the two other lines of code, making it:
package_extract_dir("xposed", "/tmp/xposed");
set_perm_recursive(0, 0, 0777, 0777, "/tmp/xposed");
run_program("/tmp/xposed/META-INF/com/google/android/flash-script.sh");
This eliminated the permission error I was getting, but now there is a new one:
"about to run program [/tmp/xposed/META-INF/com/google/android/flash-script.sh] with 1 args
run_program: execv failed: Exec format error
run_program: child exited with status 1"
I am thinking .sh scripts can only be run from /sbin/sh as that is what I mostly see others doing with .sh stuff. I tried to extract the directory to /sbin/sh but then it errored saying invalid directory.
Dont know where to go from here. Thanks for reading.
I was FINALLY able to get the script to start by using:
run_program("/sbin/busybox", "sh", "/tmp/xposed/META-INF/com/google/android/flash-script.sh");
However the script fails after the first line which is a ui print saying that the script is starting. It goes to look for a folder which it can't find. Argh being a noob sucks.
Is this posted in the right area?

Categories

Resources