Go Back   Android Forums > Android Discussion > Android Applications > Tasker

New Forums: Nexus Player | Nexus 9
Like Tree6Likes

test: Reply
 
LinkBack Thread Tools
Old January 18th, 2013, 10:56 AM   #1 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default [Profile] [Root] Auto Nandroid backup Manager

Inspired by Silentwitness' question here:

help with nandroid backup via tasker

I wrote this profile / script and have created a thread for it.Content

Contents

Who is this profile for?
What does this profile do exactly?
What do I need to know / understand before using this profile?
What is included in this "Profile"?
The Script
Note to S3 users
Note to Other device users
I want to change this to use my External SD card. How?
Download


Who is this profile for?

This profile has been created for root users. In particular, those who use a ClockWorkMod (CWM) based recovery to take Nandroid backups. A Nandroid backup is a complete image (or snapshot if you will) of the phone at the time it is taken. When a Nandroid backup is restored, the phone is returned to exactly* as it was when the backup was taken.

* Some elements aren't backed up on all devices, such as the Radio/Modem/Baseband


What does this profile do exactly?

This profile will Automatically create a Nandroid backup, every Saturday at 04:00 (am). It boots into recovery, takes the backup and then boots back into Android.

This profile has a 2 week backup retention, so you will always have a maximum of 2 backups, the oldest one being deleted before the new one is taken.

You can also add a widget to the homescreen:

Long press home screen > Add Widget > Task > nandroid

This will allow you to take a backup (and reboot automatically) from your homescreen directly. The Schedule will not be overridden, however, the oldest backup will have been replaced.

WARNING - There is no confirmation on this as yet. Pressing it will immediately boot into recovery. I recommend if you can spare a homescreen to this on its own, please do so.


What do I need to know / understand before using this profile?

To use this profile, you need to know the mount points on your phone both in android and recovery.

For example, on the s3 there is an internal and an external SD card.

In android (S3) these are:
internal - /mnt/sdcard
external - /mnt/extSdCard

In CWM recovery (S3) these are:
internal - /data/media
external - /external_sd

First you must decide if you are going to use the Internal or External SD card.

On a phone that has NO external sdcard, you would follow the rationale of the S3's internal sdcard (/mnt/sdcard in android).

Similarly if you have a phone that has NO internal sdcard, you would still follow the rationale of the internal sdcard (/mnt/sdcard in android).

Essentially EVERY device will use /mnt/sdcard for their Storage, whether that's an external Micro SD card or Internal SD card. Only devices that have an internal AND external SD card will need to look into that deeper.

People with root explorers can browse to the root of their device, find the /mnt directory and see what everything is mounted as. You will be able to get everything you need to use for the "in Android" settings. As for recovery, this could vary from device to device so if you don't know, ask in the development thread (Probably XDA) of your device's recovery.

Note. Mount points are case sensitive. /mnt/extsdcard will not work if it's supposed to be /mnt/extSdCard


What is included in this "Profile"?

The profile consists of 2 elements.

1) The tasker Profile
2) The nandroid.sh script (that needs to be in /mnt/sdcard/clockworkmod/)

Both of these elements are in the attached zip file.


The Script

This script by default uses /mnt/sdcard/clockworkmod/backup as the backup location.

This is the Internal SD card for devices that have both an internal AND external SD card.

This is the External SD card for devices that ONLY have an external SD card.

The backup MUST go in the clockworkmod/backup folder because if it does not, your recovery will not be able to restore the backups. It works best on the /mnt/sdcard directory because this is universal for all devices. However, some devices wipe the internal SD when factory resetting from the Android menu (Galaxy S3), so only reset from recovery.

Here is an extract of the script (and what it does):

Code:
# Set today's date
now=$(date +"%d_%m_%y-%H:%M")

# Deletes previous archive (as contained within index1.txt)
rm -rf $(cat /mnt/sdcard/clockworkmod/backup/index1.txt)

# Moves previous backup to archive (index2 becomes index1 for delete next time)
mv /mnt/sdcard/clockworkmod/backup/index2.txt /mnt/sdcard/clockworkmod/backup/index1.txt

# Stamps new index 2
echo '/mnt/sdcard/clockworkmod/backup/'$now > /mnt/sdcard/clockworkmod/backup/index2.txt

# writes a command for recovery to read (creates index2 backup)
echo 'backup_rom("/data/media/clockworkmod/backup/'$now'");' > /cache/recovery/extendedcommand

