Script convert .bat to .sh - Tasker Tips & Tricks

How i make thats script????
i have but not have tails where i found thats script

Related

apkbuilder - Is anyone familiar with how it works?

I've found some commands to use but I am not sure if I've done them correctly. I was able to get a file out of the commands (a .apk file) but it seemed to be created as a document rather than a unix executable file. The icon appears as a sheet of paper rather than that black box of other executable files. I am on a mac right now so anyone familiar with it on a mac would be a great help.
What about just adding the .apk extention? cp /filepath/ /sdcard/app.apk then mount the sdcard and pull it over if you can't work out adb.
evilkorn said:
What about just adding the .apk extention? cp /filepath/ /sdcard/app.apk then mount the sdcard and pull it over if you can't work out adb.
Click to expand...
Click to collapse
When I change a file name and save it as a .apk, it doesn't seem to truly save it as a .apk. Normally, on a mac, .apk's are seen as a unix executable file and the icon is a little black square. If I change a files extension to <filename.apk> it just sees it as a document with the name <filename.apk>, NOT <filename>.apk. It doesn't recognize the file as a true .apk. I'm not sure if that makes sense but its a much more difficult process on a mac than it is on a PC. If i save a file with .apk at the end then try to sign it, an error comes up saying that the file is not a file.
apk's are just zip files with a signing signature, they "unpack" like a zip/rar archive. There is no reason to open them with terminal. They are either damaged or you didn't copy them off your phone correctly, see the second sentence of my post.
I know what you mean and I know how they work, I'm just not explaining myself correctly...I think I have it figured out though.

update.zip error (status 6)

