Remove All Ads from XDA

How to install Failling zip files in Recovery

58 posts
Thanks Meter: 47
By dale_para_bajo, Member on 9th January 2014, 06:39 AM
Post Reply Email Thread
7th February 2014, 07:25 AM |#11  
Senior Member
Flag Kuala Lumpur
Thanks Meter: 10
I am trying to install this script with TWRP using your method, but it seems failed.

would you mind to try it?
14th February 2014, 11:43 PM |#12  
Flag Florence, SC
Thanks Meter: 6
I downloaded the script installation zip, changed the update-binary, and it gave an error before executing any of the updater-script. When I changed all lines in the updater-script trying to run programs in busybox from /sbin to /system/xbin, most of the updater-script executed. The one error was my fault in syntax. I know my busybox is installed to /system/xbin, but I don't know anything about busybox itself and it's symlinks. Where is everyone else's busybox installed? Is the location of busybox simply another difference with x86 android builds or am I missing some symlink?

Sent from my SM-N900V using XDA Premium HD app
17th February 2014, 08:57 AM |#13  
Senior Member
Thanks Meter: 187
I been busy. Sorry for the delay.

I am not sure of what I am about to say but here is my understanding. Please keep in mind I am also learning.

1) busybox is an added User binary file that we add to the Android system partition. Most of us did not actually added it ourself, we use an application to add it to Android "system" partition. So when we boot to Android OS it is then there ready for us.

2) But In linux (Yes Android Java Dalvik run on top of Linux) where the User place his own binaries is not well define or implemented. So you will find time after time a problem similar to this situation.

3) So, I confessed I am not sure where busybox binary should really be. I know that normally I will see the Real busybox is in one place and find simlinks ( shorcuts) in the rest of those locations.

4) Now it is important to keep in mind that the folders: /sbin, /xbin, /system, /system\bin, /system/xbin not necessary are the same when you boot in Android OS or when you boot in Recovery!!!!!! Read this 2 or 3 times!!! It is important.

5) In the case of Recovery Partition busybox is there because the developer that created that partition did it for us. Clearly where it is will depend on what the recovery partition's developer decided to place it. I do not know right now where is in CWM that DutchDanny made since I no longer have that in my Tablet. Latter I can try to inspect the recovery.img and tell you.

6) Where is busybox in my P5210:
* I am inspecting my TWRP and I can see that we have a "/bin/busybox". And I do not see folders "xbin" neither in "/xbin" nor in "\system\xbin".

* I am currently testing rom "Bindroid One ver 2.01". In this OS I can see only "/system/xbin/busybox". I have no sysmlinks! Interesting, Not important to me. Keep in mind that I am testing I had no need for it or installing any application that may had require it.

@chchia & @themoneyman It seems both of you are talking about same script but i can be wrong?

Butt....... lets look at the script anyway.

