[Script]DSploit Updater - Galaxy S 5 General

Dsploit is not an application I made, all credit belongs to evilsocket. I only made this script to update the apk.
Every hour or so, everytime the source code of the app changes. A apk is generated automatically.
So this script updates the apk every time you type the command in android terminal emulator.
HOW TO INSTALL?
1) Download the dsupdate.zip
2) Flash it in recovery mode.
HOW TO USE?
1) Download Android Terminal Emulator from the playstore if you had not done so..
2) Open the app
3) Type the following:-
su -
dsupdate
*NOTE Ignore the app_process warnings
4) That's it. You successfully updated the app.
What this script currently does?
1) Backs up the current apk.
2) Downloads the latest apk.
3) Installs the latest version.
This is the current script, if anyone has any suspicions...
Code:
#!/system/bin/sh
DT=$(busybox date)
echo "Script Made By La2o"
echo "Script started at:- $DT"
echo "Checking if old backup exists..."
if [ -e /data/app/it.evilsocket.dsploit-1.apk.bak ]; then
echo "Backup found! Deleting..."
rm -f /data/app/it.evilsocket.dsploit-1.apk.bak
fi
echo "Making a backup of the current apk..."
cp /data/app/it.evilsocket.dsploit-1.apk /data/app/it.evilsocket.dsploit-1.apk.bak
chmod 0644 /data/app/it.evilsocket.dsploit-1.apk.bak
echo "Done!"
cd sdcard
echo "Downloading Nightly APK"
busybox wget "http://94.75.228.27/dsploit/dSploit-nightly.apk"
echo "Installing!"
pm uninstall it.evilsocket.dsploit
pm install dSploit-nightly.apk
echo "Done..."
echo "Deleting Downloaded APK";
rm -f dSploit-nightly.apk
echo "Checking if the app installed correctly..."
cd ..
cd /data/app
ls -a -l | grep dsploit
echo "Done"

Related

[Solved]Help to mount SDcard

Hi I built a little script to mount my SDcard @ startup of the phone and install some apps.
here it is:
Code:
sleep 2
busybox mount > /data/mount.txt
busybox ls /dev/block/vold >> /data/mount.txt
busybox mount -t vfat -o rw,dirsync,nosuid,nodev,noexec,uid=1000,gid=1015,fmask=0702,dmask=0702,allow_utime=0020,shortname=mixed,utf8 /dev/block/vold/179:1 /sdcard >> /data/mount.txt
busybox mount >> /data/mount.txt
sleep 3
echo "APPS installation"
if [ -e /sdcard/Apps-install/install.txt ];
then
echo "found file" > /sdcard/Apps-install/install.txt
cd /sdcard/Apps-install
ls *.apk > ./apps.txt
for line in $(cat apps.txt); do install -c -D /sdcard/Apps-install/"$line" /data/app >> /sdcard/Apps-install/install.txt; done
echo "ok" >> /sdcard/Apps-install/install.txt
else
echo "file not found" > /sdcard/Apps-install/install.txt
fi;
sleep 2
echo "Finish"
if [ -e /data/firstboot.sh ];
then
busybox rm -f /data/firstboot.sh;
busybox rm -f /sdcard/Apps-install/apps.txt;
fi;
echo "Restart"
sleep 1
reboot
I'm sure that the code is well executed (as is have data in /data/mount.txt) but the mount of the SD and so every work related to the SD
What is strange is that script work if i execute it after the phone has completely started.
Can someone help please.
Bye
Herc.8)
A Little up for a little help
Hi,
I still need help,
thx by advance
Bye
Herc. 8)
Ok finally found bye myself.
I changed the device: /dev/block/vold/179:1 for /dev/block/mmcblk0p1
That's all.
Bye
Herc. 8)

[STOCK]INIT.D support. No need to flash anything or even reboot into recovery

