[-]
Who's Online
There are currently 2368 online users. [Complete List]
» 1 Member(s) | 2367 Guest(s)
Avatar

[-]
Latest Threads
[Movie] Deadpool, go...see...it...now
Last Post: Golt
Yesterday 08:21
» Replies: 4
» Views: 4756
[SOLVED] Need ROM for ZH960-MB-V4.1
Last Post: dejanx
2024-05-04 16:44
» Replies: 1
» Views: 204
K107-MB-V4.2
Last Post: Alby
2024-04-24 00:37
» Replies: 0
» Views: 174
[ROM] NEED ROM ZH960-MB-V5.0 MTK 6592
Last Post: sendycat2
2024-04-21 08:57
» Replies: 0
» Views: 133
ZH960 Tablet Bricked
Last Post: luis mar que
2024-03-20 19:52
» Replies: 14
» Views: 9772
Thanks, I've been looking for this for a...
Last Post: StevenRip
2024-02-25 05:00
» Replies: 0
» Views: 110
NEED ROM ZH960-MB-V4.1
Last Post: ery1988
2024-02-21 08:53
» Replies: 18
» Views: 13664
Budget phone choice help needed
Last Post: sabir7272
2024-02-10 06:52
» Replies: 4
» Views: 4249
ZH960-MB-V3.1 SOLVE
Last Post: Pranav1
2023-12-20 20:22
» Replies: 74
» Views: 33720
Need ROM for SONIM XP7S Android 5.1.1
Last Post: Alpa
2023-11-29 22:17
» Replies: 0
» Views: 135
Need rom for X101 Mt6592
Last Post: carencell
2023-11-24 21:30
» Replies: 3
» Views: 2114
Gizbeat 101: Get your MTK6589 MTK6577 MT...
Last Post: Alexia78
2023-11-13 11:28
» Replies: 8
» Views: 22295
Need rom for a tablet with board id "K10...
Last Post: oliver2
2023-10-24 20:23
» Replies: 6
» Views: 5358
How to Connect open public wifi
Last Post: oliverben45
2023-10-24 16:03
» Replies: 11
» Views: 8862
I NEED FILE FOR ITEL MOBILE PHONE AND TO...
Last Post: Meghnad45
2023-10-22 02:38
» Replies: 1
» Views: 1404
NEED Help Bricked my phone.
Last Post: Meghnad45
2023-10-22 02:36
» Replies: 4
» Views: 4820
Introduction
Last Post: ezrahidaya
2023-10-14 14:38
» Replies: 3
» Views: 1319
Needs help to root a china tablet brand ...
Last Post: ezrahidaya
2023-10-14 14:37
» Replies: 1
» Views: 200
Any tips to stay awake?
Last Post: ezrahidaya
2023-10-14 14:35
» Replies: 6
» Views: 5503
Need ROM for china TAb MT6797
Last Post: ezrahidaya
2023-10-14 14:34
» Replies: 1
» Views: 360
need this stock firmware for my tablet M...
Last Post: ramzii888
2023-10-14 02:20
» Replies: 4
» Views: 4537
Encryption Unsuccessful - Reset Android
Last Post: Aakriti
2023-10-13 16:51
» Replies: 3
» Views: 12403
betools
Last Post: egdeim
2023-09-21 12:41
» Replies: 4
» Views: 5035





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

Forum Jump:


