www.chinaphonearena.com

Full Version: [Tutorial] Linux Backup NVRAM Script.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3
(2014-04-28, 11:23)aus9 Wrote: [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

My script already does that, it backs up both.
vampirefo and good looking moderators

It is rude to reveal pms so I won't. I have waited a number of days before trying this method.

I was a naughty boy and failed to show code contribution to vampirefo. Luckily that post was deleted.

I was hoping I might be forgiven. Unfortunately the way I attempted to do it may have been the wrong way.

If moderators agree with my reasoning here is my suggestion.

I have ruined the look of vampirefo's tutorial. It can be undone, me thinks by only a moderator who deletes all my posts (except this one maybe) and vampirefo's replies.

I hope that vampirefo agrees with my intention, if not with my method of delivery.

cheers
I've restored your posts. What really ruins the tutorial is you editing out your posts, which leaves Vampirefo replying to a ghost.

The issue had nothing to do with your posts here. As you see Vampirefo even clicked like on your replies.

I'm guessing you modded your scripts to contain the correct licensing attribution. That's it. Please leave your posts alone and move on from this issue and enjoy the forum.
Hi Sniper47

maybe I am missing the point?

The point is from my point of view, there is one page of my waffle which I believe the OP does not want on his page detracting from his tutorial. I repeat I can not reveal what he said to me in his pm. If OP has no problems, I have no objection to him posting what he said to me via pm.

If you delete my posts and OP replies there won't be issue. Sorry if I am flogging a dead horse. My last post should remain as punishment for me being naughty.

Quote:I'm guessing you modded your scripts to contain the correct licensing attribution.
You bet I have, but I have only tested the script for backup. Script has changed to use the case command style which I won't post here but I will start a new thread when testing is complete.

this now requires script to run as
Code:
./v.sh backup (or restore)

Ideally I like a clean world. OP has made an excellent tut that I polluted. I am trying to clean it up but lack the power to do so.......

gordon
The purpose of the forum is to ask questions and help others. Your posts in this thread are fine and even have likes from the OP and he's included your posts in his quotes.

The issue at hand is there's nothing you've done or said in previous posts that is out of line other than possibly not putting correct attribution, which you've already taken care of.

There's no need to post what he said to you in PM. If Vampirefo still has a problem with you, that's his problem. I suggest you both squash it and move on. Or continue to rant in PM at each other.

That's it. No more regarding this tiff, because now it IS polluting the thread. Just move on and enjoy the forum. Cheers.
Hi

Its me again looking at your page 1 tutorial I notice in the code box you have
Code:
adb pull /sdcard/nvram.bin

rm -r /sdcard/nvram.bin

Maybe that last line needs adb prefix?
Code:
adb shell su -c "rm /sdcard/nvram.bin  "

2) If it helps in discussing your hex to dec online stuff, I found once you have the dec conversion you can do this in the google search box at google.com

For example
Quote:5242880/4096
and press enter to see that google search box will do the calc for you.

3) I notice that you are very helpful to Windows users.
AFAIK the dd command may be only available to 32 bit MS users?
[Only registered and activated users can see links Click here to register]

Do you know if dd commands work on MS 64 bit?

cheers

EDIT (4)

I also found someone who dropped the bs=size to 1, which meant they don't need to divide by 4096
In other words once you have the hex to dec conversion thats it.

translates your dd command to hopefully
Code:
adb shell su -c "dd if=/dev/block/mmcblk0 of=/sdcard/nvram.bin bs=1 count=5242880 skip=4194304  "

Also I like the fact that for the small numbers the first number should match from hex to dec as per table

Quote:0x0000000000100000.........1048576
0x0000000000200000.........2097152
0x0000000000300000.........3145728
0x0000000000400000.........4194304
0x0000000000500000.........5242880
0x0000000000600000.........6291456
0x0000000000700000.........7340032
0x0000000000800000.........8388608
0x0000000000900000.........9437184
0x0000000000A00000........10485760

then I just noticed, hopefully you get a similar result altho it takes longer you get to see a match in count to record numbers?

I am writing to /data as its already rw for me and have no /sdcard/ folder possibly because I set my removeable storage to default storage.

Code:
adb shell su -c "dd if=/dev/block/mmcblk0 of=/data/nvram.bin bs=1 count=5242880 skip=8388608  "
5242880+0 records in
5242880+0 records out
5242880 bytes transferred in 94.618 secs (55411 bytes/sec)
vampirefo

OK I am a little more adept with Android and noticed on my phone I have

/dev/nvram
/dev/recovery etc

Why not keep it simple and use a dd command to back up like

Code:
adb shell su -c "dd if=/dev/nvram of=/data/nvram.bin bs=1"
adb pull /data/nvram.bin

2) I add that I know that not all devices use /dev/block/mmcblk0 but all should have /dev/nvram

cheers
(2014-05-23, 12:04)aus9 Wrote: [ -> ]vampirefo

OK I am a little more adept with Android and noticed on my phone I have

/dev/nvram
/dev/recovery etc

Why not keep it simple and use a dd command to back up like

Code:
adb shell su -c "dd if=/dev/nvram of=/data/nvram.bin bs=1"
adb pull /data/nvram.bin

2) I add that I know that not all devices use /dev/block/mmcblk0 but all should have /dev/nvram

cheers

This could be, I don't know, I have only used two MTK devices, so can't say all use this or that, your code looks completely wrong to me, have you tested it?
Hi

Quote:This could be, I don't know

What is the context here pls? Do you mean that all phones you have---
do not have /dev/nvram or /dev/recovery?
EDIT
2) No I have not tested. I bricked my first phone....I will call it user idiot error

Off topic, on my new device I have a number of things that are sequential in block order but my recovery image is smaller than the next block address......so I am actually going to tidy up the root tests post then have a go at bricking my new phone by doing a dd command for /dev/recovery

Of course I prefer not to brick.

cheers
I only have seen two mtk phones, those two phones both use /dev/block/mmcblk0 for recovery and nvram so no need to probe /dev.

How did you brick your phone? Doesn't seem possible to brick a phone flashing nvram, worse case loose service but not brick phone.

Recovery flashing is dangerous, should only be done via flash_image or cwm recovery, I wouldn't recommend flashing recovery directly via adb a simple mistake could lead to phone caught in endless loop, that would require bootloader flashing to bypass.
Pages: 1 2 3