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

[-]
Latest Threads
Supreme Сasual Dating - True Females
Last Post: Golt
Yesterday 17:03
» Replies: 0
» Views: 20
Top-notch Сasual Dating - Real-life Girl...
Last Post: mikrom79
Yesterday 07:48
» Replies: 0
» Views: 57
Superlative Сasual Dating - Actual Girls
Last Post: rcancino
2024-04-25 09:33
» Replies: 0
» Views: 77
K107-MB-V4.2
Last Post: Alby
2024-04-24 00:37
» Replies: 0
» Views: 142
Prime Сasual Dating - Legitimate Girls
Last Post: lukasz1
2024-04-23 10:26
» Replies: 0
» Views: 107
[ROM] NEED ROM ZH960-MB-V5.0 MTK 6592
Last Post: sendycat2
2024-04-21 08:57
» Replies: 0
» Views: 85
ZH960 Tablet Bricked
Last Post: luis mar que
2024-03-20 19:52
» Replies: 15
» Views: 9750
Thanks, I've been looking for this for a...
Last Post: StevenRip
2024-02-25 05:00
» Replies: 0
» Views: 68
[SOLVED] Need ROM for ZH960-MB-V4.1
Last Post: ery1988
2024-02-21 08:59
» Replies: 0
» Views: 153
NEED ROM ZH960-MB-V4.1
Last Post: ery1988
2024-02-21 08:53
» Replies: 18
» Views: 13623
Budget phone choice help needed
Last Post: sabir7272
2024-02-10 06:52
» Replies: 4
» Views: 4243
ZH960-MB-V3.1 SOLVE
Last Post: Pranav1
2023-12-20 20:22
» Replies: 77
» Views: 33657
Need ROM for SONIM XP7S Android 5.1.1
Last Post: Alpa
2023-11-29 22:17
» Replies: 0
» Views: 102
Need rom for X101 Mt6592
Last Post: carencell
2023-11-24 21:30
» Replies: 3
» Views: 2088
Gizbeat 101: Get your MTK6589 MTK6577 MT...
Last Post: Alexia78
2023-11-13 11:28
» Replies: 8
» Views: 22289
ZH960-MB-V3.1
Last Post: Giankyworld81
2023-11-01 19:35
» Replies: 21
» Views: 15419
Need rom for a tablet with board id "K10...
Last Post: oliver2
2023-10-24 20:23
» Replies: 6
» Views: 5315
How to Connect open public wifi
Last Post: oliverben45
2023-10-24 16:03
» Replies: 11
» Views: 8836
I NEED FILE FOR ITEL MOBILE PHONE AND TO...
Last Post: Meghnad45
2023-10-22 02:38
» Replies: 1
» Views: 1396
NEED Help Bricked my phone.
Last Post: Meghnad45
2023-10-22 02:36
» Replies: 4
» Views: 4812
Introduction
Last Post: ezrahidaya
2023-10-14 14:38
» Replies: 3
» Views: 1318
Needs help to root a china tablet brand ...
Last Post: ezrahidaya
2023-10-14 14:37
» Replies: 1
» Views: 193
Any tips to stay awake?
Last Post: ezrahidaya
2023-10-14 14:35
» Replies: 6
» Views: 5291





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
linr76, tradis, alexzap, Sniper47, 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
#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,843 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,206 2021-09-09, 22:51
Last Post: soldiaz
  [Tutorial] HOW TO PORT TWRP MT6735, MT6752, MT6753, MT6795, MT6797 TWRP MT67xx tutorial Cleopatra 485 298,777 2021-03-02, 20:32
Last Post: itanasa
  [Tutorial] BACKUP, CUSTOM RECOVERY AND ROOT FOR MT67xx SMARTPHONES djtetei 14 24,166 2020-04-11, 21:53
Last Post: romaneart
Thumbs Up [Tutorial] How to format your NAND Flash MT6589, MT6577, MT6582, MT6572 akwangwu 47 285,102 2019-03-18, 08:11
Last Post: abrahim

Forum Jump:


Users browsing this thread: 1 Guest(s)
[-]
Tech & Science
[Sci-Am] Hollywood Should Give Brain Science a Star Turn
Last Post: Scientific American
Yesterday 17:14
» Replies: 0
» Views: 18
[Sci-Am] Milky Way's 'Sleeping Giant' Black Hole Lurks Shock...
Last Post: Scientific American
Yesterday 03:48
» Replies: 0
» Views: 45
[Harvard] Why AI fairness conversations must include disable...
Last Post: Harvard
2024-04-25 13:58
» Replies: 0
» Views: 52
[Sci-Am] How a New AI Model Helps Volcanic History Rise from...
Last Post: Scientific American
2024-04-24 23:17
» Replies: 0
» Views: 48
[Sci-Am] Everyone Will Have Fewer Relatives in the Future
Last Post: Scientific American
2024-04-24 09:25
» Replies: 0
» Views: 36
[Sci-Am] The Dark Side of Nostalgia for Wild, Untouched Plac...
Last Post: Scientific American
2024-04-23 19:59
» Replies: 0
» Views: 30
[Harvard] How did you get that frog to float?
Last Post: Harvard
2024-04-23 19:59
» Replies: 0
» Views: 46
[Sci-Am] In Matters of Scientific Debate, Follow the Houdini...
Last Post: Scientific American
2024-04-23 06:34
» Replies: 0
» Views: 29
[Harvard] Lifting a few with my chatbot
Last Post: Harvard
2024-04-23 06:34
» Replies: 0
» Views: 36
[Sci-Am] This Tiny Fish Makes an Ear-Blasting Screech for Lo...
Last Post: Scientific American
2024-04-22 17:01
» Replies: 0
» Views: 32
[Sci-Am] How Plant Intelligence Can Soothe Climate Anxiety
Last Post: Scientific American
2024-04-22 02:57
» Replies: 0
» Views: 45
[Sci-Am] Contributors to Scientific American’s May 2024 Issu...
Last Post: Scientific American
2024-04-21 13:36
» Replies: 0
» Views: 35
[Sci-Am] A ‘Computer’ Built from DNA Can Find Patterns in Ph...
Last Post: Scientific American
2024-04-20 23:27
» Replies: 0
» Views: 45
[Sci-Am] Unraveling the Secrets of This Weird Beetle’s 48-Ho...
Last Post: Scientific American
2024-04-20 09:17
» Replies: 0
» Views: 42
[Sci-Am] We Are Living in the Pyrocene, the Age of Fire that...
Last Post: Scientific American
2024-04-18 16:45
» Replies: 0
» Views: 94
[Harvard] Hate mosquitoes? Who doesn’t? But maybe we shouldn...
Last Post: Harvard
2024-04-18 03:05
» Replies: 0
» Views: 90
[Sci-Am] Why Some People Always Get Lost—And Others Never Do
Last Post: Scientific American
2024-04-17 13:33
» Replies: 0
» Views: 55
[Sci-Am] U.S. Carbon Removal Needs Have a $100-Billion Price...
Last Post: Scientific American
2024-04-16 23:48
» Replies: 0
» Views: 55
[Sci-Am] New Books Help Parents Explain Climate Disasters to...
Last Post: Scientific American
2024-04-16 10:13
» Replies: 0
» Views: 69
[Sci-Am] Renewable Energy Shatters Records in the U.S.
Last Post: Scientific American
2024-04-15 20:19
» Replies: 0
» Views: 81
[Sci-Am] The Dunning-Kruger Effect Shows that People Don’t K...
Last Post: Scientific American
2024-04-15 06:47
» Replies: 0
» Views: 79
[Sci-Am] AI Chatbots Will Never Stop Hallucinating
Last Post: Scientific American
2024-04-14 17:12
» Replies: 0
» Views: 68
[Sci-Am] How Do Periodical Cicadas Know When to Emerge?
Last Post: Scientific American
2024-04-14 03:11
» Replies: 0
» Views: 57
[Sci-Am] It’s Never Too Late to Take Climate Action
Last Post: Scientific American
2024-04-13 13:43
» Replies: 0
» Views: 66
[Sci-Am] To Ancient Maya, Solar Eclipses Signified Clashing ...
Last Post: Scientific American
2024-04-12 23:09
» Replies: 0
» Views: 67
[Sci-Am] What We Know about Taiwan’s Magnitude 7.4 Earthquak...
Last Post: Scientific American
2024-04-12 09:25
» Replies: 0
» Views: 94
[Sci-Am] Plastic Pollution Is Drowning Earth. A Global Treat...
Last Post: Scientific American
2024-04-11 19:50
» Replies: 0
» Views: 90
[Sci-Am] Eclipses Reveal a Comforting Clockwork in Our Chaot...
Last Post: Scientific American
2024-04-11 06:28
» Replies: 0
» Views: 53
[Harvard] ‘Harvard Thinking’: Climate alignment is no easy t...
Last Post: Harvard
2024-04-11 06:28
» Replies: 0
» Views: 51
[Sci-Am] Men Succumb to Anesthesia More Easily than Women
Last Post: Scientific American
2024-04-09 14:02
» Replies: 0
» Views: 69
[Sci-Am] How to Watch the Total Solar Eclipse Online
Last Post: Scientific American
2024-04-09 00:30
» Replies: 0
» Views: 86
[Sci-Am] Memories Are Made by Breaking DNA — and Fixing It, ...
Last Post: Scientific American
2024-04-08 10:50
» Replies: 0
» Views: 61
[Sci-Am] Ever Larger Cargo Ships Threaten Bridges, Ports and...
Last Post: Scientific American
2024-04-07 21:14
» Replies: 0
» Views: 68
[Sci-Am] Baltimore Bridge Collapse Will Teach Engineers to B...
Last Post: Scientific American
2024-04-07 07:47
» Replies: 0
» Views: 62
[Sci-Am] Pregnancy Increases Biological Age, but Giving Birt...
Last Post: Scientific American
2024-04-06 18:13
» Replies: 0
» Views: 28
[Sci-Am] Understanding Dyscalculia, Dyslexia’s Numeric Count...
Last Post: Scientific American
2024-04-06 04:35
» Replies: 0
» Views: 25
[Sci-Am] Baltimore Bridge Collapse Wreaks Havoc on Coal, Car...
Last Post: Scientific American
2024-04-05 15:14
» Replies: 0
» Views: 27