Quantcast
Channel: xda-developers - Android Software and Hacking General [Developers Only]
Viewing all articles
Browse latest Browse all 3614

[DEV][TOOL][v1.1 - 2015.06.05] SH-OTA, a thing to auto-update your script...

$
0
0
Code:

*** Disclamer

I'm lazy for this now xD...

Introduction

An Android script auto-updater utility.

How to

Android Terminal Emulator (recommended)

1. Download SH-OTA (down)

2. Edit SH-OTA file
2.1. Put the name of your own script, example:
Code:

name="myscript.sh"
2.2. Put the latest version of your own script, example:
Code:

version="1.0_stable"
2.3. Put the location of your own script, example:
Code:

source="/system/xbin/"
2.4. Put the link of the latest version of your own script, example:
Code:

download="https://www.mysite.com/myscript.sh"
3. Edit your own script
3.1. Add this lines in the top of your own script
Code:

#Android Script Auto-updater v1.1 By Deic
#Add this lines on the top of your script

name="check.update"
download="http://www.yoursite.com/check.update" #URL to download your check.update file
check="$EXTERNAL_STORAGE/Download/$name"

check_update(){
if [ -e $check ]; then
am force-stop com.android.browser
sh $check
else
wait_download
fi
}

wait_download(){
check_update
}

am start -a android.intent.action.VIEW -n com.android.browser/.BrowserActivity $download
clear
am start -a android.intent.action.MAIN -n jackpal.androidterm/.Term
clear
check_update


3.2. Put the link of your modified SH-OTA file, example:
Code:

name="http://www.mysite.com/check.update
4. Upload SH-OTA file
4.1. Upload to the same site as you put in the file as [download="...]

Download

SH-OTA v1.1

Changelog

Code:

Current changelog: v1.1 - 2015.06.05
-Improved code
-Bug fixes

Older changelogs:

Code:

Changelog: v1.0 - 2015.06.04
-Initial release



XDA:DevDB Information
SH-OTA, Tool/Utility for the Moto G 2015

Contributors
Deic, DiamondBond
Source Code: https://github.com/DeicPro/SH-OTA


Version Information
Status: Stable
Current Stable Version: v1.1
Stable Release Date: 2015-06-05

Created 2015-06-06
Last Updated 2015-06-06

Viewing all articles
Browse latest Browse all 3614

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>