Note to S3 users

If you are happy with using the internal SD card for backups, this profile and script can be used unmodified.

Note to Other device users

If you are happy with using the default location of /mnt/sdcard, this script will require minimal modification. Please note that the last command of the script as show below:

Code:
backup_rom("/data/media/clockworkmod/backup/'$now'");
Is where the S3's CWM recovery mounts the /mnt/sdcard (as /data/media). This will most likely be different on otehr devices so you need ensure you know your equivelant.

See again: What do I need to know / understand before using this profile?


I want to change this to use my External SD card. How?

OK, I'll tell you how. Firstly, I will write this as if it was asked by an S3 user because I know the relevant alternative mount points in Android and recovery for this device.

If you do not know your mount points, see again: What do I need to know / understand before using this profile?


1. Modifying the script.

Its best to do this on a computer. Use a notepad or text application that has a "Find and replace" function.

Find: mnt/sdcard
Replace: mnt/extSdCard

Find: data/media
Replace: external_sd

The script now needs to be put into /mnt/extSdCard/clockworkmod/backup

2. Modifying the profile

Well, it's actually editing the task but hey ho...

Open step 1. of the task. Change /mnt/sdcard/ to /mnt/extSdCard/ and save the task / profile.

That's it...



Downloads
Attached Files
File Type: zip nandroid2.zip (994 Bytes, 121 views)

Advertisements
SUroot is offline  
Last edited by SUroot; February 5th, 2013 at 09:55 AM.
Reply With Quote
The Following 7 Users Say Thank You to SUroot For This Useful Post:
D-U-R-X (December 18th, 2013), DragonSlayer95 (January 18th, 2013), electricpete (January 21st, 2013), jobics (March 23rd, 2014), kennymck (May 6th, 2013), silentwitness (January 18th, 2013), simonwil (February 5th, 2013)
sponsored links
Old January 18th, 2013, 02:23 PM   #2 (permalink)
Resident Air Bender
 
DragonSlayer95's Avatar
 
Join Date: Mar 2012
Location: Louisiana
Gender: Male
Posts: 8,473
 
Device(s): Moto G, LG G2, Samsung Galaxy S3, Samsung Galaxy S2, HTC Evo 3D
Carrier: Verizon

Thanks: 2,538
Thanked 3,335 Times in 2,148 Posts
DragonSlayer8724
Default Re: [Profile][Root] Auto Nandroid backup

Very nice!

Thanks for this, it'll definitely come in handy

DS
__________________
Has someone helped you? Dont forget to hit the "thanks" button!
Seen an offense or bad post? Hit the /!\ button!
Android Forums Site Rules/Guidelines
DragonSlayer95 is offline  
Reply With Quote
Old January 18th, 2013, 04:28 PM   #3 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default Re: [Profile][Root] Auto Nandroid backup

D'oh. I forgot to mention it uses secure settings pro, but actually I re-uploaded it because now it doesn't need it. I made as glaring omission from the idea that "reboot recovery" works as a command on android. I feel stupid now.
SUroot is offline  
Last edited by SUroot; January 18th, 2013 at 04:43 PM.
Reply With Quote
Old January 18th, 2013, 04:48 PM   #4 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

lol i just bought secure settings pro and the profile does not work for me the phone just reboots and goes into recovery but does not do anything after it reboots does not backup anything.

edit:-

i cant download the file i get "Invalid Attachment specified. If you followed a valid link, please notify the administrator"
__________________
Running NeatRom 2.2 for G900F
If i helped you please click the thanks button
silentwitness is offline  
Reply With Quote
Old January 18th, 2013, 05:09 PM   #5 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default

Fixed the link.

What do you see in recovery? You may see an error? How long is it in recovery? You will see it backing up if its backing up and will be in recovery for a few minutes. The screen should look exactly the same as if manually backing up. You're using Philz?

Disable the reboot into recovery part of the task please then play the task. Then using a root explorer of some kind, go to /cache/recovery and check extendedcommand is present (and its contents)

The updated profile only changes the reboot to recovery action, so it wont fix the issue either, so the issue is something before that.
SUroot is offline  
Reply With Quote
Old January 18th, 2013, 05:17 PM   #6 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default

Just confirmed profile is definitely working for me. Need to see whats different for you. On the GT-i9300 it should work out of the box, with no additional config or manipulation
SUroot is offline  
Reply With Quote
Old January 19th, 2013, 01:10 AM   #7 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

