[-]
Who's Online
There are currently 2787 online users. [Complete List]
» 5 Member(s) | 2782 Guest(s)
AvatarAvatarAvatarAvatar
Avatar

[-]
Latest Threads
ZH960 Tablet Bricked
Last Post: luis mar que
2024-03-20 19:52
» Replies: 15
» Views: 9708
Thanks, I've been looking for this for a...
Last Post: StevenRip
2024-02-25 05:00
» Replies: 0
» Views: 28
[SOLVED] Need ROM for ZH960-MB-V4.1
Last Post: ery1988
2024-02-21 08:59
» Replies: 0
» Views: 97
NEED ROM ZH960-MB-V4.1
Last Post: ery1988
2024-02-21 08:53
» Replies: 18
» Views: 13559
Budget phone choice help needed
Last Post: sabir7272
2024-02-10 06:52
» Replies: 4
» Views: 4211
ZH960-MB-V3.1 SOLVE
Last Post: Pranav1
2023-12-20 20:22
» Replies: 77
» Views: 33599
Need ROM for SONIM XP7S Android 5.1.1
Last Post: Alpa
2023-11-29 22:17
» Replies: 0
» Views: 82
Need rom for X101 Mt6592
Last Post: carencell
2023-11-24 21:30
» Replies: 3
» Views: 2057
Gizbeat 101: Get your MTK6589 MTK6577 MT...
Last Post: Alexia78
2023-11-13 11:28
» Replies: 8
» Views: 22271
ZH960-MB-V3.1
Last Post: Giankyworld81
2023-11-01 19:35
» Replies: 21
» Views: 15379
Need rom for a tablet with board id "K10...
Last Post: oliver2
2023-10-24 20:23
» Replies: 6
» Views: 5225
How to Connect open public wifi
Last Post: oliverben45
2023-10-24 16:03
» Replies: 11
» Views: 8801
I NEED FILE FOR ITEL MOBILE PHONE AND TO...
Last Post: Meghnad45
2023-10-22 02:38
» Replies: 1
» Views: 1383
NEED Help Bricked my phone.
Last Post: Meghnad45
2023-10-22 02:36
» Replies: 4
» Views: 4789
Introduction
Last Post: ezrahidaya
2023-10-14 14:38
» Replies: 3
» Views: 1307
Needs help to root a china tablet brand ...
Last Post: ezrahidaya
2023-10-14 14:37
» Replies: 1
» Views: 176
Any tips to stay awake?
Last Post: ezrahidaya
2023-10-14 14:35
» Replies: 6
» Views: 4965
Need ROM for china TAb MT6797
Last Post: ezrahidaya
2023-10-14 14:34
» Replies: 1
» Views: 321
need this stock firmware for my tablet M...
Last Post: ramzii888
2023-10-14 02:20
» Replies: 4
» Views: 4466
Encryption Unsuccessful - Reset Android
Last Post: Aakriti
2023-10-13 16:51
» Replies: 3
» Views: 12382
betools
Last Post: egdeim
2023-09-21 12:41
» Replies: 4
» Views: 5025
[Movie Suggestion] Automata with Antonio...
Last Post: GottaGetX
2023-09-07 09:19
» Replies: 3
» Views: 4095
Suggest a movie thread
Last Post: GottaGetX
2023-09-07 09:17
» Replies: 5
» Views: 8783





Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Tutorial] Linux Backup NVRAM Script.
#1
If you use my scripts or work in your own scripts, your scripts or license should reflect that.


This is a script to backup your NVRAM, this is a Linux script can be modified to work on windows as a batch file.

open terminal

Code:
adb shell cat /proc/dumchar_info

find your nvram
Code:
nvram        0x0000000000500000   0x0000000000400000   2   /dev/block/mmcblk0


copy hex into [Only registered and activated users can see links Click here to register]

type dec into calculator ÷ 4096

example below first # = count, second # = skip

Code:
5242880÷4096=1280
4194304÷4096=1024


Linux users connect rooted phone to pc, have adb setup and working, copy and paste script, set permissions change count and skip numbers to your own numbers if different than mine, open terminal run from a directory of choice.

Code:
#!/bin/bash

adb shell su -c "busybox tar -czvf /sdcard/nvram.tgz /data/nvram"

adb pull /sdcard/nvram.tgz

