-
大小: 6.25MB文件类型: .zip金币: 2下载: 5 次发布日期: 2023-09-24
- 语言: 其他
- 标签: SYSTEM.NEW 解包工具
资源简介
SYSTEM.NEW.DAT解包工具,解包工具,安卓SYSTEM.NEW.DAT解包工具
代码片段和文件信息
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#====================================================
# FILE: sdat2img.py
# AUTHORS: xpirt - luxi78 - howellzhu
# DATE: 2016-07-23 10:59:46 CST
#====================================================
import sys os errno
try:
TRANSFER_LIST_FILE = str(sys.argv[1])
NEW_DATA_FILE = str(sys.argv[2])
except IndexError:
print(‘\nUsage: sdat2img.py [system_img]\n‘)
print(‘ : transfer list file‘)
print(‘ : system new dat file‘)
print(‘ [system_img]: output system image\n\n‘)
print(‘Visit xda thread for more information.\n‘)
try:
input = raw_input
except NameError: pass
input(‘Press ENTER to exit...‘)
sys.exit()
try:
OUTPUT_IMAGE_FILE = str(sys.argv[3])
except IndexError:
OUTPUT_IMAGE_FILE = ‘system.img‘
BLOCK_SIZE = 4096
def rangeset(src):
src_set = src.split(‘‘)
num_set = [int(item) for item in src_set]
if len(num_set) != num_set[0]+1:
print(‘Error on parsing following data to rangeset:\n%s‘ % src)
sys.exit(1)
return tuple ([ (num_set[i] num_set[i+1]) for i in range(1 len(num_set) 2) ])
def parse_transfer_list_file(path):
trans_list = open(TRANSFER_LIST_FILE ‘r‘)
# Transfer list file version
# - version 1: android 5.0.x
# - version 2: android 5.1.x
# - version 3: android 6.0.x
version = int(trans_list.readline())
# Total number of blocks
new_blocks = int(trans_list.readline())
# Skip next 2 lines we don‘t need that stuff now
if version >= 2:
trans_list.readline()
trans_list.readline()
commands = []
for line in trans_list:
line = line.split(‘ ‘)
cmd = line[0]
if cmd in [‘erase‘ ‘new‘ ‘zero‘]:
commands.append([cmd rangeset(line[1])])
else:
# Skip lines starting with numbers they are not commands anyway
if not cmd[0].isdigit():
print(‘Command “%s“ is not valid.‘ % cmd)
trans_list.close()
sys.exit(1)
trans_list.close()
return version new_blocks commands
def main(argv):
version new_blocks commands = parse_transfer_list_file(TRANSFER_LIST_FILE)
# Don‘t clobber existing files to avoid accidental data loss
try:
output_img = open(OUTPUT_IMAGE_FILE ‘wb‘)
except IOError as e:
if e.errno == errno.EEXIST:
print(‘Error: the output file “{}“ already exists‘.format(e.filename))
print(‘Remove it rename it or choose a different file name.‘)
sys.exit(e.errno)
else:
raise
new_data_file = open(NEW_DATA_FILE ‘rb‘)
all_block_sets = [i for command in commands for i in command[1]]
max_file_size = max(pair[1] for pair in all_block
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2016-07-27 10:03 dat\
目录 0 2016-07-27 10:04 extract\
文件 1910 2016-07-27 10:01 解包.cmd
目录 0 2016-07-26 17:14 bin\
文件 193536 2014-08-07 19:47 bin\Imgextractor.exe
文件 773968 2011-06-11 06:58 bin\msvcr100.dll
目录 0 2016-07-26 17:14 bin\python\
文件 157336 2016-06-25 22:13 bin\python\pyexpat.pyd
文件 39576 2016-06-25 22:13 bin\python\python.exe
文件 51864 2016-06-25 22:13 bin\python\python3.dll
文件 3127960 2016-06-25 22:13 bin\python\python35.dll
文件 2257581 2016-06-25 22:13 bin\python\python35.zip
文件 39576 2016-06-25 22:13 bin\python\pythonw.exe
文件 17 2016-06-25 22:13 bin\python\pyvenv.cfg
文件 3999 2016-07-26 16:23 bin\python\sdat2img.py
文件 22680 2016-06-25 22:13 bin\python\select.pyd
文件 605336 2016-06-25 22:13 bin\python\sqlite3.dll
文件 864920 2016-06-25 22:13 bin\python\unicodedata.pyd
文件 85840 2016-06-25 22:13 bin\python\vcruntime140.dll
文件 23192 2016-06-25 22:13 bin\python\winsound.pyd
文件 75928 2016-06-25 22:13 bin\python\_bz2.pyd
文件 101528 2016-06-25 22:13 bin\python\_ctypes.pyd
文件 213144 2016-06-25 22:13 bin\python\_decimal.pyd
文件 155288 2016-06-25 22:13 bin\python\_elementtree.pyd
文件 1038488 2016-06-25 22:13 bin\python\_hashlib.pyd
文件 152216 2016-06-25 22:13 bin\python\_lzma.pyd
文件 31896 2016-06-25 22:13 bin\python\_msi.pyd
文件 24728 2016-06-25 22:13 bin\python\_multiprocessing.pyd
文件 33432 2016-06-25 22:13 bin\python\_overlapped.pyd
文件 61080 2016-06-25 22:13 bin\python\_socket.pyd
文件 63640 2016-06-25 22:13 bin\python\_sqlite3.pyd
............此处省略2个文件信息
- 上一篇:dwm1000官方例程
- 下一篇:PIDKey密钥检测工具v2.1.2.1017
相关资源
- Universal Extractor(万能文件解包工具)
- LEDE/OpenWrt解包工具
- mstar-bin-tool-master.rar
- 路由器trx固件修改打包解包工具
- Enigma解包工具
- abe解包工具
- app解包工具
- exe解包工具
- 剑网三最新解包工具 支持新版
- unity3d解包工具
- 完美国际PCK文件加解包工具,最新图
- system.new.dat与system.new.dat.br一键互相转
- XP3文件解包工具
- 华为海思和高通手机固件解包工具
- ETC打包工具解包工具
- CPB解包打包合并工具
- School Days HQ GPK文件解包工具
- pckzup打包解包工具
- asar文件解密加密打包解包工具
- hcgconv 游戏解包工具
- system.new.dat.br解包打包工具
- pck解包工具
- 我叫mt online data.dat 解包工具npk win32版
- rgss2a rgss3a 解包工具
- 雅致解包工具Pkzine
- IPTV高清机windows固件解包工具hdp3.0
- 游戏pkg文件解包工具(帶源碼)
- bin解包工具
- BIN解包工具做ROM必备
- ApkTools解压工具
评论
共有 条评论