my phone reboots into recovery and just stays on the main recovery screen(like it would if u boot into recovery no error or anything) it does not do anything i dont see a screen saying backup in progress or anything like that. I am running siyah kernel and a dual boot if that makes a difference. using philz touch recovery.
silentwitness is offline  
Reply With Quote
Old January 19th, 2013, 04:47 AM   #8 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default Re: [Profile] [Root] Auto Nandroid backup

Do what I said 2 posts ago. Sounds like /cache/recovery/extendedcommand is not present.

Also check index files to see if they're blank inside
SUroot is offline  
Reply With Quote
Old January 19th, 2013, 07:22 AM   #9 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default Re: [Profile] [Root] Auto Nandroid backup

And confirm you have the script in the correct place....

/sdcard/clockworkmod/nandroid.sh

No capital letters. Internal sd only
SUroot is offline  
Reply With Quote
Old January 19th, 2013, 11:28 AM   #10 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

i ended up switching my 1st rom(omega) and 2nd rom(neat rom) after which it started working. I was trying to use it from neatrom.
SUroot likes this.
silentwitness is offline  
Reply With Quote
sponsored links
Old January 19th, 2013, 11:33 AM   #11 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default

Quote:
Originally Posted by silentwitness View Post
i ended up switching my 1st rom(omega) and 2nd rom(neat rom) after which it started working. I was trying to use it from neatrom.
Ah good info.

Yes, I suppose that's because the 2nd ROM is on /sdcard already, so it changes the location of everything else. /sdcard/clockworkmod becomes /sdcard/rom/sdcard/clockworkmod or something
silentwitness likes this.
SUroot is offline  
Reply With Quote
Old January 19th, 2013, 01:33 PM   #12 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

ya maybe but its working now i clicked on the play button and it worked. got another strange issue with free space now i dunno whats happening to my phone one issue after another.
silentwitness is offline  
Reply With Quote
Old January 20th, 2013, 03:29 PM   #13 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

Ok strange issue i had an existing backup on 19 and made another backup today(21st) and it has overwritten the backup i had of the 19th there is however a file in the backup folder called index1.txt which has a path to the old backup but the path does not exist. any ideas?
silentwitness is offline  
Reply With Quote
Old January 21st, 2013, 02:03 AM   #14 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default Re: [Profile] [Root] Auto Nandroid backup

Here's what happens.

1. Delete old backup (index1)
2. Make last backup an old backup (index2 becomes index1)
3. Take a new backup (index2)

You should always have 2 backups with index1 being the oldest.

Since you ran the profile many times, who knows what's right. The best thing would be to delete all backups and index files. Take ONE backup using the task if you must. That then puts the backup in the index2 slot.


If you take multiple backups on the same day, they all have the same date so they could all be deleted when index1 has that date in it
SUroot is offline  
Reply With Quote
Old January 21st, 2013, 02:03 AM   #15 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default Re: [Profile] [Root] Auto Nandroid backup

Here's what happens.

1. Delete old backup (index1)
2. Make last backup an old backup (index2 becomes index1)
3. Take a new backup (index2)

You should always have 2 backups with index1 being the oldest.

Since you ran the profile many times, who knows what's right. The best thing would be to delete all backups and index files. Take ONE backup using the task if you must. That then puts the backup in the index2 slot.


If you take multiple backups on the same day, they all have the same date so they could all be deleted when index1 has that date in it
SUroot is offline  
Reply With Quote
Old January 21st, 2013, 02:46 AM   #16 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

the whole folder i had with the date of 19th is missing now. I ran the profile on 19th and made a backup then ran it again today(21st) and made another backup so technically it should have kept both backups intact.
silentwitness is offline  
Reply With Quote
Old January 21st, 2013, 03:58 AM   #17 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default

Yes it should have, but your script does nothing different to mine.

You MUST have ran the task another time, to get that folder date in index 1.

Anyway, action to be taken as previous post. Let the profile do its business. Do not interfere with the profile and task by running it manually all the time.

Please note if you press play on the task twice in one day, even if it does not backup, the index files will change so you must avoid doing this.
  • Action > Delete all index files and folders in /clockworkmod/backup
  • Take one backup using the task

Then you will be starting fresh.
SUroot is offline  
Last edited by SUroot; January 21st, 2013 at 04:07 AM.
Reply With Quote
The Following User Says Thank You to SUroot For This Useful Post:
silentwitness (January 21st, 2013)
Old January 21st, 2013, 11:44 AM   #18 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