So yea I've been working on a proper "app2sd" solution that doesn't involve just switching the MicroSD for the eMMC, but I like the stock rom so far, so I didn't feel like flashing a rom just to get init.d, and I didn't feel like modifying the ramdisk in the kernel either. So I cooked up this script that anyone can run from terminal to get init.d support. It should work for other devices too, as long as they run /system/etc/install-recovery.sh on boot.
There's only three requirements for it to work:
#1 You must be rooted
#2 Your device must run /system/etc/install-recovery.sh
#3 You must have busybox
I tested a few times on my own device (GT-N8013), but haven't had anyone else test it, so don't freak out if it doesn't work. Just let me know what went wrong and I'll figure something out.
Running it is very simple:
#1 Open any terminal app
#2 su
#3 navigate to the folder where you have the script
#4 sh ./enableinit.sh
Your device will be rebooted once the process is done, don't freak out. If everything went fine, you'll have a file in /sdcard called init.d.log created by the test init.d script that is made by the enabler.
You can either download the attachment (rename it to enableinit.sh if you get the attachment), or create the file with the contents betlow:
Code:
#!/system/bin/sh
# Adds init.d support to any device that automatically runs /system/etc/install-recovery.sh
# on startup.
#
# Made by TweakerL, make sure to visit us at and-host.com or chat with us on freenode #and-host
echo '##################################################'
echo '## ##'
echo '## Script by TweakerL ##'
echo '## Visit us at and-host.com ##'
echo '## Chat with us at freenode #and-host ##'
echo '## ##'
echo '##################################################'
echo ''
echo 'This script will enable init.d if your device'
echo 'executes /system/etc/install-recovery.sh'
echo ''
echo 'Your tablet will be rebooted once the process'
echo 'is done.'
echo ''
echo 'If the script successfully enabled init.d you will'
echo 'have a file in /sdcard called init.d.log after'
echo 'the device is done rebooting. Remember to always'
echo 'set the proper permissions in your scripts or they'
echo 'will not work.'
echo ''
read -p "Press ENTER to continue..."
if [ ! -f /system/xbin/busybox -a ! -f /system/bin/busybox ]
then
echo 'You do not have busybox. Exiting now...'
else
# Mount system as rw in order to execute the script
busybox mount -o remount,rw -t ext4 /dev/block/mmcblk0p9 /system
# Check if install-recovery.sh already exists, and if so
# add the necessary lines, otherwise create it
if [ -f /system/etc/install-recovery.sh ]
then
if cat /system/etc/install-recovery.sh | busybox egrep -i "sysinit"
then
echo sysinit already present in install-recovery.sh, skipping this step.
else
busybox cp -f /system/etc/install-recovery.sh /sdcard/qsxdrgbhuk.sh
echo '' >> /sdcard/qsxdrgbhuk.sh
echo '/system/bin/sysinit' >> /sdcard/qsxdrgbhuk.sh
busybox cp -f /sdcard/qsxdrgbhuk.sh /system/etc/install-recovery.sh
fi
else
echo '#!/system/bin/sh' >> /sdcard/qsxdrgbhuk.sh
echo '' >> /sdcard/qsxdrgbhuk.sh
echo '/system/bin/sysinit' >> /sdcard/qsxdrgbhuk.sh
busybox cp -f /sdcard/qsxdrgbhuk.sh /system/etc/install-recovery.sh
busybox chmod 755 /system/etc/install-recovery.sh
fi
# Check if sysinit already exists and if so skip step
# otherwise create it
if [ ! -f /system/bin/sysinit ]
then
echo '#!/system/bin/sh' >> /sdcard/kuhbgrdxsq
echo 'export PATH=/sbin:/system/sbin:/system/bin:/system/xbin' >> /sdcard/kuhbgrdxsq
echo '' >> /sdcard/kuhbgrdxsq
echo '/system/bin/logwrapper busybox run-parts /system/etc/init.d' >> /sdcard/kuhbgrdxsq
busybox cp -f /sdcard/kuhbgrdxsq /system/bin/sysinit
busybox chmod 755 /system/bin/sysinit
else
echo sysinit already exists in /system/bin. init.d should already be enabled.
fi
# Cleanup
busybox rm -f /sdcard/qsxdrgbhuk.sh
busybox rm -f /sdcard/kuhbgrdxsq
#Check that init.d folder exists and if not create it
# as well as set the right permissions
if [ -d '/system/etc/init.d' ]
then
chmod 755 /system/etc/init.d
else
mkdir /system/etc/init.d
chmod 755 /system/etc/init.d
fi
# Create a test init.d script that echoes a file to
# /sdcard on successful execution
echo '#!/system/bin/sh' > /sdcard/99testinit
echo '' >> /sdcard/99testinit
echo 'echo init.d works > /sdcard/init.d.log' >> /sdcard/99testinit
busybox cp -f /sdcard/99testinit /system/etc/init.d
chmod 755 /system/etc/init.d/99testinit
busybox rm -f /sdcard/99testinit
# Sync and remount system
sync
busybox mount -o remount,ro -t ext4 /dev/block/mmcblk0p9 /system
# Reboot system to enable init.d
if [ -f /system/bin/reboot ]
then
echo Your device will reboot in 3 seconds
sleep 3
reboot
else
echo "Your device doesn't appear to have a reboot command,"
echo "please reboot your device now to avoid problems."
fi
fi
reserved
TweakerL said:
reserved
Click to expand...
Click to collapse
it is good!
TweakerL said:
reserved
Click to expand...
Click to collapse
Thanks for sharing.
Im tested my ainol elf offical rom novo0706, and worked. Thank
Sent from my Ainol Novo 7 Elf using Tapatalk 2
Pretty awesome. Will edit once i try this out.
Edit: Everything worked. Tested on GT-N8013
Thanks alot.
Sent from my GT-N8013 using Tapatalk 2
Hi, Can you tell more clearly how to make this work.
Sent from my GT-N8000 using xda app-developers app
Can any one make .zip file to flash thru recovery..thanks
The point was not to have to go into recovery...
Anyway, it's really simple...
Download the attached file
open terminal
then do the following commands
Code:
su
cd /sdcard
sh ./Download/enableinit.sh.txt
assuming that your browser saves files to /sdcard/Download
Sorry, I am a computer idiot . I really donot how to do after I had downloaded the text file. Appreciated if you can explain more detail.
Sent from my GT-N8000 using xda app-developers app
So now with init.d support ready, is it going to be possible to run proper a2sd scripts? And which one specifically would you recommend? Excuse me if i'm asking the wrong questions.
andylam16 said:
Sorry, I am a computer idiot . I really donot how to do after I had downloaded the text file. Appreciated if you can explain more detail.
Sent from my GT-N8000 using xda app-developers app
Click to expand...
Click to collapse
It has nothing to do with knowing anything about computers, as you don't need a computer to do this... just your device...
Download the file, on your device, if you're using stock browser it will go to /sdcard/Download
Make sure you have busybox, download a busybox installer from the market, install it, and run it, and tell it to install busybox
Download a terminal app from the play store for free, such as android terminal emulator, install it and open it
then type in these exact commands, just like they're in here, in the terminal:
Code:
su
sh /sdcard/Download/enableinit.sh
Assuming of course, that your stuff is getting download to /sdcard/Download.
If you can't do this... sell your android device and buy an iCrap one...
drnish83 said:
So now with init.d support ready, is it going to be possible to run proper a2sd scripts? And which one specifically would you recommend? Excuse me if i'm asking the wrong questions.
Click to expand...
Click to collapse
I'm working on my own app2sd script that should beat anything ever made. Here's what it does:
It uses a second partition in the MicroSD card for gaining extra storage, this partition has to be formatted to ext4
#1 It mounts the external ext4 partition to a new location
#2 It detects the location for /sdcard/Android; /data/data; /data/app no matter what device you have (suppose the directories aren't the same for a certain device)
#3 It has the option to mount /sdcard/Android to a folder in the external partition
#4 It has the option to mount /data/data to a folder in the external partition
#5 It has the option to mount /data/app to a folder in the external partition
#6 It has the option to automatically copy everything from any of those folders to the appropriate folder in the external partition
#7 It has the option to automatically wipe from the internal storage anything that it moves
#8 If you have all options enabled, apps will be automatically installed to the external partition and never take any space in the internal storage, while everything else (Download/recovery/backup/pictures/videos/etc...) all remain in the internal partition.
Wow... cant wait for this script
Sent from my GT-N8013 using Tapatalk 2
Thanks for explaining. Interesting indeed! Will definitely wait for it eagerly!
Here's a preview of the super app2sd script I'm working on. Much of it is already implemented, should have it all in a couple of days
confusing
I have tried your script and it has successful at first.. then i flashing my note again with stock rom and i try using ur script again but now there is nothing chance.. do you know why?? what must i do now??
You know, this is the damnedest thing, but your instructions call for Busybox installation, and I can't install Busybox on my N8013. And tips you can share?
NessLookAlike said:
You know, this is the damnedest thing, but your instructions call for Busybox installation, and I can't install Busybox on my N8013. And tips you can share?
Click to expand...
Click to collapse
Busy box installs on mine.
Sent from my GT-N8013 using Tapatalk 2
NessLookAlike said:
You know, this is the damnedest thing, but your instructions call for Busybox installation, and I can't install Busybox on my N8013. And tips you can share?
Click to expand...
Click to collapse
Only reason you wouldn't be able to install busybox is if you're not rooted.
Mr tweaker, i have done the process of init.d but there is nothing changed.. where is my false?
Sent from my GT-N8000 using XDA Premium HD app
Welly_11 said:
Mr tweaker, i have done the process of init.d but there is nothing changed.. where is my false?
Sent from my GT-N8000 using XDA Premium HD app
Click to expand...
Click to collapse
Look for these files and let me know if they're there:
/system/etc/install-recovery.sh
/system/bin/sysinit
/system/etc/init.d/99testinit
**************************************
If anybody needs help, look for me on irc - #and-host in freenode

