Example #1
0
def backup():
	return execute('sudo "%s" -r --rawdeviceread 0 1536 ac100-2.img \
									  --rawdeviceread 1536 256 ac100-3.img \
									  --rawdeviceread 1792 1024 ac100-4.img \
									  --rawdeviceread 2816 2560 ac100-5.img \
									  --rawdeviceread 5376 4096 ac100-6.img \
									  --rawdeviceread 9984 153600 ac100-8.img \
									  --rawdeviceread 163584 204800 ac100-9.img \
									  --rawdeviceread 368384 1024 ac100-10.img \
									  --rawdeviceread 369664 632320 ac100-12.img \
									  --sync' % nvflash())
Example #2
0
def restore():
	mbr = ''
	em1 = ''
	em2 = ''
	return execute('sudo "%s" -r --rawdevicewrite 0 1536 ac100-2.img \
									  --rawdevicewrite 1536 256 ac100-3.img \
									  --rawdevicewrite 1792 1024 ac100-4.img \
									  --rawdevicewrite 2816 2560 ac100-5.img \
									  --rawdevicewrite 5376 4096 ac100-6.img \
									  --rawdevicewrite 9472 512 "%s" \
									  --rawdevicewrite 477184 256 "%s" \
									  --rawdevicewrite 2526464 256 "%s" \
									  --sync' % (nvflash(), mbr, em2, em1))
Example #3
0
def get_raw_data(start, size, file):
	return execute('sudo "%s" -r --rawdeviceread %d %d "%s" --sync' % (nvflash(), start, size, file))
Example #4
0
def push_part(id, file):
	return execute('sudo "%s" -r --download %d "%s" --sync' % (nvflash(), id, file))
Example #5
0
def repart(bct, config):
	return execute('sudo "%s" --bct "%s" --setbct \
						  --bl "%s" \
						  --configfile "%s" \
						  --create \
						  --sync' % (nvflash(), bct, fastboot(), config))
Example #6
0
def backup_partitiontable(partitiontable = 'backup_part_table-`date +%F_%T`.txt'):
	return execute('sudo "%s" -r --getpartitiontable "%s" --sync' % (nvflash(), partitiontable))
Example #7
0
def init(bootloader = fastboot()):
	return execute('sudo "%s" --bl "%s" --sync' % (nvflash(), bootloader))