Hi guys,
i just tried to make my own update.zip.
The files inside are like this:
Code:
META-INF/
-com/
-google/
-android/
update-binary
updater-script
system/
-app/
TouchWiz30Launcher.apk
I took update-binary and updater-script from another update.zip (Theme).
Then i modified updater-script to this:
Code:
show_progress(0,0);
mount("MTD", "system", "/system");
delete_recursive("/system/app/TouchWiz30Launcher.apk");
package_extract_dir("system", "/system");
unmount("/system");
show_progress(10.000000, 1);
Unfortunately it doesn't work. This is what i get if i try to apply the .zip:
Code:
-- Installing: SDCARD:TouchWizGTG_v1.1.1_update.zip
Finding update package...
Opening update package...
Installing update...
E:Error in /mnt/sdcard/TouchWizGTG_v1.1.1_update.zip
(status 6)
Installation aborted.
Whats wrong with it? I already googled Status 6, and found theres something wrong with the script e.g. file was not saved in unix format or something.
I tried several text editors like notepad, wordpad, notepad++ and even dreamweaver.
I just don't get it. Why isn't it working?
Try to get a "fresh" updater-script which is untouched, maybe from the swype zips that doc has posted on his doc rom page and edit it again. I was editing with textpad and switched to notepad++ but it didnt help.. So i tried a fresh script with notepad++ again and it worked..
SysTem-X said:
Try to get a "fresh" updater-script which is untouched, maybe from the swype zips that doc has posted on his doc rom page and edit it again. I was editing with textpad and switched to notepad++ but it didnt help.. So i tried a fresh script with notepad++ again and it worked..
Click to expand...
Click to collapse
can you teach me your way, sorry my bad english
quyrauxanh said:
can you teach me your way, sorry my bad english
Click to expand...
Click to collapse
Find an update.zip that has already been done by someone else.. Then extract the zip file, and take the update-script/updater-script from the folder. After that open it with notepad++ or any other editor that won't add extra spaces for no reason.
Use notepad or gedit to edit script, worpad and others may corrupt it.
Also if you are only replacing an app you dont have to remove it first, when the package is extracted it will overwrite files automatically.
SysTem-X said:
Try to get a "fresh" updater-script which is untouched, maybe from the swype zips that doc has posted on his doc rom page and edit it again. I was editing with textpad and switched to notepad++ but it didnt help.. So i tried a fresh script with notepad++ again and it worked..
Click to expand...
Click to collapse
franklin01 said:
Use notepad or gedit to edit script, worpad and others may corrupt it.
Also if you are only replacing an app you dont have to remove it first, when the package is extracted it will overwrite files automatically.
Click to expand...
Click to collapse
thank i'm doing
Thank you guys, i'm going to trying it. I'll let you know if it works.
It works
I took update-binary and updater-script from swype update.zip.
Is the update-binary "bound" to a specific updater-script?
If yes, how can i create my own?
loco- said:
It works
I took update-binary and updater-script from swype update.zip.
Is the update-binary "bound" to a specific updater-script?
If yes, how can i create my own?
Click to expand...
Click to collapse
I guess you do this on windows.
Maby gnuzip work.
The problem you have is the zip you create is wrong for linux/android system.
You can always make an wmware with linux and use that to make things for the phone.
I use unbutu to compile kernels and all other stuff for the phone.
Sent from GT-I9000 jpo. My own kernel for z4mod and with 342MB Ram
Hi guys, I've just found the solution to this problem. To be short it's all about newline characters. Windows and Unix systems treat the newline chars differently. All you need to do is change the Windows newlines with the Unix ones. You can do it easily with Notepad++. So open the script, click the "Show All Characters" icon (you should see the newlines here), then navigate to "Edit-->EOL Conversion-->Convert to UNIX Format" and that's it. Finally, you should end up with single LFs. And don't forget about encoding, should be ANSI.
thanks
thanks it helped me a lott
Logo Freez
SysTem-X said:
Find an update.zip that has already been done by someone else.. Then extract the zip file, and take the update-script/updater-script from the folder. After that open it with notepad++ or any other editor that won't add extra spaces for no reason.
Click to expand...
Click to collapse
Phone Xperia X10
Current ROM : CyanogenMod 7.1
.... installing CyanogenMod 7.2 .
Yeah ,i followed your advice , modifing the build.prop in Word was the problem . instaled notepad++ , that error didn't came up anymore ,but ....
Xrecovery said the instalation is complete. It took 2 sec :O .that can't be right !!
And now the phone freezes at the Sony Ericsson LOGO
I have installed CM before with no prob ,but now this ... .CAN ANYONE HELP ?
Check this
Check this it sould solve your problem http://forum.xda-developers.com/showthread.php?t=1588439 :fingers-crossed:
IT ISN'T MINE BUT MAY HELP YOU.
illtown said:
Hi guys, I've just found the solution to this problem. To be short it's all about newline characters. Windows and Unix systems treat the newline chars differently. All you need to do is change the Windows newlines with the Unix ones. You can do it easily with Notepad++. So open the script, click the "Show All Characters" icon (you should see the newlines here), then navigate to "Edit-->EOL Conversion-->Convert to UNIX Format" and that's it. Finally, you should end up with single LFs. And don't forget about encoding, should be ANSI.
Click to expand...
Click to collapse
I'm using Ubuntu, so shouldn't the newline characters be the Unix ones by default? I got the error after modifying AOSP 4.1.2 for Galaxy S Plus with dsixda's Android Kitchen. The Text Editor I'm using is gedit (default Ubuntu Text Editor). Does anyone know a Ubuntu Text Editor that is similar to Notepad++?
illtown said:
Hi guys, I've just found the solution to this problem. To be short it's all about newline characters. Windows and Unix systems treat the newline chars differently. All you need to do is change the Windows newlines with the Unix ones. You can do it easily with Notepad++. So open the script, click the "Show All Characters" icon (you should see the newlines here), then navigate to "Edit-->EOL Conversion-->Convert to UNIX Format" and that's it. Finally, you should end up with single LFs. And don't forget about encoding, should be ANSI.
Click to expand...
Click to collapse
Thanks bro!!
This instructions really helped me to solve my elife e7 update issue. :good:

Tar of Chromecast /system