[Q] Odex Script For User (/data/app) Apps :)

Dear bros and members here,
I want some script for using dexopt-wrapper to some location
Example: if there is file in (/sdcard/app)
then the script should prompt two request:
the first is the apk file name
and the other is the odex file name and should execute
dexopt-wrapper /sdcard/app/name.of.the.apk /sdcard/app/name.of.the.odex
Please, I want this in shell script
Here you are:
Code:
#!/system/bin/sh
# In the name of Allah
tmp=/data/local/tmp
mkdir $tmp > /dev/null 2>&1
BCP="`cat /init.rc | grep BOOTCLASSPATH`"
echo $BCP>$tmp/fbcp.txt
sed -e 's/export BOOTCLASSPATH //g' $tmp/fbcp.txt>$tmp/bcp.txt
BCP="`cat $tmp/bcp.txt`"
rm $tmp/fbcp.txt
rm $tmp/bcp.txt
echo "Please enter the name of app to odex:"
echo "Example: Browser"
echo "--->"
read APP
if [ ! -f /sdcard/app/${APP}.apk ]; then
echo "Requested app not found."
echo "Please check the app name again."
else
dexopt-wrapper /sdcard/app/${APP}.apk /sdcard/app/${APP}.odex ${BCP}
zip -d /sdcard/app/${APP}.apk classes.dex
echo "Done!"
fi;
Sent from my E15i using Tapatalk 2
Ahmad.H said:
Here you are:
Code:
#!/system/bin/sh
# In the name of Allah
tmp=/data/local/tmp
mkdir $tmp > /dev/null 2>&1
BCP="`cat /init.rc | grep BOOTCLASSPATH`"
echo $BCP>$tmp/fbcp.txt
sed -e 's/export BOOTCLASSPATH //g' $tmp/fbcp.txt>$tmp/bcp.txt
BCP="`cat $tmp/bcp.txt`"
rm $tmp/fbcp.txt
rm $tmp/bcp.txt
echo "Please enter the name of app to odex:"
echo "Example: Browser"
echo "--->"
read APP
if [ ! -f /sdcard/app/${APP}.apk ]; then
echo "Requested app not found."
echo "Please check the app name again."
else
dexopt-wrapper /sdcard/app/${APP}.apk /sdcard/app/${APP}.odex ${BCP}
zip -d /sdcard/app/${APP}.apk classes.dex
echo "Done!"
fi;
Sent from my E15i using Tapatalk 2
Click to expand...
Click to collapse
Thanks a lot bro!
There's a syntax error.
I type in the terminal and output is looked like this
/sdcard/odex.sh: 4: Syntax error: Bad fd number
anyway, I fix it to
line 4: mkdir $tmp > /dev/null 2&>1
but it still doesn't work..
Many errors in shell script.. Please test it and correct something.. Please bro..
I really like your script if it would be executable because it has classes.dex delete function..
Thanks