rm -r /sdcard/nvram.tgz

adb shell su -c "dd if=/dev/block/mmcblk0 of=/sdcard/nvram.bin bs=4096 count=1280 skip=1024"

adb pull /sdcard/nvram.bin

rm -r /sdcard/nvram.bin
alexzap, Sniper47, linr76, aus9, tradis like this post
If you use my scripts or work in your own scripts, your scripts or license should reflect that.

ZTE Open C
Reply
#2
vampirefo

I have not completed this script

I have made a few modifications for a number of reasons
namely....on my distro....usb devices are not given execute permissions to the local user
2) I want to make it easy for a new Linux user.....but I do not claim to be an expert
----and may be wrong.....but tested script so far

This script is a work in progress and misses the action bit for a reason
I am not sure why you are choosing output file to Android device
b) if you prefer not to adopt it ....I don't want to waste your time any further

Let me know what you think

As I have questions feel free to ask yours

cheers

[Only registered and activated users can see links Click here to register]

I have not added a MIT license to this script as I prefer you adopt it but I can not forecast the future either.......grins like a sheep
You and vampirefo like this post
Reply
#3
(2014-04-27, 17:52)aus9 Wrote: [Only registered and activated users can see links Click here to register]

I have not added a MIT license to this script as I prefer you adopt it but I can not forecast the future either.......grins like a sheep
Your script looks good, as far as your distro not given permissions, to usb, depends on distro, you might need to grant user permission via 51-android.rules
I run Mepis, pclinuxos,Mint, Ubuntu

I have 4 distros installed on my computer, plus Windows XP, for small windows jobs, mainly to run livesuit when needed.

With Mint and Ubuntu, 51-android.rules are required for user, as these distro use sudo commands.

anyway setting up 51-android.rules allows users to use adb usb support.

You script should be very useful keep at it.
You and aus9 like this post
If you use my scripts or work in your own scripts, your scripts or license should reflect that.

ZTE Open C
Reply
#4
great will do, now, for the nastier questions

Why aren't you saving to your trusty Linux PC?
or are you trying to make it universal to Windows users?

I could do a HERE variable or to keep it simple use PC /root to save to eg
Code:
HERE=`pwd`
echo "$HERE"
/home/gordon/Desktop

2) Have you successfully restored?
what command did you use, as we can build from my initial script and make a backup and a restore script

to confess, I am a Linux user but new to Android

cheers
Reply
#5
(2014-04-28, 07:37)aus9 Wrote: great will do, now, for the nastier questions

Why aren't you saving to your trusty Linux PC?
or are you trying to make it universal to Windows users?

I could do a HERE variable or to keep it simple use PC /root to save to eg
Code:
HERE=`pwd`
echo "$HERE"
/home/gordon/Desktop

2) Have you successfully restored?
what command did you use, as we can build from my initial script and make a backup and a restore script

to confess, I am a Linux user but new to Android

cheers
My script saves to linux, it saves the files in same directory the script is ran from.
aus9 likes this post
If you use my scripts or work in your own scripts, your scripts or license should reflect that.

ZTE Open C
Reply
#6
ahhh well in that case, your outfile is not universal as my Debian does not use that pathway for a mounted internal storage or removeable storage

I have taken the liberty of fixing this universal issue with the HERE as now showing here
[Only registered and activated users can see links Click here to register]

dropbox shows command syntax in pretty colours on my PC if I use a sh extension

2) Have you tested restore please?
Reply
#7
(2014-04-28, 08:24)aus9 Wrote: [Only registered and activated users can see links Click here to register]

dropbox shows command syntax in pretty colours on my PC if I use a sh extension

2) Have you tested restore please?

My script works on every distro ever created, have you even ran my script?
To restore is just reverse.
aus9 likes this post
If you use my scripts or work in your own scripts, your scripts or license should reflect that.

ZTE Open C
Reply
#8
Hi

Quote:My script works on every distro ever created, have you even ran my script?
To restore is just reverse.

I hope you forgive me if you feel I insulted you. I repeat that the pathway on my Debian does not enjoy the same level of success you have tested. That is one of the reasons why I offer a script for your adoption.

My feelings were not be hurt if you are not interested.

I repeat I am an Android newbie and seeking confirmation that you personally have restored from backup.