Have fun.
http://androidfilesharing.com/uploader/server/php/files/ften/system.tar
if you want to look at the source code as well, this is for conten_shell /chromium
(taken from the chromecast-mirrored-source.chromium git repo)
https://www.googledrive.com/host/0B3j4zj2IQp7MRzRYLTZJcTY5LXM/chromecast_v1.0_content_shell.tgz
Another good tool to use when your going through the /System files is this script to unpack Pak files. You'll find things like the background wallpapers are contained in Pak files.
http://blog.csdn.net/jokers_i/article/details/8802352
In order to get the script to work you need to remove the lines about the Pack File version check or I suppose you could correct them, Python isn't something I'm that familiar with.

Can't run a script

hello I'm trying to run a script but I can't it gives me the errors in screenshot. I run it as root. I'm s-off.
here's the script. (note that I can do this manually with a file explorer)
chmod 777 /sys
chmod 660 /sys/android_camera_awb_cal/awb_cal
cp /sdcard/htcm8awb/awb_cal /sys/android_camera_awb_cal/awb_cal
MaRcIuPT said:
hello I'm trying to run a script but I can't it gives me the erros in screenshot. I run it as root. I'm s-off.
here's the script. (note that I can do this manually with a file explorer)
chmod 777 /sys
chmod 660 /sys/android_camera_awb_cal/awb_cal
cp /sdcard/htcm8awb/awb_cal /sys/android_camera_awb_cal/awb_cal
Click to expand...
Click to collapse
Need some more information, please. First off, do you have an HTC One m7 (Sprint) or an HTC One M8? From your script, it looks like it is made for the M8. This is the thread for the m7 Sprint variant.
MarkBell said:
Need some more information, please. First off, do you have an HTC One m7 (Sprint) or an HTC One M8? From your script, it looks like it is made for the M8. This is the thread for the m7 Sprint variant.
Click to expand...
Click to collapse
I have the m7 international (I believe this section is for m7 any version), I'm only replacing a file with the script.
MaRcIuPT said:
I have the m7 international (I believe this section is for m7 any version), I'm only replacing a file with the script.
Click to expand...
Click to collapse
Did you ever have any luck? Can you try asking the question to the person who wrote the script?
It's quite possible the script is for the m8 since the script names an m8 folder, but I'm not an expert on scripts by any means. @clsA: Do you know what may be going on here?
Do those directories referred to in your screenshot actually exist on your phone?
Also: I was wrong about this being Sprint variant exclusive. My bad on that.
MaRcIuPT said:
hello I'm trying to run a script but I can't it gives me the errors in screenshot. I run it as root. I'm s-off.
here's the script. (note that I can do this manually with a file explorer)
chmod 777 /sys
chmod 660 /sys/android_camera_awb_cal/awb_cal
cp /sdcard/htcm8awb/awb_cal /sys/android_camera_awb_cal/awb_cal
Click to expand...
Click to collapse
Try using SManager to run the script. It might help.
MarkBell said:
Did you ever have any luck? Can you try asking the question to the person who wrote the script?
It's quite possible the script is for the m8 since the script names an m8 folder, but I'm not an expert on scripts by any means. @clsA: Do you know what may be going on here?
Do those directories referred to in your screenshot actually exist on your phone?
Also: I was wrong about this being Sprint variant exclusive. My bad on that.
Click to expand...
Click to collapse
I can rename the folder.... it's simply a folder. the scrip is made for m7. not m8. It does work for some in init.d and some don't.. like me. and I tried to run the script to see why and this is what happens. the folders are there because as I said I can do that step by step in ES explorer, change permissions then replace the file I want.
Atishay Jain said:
Try using SManager to run the script. It might help.
Click to expand...
Click to collapse
with Smanager I get the message is attached. :\
I tried to run a cp command in a terminal (root) and it says the same thing " I/O error" the other steps in script I did successfully in a terminal.
Tried too with 'busybox cp' command and I get " cp: can't create '/sys/android_camera_awb_cal/awb_cal': File exists " so I know the file exists that's why I wan't to replace it xD my head hurts. Searched a lot why I can't copy and no success.
MaRcIuPT said:
I can rename the folder.... it's simply a folder. the scrip is made for m7. not m8. It does work for some in init.d and some don't.. like me. and I tried to run the script to see why and this is what happens. the folders are there because as I said I can do that step by step in ES explorer, change permissions then replace the file I want.
with Smanager I get the message is attached. :\
I tried to run a cp command in a terminal (root) and it says the same thing " I/O error" the other steps in script I did successfully in a terminal.
Tried too with 'busybox cp' command and I get " cp: can't create '/sys/android_camera_awb_cal/awb_cal': File exists " so I know the file exists that's why I wan't to replace it xD my head hurts. Searched a lot why I can't copy and no success.
Click to expand...
Click to collapse
I am not able to get the exact reason for the problem but most such things get solved on updating busybox. Try doing that. Use the tool by jrummy from the market or download the busybox wraithdu installer script from the v6 supercharger thread by zeppelinrox.
MaRcIuPT said:
hello I'm trying to run a script but I can't it gives me the errors in screenshot. I run it as root. I'm s-off.
here's the script. (note that I can do this manually with a file explorer)
chmod 777 /sys
chmod 660 /sys/android_camera_awb_cal/awb_cal
cp /sdcard/htcm8awb/awb_cal /sys/android_camera_awb_cal/awb_cal
Click to expand...
Click to collapse
i would guess you're using Windows Notepad (or similar) to edit/create that script?
you need to use UNIX style EOL delimiters for those commands to work.
EDIT: i've attached an example, the same script (just lists directory contents), looks the same in the Script Runner, once saved with Windows EOL delimiters, gives the first output,
same script with UNIX EOL, gives the second output.
nkk71 said:
i would guess you're using Windows Notepad (or similar) to edit/create that script?
you need to use UNIX style EOL delimiters for those commands to work.
EDIT: i've attached an example, the same script (just lists directory contents), looks the same in the Script Runner, once saved with Windows EOL delimiters, gives the first output,
same script with UNIX EOL, gives the second output.
Click to expand...
Click to collapse
Yes I used the notepad to edit the original. now with your help I did understand and used the notepad++, converted to UNIX EOL and saved as script (sh). No errors now on missing directories but I can't copy/replace the file even with cp -f to force it. I can't understand which command ES explorer uses when I manually copy the file, because it replaces the file successfully.
MaRcIuPT said:
Yes I used the notepad to edit the original. now with your help I did understand and used the notepad++, converted to UNIX EOL and saved as script (sh). No errors now on missing directories but I can't copy/replace the file even with cp -f to force it. I can't understand which command ES explorer uses when I manually copy the file, because it replaces the file successfully.
Click to expand...
Click to collapse
Not sure, but
Are you running the script as root?
And maybe you need file permission to be 666 instead of 660.
Sent from my HTC One using Tapatalk
nkk71 said:
Not sure, but
Are you running the script as root?
And maybe you need file permission to be 666 instead of 660.
Sent from my HTC One using Tapatalk
Click to expand...
Click to collapse
Yeah Always run on root. Tried 666 and 777. Tried with cp, cat, rm first then CP. No success.
Sent from my HTC One using XDA Free mobile app

[Discussion]How to execute a *.sh file while installing module?

I am looking for a way to run a *.sh file during installation of a module or a way to delete a certain folder during installation. How can this be done? I am sure it is much easier then I am making it out to be... Any help is appreciated...
dustintinsley said:
I am looking for a way to run a *.sh file during installation of a module or a way to delete a certain folder during installation. How can this be done? I am sure it is much easier then I am making it out to be... Any help is appreciated...
Click to expand...
Click to collapse
from set_permissions function in config.sh or from update-binary (in the right place, if you don't know where then use config.sh function)
If you want a script in the module, then if you added it in common folder add this to the function:
Code:
sh $INSTALLER/common/file.sh
dustintinsley said:
I am looking for a way to run a *.sh file during installation of a module or a way to delete a certain folder during installation. How can this be done? I am sure it is much easier then I am making it out to be... Any help is appreciated...
Click to expand...
Click to collapse
Add your content directly to update-binary, update-binary is the script responsible for installing a module.

Categories

Resources