[script] clean up SWAP partition bash script

Hello there,
this is a simple script how to clean up the swap partition without restart or typing commands in the terminal.
Tested on:
- CM9 (Milestone A853)
Requirements:
- rooted device
- swap partition (/dev/block/mmcblk0p3)
- GScript Application (thanks to rogro82) http://forum.xda-developers.com/showthread.php?t=486486
Make sure GScript has root access and the script in the application has su rights.
Here comes the script:
Code:
if [ -e "/sdcard/swapre/" ];then
echo "folder exists, we are good to go"
else
mkdir /sdcard/swapre/
touch /sdcard/swapre/log.txt
fi
swapoff /dev/block/mmcblk0p3
echo "swap is off, please wait"
echo "swap is off" > /sdcard/swapre/log.txt
swapon /dev/block/mmcblk0p3
echo "swap is on, hold a second to finish"
echo "swap is on" >> /sdcard/swapre/log.txt
echo "swap was restarted at:" >> /sdcard/swapre/log.txt
date -u >> /sdcard/swapre/log.txt
7z version -> https://dl.dropbox.com/u/2969199/swp.7z
the script will crate a folder on the sd card, with a log file within. Just in case you want to see what happened
I recommend to create a shortcut on the desktop, after you installed GScript and the script, for easier access.
You should be fine with your device and it should work
well, have fun.