Users browsing this thread: 1 Guest(s)
[-]
Tech & Science
[Sci-Am] Rat Neurons Repair Mouse Brains That Lack a Sense o...
Last Post: Scientific American
Today 02:49
» Replies: 0
» Views: 8
[Sci-Am] Corals Are Once Again Bleaching En Masse, but Their...
Last Post: Scientific American
Yesterday 13:08
» Replies: 0
» Views: 22
[Sci-Am] People Keep Secrets Because They Overestimate Harsh...
Last Post: Scientific American
2024-05-06 23:09
» Replies: 0
» Views: 38
[Sci-Am] How Unhealthy Are Ultra-Processed Foods?
Last Post: Scientific American
2024-05-06 09:28
» Replies: 0
» Views: 40
[Sci-Am] Cicadas Are Basically Safe for You—And Your Dog—to ...
Last Post: Scientific American
2024-05-05 20:00
» Replies: 0
» Views: 30
[Sci-Am] The Threat of a Solar Superstorm Is Growing—And We’...
Last Post: Scientific American
2024-05-05 06:40
» Replies: 0
» Views: 18
[Sci-Am] New Pollution Regulations Could Largely Eliminate C...
Last Post: Scientific American
2024-05-04 16:11
» Replies: 0
» Views: 9
[Sci-Am] Extrovert or Introvert: Most People Are Actually Am...
Last Post: Scientific American
2024-05-04 02:50
» Replies: 0
» Views: 10
[Sci-Am] Lemon-Scented Marijuana Compound Reduces Weed’s ‘Pa...
Last Post: Scientific American
2024-05-03 13:20
» Replies: 0
» Views: 17
[Sci-Am] New Interactive Map Shows Where Extreme Heat Threat...
Last Post: macikus
2024-05-03 01:38
» Replies: 1
» Views: 47
[Sci-Am] How Ugandan Tobacco Farmers Inadvertently Spread Ba...
Last Post: Scientific American
2024-05-02 09:12
» Replies: 0
» Views: 26
[Sci-Am] Will the Amazon Rain Forest Help Save the Planet?
Last Post: Scientific American
2024-05-01 19:43
» Replies: 0
» Views: 30
[Sci-Am] The U.S. Spends a Fortune on Beach Sand That Storms...
Last Post: Scientific American
2024-05-01 06:15
» Replies: 0
» Views: 29
[Sci-Am] Could JWST Solve One of Cosmology's Greatest Myster...
Last Post: Scientific American
2024-04-30 03:14
» Replies: 0
» Views: 50
[Sci-Am] How to See the Lunar Far Side Right Here on Earth
Last Post: Scientific American
2024-04-29 13:40
» Replies: 0
» Views: 51
[Sci-Am] How Big a Threat Is Bird Flu?
Last Post: Scientific American
2024-04-29 00:05
» Replies: 0
» Views: 41
[Sci-Am] The Amazon's Record-Breaking Drought Is about More ...
Last Post: Tauma
2024-04-28 22:35
» Replies: 1
» Views: 46
[Sci-Am] FDA Recalls Heart Pumps Linked to Deaths and Injuri...
Last Post: Scientific American
2024-04-28 09:53
» Replies: 0
» Views: 20
[Sci-Am] Deadly African Heat Wave Would Not Have Been Possib...
Last Post: Scientific American
2024-04-27 20:10
» Replies: 0
» Views: 25
[Harvard] Getting ahead of dyslexia
Last Post: Harvard
2024-04-27 06:36
» Replies: 0
» Views: 36
[Sci-Am] Hollywood Should Give Brain Science a Star Turn
Last Post: Scientific American
2024-04-26 17:14
» Replies: 0
» Views: 43
[Sci-Am] Milky Way's 'Sleeping Giant' Black Hole Lurks Shock...
Last Post: Scientific American
2024-04-26 03:48
» Replies: 0
» Views: 56
[Harvard] Why AI fairness conversations must include disable...
Last Post: Harvard
2024-04-25 13:58
» Replies: 0
» Views: 63
[Sci-Am] How a New AI Model Helps Volcanic History Rise from...
Last Post: Scientific American
2024-04-24 23:17
» Replies: 0
» Views: 66
[Sci-Am] Everyone Will Have Fewer Relatives in the Future
Last Post: Scientific American
2024-04-24 09:25
» Replies: 0
» Views: 47
[Sci-Am] The Dark Side of Nostalgia for Wild, Untouched Plac...
Last Post: Scientific American
2024-04-23 19:59
» Replies: 0
» Views: 38
[Harvard] How did you get that frog to float?
Last Post: Harvard
2024-04-23 19:59
» Replies: 0
» Views: 53
[Sci-Am] In Matters of Scientific Debate, Follow the Houdini...
Last Post: Scientific American
2024-04-23 06:34
» Replies: 0
» Views: 37
[Harvard] Lifting a few with my chatbot
Last Post: Harvard
2024-04-23 06:34
» Replies: 0
» Views: 40
[Sci-Am] This Tiny Fish Makes an Ear-Blasting Screech for Lo...
Last Post: Scientific American
2024-04-22 17:01
» Replies: 0
» Views: 37
[Sci-Am] How Plant Intelligence Can Soothe Climate Anxiety
Last Post: Scientific American
2024-04-22 02:57
» Replies: 0
» Views: 53
[Sci-Am] Contributors to Scientific American’s May 2024 Issu...
Last Post: Scientific American
2024-04-21 13:36
» Replies: 0
» Views: 42
[Sci-Am] A ‘Computer’ Built from DNA Can Find Patterns in Ph...
Last Post: Scientific American
2024-04-20 23:27
» Replies: 0
» Views: 71
[Sci-Am] Unraveling the Secrets of This Weird Beetle’s 48-Ho...
Last Post: Scientific American
2024-04-20 09:17
» Replies: 0
» Views: 53
[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: 100
[Harvard] Hate mosquitoes? Who doesn’t? But maybe we shouldn...
Last Post: Harvard
2024-04-18 03:05
» Replies: 0
» Views: 97
[Sci-Am] Why Some People Always Get Lost—And Others Never Do
Last Post: Scientific American
2024-04-17 13:33
» Replies: 0
» Views: 62