ok i deleted both index files and ran the backup again now only have 1 index file called index2.txt. It contains information for 21_01_13 which is the new backup i created today. So now when the task runs automatically on the weekend it will create index1.txt i assume?
SUroot likes this.
silentwitness is offline  
Reply With Quote
Old January 21st, 2013, 12:43 PM   #19 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default Re: [Profile] [Root] Auto Nandroid backup

Quote:
Originally Posted by silentwitness View Post
ok i deleted both index files and ran the backup again now only have 1 index file called index2.txt. It contains information for 21_01_13 which is the new backup i created today. So now when the task runs automatically on the weekend it will create index1.txt i assume?

So when the task runs, it will delete the folder mentioned in index1 (but this time it doesn't exist).

Then it renames index2 to index1

Then it creates a new index2 with the name of the backup its going to take.

Then it takes a backup.



To clarify, index2 is always newest backup. Index1 is always the next one to be deleted.

So it:

Deletes oldest backup
Renames newest backup to oldest backup
Creates new newest backup.

Its hard to describe. Hope it makes sense
SUroot is offline  
Reply With Quote
The Following User Says Thank You to SUroot For This Useful Post:
silentwitness (January 21st, 2013)
Old January 21st, 2013, 02:39 PM   #20 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

ok cool thanks a million for all ure help will just check the folder after the next schedule run and see.
silentwitness is offline  
Reply With Quote
sponsored links
Old January 21st, 2013, 03:13 PM   #21 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default

Awesomeness!
SUroot is offline  
Reply With Quote
Old January 21st, 2013, 04:20 PM   #22 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default

Would it be worth adding time to the backup name and a widget to manually trigger Nandroids?
SUroot is offline  
Reply With Quote
Old January 22nd, 2013, 08:36 AM   #23 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default

OK I did. Added time to backup and a nandroid widget to kick off a backup (means dont have to wait a day between backups)
SUroot is offline  
Reply With Quote
The Following User Says Thank You to SUroot For This Useful Post:
silentwitness (January 23rd, 2013)
Old January 27th, 2013, 11:52 AM   #24 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

ok quick question now sure if its possible with tasker or not i have this profile setup it is working great but i have setup a pin lock for my phone is there anyway to get tasker to enter the pin lock when it boots again after doing the backup??
silentwitness is offline  
Reply With Quote
Old January 27th, 2013, 12:03 PM   #25 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default

When is the pinlock presented? Is this a different pin lock to the lockscreen? Is it a boot up pin?
SUroot is offline  
Reply With Quote
Old January 27th, 2013, 12:34 PM   #26 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

sim card lock pin it comes up as soon as the phone boots. It is different to the pin/pattern lock of the lock screen. Actually it presents itself after the phone boots and comes to the lock screen and u unlock and it asks u for the pin to continue.
silentwitness is offline  
Reply With Quote
Old January 27th, 2013, 12:40 PM   #27 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default

Oh i see. Probably not but I'll look into it.
SUroot is offline  
Reply With Quote
The Following User Says Thank You to SUroot For This Useful Post:
silentwitness (January 27th, 2013)
Old January 27th, 2013, 12:45 PM   #28 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

thanks i did try googling it but didnt get very good or accurate responses.
silentwitness is offline  
Reply With Quote
Old January 28th, 2013, 01:30 AM   #29 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default Re: [Profile] [Root] V2 - Auto Nandroid backup Manager

I'm sorry, I dont think its possible
SUroot is offline  
Reply With Quote
Old January 30th, 2013, 04:21 AM   #30 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

ok cool no problem thanks for all the help.
silentwitness is offline  
Reply With Quote
sponsored links
Old February 5th, 2013, 08:21 AM   #31 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default

I've updated post 1 to make it more user friendly.
SUroot is offline  
Reply With Quote
Old March 10th, 2013, 12:18 PM   #32 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

hey SU does this profile work for you in 4.2.1? It's not working for me. I tried manually running the profile and it does nothing(i get a message that tasker/secure settings has been granted SU status) but nothing else happens no reboot. i then had a look at the file structure i ended up cloning the profile and created a second one with the path as sh/mnt/shell/emulated/0/clockworkmod/nandroid.sh assuming it was unable to read the sh file but it still didnt work.
silentwitness is offline  
Reply With Quote
Old March 11th, 2013, 05:29 AM   #33 (permalink)
Junior Member
 
Join Date: Aug 2010
Posts: 22
 
Device(s):
Carrier: Not Provided

Thanks: 5
Thanked 4 Times in 3 Posts
Default

Anyone know if this will work with AmonRa?
Katmeat is offline  
Reply With Quote
Old March 11th, 2013, 07:13 AM   #34 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

it is not rom specific. I am assuming AmonRa is a custom rom.
silentwitness is offline  
Reply With Quote
Old March 11th, 2013, 02:50 PM   #35 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default Re: [Profile] [Root] Auto Nandroid backup Manager

No it only works with CWM variants. Extended commands are cwm only.
SUroot is offline  
Reply With Quote
Old March 11th, 2013, 02:59 PM   #36 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default Re: [Profile] [Root] Auto Nandroid backup Manager

Quote:
Originally Posted by silentwitness View Post
hey SU does this profile work for you in 4.2.1? It's not working for me. I tried manually running the profile and it does nothing(i get a message that tasker/secure settings has been granted SU status) but nothing else happens no reboot. i then had a look at the file structure i ended up cloning the profile and created a second one with the path as sh/mnt/shell/emulated/0/clockworkmod/nandroid.sh assuming it was unable to read the sh file but it still didnt work.
It will need updating
SUroot is offline  
Reply With Quote
Old March 11th, 2013, 03:41 PM   #37 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

ohh ok cool so what exactly would need to be updated? I tried manually creating a backup to internal memory from philz touch but after it completed i could not see it in the file manager. Im guessing if i were to change the path to external sd it would solve the issue and it would work?
silentwitness is offline  
Reply With Quote
Old March 11th, 2013, 04:33 PM   #38 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default

Quote:
Originally Posted by silentwitness View Post
ohh ok cool so what exactly would need to be updated? I tried manually creating a backup to internal memory from philz touch but after it completed i could not see it in the file manager. Im guessing if i were to change the path to external sd it would solve the issue and it would work?
I've just tested this. I know it works on the S3 4.2.1.... I'm not sure about other devices....

But it should be:

[HIGH]# Set today's date
now=$(date +"%d_%m_%y-%H%M")

# Deletes previous archive (as contained within index1.txt)
rm -rf $(cat /sdcard/clockworkmod/backup/index1.txt)

# Moves previous backup to archive (index2 becomes index1 for delete next time)
mv /sdcard/clockworkmod/backup/index2.txt /sdcard/clockworkmod/backup/index1.txt

# Stamps new index 2
echo '/sdcard/clockworkmod/backup/'$now > /sdcard/clockworkmod/backup/index2.txt

# writes a command for recovery to read (creates index2 backup)
echo 'backup_rom("/sdcard/0/clockworkmod/backup/'$now'");' > /cache/recovery/extendedcommand[/HIGH]

But yes, instead of above, you could set external_sd where sdcard/0 is.
SUroot is offline  
Reply With Quote
The Following User Says Thank You to SUroot For This Useful Post:
silentwitness (March 12th, 2013)
Old March 12th, 2013, 04:49 AM   #39 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

ok so i updated the nandroid.sh file(with the code given above) and when i click on play it still does nothing i just get a message that tasker has been granted SU permissions.
silentwitness is offline  
Reply With Quote
Old March 12th, 2013, 06:04 AM   #40 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default

You will need to change the task to point to the new script location too

sh /storage/emulated/legacy/clockworkmod/nandroid.sh
SUroot is offline  
Reply With Quote
The Following User Says Thank You to SUroot For This Useful Post:
silentwitness (March 12th, 2013)
sponsored links
Old March 13th, 2013, 01:47 AM   #41 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

i made the changes as said above but still nothing it does not restart the phone it just gives me the same message(tasker has been granted SU permissions). Also can i ask how did u manage to get that path for the clockworkmod folder?

I tried deleting my entire profile from tasker and re adding it again but still does not work.

you can get to the clockworkmod folder through so many different paths

/storage/emulated/legacy/clockworkmod/nandroid.sh

/storage/emulated/0/clockworkmod/nandroid.sh

/sdcard/clockworkmod/nandroid.sh

/mnt/sdcard/clockworkmod/nandroid.sh

how do we know for sure which path to use? Technically i know any one of them should work as they are all pointing to the same location. Sorry if its a dumb question but im not a linux guy.
silentwitness is offline  
Last edited by silentwitness; March 13th, 2013 at 01:58 AM.
Reply With Quote
Old March 13th, 2013, 02:22 AM   #42 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default Re: [Profile] [Root] Auto Nandroid backup Manager

Quote:
Originally Posted by silentwitness View Post
how do we know for sure which path to use?
Because I tested them!

Reboot is not even part of the script! Not rebooting is no indication of whether the script works or not.

Run the task then check if extended commands is in cache or if contents of index has changed. They are only ways to tell if script is running.

Not rebooting is separate issue.

The paths I said should work. At least they do for me on omega
SUroot is offline  
Reply With Quote
Old March 13th, 2013, 04:16 PM   #43 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

Ok I'm sorry but all the stuff you said to check makes no sense to me at all. how would i check?
silentwitness is offline  
Reply With Quote
Old March 13th, 2013, 04:50 PM   #44 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default Re: [Profile] [Root] Auto Nandroid backup Manager

Run the script then see if index2 contains today's date.
SUroot is offline  
Reply With Quote
Old March 14th, 2013, 04:37 AM   #45 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

well the clockworkmod folder is empty there are no index files there. Only file in the folder is nandroid.sh.
silentwitness is offline  
Reply With Quote
Old March 14th, 2013, 09:57 AM   #46 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default

Are you running the task from tasker itself or from a shortcut on the home screen?

Obviously something is wrong somewhere from your config but being remote I cannot see it.

Its either the link to the script, the locations in the script or tasker itself.
SUroot is offline  
Reply With Quote
Old March 14th, 2013, 12:47 PM   #47 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

im running it from tasker itself open the nandroid task and click play. So any suggestions? I tried deleting the entire profile and re creating it and it didnt seem to help. If i were to create it on the external memory(with the old script) it would work right?
silentwitness is offline  
Reply With Quote
Old March 14th, 2013, 01:01 PM   #48 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default Re: [Profile] [Root] Auto Nandroid backup Manager

Can you export your profile and zip it up with your version of the script please? So I can look at it and test it on my phone?
SUroot is offline  
Reply With Quote
Old March 14th, 2013, 01:33 PM   #49 (permalink)
Senior Member
 
silentwitness's Avatar
 
Join Date: Aug 2012
Location: Bombay India
Gender: Male
Posts: 1,013
 
Device(s): Samsung Galaxy s5 G900F and Samsung galaxy tab pro 8.4
Carrier: Vodafone India

Thanks: 292
Thanked 272 Times in 230 Posts
Default

sure no problem. The profile is the exact same one posted on this page i re downloaded it recently and used it. The script i copied from what you pasted above. The file is attached. Thanks for all the help and sorry for all the problems and questions.
Attached Files
File Type: zip nandroid.zip (985 Bytes, 6 views)
SUroot likes this.
silentwitness is offline  
Reply With Quote
Old March 14th, 2013, 03:04 PM   #50 (permalink)
ROM Developer
Thread Author (OP)
 
SUroot's Avatar
 
Join Date: May 2010
Location: Riddlesden, West Yorkshire, UK
Posts: 23,926
 
Device(s): SGS3 (Current) HTC Desire (Retired)
Carrier: 3 UK

Thanks: 1,923
Thanked 5,328 Times in 3,996 Posts
Default Re: [Profile] [Root] Auto Nandroid backup Manager

Your profile runs my script ok but I've already changed mine to work on external sd card.

It (the script) still lives on internal sd card (so don't change profile) and try this external sd script....

Code:
# Set today's date
now=$(date +"%d_%m_%y-%H%M")

# Deletes previous archive (as contained within index1)
rm -rf $(cat /extSdCard/clockworkmod/backup/index1.txt)

# Moves previous backup to archive (index2 becomes index1 for delete next time)
mv /mnt/extSdCard/clockworkmod/backup/index2.txt /mnt/extSdCard/clockworkmod/backup/index1.txt

# Stamps new index 2
echo '/mnt/extSdCard/clockworkmod/backup/'$now > /mnt/extSdCard/clockworkmod/backup/index2.txt

# writes a command for philz to read (creates index2 backup)
echo 'backup_rom("/external_sd/clockworkmod/backup/'$now'");' > /cache/recovery/extendedcommand
This is working for me at the mo....
SUroot is offline  
Reply With Quote
Reply


Go Back   Android Forums > Android Discussion > Android Applications > Tasker
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 09:44 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.