Zenfone 2 Laser [Z00T] ASUS camera to SD app script (ROOT) Lineage/CM (7.1.1)

This is a script based on this great post https://forum.xda-developers.com/showpost.php?p=70357867&postcount=734
I've compiled te steps needed for fix automation on this script, to spare some time.
First of all you need to be root to run this
You can run this script from any file manager (as root) no command line access needed.
Need to have ASUS camera previously installed, once the app is installed, just run the script (I have it saved on my SD card).
Be aware, after script finish to run your phone will reboot.
fixcamera.sh
Code:
echo "Fixing Camera..."
echo "Start..."
echo "Re-mount /system as rw file system..."
mount -o rw,remount /system
cd /system/priv-app
echo "Creating /system/priv-app/AsusCamera"
mkdir AsusCamera
echo "Updating permissions"
chmod 755 AsusCamera
echo "Copying AsusCamera base.apk to /system/priv-app/AsusCamera"
cp /data/app/com.asus.camera-1/base.apk /system/priv-app/AsusCamera
echo "Uninstalling Asus Camera"
cd /data/app/
rm -rf com.asus.camera-1
echo "Setting permissions"
chmod 644 /system/priv-app/AsusCamera/base.apk
res=`cat /system/build.prop |grep ro.epad.mount_point.microsd=/storage/sdcard1`
if [ -z $res ]
then
echo "ro.epad.mount_point.microsd=/storage/sdcard1" >> /system/build.prop
fi
echo "Installing Asus Camera base.apk"
cd /system/priv-app/AsusCamera/
pm install base.apk
reboot
Be sure to set proper permissions to script file.
It worked for me on CM 7.1.1 and Latest 7.1.1 LineageOs releases.
Haven't tried it with other Zenfone models, but you can take your chances.
NOTE: Asus Camera app will just dissapear on every update, so after every install, you need first install Asus Camera from market and run this.

Categories

Resources