I have not run your script in reverse because I am a scaredy cat. However in light of your last reply I will delete some posts but will post my improved script if you are still interested.

BTW, I do understand that your distros may have their own udev rules. What I am trying to do is make a more universal script that ignores what distro we may be using.

feel free to comment etc......this is your tutorial and I am not trying to hijack or troll you.
You and vampirefo like this post
Reply
#9
I understand you want to make a script, that requires user interaction for newbies or people who want to interact with a script, in the end your script will work exactly like the one I posted.

I am simply using adb commands to pull the files, to restore I use adb push, which is the opposite of pull.

Nothing wrong with the way you want to make your script, I am not into interactive scripts, I make scripts that only require them to be ran, that way they can be ran automatically or remotely.

I can backup or restore my phone from, a computer from another phone or from another device remotely, an interactive script can't do that cause each time it needs input from user.
For yourself or people who want the interaction they can use your script, others can use mine or make one they like.
aus9 likes this post
If you use my scripts or work in your own scripts, your scripts or license should reflect that.

ZTE Open C
Reply
#10
vampirefo

I just looked at this tut
[Only registered and activated users can see links Click here to register]

it suggests you need a backup of both
/dev/nvram
/data/nvram

your thoughts Sir?

2) Fair enough I will contine with my script for my own evil purposes then......grins
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Another IMEI Restore and Backup Method tiefighter_85 6 10,829 2022-08-04, 19:10
Last Post: annabriett
  [Tutorial] How to backup MT6752 MT6732 MT6753 MT67xx (and others) SP Flash Tool compatible alexzap 15 65,115 2021-09-09, 22:51
Last Post: soldiaz
  [Tutorial] HOW TO PORT TWRP MT6735, MT6752, MT6753, MT6795, MT6797 TWRP MT67xx tutorial Cleopatra 485 298,474 2021-03-02, 20:32
Last Post: itanasa
  [Tutorial] BACKUP, CUSTOM RECOVERY AND ROOT FOR MT67xx SMARTPHONES djtetei 14 24,120 2020-04-11, 21:53
Last Post: romaneart
Thumbs Up [Tutorial] How to format your NAND Flash MT6589, MT6577, MT6582, MT6572 akwangwu 47 285,065 2019-03-18, 08:11
Last Post: abrahim

Forum Jump:


Users browsing this thread: 1 Guest(s)
[-]
Tech & Science
[Sci-Am] Great Apes Joke Around, Suggesting Humor Is Older T...
Last Post: Scientific American
Yesterday 15:32
» Replies: 0
» Views: 0
[Harvard] Hate mosquitoes? Who doesn’t? But maybe we shouldn...
Last Post: Harvard
Yesterday 15:32
» Replies: 0
» Views: 0
[Sci-Am] Men Succumb to Anesthesia More Easily than Women
Last Post: Scientific American
2024-04-09 14:02
» Replies: 0
» Views: 23
[Sci-Am] How to Watch the Total Solar Eclipse Online
Last Post: Scientific American
2024-04-09 00:30
» Replies: 0
» Views: 49
[Sci-Am] Memories Are Made by Breaking DNA — and Fixing It, ...
Last Post: Scientific American
2024-04-08 10:50
» Replies: 0
» Views: 50
[Sci-Am] Ever Larger Cargo Ships Threaten Bridges, Ports and...
Last Post: Scientific American
2024-04-07 21:14
» Replies: 0
» Views: 49
[Sci-Am] Baltimore Bridge Collapse Will Teach Engineers to B...
Last Post: Scientific American
2024-04-07 07:47
» Replies: 0
» Views: 46
[Sci-Am] Pregnancy Increases Biological Age, but Giving Birt...
Last Post: Scientific American
2024-04-06 18:13
» Replies: 0
» Views: 15
[Sci-Am] Understanding Dyscalculia, Dyslexia’s Numeric Count...
Last Post: Scientific American
2024-04-06 04:35
» Replies: 0
» Views: 13
[Sci-Am] Baltimore Bridge Collapse Wreaks Havoc on Coal, Car...
Last Post: Scientific American
2024-04-05 15:14
» Replies: 0
» Views: 10
[Harvard] A playbook for policy change
Last Post: Harvard
2024-04-05 15:14
» Replies: 0
» Views: 13
[Sci-Am] Does Long-Term Benadryl Use Increase Dementia Risk?
Last Post: Scientific American
2024-04-05 01:43
» Replies: 0
» Views: 18
[Sci-Am] How Visually Impaired People Can Experience Solar E...
Last Post: Scientific American
2024-04-04 11:44
» Replies: 0
» Views: 14
[Harvard] Under pressure
Last Post: Harvard
2024-04-04 11:44
» Replies: 0
» Views: 37
[Sci-Am] Wild Birds Gesture ‘After You’ to Insist Their Mate...
Last Post: Scientific American
2024-04-03 08:12
» Replies: 0
» Views: 65
[Harvard] Glimpse into how mind may affect healing
Last Post: Harvard
2024-04-03 08:12
» Replies: 0
» Views: 53
[Sci-Am] The Future of Driving in the U.S. Is Electric—Sort ...
Last Post: Scientific American
2024-04-02 18:49
» Replies: 0
» Views: 22
[Sci-Am] What Climate Change Means for Your Garden
Last Post: Scientific American
2024-04-02 05:13
» Replies: 0
» Views: 42
[Sci-Am] Banning TikTok Would Do Basically Nothing to Protec...
Last Post: Scientific American
2024-04-01 15:15
» Replies: 0
» Views: 47
[Sci-Am] Can AI Replace Human Research Participants? These S...
Last Post: Scientific American
2024-04-01 01:16
» Replies: 0
» Views: 57
[Sci-Am] We Need a Public Service Internet to Free Us from B...
Last Post: Scientific American
2024-03-31 10:31
» Replies: 0
» Views: 70
[Sci-Am] How Do Babies Realize They Can Influence the World?
Last Post: Scientific American
2024-03-30 19:18
» Replies: 0
» Views: 63
[Sci-Am] Earth Has More Than One Moon
Last Post: Scientific American
2024-03-30 05:26
» Replies: 0
» Views: 65
[Sci-Am] Kitten Season Is Out of Control. Are Warmer Winters...
Last Post: Scientific American
2024-03-29 15:41
» Replies: 0
» Views: 56
[Sci-Am] Planet-Eating Stars Are Surprisingly Common, New St...
Last Post: Scientific American
2024-03-29 02:16
» Replies: 0
» Views: 27
[Sci-Am] Wegovy Is First Weight-Loss Drug Approved for Heart...
Last Post: Scientific American
2024-03-28 12:44
» Replies: 0
» Views: 19
[Harvard] Herbaria’s use and importance grows with climate c...
Last Post: Harvard
2024-03-28 12:44
» Replies: 0
» Views: 28
[Sci-Am] Contributors to Scientific American’s April 2024 Is...
Last Post: Scientific American
2024-03-27 22:49
» Replies: 0
» Views: 12
[Sci-Am] Cannibal Cells Inspire Cancer Treatment Improvement
Last Post: Scientific American
2024-03-27 09:07
» Replies: 0
» Views: 10
[Harvard] Harvard physicists create a new phase of matter
Last Post: Harvard
2024-03-27 09:07
» Replies: 0
» Views: 10
[Sci-Am] Readers Respond to the December 2023 Issue
Last Post: Scientific American
2024-03-26 19:41
» Replies: 0
» Views: 12
[Sci-Am] Inside the AI Competition That Decoded an Ancient H...
Last Post: Scientific American
2024-03-25 16:06
» Replies: 0
» Views: 46
[Sci-Am] See Every Bit of Outer Space We’ve Brought Back to ...
Last Post: Scientific American
2024-03-25 01:40
» Replies: 0
» Views: 45
[Sci-Am] Poem: ‘SnapShot, 1968’
Last Post: Scientific American
2024-03-24 10:31
» Replies: 0
» Views: 17
[Sci-Am] Your Next Flight's Fuel Could Be Made By Microbes
Last Post: Scientific American
2024-03-23 19:46
» Replies: 0
» Views: 38
[Sci-Am] Florida’s Surgeon General Shows the Danger of Polit...
Last Post: Scientific American
2024-03-23 05:30
» Replies: 0
» Views: 48
[Sci-Am] The Science behind Humpback Whales’ Eerie Songs
Last Post: Scientific American
2024-03-22 15:51
» Replies: 0
» Views: 56