ui_print("                                ");
ui_print("                                ");
ui_print("       T w e a k D r y p t      ");
ui_print("                                ");
ui_print("               by               ");
ui_print("                                ");
ui_print("           Team T.D.T           ");
ui_print("                                ");
ui_print("                                ");
ui_print("Mounting /system /data /cache");
run_program("/sbin/mount", "/system");
run_program("/sbin/mount", "/data");
run_program("/sbin/mount", "/cache");
show_progress(1, 15);
run_program("/sbin/sleep", "5");
ui_print("Deleting old files,please wait..");
run_program("/sbin/sleep", "5");
ui_print("Installing scripts ");
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
show_progress(0.200000, 40);
ui_print("Fixing permissions");
set_perm_recursive(0, 2000, 0777, 0777, "/system/etc/init.d");
set_perm(0, 0, 0777, "/system/bin/uninstall");
set_perm(0, 0, 0777, "/system/bin/scan");
set_perm(0, 0, 0777, "/system/bin/tweakd");
set_perm(0, 0, 0777, "/system/xbin/sqlite3");
set_perm(0, 0, 0777, "/system/xbin/openvpn");
set_perm(0, 0, 0777, "/system/xbin/zipalign");
set_perm(0, 0, 0777, "/system/lib/");
set_perm(0, 0, 0777, "/system/lib/");
set_perm(0, 0, 0777, "/system/lib/");
set_perm(0, 0, 0777, "/system/etc/init.d/01syscleaner");
set_perm(0, 0, 0777, "/system/etc/init.d/02cpu_kernel_gov");
set_perm(0, 0, 0777, "/system/etc/init.d/03sqlite3");
set_perm(0, 0, 0777, "/system/etc/init.d/04zipalign");
set_perm(0, 0, 0777, "/system/etc/init.d/05zipaligndata");
set_perm(0, 0, 0777, "/system/etc/init.d/06cron");
set_perm(0, 0, 0777, "/system/etc/init.d/07storage");
set_perm(0, 0, 0777, "/system/etc/init.d/08batterytweak");
set_perm(0, 0, 0777, "/system/etc/init.d/09VM");
set_perm(0, 0, 0777, "/system/etc/init.d/10Ksm");
set_perm(0, 0, 0777, "/system/etc/init.d/11Touch_Sens");
set_perm(0, 0, 0777, "/system/etc/hosts");
set_perm(0, 0, 0777, "/system/etc/gps.conf");
set_perm(0, 0, 0755, "/system/xbin/busybox");
symlink("/system/xbin/busybox", "/system/bin/busybox");
set_perm_recursive(0, 2000, 0777, 0777, "/data/tweakdrypt");
run_program("/sbin/sleep", "3");
ui_print("Unmounting partitions...");
run_program("/sbin/umount", "/system");
run_program("/sbin/umount", "/data");
run_program("/sbin/umount", "/cache");
ui_print("Installation Completed !!!!");
ui_print("|      Reboot System Now      |");

Originally Posted by themoneyman

... I also had to change the line in my updater-script that was trying to run busybox from /sbin to /system/xbin....

Wao!!! to me this is strange since I have not seen or recall a "\system\xbin" folder in the Recovery. But I may be wrong. But I may bee misunderstanding you too. I will explain.

in the updater-script there are line that are to be run at recovery. For example:
line 21
You see zip installation files is executed in Recovery. Waooo here is what happen, think In this:
I am going to assume that you are wrong. There is no \system\xbin folder in Recovery. So if there is no folder much less a bussybox in that folder.....

So in order for the previos code line to execute busybox in recovery will have to be in "/sbin/busybox". But you said it work for you in "/system/xbin". To me it should not work. But lets see.

You are sugesting to change "/sbin" fir "/systen/xbin" line 21 should look like:
Normally if you try to execute that las one, It wont work because there is no folder "/system/xbin" in recovery.

But look at Line 16
run_program("/sbin/mount", "/system");
Because this script mount the Android /system partition now all files that should only be available at Android are ready to be use in the Recovery!!! End result: What you are doing works in this particular script Only because the Android /system partition is mounted!!! But keep an eye in other script that may not mount /system before using /xbin/busubox!!!!

Originally Posted by chchia

I am trying to install this script with TWRP using your method, but it seems failed.

would you mind to try it?

Uff, I do not have time for this now I am really busy. I downloaded as you see I posted the script.
Here is what I think is the problem

Unzip "TDT_V4.1_(jb_kk).zip" ( I am assuming you are using jb in your tablet)
You will see in it: data , META-INF, system and a readme.txt

Browse those folders.
You will see there are binaries there!!!!!

now read the script /META-INF/com/google/android/updater-script (yes the same I show before)
line 49 reads
package_extract_dir("system", "/system");
package_extract_dir("data", "/data");
What those line do is copy and overwriting ALL the binaries inside the packages system and data folders and deposit them in your Android partitions!!!!

Here is the sad part for all us users of a x86 device. Our original binaries where compile and optimize for x86 device. The binaries this developer and many other you will try to use in the future most likely where not made for x86!!! Copying over our original binaries may be wrong!!!!!!!

In fact I am learning with your request. I never thought on this problem we have. Waoooo!

My best suggestion is go to the developer and ask him to create this packakes for an x86 device. All binaries should be compile specialy for x86......

In any case: Guys PLease report to us if this package "TDT_V4.1_(jb_kk).zip" was finally installed? Did it work?
25th February 2014, 02:19 PM |#14  
Account currently disabled
Flag colorado
Thanks Meter: 400
Whats the easiest way to install a rom on the device. Because what the op states its a sht load of steps just to get one zip to install

Sent from my SM-N900T using Tapatalk
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes